@lynx-js/web-core-server-canary 0.15.5 → 0.15.6-canary-20250812-214898bb

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.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
4
+
3
5
  ## 0.15.5
4
6
 
5
7
  ### Patch Changes
@@ -73,25 +75,25 @@
73
75
  lynxView.initI18nResources = [
74
76
  {
75
77
  options: {
76
- locale: 'en',
77
- channel: '1',
78
- fallback_url: '',
78
+ locale: "en",
79
+ channel: "1",
80
+ fallback_url: "",
79
81
  },
80
82
  resource: {
81
- hello: 'hello',
82
- lynx: 'lynx web platform1',
83
+ hello: "hello",
84
+ lynx: "lynx web platform1",
83
85
  },
84
86
  },
85
87
  ];
86
- lynxView.addEventListener('i18nResourceMissed', (e) => {
88
+ lynxView.addEventListener("i18nResourceMissed", (e) => {
87
89
  console.log(e);
88
90
  });
89
91
 
90
92
  // mts
91
93
  _I18nResourceTranslation({
92
- locale: 'en',
93
- channel: '1',
94
- fallback_url: '',
94
+ locale: "en",
95
+ channel: "1",
96
+ fallback_url: "",
95
97
  });
96
98
  ```
97
99
 
package/dist/index.js CHANGED
@@ -1740,21 +1740,21 @@ function createMainThreadGlobalThis(config) {
1740
1740
  const createElementForElementTemplateData = (data, parentComponentUniId)=>{
1741
1741
  const element = __CreateElement(data.type, parentComponentUniId);
1742
1742
  __SetID(element, data.id);
1743
- __SetClasses(element, data.class.join(' '));
1744
- for (const [key, value] of Object.entries(data.attributes))__SetAttribute(element, key, value);
1745
- for (const [key, value] of Object.entries(data.builtinAttributes))__SetAttribute(element, key, value);
1746
- for (const childData of data.children)__AppendElement(element, createElementForElementTemplateData(childData, parentComponentUniId));
1743
+ data.class && __SetClasses(element, data.class.join(' '));
1744
+ for (const [key, value] of Object.entries(data.attributes || {}))__SetAttribute(element, key, value);
1745
+ for (const [key, value] of Object.entries(data.builtinAttributes || {}))__SetAttribute(element, key, value);
1746
+ for (const childData of data.children || [])__AppendElement(element, createElementForElementTemplateData(childData, parentComponentUniId));
1747
1747
  return element;
1748
1748
  };
1749
1749
  const applyEventsForElementTemplate = (data, element)=>{
1750
1750
  const uniqueId = uniqueIdInc++;
1751
1751
  element.setAttribute(lynxUniqueIdAttribute, uniqueId + '');
1752
- for (const event of data.events){
1752
+ for (const event of data.events || []){
1753
1753
  const { type, name, value } = event;
1754
1754
  __AddEvent(element, type, name, value);
1755
1755
  }
1756
- for(let ii = 0; ii < data.children.length; ii++){
1757
- const childData = data.children[ii];
1756
+ for(let ii = 0; ii < (data.children || []).length; ii++){
1757
+ const childData = (data.children || [])[ii];
1758
1758
  const childElement = element.children[ii];
1759
1759
  if (childData && childElement) applyEventsForElementTemplate(childData, childElement);
1760
1760
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core-server-canary",
3
- "version": "0.15.5",
3
+ "version": "0.15.6-canary-20250812-214898bb",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,11 +23,11 @@
23
23
  "README.md"
24
24
  ],
25
25
  "devDependencies": {
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5",
27
26
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.3",
27
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250812-214898bb",
28
28
  "@lynx-js/web-elements-template": "npm:@lynx-js/web-elements-template-canary@0.8.4",
29
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.5",
30
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.5"
29
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.6-canary-20250812-214898bb",
30
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.6-canary-20250812-214898bb"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "rslib build",