@dfosco/storyboard 0.9.2 → 0.9.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Storyboard prototyping framework — core engine, React integration, and canvas",
@@ -11,6 +11,7 @@ import { useState, useEffect, useMemo } from 'react'
11
11
  import { createPortal } from 'react-dom'
12
12
  import { GitBranchIcon } from '@primer/octicons-react'
13
13
  import { useBranches } from './useBranches.js'
14
+ import ChromeSlot from '../../core/ui/ChromeSlot.jsx'
14
15
  import css from './BranchBar.module.css'
15
16
 
16
17
  /** Check if we're in local dev mode (respects ?prodMode simulation). */
@@ -78,28 +79,34 @@ export default function BranchBar({ basePath }) {
78
79
  }
79
80
 
80
81
  return createPortal(
81
- <div className={css.bar} data-branch-bar>
82
- <div
83
- className={`${css.barInner}${isLocalDev ? '' : ` ${css.barProd}`}`}
84
- style={domainColor ? { '--sb-branch-bar-bg': domainColor } : undefined}
85
- >
86
- <span className={css.barLabel}>
87
- {isLocalDev && window.__SB_DEV_DOMAIN__ && <>
88
- <span className={css.barDomainName}>⌘ {window.__SB_DEV_DOMAIN__}</span>
89
- <span className={css.barSeparator}>·</span>
90
- </>}
91
- <GitBranchIcon size={12} />
92
- <span className={css.barBranchName}>{currentBranch}</span>
93
- {isLocalDev && <>
94
- <span className={css.barSeparator}>·</span>
95
- <span>Local development</span>
96
- </>}
97
- </span>
98
- <div className={css.barActions}>
99
- <button className={css.barAction} onClick={hideChrome}>Hide</button>
82
+ <ChromeSlot id="branch-bar:root" surface="branch-bar" ctx={{ currentBranch, isLocalDev }}>
83
+ <div className={css.bar} data-branch-bar>
84
+ <div
85
+ className={`${css.barInner}${isLocalDev ? '' : ` ${css.barProd}`}`}
86
+ style={domainColor ? { '--sb-branch-bar-bg': domainColor } : undefined}
87
+ >
88
+ <ChromeSlot id="branch-bar:label" surface="branch-bar" ctx={{ currentBranch, isLocalDev }}>
89
+ <span className={css.barLabel}>
90
+ {isLocalDev && window.__SB_DEV_DOMAIN__ && <>
91
+ <span className={css.barDomainName}>⌘ {window.__SB_DEV_DOMAIN__}</span>
92
+ <span className={css.barSeparator}>·</span>
93
+ </>}
94
+ <GitBranchIcon size={12} />
95
+ <span className={css.barBranchName}>{currentBranch}</span>
96
+ {isLocalDev && <>
97
+ <span className={css.barSeparator}>·</span>
98
+ <span>Local development</span>
99
+ </>}
100
+ </span>
101
+ </ChromeSlot>
102
+ <div className={css.barActions}>
103
+ <ChromeSlot id="branch-bar:hide-button" surface="branch-bar" ctx={{ currentBranch, isLocalDev }}>
104
+ <button className={css.barAction} onClick={hideChrome}>Hide</button>
105
+ </ChromeSlot>
106
+ </div>
100
107
  </div>
101
108
  </div>
102
- </div>,
109
+ </ChromeSlot>,
103
110
  portalContainer
104
111
  )
105
112
  }