@lynx-js/web-core-server-canary 0.19.5 → 0.19.6-canary-20260112-6c2b51a6

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,7 @@
1
1
  # @lynx-js/web-core-server
2
2
 
3
+ ## 0.19.6-canary-20260112091442-6c2b51a661ae244eb40671f63f29ee971e084ed4
4
+
3
5
  ## 0.19.5
4
6
 
5
7
  ## 0.19.4
@@ -143,25 +145,25 @@
143
145
  lynxView.initI18nResources = [
144
146
  {
145
147
  options: {
146
- locale: 'en',
147
- channel: '1',
148
- fallback_url: '',
148
+ locale: "en",
149
+ channel: "1",
150
+ fallback_url: "",
149
151
  },
150
152
  resource: {
151
- hello: 'hello',
152
- lynx: 'lynx web platform1',
153
+ hello: "hello",
154
+ lynx: "lynx web platform1",
153
155
  },
154
156
  },
155
157
  ];
156
- lynxView.addEventListener('i18nResourceMissed', (e) => {
158
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
157
159
  console.log(e);
158
160
  });
159
161
 
160
162
  // mts
161
163
  _I18nResourceTranslation({
162
- locale: 'en',
163
- channel: '1',
164
- fallback_url: '',
164
+ locale: "en",
165
+ channel: "1",
166
+ fallback_url: "",
165
167
  });
166
168
  ```
167
169
 
package/dist/131.js CHANGED
@@ -147,6 +147,7 @@ __webpack_require__.add({
147
147
  JA: ()=>_constants_js__rspack_import_0.JA,
148
148
  JW: ()=>_endpoints_js__rspack_import_2.JW,
149
149
  Ke: ()=>_endpoints_js__rspack_import_2.Ke,
150
+ O4: ()=>_types_index_js__rspack_import_3.O4,
150
151
  OE: ()=>_constants_js__rspack_import_0.OE,
151
152
  Pb: ()=>_constants_js__rspack_import_0.Pb,
152
153
  SP: ()=>"l-uid",
@@ -215,7 +216,10 @@ __webpack_require__.add({
215
216
  CanceledBeforeDispatch: 3
216
217
  };
217
218
  },
218
- "../web-constants/dist/types/NativeApp.js" () {
219
+ "../web-constants/dist/types/NativeApp.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
220
+ __webpack_require__.d(__webpack_exports__, {
221
+ O: ()=>ErrorCode
222
+ });
219
223
  var IdentifierType;
220
224
  (function(IdentifierType) {
221
225
  IdentifierType[IdentifierType["ID_SELECTOR"] = 0] = "ID_SELECTOR";
@@ -243,9 +247,10 @@ __webpack_require__.add({
243
247
  "../web-constants/dist/types/index.js" (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
244
248
  __webpack_require__.d(__webpack_exports__, {
245
249
  HO: ()=>_I18n_js__rspack_import_3.HO,
250
+ O4: ()=>_NativeApp_js__rspack_import_0.O,
246
251
  gI: ()=>_I18n_js__rspack_import_3.gI
247
252
  });
248
- __webpack_require__("../web-constants/dist/types/NativeApp.js");
253
+ var _NativeApp_js__rspack_import_0 = __webpack_require__("../web-constants/dist/types/NativeApp.js");
249
254
  __webpack_require__("../web-constants/dist/types/UpdateDataOptions.js");
250
255
  __webpack_require__("../web-constants/dist/types/Element.js");
251
256
  var _I18n_js__rspack_import_3 = __webpack_require__("../web-constants/dist/types/I18n.js");
package/dist/27.js CHANGED
@@ -611,7 +611,43 @@ __webpack_require__.add({
611
611
  __FlushElementTree,
612
612
  _I18nResourceTranslation: callbacks._I18nResourceTranslation,
613
613
  _AddEventListener: ()=>{},
614
- renderPage: void 0
614
+ renderPage: void 0,
615
+ __InvokeUIMethod: (element, method, params, callback)=>{
616
+ try {
617
+ if ('boundingClientRect' === method) {
618
+ const rect = element.getBoundingClientRect();
619
+ callback({
620
+ code: _lynx_js_web_constants__rspack_import_0.O4.SUCCESS,
621
+ data: {
622
+ id: element.id,
623
+ width: rect.width,
624
+ height: rect.height,
625
+ left: rect.left,
626
+ right: rect.right,
627
+ top: rect.top,
628
+ bottom: rect.bottom
629
+ }
630
+ });
631
+ return;
632
+ }
633
+ if ('function' == typeof element[method]) {
634
+ const data = element[method](params);
635
+ callback({
636
+ code: _lynx_js_web_constants__rspack_import_0.O4.SUCCESS,
637
+ data
638
+ });
639
+ return;
640
+ }
641
+ callback({
642
+ code: _lynx_js_web_constants__rspack_import_0.O4.METHOD_NOT_FOUND
643
+ });
644
+ } catch (e) {
645
+ console.error("[lynx-web] invokeUIMethod: apply method failed with", e, element);
646
+ callback({
647
+ code: _lynx_js_web_constants__rspack_import_0.O4.PARAM_INVALID
648
+ });
649
+ }
650
+ }
615
651
  };
616
652
  Object.assign(mtsRealm.globalWindow, mtsGlobalThis);
617
653
  Object.defineProperty(mtsRealm.globalWindow, 'renderPage', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core-server-canary",
3
- "version": "0.19.5",
3
+ "version": "0.19.6-canary-20260112-6c2b51a6",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -25,11 +25,11 @@
25
25
  "devDependencies": {
26
26
  "rsbuild-plugin-arethetypeswrong": "0.1.1",
27
27
  "rsbuild-plugin-publint": "0.3.3",
28
- "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
29
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.5",
28
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.6-canary-20260112-6c2b51a6",
30
29
  "@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.11.0",
31
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.5",
32
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.5"
30
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.6-canary-20260112-6c2b51a6",
31
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.6-canary-20260112-6c2b51a6",
32
+ "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "rslib build",