@stacksjs/defaults 0.75.526 → 0.75.527

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.
@@ -106,6 +106,8 @@ state and do not install global click handlers.
106
106
  renders a reactive `ModelScene` from `@stacksjs/browser/model-viewer`, using native
107
107
  WebGL without a third-party 3D library. Camera presets, orbit, pinch/wheel zoom,
108
108
  keyboard input, responsive backing resolution and drawing fallback are built in.
109
+ Bind `:label` and `:poster` when switching models; both react with the scene so
110
+ the accessible canvas description and fallback drawing keep the selected context.
109
111
  See `stacks-browser` for units, geometry, source limits and cleanup contracts.
110
112
 
111
113
  ## Gotchas
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.526",
5
+ "version": "0.75.527",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.526",
5
+ "version": "0.75.527",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,10 +45,10 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.526",
48
+ "@stacksjs/mobile": "0.75.527",
49
49
  "@stacksjs/sanitizer": "0.2.807",
50
50
  "@stacksjs/stx": "0.2.807",
51
- "@stacksjs/strings": "0.75.526",
51
+ "@stacksjs/strings": "0.75.527",
52
52
  "@xterm/addon-fit": "^0.11.0",
53
53
  "@xterm/xterm": "^6.0.0",
54
54
  "ts-qr-codes": "^0.1.8"
@@ -1,6 +1,4 @@
1
1
  <script server>
2
- export const label = $props.label || 'Interactive 3D model'
3
- export const poster = $props.poster || ''
4
2
  export const className = $props.className || ''
5
3
  </script>
6
4
  <script client>
@@ -8,6 +6,8 @@ import type { ModelScene, ModelViewerController } from '@stacksjs/browser/model-
8
6
  import { createModelViewer } from '@stacksjs/browser/model-viewer'
9
7
 
10
8
  const scene = useReactiveProp('scene', { nodes: [] } as ModelScene)
9
+ const modelLabel = useReactiveProp('label', 'Interactive 3D model')
10
+ const modelPoster = useReactiveProp('poster', '')
11
11
  const canvas = useRef('modelCanvas')
12
12
  const status = state('loading')
13
13
  const message = state('')
@@ -35,10 +35,10 @@ onDestroy(() => viewer?.dispose())
35
35
  </span>
36
36
  </div>
37
37
  <div class="stx-model-viewer-stage">
38
- <canvas ref="modelCanvas" class="stx-model-viewer-canvas" tabindex="0" role="img" aria-label="{{ label }}. Drag to rotate, scroll or pinch to zoom. Arrow keys rotate, plus and minus zoom, Home resets.">Interactive 3D requires a browser with WebGL. Use the drawing and downloads below.</canvas>
38
+ <canvas ref="modelCanvas" class="stx-model-viewer-canvas" tabindex="0" role="img" :aria-label="modelLabel() + '. Drag to rotate, scroll or pinch to zoom. Arrow keys rotate, plus and minus zoom, Home resets.'">Interactive 3D requires a browser with WebGL. Use the drawing and downloads below.</canvas>
39
39
  <div class="stx-model-viewer-loading" :if="status() === 'loading'" role="status">Preparing the model…</div>
40
40
  <div class="stx-model-viewer-fallback" :if="status() === 'error'">
41
- @if (poster)<img src="{{ poster }}" alt="{{ label }} drawing" width="1400" height="1000">@endif
41
+ <img :if="modelPoster()" :src="modelPoster()" :alt="modelLabel() + ' drawing'" width="1400" height="1000">
42
42
  <p role="status">{{ message() }}</p>
43
43
  </div>
44
44
  </div>