@lynx-js/web-mainthread-apis-canary 0.15.5-canary-20250809-c8ce6aa3 → 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,6 +1,16 @@
1
1
  # @lynx-js/web-mainthread-apis
2
2
 
3
- ## 0.15.5-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
3
+ ## 0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: all attributes except `id` and `type` under ElementTemplateData are optional. ([#1483](https://github.com/lynx-family/lynx-stack/pull/1483))
8
+
9
+ - Updated dependencies [[`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2)]:
10
+ - @lynx-js/web-constants@0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
11
+ - @lynx-js/web-style-transformer@0.15.6-canary-20250812043229-214898bb9c74fc9b44e68cb220a4c02485102ce2
12
+
13
+ ## 0.15.5
4
14
 
5
15
  ### Patch Changes
6
16
 
@@ -9,8 +19,8 @@
9
19
  See [nodejs/node#59362](https://github.com/nodejs/node/issues/59362) for more details.
10
20
 
11
21
  - Updated dependencies [[`29434ae`](https://github.com/lynx-family/lynx-stack/commit/29434aec853f14242f521316429cf07a93b8c371), [`fb7096b`](https://github.com/lynx-family/lynx-stack/commit/fb7096bb3c79166cd619a407095b8206eccb7918)]:
12
- - @lynx-js/web-constants@0.15.5-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
13
- - @lynx-js/web-style-transformer@0.15.5-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
22
+ - @lynx-js/web-constants@0.15.5
23
+ - @lynx-js/web-style-transformer@0.15.5
14
24
 
15
25
  ## 0.15.4
16
26
 
@@ -380,14 +380,14 @@ export function createMainThreadGlobalThis(config) {
380
380
  const createElementForElementTemplateData = (data, parentComponentUniId) => {
381
381
  const element = __CreateElement(data.type, parentComponentUniId);
382
382
  __SetID(element, data.id);
383
- __SetClasses(element, data.class.join(' '));
384
- for (const [key, value] of Object.entries(data.attributes)) {
383
+ data.class && __SetClasses(element, data.class.join(' '));
384
+ for (const [key, value] of Object.entries(data.attributes || {})) {
385
385
  __SetAttribute(element, key, value);
386
386
  }
387
- for (const [key, value] of Object.entries(data.builtinAttributes)) {
387
+ for (const [key, value] of Object.entries(data.builtinAttributes || {})) {
388
388
  __SetAttribute(element, key, value);
389
389
  }
390
- for (const childData of data.children) {
390
+ for (const childData of data.children || []) {
391
391
  __AppendElement(element, createElementForElementTemplateData(childData, parentComponentUniId));
392
392
  }
393
393
  return element;
@@ -395,12 +395,12 @@ export function createMainThreadGlobalThis(config) {
395
395
  const applyEventsForElementTemplate = (data, element) => {
396
396
  const uniqueId = uniqueIdInc++;
397
397
  element.setAttribute(lynxUniqueIdAttribute, uniqueId + '');
398
- for (const event of data.events) {
398
+ for (const event of data.events || []) {
399
399
  const { type, name, value } = event;
400
400
  __AddEvent(element, type, name, value);
401
401
  }
402
- for (let ii = 0; ii < data.children.length; ii++) {
403
- const childData = data.children[ii];
402
+ for (let ii = 0; ii < (data.children || []).length; ii++) {
403
+ const childData = (data.children || [])[ii];
404
404
  const childElement = element.children[ii];
405
405
  if (childData && childElement) {
406
406
  applyEventsForElementTemplate(childData, childElement);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-mainthread-apis-canary",
3
- "version": "0.15.5-canary-20250809-c8ce6aa3",
3
+ "version": "0.15.6-canary-20250812-214898bb",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -24,8 +24,8 @@
24
24
  "**/*.css"
25
25
  ],
26
26
  "dependencies": {
27
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5-canary-20250809-c8ce6aa3",
28
- "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.5-canary-20250809-c8ce6aa3",
27
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250812-214898bb",
28
+ "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.6-canary-20250812-214898bb",
29
29
  "hyphenate-style-name": "^1.1.0"
30
30
  }
31
31
  }