@lynx-js/web-mainthread-apis-canary 0.15.6-canary-20250812-8a0f64f5 → 0.15.6-canary-20250813-f76aae9e

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,16 +1,18 @@
1
1
  # @lynx-js/web-mainthread-apis
2
2
 
3
- ## 0.15.6-canary-20250812171806-8a0f64f57d74bbe9ae4f48237fd5aaceaafe9260
3
+ ## 0.15.6-canary-20250813031350-f76aae9ea06abdc7022ba508d22f9f4eb00864e8
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - feat: add MTS API: \_\_UpdateComponentInfo ([#1485](https://github.com/lynx-family/lynx-stack/pull/1485))
8
+
7
9
  - fix: \_\_ElementFromBinary should mark all elements actively ([#1484](https://github.com/lynx-family/lynx-stack/pull/1484))
8
10
 
9
11
  - fix: all attributes except `id` and `type` under ElementTemplateData are optional. ([#1483](https://github.com/lynx-family/lynx-stack/pull/1483))
10
12
 
11
- - Updated dependencies [[`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2)]:
12
- - @lynx-js/web-constants@0.15.6-canary-20250812171806-8a0f64f57d74bbe9ae4f48237fd5aaceaafe9260
13
- - @lynx-js/web-style-transformer@0.15.6-canary-20250812171806-8a0f64f57d74bbe9ae4f48237fd5aaceaafe9260
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-20250813031350-f76aae9ea06abdc7022ba508d22f9f4eb00864e8
15
+ - @lynx-js/web-style-transformer@0.15.6-canary-20250813031350-f76aae9ea06abdc7022ba508d22f9f4eb00864e8
14
16
 
15
17
  ## 0.15.5
16
18
 
@@ -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, } 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, } 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([
@@ -477,6 +477,7 @@ export function createMainThreadGlobalThis(config) {
477
477
  __SetDataset,
478
478
  __SetID,
479
479
  __UpdateComponentID,
480
+ __UpdateComponentInfo,
480
481
  __CreateElement,
481
482
  __CreateView,
482
483
  __CreateText,
@@ -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 } from '@lynx-js/web-constants';
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';
2
2
  export declare const __AppendElement: AppendElementPAPI;
3
3
  export declare const __ElementIsEqual: ElementIsEqualPAPI;
4
4
  export declare const __FirstElement: FirstElementPAPI;
@@ -25,6 +25,7 @@ export declare const __SetConfig: SetConfigPAPI;
25
25
  export declare const __SetDataset: SetDatasetPAPI;
26
26
  export declare const __UpdateComponentID: UpdateComponentIDPAPI;
27
27
  export declare const __GetClasses: GetClassesPAPI;
28
+ export declare const __UpdateComponentInfo: UpdateComponentInfoPAPI;
28
29
  export declare const __SetCSSId: SetCSSIdPAPI;
29
30
  export declare const __SetClasses: SetClassesPAPI;
30
31
  export declare const __AddInlineStyle: AddInlineStylePAPI;
@@ -84,6 +84,13 @@ export const __SetDataset = /*#__PURE__*/ (element, dataset) => {
84
84
  };
85
85
  export const __UpdateComponentID = /*#__PURE__*/ (element, componentID) => element.setAttribute(componentIdAttribute, componentID);
86
86
  export const __GetClasses = /*#__PURE__*/ (element) => ((element.getAttribute('class') ?? '').split(' ').filter(e => e));
87
+ export const __UpdateComponentInfo = /*#__PURE__*/ (element, params) => {
88
+ params.componentID !== undefined
89
+ && __UpdateComponentID(element, params.componentID);
90
+ params.cssID !== undefined
91
+ && element.setAttribute(cssIdAttribute, params.cssID + '');
92
+ params.name !== undefined && element.setAttribute('name', params.name);
93
+ };
87
94
  export const __SetCSSId = /*#__PURE__*/ (elements, cssId) => {
88
95
  for (const element of elements) {
89
96
  element.setAttribute(cssIdAttribute, cssId + '');
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-20250812-8a0f64f5",
3
+ "version": "0.15.6-canary-20250813-f76aae9e",
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-20250812-8a0f64f5",
28
- "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.6-canary-20250812-8a0f64f5",
27
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.6-canary-20250813-f76aae9e",
28
+ "@lynx-js/web-style-transformer": "npm:@lynx-js/web-style-transformer-canary@0.15.6-canary-20250813-f76aae9e",
29
29
  "hyphenate-style-name": "^1.1.0"
30
30
  }
31
31
  }