feat(typings): TeamLibrary 暴露组件 properties/textNodeNames + 样式 values/codeSyntax + ComponentPropertyValue 补 variableId - #153
Open
muzi131313 wants to merge 3 commits into
Open
Conversation
- TeamLibraryComponent 新增 properties?: ComponentPropertyValue[]
和 textNodeNames?: string[](老库可能缺省)
- TeamLibraryStyle 新增 values?: ReadonlyArray<TeamLibraryStyleValue>
- 新增 TeamLibraryStyleValue 类型 { modeId, modeName, value }
- ComponentPropertyValue 补 variableId?: string 字段
对应 master-web 改动: getTeamLibraryAsync 返回结构增强
复用已有 VariableCodeSyntax 类型, 对齐 master-web 发布 cover.codeSyntax 老库可能缺省
z1441275629
approved these changes
Jul 22, 2026
- 新增 ReferenceEffect 接口(type: 'REFERENCE' + reference/referenceSource/modeId) - 新增 ReferencePaint 接口(type: 'REFERENCE' + reference/referenceSource/modeId) - 扩展 Effect/Paint 联合类型,覆盖 style 引用 style 的场景
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"## 变更摘要
为
getTeamLibraryAsync()返回的 TeamLibrary 类型增强,对齐 master-web 运行时实际返回结构。纯类型声明变更(plugin.d.ts),无运行时影响。改动内容
ComponentPropertyValue 增强(对齐 master-web 运行时):
variableId?: string— 当组件属性绑定到变量时,对应的变量 id(仅 TEXT/BOOLEAN 类型可能存在)TeamLibraryComponent 增强(对齐 master-web MR !15649):
properties?: ComponentPropertyValue[]— 组件属性 / 变体属性,对齐ComponentPropertyValue结构;老库可能缺省textNodeNames?: string[]— 组件所有后代 TEXT 图层的名称(去重);老库可能缺省TeamLibraryStyle 增强(对齐 master-web MR !15649):
values?: ReadonlyArray<TeamLibraryStyleValue>— 各模式下的样式值列表,元素结构为{ modeId, modeName, value }codeSyntax?: VariableCodeSyntax— 代码语法(web/android/ios),来自发布时cover.codeSyntax;老库可能缺省新增 TeamLibraryStyleValue 接口:
modeId: string— 模式 idmodeName: string— 模式名称value: any— 该模式下的样式值,形态随 style 类型变化(见下方)values 中 value 的形态
变量引用项或解析异常时 value 为 undefined,但仍保留 mode 条目。
文件变更
关联 MR
关联