@dfosco/storyboard 0.5.0-alpha.13 → 0.5.0-alpha.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard",
3
- "version": "0.5.0-alpha.13",
3
+ "version": "0.5.0-alpha.14",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Storyboard prototyping framework — core engine, React integration, and canvas",
@@ -76,6 +76,21 @@ const customIcons = {
76
76
  'M2 19L11 12L2 5L2 19Z',
77
77
  ],
78
78
  },
79
+ // Component icon (puzzle piece / brick)
80
+ 'component': {
81
+ viewBox: '0 0 24 24',
82
+ strokeWidth: '1.5',
83
+ strokePaths: [
84
+ 'M3.5 10.5V5.5C3.5 4.94772 3.94772 4.5 4.5 4.5H9.5',
85
+ 'M14.5 4.5H19.5C20.0523 4.5 20.5 4.94772 20.5 5.5V10.5',
86
+ 'M20.5 13.5V18.5C20.5 19.0523 20.0523 19.5 19.5 19.5H14.5',
87
+ 'M9.5 19.5H4.5C3.94772 19.5 3.5 19.0523 3.5 18.5V13.5',
88
+ 'M12 4.5V7.5',
89
+ 'M12 16.5V19.5',
90
+ 'M20.5 12H17.5',
91
+ 'M6.5 12H3.5',
92
+ ],
93
+ },
79
94
  }
80
95
 
81
96
  /* ─── Iconoir icons (stroke-based unless fill: true) ─── */
@@ -1051,6 +1051,10 @@ export default function Workspace({
1051
1051
  basePath,
1052
1052
  title = 'Storyboard',
1053
1053
  subtitle,
1054
+ showAllArtifacts = false,
1055
+ showPrototypes = true,
1056
+ showCanvases = true,
1057
+ showComponents = true,
1054
1058
  }) {
1055
1059
  const themeAttrs = useToolbarTheme()
1056
1060
  const ghUser = useGitHubUser(basePath)
@@ -1158,8 +1162,20 @@ export default function Workspace({
1158
1162
 
1159
1163
  const itemMap = useMemo(() => Object.fromEntries(allItems.map(i => [i.id, i])), [allItems])
1160
1164
 
1161
- // State
1162
- const [activeNav, setActiveNav] = useState('all')
1165
+ // Filter nav items based on visibility props
1166
+ const visibleNavItems = useMemo(() => {
1167
+ const visibility = {
1168
+ all: showAllArtifacts,
1169
+ prototypes: showPrototypes,
1170
+ canvases: showCanvases,
1171
+ components: showComponents,
1172
+ }
1173
+ return NAV_ITEMS.filter(nav => visibility[nav.id])
1174
+ }, [showAllArtifacts, showPrototypes, showCanvases, showComponents])
1175
+
1176
+ // State - default to first visible nav item
1177
+ const defaultNav = visibleNavItems[0]?.id || 'prototypes'
1178
+ const [activeNav, setActiveNav] = useState(defaultNav)
1163
1179
  const [activeTab, setActiveTab] = useState('All')
1164
1180
  const [showCreate, setShowCreate] = useState(false)
1165
1181
  const isLocalDev = typeof window !== 'undefined' && window.__SB_LOCAL_DEV__ === true
@@ -1307,7 +1323,7 @@ export default function Workspace({
1307
1323
  <aside className={`${css.sidebar}${sidebarOpen ? ` ${css.sidebarOpen}` : ''}`}>
1308
1324
  <div className={css.sidebarContent}>
1309
1325
  <nav className={css.navSection}>
1310
- {NAV_ITEMS.map(nav => (
1326
+ {visibleNavItems.map(nav => (
1311
1327
  <button
1312
1328
  key={nav.id}
1313
1329
  className={activeNav === nav.id ? css.navItemActive : css.navItem}