Skip to content

Commit c4ef6d0

Browse files
tylerpinaclaude
andcommitted
fix: remove pointer variant from DesignPropertyValue, add ComponentTreeDesignPropertyValue [DX-990]
DesignPropertyValue is now the canonical base (ManualDesignValue | DesignTokenValue only), matching upstream DesignPropertyValueSchema post INTEG-3511. New ComponentTreeDesignPropertyValue union covers pointer and dimensioned as siblings at the tree-node level. ComponentNode.designProperties updated accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8e9bea0 commit c4ef6d0

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

lib/entities/component-type.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,32 @@ export type DesignTokenValue = {
8080
}
8181

8282
// For designProperties[].defaultValue (definition level)
83-
// Upstream: DesignPropertyValueSchema (schema line 86-91)
83+
// Upstream: DesignPropertyValueSchema — canonical value only (no pointer, no dimensioned)
8484
export type DesignPropertyDefinitionValue = ManualDesignValue | DesignTokenValue
8585

86-
// For componentTree node designProperties (tree-node level)
87-
// Upstream: ComponentTreeDesignPropertyValueSchema (schema line 101-104)
88-
export type DesignPropertyValue =
89-
| ManualDesignValue
90-
| DesignTokenValue
91-
| DesignPropertyPointerValue
92-
| Record<string, ManualDesignValue | DesignTokenValue | DesignPropertyPointerValue>
86+
// Canonical design property value — ManualDesignValue or DesignToken only
87+
// Upstream: DesignPropertyValueSchema (schema line 86-91)
88+
export type DesignPropertyValue = ManualDesignValue | DesignTokenValue
9389

90+
// Dimensioned record — maps breakpoint keys to canonical values
91+
// Upstream: DimensionedDesignPropertyValueSchema — Record<string, DesignPropertyValueSchema>
9492
export type DimensionedDesignPropertyValue = Record<string, DesignPropertyValue>
9593

94+
// Tree-node-level union — pointer and dimensioned are siblings of the canonical value
95+
// Upstream: ComponentTreeDesignPropertyValueSchema (schema line 101-104)
96+
export type ComponentTreeDesignPropertyValue =
97+
| DesignPropertyValue
98+
| DesignPropertyPointerValue
99+
| DimensionedDesignPropertyValue
100+
96101
// Tree node types for component tree
97102
export type ComponentNode = {
98103
id: string
99104
name?: string
100105
nodeType: 'Component'
101106
componentTypeId: string
102107
contentProperties: Record<string, ContentPropertyPointerValue | unknown> | string
103-
designProperties: Record<string, DesignPropertyValue>
108+
designProperties: Record<string, ComponentTreeDesignPropertyValue>
104109
slots: Record<string, TreeNode[]>
105110
contentBindings?: string
106111
}

0 commit comments

Comments
 (0)