@spatial-elements/sveltekit 1.0.0-beta.11 → 1.0.0-beta.12

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.
@@ -24,27 +24,36 @@
24
24
  let toast: HTMLDivElement;
25
25
  let failure = $state<'permission-required' | 'unavailable'>('unavailable');
26
26
  let requested = $state(false);
27
+ let toastMessage = $state('');
27
28
  let toastTimer: ReturnType<typeof setTimeout> | undefined;
29
+ function showToast(message: string) {
30
+ toastMessage = message;
31
+ toast.showPopover();
32
+ clearTimeout(toastTimer);
33
+ toastTimer = setTimeout(() => toast.hidePopover(), 3500);
34
+ }
28
35
 
29
36
  function connect() {
30
37
  dialog.close();
38
+ toast.hidePopover();
39
+ clearTimeout(toastTimer);
31
40
  requested = true;
32
41
  stage.setSpaceMouseEnabled?.(true);
33
42
  }
34
43
  function toggle() {
35
44
  if (connected || connecting) {
45
+ const cancelled = connecting;
36
46
  requested = false;
37
47
  toast.hidePopover();
38
48
  stage.setSpaceMouseEnabled?.(false);
49
+ if (cancelled) showToast(copy.spaceMouseCancelled);
39
50
  } else connect();
40
51
  }
41
52
  $effect(() => {
42
53
  if (!requested) return;
43
54
  if (connectionState === 'connected') {
44
55
  requested = false;
45
- toast.showPopover();
46
- clearTimeout(toastTimer);
47
- toastTimer = setTimeout(() => toast.hidePopover(), 3500);
56
+ showToast(copy.spaceMouseReady);
48
57
  } else if (connectionState === 'permission-required' || connectionState === 'unavailable') {
49
58
  requested = false;
50
59
  failure = connectionState;
@@ -101,7 +110,7 @@
101
110
  </div>
102
111
  </dialog>
103
112
  <div bind:this={toast} popover="manual" role="status" class="connection-toast">
104
- {copy.spaceMouseReady}
113
+ {toastMessage}
105
114
  </div>
106
115
 
107
116
  <style>
@@ -1,11 +1,35 @@
1
1
  <script lang="ts">
2
2
  import { resolve } from '$app/paths';
3
3
  import { Breadcrumbs } from '@page-sections/svelte';
4
+ import { getContext, onMount } from 'svelte';
5
+ import { STAGE_CONTEXT_KEY, type StageContext } from '@spatial-elements/core/stage/panelContext';
6
+ import { getPanelFocusProgress } from '@spatial-elements/core/stage/panelFocusMath';
4
7
  import type { SpatialElementBreadcrumb } from '@spatial-elements/core/spatial-element/types';
5
- let { items, transition = 'enter' }: { items: SpatialElementBreadcrumb[]; transition?: 'enter' | 'exit' } = $props();
8
+ let { items, transition = 'enter', focusReactive = true }: { items: SpatialElementBreadcrumb[]; transition?: 'enter' | 'exit'; focusReactive?: boolean } = $props();
9
+ const stage = getContext<StageContext | undefined>(STAGE_CONTEXT_KEY);
10
+ const focus = $derived(focusReactive ? getPanelFocusProgress(stage?.getZoomUiFocus?.() ?? 0) : 0);
11
+ let element: HTMLDivElement;
12
+ let menu = $state<HTMLElement>();
13
+ let menuSize = $state({ width: 0, height: 0 });
14
+ onMount(() => {
15
+ menu = element.closest('.stage')?.querySelector<HTMLElement>('[data-spatial-shell-menu]') ?? undefined;
16
+ if (!menu) return;
17
+ const measure = () => { menuSize = { width: menu!.offsetWidth, height: menu!.offsetHeight }; };
18
+ measure();
19
+ const observer = new ResizeObserver(measure); observer.observe(menu);
20
+ return () => observer.disconnect();
21
+ });
22
+ const travel = $derived.by(() => {
23
+ if (!focus) return '0px 0px';
24
+ if (!menu) return `0px ${-112 * focus}px`;
25
+ // The native shell receives the exact GPU projection in the same frame.
26
+ // Follow its lower-left corner, including perspective expansion.
27
+ const matrix = new DOMMatrixReadOnly(menu.style.transform || undefined);
28
+ return `${matrix.m41 - menuSize.width * (matrix.a - 1) / 2}px ${matrix.m42 + menuSize.height * (matrix.d - 1) / 2}px`;
29
+ });
6
30
  const resolved = $derived(items.map(item => ({ ...item, href: item.href ? resolve(...([item.href] as unknown as Parameters<typeof resolve>)) : undefined })));
7
31
  </script>
8
- <div class="breadcrumbs spatial-content-width" data-stage-dom-content data-catalog-transition-dom={transition}>
32
+ <div bind:this={element} class="breadcrumbs spatial-content-width" style:translate={travel} data-stage-dom-content data-catalog-transition-dom={transition}>
9
33
  <Breadcrumbs items={resolved} />
10
34
  </div>
11
35
  <style>
@@ -2,6 +2,7 @@ import type { SpatialElementBreadcrumb } from '@spatial-elements/core/spatial-el
2
2
  type $$ComponentProps = {
3
3
  items: SpatialElementBreadcrumb[];
4
4
  transition?: 'enter' | 'exit';
5
+ focusReactive?: boolean;
5
6
  };
6
7
  declare const SpatialElementBreadcrumbs: import("svelte").Component<$$ComponentProps, {}, "">;
7
8
  type SpatialElementBreadcrumbs = ReturnType<typeof SpatialElementBreadcrumbs>;
@@ -63,13 +63,15 @@
63
63
  });
64
64
  onMount(() => {
65
65
  const element = rail!;
66
- const minimapFrame = element.querySelector<HTMLElement>('[data-spatial-element-dock-minimap-anchor] .stage-panel-fallback');
67
- const updateDock = () => { minimapDocked = Number(minimapFrame?.dataset.stageMinimapDockProgress ?? 0) > 0; };
66
+ const root = element.closest('[data-spatial-element-root]');
67
+ const updateDock = () => { minimapDocked = root?.hasAttribute('data-spatial-element-dock-active') ?? false; };
68
68
  window.addEventListener(STAGE_PANEL_VISUAL_EVENT, updateDock);
69
+ window.addEventListener(STAGE_PANEL_LAYOUT_EVENT, updateDock);
69
70
  updateDock();
70
71
  element.addEventListener('scroll', refreshProjection, { passive: true });
71
72
  return () => {
72
73
  window.removeEventListener(STAGE_PANEL_VISUAL_EVENT, updateDock);
74
+ window.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, updateDock);
73
75
  element.removeEventListener('scroll', refreshProjection);
74
76
  cancelAnimationFrame(refreshFrame);
75
77
  };
@@ -88,6 +90,7 @@
88
90
  <aside
89
91
  bind:this={rail}
90
92
  class="spatial-element-rail"
93
+ class:focused
91
94
  data-spatial-element-media-rail
92
95
  aria-label="Product media"
93
96
  >
@@ -220,6 +223,11 @@
220
223
  .spatial-element-rail::-webkit-scrollbar {
221
224
  display: none;
222
225
  }
226
+ @media (width < 840px) {
227
+ /* Let the row travel down with the summary; keep off-rail thumbnails
228
+ * clipped horizontally while removing the stationary vertical cut-off. */
229
+ .spatial-element-rail.focused { overflow: visible; clip-path: inset(-100vh 0 -100vh 0); }
230
+ }
223
231
 
224
232
  .spatial-element-media-anchor {
225
233
  width: 100%;
@@ -2,6 +2,8 @@
2
2
  import { getContext, onMount, setContext } from 'svelte';
3
3
  import ShoppingCart from 'lucide-svelte/icons/shopping-cart';
4
4
  import { SpatialElementPaneController } from '@spatial-elements/core/spatial-element/SpatialElementPaneController';
5
+ import { SpatialElementHeaderFields } from '@spatial-elements/core/spatial-element/SpatialElementHeaderFields';
6
+ import './headerFields.css';
5
7
  import { resolveActiveDetailSection } from '@spatial-elements/core/spatial-element/activeDetailSection';
6
8
  import { resolveDetailLayout } from '@spatial-elements/core/spatial-element/responsiveLayout';
7
9
  import {
@@ -140,6 +142,8 @@
140
142
  }
141
143
 
142
144
  onMount(() => {
145
+ const headerFields = new SpatialElementHeaderFields(mainElement);
146
+ headerFields.start();
143
147
  const orderSections = () => sectionRegistry.order([...mainElement.querySelectorAll<HTMLElement>('[data-ps-section]')].map(node => node.id));
144
148
  const sectionOrder = new MutationObserver(orderSections);
145
149
  sectionOrder.observe(mainElement, { childList: true, subtree: true });
@@ -174,6 +178,7 @@
174
178
  scheduleScrollSpy();
175
179
 
176
180
  return () => {
181
+ headerFields.destroy();
177
182
  sectionOrder.disconnect();
178
183
  unregisterMedia?.();
179
184
  paneController?.destroy();
@@ -203,14 +208,16 @@
203
208
  style:--spatial-pane-tint-opacity={`${Math.min(1, Math.max(0, brand.panelTheme.tintOpacity ?? 0.28)) * 100}%`}
204
209
  style:--spatial-pane-blur={`${Math.min(100, Math.max(0, brand.panelTheme.backdropBlur ?? 5))}px`}
205
210
  >
206
- <div class="spatial-element-pane-heading" data-spatial-detail-pane-header data-spatial-detail-fixed>
207
- <SpatialElementBreadcrumbs items={spatialElement.breadcrumbs} />
211
+ <div class="spatial-element-pane-heading" data-spatial-detail-pane-header data-spatial-detail-fixed data-spatial-element-handoff-header>
212
+ <SpatialElementBreadcrumbs items={spatialElement.breadcrumbs} focusReactive={!splitPane} />
208
213
  <div class="spatial-element-pane-title-row">
214
+ <div class="spatial-element-pane-copy">
209
215
  <p class="spatial-element-pane-title">{spatialElement.title}</p>
210
216
  {#if spatialElement.eyebrow}<p class="spatial-element-pane-eyebrow">{spatialElement.eyebrow}</p>{/if}
211
- {@render headerDetails?.()}
217
+ </div>
218
+ {#if headerDetails}<div class="spatial-element-pane-order">{@render headerDetails()}</div>{/if}
212
219
  {#if spatialElement.action}
213
- <button type="button" class="spatial-element-pane-action" onclick={invokePaneAction}
220
+ <button type="button" class="spatial-element-pane-action" data-spatial-element-dock-action onclick={invokePaneAction}
214
221
  aria-label={spatialElement.action.ariaLabel ?? spatialElement.action.label}>
215
222
  {#if actionIcon}{@render actionIcon()}{:else}<ShoppingCart size={24} aria-hidden="true" />{/if}
216
223
  </button>
@@ -319,6 +326,7 @@
319
326
  background: transparent;
320
327
  pointer-events: none;
321
328
  }
329
+ @media (width < 840px) { .spatial-element-content { padding-top: 12px; } }
322
330
  @media (min-width: 840px) {
323
331
  .spatial-element-hero { height: var(--spatial-detail-fit-height); }
324
332
  .spatial-element-content { padding-top: 8px; }
@@ -1,3 +1,4 @@
1
+ import './headerFields.css';
1
2
  import type { Snippet } from 'svelte';
2
3
  import './layout.generated.css';
3
4
  import type { SpatialElementData } from '@spatial-elements/core/spatial-element/types';
@@ -28,6 +28,7 @@
28
28
  <header
29
29
  class="spatial-element-sticky-header"
30
30
  data-spatial-element-sticky-header
31
+ data-spatial-element-handoff-header
31
32
  data-catalog-transition-dom="enter"
32
33
  aria-label="Current element"
33
34
  aria-hidden="true"
@@ -152,7 +153,7 @@
152
153
  width: 100%;
153
154
  height: var(--spatial-detail-dock-height);
154
155
  border: 0;
155
- border-radius: var(--spatial-element-panel-radius);
156
+ border-radius: 0;
156
157
  visibility: hidden;
157
158
  background: transparent;
158
159
  box-shadow: none;
@@ -272,7 +273,7 @@
272
273
  z-index: 1;
273
274
  }
274
275
 
275
- .sticky-header-content { display: flex; align-items: center; gap: 16px; min-width: 0; }
276
+ .sticky-header-content { container: spatial-header / inline-size; display: flex; align-items: center; gap: 16px; min-width: 0; }
276
277
  .sticky-header-details { flex: none; }
277
278
  .sticky-header-copy {
278
279
  flex: 1;
@@ -306,7 +307,6 @@
306
307
  }
307
308
 
308
309
  .sticky-header-action {
309
- visibility: hidden;
310
310
  display: grid;
311
311
  place-items: center;
312
312
  width: 54px;
@@ -319,12 +319,11 @@
319
319
  text-decoration: none;
320
320
  cursor: pointer;
321
321
  }
322
- .spatial-element-sticky-header:global([data-action-active]) .sticky-header-action { visibility: visible; }
323
322
 
323
+ @media (1600px <= width < 2300px) {
324
+ .spatial-element-sticky-header { border-radius: 0 0 var(--spatial-element-panel-radius) var(--spatial-element-panel-radius); }
325
+ }
324
326
  @media (width < 840px) {
325
- .sticky-header-content.has-details { display: grid; gap: 2px; }
326
- .has-details .sticky-header-kicker { display: none; }
327
- .has-details .sticky-header-title { font-size: 14px; line-height: 18px; }
328
327
  .sticky-header-layout {
329
328
  gap: 8px;
330
329
  padding-right: 8px;
@@ -332,4 +331,13 @@
332
331
  .sticky-header-title { font-size: 18px; line-height: 24px; }
333
332
  .spatial-element-sticky-tabs { display: none; }
334
333
  }
334
+ @container spatial-header (max-width: 479px) {
335
+ .sticky-header-details :global([data-spatial-element-header-field='quantity']) { display: none; }
336
+ }
337
+ @container spatial-header (max-width: 359px) {
338
+ .sticky-header-details { display: none; }
339
+ }
340
+ @media (width < 600px) {
341
+ .sticky-header-details { display: none; }
342
+ }
335
343
  </style>
@@ -19,7 +19,7 @@
19
19
  const catalogEndpoint = createCatalogEndpointAction();
20
20
  </script>
21
21
  <div bind:this={element} class="summary-presentation">
22
- {#if leading}<div use:catalogEndpoint={address('leading')}
22
+ {#if leading}<div class="summary-leading" use:catalogEndpoint={address('leading')}
23
23
  data-catalog-rich-shared="leading" data-catalog-semantic={spatialElement.id}>
24
24
  {@render leading()}
25
25
  </div>{/if}
@@ -62,6 +62,7 @@
62
62
  {/each}
63
63
  </ul>{/if}
64
64
 
65
+ {#if beforeAction || spatialElement.action}<div class="summary-commerce">
65
66
  {#if beforeAction}<div use:catalogEndpoint={address('action-details')}
66
67
  data-catalog-rich-shared="action-details" data-catalog-semantic={spatialElement.id}>
67
68
  {@render beforeAction()}
@@ -108,6 +109,7 @@
108
109
  </button>
109
110
  {/if}
110
111
  {/if}
112
+ </div>{/if}
111
113
  </div>
112
114
  <style>
113
115
  .summary-presentation {
@@ -127,6 +129,8 @@
127
129
  font-weight: 780;
128
130
  line-height: 1.16;
129
131
  }
132
+ .summary-commerce { display: grid; gap: 20px; min-width: 0; align-content: start; }
133
+ .summary-leading, .panel-copy { min-width: 0; }
130
134
 
131
135
  .panel-kicker {
132
136
  margin: 0;
@@ -194,5 +198,15 @@
194
198
  white-space: normal;
195
199
  }
196
200
  @container spatial-summary (min-width: 420px) { .summary-title { font-size: 32px; } }
201
+ @container spatial-summary (min-width: 500px) {
202
+ .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
203
+ .summary-commerce { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
204
+ }
205
+ @container spatial-summary (min-width: 900px) {
206
+ .summary-presentation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
207
+ .summary-leading, .panel-copy { grid-column: 1 / -1; }
208
+ .feature-list { grid-column: span 2; }
209
+ .summary-commerce { grid-column: 3; grid-template-columns: minmax(0, 1fr); }
210
+ }
197
211
 
198
212
  </style>
@@ -19,10 +19,12 @@
19
19
  // sync using untransformed content size, including wrapping and font loads.
20
20
  // Explicit ownership transfers finish their reflow before revealing pixels.
21
21
  // offsetHeight is untransformed, unlike the projected CSS3D bounding box.
22
- const measureTransfer = () => { panelHeight = presentation.offsetHeight + contentInset * 2; };
22
+ const measureTransfer = () => { if (!presentation.getClientRects().length) return; panelHeight = presentation.offsetHeight + contentInset * 2; };
23
23
  measureTransfer();
24
24
  presentation.addEventListener('spatial-summary-measure', measureTransfer);
25
25
  const observer = new ResizeObserver(([entry]) => {
26
+ // CSS3D culling sets display:none; this is not a content resize.
27
+ if (!presentation.getClientRects().length) return;
26
28
  const height = entry.borderBoxSize?.[0]?.blockSize ?? presentation.offsetHeight;
27
29
  panelHeight = Math.ceil(height + contentInset * 2);
28
30
  });
@@ -61,6 +61,13 @@
61
61
  background: color-mix(in srgb, var(--spatial-element-body) 8%, transparent);
62
62
  }
63
63
  .spatial-icon-button[aria-pressed="true"] { color: var(--spatial-element-accent); background: var(--ps-selection, var(--ps-section-muted, #eeeeee)); }
64
+ /* Busy remains operable so a pending device search can be cancelled. */
65
+ .spatial-icon-button[aria-busy="true"] { color: var(--spatial-element-accent); background: var(--ps-selection, var(--ps-section-muted, #eeeeee)); }
66
+ .spatial-icon-button[aria-busy="true"] :global(svg) { animation: searching 1.2s ease-in-out infinite; }
67
+ @keyframes searching { 50% { opacity: 0.35; } }
64
68
  .spatial-icon-button:focus-visible { outline: 2px solid var(--spatial-element-accent); outline-offset: 3px; }
65
- @media (prefers-reduced-motion: reduce) { .spatial-icon-button { transition: none; } }
69
+ @media (prefers-reduced-motion: reduce) {
70
+ .spatial-icon-button { transition: none; }
71
+ .spatial-icon-button[aria-busy="true"] :global(svg) { animation: none; opacity: 0.6; }
72
+ }
66
73
  </style>
@@ -15,13 +15,14 @@
15
15
  const stageContext = getContext<StageContext | undefined>(STAGE_CONTEXT_KEY);
16
16
  const readTheme = useSpatialTheme();
17
17
  const theme = $derived(readTheme());
18
- $effect(() => { void theme; void fixedDetail; stageContext?.updatePanelAppearance?.(); });
18
+ $effect(() => { void theme; void fixedDetail; void edgeToEdge; stageContext?.updatePanelAppearance?.(); });
19
19
  const radii = $derived(resolveSpatialThemeRadii(theme));
20
20
  let rack: HTMLDivElement;
21
21
  let stage: HTMLElement | undefined;
22
22
  let enhancedScroll = false;
23
23
  let satellitesVisible = false;
24
24
  let fixedDetail = $state(false);
25
+ let edgeToEdge = $state(true);
25
26
 
26
27
  function position(scrollY = getStageVisualScrollPosition().scrollY) {
27
28
  if (!rack) return;
@@ -36,6 +37,7 @@
36
37
  const previousMode = `${enhancedScroll}/${fixedDetail}`;
37
38
  enhancedScroll = stage.classList.contains('stage-virtual-scroll-active');
38
39
  satellitesVisible = window.innerWidth >= layoutTokens.layoutMinWidths.xl;
40
+ edgeToEdge = !satellitesVisible;
39
41
  fixedDetail = getComputedStyle(rack).getPropertyValue('--spatial-shell-fixed').trim() === '1';
40
42
  position();
41
43
  if (previousMode !== `${enhancedScroll}/${fixedDetail}`) window.dispatchEvent(new Event(STAGE_PANEL_LAYOUT_EVENT));
@@ -99,7 +101,7 @@
99
101
  getMinimapModelScale: () => 1, getMinimapModelTop: () => undefined,
100
102
  getSurface: () => theme.panelTheme.surface ?? 'frosted',
101
103
  getSurfaceOpacity: () => 1,
102
- getOptions: () => ({ ...theme.panelTheme, radius: role === 'menu' ? radii.panel : radii.control })
104
+ getOptions: () => ({ ...theme.panelTheme, radius: role === 'menu' ? (edgeToEdge ? 0 : radii.panel) : radii.control })
103
105
  });
104
106
  });
105
107
  const stop = subscribeStageScrollFrame(frame => position(frame.scrollY), STAGE_SCROLL_PRIORITY.virtualDocument + 1);
@@ -135,4 +137,5 @@
135
137
  .spatial-shell-rack :global(.satellite) { border-radius: var(--spatial-element-control-radius); }
136
138
  :global(.stage-virtual-scroll-active) .spatial-shell-rack { position: relative; transform: translateY(var(--spatial-shell-scroll-compensation, 0px)); }
137
139
  [data-spatial-navigation-glass] :global([data-stage-panel-bound]) { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
140
+ @media (width < 1600px) { .spatial-shell-rack :global(.header) { border-radius: 0; } }
138
141
  </style>
@@ -64,9 +64,9 @@
64
64
  .spatial-summary-surface[hidden] { display: none; }
65
65
  :global([data-carousel-glass-ready]) .spatial-summary-surface,
66
66
  :global([data-spatial-presentation-glass]) .spatial-summary-surface { visibility: hidden; }
67
- .compact-copy { position: relative; padding-right: 44px; }
67
+ .compact-copy { position: relative; box-sizing: border-box; padding: 8px 52px 8px 12px; }
68
68
  .compact-copy p { height: 26px; margin: 0; font-size: 12px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
69
- .compact-copy h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; height: 40px; margin: 0; overflow: hidden; font-size: 18px; line-height: 20px; }
69
+ .compact-copy h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 1; height: 24px; margin: 0; overflow: hidden; font-size: 18px; line-height: 24px; }
70
70
  .full-summary, .section-information { display: none; }
71
71
  .information { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 40px; height: 40px; margin: 0; color: var(--spatial-element-accent); pointer-events: auto; }
72
72
  .information svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@@ -0,0 +1,21 @@
1
+ /* Keep the space reserved so revealing order controls never shifts the title. */
2
+ [data-spatial-element-handoff-header] :is([data-spatial-element-header-field], [data-spatial-element-dock-action]) {
3
+ opacity: 0;
4
+ visibility: hidden;
5
+ transform: translateY(4px);
6
+ pointer-events: none;
7
+ transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
8
+ }
9
+ [data-spatial-element-handoff-header] :is([data-spatial-element-header-field], [data-spatial-element-dock-action])[data-header-field-visible] {
10
+ opacity: 1;
11
+ visibility: visible;
12
+ transform: none;
13
+ pointer-events: auto;
14
+ transition-delay: 0s;
15
+ }
16
+ @media (prefers-reduced-motion: reduce) {
17
+ [data-spatial-element-handoff-header] :is([data-spatial-element-header-field], [data-spatial-element-dock-action]) {
18
+ transition: none;
19
+ transform: none;
20
+ }
21
+ }
@@ -279,7 +279,7 @@
279
279
  transform: translateY(var(--spatial-pane-fixed-compensation, 0px));
280
280
  }
281
281
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-heading {
282
- display: block; box-sizing: border-box; position: fixed; z-index: 3;
282
+ display: block; box-sizing: border-box; padding-block: 4px; position: fixed; z-index: 3;
283
283
  top: var(--spatial-pane-top); left: var(--spatial-pane-left); width: var(--spatial-pane-width); height: 86px;
284
284
  border-radius: var(--spatial-element-panel-radius) var(--spatial-element-panel-radius) 0 0;
285
285
  background: color-mix(in srgb, var(--spatial-pane-tint) var(--spatial-pane-tint-opacity), transparent);
@@ -288,12 +288,13 @@
288
288
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.08);
289
289
  transform: translateY(var(--spatial-pane-fixed-compensation, 0px));
290
290
  }
291
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-title-row { display: flex; align-items: center; gap: 16px; height: 46px; padding-inline: 16px; }
292
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-heading .breadcrumbs { width: 100%; }
293
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-title { min-width: 0; flex: 1; margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
294
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-eyebrow { margin: 0; font-size: 14px; line-height: 20px; white-space: nowrap; }
295
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-action { visibility: hidden; display: grid; place-items: center; flex: none; width: 54px; height: 54px; padding: 0; border: 0; border-radius: var(--spatial-element-control-radius); color: var(--spatial-element-on-accent); background: var(--spatial-element-accent); cursor: pointer; }
296
- .stage [data-spatial-element-root]:not([data-spatial-detail-flow])[data-spatial-detail-pane-action] .spatial-element-pane-action { visibility: visible; }
291
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-title-row { display: flex; align-items: center; gap: 16px; height: 100%; margin-top: -24px; padding-inline: 16px; }
292
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-heading .breadcrumbs { width: 100%; height: 24px; --ps-breadcrumb-height: 24px; padding-inline: 16px; }
293
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-copy { padding-top: 24px; display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
294
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-order { flex: none; }
295
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-title { min-width: 0; flex: 0 1 auto; margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
296
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; margin: 0; font-size: 14px; line-height: 20px; white-space: nowrap; }
297
+ .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-action { display: grid; place-items: center; flex: none; width: 54px; height: 54px; padding: 0; border: 0; border-radius: var(--spatial-element-control-radius); color: var(--spatial-element-on-accent); background: var(--spatial-element-accent); cursor: pointer; }
297
298
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-cover { display: block; position: fixed; z-index: 2; left: var(--spatial-pane-left); width: var(--spatial-pane-width); background: var(--stage-page-background, var(--spatial-element-background)); pointer-events: none; transform: translateY(var(--spatial-pane-fixed-compensation, 0px)); }
298
299
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-cover-top { top: 0; height: var(--spatial-pane-body-top); }
299
300
  .stage [data-spatial-element-root]:not([data-spatial-detail-flow]) .spatial-element-pane-cover-bottom { top: calc(100svh - var(--spatial-pane-bottom)); height: var(--spatial-pane-bottom); }
@@ -98,6 +98,7 @@
98
98
  getMinimapDockProgress,
99
99
  getMinimapModelScale,
100
100
  getMinimapModelTop,
101
+ getMinimapModelCenterY,
101
102
  getMinimapModelLeft,
102
103
  getSurface: () => resolvedSurface,
103
104
  getSurfaceOpacity,
@@ -177,6 +178,11 @@
177
178
  return Number.isFinite(value) ? value : undefined;
178
179
  }
179
180
 
181
+ function getMinimapModelCenterY() {
182
+ const value = Number.parseFloat(frameElement?.dataset.stageMinimapModelCenterY ?? "");
183
+ return Number.isFinite(value) ? value : undefined;
184
+ }
185
+
180
186
  function getMinimapModelLeft() {
181
187
  const value = Number.parseFloat(frameElement?.dataset.stageMinimapModelLeft ?? '');
182
188
  return Number.isFinite(value) ? value : undefined;
@@ -7,6 +7,7 @@
7
7
  import {
8
8
  observeSpaceMousePermission,
9
9
  rememberSpaceMouseConnection,
10
+ rememberSpaceMouseDisabled,
10
11
  shouldReconnectSpaceMouse,
11
12
  type SpaceMousePermission
12
13
  } from '@spatial-elements/core/stage/spaceMousePermission';
@@ -260,6 +261,7 @@
260
261
  getSpaceMousePermission: () => spaceMousePermission,
261
262
  setSpaceMouseEnabled(enabled) {
262
263
  if (!spaceMouseDesktop) return;
264
+ if (!enabled) rememberSpaceMouseDisabled();
263
265
  experience?.setSpaceMouseEnabled(false);
264
266
  spaceMouseState = enabled ? 'connecting' : 'idle';
265
267
  spaceMouseDisabledByUser = !enabled;
@@ -899,6 +901,7 @@
899
901
  getMinimapDockProgress: panel.getMinimapDockProgress,
900
902
  getMinimapModelScale: panel.getMinimapModelScale,
901
903
  getMinimapModelTop: panel.getMinimapModelTop,
904
+ getMinimapModelCenterY: panel.getMinimapModelCenterY,
902
905
  getMinimapModelLeft: panel.getMinimapModelLeft,
903
906
  getSurfaceOpacity: panel.getSurfaceOpacity,
904
907
  getVisible: panel.getVisible,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatial-elements/sveltekit",
3
- "version": "1.0.0-beta.11",
3
+ "version": "1.0.0-beta.12",
4
4
  "description": "SvelteKit components and navigation for Spatial Elements.",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@page-sections/core": "0.4.1",
44
44
  "@page-sections/svelte": "0.4.1",
45
- "@spatial-elements/core": "1.0.0-beta.11",
45
+ "@spatial-elements/core": "1.0.0-beta.12",
46
46
  "lucide-svelte": "^1.0.1"
47
47
  },
48
48
  "peerDependencies": {