@spatial-elements/sveltekit 1.0.0-beta.15 → 1.0.0-beta.19

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 +11 -2
  9. package/dist/spatial-element/ContentPage.svelte.d.ts +7 -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 +1 -1
  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 +139 -32
  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 +1 -1
  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 +1 -1
  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 +17 -2
  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 +12 -45
  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 +11 -8
  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 +2 -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 +8 -2
  43. package/dist/spatial-element/spatialThemeStyle.js +7 -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 +14 -4
  48. package/dist/stage/panelShadowStyle.d.ts +3 -0
  49. package/dist/stage/panelShadowStyle.js +11 -0
  50. package/package.json +9 -9
package/README.md CHANGED
@@ -13,7 +13,7 @@ SvelteKit components for interactive 3D collections and detail pages, built on t
13
13
  ## Installation
14
14
 
15
15
  ```sh
16
- npm install @spatial-elements/sveltekit@beta three@^0.186.1
16
+ npm install @spatial-elements/sveltekit@beta three@^0.187.0
17
17
  ```
18
18
 
19
19
  Requires Node >=22.12 for tooling, Svelte ^5.56.4 and SvelteKit ^2.70.3. This is a beta package. Models and environments belong to your application and are not bundled.
@@ -16,7 +16,7 @@
16
16
  replaceState
17
17
  } from '$app/navigation';
18
18
  import { navigating, page } from '$app/state';
19
- import type { BeforeNavigate, OnNavigate } from '@sveltejs/kit';
19
+ import type { BeforeNavigate, OnNavigate } from '$app/navigation';
20
20
  import { getContext, onDestroy, onMount, tick } from 'svelte';
21
21
  import { CATALOG_ENDPOINTS, type CatalogEndpointRegistry } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
22
22
  import {
@@ -270,6 +270,9 @@
270
270
  }
271
271
 
272
272
  beforeNavigate((navigation) => {
273
+ // A history entry can carry shallow metadata while restoring another page.
274
+ // Kit calls these hooks for that full popstate navigation; keep its capture.
275
+ if (navigation.shallow && navigation.type !== 'popstate') return;
273
276
  // The single permitted replay continues the existing visual ownership.
274
277
  // It must not run stopActive, onSupersede, or the generic feedback again.
275
278
  if (navigation.to && earlyNavigation.acceptReplay(navigation.to.url.href)) {
@@ -360,6 +363,7 @@
360
363
  });
361
364
 
362
365
  onNavigate((navigation) => {
366
+ if (navigation.shallow && navigation.type !== 'popstate') return;
363
367
  const destination = navigation.to;
364
368
  if (!destination) return;
365
369
  const owner = controller;
@@ -1,5 +1,5 @@
1
1
  import { type EarlyNavigationCancelReason, type EarlyNavigationHandle } from '@spatial-elements/core/catalog/EarlyNavigationCoordinator';
2
- import type { BeforeNavigate, OnNavigate } from '@sveltejs/kit';
2
+ import type { BeforeNavigate, OnNavigate } from '$app/navigation';
3
3
  import type { VirtualScrollController } from '@spatial-elements/core/stage/VirtualScrollController';
4
4
  interface Props {
5
5
  controller?: VirtualScrollController;
@@ -1,4 +1,4 @@
1
- import type { BeforeNavigate } from '@sveltejs/kit';
1
+ import type { BeforeNavigate } from '$app/navigation';
2
2
  import type { StageExperience } from '@spatial-elements/core/stage/StageExperience';
3
3
  import type { CatalogEndpointRegistry } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
4
4
  import type { EarlyNavigationCancelReason } from '@spatial-elements/core/catalog/EarlyNavigationCoordinator';
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { MenuItem } from '@page-sections/core';
3
3
  import type { Snippet } from 'svelte';
4
+ import { STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame } from '@spatial-elements/core/stage/scrollFrame';
4
5
  import { preventBrowserPinch } from '@spatial-elements/core/stage/browserPinch';
5
6
  import '@page-sections/svelte/styles.css';
6
7
  import { retainDeviceOrientationPermission } from '@spatial-elements/core/catalog/listDeviceOrientation';
@@ -31,6 +32,8 @@
31
32
  dracoDecoderPath?: string;
32
33
  /** Layout contents. ContentPage and SpatialElementPage register their own data. */
33
34
  children?: Snippet;
35
+ /** Document footer; scrolls over the stationary stage in every layout. */
36
+ footer?: Snippet;
34
37
  /** Persistent main-menu content. The shell owns its box and surface. */
35
38
  menu?: Snippet;
36
39
  /** Complete application navigation; the spatial shell supplies positioning and surfaces. */
@@ -46,7 +49,24 @@
46
49
  right?: Snippet;
47
50
  }
48
51
 
49
- let { theme, colorScheme, messages, renderSettings, dracoDecoderPath, children, menu, navigation, items, brand, tools, summary, left, right, deviceOrientation = false }: Props = $props();
52
+ let { theme, colorScheme, messages, renderSettings, dracoDecoderPath, children, footer, menu, navigation, items, brand, tools, summary, left, right, deviceOrientation = false }: Props = $props();
53
+ let shell = $state<HTMLDivElement>();
54
+ let footerHost = $state<HTMLDivElement>();
55
+ $effect(() => {
56
+ const stage = shell?.querySelector<HTMLElement>('.stage');
57
+ if (!stage || !footerHost) return;
58
+ const host = footerHost;
59
+ let previous = 0;
60
+ // Only the footer follows the existing visual wheel smoothing. No stage
61
+ // geometry reads, inherited style writes or canvas displacement are needed.
62
+ const stop = subscribeStageScrollFrame(frame => {
63
+ const offset = stage.classList.contains('stage-virtual-scroll-active') ? frame.targetScrollY - frame.scrollY : 0;
64
+ if (offset === previous) return;
65
+ previous = offset;
66
+ host.style.translate = offset ? `0 ${offset}px` : '';
67
+ }, STAGE_SCROLL_PRIORITY.virtualDocument);
68
+ return () => { stop(); host.style.removeProperty('translate'); };
69
+ });
50
70
  $effect(() => {
51
71
  if (deviceOrientation) return retainDeviceOrientationPermission();
52
72
  });
@@ -58,7 +78,7 @@
58
78
  function attachPinchPolicy(node: HTMLElement) { return { destroy: preventBrowserPinch(node) }; }
59
79
  </script>
60
80
 
61
- <div use:attachPinchPolicy class="brand-stage-shell" style={brandStyle} style:color-scheme={colorScheme} data-color-scheme={colorScheme}>
81
+ <div bind:this={shell} use:attachPinchPolicy class="brand-stage-shell" style={brandStyle} style:color-scheme={colorScheme} data-color-scheme={colorScheme}>
62
82
  <Stage
63
83
  {deviceOrientation}
64
84
  brandId={theme.id}
@@ -72,10 +92,15 @@
72
92
  {#if navigation || menu || items || brand || left || right}<SpatialNavigationShell {navigation} {menu} {items} {brand} {tools} {left} {right} />{/if}
73
93
  <SpatialSummaryHost {summary}>{@render children?.()}</SpatialSummaryHost>
74
94
  </Stage>
95
+ {#if footer}<div bind:this={footerHost} class="spatial-footer">{@render footer()}</div>{/if}
75
96
  <PointerHint />
76
97
  </div>
77
98
 
78
99
  <style>
100
+ :global(:where(.brand-stage-shell) a) { text-decoration: none; text-underline-offset: 0.2em; }
101
+ :global(:where(.brand-stage-shell) a:hover) { text-decoration: underline; }
102
+ :global(.brand-stage-shell .ps-navigation a:hover) { text-decoration: none; }
103
+ .spatial-footer { position: relative; z-index: 31; padding-top: 48px; }
79
104
  .brand-stage-shell {
80
105
  background: var(--spatial-element-background);
81
106
  --spatial-element-content-inline-inset: 192px;
@@ -20,6 +20,8 @@ interface Props {
20
20
  dracoDecoderPath?: string;
21
21
  /** Layout contents. ContentPage and SpatialElementPage register their own data. */
22
22
  children?: Snippet;
23
+ /** Document footer; scrolls over the stationary stage in every layout. */
24
+ footer?: Snippet;
23
25
  /** Persistent main-menu content. The shell owns its box and surface. */
24
26
  menu?: Snippet;
25
27
  /** Complete application navigation; the spatial shell supplies positioning and surfaces. */
@@ -4,7 +4,7 @@
4
4
  import { resolveSpatialThemeRadii } from '@spatial-elements/core/spatial-element/spatialTheme';
5
5
  import SpatialSummarySlot from './SpatialSummarySlot.svelte';
6
6
  import { getContext } from 'svelte';
7
- import { getCssPanelBoxShadow } from '@spatial-elements/core/stage/panelShadow';
7
+ import { getSharedPanelBoxShadow } from '@spatial-elements/core/stage/panelShadow';
8
8
  import { mouseHover } from '@spatial-elements/core/stage/mouseHover';
9
9
  import type { SpatialListItem } from '@spatial-elements/core/spatial-element/types';
10
10
  import { CATALOG_ITEMS, type CatalogItems } from '@spatial-elements/core/catalog/catalogItems';
@@ -190,7 +190,7 @@
190
190
  aria-hidden={interactive && !selected}
191
191
  style:--carousel-panel-opacity={(interactive ? pose.panelOpacity : 1) *
192
192
  (brand.panelTheme.opacity ?? 1)}
193
- style:--carousel-panel-shadow={getCssPanelBoxShadow(brand.panelTheme.shadowIntensity ?? 0.28)}
193
+ style:--carousel-panel-shadow={getSharedPanelBoxShadow(brand.panelTheme.shadowIntensity ?? 0.28, brand.panelTheme.shadowColor)}
194
194
  style:--carousel-panel-tint={typeof brand.panelTheme.tint === 'number'
195
195
  ? '#' + brand.panelTheme.tint.toString(16).padStart(6, '0')
196
196
  : typeof brand.panelTheme.tint === 'object'
@@ -207,7 +207,7 @@
207
207
  <SpatialSummarySlot instanceKey={`carousel:${brand.id}:${occurrence}`}
208
208
  context={{ spatialElement: { id: spatialElement.id, brandId: brand.id, eyebrow: spatialElement.eyebrow, title: spatialElement.title,
209
209
  features: spatialElement.summary?.features ?? spatialElement.features.map((label) => ({ label })), action: spatialElement.summary?.action },
210
- contentInset, heading: 'h3', mode: 'carousel', address,
210
+ contentInset, heading: 'h3', mode: 'carousel', detailHref: href(spatialElement.href), address,
211
211
  carousel: { item: spatialElement, occurrence, compact } }} />
212
212
  </div>
213
213
  </article>
@@ -217,7 +217,7 @@
217
217
  display: block;
218
218
  position: relative;
219
219
  min-width: 0;
220
- height: calc(var(--spatial-carousel-title-reserve) + var(--spatial-carousel-fit-height));
220
+ height: calc(var(--spatial-carousel-panel-reserve) + var(--spatial-carousel-fit-height));
221
221
  min-height: 0;
222
222
  padding: 0;
223
223
  box-sizing: border-box;
@@ -311,12 +311,12 @@
311
311
  .summary {
312
312
  position: absolute;
313
313
  left: var(--spatial-carousel-summary-left);
314
- top: calc(var(--spatial-carousel-title-reserve) - var(--spatial-carousel-compact-height));
314
+ top: calc(var(--spatial-carousel-fit-height) - var(--spatial-carousel-compact-overlap));
315
315
  width: var(--spatial-carousel-summary-width);
316
316
  height: var(--spatial-carousel-compact-height);
317
317
  min-height: 0;
318
318
  margin: 0;
319
- --spatial-carousel-compact-height: 40px;
319
+
320
320
  box-sizing: border-box;
321
321
 
322
322
  border-radius: var(--carousel-panel-radius, 14px);
@@ -329,7 +329,7 @@
329
329
  display: block;
330
330
  visibility: hidden;
331
331
  }
332
- .has-eyebrow { --spatial-carousel-compact-height: 66px; }
332
+
333
333
  [data-carousel-fit-anchor] { position: absolute; left: var(--spatial-carousel-fit-left); top: var(--spatial-carousel-title-reserve); width: var(--spatial-carousel-fit-width); height: var(--spatial-carousel-fit-height); pointer-events: none; }
334
334
  @media (min-width: 840px) {
335
335
  .summary { top: calc(var(--spatial-carousel-fit-height) / 2); height: auto; max-height: var(--spatial-carousel-fit-height); padding: 0; transform: translateY(-50%); }
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { resolve } from '$app/paths';
2
3
  import { setContext, onMount } from 'svelte';
3
4
  import { attachContentSidebars } from './contentSidebars.js';
4
5
  import { ContentPage as PageContent } from '@page-sections/svelte';
@@ -20,11 +21,19 @@
20
21
  /** SpatialCardGridSection, SpatialCarouselSection and ordinary Section children. */
21
22
  children?: Snippet;
22
23
  leftSidebar?: Snippet;
24
+ /** Content after the sections, outside the sticky menu boundary. */
25
+ pageEnd?: Snippet;
26
+ /** @deprecated Use pageEnd. The site footer belongs to BrandStageShell. */
23
27
  footer?: Snippet;
24
28
  showContentMenu?: boolean;
25
29
  contentMenuLabel?: string;
30
+ /** Home destination for the shared breadcrumb; defaults to the application's base route. */
31
+ breadcrumbHomeHref?: string;
32
+ /** Accessible label for the icon-only Home link. */
33
+ breadcrumbHomeLabel?: string;
26
34
  }
27
- let { page, hdr, background, children, leftSidebar, footer, showContentMenu = false, contentMenuLabel }: Props = $props();
35
+ // Libraries cannot assume the consuming application's generated route union.
36
+ let { page, hdr, background, children, leftSidebar, pageEnd, footer, showContentMenu = false, contentMenuLabel, breadcrumbHomeHref = resolve(...(['/'] as unknown as Parameters<typeof resolve>)), breadcrumbHomeLabel }: Props = $props();
28
37
  const backgroundId = $props.id();
29
38
  const backgroundScope = backgroundId.replace(/[^a-zA-Z0-9_-]/g, '_');
30
39
  onMount(() => {
@@ -45,7 +54,7 @@
45
54
  </script>
46
55
 
47
56
  {#if background}<svelte:element this={'style'}>{backgroundRules}</svelte:element>{/if}
48
- <PageContent {page} {leftSidebar} {footer} {showContentMenu} {contentMenuLabel} class="content-page" data-catalog-list data-brand-id={brand.id}
57
+ <PageContent {page} {leftSidebar} pageEnd={pageEnd ?? footer} {showContentMenu} {contentMenuLabel} {breadcrumbHomeHref} {breadcrumbHomeLabel} class="content-page" data-catalog-list data-brand-id={brand.id}
49
58
  data-spatial-content-page={backgroundScope} data-spatial-page-background={background ? backgroundScope : undefined}>
50
59
  {@render children?.()}
51
60
  </PageContent>
@@ -11,9 +11,16 @@ interface Props {
11
11
  /** SpatialCardGridSection, SpatialCarouselSection and ordinary Section children. */
12
12
  children?: Snippet;
13
13
  leftSidebar?: Snippet;
14
+ /** Content after the sections, outside the sticky menu boundary. */
15
+ pageEnd?: Snippet;
16
+ /** @deprecated Use pageEnd. The site footer belongs to BrandStageShell. */
14
17
  footer?: Snippet;
15
18
  showContentMenu?: boolean;
16
19
  contentMenuLabel?: string;
20
+ /** Home destination for the shared breadcrumb; defaults to the application's base route. */
21
+ breadcrumbHomeHref?: string;
22
+ /** Accessible label for the icon-only Home link. */
23
+ breadcrumbHomeLabel?: string;
17
24
  }
18
25
  declare const ContentPage: import("svelte").Component<Props, {}, "">;
19
26
  type ContentPage = ReturnType<typeof ContentPage>;
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
- import ChevronUp from 'lucide-svelte/icons/chevron-up';
3
- import ChevronDown from 'lucide-svelte/icons/chevron-down';
4
- import ChevronLeft from 'lucide-svelte/icons/chevron-left';
5
- import ChevronRight from 'lucide-svelte/icons/chevron-right';
2
+ import ChevronUp from '@lucide/svelte/icons/chevron-up';
3
+ import ChevronDown from '@lucide/svelte/icons/chevron-down';
4
+ import ChevronLeft from '@lucide/svelte/icons/chevron-left';
5
+ import ChevronRight from '@lucide/svelte/icons/chevron-right';
6
6
  let {
7
7
  target,
8
8
  responsive = false,
@@ -52,7 +52,7 @@
52
52
  }
53
53
  </script>
54
54
 
55
- <div class="overflow-controls" class:vertical class:hidden data-overflow-controls={label}>
55
+ <div class="ps-shadow-navigation overflow-controls" class:vertical class:hidden data-overflow-controls={label}>
56
56
  {#if before}<button
57
57
  class="before"
58
58
  type="button"
@@ -95,7 +95,7 @@
95
95
  --scroll-button-radius: var(--spatial-element-control-radius, 12px);
96
96
  background: var(--ps-section-standard, #fff);
97
97
  color: var(--spatial-element-navigation-ink, var(--spatial-element-ink));
98
- box-shadow: 0 2px 8px #0003;
98
+ box-shadow: var(--ps-navigation-shadow, var(--ps-default-navigation-shadow));
99
99
  cursor: pointer;
100
100
  pointer-events: auto;
101
101
  }
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
- import MoveHorizontal from 'lucide-svelte/icons/move-horizontal';
4
- import Search from 'lucide-svelte/icons/search';
5
- import Rotate3D from 'lucide-svelte/icons/rotate-3d';
3
+ import MoveHorizontal from '@lucide/svelte/icons/move-horizontal';
4
+ import Search from '@lucide/svelte/icons/search';
5
+ import Rotate3D from '@lucide/svelte/icons/rotate-3d';
6
6
  import { carouselTextHit } from './carouselTextHit.js';
7
7
  let badge: HTMLDivElement;
8
8
  let action = $state<'move' | 'details' | 'rotate' | undefined>();
@@ -23,7 +23,8 @@
23
23
  text = !dragging ? carouselTextHit(target, x, y) : undefined;
24
24
  text?.setAttribute('data-carousel-text-hit', '');
25
25
  const geometry = target.closest('.spatial-element-target');
26
- action = dragging ? 'move' : text || (buttons & 1) || (!geometry && target.closest('a, button, input, textarea, select, [contenteditable]'))
26
+ const summaryLink = target.closest('[data-spatial-summary-link], .compact-copy');
27
+ action = dragging ? 'move' : text || (buttons & 1) || (!geometry && !summaryLink && target.closest('a, button, input, textarea, select, [contenteditable]'))
27
28
  ? undefined : geometry?.closest('.selected') ? 'details' : 'move';
28
29
  } else {
29
30
  const cursor = target instanceof HTMLCanvasElement ? target.style.cursor : '';
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Section as PageSection } from '@page-sections/svelte';
3
3
  import { getContext, onMount } from 'svelte';
4
- import { dev } from '$app/environment';
4
+ import { dev } from '$app/env';
5
5
  import './layout.generated.css';
6
6
  import { createSectionBackgroundNormalizer } from '@spatial-elements/core/spatial-element/sectionBackground';
7
7
  import type { Snippet } from 'svelte';
@@ -84,7 +84,7 @@
84
84
  >
85
85
  <SpaceMouseIcon />
86
86
  </SpatialIconButton>
87
- <dialog bind:this={dialog} aria-labelledby={`${id}-title`} aria-describedby={`${id}-description`}>
87
+ <dialog class="ps-shadow-popup" bind:this={dialog} aria-labelledby={`${id}-title`} aria-describedby={`${id}-description`}>
88
88
  <h2 id={`${id}-title`}>
89
89
  {failure === 'permission-required'
90
90
  ? copy.spaceMousePermissionTitle
@@ -109,7 +109,7 @@
109
109
  >{/if}
110
110
  </div>
111
111
  </dialog>
112
- <div bind:this={toast} popover="manual" role="status" class="connection-toast">
112
+ <div bind:this={toast} popover="manual" role="status" class="connection-toast ps-shadow-popup">
113
113
  {toastMessage}
114
114
  </div>
115
115
 
@@ -118,12 +118,12 @@
118
118
  .connection-toast {
119
119
  box-sizing: border-box;
120
120
  padding: 24px;
121
- border: 1px solid color-mix(in srgb, var(--spatial-element-ink) 15%, transparent);
121
+ border: 1px solid var(--ps-panel-border);
122
122
  border-radius: var(--spatial-element-panel-radius, 12px);
123
123
  color: var(--spatial-element-ink);
124
124
  background: var(--ps-section-standard, var(--ps-background, #fff));
125
125
  font: inherit;
126
- box-shadow: 0 8px 32px #0003;
126
+ box-shadow: var(--ps-popup-shadow, var(--ps-navigation-shadow, var(--ps-default-navigation-shadow)));
127
127
  max-width: min(440px, calc(100vw - 32px));
128
128
  }
129
129
  dialog::backdrop {
@@ -18,16 +18,15 @@
18
18
  section,
19
19
  list,
20
20
  cardSize = 'm',
21
- cardVariant = 'catalog',
22
- itemSpan = { xs: 4, s: 3, m: 4, l: 4 },
21
+ cardShadow = false,
22
+ itemSpan,
23
23
  textAlign = 'start',
24
24
  mediaAspect = '1/1',
25
- mediaFit = cardVariant === 'catalog' ? 'contain' : 'cover',
25
+ mediaFit = 'contain',
26
26
  cardTone = 'standard'
27
27
  }: Props = $props();
28
28
  const reserveEyebrow = $derived(
29
- (cardVariant !== 'catalog' || cardSize !== 's') &&
30
- list.some((item) => Boolean(item.eyebrow?.trim()))
29
+ cardSize !== 's' && list.some((item) => Boolean(item.eyebrow?.trim()))
31
30
  );
32
31
  let catalog: HTMLDivElement;
33
32
  $effect(() => {
@@ -48,7 +47,7 @@
48
47
  {#snippet card()}<SpatialElementCard
49
48
  {spatialElement}
50
49
  {cardSize}
51
- {cardVariant}
50
+ {cardShadow}
52
51
  {textAlign}
53
52
  {mediaAspect}
54
53
  {mediaFit}
@@ -57,9 +56,7 @@
57
56
  order={index}
58
57
  occurrence={JSON.stringify([section.id, spatialElement.itemKey ?? spatialElement.id])}
59
58
  />{/snippet}
60
- {#if cardVariant === 'editorial'}<ContentBlock span={itemSpan}
61
- >{@render card()}</ContentBlock
62
- >
59
+ {#if itemSpan !== undefined}<ContentBlock span={itemSpan}>{@render card()}</ContentBlock>
63
60
  {:else}{@render card()}{/if}
64
61
  {/each}
65
62
  </ContentGrid>