@spatial-elements/sveltekit 1.0.0-beta.14 → 1.0.0-beta.18

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 (50) hide show
  1. package/README.md +1 -1
  2. package/dist/catalog/ScrollNavigationBridge.svelte +5 -1
  3. package/dist/catalog/ScrollNavigationBridge.svelte.d.ts +1 -1
  4. package/dist/catalog/stagedCatalogNavigation.d.ts +1 -1
  5. package/dist/spatial-element/BrandStageShell.svelte +27 -2
  6. package/dist/spatial-element/BrandStageShell.svelte.d.ts +2 -0
  7. package/dist/spatial-element/CarouselSpatialElement.svelte +7 -7
  8. package/dist/spatial-element/ContentPage.svelte +5 -2
  9. package/dist/spatial-element/ContentPage.svelte.d.ts +3 -0
  10. package/dist/spatial-element/OverflowControls.svelte +6 -6
  11. package/dist/spatial-element/PointerHint.svelte +5 -4
  12. package/dist/spatial-element/Section.svelte +4 -33
  13. package/dist/spatial-element/SpaceMouseControl.svelte +4 -4
  14. package/dist/spatial-element/SpatialCardGridSection.svelte +6 -9
  15. package/dist/spatial-element/SpatialCardPresentation.svelte +129 -33
  16. package/dist/spatial-element/SpatialCardPresentation.svelte.d.ts +2 -2
  17. package/dist/spatial-element/SpatialCardSlot.svelte +1 -1
  18. package/dist/spatial-element/SpatialCarouselSection.svelte +10 -2
  19. package/dist/spatial-element/SpatialElementBreadcrumbs.svelte +14 -2
  20. package/dist/spatial-element/SpatialElementCard.svelte +7 -13
  21. package/dist/spatial-element/SpatialElementCard.svelte.d.ts +2 -2
  22. package/dist/spatial-element/SpatialElementHelp.svelte +7 -5
  23. package/dist/spatial-element/SpatialElementMediaRail.svelte +2 -1
  24. package/dist/spatial-element/SpatialElementPage.svelte +2 -2
  25. package/dist/spatial-element/SpatialElementStickyHeader.svelte +29 -5
  26. package/dist/spatial-element/SpatialElementSummaryContent.svelte +16 -8
  27. package/dist/spatial-element/SpatialElementSummaryContent.svelte.d.ts +4 -0
  28. package/dist/spatial-element/SpatialElementSummaryPanel.svelte +2 -1
  29. package/dist/spatial-element/SpatialElementTabList.svelte +32 -10
  30. package/dist/spatial-element/SpatialIconButton.svelte +2 -0
  31. package/dist/spatial-element/SpatialListPage.svelte +2 -2
  32. package/dist/spatial-element/SpatialNavigationShell.svelte +10 -44
  33. package/dist/spatial-element/SpatialSummaryHost.svelte +1 -1
  34. package/dist/spatial-element/SpatialSummaryRoot.svelte +33 -10
  35. package/dist/spatial-element/SpatialSummarySlot.svelte +1 -1
  36. package/dist/spatial-element/cardAppearanceFreeze.js +1 -1
  37. package/dist/spatial-element/carouselTextHit.js +2 -1
  38. package/dist/spatial-element/contentSidebars.js +15 -7
  39. package/dist/spatial-element/index.d.ts +1 -2
  40. package/dist/spatial-element/layout.generated.css +41 -17
  41. package/dist/spatial-element/spatialCardGrid.d.ts +3 -3
  42. package/dist/spatial-element/spatialSummary.d.ts +4 -2
  43. package/dist/spatial-element/spatialThemeStyle.js +4 -4
  44. package/dist/stage/ButtonGroup.svelte +2 -0
  45. package/dist/stage/Panel.svelte +11 -3
  46. package/dist/stage/Panel.svelte.d.ts +2 -0
  47. package/dist/stage/Stage.svelte +11 -3
  48. package/dist/stage/panelShadowStyle.d.ts +3 -0
  49. package/dist/stage/panelShadowStyle.js +11 -0
  50. package/package.json +9 -9
@@ -1,5 +1,10 @@
1
1
  /* Generated from @page-sections/core plus spatial-only layoutTokens.json. Run npm run layout:generate. */
2
2
 
3
+ /* Per-frame paint values must not invalidate the descendants of the whole page. */
4
+ @property --spatial-pane-fixed-compensation { syntax: '<length>'; inherits: false; initial-value: 0px; }
5
+ @property --spatial-pane-focus-origin-y { syntax: '<length-percentage>'; inherits: false; initial-value: 50%; }
6
+ @property --spatial-shell-scroll-compensation { syntax: '<length>'; inherits: false; initial-value: 0px; }
7
+
3
8
  .spatial-content-width { width: min(100%, 1536px); margin-inline: auto; }
4
9
 
5
10
  .spatial-content-container { container: ps-content / inline-size; min-width: 0; }
@@ -147,12 +152,15 @@
147
152
  }
148
153
 
149
154
  .carousel-drag-section {
150
- --spatial-carousel-fit-height: clamp(150px, calc(100svh - 240px - var(--spatial-carousel-headline-budget, 0px)), 300px);
151
- --spatial-carousel-fit-left: 36px;
152
- --spatial-carousel-fit-width: calc(100% - 72px);
153
- --spatial-carousel-summary-left: 36px;
154
- --spatial-carousel-summary-width: calc(100% - 72px);
155
- --spatial-carousel-title-reserve: 66px;
155
+ --spatial-carousel-fit-height: clamp(96px, calc(100svh - 320px - var(--spatial-carousel-headline-budget, 0px)), 260px);
156
+ --spatial-carousel-fit-left: 0px;
157
+ --spatial-carousel-fit-width: 100%;
158
+ --spatial-carousel-summary-left: 52px;
159
+ --spatial-carousel-summary-width: calc(100% - 104px);
160
+ --spatial-carousel-title-reserve: 0px;
161
+ --spatial-carousel-panel-reserve: 50px;
162
+ --spatial-carousel-compact-height: 66px;
163
+ --spatial-carousel-compact-overlap: 16px;
156
164
  --spatial-carousel-dots-gap: 0px;
157
165
  --spatial-carousel-dots-height: 32px;
158
166
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -161,12 +169,15 @@
161
169
 
162
170
  @media (min-width: 600px) {
163
171
  .carousel-drag-section {
164
- --spatial-carousel-fit-height: clamp(150px, calc(100svh - 248px - var(--spatial-carousel-headline-budget, 0px)), 400px);
165
- --spatial-carousel-fit-left: 72px;
166
- --spatial-carousel-fit-width: calc(100% - 144px);
167
- --spatial-carousel-summary-left: 72px;
168
- --spatial-carousel-summary-width: calc(100% - 144px);
169
- --spatial-carousel-title-reserve: 66px;
172
+ --spatial-carousel-fit-height: clamp(96px, calc(100svh - 336px - var(--spatial-carousel-headline-budget, 0px)), 340px);
173
+ --spatial-carousel-fit-left: 0px;
174
+ --spatial-carousel-fit-width: 100%;
175
+ --spatial-carousel-summary-left: 52px;
176
+ --spatial-carousel-summary-width: calc(100% - 104px);
177
+ --spatial-carousel-title-reserve: 0px;
178
+ --spatial-carousel-panel-reserve: 50px;
179
+ --spatial-carousel-compact-height: 66px;
180
+ --spatial-carousel-compact-overlap: 16px;
170
181
  --spatial-carousel-dots-gap: 0px;
171
182
  --spatial-carousel-dots-height: 32px;
172
183
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -176,12 +187,15 @@
176
187
 
177
188
  @media (min-width: 840px) {
178
189
  .carousel-drag-section {
179
- --spatial-carousel-fit-height: clamp(300px, calc(100svh - 200px - var(--spatial-carousel-headline-budget, 0px)), 500px);
190
+ --spatial-carousel-fit-height: clamp(160px, calc(100svh - 276px - var(--spatial-carousel-headline-budget, 0px)), 540px);
180
191
  --spatial-carousel-fit-left: calc((((100% - 112px) / 8) + 16px) * 1);
181
192
  --spatial-carousel-fit-width: calc(((100% - 112px) / 8) * 3 + 32px);
182
193
  --spatial-carousel-summary-left: calc((((100% - 112px) / 8) + 16px) * 4);
183
194
  --spatial-carousel-summary-width: calc(((100% - 112px) / 8) * 3 + 32px);
184
195
  --spatial-carousel-title-reserve: 0px;
196
+ --spatial-carousel-panel-reserve: 0px;
197
+ --spatial-carousel-compact-height: 66px;
198
+ --spatial-carousel-compact-overlap: 16px;
185
199
  --spatial-carousel-dots-gap: 12px;
186
200
  --spatial-carousel-dots-height: 32px;
187
201
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -191,12 +205,15 @@
191
205
 
192
206
  @media (min-width: 1200px) {
193
207
  .carousel-drag-section {
194
- --spatial-carousel-fit-height: clamp(340px, calc(100svh - 230px - var(--spatial-carousel-headline-budget, 0px)), 600px);
208
+ --spatial-carousel-fit-height: clamp(160px, calc(100svh - 330px - var(--spatial-carousel-headline-budget, 0px)), 560px);
195
209
  --spatial-carousel-fit-left: calc((((100% - 264px) / 12) + 24px) * 2);
196
210
  --spatial-carousel-fit-width: calc(((100% - 264px) / 12) * 5 + 96px);
197
211
  --spatial-carousel-summary-left: calc((((100% - 264px) / 12) + 24px) * 7);
198
212
  --spatial-carousel-summary-width: calc(((100% - 264px) / 12) * 4 + 72px);
199
213
  --spatial-carousel-title-reserve: 0px;
214
+ --spatial-carousel-panel-reserve: 0px;
215
+ --spatial-carousel-compact-height: 66px;
216
+ --spatial-carousel-compact-overlap: 16px;
200
217
  --spatial-carousel-dots-gap: 16px;
201
218
  --spatial-carousel-dots-height: 32px;
202
219
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -206,12 +223,15 @@
206
223
 
207
224
  @media (min-width: 1600px) {
208
225
  .carousel-drag-section {
209
- --spatial-carousel-fit-height: clamp(400px, calc(100svh - 244px - var(--spatial-carousel-headline-budget, 0px)), 700px);
226
+ --spatial-carousel-fit-height: clamp(160px, calc(100svh - 344px - var(--spatial-carousel-headline-budget, 0px)), 600px);
210
227
  --spatial-carousel-fit-left: calc((((100% - 264px) / 12) + 24px) * 1);
211
228
  --spatial-carousel-fit-width: calc(((100% - 264px) / 12) * 5 + 96px);
212
229
  --spatial-carousel-summary-left: calc((((100% - 264px) / 12) + 24px) * 6);
213
230
  --spatial-carousel-summary-width: calc(((100% - 264px) / 12) * 4 + 72px);
214
231
  --spatial-carousel-title-reserve: 0px;
232
+ --spatial-carousel-panel-reserve: 0px;
233
+ --spatial-carousel-compact-height: 66px;
234
+ --spatial-carousel-compact-overlap: 16px;
215
235
  --spatial-carousel-dots-gap: 16px;
216
236
  --spatial-carousel-dots-height: 32px;
217
237
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -221,12 +241,15 @@
221
241
 
222
242
  @media (min-width: 1809px) {
223
243
  .carousel-drag-section {
224
- --spatial-carousel-fit-height: clamp(400px, calc(100svh - 244px - var(--spatial-carousel-headline-budget, 0px)), 800px);
244
+ --spatial-carousel-fit-height: clamp(160px, calc(100svh - 344px - var(--spatial-carousel-headline-budget, 0px)), 640px);
225
245
  --spatial-carousel-fit-left: calc((((100% - 264px) / 12) + 24px) * 1);
226
246
  --spatial-carousel-fit-width: calc(((100% - 264px) / 12) * 6 + 120px);
227
247
  --spatial-carousel-summary-left: calc((((100% - 264px) / 12) + 24px) * 7);
228
248
  --spatial-carousel-summary-width: calc(((100% - 264px) / 12) * 4 + 72px);
229
249
  --spatial-carousel-title-reserve: 0px;
250
+ --spatial-carousel-panel-reserve: 0px;
251
+ --spatial-carousel-compact-height: 66px;
252
+ --spatial-carousel-compact-overlap: 16px;
230
253
  --spatial-carousel-dots-gap: 16px;
231
254
  --spatial-carousel-dots-height: 32px;
232
255
  --spatial-detail-summary-max-height: var(--spatial-carousel-fit-height);
@@ -271,7 +294,8 @@
271
294
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body [data-spatial-summary-aside] {
272
295
  position: relative; top: auto; right: auto; width: 100%; margin: 0;
273
296
  }
274
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-element-panel { max-height: none; }
297
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-element-panel { max-height: none; border-radius: 0; }
298
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-element-panel > .stage-panel-surface > [data-stage-panel-content] > .panel-edge { border-block-width: 0; border-radius: 0 !important; }
275
299
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-summary-query { max-height: none; overflow: visible; overscroll-behavior: auto; }
276
300
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-element-panel .stage-panel-surface::before,
277
301
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-body .spatial-element-panel .stage-panel-surface::after { display: none; }
@@ -1,12 +1,12 @@
1
- import type { CardSize, CardVariant, CardMediaAspect, CardMediaFit, ContentSpan, SurfaceTone } from '@page-sections/core';
1
+ import type { CardSize, CardMediaAspect, CardMediaFit, ContentSpan, SurfaceTone } from '@page-sections/core';
2
2
  /** Page Sections card layout options; spatial media defaults to square/contain. */
3
3
  export interface SpatialCardGridOptions {
4
4
  cardSize?: CardSize;
5
- cardVariant?: CardVariant;
5
+ cardShadow?: boolean;
6
6
  cardTone?: SurfaceTone;
7
7
  textAlign?: 'start' | 'center';
8
8
  mediaAspect?: CardMediaAspect;
9
9
  mediaFit?: CardMediaFit;
10
- /** Grid span for editorial cards. Catalog cards use the responsive cardSize allocation. */
10
+ /** Optional explicit grid span. Omit to use the responsive cardSize allocation. */
11
11
  itemSpan?: ContentSpan;
12
12
  }
@@ -1,4 +1,4 @@
1
- import type { CardMediaAspect, CardMediaFit, CardVariant, SurfaceTone } from '@page-sections/core';
1
+ import type { CardMediaAspect, CardMediaFit, SurfaceTone } from '@page-sections/core';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { CatalogEndpointAddress, CatalogEndpointRole } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
4
4
  import type { ResolvedSpatialElementData } from '@spatial-elements/core/spatial-element/spatialElement';
@@ -6,6 +6,8 @@ import type { SpatialListItem } from '@spatial-elements/core/spatial-element/typ
6
6
  import type { SpatialCardSize } from '@spatial-elements/core/spatial-element/responsiveLayout';
7
7
  export interface SpatialSummaryContext {
8
8
  spatialElement: Pick<ResolvedSpatialElementData, 'id' | 'brandId' | 'title' | 'eyebrow' | 'features' | 'action'>;
9
+ /** Canonical detail link, retained when the live summary moves between placements. */
10
+ detailHref?: string;
9
11
  mode: 'detail' | 'carousel';
10
12
  heading: 'h1' | 'h3';
11
13
  contentInset: number;
@@ -30,7 +32,7 @@ export interface SpatialCardContext {
30
32
  mediaFit?: CardMediaFit;
31
33
  reserveEyebrow?: boolean;
32
34
  cardTone?: SurfaceTone;
33
- cardVariant?: CardVariant;
35
+ cardShadow?: boolean;
34
36
  }
35
37
  export type SpatialPresentationModel = {
36
38
  kind: 'summary';
@@ -1,5 +1,5 @@
1
1
  import { resolveSpatialSectionBackgrounds, resolveSpatialThemeRadii } from '@spatial-elements/core/spatial-element/spatialTheme';
2
- import { getCssPanelBoxShadow, resolvePanelShadowStrength } from '@spatial-elements/core/stage/panelShadow';
2
+ import { resolvePanelShadowStrength } from '@spatial-elements/core/stage/panelShadow';
3
3
  /** CSS declarations shared by the shell and optional server-rendered theme previews. */
4
4
  export function getSpatialThemeStyle(theme) {
5
5
  const radii = resolveSpatialThemeRadii(theme);
@@ -14,7 +14,9 @@ export function getSpatialThemeStyle(theme) {
14
14
  `--ps-section-muted: ${sectionBackgrounds.muted}`,
15
15
  `--ps-radius: ${radii.panel}px`,
16
16
  `--ps-font-family: Inter, ui-sans-serif, system-ui, sans-serif`,
17
- `--ps-border: color-mix(in srgb, ${theme.colors.ink} 18%, transparent)`,
17
+ `--ps-border: ${theme.colors.border ?? `color-mix(in srgb, ${theme.colors.ink} 18%, transparent)`}`,
18
+ `--ps-panel-border: ${theme.colors.panelBorder ?? `color-mix(in srgb, ${theme.colors.ink} 12%, transparent)`}`,
19
+ `--ps-selection: ${theme.colors.tabBackground}`,
18
20
  `--ps-scroll-offset: var(--spatial-element-section-scroll-offset, 150px)`,
19
21
  `--spatial-element-background: ${theme.background}`,
20
22
  `--spatial-element-ink: ${theme.colors.ink}`,
@@ -32,12 +34,10 @@ export function getSpatialThemeStyle(theme) {
32
34
  `--spatial-element-panel-tint-rgb: ${getDockedPanelTintRgb(theme.panelTheme.tint ?? '#ffffff')}`,
33
35
  `--spatial-element-panel-tint-opacity: ${clamp(theme.panelTheme.tintOpacity ?? 0.65, 0, 1)}`,
34
36
  `--spatial-element-panel-backdrop-blur: ${clamp(theme.panelTheme.backdropBlur ?? 8, 0, 100)}px`,
35
- `--spatial-element-panel-box-shadow: ${getCssPanelBoxShadow(theme.panelTheme.shadowIntensity ?? 0.2)}`,
36
37
  `--spatial-element-docked-panel-tint-rgb: ${getDockedPanelTintRgb(theme.dockedPanelTheme.tint)}`,
37
38
  `--spatial-element-docked-panel-tint-opacity: ${clamp(theme.dockedPanelTheme.tintOpacity, 0, 1)}`,
38
39
  `--spatial-element-docked-panel-shadow-intensity: ${clamp(theme.dockedPanelTheme.shadowIntensity, 0, 1)}`,
39
40
  `--spatial-element-docked-panel-shadow-strength: ${resolvePanelShadowStrength(theme.dockedPanelTheme.shadowIntensity)}`,
40
- `--spatial-element-docked-panel-box-shadow: ${getCssPanelBoxShadow(theme.dockedPanelTheme.shadowIntensity)}`,
41
41
  `--spatial-element-docked-panel-backdrop-blur: ${clamp(theme.dockedPanelTheme.backdropBlur, 0, 100)}px`
42
42
  ].join('; ');
43
43
  }
@@ -57,6 +57,7 @@
57
57
  <div class="button-group-frame" style:width>
58
58
  <Panel
59
59
  class="button-group-panel"
60
+ borderColor="transparent"
60
61
  shape={{ ...shape, radius, contentInset: 0 }}
61
62
  {theme}
62
63
  pointerReactive={false}
@@ -102,6 +103,7 @@
102
103
  height: 40px;
103
104
  }
104
105
  .button-group {
106
+ outline: 1px solid var(--ps-border); outline-offset: -1px;
105
107
  display: flex;
106
108
  width: max-content;
107
109
  height: 40px;
@@ -14,7 +14,7 @@
14
14
  type StagePanelShape,
15
15
  type StagePanelTheme
16
16
  } from '@spatial-elements/core/stage/panelContext';
17
- import { getCssPanelBoxShadow, resolvePanelShadowStrength } from '@spatial-elements/core/stage/panelShadow';
17
+ import { getSharedPanelBoxShadow, resolvePanelShadowStrength } from '@spatial-elements/core/stage/panelShadow';
18
18
  import type { StagePanelSurface } from '@spatial-elements/core/stage/stageTypes';
19
19
  import type { CatalogTransitionGroup } from '@spatial-elements/core/catalog/catalogPresentation';
20
20
  import type { CatalogEndpointAddress } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
@@ -24,6 +24,8 @@
24
24
  children?: Snippet;
25
25
  class?: string;
26
26
  contentClass?: string;
27
+ /** CSS outline color; transparent disables the panel edge without changing geometry. */
28
+ borderColor?: string;
27
29
  minimap?: boolean | StagePanelMinimapOptions;
28
30
  /** true: proximity lift and tilt; 'lift': a 2px mouse-hover lift without tilt; false: still. */
29
31
  pointerReactive?: boolean | 'lift';
@@ -51,6 +53,7 @@
51
53
  children,
52
54
  class: frameClass = '',
53
55
  contentClass = '',
56
+ borderColor = 'var(--ps-panel-border, transparent)',
54
57
  minimap = false,
55
58
  pointerReactive = true,
56
59
  focusReactive = true,
@@ -204,7 +207,7 @@
204
207
  `--stage-panel-tint-opacity: ${tintOpacity}`,
205
208
  `--stage-panel-shadow-intensity: ${shadowIntensity}`,
206
209
  `--stage-panel-shadow-strength: ${resolvePanelShadowStrength(shadowIntensity)}`,
207
- `--stage-panel-box-shadow: ${getCssPanelBoxShadow(shadowIntensity)}`,
210
+ `--stage-panel-box-shadow: ${getSharedPanelBoxShadow(shadowIntensity, theme.shadowColor)}`,
208
211
  `--stage-panel-specular-opacity: ${specularOpacity}`,
209
212
  `--stage-panel-thickness: ${thickness}`,
210
213
  `--stage-panel-bezel: ${bezel}px`,
@@ -311,11 +314,16 @@
311
314
  use:authoredStyle={getContentThemeStyle()}
312
315
  >
313
316
  {@render children?.()}
317
+ <span class="panel-edge" aria-hidden="true"
318
+ style:inset={`${-getContentInset()}px`}
319
+ style:border-color={borderColor}
320
+ style:border-radius={`${shape.radius}px ${shape.radius}px ${shape.squareBottom ? 0 : shape.radius}px ${shape.squareBottom ? 0 : shape.radius}px`}></span>
314
321
  </div>
315
322
  </div>
316
323
  </div>
317
324
 
318
325
  <style>
326
+ .panel-edge { position: absolute; border: 1px solid; box-sizing: border-box; pointer-events: none; z-index: 2; }
319
327
  .stage-panel-fallback {
320
328
  z-index: 2;
321
329
  box-sizing: border-box;
@@ -381,7 +389,7 @@
381
389
  .stage-panel-surface::before {
382
390
  background: rgb(var(--stage-panel-tint-rgb) / var(--stage-panel-tint-opacity));
383
391
  box-shadow:
384
- var(--stage-panel-box-shadow),
392
+ var(--ps-panel-shadow, var(--stage-panel-box-shadow)),
385
393
  inset 0 0 var(--stage-panel-bezel) rgb(16 24 32 / calc(var(--stage-panel-thickness) * 0.12));
386
394
  -webkit-backdrop-filter: blur(var(--stage-panel-css-blur));
387
395
  backdrop-filter: blur(var(--stage-panel-css-blur));
@@ -9,6 +9,8 @@ type Props = Omit<StagePanelAttributes, 'class'> & {
9
9
  children?: Snippet;
10
10
  class?: string;
11
11
  contentClass?: string;
12
+ /** CSS outline color; transparent disables the panel edge without changing geometry. */
13
+ borderColor?: string;
12
14
  minimap?: boolean | StagePanelMinimapOptions;
13
15
  /** true: proximity lift and tilt; 'lift': a 2px mouse-hover lift without tilt; false: still. */
14
16
  pointerReactive?: boolean | 'lift';
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { withSharedPanelShadow, observePanelShadowStyles } from './panelShadowStyle.js';
2
3
  import { isSpaceMouseDesktop, type SpaceMouseState } from '@spatial-elements/core/stage/spaceMousePlatform';
3
4
  import { hasUsableWebGPU } from '@spatial-elements/core/stage/webgpuSupport';
4
5
  import type { SpatialElementLodPair } from '@spatial-elements/core/catalog/spatialElementLodPair';
@@ -62,7 +63,7 @@
62
63
  hasSpatialElementScene
63
64
  } from '@spatial-elements/core/spatial-element/spatialElementScene';
64
65
  import { SPATIAL_PAGE } from '../spatial-element/spatialPageContext.js';
65
- import type { BeforeNavigate, OnNavigate } from '@sveltejs/kit';
66
+ import type { BeforeNavigate, OnNavigate } from '$app/navigation';
66
67
  import {
67
68
  STAGE_CONTEXT_KEY,
68
69
  STAGE_PANEL_LAYOUT_EVENT,
@@ -495,6 +496,7 @@
495
496
  Object.values(interactionTheme ?? {});
496
497
  scheduleAppearanceUpdate();
497
498
  });
499
+ onMount(() => observePanelShadowStyles(stage, scheduleAppearanceUpdate));
498
500
  let appearanceUpdatePending = false;
499
501
  function scheduleAppearanceUpdate() {
500
502
  if (appearanceUpdatePending) return;
@@ -911,7 +913,7 @@
911
913
  updateNativeLayout: panel.updateNativeLayout,
912
914
  nativeContent: panel.getNativeContent?.() ?? false,
913
915
  minimap: panel.getMinimapOptions(),
914
- options: panel.getOptions(),
916
+ options: panel.getSurface() === 'glass' ? withSharedPanelShadow(surfaceElement, panel.getOptions()) : panel.getOptions(),
915
917
  surface: panel.getSurface(),
916
918
  surfaceElement,
917
919
  pointerReactive: panel.getPointerReactive(),
@@ -924,8 +926,9 @@
924
926
  </script>
925
927
 
926
928
  {#if catalog}
929
+ <!-- Activate history/focus subscriptions once the controller has started. -->
927
930
  <ScrollNavigationBridge
928
- controller={virtualScroll}
931
+ controller={isEnhanced ? virtualScroll : undefined}
929
932
  onEarlyStart={startEarlyNavigation}
930
933
  onStart={() => { if (isEnhanced) navigationFeedback?.begin(); }}
931
934
  onCapture={captureNavigation}
@@ -1023,6 +1026,11 @@
1023
1026
  .stage:global(.stage-virtual-scroll-active) .stage-virtual-scroll-spacer {
1024
1027
  display: block;
1025
1028
  }
1029
+ .stage:global(.stage-virtual-scroll-active) {
1030
+ /* The shared scroll frame owns visual positioning. Native anchoring must
1031
+ * not counteract moving/portaled panels or scrollspy typography changes. */
1032
+ overflow-anchor: none;
1033
+ }
1026
1034
 
1027
1035
  .stage:global(.stage-virtual-scroll-active) .stage-virtual-viewport {
1028
1036
  position: fixed;
@@ -0,0 +1,3 @@
1
+ export { withSharedPanelShadow } from '@spatial-elements/core/stage/panelShadowStyle';
2
+ /** Theme edits and responsive styles update GPU materials without per-frame CSS reads. */
3
+ export declare function observePanelShadowStyles(stage: HTMLElement, update: () => void): () => void;
@@ -0,0 +1,11 @@
1
+ export { withSharedPanelShadow } from '@spatial-elements/core/stage/panelShadowStyle';
2
+ /** Theme edits and responsive styles update GPU materials without per-frame CSS reads. */
3
+ export function observePanelShadowStyles(stage, update) {
4
+ const observer = new MutationObserver(update);
5
+ for (let ancestor = stage.parentElement; ancestor; ancestor = ancestor.parentElement) {
6
+ observer.observe(ancestor, { attributes: true, attributeFilter: ['style', 'class', 'data-ps-theme', 'data-color-scheme'] });
7
+ }
8
+ observer.observe(document.head, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ['href', 'media', 'disabled'] });
9
+ window.addEventListener('resize', update, { passive: true });
10
+ return () => { observer.disconnect(); window.removeEventListener('resize', update); };
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatial-elements/sveltekit",
3
- "version": "1.0.0-beta.14",
3
+ "version": "1.0.0-beta.18",
4
4
  "description": "SvelteKit components and navigation for Spatial Elements.",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "**/*.css"
32
32
  ],
33
33
  "engines": {
34
- "node": ">=22.12.0"
34
+ "node": ">=22.17.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "node ../../scripts/clean-package.mjs sveltekit && svelte-package -i src -o dist",
@@ -40,15 +40,15 @@
40
40
  "prepack": "npm run build"
41
41
  },
42
42
  "dependencies": {
43
- "@page-sections/core": "0.4.1",
44
- "@page-sections/svelte": "0.4.1",
45
- "@spatial-elements/core": "1.0.0-beta.14",
46
- "lucide-svelte": "^1.0.1"
43
+ "@lucide/svelte": "1.77.0",
44
+ "@page-sections/core": "0.6.0",
45
+ "@page-sections/svelte": "0.6.0",
46
+ "@spatial-elements/core": "1.0.0-beta.18"
47
47
  },
48
48
  "peerDependencies": {
49
- "@sveltejs/kit": "^2.70.3",
50
- "svelte": "^5.56.4",
51
- "three": "^0.186.1"
49
+ "@sveltejs/kit": "^3.4.0",
50
+ "svelte": "^5.59.1",
51
+ "three": "^0.187.0"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public",