@lynx-js/web-core-canary 0.15.7 → 0.15.8-canary-20250826-1777bb4b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @lynx-js/web-core
|
|
2
2
|
|
|
3
|
+
## 0.15.8-canary-20250826060301-1777bb4bc1d031b0d30d5e2c079fc04cd72e402e
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: remove multi-thread mts heating ([#1597](https://github.com/lynx-family/lynx-stack/pull/1597))
|
|
8
|
+
|
|
9
|
+
The default rendering mode is "all-on-ui". Therefore the preheating for "multi-thread" will be removed.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @lynx-js/web-constants@0.15.8-canary-20250826060301-1777bb4bc1d031b0d30d5e2c079fc04cd72e402e
|
|
13
|
+
- @lynx-js/web-mainthread-apis@0.15.8-canary-20250826060301-1777bb4bc1d031b0d30d5e2c079fc04cd72e402e
|
|
14
|
+
- @lynx-js/web-worker-rpc@0.15.8-canary-20250826060301-1777bb4bc1d031b0d30d5e2c079fc04cd72e402e
|
|
15
|
+
- @lynx-js/web-worker-runtime@0.15.8-canary-20250826060301-1777bb4bc1d031b0d30d5e2c079fc04cd72e402e
|
|
16
|
+
|
|
3
17
|
## 0.15.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -216,25 +230,25 @@
|
|
|
216
230
|
lynxView.initI18nResources = [
|
|
217
231
|
{
|
|
218
232
|
options: {
|
|
219
|
-
locale:
|
|
220
|
-
channel:
|
|
221
|
-
fallback_url:
|
|
233
|
+
locale: "en",
|
|
234
|
+
channel: "1",
|
|
235
|
+
fallback_url: "",
|
|
222
236
|
},
|
|
223
237
|
resource: {
|
|
224
|
-
hello:
|
|
225
|
-
lynx:
|
|
238
|
+
hello: "hello",
|
|
239
|
+
lynx: "lynx web platform1",
|
|
226
240
|
},
|
|
227
241
|
},
|
|
228
242
|
];
|
|
229
|
-
lynxView.addEventListener(
|
|
243
|
+
lynxView.addEventListener("i18nResourceMissed", (e) => {
|
|
230
244
|
console.log(e);
|
|
231
245
|
});
|
|
232
246
|
|
|
233
247
|
// mts
|
|
234
248
|
_I18nResourceTranslation({
|
|
235
|
-
locale:
|
|
236
|
-
channel:
|
|
237
|
-
fallback_url:
|
|
249
|
+
locale: "en",
|
|
250
|
+
channel: "1",
|
|
251
|
+
fallback_url: "",
|
|
238
252
|
});
|
|
239
253
|
```
|
|
240
254
|
|
|
@@ -642,8 +656,8 @@
|
|
|
642
656
|
}
|
|
643
657
|
};`,
|
|
644
658
|
],
|
|
645
|
-
{ type:
|
|
646
|
-
)
|
|
659
|
+
{ type: "text/javascript" }
|
|
660
|
+
)
|
|
647
661
|
),
|
|
648
662
|
};
|
|
649
663
|
lynxView.nativeModulesMap = nativeModulesMap;
|
|
@@ -758,8 +772,8 @@
|
|
|
758
772
|
};
|
|
759
773
|
};`,
|
|
760
774
|
],
|
|
761
|
-
{ type:
|
|
762
|
-
)
|
|
775
|
+
{ type: "text/javascript" }
|
|
776
|
+
)
|
|
763
777
|
);
|
|
764
778
|
|
|
765
779
|
const color_methods = URL.createObjectURL(
|
|
@@ -774,8 +788,8 @@
|
|
|
774
788
|
};
|
|
775
789
|
};`,
|
|
776
790
|
],
|
|
777
|
-
{ type:
|
|
778
|
-
)
|
|
791
|
+
{ type: "text/javascript" }
|
|
792
|
+
)
|
|
779
793
|
);
|
|
780
794
|
|
|
781
795
|
lynxView.napiModuleMap = {
|
|
@@ -792,7 +806,7 @@
|
|
|
792
806
|
|
|
793
807
|
```js
|
|
794
808
|
lynxView.onNapiModulesCall = (name, data, moduleName) => {
|
|
795
|
-
if (name ===
|
|
809
|
+
if (name === "getColor" && moduleName === "color_methods") {
|
|
796
810
|
return data.color;
|
|
797
811
|
}
|
|
798
812
|
};
|
|
@@ -871,8 +885,8 @@
|
|
|
871
885
|
}
|
|
872
886
|
};`,
|
|
873
887
|
],
|
|
874
|
-
{ type:
|
|
875
|
-
)
|
|
888
|
+
{ type: "text/javascript" }
|
|
889
|
+
)
|
|
876
890
|
);
|
|
877
891
|
```
|
|
878
892
|
|
|
@@ -884,7 +898,7 @@
|
|
|
884
898
|
|
|
885
899
|
```js
|
|
886
900
|
lynxView.onNativeModulesCall = (name, data, callback) => {
|
|
887
|
-
if (name ===
|
|
901
|
+
if (name === "getColor") {
|
|
888
902
|
callback(data.color);
|
|
889
903
|
}
|
|
890
904
|
};
|
|
@@ -894,7 +908,7 @@
|
|
|
894
908
|
|
|
895
909
|
```js
|
|
896
910
|
lynxView.onNativeModulesCall = (name, data, moduleName) => {
|
|
897
|
-
if (name ===
|
|
911
|
+
if (name === "getColor" && moduleName === "bridge") {
|
|
898
912
|
return data.color;
|
|
899
913
|
}
|
|
900
914
|
};
|
|
@@ -1252,7 +1266,7 @@
|
|
|
1252
1266
|
This flag changes the behaviour of cascading. It provide a way to do this
|
|
1253
1267
|
|
|
1254
1268
|
```jsx
|
|
1255
|
-
<view class=
|
|
1269
|
+
<view class="class-a class-b" />
|
|
1256
1270
|
```
|
|
1257
1271
|
|
|
1258
1272
|
The class-b will override (cascading) styles of class-a.
|
|
@@ -1352,11 +1366,11 @@
|
|
|
1352
1366
|
There is also a simple way to use this feature
|
|
1353
1367
|
|
|
1354
1368
|
```javascript
|
|
1355
|
-
import { LynxCard } from
|
|
1356
|
-
import { loadElement } from
|
|
1357
|
-
import
|
|
1358
|
-
import
|
|
1359
|
-
import
|
|
1369
|
+
import { LynxCard } from "@lynx-js/web-core";
|
|
1370
|
+
import { loadElement } from "@lynx-js/web-elements/lazy";
|
|
1371
|
+
import "@lynx-js/web-elements/index.css";
|
|
1372
|
+
import "@lynx-js/web-core/index.css";
|
|
1373
|
+
import "./index.css";
|
|
1360
1374
|
|
|
1361
1375
|
const lynxcard = new LynxCard({
|
|
1362
1376
|
...beforeConfigs,
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
import { Rpc } from '@lynx-js/web-worker-rpc';
|
|
5
5
|
const backgroundWorkerContextCount = [];
|
|
6
6
|
const contextIdToBackgroundWorker = [];
|
|
7
|
-
let preHeatedMainWorker = createMainWorker();
|
|
8
7
|
export function bootWorkers(lynxGroupId, allOnUI) {
|
|
9
8
|
let curMainWorker;
|
|
10
9
|
if (allOnUI) {
|
|
11
10
|
curMainWorker = createUIChannel();
|
|
12
11
|
}
|
|
13
12
|
else {
|
|
14
|
-
curMainWorker =
|
|
15
|
-
preHeatedMainWorker = createMainWorker();
|
|
13
|
+
curMainWorker = createMainWorker();
|
|
16
14
|
}
|
|
17
15
|
const curBackgroundWorker = createBackgroundWorker(lynxGroupId, curMainWorker.channelMainThreadWithBackground);
|
|
18
16
|
if (lynxGroupId !== undefined) {
|
|
@@ -95,7 +93,12 @@ function createBackgroundWorker(lynxGroupId, channelMainThreadWithBackground) {
|
|
|
95
93
|
return { backgroundRpc, backgroundThreadWorker };
|
|
96
94
|
}
|
|
97
95
|
function createWebWorker(name) {
|
|
98
|
-
return new Worker(
|
|
96
|
+
return new Worker(
|
|
97
|
+
/* webpackFetchPriority: "high" */
|
|
98
|
+
/* webpackChunkName: "web-core-worker-runtime" */
|
|
99
|
+
/* webpackPrefetch: true */
|
|
100
|
+
/* webpackPreload: true */
|
|
101
|
+
new URL('@lynx-js/web-worker-runtime', import.meta.url), {
|
|
99
102
|
type: 'module',
|
|
100
103
|
name,
|
|
101
104
|
});
|
|
@@ -5,7 +5,13 @@ import { i18nResourceMissedEventName, I18nResources, lynxUniqueIdAttribute, } fr
|
|
|
5
5
|
import { Rpc } from '@lynx-js/web-worker-rpc';
|
|
6
6
|
import { dispatchLynxViewEvent } from '../utils/dispatchLynxViewEvent.js';
|
|
7
7
|
import { createExposureMonitor } from './crossThreadHandlers/createExposureMonitor.js';
|
|
8
|
-
const { prepareMainThreadAPIs, } = await import(
|
|
8
|
+
const { prepareMainThreadAPIs, } = await import(
|
|
9
|
+
/* webpackChunkName: "web-core-main-thread-apis" */
|
|
10
|
+
/* webpackMode: "lazy-once" */
|
|
11
|
+
/* webpackPreload: true */
|
|
12
|
+
/* webpackPrefetch: true */
|
|
13
|
+
/* webpackFetchPriority: "high" */
|
|
14
|
+
'@lynx-js/web-mainthread-apis');
|
|
9
15
|
export function createRenderAllOnUI(mainToBackgroundRpc, shadowRoot, markTimingInternal, flushMarkTimingInternal, callbacks, ssrDumpInfo) {
|
|
10
16
|
if (!globalThis.module) {
|
|
11
17
|
Object.assign(globalThis, { module: {} });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-canary",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.8-canary-20250826-1777bb4b",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.3",
|
|
28
|
-
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.
|
|
29
|
-
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.
|
|
30
|
-
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.
|
|
31
|
-
"@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.15.
|
|
28
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.8-canary-20250826-1777bb4b",
|
|
29
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.8-canary-20250826-1777bb4b",
|
|
30
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.8-canary-20250826-1777bb4b",
|
|
31
|
+
"@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.15.8-canary-20250826-1777bb4b"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@lynx-js/lynx-core": "0.1.3",
|