@lynx-js/web-core-canary 0.16.0 → 0.16.1-canary-20250910-c7060205
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 +38 -26
- package/dist/uiThread/createRenderAllOnUI.js +10 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lynx-js/web-core
|
|
2
2
|
|
|
3
|
+
## 0.16.1-canary-20250910042759-c706020541a7e7551587ff3751713737c33da852
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- refactor: improve chunk loading ([#1703](https://github.com/lynx-family/lynx-stack/pull/1703))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @lynx-js/web-constants@0.16.1-canary-20250910042759-c706020541a7e7551587ff3751713737c33da852
|
|
11
|
+
- @lynx-js/web-mainthread-apis@0.16.1-canary-20250910042759-c706020541a7e7551587ff3751713737c33da852
|
|
12
|
+
- @lynx-js/web-worker-rpc@0.16.1-canary-20250910042759-c706020541a7e7551587ff3751713737c33da852
|
|
13
|
+
- @lynx-js/web-worker-runtime@0.16.1-canary-20250910042759-c706020541a7e7551587ff3751713737c33da852
|
|
14
|
+
|
|
3
15
|
## 0.16.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -247,25 +259,25 @@
|
|
|
247
259
|
lynxView.initI18nResources = [
|
|
248
260
|
{
|
|
249
261
|
options: {
|
|
250
|
-
locale:
|
|
251
|
-
channel:
|
|
252
|
-
fallback_url:
|
|
262
|
+
locale: "en",
|
|
263
|
+
channel: "1",
|
|
264
|
+
fallback_url: "",
|
|
253
265
|
},
|
|
254
266
|
resource: {
|
|
255
|
-
hello:
|
|
256
|
-
lynx:
|
|
267
|
+
hello: "hello",
|
|
268
|
+
lynx: "lynx web platform1",
|
|
257
269
|
},
|
|
258
270
|
},
|
|
259
271
|
];
|
|
260
|
-
lynxView.addEventListener(
|
|
272
|
+
lynxView.addEventListener("i18nResourceMissed", (e) => {
|
|
261
273
|
console.log(e);
|
|
262
274
|
});
|
|
263
275
|
|
|
264
276
|
// mts
|
|
265
277
|
_I18nResourceTranslation({
|
|
266
|
-
locale:
|
|
267
|
-
channel:
|
|
268
|
-
fallback_url:
|
|
278
|
+
locale: "en",
|
|
279
|
+
channel: "1",
|
|
280
|
+
fallback_url: "",
|
|
269
281
|
});
|
|
270
282
|
```
|
|
271
283
|
|
|
@@ -673,8 +685,8 @@
|
|
|
673
685
|
}
|
|
674
686
|
};`,
|
|
675
687
|
],
|
|
676
|
-
{ type:
|
|
677
|
-
)
|
|
688
|
+
{ type: "text/javascript" }
|
|
689
|
+
)
|
|
678
690
|
),
|
|
679
691
|
};
|
|
680
692
|
lynxView.nativeModulesMap = nativeModulesMap;
|
|
@@ -789,8 +801,8 @@
|
|
|
789
801
|
};
|
|
790
802
|
};`,
|
|
791
803
|
],
|
|
792
|
-
{ type:
|
|
793
|
-
)
|
|
804
|
+
{ type: "text/javascript" }
|
|
805
|
+
)
|
|
794
806
|
);
|
|
795
807
|
|
|
796
808
|
const color_methods = URL.createObjectURL(
|
|
@@ -805,8 +817,8 @@
|
|
|
805
817
|
};
|
|
806
818
|
};`,
|
|
807
819
|
],
|
|
808
|
-
{ type:
|
|
809
|
-
)
|
|
820
|
+
{ type: "text/javascript" }
|
|
821
|
+
)
|
|
810
822
|
);
|
|
811
823
|
|
|
812
824
|
lynxView.napiModuleMap = {
|
|
@@ -823,7 +835,7 @@
|
|
|
823
835
|
|
|
824
836
|
```js
|
|
825
837
|
lynxView.onNapiModulesCall = (name, data, moduleName) => {
|
|
826
|
-
if (name ===
|
|
838
|
+
if (name === "getColor" && moduleName === "color_methods") {
|
|
827
839
|
return data.color;
|
|
828
840
|
}
|
|
829
841
|
};
|
|
@@ -902,8 +914,8 @@
|
|
|
902
914
|
}
|
|
903
915
|
};`,
|
|
904
916
|
],
|
|
905
|
-
{ type:
|
|
906
|
-
)
|
|
917
|
+
{ type: "text/javascript" }
|
|
918
|
+
)
|
|
907
919
|
);
|
|
908
920
|
```
|
|
909
921
|
|
|
@@ -915,7 +927,7 @@
|
|
|
915
927
|
|
|
916
928
|
```js
|
|
917
929
|
lynxView.onNativeModulesCall = (name, data, callback) => {
|
|
918
|
-
if (name ===
|
|
930
|
+
if (name === "getColor") {
|
|
919
931
|
callback(data.color);
|
|
920
932
|
}
|
|
921
933
|
};
|
|
@@ -925,7 +937,7 @@
|
|
|
925
937
|
|
|
926
938
|
```js
|
|
927
939
|
lynxView.onNativeModulesCall = (name, data, moduleName) => {
|
|
928
|
-
if (name ===
|
|
940
|
+
if (name === "getColor" && moduleName === "bridge") {
|
|
929
941
|
return data.color;
|
|
930
942
|
}
|
|
931
943
|
};
|
|
@@ -1283,7 +1295,7 @@
|
|
|
1283
1295
|
This flag changes the behaviour of cascading. It provide a way to do this
|
|
1284
1296
|
|
|
1285
1297
|
```jsx
|
|
1286
|
-
<view class=
|
|
1298
|
+
<view class="class-a class-b" />
|
|
1287
1299
|
```
|
|
1288
1300
|
|
|
1289
1301
|
The class-b will override (cascading) styles of class-a.
|
|
@@ -1383,11 +1395,11 @@
|
|
|
1383
1395
|
There is also a simple way to use this feature
|
|
1384
1396
|
|
|
1385
1397
|
```javascript
|
|
1386
|
-
import { LynxCard } from
|
|
1387
|
-
import { loadElement } from
|
|
1388
|
-
import
|
|
1389
|
-
import
|
|
1390
|
-
import
|
|
1398
|
+
import { LynxCard } from "@lynx-js/web-core";
|
|
1399
|
+
import { loadElement } from "@lynx-js/web-elements/lazy";
|
|
1400
|
+
import "@lynx-js/web-elements/index.css";
|
|
1401
|
+
import "@lynx-js/web-core/index.css";
|
|
1402
|
+
import "./index.css";
|
|
1391
1403
|
|
|
1392
1404
|
const lynxcard = new LynxCard({
|
|
1393
1405
|
...beforeConfigs,
|
|
@@ -36,7 +36,12 @@ function createIFrameRealm(parent) {
|
|
|
36
36
|
script.fetchPriority = 'high';
|
|
37
37
|
script.defer = true;
|
|
38
38
|
script.async = false;
|
|
39
|
-
script.onload = () =>
|
|
39
|
+
script.onload = () => {
|
|
40
|
+
const ret = iframeWindow?.module?.exports;
|
|
41
|
+
// @ts-expect-error
|
|
42
|
+
iframeWindow.module = { exports: undefined };
|
|
43
|
+
resolve(ret);
|
|
44
|
+
};
|
|
40
45
|
script.onerror = (err) => reject(new Error(`Failed to load script: ${url}`, { cause: err }));
|
|
41
46
|
// @ts-expect-error
|
|
42
47
|
iframeWindow.module = { exports: undefined };
|
|
@@ -53,7 +58,10 @@ function createIFrameRealm(parent) {
|
|
|
53
58
|
// @ts-expect-error
|
|
54
59
|
iframeWindow.module = { exports: undefined };
|
|
55
60
|
iframe.contentDocument.head.appendChild(script);
|
|
56
|
-
|
|
61
|
+
const ret = iframeWindow?.module?.exports;
|
|
62
|
+
// @ts-expect-error
|
|
63
|
+
iframeWindow.module = { exports: undefined };
|
|
64
|
+
return ret;
|
|
57
65
|
}
|
|
58
66
|
else {
|
|
59
67
|
throw new Error(`Failed to load script: ${url}`, { cause: xhr });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-canary",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1-canary-20250910-c7060205",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
|
|
28
|
-
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.16.
|
|
29
|
-
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.16.
|
|
30
|
-
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.16.
|
|
31
|
-
"@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.16.
|
|
28
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.16.1-canary-20250910-c7060205",
|
|
29
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.16.1-canary-20250910-c7060205",
|
|
30
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.16.1-canary-20250910-c7060205",
|
|
31
|
+
"@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.16.1-canary-20250910-c7060205"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@lynx-js/lynx-core": "0.1.3",
|
|
35
|
-
"@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.8.
|
|
35
|
+
"@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.8.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lynx-js/lynx-core": "0.1.3",
|