Skip to content

Commit 7d128b6

Browse files
tylerpinaclaude
andcommitted
fix: use ExperienceDimensionKeyMap and narrow slots union in FragmentProps
- Replace inline dimensionKeyMap struct with ExperienceDimensionKeyMap (shared named type from experience.ts, mirrors upstream DimensionKeyMap) - Drop TreeNode from slots union — upstream contract (experienceCommonFields) uses ViewNode | FragmentNode | InlineFragmentNode; SDK drops deprecated ViewNode leaving FragmentNode | InlineFragmentNode, matching ExperienceProps.slots exactly - Remove unused TreeNode import from component-type Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 349f345 commit 7d128b6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/entities/fragment.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import type {
99
ComponentTypeViewport,
1010
DimensionedDesignPropertyValue,
1111
FragmentNode,
12-
TreeNode,
1312
} from './component-type'
14-
import type { ExperienceContentBindings, InlineFragmentNode } from './experience'
13+
import type { ExperienceContentBindings, ExperienceDimensionKeyMap, InlineFragmentNode } from './experience'
1514

1615
export type FragmentSys = {
1716
id: string
@@ -44,10 +43,10 @@ export type FragmentProps = {
4443
description: string
4544
viewports: ComponentTypeViewport[]
4645
designProperties: Record<string, DimensionedDesignPropertyValue>
47-
dimensionKeyMap: { designProperties: Record<string, { breakpoint: string }> }
46+
dimensionKeyMap: ExperienceDimensionKeyMap
4847
contentBindings?: ExperienceContentBindings
4948
metadata?: ExoMetadataProps
50-
slots?: Record<string, Array<TreeNode | FragmentNode | InlineFragmentNode>>
49+
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>
5150
}
5251

5352
export type CreateFragmentProps = Except<FragmentProps, 'sys'> & {

0 commit comments

Comments
 (0)