@signal9/era-ui 3.1.0 → 3.2.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.
@@ -18,6 +18,7 @@
18
18
  floating = false,
19
19
  pinned = [],
20
20
  showWindows = true,
21
+ showWorkspaces = true,
21
22
  commands = [],
22
23
  hotkey = ['`', 'Escape'],
23
24
  placeholder = 'run a command…',
@@ -42,6 +43,11 @@
42
43
  /** Show the open/minimized window tabs (default true). Hidden, windows
43
44
  * stay reachable through the command bar's `windows` view. */
44
45
  showWindows?: boolean;
46
+ /** Show the multi-workspace UI (default true). Hidden, both the numbered
47
+ * switcher and the command bar's `workspace` view go away — a
48
+ * single-workspace shell. `wm.addWorkspace()` still works for consumers
49
+ * who drive workspaces themselves. */
50
+ showWorkspaces?: boolean;
45
51
  /** Extra root commands appended to the built-in ones. */
46
52
  commands?: CommandBarItem[];
47
53
  /** Focus binding(s) for the command bar (default backtick + Escape). */
@@ -121,6 +127,7 @@
121
127
  onSelect: () => wm.focus(w.id)
122
128
  }))
123
129
  };
130
+ if (!showWorkspaces) return [...apps, windows];
124
131
  const workspaces: CommandBarItem = {
125
132
  value: 'workspace',
126
133
  label: 'workspace',
@@ -228,8 +235,9 @@
228
235
  {/if}
229
236
 
230
237
  <!-- Numbered workspace switcher, term-style on the right — appears only
231
- once there's something to switch between. -->
232
- {#if wm.workspaces.length > 1}
238
+ once there's something to switch between (and only when the bar exposes
239
+ workspaces at all). -->
240
+ {#if showWorkspaces && wm.workspaces.length > 1}
233
241
  <div class="flex shrink-0 items-center gap-(--era-gap)">
234
242
  {#each wm.workspaces as ws, i (ws.id)}
235
243
  <Button
@@ -20,6 +20,11 @@ type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
20
20
  /** Show the open/minimized window tabs (default true). Hidden, windows
21
21
  * stay reachable through the command bar's `windows` view. */
22
22
  showWindows?: boolean;
23
+ /** Show the multi-workspace UI (default true). Hidden, both the numbered
24
+ * switcher and the command bar's `workspace` view go away — a
25
+ * single-workspace shell. `wm.addWorkspace()` still works for consumers
26
+ * who drive workspaces themselves. */
27
+ showWorkspaces?: boolean;
23
28
  /** Extra root commands appended to the built-in ones. */
24
29
  commands?: CommandBarItem[];
25
30
  /** Focus binding(s) for the command bar (default backtick + Escape). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",