@spatial-elements/sveltekit 0.1.0-beta.2 → 1.0.0-beta.11

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.
Files changed (133) hide show
  1. package/README.md +18 -13
  2. package/dist/catalog/ScrollNavigationBridge.svelte +172 -47
  3. package/dist/catalog/ScrollNavigationBridge.svelte.d.ts +9 -2
  4. package/dist/catalog/catalogNavigation.js +3 -2
  5. package/dist/catalog/catalogSummaryTransfer.d.ts +16 -0
  6. package/dist/catalog/catalogSummaryTransfer.js +79 -0
  7. package/dist/catalog/catalogTransition.css +58 -3
  8. package/dist/catalog/interruptedPresentation.d.ts +10 -0
  9. package/dist/catalog/interruptedPresentation.js +29 -0
  10. package/dist/catalog/presentationCleanup.d.ts +4 -0
  11. package/dist/catalog/presentationCleanup.js +20 -0
  12. package/dist/catalog/stagedCatalogNavigation.d.ts +44 -0
  13. package/dist/catalog/stagedCatalogNavigation.js +403 -0
  14. package/dist/catalog/stagedDomReveal.d.ts +8 -0
  15. package/dist/catalog/stagedDomReveal.js +76 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +3 -0
  18. package/dist/spatial-element/BrandStageShell.svelte +52 -71
  19. package/dist/spatial-element/BrandStageShell.svelte.d.ts +31 -4
  20. package/dist/spatial-element/CarouselSpatialElement.svelte +152 -200
  21. package/dist/spatial-element/CarouselSpatialElement.svelte.d.ts +5 -1
  22. package/dist/spatial-element/ContentBlock.svelte +7 -0
  23. package/dist/spatial-element/ContentBlock.svelte.d.ts +9 -0
  24. package/dist/spatial-element/ContentGrid.svelte +7 -0
  25. package/dist/spatial-element/ContentGrid.svelte.d.ts +8 -0
  26. package/dist/spatial-element/ContentPage.svelte +51 -55
  27. package/dist/spatial-element/ContentPage.svelte.d.ts +14 -3
  28. package/dist/spatial-element/InteractionGesture.svelte +39 -0
  29. package/dist/spatial-element/InteractionGesture.svelte.d.ts +7 -0
  30. package/dist/spatial-element/OverflowControls.svelte +129 -0
  31. package/dist/spatial-element/OverflowControls.svelte.d.ts +9 -0
  32. package/dist/spatial-element/PointerHint.svelte +80 -0
  33. package/dist/spatial-element/PointerHint.svelte.d.ts +3 -0
  34. package/dist/spatial-element/Section.svelte +25 -106
  35. package/dist/spatial-element/Section.svelte.d.ts +1 -0
  36. package/dist/spatial-element/SectionSurfaceGroup.svelte +8 -0
  37. package/dist/spatial-element/SectionSurfaceGroup.svelte.d.ts +8 -0
  38. package/dist/spatial-element/SpaceMouseControl.svelte +159 -0
  39. package/dist/spatial-element/SpaceMouseControl.svelte.d.ts +7 -0
  40. package/dist/spatial-element/SpaceMouseIcon.svelte +12 -0
  41. package/dist/spatial-element/SpaceMouseIcon.svelte.d.ts +26 -0
  42. package/dist/spatial-element/SpatialCardGridSection.svelte +79 -0
  43. package/dist/spatial-element/SpatialCardGridSection.svelte.d.ts +11 -0
  44. package/dist/spatial-element/SpatialCardPresentation.svelte +311 -0
  45. package/dist/spatial-element/SpatialCardPresentation.svelte.d.ts +19 -0
  46. package/dist/spatial-element/SpatialCardSlot.svelte +33 -0
  47. package/dist/spatial-element/SpatialCardSlot.svelte.d.ts +8 -0
  48. package/dist/spatial-element/SpatialCarouselSection.svelte +754 -0
  49. package/dist/spatial-element/{CarouselSection.svelte.d.ts → SpatialCarouselSection.svelte.d.ts} +5 -5
  50. package/dist/spatial-element/SpatialElementBreadcrumbs.svelte +12 -65
  51. package/dist/spatial-element/SpatialElementCard.svelte +54 -238
  52. package/dist/spatial-element/SpatialElementCard.svelte.d.ts +9 -0
  53. package/dist/spatial-element/SpatialElementHelp.svelte +300 -0
  54. package/dist/spatial-element/SpatialElementHelp.svelte.d.ts +6 -0
  55. package/dist/spatial-element/SpatialElementMediaRail.svelte +322 -52
  56. package/dist/spatial-element/SpatialElementMediaRail.svelte.d.ts +4 -1
  57. package/dist/spatial-element/SpatialElementNativeMedia.svelte +101 -0
  58. package/dist/spatial-element/SpatialElementNativeMedia.svelte.d.ts +9 -0
  59. package/dist/spatial-element/SpatialElementPage.svelte +156 -71
  60. package/dist/spatial-element/SpatialElementPage.svelte.d.ts +10 -3
  61. package/dist/spatial-element/SpatialElementStickyHeader.svelte +89 -105
  62. package/dist/spatial-element/SpatialElementStickyHeader.svelte.d.ts +6 -1
  63. package/dist/spatial-element/SpatialElementSummaryContent.svelte +198 -0
  64. package/dist/spatial-element/SpatialElementSummaryContent.svelte.d.ts +23 -0
  65. package/dist/spatial-element/SpatialElementSummaryPanel.svelte +48 -380
  66. package/dist/spatial-element/SpatialElementSummaryPanel.svelte.d.ts +2 -1
  67. package/dist/spatial-element/SpatialElementTabList.svelte +40 -17
  68. package/dist/spatial-element/SpatialElementTabList.svelte.d.ts +2 -1
  69. package/dist/spatial-element/SpatialElementTabs.svelte +61 -18
  70. package/dist/spatial-element/SpatialElementTabs.svelte.d.ts +3 -1
  71. package/dist/spatial-element/SpatialElementViewToggle.svelte +54 -0
  72. package/dist/spatial-element/SpatialElementViewToggle.svelte.d.ts +8 -0
  73. package/dist/spatial-element/SpatialIconButton.svelte +66 -0
  74. package/dist/spatial-element/SpatialIconButton.svelte.d.ts +17 -0
  75. package/dist/spatial-element/SpatialListPage.svelte +37 -8
  76. package/dist/spatial-element/SpatialListPage.svelte.d.ts +4 -1
  77. package/dist/spatial-element/SpatialMediaIndicator.svelte +16 -0
  78. package/dist/spatial-element/SpatialMediaIndicator.svelte.d.ts +26 -0
  79. package/dist/spatial-element/SpatialNavigationShell.svelte +138 -0
  80. package/dist/spatial-element/SpatialNavigationShell.svelte.d.ts +15 -0
  81. package/dist/spatial-element/SpatialSummaryHost.svelte +19 -0
  82. package/dist/spatial-element/SpatialSummaryHost.svelte.d.ts +9 -0
  83. package/dist/spatial-element/SpatialSummaryRoot.svelte +80 -0
  84. package/dist/spatial-element/SpatialSummaryRoot.svelte.d.ts +8 -0
  85. package/dist/spatial-element/SpatialSummarySlot.svelte +39 -0
  86. package/dist/spatial-element/SpatialSummarySlot.svelte.d.ts +9 -0
  87. package/dist/spatial-element/SpatialViewIcon.svelte +29 -0
  88. package/dist/spatial-element/SpatialViewIcon.svelte.d.ts +6 -0
  89. package/dist/spatial-element/brandContext.d.ts +1 -1
  90. package/dist/spatial-element/brandContext.js +1 -1
  91. package/dist/spatial-element/cardAppearanceFreeze.d.ts +5 -0
  92. package/dist/spatial-element/cardAppearanceFreeze.js +72 -0
  93. package/dist/spatial-element/carouselTextHit.d.ts +2 -0
  94. package/dist/spatial-element/carouselTextHit.js +17 -0
  95. package/dist/spatial-element/contentSidebars.d.ts +3 -0
  96. package/dist/spatial-element/contentSidebars.js +56 -0
  97. package/dist/spatial-element/index.d.ts +19 -3
  98. package/dist/spatial-element/index.js +12 -2
  99. package/dist/spatial-element/layout.generated.css +363 -0
  100. package/dist/spatial-element/messagesContext.d.ts +3 -0
  101. package/dist/spatial-element/messagesContext.js +10 -0
  102. package/dist/spatial-element/presentationBoxFreeze.d.ts +8 -0
  103. package/dist/spatial-element/presentationBoxFreeze.js +35 -0
  104. package/dist/spatial-element/spatialCardGrid.d.ts +12 -0
  105. package/dist/spatial-element/spatialCardGrid.js +1 -0
  106. package/dist/spatial-element/spatialPageContext.d.ts +4 -0
  107. package/dist/spatial-element/spatialPageContext.js +9 -0
  108. package/dist/spatial-element/spatialPresentationOwner.d.ts +6 -0
  109. package/dist/spatial-element/spatialPresentationOwner.js +2 -0
  110. package/dist/spatial-element/spatialSummary.d.ts +43 -0
  111. package/dist/spatial-element/spatialSummary.js +1 -0
  112. package/dist/spatial-element/spatialSummaryHost.svelte.d.ts +60 -0
  113. package/dist/spatial-element/spatialSummaryHost.svelte.js +233 -0
  114. package/dist/spatial-element/spatialThemeStyle.d.ts +3 -0
  115. package/dist/spatial-element/spatialThemeStyle.js +69 -0
  116. package/dist/spatial-element/truncatedTitle.d.ts +5 -0
  117. package/dist/spatial-element/truncatedTitle.js +28 -0
  118. package/dist/stage/ButtonGroup.svelte +152 -0
  119. package/dist/stage/ButtonGroup.svelte.d.ts +24 -0
  120. package/dist/stage/Panel.svelte +72 -14
  121. package/dist/stage/Panel.svelte.d.ts +14 -2
  122. package/dist/stage/Stage.svelte +471 -51
  123. package/dist/stage/Stage.svelte.d.ts +8 -1
  124. package/dist/stage/StageViewport.svelte +15 -2
  125. package/dist/stage/authoredStyle.d.ts +4 -0
  126. package/dist/stage/authoredStyle.js +17 -0
  127. package/dist/stage/buttonGroup.d.ts +9 -0
  128. package/dist/stage/buttonGroup.js +1 -0
  129. package/logo.svg +225 -0
  130. package/package.json +9 -6
  131. package/dist/spatial-element/CarouselSection.svelte +0 -350
  132. package/dist/spatial-element/ListSection.svelte +0 -30
  133. package/dist/spatial-element/ListSection.svelte.d.ts +0 -8
@@ -1,27 +1,51 @@
1
1
  <script lang="ts">
2
- import { catalogActionSemantic } from '@spatial-elements/core/catalog/catalogAction';
3
- import { ShoppingCart } from 'lucide-svelte';
2
+ import { resolveSpatialThemeRadii } from '@spatial-elements/core/spatial-element/spatialTheme';
3
+ import { onMount } from 'svelte';
4
+ import SpatialSummarySlot from './SpatialSummarySlot.svelte';
4
5
  import Panel from '../stage/Panel.svelte';
5
6
  import { useSpatialTheme } from './brandContext.js';
6
- import type { SpatialElementData } from '@spatial-elements/core/spatial-element/types';
7
- import { createCatalogEndpointAction } from '../catalog/catalogEndpointAction.js';
8
-
9
- let { spatialElement }: { spatialElement: SpatialElementData } = $props();
10
- const theme = useSpatialTheme();
11
- const catalogEndpoint = createCatalogEndpointAction();
7
+ import type { ResolvedSpatialElementData as SpatialElementData } from '@spatial-elements/core/spatial-element/spatialElement';
8
+
9
+ let { spatialElement, nativeContent = false }: { spatialElement: SpatialElementData; nativeContent?: boolean } = $props();
10
+ const readTheme = useSpatialTheme();
11
+ const theme = $derived(readTheme());
12
+ const radii = $derived(resolveSpatialThemeRadii(theme));
13
+ const contentInset = $derived(theme.panelShape.contentInset ?? Math.max(16, Math.round(theme.panelShape.radius * 0.7)));
14
+ let presentation = $state<HTMLDivElement>(null!);
15
+ let panelHeight = $state<number>();
16
+
17
+ onMount(() => {
18
+ // The stage reparents the rendered content. Keep its layout placeholder in
19
+ // sync using untransformed content size, including wrapping and font loads.
20
+ // Explicit ownership transfers finish their reflow before revealing pixels.
21
+ // offsetHeight is untransformed, unlike the projected CSS3D bounding box.
22
+ const measureTransfer = () => { panelHeight = presentation.offsetHeight + contentInset * 2; };
23
+ measureTransfer();
24
+ presentation.addEventListener('spatial-summary-measure', measureTransfer);
25
+ const observer = new ResizeObserver(([entry]) => {
26
+ const height = entry.borderBoxSize?.[0]?.blockSize ?? presentation.offsetHeight;
27
+ panelHeight = Math.ceil(height + contentInset * 2);
28
+ });
29
+ observer.observe(presentation);
30
+ return () => { observer.disconnect(); presentation.removeEventListener('spatial-summary-measure', measureTransfer); };
31
+ });
12
32
  </script>
13
33
 
14
- <div class="spatial-element-aside">
34
+ <div class="spatial-element-aside" data-spatial-summary-aside style:--summary-panel-height={panelHeight === undefined ? undefined : `${panelHeight}px`}>
15
35
  <Panel
36
+ {nativeContent}
37
+ surface={nativeContent ? 'frosted' : undefined}
16
38
  catalogEndpoint={{
17
39
  brandId: theme.id,
18
40
  spatialElementId: spatialElement.id,
19
41
  slot: 'detail.summary',
20
42
  role: 'summary-surface'
21
43
  }}
44
+ pointerReactive={false}
45
+ focusReactive={!nativeContent}
22
46
  transitionGroup="shared"
23
47
  class="spatial-element-panel"
24
- shape={theme.panelShape}
48
+ shape={{ ...theme.panelShape, radius: radii.panel, contentInset }}
25
49
  theme={theme.panelTheme}
26
50
  contentClass="stage-panel-content spatial-element-content"
27
51
  aria-labelledby="spatial-element-title"
@@ -29,136 +53,27 @@
29
53
  data-shared-role="summary-surface"
30
54
  data-spatial-element-id={spatialElement.id}
31
55
  >
32
- <div class="summary-presentation">
33
- <div class="panel-copy">
34
- <p
35
- class="panel-kicker"
36
- data-shared-role="eyebrow"
37
- data-spatial-element-id={spatialElement.id}
38
- use:catalogEndpoint={{
39
- brandId: theme.id,
40
- spatialElementId: spatialElement.id,
41
- slot: 'detail.summary',
42
- role: 'eyebrow'
43
- }}
44
- >
45
- {spatialElement.eyebrow}
46
- </p>
47
- <h1
48
- id="spatial-element-title"
49
- tabindex="-1"
50
- data-shared-role="title"
51
- data-spatial-element-id={spatialElement.id}
52
- use:catalogEndpoint={{
53
- brandId: theme.id,
54
- spatialElementId: spatialElement.id,
55
- slot: 'detail.summary',
56
- role: 'title'
57
- }}
58
- >
59
- {spatialElement.title}
60
- </h1>
61
- </div>
62
-
63
- <ul
64
- class="feature-list"
65
- aria-label="SpatialElement highlights"
66
- use:catalogEndpoint={{
67
- brandId: theme.id,
68
- spatialElementId: spatialElement.id,
69
- slot: 'detail.summary',
70
- role: 'features'
71
- }}
72
- data-catalog-rich-shared="features"
73
- data-catalog-semantic={JSON.stringify(spatialElement.features)}
74
- >
75
- {#each spatialElement.features as feature (feature.label)}
76
- <li>
77
- <span class="feature-content" data-catalog-secondary>
78
- <span class="feature-marker" aria-hidden="true">{feature.marker ?? 'Link'}</span>
79
- <span>{feature.label}</span>
80
- </span>
81
- </li>
82
- {/each}
83
- </ul>
84
-
85
- {#if spatialElement.action.href}
86
- <a
87
- use:catalogEndpoint={{
88
- brandId: theme.id,
89
- spatialElementId: spatialElement.id,
90
- slot: 'detail.summary',
91
- role: 'primary-action'
92
- }}
93
- data-catalog-rich-shared="primary-action"
94
- data-catalog-semantic={catalogActionSemantic(spatialElement.action)}
95
- class="spatial-element-action spatial-element-action-expanded"
96
- href={spatialElement.action.href}
97
- rel="external"
98
- aria-label={spatialElement.action.ariaLabel}
99
- >
100
- <span class="spatial-element-action-surface" data-catalog-secondary>
101
- <ShoppingCart
102
- class="spatial-element-action-icon"
103
- size={27}
104
- strokeWidth={2}
105
- aria-hidden="true"
106
- />
107
- <span class="spatial-element-action-label">{spatialElement.action.label}</span>
108
- </span>
109
- </a>
110
- {:else}
111
- <button
112
- use:catalogEndpoint={{
113
- brandId: theme.id,
114
- spatialElementId: spatialElement.id,
115
- slot: 'detail.summary',
116
- role: 'primary-action'
117
- }}
118
- data-catalog-rich-shared="primary-action"
119
- data-catalog-semantic={catalogActionSemantic(spatialElement.action)}
120
- class="spatial-element-action spatial-element-action-expanded"
121
- type="button"
122
- aria-label={spatialElement.action.ariaLabel}
123
- >
124
- <span class="spatial-element-action-surface" data-catalog-secondary>
125
- <ShoppingCart
126
- class="spatial-element-action-icon"
127
- size={27}
128
- strokeWidth={2}
129
- aria-hidden="true"
130
- />
131
- <span class="spatial-element-action-label">{spatialElement.action.label}</span>
132
- </span>
133
- </button>
134
- {/if}
135
- </div>
56
+ <SpatialSummarySlot instanceKey={`detail:${theme.id}:${spatialElement.id}`} bind:element={presentation}
57
+ context={{ spatialElement, contentInset, heading: 'h1', mode: 'detail',
58
+ address: (role) => ({ brandId: theme.id, spatialElementId: spatialElement.id, slot: 'detail.summary', role }) }} />
136
59
  </Panel>
137
60
  </div>
138
61
 
139
62
  <style>
140
- @property --summary-feature-hover-progress {
141
- syntax: '<number>';
142
- inherits: false;
143
- initial-value: 0;
144
- }
145
-
146
- @property --summary-action-hover-progress {
147
- syntax: '<number>';
148
- inherits: false;
149
- initial-value: 0;
150
- }
151
-
152
63
  .spatial-element-aside {
153
- min-height: inherit;
64
+ position: relative;
65
+ min-width: 0;
66
+ width: var(--spatial-detail-summary-width);
67
+ margin-top: var(--spatial-detail-summary-gap);
68
+ margin-inline: auto;
154
69
  }
155
70
 
156
71
  :global(.spatial-element-panel) {
157
72
  position: relative;
158
- top: 0;
159
- width: min(494px, 100%);
160
- height: 504px;
161
- min-height: 504px;
73
+ width: 100%;
74
+ height: var(--summary-panel-height, auto);
75
+ max-height: var(--spatial-detail-summary-max-height);
76
+ min-height: 0;
162
77
  pointer-events: auto;
163
78
  }
164
79
 
@@ -167,257 +82,10 @@
167
82
  display: block;
168
83
  overflow: visible;
169
84
  color: color-mix(in srgb, var(--spatial-element-ink) 92%, transparent);
170
- transform-style: preserve-3d;
171
- }
172
-
173
- .summary-presentation {
174
- --summary-depth-progress: var(--stage-panel-pointer-proximity, 0);
175
- --summary-shadow-strength: var(--stage-panel-shadow-strength, 0.18);
176
- --summary-feature-depth: 40;
177
- --summary-feature-hover-depth: 48;
178
- --summary-eyebrow-depth: 60;
179
- --summary-title-depth: 96;
180
- --summary-action-depth: 76;
181
- --summary-action-hover-depth: 24;
182
-
183
- position: absolute;
184
- inset: 0;
185
- box-sizing: border-box;
186
- display: flex;
187
- flex-direction: column;
188
- justify-content: space-between;
189
- gap: 24px;
190
- pointer-events: auto;
191
- transform-style: preserve-3d;
192
- }
193
-
194
- .panel-copy {
195
- transform-style: preserve-3d;
196
- }
197
-
198
- .summary-presentation h1 {
199
- max-width: 390px;
200
- margin: 10px 0 0;
201
- font-size: clamp(30px, 3vw, 40px);
202
- font-weight: 780;
203
- line-height: 1.16;
204
- transform-origin: left center;
205
- will-change: transform;
206
- }
207
-
208
- .panel-kicker {
209
- margin: 0;
210
- font-size: 14px;
211
- font-weight: 720;
212
- letter-spacing: 0.05em;
213
- text-transform: uppercase;
214
- transform-origin: left center;
215
- will-change: transform;
216
- }
217
-
218
- .feature-list {
219
- display: grid;
220
- gap: 20px;
221
- margin: 0;
222
- padding: 0;
223
- color: var(--spatial-element-body);
224
- font-size: 18px;
225
- list-style: none;
226
- transform-style: preserve-3d;
227
- }
228
-
229
- .feature-list li {
230
- transform-style: preserve-3d;
231
- }
232
-
233
- .feature-content {
234
- --summary-feature-hover-progress: 0;
235
- --summary-feature-effective-depth: calc(
236
- var(--summary-feature-depth) * var(--summary-depth-progress) +
237
- var(--summary-feature-hover-depth) * var(--summary-feature-hover-progress)
238
- );
239
- --summary-feature-shadow-depth: calc(
240
- var(--summary-feature-depth) * var(--summary-depth-progress)
241
- );
242
-
243
- display: flex;
244
- align-items: baseline;
245
- gap: 14px;
246
- text-shadow:
247
- 0 calc(0.055px * var(--summary-feature-shadow-depth))
248
- calc(0.055px * var(--summary-feature-shadow-depth))
249
- rgb(
250
- 0 0 0 /
251
- calc(0.0168 * var(--summary-shadow-strength) * var(--summary-feature-shadow-depth))
252
- ),
253
- 0 calc(0.194px * var(--summary-feature-shadow-depth))
254
- calc(0.278px * var(--summary-feature-shadow-depth))
255
- rgb(
256
- 0 0 0 /
257
- calc(0.00936 * var(--summary-shadow-strength) * var(--summary-feature-shadow-depth))
258
- );
259
- transform: translateZ(calc(1px * var(--summary-feature-effective-depth)));
260
- transform-origin: left center;
261
- transition: --summary-feature-hover-progress 260ms cubic-bezier(0.22, 0.75, 0.25, 1);
262
- will-change: transform;
263
- }
264
-
265
- .feature-list li:hover .feature-content {
266
- --summary-feature-hover-progress: 1;
267
- }
268
-
269
- .feature-marker {
270
- color: var(--spatial-element-accent);
271
- font-weight: 800;
272
85
  }
273
86
 
274
- .spatial-element-action {
275
- display: block;
276
- box-sizing: border-box;
277
- width: 100%;
278
- min-height: 62px;
279
- border: 0;
280
- padding: 0;
281
- color: inherit;
282
- background: transparent;
283
- text-decoration: none;
284
- cursor: pointer;
285
- transform-style: preserve-3d;
286
- }
287
-
288
- .spatial-element-action:is(:hover, :focus-visible) .spatial-element-action-surface {
289
- --summary-action-hover-progress: 1;
290
- }
291
-
292
- .spatial-element-action-surface {
293
- --summary-action-hover-progress: 0;
294
-
295
- display: flex;
296
- align-items: center;
297
- justify-content: center;
298
- gap: 10px;
299
- box-sizing: border-box;
300
- width: 100%;
301
- min-height: 62px;
302
- border-radius: 7px;
303
- color: var(--spatial-element-on-accent);
304
- background: var(--spatial-element-accent);
305
- font:
306
- 760 22px/1 system-ui,
307
- sans-serif;
308
- transform-origin: center;
309
- transition: --summary-action-hover-progress 260ms cubic-bezier(0.22, 0.75, 0.25, 1);
310
- will-change: transform;
311
- }
312
-
313
- .panel-kicker {
314
- --summary-eyebrow-effective-depth: calc(
315
- var(--summary-eyebrow-depth) * var(--summary-depth-progress)
316
- );
317
-
318
- text-shadow:
319
- 0 calc(0.055px * var(--summary-eyebrow-effective-depth))
320
- calc(0.04px * var(--summary-eyebrow-effective-depth))
321
- rgb(
322
- 0 0 0 /
323
- calc(0.0134 * var(--summary-shadow-strength) * var(--summary-eyebrow-effective-depth))
324
- ),
325
- 0 calc(0.117px * var(--summary-eyebrow-effective-depth))
326
- calc(0.167px * var(--summary-eyebrow-effective-depth))
327
- rgb(
328
- 0 0 0 /
329
- calc(0.0074 * var(--summary-shadow-strength) * var(--summary-eyebrow-effective-depth))
330
- );
331
- transform: translateZ(calc(1px * var(--summary-eyebrow-effective-depth)));
332
- }
333
-
334
- .summary-presentation h1 {
335
- --summary-title-effective-depth: calc(
336
- var(--summary-title-depth) * var(--summary-depth-progress)
337
- );
338
-
339
- text-shadow:
340
- 0 calc(0.055px * var(--summary-title-effective-depth))
341
- calc(0.04px * var(--summary-title-effective-depth))
342
- rgb(
343
- 0 0 0 /
344
- calc(0.007 * var(--summary-shadow-strength) * var(--summary-title-effective-depth))
345
- ),
346
- 0 calc(0.156px * var(--summary-title-effective-depth))
347
- calc(0.203px * var(--summary-title-effective-depth))
348
- rgb(
349
- 0 0 0 /
350
- calc(0.0039 * var(--summary-shadow-strength) * var(--summary-title-effective-depth))
351
- );
352
- transform: translateZ(calc(1px * var(--summary-title-effective-depth)));
353
- }
354
-
355
- .spatial-element-action-surface {
356
- --summary-action-effective-depth: calc(
357
- var(--summary-action-depth) * var(--summary-depth-progress) +
358
- var(--summary-action-hover-depth) * var(--summary-action-hover-progress)
359
- );
360
-
361
- box-shadow:
362
- 0 calc(0.078px * var(--summary-action-effective-depth))
363
- calc(0.094px * var(--summary-action-effective-depth))
364
- rgb(
365
- 0 0 0 /
366
- calc(0.0105 * var(--summary-shadow-strength) * var(--summary-action-effective-depth))
367
- ),
368
- 0 calc(0.237px * var(--summary-action-effective-depth))
369
- calc(0.316px * var(--summary-action-effective-depth))
370
- rgb(
371
- 0 0 0 /
372
- calc(0.0068 * var(--summary-shadow-strength) * var(--summary-action-effective-depth))
373
- );
374
- transform: translateZ(calc(1px * var(--summary-action-effective-depth)));
375
- }
376
-
377
- :global(.spatial-element-action-icon) {
378
- flex: none;
379
- }
380
-
381
- .spatial-element-action-label {
382
- white-space: nowrap;
383
- }
384
-
385
- /* Zero-depth transforms still promote text to composited layers in Chromium.
386
- * Remove those layers while the complete panel is in its native DOM rest mode. */
387
- :global([data-stage-panel-render-mode='native']) .summary-presentation,
388
- :global([data-stage-panel-render-mode='native']) .panel-copy,
389
- :global([data-stage-panel-render-mode='native']) .feature-list,
390
- :global([data-stage-panel-render-mode='native']) .feature-list li,
391
- :global([data-stage-panel-render-mode='native']) .spatial-element-action {
392
- transform-style: flat;
393
- }
394
-
395
- :global([data-stage-panel-render-mode='native']) .panel-kicker,
396
- :global([data-stage-panel-render-mode='native']) .summary-presentation h1,
397
- :global([data-stage-panel-render-mode='native']) .feature-content,
398
- :global([data-stage-panel-render-mode='native']) .spatial-element-action-surface {
399
- transform: none;
400
- will-change: auto;
401
- }
402
-
403
- @media (prefers-reduced-motion: reduce) {
404
- .summary-presentation {
405
- --summary-depth-progress: 0;
406
- }
407
-
408
- .feature-content,
409
- .feature-list li:hover .feature-content,
410
- .spatial-element-action-surface,
411
- .spatial-element-action:is(:hover, :focus-visible) .spatial-element-action-surface {
412
- --summary-feature-hover-progress: 0;
413
- --summary-action-hover-progress: 0;
414
- transition: none;
415
- }
416
- }
417
87
 
418
- @media (max-width: 1100px) {
419
- :global(.spatial-element-panel) {
420
- top: auto;
421
- }
88
+ @media (min-width: 840px) {
89
+ .spatial-element-aside { position: absolute; top: 0; right: var(--spatial-detail-summary-right); margin: 0; }
422
90
  }
423
91
  </style>
@@ -1,6 +1,7 @@
1
- import type { SpatialElementData } from '@spatial-elements/core/spatial-element/types';
1
+ import type { ResolvedSpatialElementData as SpatialElementData } from '@spatial-elements/core/spatial-element/spatialElement';
2
2
  type $$ComponentProps = {
3
3
  spatialElement: SpatialElementData;
4
+ nativeContent?: boolean;
4
5
  };
5
6
  declare const SpatialElementSummaryPanel: import("svelte").Component<$$ComponentProps, {}, "">;
6
7
  type SpatialElementSummaryPanel = ReturnType<typeof SpatialElementSummaryPanel>;
@@ -1,5 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
+ import OverflowControls from './OverflowControls.svelte';
4
+ import { mouseHover } from '@spatial-elements/core/stage/mouseHover';
3
5
  import {
4
6
  STAGE_ANCHOR_SCROLL_DURATION_MS,
5
7
  STAGE_ANCHOR_SCROLL_EASING
@@ -7,13 +9,14 @@
7
9
  import type { SpatialElementSectionNavigationItem } from '@spatial-elements/core/spatial-element/types';
8
10
 
9
11
  interface Props {
12
+ element?: HTMLElement;
10
13
  activeSectionId?: string;
11
14
  sections: SpatialElementSectionNavigationItem[];
12
15
  variant: 'panel' | 'docked';
13
16
  }
14
17
 
15
- let { activeSectionId, sections, variant }: Props = $props();
16
- let linksElement: HTMLDivElement;
18
+ let { activeSectionId, sections, variant, element = $bindable() }: Props = $props();
19
+ let linksElement = $state<HTMLDivElement>(null!);
17
20
  let presentationFrame = 0;
18
21
  let readyFrame = 0;
19
22
  const currentSectionId = $derived(activeSectionId ?? sections[0]?.id);
@@ -81,6 +84,8 @@
81
84
  </script>
82
85
 
83
86
  <nav
87
+ bind:this={element}
88
+ use:mouseHover
84
89
  class="spatial-element-tab-list"
85
90
  data-spatial-element-tab-list={variant}
86
91
  aria-label="Elementbereiche"
@@ -94,11 +99,21 @@
94
99
  data-spatial-element-tab-id={section.id}
95
100
  data-spatial-element-tab-label={section.title}
96
101
  aria-current={currentSectionId === section.id ? 'location' : undefined}
102
+ aria-label={section.id === 'overview' ? section.title : undefined}
103
+ class:overview={section.id === 'overview'}
97
104
  >
98
- <span>{section.title}</span>
105
+ {#if section.id === 'overview'}
106
+ <!-- Author-supplied detail-overview.svg; see layout source manifest. -->
107
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
108
+ stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
109
+ <path d="M12 10.5 L9 13.5 M12 16.5 L12 10.5 M15 13.5 L12 10.5 M2 6.5 L22 6.5" />
110
+ <rect x="2" y="3" width="20" height="18" rx="2" />
111
+ </svg>
112
+ {:else}<span>{section.title}</span>{/if}
99
113
  </a>
100
114
  {/each}
101
115
  </div>
116
+ <OverflowControls target={linksElement} label="sections" />
102
117
  </nav>
103
118
 
104
119
  <style>
@@ -106,13 +121,14 @@
106
121
  --spatial-element-tab-font-size: 16px;
107
122
  --spatial-element-tab-highlight-top-radius: var(
108
123
  --spatial-element-tabs-dock-top-radius,
109
- var(--spatial-element-panel-radius, 9px)
124
+ var(--spatial-element-control-radius, 12px)
110
125
  );
111
126
  --spatial-element-tab-highlight-bottom-radius: var(
112
127
  --spatial-element-tabs-dock-bottom-radius,
113
- var(--spatial-element-panel-radius, 9px)
128
+ var(--spatial-element-control-radius, 12px)
114
129
  );
115
130
 
131
+ position: relative;
116
132
  display: flex;
117
133
  align-items: center;
118
134
  box-sizing: border-box;
@@ -120,7 +136,7 @@
120
136
  max-width: 100%;
121
137
  height: 100%;
122
138
  min-width: 0;
123
- color: var(--spatial-element-body);
139
+ color: var(--spatial-element-navigation-ink, var(--spatial-element-ink));
124
140
  pointer-events: auto;
125
141
  }
126
142
 
@@ -171,7 +187,7 @@
171
187
  position: absolute;
172
188
  bottom: 3px;
173
189
  left: 50%;
174
- width: 40px;
190
+ width: 24px;
175
191
  height: 3px;
176
192
  border-radius: 3px 3px 0 0;
177
193
  background: var(--spatial-element-accent);
@@ -184,7 +200,7 @@
184
200
  visibility: visible;
185
201
  }
186
202
 
187
- a {
203
+ .spatial-element-tab-list a {
188
204
  display: grid;
189
205
  position: relative;
190
206
  z-index: 1;
@@ -195,12 +211,10 @@
195
211
  padding: 0 16px;
196
212
  border-radius: var(--spatial-element-tab-highlight-top-radius) var(--spatial-element-tab-highlight-top-radius)
197
213
  var(--spatial-element-tab-highlight-bottom-radius) var(--spatial-element-tab-highlight-bottom-radius);
198
- color: var(--spatial-element-body);
214
+ color: var(--spatial-element-navigation-ink, var(--spatial-element-ink));
199
215
  background: transparent;
200
- /* Sturdier glyphs retain more edge contrast in the spatial panel and keep
201
- * the source-to-dock handoff typographically identical. */
202
216
  font-size: var(--spatial-element-tab-font-size);
203
- font-weight: 600;
217
+ font-weight: 400;
204
218
  line-height: 1;
205
219
  text-decoration: none;
206
220
  white-space: nowrap;
@@ -213,18 +227,22 @@
213
227
  }
214
228
 
215
229
  a::before {
216
- font-weight: 600;
230
+ font-weight: 650;
217
231
  content: attr(data-spatial-element-tab-label);
218
232
  visibility: hidden;
219
233
  }
234
+ a.overview { width: 48px; padding: 0 12px; }
235
+ a.overview::before { content: none; }
220
236
 
221
- a:hover:not([aria-current='location']) {
237
+ .spatial-element-tab-list:global([data-mouse-hover]) a:hover:not([aria-current='location']) {
222
238
  background: color-mix(in srgb, var(--spatial-element-body) 8%, transparent);
223
239
  }
224
240
 
225
- a[aria-current='location'] {
226
- font-weight: 600;
241
+ .spatial-element-tab-list a[aria-current='location'] {
242
+ font-weight: 650;
227
243
  }
244
+ a.overview svg { opacity: 0.55; transition: opacity 180ms ease; }
245
+ a.overview[aria-current='location'] svg { opacity: 1; }
228
246
 
229
247
  .spatial-element-tab-links:not([data-spatial-element-tab-indicator-ready]) a[aria-current='location'] {
230
248
  background: color-mix(in srgb, var(--spatial-element-body) 8%, transparent);
@@ -234,7 +252,7 @@
234
252
  position: absolute;
235
253
  bottom: 3px;
236
254
  left: 50%;
237
- width: 40px;
255
+ width: 24px;
238
256
  height: 3px;
239
257
  border-radius: 3px 3px 0 0;
240
258
  background: var(--spatial-element-accent);
@@ -247,6 +265,11 @@
247
265
  outline-offset: -2px;
248
266
  }
249
267
 
268
+ /* This node keeps its own visibility contract after leaving the source panel. */
269
+ @media (width < 840px) {
270
+ .spatial-element-tab-list { display: none; }
271
+ }
272
+
250
273
  @media (max-width: 620px) {
251
274
  .spatial-element-tab-list {
252
275
  --spatial-element-tab-font-size: 15px;
@@ -1,9 +1,10 @@
1
1
  import type { SpatialElementSectionNavigationItem } from '@spatial-elements/core/spatial-element/types';
2
2
  interface Props {
3
+ element?: HTMLElement;
3
4
  activeSectionId?: string;
4
5
  sections: SpatialElementSectionNavigationItem[];
5
6
  variant: 'panel' | 'docked';
6
7
  }
7
- declare const SpatialElementTabList: import("svelte").Component<Props, {}, "">;
8
+ declare const SpatialElementTabList: import("svelte").Component<Props, {}, "element">;
8
9
  type SpatialElementTabList = ReturnType<typeof SpatialElementTabList>;
9
10
  export default SpatialElementTabList;