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

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.
@@ -29,7 +29,7 @@
29
29
  });
30
30
  const resolved = $derived(items.map(item => ({ ...item, href: item.href ? resolve(...([item.href] as unknown as Parameters<typeof resolve>)) : undefined })));
31
31
  </script>
32
- <div bind:this={element} class="breadcrumbs spatial-content-width" style:translate={travel} data-stage-dom-content data-catalog-transition-dom={transition}>
32
+ <div bind:this={element} class="breadcrumbs spatial-content-width" style:translate={travel} style:filter={focus > 0 ? `blur(${focus * 4}px)` : 'none'} data-stage-dom-content data-catalog-transition-dom={transition}>
33
33
  <Breadcrumbs items={resolved} />
34
34
  </div>
35
35
  <style>
@@ -35,6 +35,7 @@
35
35
  import { resolveSpatialElementData } from '@spatial-elements/core/spatial-element/spatialElement';
36
36
  import { registerSpatialPage } from './spatialPageContext.js';
37
37
  import { STAGE_CONTEXT_KEY, type StageContext } from '@spatial-elements/core/stage/panelContext';
38
+ import { getPanelFocusProgress } from '@spatial-elements/core/stage/panelFocusMath';
38
39
 
39
40
  const SPATIAL_ELEMENT_OVERVIEW_SECTION = {
40
41
  id: 'overview',
@@ -75,6 +76,7 @@
75
76
  let mainElement: HTMLElement;
76
77
  let tabList = $state<HTMLElement>();
77
78
  let splitPane = $state(false);
79
+ const contentFocus = $derived(splitPane ? 0 : getPanelFocusProgress(stageContext?.getZoomUiFocus?.() ?? 0));
78
80
  let paneController = $state.raw<SpatialElementPaneController>();
79
81
  const paneTint = $derived(typeof brand.panelTheme.tint === 'number'
80
82
  ? `#${brand.panelTheme.tint.toString(16).padStart(6, '0')}`
@@ -204,9 +206,12 @@
204
206
  data-spatial-element-id={spatialElement.id}
205
207
  data-brand-id={spatialElement.brandId}
206
208
  data-spatial-selected-media={selectedMedia.kind}
209
+ data-spatial-content-zooming={contentFocus > 0 || undefined}
207
210
  style:--spatial-pane-tint={paneTint}
208
211
  style:--spatial-pane-tint-opacity={`${Math.min(1, Math.max(0.8, brand.panelTheme.tintOpacity ?? 0.28)) * 100}%`}
209
212
  style:--spatial-pane-blur={`${Math.min(100, Math.max(0, brand.panelTheme.backdropBlur ?? 5))}px`}
213
+ style:--spatial-detail-content-fallback-travel={`${contentFocus * 60}svh`}
214
+ style:--spatial-detail-content-blur={contentFocus > 0 ? `blur(${contentFocus * 4}px)` : 'none'}
210
215
  >
211
216
  <div class="spatial-element-pane-heading" data-spatial-detail-pane-header data-spatial-detail-fixed data-spatial-element-handoff-header>
212
217
  <SpatialElementBreadcrumbs items={spatialElement.breadcrumbs} focusReactive={!splitPane} />
@@ -265,9 +270,11 @@
265
270
  <div class="spatial-element-pane-body" data-spatial-detail-pane-body data-stage-scroll-viewport>
266
271
  {#key spatialElement.id}<SpatialElementSummaryPanel {spatialElement} nativeContent={splitPane} />{/key}
267
272
  <div class="spatial-element-content">
273
+ <div class="spatial-element-section-viewport">
268
274
  <div class="spatial-element-section-list spatial-content-width spatial-content-container" data-catalog-transition-dom="enter">
269
275
  <SectionSurfaceGroup>{@render children?.()}</SectionSurfaceGroup>
270
276
  </div>
277
+ </div>
271
278
  <!-- Read after the section snippet has registered its metadata during SSR. -->
272
279
  <SpatialElementTabs bind:tabList {activeSectionId} sections={[SPATIAL_ELEMENT_OVERVIEW_SECTION, ...sections]} />
273
280
  </div>
@@ -306,6 +313,15 @@
306
313
  .spatial-element-section-list {
307
314
  order: 2;
308
315
  margin-top: var(--spatial-detail-submenu-after-gap, 0px);
316
+ translate: 0 var(--spatial-detail-content-travel, var(--spatial-detail-content-fallback-travel, 0px));
317
+ }
318
+ .spatial-element-section-viewport { order: 2; display: flow-root; }
319
+ /* Keep translated sections from extending the document's scroll range. */
320
+ [data-spatial-content-zooming] .spatial-element-section-viewport { overflow: clip; }
321
+ /* Filter only nearby sections, not the full document-sized layer. Offscreen
322
+ * sections retain content-visibility culling; text is crisp at rest. */
323
+ .spatial-element-section-list :global(.content-section[data-spatial-element-section-near-viewport]) {
324
+ filter: var(--spatial-detail-content-blur, none);
309
325
  }
310
326
 
311
327
  .spatial-element-content :global(.spatial-element-tabs-anchor) {
@@ -337,6 +353,8 @@
337
353
  }
338
354
  @media (min-width: 1600px) {
339
355
  .spatial-element-content { padding-top: 12px; }
340
- .spatial-element-content :global(.spatial-element-tabs-anchor) { margin-left: calc((100% - var(--spatial-detail-content-width)) / 2); max-width: var(--spatial-detail-content-width); }
356
+ }
357
+ @media (min-width: 1537px) {
358
+ .spatial-element-content :global(.spatial-element-tabs-anchor) { margin-left: max(12px, calc((100% - var(--spatial-detail-content-width)) / 2)); max-width: min(var(--spatial-detail-content-width), calc(100% - 24px)); }
341
359
  }
342
360
  </style>
@@ -4,6 +4,18 @@
4
4
 
5
5
  .spatial-content-container { container: ps-content / inline-size; min-width: 0; }
6
6
 
7
+ @media (min-width: 1537px) and (max-width: 1599px) {
8
+ .stage .content-section { width: min(var(--ps-section-width, 100%), 100%, 1536px); }
9
+ /* The shared registry exposes joined/outer edges through its shadow clips
10
+ * below XL too. Reuse those markers for the newly inset L surfaces. */
11
+ .stage .content-section[data-section-background-size='standard'] > .ps-section-surface {
12
+ border-top-left-radius: clamp(0px, calc(var(--ps-shadow-top-clip, 0px) * -100), var(--ps-radius));
13
+ border-top-right-radius: clamp(0px, calc(var(--ps-shadow-top-clip, 0px) * -100), var(--ps-radius));
14
+ border-bottom-left-radius: clamp(0px, calc(var(--ps-shadow-bottom-clip, 0px) * -100), var(--ps-radius));
15
+ border-bottom-right-radius: clamp(0px, calc(var(--ps-shadow-bottom-clip, 0px) * -100), var(--ps-radius));
16
+ }
17
+ }
18
+
7
19
  @media (min-width: 1600px) {
8
20
  .spatial-content-width { width: min(1536px, max(0px, calc(100% - 272px))); }
9
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatial-elements/sveltekit",
3
- "version": "1.0.0-beta.13",
3
+ "version": "1.0.0-beta.14",
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.13",
45
+ "@spatial-elements/core": "1.0.0-beta.14",
46
46
  "lucide-svelte": "^1.0.1"
47
47
  },
48
48
  "peerDependencies": {