@dfosco/storyboard-react 4.0.0-beta.47 → 4.0.0-beta.48

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-react",
3
- "version": "4.0.0-beta.47",
3
+ "version": "4.0.0-beta.48",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@base-ui/react": "^1.4.0",
7
- "@dfosco/storyboard-core": "4.0.0-beta.47",
8
- "@dfosco/tiny-canvas": "4.0.0-beta.47",
7
+ "@dfosco/storyboard-core": "4.0.0-beta.48",
8
+ "@dfosco/tiny-canvas": "4.0.0-beta.48",
9
9
  "@neodrag/react": "^2.3.1",
10
10
  "glob": "^11.0.0",
11
11
  "jsonc-parser": "^3.3.1",
@@ -11,6 +11,12 @@ import css from './BranchBar.module.css'
11
11
  export default function BranchBar({ basePath }) {
12
12
  const [hidden, setHidden] = useState(false)
13
13
 
14
+ const isHiddenByParam = useMemo(() => {
15
+ if (typeof window === 'undefined') return false
16
+ const params = new URLSearchParams(window.location.search)
17
+ return params.has('_sb_hide_branch_bar') || params.has('_sb_embed')
18
+ }, [])
19
+
14
20
  const currentBranch = useMemo(() => {
15
21
  const m = (basePath || '').match(/\/branch--([^/]+)\/?$/)
16
22
  return m ? m[1] : 'main'
@@ -26,7 +32,7 @@ export default function BranchBar({ basePath }) {
26
32
  return () => observer.disconnect()
27
33
  }, [])
28
34
 
29
- if (!isOnBranch || hidden) return null
35
+ if (!isOnBranch || hidden || isHiddenByParam) return null
30
36
 
31
37
  function hideChrome() {
32
38
  window.dispatchEvent(new KeyboardEvent('keydown', {