Skip to content

refactor: add createOffscreenDocument and its createElement method#71

Merged
PupilTong merged 2 commits intolynx-family:mainfrom
PupilTong:p/hw/use-shadowroot
Mar 5, 2025
Merged

refactor: add createOffscreenDocument and its createElement method#71
PupilTong merged 2 commits intolynx-family:mainfrom
PupilTong:p/hw/use-shadowroot

Conversation

@PupilTong
Copy link
Collaborator

#51

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2025

⚠️ No Changeset found

Latest commit: e7a1b41

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@PupilTong PupilTong requested a review from colinaaa March 5, 2025 11:54
@PupilTong PupilTong requested a review from Sherry-hue March 5, 2025 12:03
@PupilTong PupilTong changed the title refractor: add createOffscreenDocument and its createElement method refactor: add createOffscreenDocument and its createElement method Mar 5, 2025
@PupilTong PupilTong requested a review from gaoachao March 5, 2025 12:17
@PupilTong PupilTong merged commit 7da7601 into lynx-family:main Mar 5, 2025
11 of 12 checks passed
colinaaa pushed a commit that referenced this pull request Mar 9, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/web-elements@0.3.0

### Minor Changes

- feat: support `justify-content`, `align-self` in linear container
([#37](#37))

    Now these two properties could work in a linear container.

We don't transforms the `justify-content` and `align-self` to css vars
any more.

The previous version of `@lynx-js/web-core` won't work with current
`@lynx-js/web-core` after this change.

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/web-elements-reactive@0.1.1

## @lynx-js/react@0.105.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- feat: add compiler only version of addComponentElement, it does not
support spread props but have no runtime overhead, use it by:
([#15](#15))

    ```js
    pluginReactLynx({
      compat: {
        addComponentElement: {
          compilerOnly: true,
        },
      },
    });
    ```

- Fix error `createRef is not a function`
([#16](#16))

- Support `MIXED` target for worklet, it will be used by unit testing
frameworks, etc.
([#27](#27))

- Support return value for `runOnBackground()` and `runOnMainThread()`.
([#119](#119))

Now you can get the return value from `runOnBackground()` and
`runOnMainThread()`, which enables more flexible data flow between the
main thread and the background thread.

    ```js
    import { runOnBackground } from "@lynx-js/react";

    const onTap = async () => {
      "main thread";
      const text = await runOnBackground(() => {
        "background only";
        return "Hello, world!";
      })();
      console.log(text);
    };
    ```

## @lynx-js/rspeedy@0.8.3

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Fix error "'wmic' is not recognized as an internal or external
command" ([#91](#91))

- Bump Rsbuild v1.2.15 with Rspack v1.2.7.
([#44](#44))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/chunk-loading-webpack-plugin@0.1.7
    -   @lynx-js/webpack-dev-transport@0.1.1
    -   @lynx-js/websocket@0.0.4

## create-rspeedy@0.8.3

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Changing filename of index.jsx to index.js because rspeedy requires
index.js. Then edit index.js import statement to make it import App.jsx
instead of App.js since App.jsx is present in the template. This
resolves "Module not found" error.
([#106](#106))

## @lynx-js/qrcode-rsbuild-plugin@0.3.4

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/react-rsbuild-plugin@0.9.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- fix(rspeedy/plugin-react): mkdir main:background fails in windows
([#76](#76))

- fix(rspeedy/plugin-react): use path.posix.join for backgroundName to
ensure consistent path separators across platforms.
([#122](#122))

- Updated dependencies
\[[`c617453`](c617453),
[`870106f`](870106f),
[`ea82ef6`](ea82ef6)]:
    -   @lynx-js/runtime-wrapper-webpack-plugin@0.0.8
    -   @lynx-js/react-refresh-webpack-plugin@0.3.2
    -   @lynx-js/css-extract-webpack-plugin@0.5.1
    -   @lynx-js/template-webpack-plugin@0.6.4
    -   @lynx-js/react-webpack-plugin@0.6.7
    -   @lynx-js/react-alias-rsbuild-plugin@0.9.1
    -   @lynx-js/web-webpack-plugin@0.6.2

## @lynx-js/react-alias-rsbuild-plugin@0.9.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/websocket@0.0.4

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/tailwind-preset@0.0.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/css-serializer@0.1.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/web-constants@0.7.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- fix: some valus should be updateable by global scope
([#130](#130))

Now we add an allowlist to allow some identifiers could be updated by
globalThis.

    For those values in the allowlist:

        globalThis.foo = 'xx';
        console.log(foo); //'xx'

- refractor: improve some internal logic for element creating in MTS
([#71](#71))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/web-worker-rpc@0.7.1

## @lynx-js/web-core@0.7.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- fix: some valus should be updateable by global scope
([#130](#130))

Now we add an allowlist to allow some identifiers could be updated by
globalThis.

    For those values in the allowlist:

        globalThis.foo = 'xx';
        console.log(foo); //'xx'

- refactor: isolate the globalThis in mts
([#90](#90))

After this commit, developers' mts code won't be able to access the
globalThis

    The following usage will NOT work

        globalThis.foo = () =>{};
        foo();//crash

- refractor: improve some internal logic for element creating in MTS
([#71](#71))

- Updated dependencies
\[[`c617453`](c617453),
[`2044571`](2044571),
[`7da7601`](7da7601)]:
    -   @lynx-js/web-worker-runtime@0.7.1
    -   @lynx-js/web-worker-rpc@0.7.1
    -   @lynx-js/web-constants@0.7.1

## @lynx-js/web-elements-compat@0.2.3

### Patch Changes

- Support NPM provenance.
([#30](#30))

- feat: support `justify-content`, `align-self` in linear container
([#37](#37))

    Now these two properties could work in a linear container.

We don't transforms the `justify-content` and `align-self` to css vars
any more.

The previous version of `@lynx-js/web-core` won't work with current
`@lynx-js/web-core` after this change.

## @lynx-js/web-elements-reactive@0.1.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/web-explorer@0.0.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/web-mainthread-apis@0.7.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- fix: some valus should be updateable by global scope
([#130](#130))

Now we add an allowlist to allow some identifiers could be updated by
globalThis.

    For those values in the allowlist:

        globalThis.foo = 'xx';
        console.log(foo); //'xx'

- refactor: isolate the globalThis in mts
([#90](#90))

After this commit, developers' mts code won't be able to access the
globalThis

    The following usage will NOT work

        globalThis.foo = () =>{};
        foo();//crash

- refractor: improve some internal logic for element creating in MTS
([#71](#71))

- Updated dependencies
\[[`c617453`](c617453),
[`2044571`](2044571),
[`399a6d9`](399a6d9),
[`7da7601`](7da7601)]:
    -   @lynx-js/web-style-transformer@0.2.2
    -   @lynx-js/web-constants@0.7.1

## @lynx-js/web-style-transformer@0.2.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

- feat: support `justify-content`, `align-self` in linear container
([#37](#37))

    Now these two properties could work in a linear container.

We don't transforms the `justify-content` and `align-self` to css vars
any more.

The previous version of `@lynx-js/web-core` won't work with current
`@lynx-js/web-core` after this change.

## @lynx-js/web-worker-rpc@0.7.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/web-worker-runtime@0.7.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453),
[`2044571`](2044571),
[`82285ce`](82285ce),
[`7da7601`](7da7601)]:
    -   @lynx-js/web-mainthread-apis@0.7.1
    -   @lynx-js/web-worker-rpc@0.7.1
    -   @lynx-js/web-constants@0.7.1

## @lynx-js/chunk-loading-webpack-plugin@0.1.7

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/webpack-runtime-globals@0.0.5

## @lynx-js/css-extract-webpack-plugin@0.5.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/react-refresh-webpack-plugin@0.3.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/react-webpack-plugin@0.6.7

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/webpack-runtime-globals@0.0.5

## @lynx-js/runtime-wrapper-webpack-plugin@0.0.8

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/webpack-runtime-globals@0.0.5

## @lynx-js/template-webpack-plugin@0.6.4

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Use WASM when NAPI is not available.
([#138](#138))

- Add `defaultOverflowVisible` option to `LynxTemplatePlugin`.
([#78](#78))

    ```js
import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";

    new LynxTemplatePlugin({
      defaultOverflowVisible: false,
    });
    ```

- Updated dependencies
\[[`c617453`](c617453)]:
    -   @lynx-js/webpack-runtime-globals@0.0.5
    -   @lynx-js/css-serializer@0.1.2

## @lynx-js/web-webpack-plugin@0.6.2

### Patch Changes

- Support NPM provenance.
([#30](#30))

- Updated dependencies
\[[`c617453`](c617453),
[`399a6d9`](399a6d9)]:
    -   @lynx-js/web-style-transformer@0.2.2

## @lynx-js/webpack-dev-transport@0.1.1

### Patch Changes

- Support NPM provenance.
([#30](#30))

## @lynx-js/webpack-runtime-globals@0.0.5

### Patch Changes

- Support NPM provenance.
([#30](#30))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants