@dfosco/storyboard-react 3.11.2 → 3.12.0

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.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-react",
3
- "version": "3.11.2",
3
+ "version": "3.12.0",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@dfosco/storyboard-core": "3.11.2",
7
- "@dfosco/tiny-canvas": "3.11.2",
6
+ "@dfosco/storyboard-core": "3.12.0",
7
+ "@dfosco/tiny-canvas": "3.12.0",
8
8
  "@neodrag/react": "^2.3.1",
9
9
  "glob": "^11.0.0",
10
10
  "jsonc-parser": "^3.3.1"
@@ -287,7 +287,6 @@ export default function CanvasPage({ name }) {
287
287
  const zoomRef = useRef(initialViewport?.zoom ?? 100)
288
288
  const scrollRef = useRef(null)
289
289
  const pendingScrollRestore = useRef(initialViewport)
290
- const initialWidgetParam = useRef(new URLSearchParams(window.location.search).has('widget'))
291
290
  const [canvasTitle, setCanvasTitle] = useState(canvas?.title || name)
292
291
  const titleInputRef = useRef(null)
293
292
  const [localSources, setLocalSources] = useState(canvas?.sources ?? [])
@@ -396,8 +395,6 @@ export default function CanvasPage({ name }) {
396
395
  setLocalWidgets(canvas?.widgets ?? null)
397
396
  setLocalSources(canvas?.sources ?? [])
398
397
  setCanvasTitle(canvas?.title || name)
399
- setSnapEnabled(canvas?.snapToGrid ?? false)
400
- setSnapGridSize(canvas?.gridSize || 40)
401
398
  undoRedo.reset()
402
399
  }
403
400
 
@@ -922,13 +919,6 @@ export default function CanvasPage({ name }) {
922
919
  return () => document.removeEventListener('storyboard:canvas:zoom-to-fit', handleZoomToFit)
923
920
  }, [localWidgets, localSources, jsxExports])
924
921
 
925
- // On initial load without a ?widget= deep link, zoom to fit all objects
926
- useEffect(() => {
927
- if (loading || initialWidgetParam.current) return
928
- initialWidgetParam.current = true // only once
929
- document.dispatchEvent(new CustomEvent('storyboard:canvas:zoom-to-fit'))
930
- }, [loading])
931
-
932
922
  // Canvas background should follow toolbar theme target.
933
923
  useEffect(() => {
934
924
  function readMode() {
@@ -64,6 +64,8 @@ export default forwardRef(function PrototypeEmbed({ props, onUpdate, resizable }
64
64
 
65
65
  const iframeSrc = useMemo(() => {
66
66
  if (!rawSrc) return ''
67
+ // External URLs are embedded as-is — storyboard query params only apply to local prototypes
68
+ if (/^https?:\/\//.test(rawSrc)) return rawSrc
67
69
  const hashIdx = rawSrc.indexOf('#')
68
70
  const base = hashIdx >= 0 ? rawSrc.slice(0, hashIdx) : rawSrc
69
71
  const hash = hashIdx >= 0 ? rawSrc.slice(hashIdx) : ''