@lynx-js/web-core-server-canary 0.17.2 → 0.18.0-canary-20251010-77397fd5
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 +11 -9
- package/dist/index.js +10 -13
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @lynx-js/web-core-server
|
|
2
2
|
|
|
3
|
+
## 0.18.0-canary-20251010092201-77397fd535cf60556f8f82f7ef8dae8a623d1625
|
|
4
|
+
|
|
3
5
|
## 0.17.2
|
|
4
6
|
|
|
5
7
|
## 0.17.1
|
|
@@ -109,25 +111,25 @@
|
|
|
109
111
|
lynxView.initI18nResources = [
|
|
110
112
|
{
|
|
111
113
|
options: {
|
|
112
|
-
locale:
|
|
113
|
-
channel:
|
|
114
|
-
fallback_url:
|
|
114
|
+
locale: "en",
|
|
115
|
+
channel: "1",
|
|
116
|
+
fallback_url: "",
|
|
115
117
|
},
|
|
116
118
|
resource: {
|
|
117
|
-
hello:
|
|
118
|
-
lynx:
|
|
119
|
+
hello: "hello",
|
|
120
|
+
lynx: "lynx web platform1",
|
|
119
121
|
},
|
|
120
122
|
},
|
|
121
123
|
];
|
|
122
|
-
lynxView.addEventListener(
|
|
124
|
+
lynxView.addEventListener("i18nResourceMissed", (e) => {
|
|
123
125
|
console.log(e);
|
|
124
126
|
});
|
|
125
127
|
|
|
126
128
|
// mts
|
|
127
129
|
_I18nResourceTranslation({
|
|
128
|
-
locale:
|
|
129
|
-
channel:
|
|
130
|
-
fallback_url:
|
|
130
|
+
locale: "en",
|
|
131
|
+
channel: "1",
|
|
132
|
+
fallback_url: "",
|
|
131
133
|
});
|
|
132
134
|
```
|
|
133
135
|
|
package/dist/index.js
CHANGED
|
@@ -620,7 +620,7 @@ const publishEventEndpoint = createRpcEndpoint('publishEvent', false, false);
|
|
|
620
620
|
createRpcEndpoint('postOffscreenEventEndpoint', false, false);
|
|
621
621
|
const switchExposureServiceEndpoint = createRpcEndpoint('switchExposureServiceEndpoint', false, false);
|
|
622
622
|
createRpcEndpoint('mainThreadStart', false, false);
|
|
623
|
-
createRpcEndpoint('updateData', false, true);
|
|
623
|
+
const updateDataEndpoint = createRpcEndpoint('updateData', false, true);
|
|
624
624
|
createRpcEndpoint('sendGlobalEventEndpoint', false, false);
|
|
625
625
|
createRpcEndpoint('dispose', false, true);
|
|
626
626
|
const BackgroundThreadStartEndpoint = createRpcEndpoint('start', false, true);
|
|
@@ -671,17 +671,6 @@ var UpdateDataOptions_NativeUpdateDataType;
|
|
|
671
671
|
NativeUpdateDataType[NativeUpdateDataType["UPDATE"] = 0] = "UPDATE";
|
|
672
672
|
NativeUpdateDataType[NativeUpdateDataType["RESET"] = 1] = "RESET";
|
|
673
673
|
})(UpdateDataOptions_NativeUpdateDataType || (UpdateDataOptions_NativeUpdateDataType = {}));
|
|
674
|
-
var UpdateDataOptions_UpdateDataType;
|
|
675
|
-
(function(UpdateDataType) {
|
|
676
|
-
UpdateDataType[UpdateDataType["Unknown"] = 0] = "Unknown";
|
|
677
|
-
UpdateDataType[UpdateDataType["UpdateExplicitByUser"] = 1] = "UpdateExplicitByUser";
|
|
678
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromCtor"] = 2] = "UpdateByKernelFromCtor";
|
|
679
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromRender"] = 4] = "UpdateByKernelFromRender";
|
|
680
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromHydrate"] = 8] = "UpdateByKernelFromHydrate";
|
|
681
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromGetDerived"] = 16] = "UpdateByKernelFromGetDerived";
|
|
682
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromConflict"] = 32] = "UpdateByKernelFromConflict";
|
|
683
|
-
UpdateDataType[UpdateDataType["UpdateByKernelFromHMR"] = 64] = "UpdateByKernelFromHMR";
|
|
684
|
-
})(UpdateDataOptions_UpdateDataType || (UpdateDataOptions_UpdateDataType = {}));
|
|
685
674
|
const DispatchEventResult = {
|
|
686
675
|
NotCanceled: 0,
|
|
687
676
|
CanceledByEventHandler: 1,
|
|
@@ -2003,6 +1992,7 @@ function prepareMainThreadAPIs(backgroundThreadRpc, rootDom, document, mtsRealm,
|
|
|
2003
1992
|
const publicComponentEvent = backgroundThreadRpc.createCall(publicComponentEventEndpoint);
|
|
2004
1993
|
const postExposure = backgroundThreadRpc.createCall(postExposureEndpoint);
|
|
2005
1994
|
const dispatchI18nResource = backgroundThreadRpc.createCall(dispatchI18nResourceEndpoint);
|
|
1995
|
+
const updateDataBackground = backgroundThreadRpc.createCall(updateDataEndpoint);
|
|
2006
1996
|
markTimingInternal('lepus_execute_start');
|
|
2007
1997
|
async function startMainThread(config, ssrHydrateInfo) {
|
|
2008
1998
|
let isFp = true;
|
|
@@ -2113,8 +2103,15 @@ function prepareMainThreadAPIs(backgroundThreadRpc, rootDom, document, mtsRealm,
|
|
|
2113
2103
|
await mtsRealm.loadScript(template.lepusCode.root);
|
|
2114
2104
|
jsContext.__start();
|
|
2115
2105
|
}
|
|
2106
|
+
function handleUpdatedData(newData, options) {
|
|
2107
|
+
const runtime = mtsRealm.globalWindow;
|
|
2108
|
+
const processedData = runtime.processData ? runtime.processData(newData, options?.processorName) : newData;
|
|
2109
|
+
runtime.updatePage?.(processedData, options);
|
|
2110
|
+
return updateDataBackground(processedData, options);
|
|
2111
|
+
}
|
|
2116
2112
|
return {
|
|
2117
|
-
startMainThread
|
|
2113
|
+
startMainThread,
|
|
2114
|
+
handleUpdatedData
|
|
2118
2115
|
};
|
|
2119
2116
|
}
|
|
2120
2117
|
const templateCache = new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-server-canary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-canary-20251010-77397fd5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
27
27
|
"rsbuild-plugin-publint": "0.3.3",
|
|
28
28
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
|
|
29
|
-
"@lynx-js/web-
|
|
30
|
-
"@lynx-js/web-
|
|
31
|
-
"@lynx-js/web-
|
|
32
|
-
"@lynx-js/web-
|
|
29
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.0-canary-20251010-77397fd5",
|
|
30
|
+
"@lynx-js/web-elements-template": "npm:@lynx-js/web-elements-template-canary@0.8.8-canary-20251010-77397fd5",
|
|
31
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.0-canary-20251010-77397fd5",
|
|
32
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.0-canary-20251010-77397fd5"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rslib build",
|