@lynx-js/web-mainthread-apis-canary 0.15.6-canary-20250813-a77e6595 → 0.15.6-canary-20250813-ab8cee4b

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,6 @@
1
1
  # @lynx-js/web-mainthread-apis
2
2
 
3
- ## 0.15.6-canary-20250813055653-a77e6595b1f58924e681608f427522e1c868660a
3
+ ## 0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -8,11 +8,15 @@
8
8
 
9
9
  - fix: \_\_ElementFromBinary should mark all elements actively ([#1484](https://github.com/lynx-family/lynx-stack/pull/1484))
10
10
 
11
+ - fix: `__ElementFromBinary` needs to correctly apply the dataset in elementTemplate to the Element ([#1487](https://github.com/lynx-family/lynx-stack/pull/1487))
12
+
11
13
  - fix: all attributes except `id` and `type` under ElementTemplateData are optional. ([#1483](https://github.com/lynx-family/lynx-stack/pull/1483))
12
14
 
13
- - Updated dependencies [[`f76aae9`](https://github.com/lynx-family/lynx-stack/commit/f76aae9ea06abdc7022ba508d22f9f4eb00864e8), [`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2)]:
14
- - @lynx-js/web-constants@0.15.6-canary-20250813055653-a77e6595b1f58924e681608f427522e1c868660a
15
- - @lynx-js/web-style-transformer@0.15.6-canary-20250813055653-a77e6595b1f58924e681608f427522e1c868660a
15
+ - feat: add MTS API \_\_GetAttributeByName ([#1486](https://github.com/lynx-family/lynx-stack/pull/1486))
16
+
17
+ - Updated dependencies [[`f76aae9`](https://github.com/lynx-family/lynx-stack/commit/f76aae9ea06abdc7022ba508d22f9f4eb00864e8), [`d8381a5`](https://github.com/lynx-family/lynx-stack/commit/d8381a58d12af6424cab4955617251e798bdc9f1), [`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2), [`ab8cee4`](https://github.com/lynx-family/lynx-stack/commit/ab8cee4bab384fa905c045c4b4b93e5d4a95d57f)]:
18
+ - @lynx-js/web-constants@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
19
+ - @lynx-js/web-style-transformer@0.15.6-canary-20250813064930-ab8cee4bab384fa905c045c4b4b93e5d4a95d57f
16
20
 
17
21
  ## 0.15.5
18
22
 
@@ -5,7 +5,7 @@ import { lynxUniqueIdAttribute, systemInfo, parentComponentUniqueIdAttribute, co
5
5
  import { globalMuteableVars } from '@lynx-js/web-constants';
6
6
  import { createMainThreadLynx } from './createMainThreadLynx.js';
7
7
  import { flattenStyleInfo, genCssContent, genCssOGInfo, transformToWebCss, } from './utils/processStyleInfo.js';
8
- import { __AddClass, __AddConfig, __AddDataset, __AddInlineStyle, __AppendElement, __ElementIsEqual, __FirstElement, __GetAttributes, __GetChildren, __GetClasses, __GetComponentID, __GetDataByKey, __GetDataset, __GetElementConfig, __GetElementUniqueID, __GetID, __GetParent, __GetTag, __GetTemplateParts, __InsertElementBefore, __LastElement, __MarkPartElement, __MarkTemplateElement, __NextElement, __RemoveElement, __ReplaceElement, __ReplaceElements, __SetClasses, __SetConfig, __SetCSSId, __SetDataset, __SetID, __SetInlineStyles, __UpdateComponentID, __UpdateComponentInfo, } from './pureElementPAPIs.js';
8
+ import { __AddClass, __AddConfig, __AddDataset, __AddInlineStyle, __AppendElement, __ElementIsEqual, __FirstElement, __GetAttributes, __GetChildren, __GetClasses, __GetComponentID, __GetDataByKey, __GetDataset, __GetElementConfig, __GetElementUniqueID, __GetID, __GetParent, __GetTag, __GetTemplateParts, __InsertElementBefore, __LastElement, __MarkPartElement, __MarkTemplateElement, __NextElement, __RemoveElement, __ReplaceElement, __ReplaceElements, __SetClasses, __SetConfig, __SetCSSId, __SetDataset, __SetID, __SetInlineStyles, __UpdateComponentID, __UpdateComponentInfo, __GetAttributeByName, } from './pureElementPAPIs.js';
9
9
  import { createCrossThreadEvent } from './utils/createCrossThreadEvent.js';
10
10
  import { decodeCssOG } from './utils/decodeCssOG.js';
11
11
  const exposureRelatedAttributes = new Set([
@@ -393,6 +393,7 @@ export function createMainThreadGlobalThis(config) {
393
393
  for (const childData of data.children || []) {
394
394
  __AppendElement(element, createElementForElementTemplateData(childData, parentComponentUniId));
395
395
  }
396
+ data.dataset !== undefined && __SetDataset(element, data.dataset);
396
397
  return element;
397
398
  };
398
399
  const applyEventsForElementTemplate = (data, element) => {
@@ -492,6 +493,7 @@ export function createMainThreadGlobalThis(config) {
492
493
  __SwapElement,
493
494
  __UpdateListCallbacks,
494
495
  __GetConfig: __GetElementConfig,
496
+ __GetAttributeByName,
495
497
  __GetClasses,
496
498
  __AddClass: isCSSOG ? __AddClassForCSSOG : __AddClass,
497
499
  __SetClasses: isCSSOG ? __SetClassesForCSSOG : __SetClasses,
@@ -1,4 +1,4 @@
1
- import { type AddClassPAPI, type AddConfigPAPI, type AddDatasetPAPI, type AddInlineStylePAPI, type AppendElementPAPI, type ElementIsEqualPAPI, type FirstElementPAPI, type GetAttributesPAPI, type GetChildrenPAPI, type GetClassesPAPI, type GetComponentIdPAPI, type GetDataByKeyPAPI, type GetDatasetPAPI, type GetElementConfigPAPI, type GetElementUniqueIDPAPI, type GetIDPAPI, type GetParentPAPI, type GetTagPAPI, type GetTemplatePartsPAPI, type InsertElementBeforePAPI, type LastElementPAPI, type MarkPartElementPAPI, type MarkTemplateElementPAPI, type NextElementPAPI, type RemoveElementPAPI, type ReplaceElementPAPI, type ReplaceElementsPAPI, type SetClassesPAPI, type SetConfigPAPI, type SetCSSIdPAPI, type SetDatasetPAPI, type SetIDPAPI, type SetInlineStylesPAPI, type UpdateComponentIDPAPI, type UpdateComponentInfoPAPI } from '@lynx-js/web-constants';
1
+ import { type AddClassPAPI, type AddConfigPAPI, type AddDatasetPAPI, type AddInlineStylePAPI, type AppendElementPAPI, type ElementIsEqualPAPI, type FirstElementPAPI, type GetAttributeByNamePAPI, type GetAttributesPAPI, type GetChildrenPAPI, type GetClassesPAPI, type GetComponentIdPAPI, type GetDataByKeyPAPI, type GetDatasetPAPI, type GetElementConfigPAPI, type GetElementUniqueIDPAPI, type GetIDPAPI, type GetParentPAPI, type GetTagPAPI, type GetTemplatePartsPAPI, type InsertElementBeforePAPI, type LastElementPAPI, type MarkPartElementPAPI, type MarkTemplateElementPAPI, type NextElementPAPI, type RemoveElementPAPI, type ReplaceElementPAPI, type ReplaceElementsPAPI, type SetClassesPAPI, type SetConfigPAPI, type SetCSSIdPAPI, type SetDatasetPAPI, type SetIDPAPI, type SetInlineStylesPAPI, type UpdateComponentIDPAPI, type UpdateComponentInfoPAPI } from '@lynx-js/web-constants';
2
2
  export declare const __AppendElement: AppendElementPAPI;
3
3
  export declare const __ElementIsEqual: ElementIsEqualPAPI;
4
4
  export declare const __FirstElement: FirstElementPAPI;
@@ -17,6 +17,7 @@ export declare const __GetDataByKey: GetDataByKeyPAPI;
17
17
  export declare const __GetAttributes: GetAttributesPAPI;
18
18
  export declare const __GetComponentID: GetComponentIdPAPI;
19
19
  export declare const __GetElementConfig: GetElementConfigPAPI;
20
+ export declare const __GetAttributeByName: GetAttributeByNamePAPI;
20
21
  export declare const __GetElementUniqueID: GetElementUniqueIDPAPI;
21
22
  export declare const __GetID: GetIDPAPI;
22
23
  export declare const __SetID: SetIDPAPI;
@@ -67,6 +67,7 @@ export const __GetElementConfig = /*#__PURE__*/ (element) => {
67
67
  ? JSON.parse(decodeURIComponent(currentComponentConfigString))
68
68
  : {};
69
69
  };
70
+ export const __GetAttributeByName = /*#__PURE__*/ (element, name) => element.getAttribute(name);
70
71
  export const __GetElementUniqueID = /*#__PURE__*/ (element) => (element && element.getAttribute
71
72
  ? Number(element.getAttribute(lynxUniqueIdAttribute))
72
73
  : -1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-mainthread-apis-canary",
3
- "version": "0.15.6-canary-20250813-a77e6595",
3
+ "version": "0.15.6-canary-20250813-ab8cee4b",
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.6-canary-20250813-a77e6595",
28
- "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.6-canary-20250813-a77e6595",
27
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250813-ab8cee4b",
28
+ "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.6-canary-20250813-ab8cee4b",
29
29
  "hyphenate-style-name": "^1.1.0"
30
30
  }
31
31
  }