@lynx-js/web-core-canary 0.19.4 → 0.19.5-canary-20260107-b41d54ae

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,17 @@
1
1
  # @lynx-js/web-core
2
2
 
3
+ ## 0.19.5-canary-20260107110030-b41d54aead52f891fcd04b7dad57f7ddf400e5d9
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: pixelWidth and pixelHeight use client instead of screen ([#2055](https://github.com/lynx-family/lynx-stack/pull/2055))
8
+
9
+ - Updated dependencies []:
10
+ - @lynx-js/web-constants@0.19.5-canary-20260107110030-b41d54aead52f891fcd04b7dad57f7ddf400e5d9
11
+ - @lynx-js/web-mainthread-apis@0.19.5-canary-20260107110030-b41d54aead52f891fcd04b7dad57f7ddf400e5d9
12
+ - @lynx-js/web-worker-rpc@0.19.5-canary-20260107110030-b41d54aead52f891fcd04b7dad57f7ddf400e5d9
13
+ - @lynx-js/web-worker-runtime@0.19.5-canary-20260107110030-b41d54aead52f891fcd04b7dad57f7ddf400e5d9
14
+
3
15
  ## 0.19.4
4
16
 
5
17
  ### Patch Changes
@@ -470,25 +482,25 @@
470
482
  lynxView.initI18nResources = [
471
483
  {
472
484
  options: {
473
- locale: 'en',
474
- channel: '1',
475
- fallback_url: '',
485
+ locale: "en",
486
+ channel: "1",
487
+ fallback_url: "",
476
488
  },
477
489
  resource: {
478
- hello: 'hello',
479
- lynx: 'lynx web platform1',
490
+ hello: "hello",
491
+ lynx: "lynx web platform1",
480
492
  },
481
493
  },
482
494
  ];
483
- lynxView.addEventListener('i18nResourceMissed', (e) => {
495
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
484
496
  console.log(e);
485
497
  });
486
498
 
487
499
  // mts
488
500
  _I18nResourceTranslation({
489
- locale: 'en',
490
- channel: '1',
491
- fallback_url: '',
501
+ locale: "en",
502
+ channel: "1",
503
+ fallback_url: "",
492
504
  });
493
505
  ```
494
506
 
@@ -896,8 +908,8 @@
896
908
  }
897
909
  };`,
898
910
  ],
899
- { type: 'text/javascript' },
900
- ),
911
+ { type: "text/javascript" }
912
+ )
901
913
  ),
902
914
  };
903
915
  lynxView.nativeModulesMap = nativeModulesMap;
@@ -1012,8 +1024,8 @@
1012
1024
  };
1013
1025
  };`,
1014
1026
  ],
1015
- { type: 'text/javascript' },
1016
- ),
1027
+ { type: "text/javascript" }
1028
+ )
1017
1029
  );
1018
1030
 
1019
1031
  const color_methods = URL.createObjectURL(
@@ -1028,8 +1040,8 @@
1028
1040
  };
1029
1041
  };`,
1030
1042
  ],
1031
- { type: 'text/javascript' },
1032
- ),
1043
+ { type: "text/javascript" }
1044
+ )
1033
1045
  );
1034
1046
 
1035
1047
  lynxView.napiModuleMap = {
@@ -1046,7 +1058,7 @@
1046
1058
 
1047
1059
  ```js
1048
1060
  lynxView.onNapiModulesCall = (name, data, moduleName) => {
1049
- if (name === 'getColor' && moduleName === 'color_methods') {
1061
+ if (name === "getColor" && moduleName === "color_methods") {
1050
1062
  return data.color;
1051
1063
  }
1052
1064
  };
@@ -1125,8 +1137,8 @@
1125
1137
  }
1126
1138
  };`,
1127
1139
  ],
1128
- { type: 'text/javascript' },
1129
- ),
1140
+ { type: "text/javascript" }
1141
+ )
1130
1142
  );
1131
1143
  ```
1132
1144
 
@@ -1138,7 +1150,7 @@
1138
1150
 
1139
1151
  ```js
1140
1152
  lynxView.onNativeModulesCall = (name, data, callback) => {
1141
- if (name === 'getColor') {
1153
+ if (name === "getColor") {
1142
1154
  callback(data.color);
1143
1155
  }
1144
1156
  };
@@ -1148,7 +1160,7 @@
1148
1160
 
1149
1161
  ```js
1150
1162
  lynxView.onNativeModulesCall = (name, data, moduleName) => {
1151
- if (name === 'getColor' && moduleName === 'bridge') {
1163
+ if (name === "getColor" && moduleName === "bridge") {
1152
1164
  return data.color;
1153
1165
  }
1154
1166
  };
@@ -1506,7 +1518,7 @@
1506
1518
  This flag changes the behaviour of cascading. It provide a way to do this
1507
1519
 
1508
1520
  ```jsx
1509
- <view class='class-a class-b' />;
1521
+ <view class="class-a class-b" />
1510
1522
  ```
1511
1523
 
1512
1524
  The class-b will override (cascading) styles of class-a.
@@ -1606,11 +1618,11 @@
1606
1618
  There is also a simple way to use this feature
1607
1619
 
1608
1620
  ```javascript
1609
- import { LynxCard } from '@lynx-js/web-core';
1610
- import { loadElement } from '@lynx-js/web-elements/lazy';
1611
- import '@lynx-js/web-elements/index.css';
1612
- import '@lynx-js/web-core/index.css';
1613
- import './index.css';
1621
+ import { LynxCard } from "@lynx-js/web-core";
1622
+ import { loadElement } from "@lynx-js/web-elements/lazy";
1623
+ import "@lynx-js/web-elements/index.css";
1624
+ import "@lynx-js/web-core/index.css";
1625
+ import "./index.css";
1614
1626
 
1615
1627
  const lynxcard = new LynxCard({
1616
1628
  ...beforeConfigs,
@@ -3,8 +3,8 @@
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  import { startUIThread, } from '../uiThread/startUIThread.js';
5
5
  const pixelRatio = window.devicePixelRatio;
6
- const screenWidth = window.screen.availWidth * pixelRatio;
7
- const screenHeight = window.screen.availHeight * pixelRatio;
6
+ const screenWidth = document.documentElement.clientWidth * pixelRatio;
7
+ const screenHeight = document.documentElement.clientHeight * pixelRatio;
8
8
  export function createLynxView(configs) {
9
9
  const { shadowRoot, callbacks, templateUrl, globalProps, initData, nativeModulesMap, napiModulesMap, tagMap, lynxGroupId, threadStrategy = 'multi-thread', initI18nResources, ssr, } = configs;
10
10
  return startUIThread(templateUrl, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core-canary",
3
- "version": "0.19.4",
3
+ "version": "0.19.5-canary-20260107-b41d54ae",
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.4",
28
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.4",
29
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.4",
30
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.4",
31
- "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.19.4"
28
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.5-canary-20260107-b41d54ae",
29
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.19.5-canary-20260107-b41d54ae",
30
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.19.5-canary-20260107-b41d54ae",
31
+ "@lynx-js/web-worker-runtime": "npm:@lynx-js/web-worker-runtime-canary@0.19.5-canary-20260107-b41d54ae"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@lynx-js/lynx-core": "0.1.3",