@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,15 +1,15 @@
1
- import type { CarouselPresentation } from '@spatial-elements/core/catalog/catalogPose';
1
+ import { type CarouselPresentation } from '@spatial-elements/core/catalog/catalogPose';
2
2
  import type { SpatialListItem, SpatialElementSectionDefinition } from '@spatial-elements/core/spatial-element/types';
3
3
  type $$ComponentProps = {
4
4
  section: SpatialElementSectionDefinition;
5
- list: SpatialListItem[];
6
5
  presentation?: CarouselPresentation;
6
+ list: SpatialListItem[];
7
7
  initialItemKey?: string;
8
8
  onselectionchange?: (selection: {
9
9
  itemKey: string;
10
10
  spatialElementId: string;
11
11
  }) => void;
12
12
  };
13
- declare const CarouselSection: import("svelte").Component<$$ComponentProps, {}, "">;
14
- type CarouselSection = ReturnType<typeof CarouselSection>;
15
- export default CarouselSection;
13
+ declare const SpatialCarouselSection: import("svelte").Component<$$ComponentProps, {}, "">;
14
+ type SpatialCarouselSection = ReturnType<typeof SpatialCarouselSection>;
15
+ export default SpatialCarouselSection;
@@ -1,69 +1,16 @@
1
1
  <script lang="ts">
2
- import { resolve } from '$app/paths';
3
- import type { SpatialElementBreadcrumb } from '@spatial-elements/core/spatial-element/types';
4
-
5
- let {
6
- items,
7
- transition = 'enter'
8
- }: { items: SpatialElementBreadcrumb[]; transition?: 'enter' | 'exit' } = $props();
2
+ import { resolve } from '$app/paths';
3
+ import { Breadcrumbs } from '@page-sections/svelte';
4
+ import type { SpatialElementBreadcrumb } from '@spatial-elements/core/spatial-element/types';
5
+ let { items, transition = 'enter' }: { items: SpatialElementBreadcrumb[]; transition?: 'enter' | 'exit' } = $props();
6
+ const resolved = $derived(items.map(item => ({ ...item, href: item.href ? resolve(...([item.href] as unknown as Parameters<typeof resolve>)) : undefined })));
9
7
  </script>
10
-
11
- <nav
12
- class="breadcrumbs"
13
- data-stage-dom-content
14
- aria-label="Breadcrumb"
15
- data-catalog-transition-dom={transition}
16
- >
17
- <ol>
18
- {#each items as item, index (item.label)}
19
- <li>
20
- {#if item.href}
21
- <a href={resolve(...([item.href] as unknown as Parameters<typeof resolve>))}>{item.label}</a>
22
- {:else}
23
- <span aria-current={index === items.length - 1 ? 'page' : undefined}>{item.label}</span>
24
- {/if}
25
- </li>
26
- {/each}
27
- </ol>
28
- </nav>
29
-
8
+ <div class="breadcrumbs spatial-content-width" data-stage-dom-content data-catalog-transition-dom={transition}>
9
+ <Breadcrumbs items={resolved} />
10
+ </div>
30
11
  <style>
31
- .breadcrumbs {
32
- width: calc(100vw - var(--spatial-element-content-inline-inset) - var(--spatial-element-content-inline-inset));
33
- margin: 8px 0 12px calc(50% - 50vw + var(--spatial-element-content-inline-inset));
34
- color: color-mix(in srgb, var(--spatial-element-body) 72%, transparent);
35
- font-size: 13px;
36
- line-height: 16px;
37
- }
38
-
39
- ol {
40
- display: flex;
41
- flex-wrap: wrap;
42
- gap: 0;
43
- margin: 0;
44
- padding: 0;
45
- list-style: none;
46
- }
47
-
48
- li:not(:last-child)::after {
49
- margin-inline: 0.45rem;
50
- content: '/';
51
- }
52
-
53
- a {
54
- color: inherit;
55
- text-decoration: none;
56
- pointer-events: auto;
57
- }
58
-
59
- a:hover {
60
- text-decoration: underline;
61
- }
62
-
63
- @media (max-width: 1100px) {
64
- .breadcrumbs {
65
- width: 100%;
66
- margin-left: 0;
67
- }
68
- }
12
+ .breadcrumbs { height: var(--ps-breadcrumb-height); padding-inline: var(--ps-grid-gap, 12px); box-sizing: border-box; pointer-events: auto; overflow-x: auto; scrollbar-width: none; direction: rtl; }
13
+ .breadcrumbs :global(nav) { direction: ltr; width: max-content; min-width: 100%; height: 100%; }
14
+ .breadcrumbs :global(ol) { flex-wrap: nowrap; }
15
+ .breadcrumbs :global(li) { white-space: nowrap; }
69
16
  </style>
@@ -1,256 +1,72 @@
1
1
  <script lang="ts">
2
+ import type {
3
+ CardMediaAspect,
4
+ CardMediaFit,
5
+ CardVariant,
6
+ SurfaceTone
7
+ } from '@page-sections/core';
2
8
  import { getContext } from 'svelte';
3
- import { useSpatialTheme } from './brandContext.js';
4
- import type { SpatialListItem } from '@spatial-elements/core/spatial-element/types';
5
- import { createCatalogEndpointAction } from '../catalog/catalogEndpointAction.js';
6
- import {
7
- CATALOG_ENDPOINTS,
8
- type CatalogEndpointRegistry
9
- } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
10
9
  import { CATALOG_ITEMS, type CatalogItems } from '@spatial-elements/core/catalog/catalogItems';
11
- import { CATALOG_SECTIONS, type CatalogSections } from '@spatial-elements/core/catalog/CatalogSections';
12
- import { useCatalogNavigation } from '../catalog/catalogNavigation.js';
10
+ import type { SpatialListItem } from '@spatial-elements/core/spatial-element/types';
11
+ import { type SpatialCardSize } from '@spatial-elements/core/spatial-element/responsiveLayout';
12
+ import { useSpatialTheme } from './brandContext.js';
13
+ import SpatialCardSlot from './SpatialCardSlot.svelte';
13
14
  let {
14
15
  spatialElement,
15
16
  occurrence,
16
- order = 0
17
- }: { spatialElement: SpatialListItem; occurrence: string; order?: number } = $props();
18
- const brand = useSpatialTheme();
19
- const catalogEndpoint = createCatalogEndpointAction();
20
- const endpoints = getContext<CatalogEndpointRegistry | undefined>(CATALOG_ENDPOINTS);
17
+ order = 0,
18
+ cardSize = 'm',
19
+ textAlign = 'start',
20
+ mediaAspect = '1/1',
21
+ mediaFit = 'contain',
22
+ reserveEyebrow = false,
23
+ cardTone = 'standard',
24
+ cardVariant = 'catalog'
25
+ }: {
26
+ spatialElement: SpatialListItem;
27
+ occurrence: string;
28
+ order?: number;
29
+ cardSize?: SpatialCardSize;
30
+ textAlign?: 'start' | 'center';
31
+ mediaAspect?: CardMediaAspect;
32
+ mediaFit?: CardMediaFit;
33
+ reserveEyebrow?: boolean;
34
+ cardTone?: SurfaceTone;
35
+ cardVariant?: CardVariant;
36
+ } = $props();
21
37
  const items = getContext<CatalogItems | undefined>(CATALOG_ITEMS);
22
- const sections = getContext<CatalogSections | undefined>(CATALOG_SECTIONS);
23
- const { href, prepare, pending } = useCatalogNavigation();
24
- const resolve = href;
25
- let busySpatialElement = $state<string>();
38
+ const readTheme = useSpatialTheme();
39
+ const brand = $derived(readTheme());
40
+ // Asset/catalog membership follows the route; a retained visual island never adds an old page again.
26
41
  $effect(() => items?.register({ ...spatialElement, occurrence }));
27
- $effect(() => {
28
- const target = pending();
29
- busySpatialElement = undefined;
30
- if (!target || new URL(href(spatialElement.href), target).pathname !== target.pathname) return;
31
- const timer = setTimeout(() => (busySpatialElement = spatialElement.id), 150);
32
- return () => clearTimeout(timer);
33
- });
34
42
  </script>
35
43
 
36
- <a
37
- use:catalogEndpoint={{
38
- brandId: brand.id,
39
- spatialElementId: spatialElement.id,
40
- slot: 'catalog.card',
41
- occurrence,
42
- role: 'container'
43
- }}
44
- class="spatial-element-card"
45
- href={resolve(spatialElement.href)}
46
- onpointerenter={() => prepare(spatialElement)}
47
- onfocus={(event) => {
48
- if (!event.currentTarget.hasAttribute('data-catalog-restoring-focus')) prepare(spatialElement);
49
- }}
50
- onpointerdown={() => prepare(spatialElement)}
51
- onclick={(event) => {
52
- endpoints?.prefer(brand.id, spatialElement.id, occurrence);
53
- sections?.activate({
54
- brandId: brand.id,
55
- spatialElementId: spatialElement.id,
56
- occurrence,
57
- slot: 'catalog.card'
58
- });
59
- // Touch activation need not focus links natively; record the same history origin as keyboard use.
60
- event.currentTarget.focus({ preventScroll: true });
61
- }}
62
- aria-busy={busySpatialElement === spatialElement.id ? true : undefined}
63
- data-catalog-card
64
- data-catalog-order={order}
65
- data-catalog-occurrence={occurrence}
66
- data-spatial-element-id={spatialElement.id}
67
- data-catalog-focus-key={`catalog:${JSON.stringify([brand.id, spatialElement.id, occurrence])}`}
68
- aria-labelledby={`catalog-spatial-element-${encodeURIComponent(occurrence)}`}
44
+ <div
45
+ class="spatial-card-placement"
46
+ data-ps-card-size={cardVariant === 'catalog' ? cardSize : undefined}
69
47
  >
70
- {#if busySpatialElement === spatialElement.id}
71
- <span class="catalog-loading" aria-hidden="true"></span>
72
- {/if}
73
- <div
74
- class="spatial-element-card-surface"
75
- style:--card-panel-tint={typeof brand.panelTheme.tint === 'number'
76
- ? '#' + brand.panelTheme.tint.toString(16).padStart(6, '0')
77
- : typeof brand.panelTheme.tint === 'object'
78
- ? brand.panelTheme.tint.getStyle()
79
- : (brand.panelTheme.tint ?? '#ffffff')}
80
- style:--card-panel-tint-opacity={Math.min(
81
- 1,
82
- Math.max(0, brand.panelTheme.tintOpacity ?? 0.28)
83
- ) *
84
- 100 +
85
- '%'}
86
- use:catalogEndpoint={{
87
- brandId: brand.id,
88
- spatialElementId: spatialElement.id,
89
- slot: 'catalog.card',
90
- occurrence,
91
- role: 'summary-surface'
92
- }}
93
- data-shared-role="summary-surface"
94
- data-spatial-element-id={spatialElement.id}
95
- aria-hidden="true"
96
- ></div>
97
- <div
98
- class="spatial-element-card-geometry"
99
- use:catalogEndpoint={{
100
- brandId: brand.id,
101
- spatialElementId: spatialElement.id,
102
- slot: 'catalog.card',
48
+ <SpatialCardSlot
49
+ instanceKey={`card:${brand.id}:${occurrence}`}
50
+ context={{
51
+ spatialElement,
103
52
  occurrence,
104
- role: 'geometry'
53
+ order,
54
+ cardSize,
55
+ textAlign,
56
+ mediaAspect,
57
+ mediaFit,
58
+ reserveEyebrow,
59
+ cardTone,
60
+ cardVariant
105
61
  }}
106
- data-catalog-geometry
107
- data-catalog-occurrence={occurrence}
108
- data-spatial-element-id={spatialElement.id}
109
- data-catalog-slot="catalog.card"
110
- >
111
- {#if spatialElement.stage?.fallbackImage}
112
- <img
113
- class="catalog-poster"
114
- data-catalog-poster
115
- loading="lazy"
116
- decoding="async"
117
- src={spatialElement.stage.fallbackImage}
118
- alt={`${brand.name} ${spatialElement.title}`}
119
- />
120
- {/if}
121
- </div>
122
- <div class="spatial-element-card-copy">
123
- <p
124
- class="spatial-element-card-eyebrow"
125
- data-shared-role="eyebrow"
126
- data-spatial-element-id={spatialElement.id}
127
- use:catalogEndpoint={{
128
- brandId: brand.id,
129
- spatialElementId: spatialElement.id,
130
- slot: 'catalog.card',
131
- occurrence,
132
- role: 'eyebrow'
133
- }}
134
- >
135
- {spatialElement.eyebrow}
136
- </p>
137
- <h3
138
- use:catalogEndpoint={{
139
- brandId: brand.id,
140
- spatialElementId: spatialElement.id,
141
- slot: 'catalog.card',
142
- occurrence,
143
- role: 'title'
144
- }}
145
- id={`catalog-spatial-element-${encodeURIComponent(occurrence)}`}
146
- data-shared-role="title"
147
- data-spatial-element-id={spatialElement.id}
148
- >
149
- {spatialElement.title}
150
- </h3>
151
- </div>
152
- </a>
153
- <span class="catalog-status" role="status">{busySpatialElement ? 'Opening spatialElement…' : ''}</span>
62
+ />
63
+ </div>
154
64
 
155
65
  <style>
156
- .spatial-element-card-eyebrow {
157
- margin: 0;
158
- color: var(--spatial-element-accent);
159
- font-size: 13px;
160
- font-weight: 720;
161
- letter-spacing: 0.04em;
162
- text-transform: uppercase;
163
- }
164
- .catalog-loading {
165
- position: absolute;
166
- right: 14px;
167
- top: 14px;
168
- width: 18px;
169
- height: 18px;
170
- border: 2px solid color-mix(in srgb, var(--spatial-element-accent) 20%, transparent);
171
- border-top-color: var(--spatial-element-accent);
172
- border-radius: 50%;
173
- animation: catalog-loading-spin 0.8s linear infinite;
174
- }
175
- .catalog-status {
176
- position: absolute;
177
- width: 1px;
178
- height: 1px;
179
- overflow: hidden;
180
- clip-path: inset(50%);
181
- }
182
- @keyframes catalog-loading-spin {
183
- to {
184
- transform: rotate(360deg);
185
- }
186
- }
187
-
188
- .spatial-element-card {
189
- position: relative;
190
- display: block;
191
- box-sizing: border-box;
66
+ .spatial-card-placement {
67
+ grid-column: span var(--ps-card-span, 1);
192
68
  min-width: 0;
193
- max-width: 360px;
194
- border-radius: var(--spatial-element-panel-radius, 12px);
195
- color: var(--spatial-element-ink);
196
- text-decoration: none;
197
- transform-origin: center;
198
- transform: perspective(1000px) translate3d(0, var(--catalog-lift, 0px), 0)
199
- rotateX(var(--catalog-rotate-x, 0deg)) rotateY(var(--catalog-rotate-y, 0deg));
200
- }
201
-
202
- .spatial-element-card:focus-visible {
203
- outline: 3px solid var(--spatial-element-accent);
204
- outline-offset: 5px;
205
- }
206
-
207
- .spatial-element-card-surface {
208
- position: absolute;
209
- inset: 0;
210
- z-index: -1;
211
- border: 1px solid color-mix(in srgb, var(--spatial-element-ink) 12%, transparent);
212
- border-radius: inherit;
213
- background: color-mix(
214
- in srgb,
215
- var(--card-panel-tint) var(--card-panel-tint-opacity),
216
- transparent
217
- );
218
- box-shadow: 0 12px 32px rgb(0 0 0 / 0.06);
219
- pointer-events: none;
220
- }
221
-
222
- .spatial-element-card-geometry {
223
- position: relative;
224
- height: 228px;
225
- margin: 12px 12px 0;
226
- pointer-events: none;
227
- }
228
-
229
- .catalog-poster {
230
- display: block;
231
- width: 100%;
232
- height: 100%;
233
- object-fit: contain;
234
- }
235
-
236
- .spatial-element-card:global([data-catalog-model-ready]) .catalog-poster {
237
- opacity: 0;
238
- }
239
-
240
- .spatial-element-card-copy {
241
- padding: 14px 22px 24px;
242
- }
243
-
244
- h3 {
245
- margin: 8px 0 0;
246
- font-size: 21px;
247
- font-weight: 720;
248
- line-height: 1.24;
249
- }
250
-
251
- @media (prefers-reduced-motion: reduce) {
252
- .spatial-element-card {
253
- transform: none;
254
- }
69
+ min-height: 0;
70
+ transform-style: preserve-3d;
255
71
  }
256
72
  </style>
@@ -1,8 +1,17 @@
1
+ import type { CardMediaAspect, CardMediaFit, CardVariant, SurfaceTone } from '@page-sections/core';
1
2
  import type { SpatialListItem } from '@spatial-elements/core/spatial-element/types';
3
+ import { type SpatialCardSize } from '@spatial-elements/core/spatial-element/responsiveLayout';
2
4
  type $$ComponentProps = {
3
5
  spatialElement: SpatialListItem;
4
6
  occurrence: string;
5
7
  order?: number;
8
+ cardSize?: SpatialCardSize;
9
+ textAlign?: 'start' | 'center';
10
+ mediaAspect?: CardMediaAspect;
11
+ mediaFit?: CardMediaFit;
12
+ reserveEyebrow?: boolean;
13
+ cardTone?: SurfaceTone;
14
+ cardVariant?: CardVariant;
6
15
  };
7
16
  declare const SpatialElementCard: import("svelte").Component<$$ComponentProps, {}, "">;
8
17
  type SpatialElementCard = ReturnType<typeof SpatialElementCard>;