sh3-core 0.15.4 → 0.16.1

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.
Files changed (228) hide show
  1. package/dist/BrandSlot.svelte +9 -9
  2. package/dist/{Shell.svelte → Sh3.svelte} +65 -65
  3. package/dist/Sh3.svelte.d.ts +5 -0
  4. package/dist/__test__/render.js +1 -1
  5. package/dist/actions/ActionPanel.svelte +3 -3
  6. package/dist/actions/CommandPalette.svelte +2 -2
  7. package/dist/actions/MenuBar.svelte +1 -1
  8. package/dist/actions/MenuBar.test.js +1 -1
  9. package/dist/actions/MenuButton.svelte +3 -3
  10. package/dist/actions/dispatcher.svelte.js +1 -1
  11. package/dist/actions/listActive.js +1 -1
  12. package/dist/actions/listeners.js +6 -6
  13. package/dist/actions/selection.svelte.d.ts +2 -2
  14. package/dist/actions/selection.svelte.js +4 -4
  15. package/dist/actions/selection.test.js +1 -1
  16. package/dist/actions/{shellActions.test.js → sh3Actions.test.js} +14 -14
  17. package/dist/actions/state.svelte.d.ts +3 -3
  18. package/dist/actions/state.svelte.js +3 -3
  19. package/dist/actions/syncMountedViewIds.test.js +1 -1
  20. package/dist/actions/types.d.ts +1 -1
  21. package/dist/api.d.ts +5 -5
  22. package/dist/api.js +7 -7
  23. package/dist/app/admin/ApiKeysView.svelte +9 -9
  24. package/dist/app/admin/AuthSettingsView.svelte +6 -6
  25. package/dist/app/admin/SystemView.svelte +12 -12
  26. package/dist/app/admin/UsersView.svelte +8 -8
  27. package/dist/app/store/AppUpdateAvailableModal.svelte +14 -14
  28. package/dist/app/store/PermissionConfirmModal.svelte +20 -20
  29. package/dist/app/store/StoreView.svelte +51 -51
  30. package/dist/app/store/UninstallAppDialog.svelte +14 -14
  31. package/dist/app/store/storeShard.svelte.js +1 -1
  32. package/dist/app/store/verbs.js +1 -1
  33. package/dist/apps/lifecycle.d.ts +1 -1
  34. package/dist/apps/lifecycle.js +4 -4
  35. package/dist/apps/lifecycle.test.js +5 -5
  36. package/dist/apps/registry.svelte.d.ts +2 -2
  37. package/dist/apps/registry.svelte.js +3 -3
  38. package/dist/apps/types.d.ts +1 -1
  39. package/dist/auth/GuestBanner.svelte +19 -19
  40. package/dist/auth/SignInWall.svelte +17 -17
  41. package/dist/auth/auth.svelte.d.ts +1 -1
  42. package/dist/auth/auth.svelte.js +1 -1
  43. package/dist/boot/satellitePayload.js +1 -1
  44. package/dist/build.d.ts +27 -0
  45. package/dist/build.js +59 -1
  46. package/dist/build.test.js +31 -0
  47. package/dist/color/api.d.ts +1 -1
  48. package/dist/color/api.js +1 -1
  49. package/dist/color/{shell-api.js → sh3-api.js} +3 -3
  50. package/dist/conflicts/ConflictModal.svelte +1 -1
  51. package/dist/conflicts/ConflictModal.svelte.d.ts +1 -1
  52. package/dist/conflicts/DetailView.svelte +19 -19
  53. package/dist/conflicts/PromptView.svelte +9 -9
  54. package/dist/conflicts/adapter-documents.js +1 -1
  55. package/dist/conflicts/api.d.ts +1 -1
  56. package/dist/conflicts/api.js +2 -2
  57. package/dist/conflicts/renderer-registry.js +1 -1
  58. package/dist/conflicts/renderers/MetaOnlyRenderer.svelte +8 -8
  59. package/dist/conflicts/renderers/TextDiffRenderer.svelte +15 -15
  60. package/dist/conflicts/renderers/index.js +1 -1
  61. package/dist/conflicts/resolve-primitive.js +1 -1
  62. package/dist/conflicts/{shell-api.js → sh3-api.js} +2 -2
  63. package/dist/contributions/registry.js +1 -1
  64. package/dist/createShell.d.ts +2 -2
  65. package/dist/createShell.js +6 -6
  66. package/dist/host-entry.d.ts +1 -1
  67. package/dist/host-entry.js +2 -2
  68. package/dist/host.js +2 -2
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +2 -2
  71. package/dist/keys/ConsentDialog.svelte +15 -15
  72. package/dist/keys/consent.svelte.d.ts +2 -2
  73. package/dist/keys/consent.svelte.js +3 -3
  74. package/dist/keys/revocation-bus.svelte.d.ts +3 -3
  75. package/dist/keys/revocation-bus.svelte.js +3 -3
  76. package/dist/layout/DragPreview.svelte +9 -9
  77. package/dist/layout/LayoutRenderer.browser.test.js +2 -2
  78. package/dist/layout/LayoutRenderer.svelte +4 -4
  79. package/dist/layout/SlotContainer.svelte +12 -12
  80. package/dist/layout/SlotDropZone.svelte +2 -2
  81. package/dist/layout/inspection.d.ts +1 -1
  82. package/dist/layout/inspection.js +1 -1
  83. package/dist/layout/store.svelte.js +3 -3
  84. package/dist/layout/types.d.ts +1 -1
  85. package/dist/layouts-shard/LayoutSaveModal.svelte +20 -20
  86. package/dist/layouts-shard/LayoutsSection.svelte +11 -11
  87. package/dist/layouts-shard/filter.test.js +3 -3
  88. package/dist/layouts-shard/layoutsApi.test.js +3 -3
  89. package/dist/layouts-shard/layoutsShard.svelte.test.js +7 -7
  90. package/dist/migrations/mode-id-rename.js +2 -2
  91. package/dist/overlays/ConfirmDialog.svelte +8 -8
  92. package/dist/overlays/EntityAppearanceModal.svelte +19 -19
  93. package/dist/overlays/FloatFrame.svelte +20 -20
  94. package/dist/overlays/FloatLayer.svelte +1 -1
  95. package/dist/overlays/ModalFrame.svelte +5 -5
  96. package/dist/overlays/PopupFrame.svelte +4 -4
  97. package/dist/overlays/ToastItem.svelte +12 -12
  98. package/dist/overlays/float.d.ts +2 -2
  99. package/dist/overlays/float.js +3 -3
  100. package/dist/overlays/float.test.js +6 -6
  101. package/dist/overlays/modal.js +1 -1
  102. package/dist/overlays/modal.test.js +2 -2
  103. package/dist/overlays/parentHost.js +2 -2
  104. package/dist/overlays/parentHost.test.js +5 -5
  105. package/dist/overlays/popup.js +2 -2
  106. package/dist/overlays/popup.test.js +2 -2
  107. package/dist/overlays/roots.js +4 -4
  108. package/dist/overlays/toast.js +1 -1
  109. package/dist/overlays/types.js +3 -3
  110. package/dist/primitives/Button.svelte +16 -16
  111. package/dist/primitives/Collapsible.svelte +11 -11
  112. package/dist/primitives/ResizableSplitter.svelte +10 -10
  113. package/dist/primitives/TabbedPanel.svelte +19 -19
  114. package/dist/primitives/base.css +57 -57
  115. package/dist/primitives/widgets/ColorSwatch.svelte +15 -15
  116. package/dist/primitives/widgets/ColorSwatch.svelte.test.js +4 -4
  117. package/dist/primitives/widgets/Field.svelte +20 -20
  118. package/dist/primitives/widgets/FilePicker.svelte +13 -13
  119. package/dist/primitives/widgets/IconPicker.svelte +14 -14
  120. package/dist/primitives/widgets/IconToggleGroup.svelte +14 -14
  121. package/dist/primitives/widgets/NumberInput.svelte +17 -17
  122. package/dist/primitives/widgets/PickerList.svelte +17 -17
  123. package/dist/primitives/widgets/RangeSlider.svelte +16 -16
  124. package/dist/primitives/widgets/Segmented.svelte +16 -16
  125. package/dist/primitives/widgets/Select.svelte +14 -14
  126. package/dist/primitives/widgets/Select.svelte.test.js +2 -2
  127. package/dist/primitives/widgets/Slider.svelte +20 -20
  128. package/dist/primitives/widgets/SliderGroup.svelte +2 -2
  129. package/dist/primitives/widgets/Textarea.svelte +13 -13
  130. package/dist/primitives/widgets/_select-listbox.svelte +15 -15
  131. package/dist/projects/session-state.svelte.js +1 -1
  132. package/dist/projects-shard/DeleteProjectDialog.svelte +12 -12
  133. package/dist/projects-shard/ProjectManage.svelte +25 -25
  134. package/dist/projects-shard/ProjectsSection.svelte +12 -12
  135. package/dist/registry/installer.d.ts +2 -2
  136. package/dist/registry/installer.js +2 -2
  137. package/dist/registry/loader.js +1 -1
  138. package/dist/registry/permission-descriptions.js +2 -2
  139. package/dist/registry/permission-descriptions.test.js +1 -1
  140. package/dist/runtime/runVerb-shell.test.js +2 -2
  141. package/dist/runtime/runVerb.js +4 -4
  142. package/dist/runtime/runVerb.test.js +4 -4
  143. package/dist/satellite/SatelliteShell.svelte +2 -2
  144. package/dist/{shell → sh3}/views/KeysAndPeers.svelte +7 -7
  145. package/dist/sh3Api/headless.d.ts +4 -0
  146. package/dist/{shell-shard/shellApi.js → sh3Api/headless.js} +5 -5
  147. package/dist/{shell-shard/shellApi.svelte.test.js → sh3Api/headless.svelte.test.js} +11 -11
  148. package/dist/{shellApi → sh3Api}/window.js +2 -2
  149. package/dist/{shellApi → sh3Api}/window.test.js +1 -1
  150. package/dist/{shellRuntime.svelte.d.ts → sh3Runtime.svelte.d.ts} +11 -11
  151. package/dist/{shellRuntime.svelte.js → sh3Runtime.svelte.js} +10 -10
  152. package/dist/sh3Runtime.svelte.test.d.ts +1 -0
  153. package/dist/{shellRuntime.svelte.test.js → sh3Runtime.svelte.test.js} +10 -10
  154. package/dist/sh3core-shard/AppInfoView.svelte +19 -19
  155. package/dist/sh3core-shard/{ShellHome.svelte → Sh3Home.svelte} +82 -82
  156. package/dist/sh3core-shard/Sh3Home.svelte.d.ts +3 -0
  157. package/dist/sh3core-shard/{ShellTitle.svelte → Sh3Title.svelte} +11 -11
  158. package/dist/sh3core-shard/Sh3Title.svelte.d.ts +3 -0
  159. package/dist/sh3core-shard/appActions.js +3 -3
  160. package/dist/sh3core-shard/sh3coreShard.svelte.js +7 -7
  161. package/dist/shards/activate.svelte.d.ts +1 -1
  162. package/dist/shards/activate.svelte.js +6 -6
  163. package/dist/shards/types.d.ts +5 -5
  164. package/dist/shards/types.js +2 -2
  165. package/dist/shell-shard/CommandLine.svelte +7 -7
  166. package/dist/shell-shard/InputLine.svelte +3 -3
  167. package/dist/shell-shard/ScrollbackView.svelte +2 -2
  168. package/dist/shell-shard/Terminal.svelte +5 -5
  169. package/dist/shell-shard/Terminal.svelte.d.ts +2 -2
  170. package/dist/shell-shard/dispatch-custom.test.js +2 -2
  171. package/dist/shell-shard/dispatch-gating.test.js +2 -2
  172. package/dist/shell-shard/dispatch-invoke.test.js +2 -2
  173. package/dist/shell-shard/dispatch-to-terminal.js +1 -1
  174. package/dist/shell-shard/dispatch.d.ts +2 -2
  175. package/dist/shell-shard/dispatch.js +2 -2
  176. package/dist/shell-shard/entries/PromptEntry.svelte +4 -4
  177. package/dist/shell-shard/entries/StatusEntry.svelte +4 -4
  178. package/dist/shell-shard/entries/TextEntry.svelte +3 -3
  179. package/dist/shell-shard/locateSlot.test.js +9 -9
  180. package/dist/shell-shard/manifest.js +2 -2
  181. package/dist/shell-shard/registry.d.ts +2 -2
  182. package/dist/shell-shard/rich/AppCard.svelte +1 -1
  183. package/dist/shell-shard/rich/AppsTable.svelte +1 -1
  184. package/dist/shell-shard/rich/HelpTable.svelte +1 -1
  185. package/dist/shell-shard/rich/HistoryList.svelte +1 -1
  186. package/dist/shell-shard/rich/ViewsTable.svelte +1 -1
  187. package/dist/shell-shard/rich/ZoneTree.svelte +2 -2
  188. package/dist/shell-shard/shellShard.svelte.d.ts +1 -1
  189. package/dist/shell-shard/shellShard.svelte.js +8 -8
  190. package/dist/shell-shard/terminal-dispatch.test.js +2 -2
  191. package/dist/shell-shard/toolbar/Toolbar.svelte +4 -4
  192. package/dist/shell-shard/toolbar/Toolbar.svelte.d.ts +2 -2
  193. package/dist/shell-shard/toolbar/slots/BusySlot.svelte +2 -2
  194. package/dist/shell-shard/toolbar/slots/FocusLockSlot.svelte +2 -2
  195. package/dist/shell-shard/toolbar/slots/ModeSlot.svelte +1 -1
  196. package/dist/shell-shard/toolbar/slots/TargetShardSlot.svelte +1 -1
  197. package/dist/shell-shard/toolbar/slots.d.ts +3 -3
  198. package/dist/shell-shard/verbs/apps.js +3 -3
  199. package/dist/shell-shard/verbs/help.js +1 -1
  200. package/dist/shell-shard/verbs/help.svelte.test.js +1 -1
  201. package/dist/shell-shard/verbs/history.js +1 -1
  202. package/dist/shell-shard/verbs/mode.js +2 -2
  203. package/dist/shell-shard/verbs/mode.test.js +2 -2
  204. package/dist/shell-shard/verbs/shards.js +1 -1
  205. package/dist/shell-shard/verbs/views.js +8 -8
  206. package/dist/shell-shard/verbs/zones.js +2 -2
  207. package/dist/state/zones.svelte.d.ts +2 -2
  208. package/dist/state/zones.svelte.js +4 -4
  209. package/dist/theme.d.ts +3 -3
  210. package/dist/theme.js +5 -5
  211. package/dist/tokens.css +68 -68
  212. package/dist/verbs/types.d.ts +5 -5
  213. package/dist/verbs/types.js +1 -1
  214. package/dist/version.d.ts +1 -1
  215. package/dist/version.js +1 -1
  216. package/package.json +1 -1
  217. package/dist/Shell.svelte.d.ts +0 -5
  218. package/dist/sh3core-shard/ShellHome.svelte.d.ts +0 -3
  219. package/dist/sh3core-shard/ShellTitle.svelte.d.ts +0 -3
  220. package/dist/shell-shard/shellApi.d.ts +0 -4
  221. /package/dist/actions/{shellActions.test.d.ts → sh3Actions.test.d.ts} +0 -0
  222. /package/dist/{shell-shard/shellApi.svelte.test.d.ts → build.test.d.ts} +0 -0
  223. /package/dist/color/{shell-api.d.ts → sh3-api.d.ts} +0 -0
  224. /package/dist/conflicts/{shell-api.d.ts → sh3-api.d.ts} +0 -0
  225. /package/dist/{shell → sh3}/views/KeysAndPeers.svelte.d.ts +0 -0
  226. /package/dist/{shellApi/window.test.d.ts → sh3Api/headless.svelte.test.d.ts} +0 -0
  227. /package/dist/{shellApi → sh3Api}/window.d.ts +0 -0
  228. /package/dist/{shellRuntime.svelte.test.d.ts → sh3Api/window.test.d.ts} +0 -0
@@ -54,33 +54,33 @@
54
54
  .uninstall-dialog {
55
55
  padding: 16px 20px;
56
56
  max-width: 460px;
57
- color: var(--shell-fg);
58
- background: var(--shell-bg);
57
+ color: var(--sh3-fg);
58
+ background: var(--sh3-bg);
59
59
  font: inherit;
60
60
  }
61
61
  h2 { margin: 0 0 8px; font-size: 16px; }
62
62
  p { margin: 4px 0; font-size: 13px; }
63
- .hint { color: var(--shell-fg-muted); font-size: 12px; }
64
- .error { color: var(--shell-error, #c33); }
63
+ .hint { color: var(--sh3-fg-muted); font-size: 12px; }
64
+ .error { color: var(--sh3-error, #c33); }
65
65
  code {
66
- font-family: var(--shell-font-mono, monospace);
67
- background: var(--shell-bg-elevated);
66
+ font-family: var(--sh3-font-mono, monospace);
67
+ background: var(--sh3-bg-elevated);
68
68
  padding: 0 4px;
69
- border-radius: var(--shell-radius-sm, 3px);
69
+ border-radius: var(--sh3-radius-sm, 3px);
70
70
  }
71
71
  .actions { display: flex; gap: 8px; margin-top: 16px; }
72
72
  .actions button {
73
- background: var(--shell-bg-elevated);
74
- color: var(--shell-fg);
75
- border: 1px solid var(--shell-border);
76
- border-radius: var(--shell-radius-sm, 3px);
73
+ background: var(--sh3-bg-elevated);
74
+ color: var(--sh3-fg);
75
+ border: 1px solid var(--sh3-border);
76
+ border-radius: var(--sh3-radius-sm, 3px);
77
77
  padding: 6px 14px; font: inherit; cursor: pointer;
78
78
  }
79
79
  .actions button.danger {
80
- background: var(--shell-error, #c33);
80
+ background: var(--sh3-error, #c33);
81
81
  color: #fff;
82
- border-color: var(--shell-error, #c33);
82
+ border-color: var(--sh3-error, #c33);
83
83
  }
84
- .actions button:hover { border-color: var(--shell-accent); }
84
+ .actions button:hover { border-color: var(--sh3-accent); }
85
85
  .actions button:disabled { opacity: 0.5; cursor: not-allowed; }
86
86
  </style>
@@ -6,7 +6,7 @@
6
6
  * - `sh3-store:browse` — searchable/filterable catalog of available packages
7
7
  *
8
8
  * Uninstall and update flows for already-installed packages live on the
9
- * shell home card's context menu (see `sh3core-shard/appActions.ts`); this
9
+ * sh3 home card's context menu (see `sh3core-shard/appActions.ts`); this
10
10
  * shard exposes the underlying operations as verbs (`installVerb`,
11
11
  * `uninstallVerb`, `updateVerb`, `appinfoVerb`) and via `storeContext`.
12
12
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Store verbs — shell-accessible commands for the sh3-store shard.
2
+ * Store verbs — sh3-accessible commands for the sh3-store shard.
3
3
  *
4
4
  * Registered during storeShard.activate() via ctx.registerVerb().
5
5
  * Auto-prefixed to sh3-store:install, sh3-store:uninstall, sh3-store:appinfo.
@@ -63,7 +63,7 @@ export declare function unloadApp(id: string, skipSwitchToHome?: boolean): void;
63
63
  */
64
64
  export declare function unregisterApp(id: string): void;
65
65
  /**
66
- * Return to the shell home view without unloading the active app. The
66
+ * Return to the sh3 home view without unloading the active app. The
67
67
  * app's shards stay running, its layout proxy stays attached with its
68
68
  * refcount hold intact, and its view containers stay alive in the pool.
69
69
  * Launching the same app again is a root swap only.
@@ -2,9 +2,9 @@
2
2
  * App lifecycle — launch, unload, return-to-home.
3
3
  *
4
4
  * All three functions operate on the shared apps registry and the layout
5
- * manager. `launchApp` is public (shell home calls it); `unloadApp` is
5
+ * manager. `launchApp` is public (sh3 home calls it); `unloadApp` is
6
6
  * internal (called from launchApp when replacing a different app);
7
- * `returnToHome` is public (shell UI calls it).
7
+ * `returnToHome` is public (sh3 UI calls it).
8
8
  *
9
9
  * "Last active app" is persisted in the user state zone under the
10
10
  * reserved shardId `__sh3core__:last-app`. The value shape is simply
@@ -147,7 +147,7 @@ export async function launchApp(id, opts = {}) {
147
147
  toastManager.notify(`Couldn't launch "${(_e = app.manifest.label) !== null && _e !== void 0 ? _e : id}": ${err instanceof Error ? err.message : String(err)}`, { level: 'error', duration: 6000 });
148
148
  }
149
149
  catch (_j) {
150
- // Toast layer not mounted (e.g. early boot, tests without Shell).
150
+ // Toast layer not mounted (e.g. early boot, tests without Sh3).
151
151
  // Best-effort UX — original error must still propagate.
152
152
  }
153
153
  throw err;
@@ -236,7 +236,7 @@ export function unregisterApp(id) {
236
236
  }
237
237
  // ---------- return to home -----------------------------------------------
238
238
  /**
239
- * Return to the shell home view without unloading the active app. The
239
+ * Return to the sh3 home view without unloading the active app. The
240
240
  * app's shards stay running, its layout proxy stays attached with its
241
241
  * refcount hold intact, and its view containers stay alive in the pool.
242
242
  * Launching the same app again is a root swap only.
@@ -446,8 +446,8 @@ describe('sh3coreShard — sh3.app.reset-layout registration', () => {
446
446
  initialLayout: [{ name: 'main', tree: makeTree(makeSlotNode('x')) }],
447
447
  }));
448
448
  await launchApp('reset-action-1');
449
- const { shell } = await import('../shellRuntime.svelte');
450
- const actions = shell.actions.listActive();
449
+ const { sh3 } = await import('../sh3Runtime.svelte');
450
+ const actions = sh3.actions.listActive();
451
451
  const reset = actions.find((a) => a.id === 'sh3.app.reset-layout');
452
452
  expect(reset).toBeDefined();
453
453
  expect(reset === null || reset === void 0 ? void 0 : reset.label).toBe('Reset Current Layout');
@@ -467,10 +467,10 @@ describe('sh3coreShard — sh3.app.reset-layout registration', () => {
467
467
  initialLayout: [{ name: 'main', tree: makeTree(makeSlotNode('x')) }],
468
468
  }));
469
469
  await launchApp('reset-action-2');
470
- const { shell } = await import('../shellRuntime.svelte');
471
- expect(shell.actions.listActive().some((a) => a.id === 'sh3.app.reset-layout')).toBe(true);
470
+ const { sh3 } = await import('../sh3Runtime.svelte');
471
+ expect(sh3.actions.listActive().some((a) => a.id === 'sh3.app.reset-layout')).toBe(true);
472
472
  await returnToHome();
473
- expect(shell.actions.listActive().some((a) => a.id === 'sh3.app.reset-layout')).toBe(false);
473
+ expect(sh3.actions.listActive().some((a) => a.id === 'sh3.app.reset-layout')).toBe(false);
474
474
  });
475
475
  });
476
476
  // ---------------------------------------------------------------------------
@@ -6,7 +6,7 @@ import type { App, AppManifest } from './types';
6
6
  */
7
7
  export declare const registeredApps: Map<string, App>;
8
8
  /**
9
- * Reactive slot tracking the currently-active app id. Null when the shell is
9
+ * Reactive slot tracking the currently-active app id. Null when the sh3 is
10
10
  * showing the home screen or no app has been launched yet. Phase 8 allows at
11
11
  * most one active app at a time.
12
12
  */
@@ -40,7 +40,7 @@ export declare function __resetBreadcrumbForTest(): void;
40
40
  */
41
41
  export declare function registerApp(app: App): void;
42
42
  /**
43
- * Reactive snapshot of all registered app manifests. Shell home iterates
43
+ * Reactive snapshot of all registered app manifests. Sh3 home iterates
44
44
  * this to populate its launcher list. Returns only manifests so callers
45
45
  * don't reach into app bodies (initialLayout, activate hook) — those are
46
46
  * launch-time concerns.
@@ -3,7 +3,7 @@
3
3
  * single slot for the currently-active app.
4
4
  *
5
5
  * Registration is called from the host (main.ts glob loop or a future
6
- * runtime loader). The shell home view reads `listRegisteredApps()`
6
+ * runtime loader). The sh3 home view reads `listRegisteredApps()`
7
7
  * reactively so newly-registered apps appear in the list without
8
8
  * reboot. `activeApp` tracks which app (if any) is currently launched;
9
9
  * phase 8 allows at most one.
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export const registeredApps = $state(new Map());
17
17
  /**
18
- * Reactive slot tracking the currently-active app id. Null when the shell is
18
+ * Reactive slot tracking the currently-active app id. Null when the sh3 is
19
19
  * showing the home screen or no app has been launched yet. Phase 8 allows at
20
20
  * most one active app at a time.
21
21
  */
@@ -51,7 +51,7 @@ export function registerApp(app) {
51
51
  registeredApps.set(app.manifest.id, app);
52
52
  }
53
53
  /**
54
- * Reactive snapshot of all registered app manifests. Shell home iterates
54
+ * Reactive snapshot of all registered app manifests. Sh3 home iterates
55
55
  * this to populate its launcher list. Returns only manifests so callers
56
56
  * don't reach into app bodies (initialLayout, activate hook) — those are
57
57
  * launch-time concerns.
@@ -53,7 +53,7 @@ export interface AppManifest {
53
53
  */
54
54
  layoutVersion: number;
55
55
  /**
56
- * When true, the app is only visible on the shell home screen in
56
+ * When true, the app is only visible on the sh3 home screen in
57
57
  * admin mode. Server-side routes may still enforce their own auth
58
58
  * independently. Defaults to false (visible to everyone).
59
59
  */
@@ -65,15 +65,15 @@
65
65
  align-items: center;
66
66
  justify-content: center;
67
67
  gap: 12px;
68
- padding: 6px var(--shell-pad-md, 12px);
69
- background: color-mix(in srgb, var(--shell-accent, #7c7cf0) 15%, transparent);
70
- border-bottom: 1px solid var(--shell-border, #3a3a5c);
68
+ padding: 6px var(--sh3-pad-md, 12px);
69
+ background: color-mix(in srgb, var(--sh3-accent, #7c7cf0) 15%, transparent);
70
+ border-bottom: 1px solid var(--sh3-border, #3a3a5c);
71
71
  font-size: 12px;
72
- color: var(--shell-fg, #e0e0e0);
72
+ color: var(--sh3-fg, #e0e0e0);
73
73
  }
74
74
  .guest-banner-action {
75
75
  padding: 3px 10px;
76
- color: var(--shell-bg, #1a1a2e);
76
+ color: var(--sh3-bg, #1a1a2e);
77
77
  font-size: 11px;
78
78
  font-weight: 600;
79
79
  }
@@ -91,9 +91,9 @@
91
91
  flex-direction: column;
92
92
  gap: 12px;
93
93
  padding: 32px;
94
- background: var(--shell-bg-elevated, #252540);
95
- border: 1px solid var(--shell-border, #3a3a5c);
96
- border-radius: var(--shell-radius-lg, 12px);
94
+ background: var(--sh3-bg-elevated, #252540);
95
+ border: 1px solid var(--sh3-border, #3a3a5c);
96
+ border-radius: var(--sh3-radius-lg, 12px);
97
97
  min-width: 300px;
98
98
  }
99
99
  .guest-signin-form {
@@ -103,32 +103,32 @@
103
103
  }
104
104
  .guest-signin-input {
105
105
  padding: 8px 12px;
106
- background: var(--shell-bg, #1a1a2e);
107
- color: var(--shell-fg, #e0e0e0);
108
- border: 1px solid var(--shell-border, #3a3a5c);
109
- border-radius: var(--shell-radius, 6px);
106
+ background: var(--sh3-bg, #1a1a2e);
107
+ color: var(--sh3-fg, #e0e0e0);
108
+ border: 1px solid var(--sh3-border, #3a3a5c);
109
+ border-radius: var(--sh3-radius, 6px);
110
110
  font-size: 13px;
111
111
  }
112
- .guest-signin-input::placeholder { color: var(--shell-fg-muted, #888); }
112
+ .guest-signin-input::placeholder { color: var(--sh3-fg-muted, #888); }
113
113
  .guest-signin-actions { display: flex; gap: 8px; }
114
114
  .guest-signin-btn {
115
115
  flex: 1;
116
116
  padding: 8px;
117
- color: var(--shell-bg, #1a1a2e);
117
+ color: var(--sh3-bg, #1a1a2e);
118
118
  font-weight: 600;
119
119
  }
120
120
  .guest-signin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
121
121
  .guest-signin-cancel {
122
122
  padding: 8px 12px;
123
123
  background: transparent;
124
- color: var(--shell-fg-subtle, #aaa);
125
- border: 1px solid var(--shell-border, #3a3a5c);
124
+ color: var(--sh3-fg-subtle, #aaa);
125
+ border: 1px solid var(--sh3-border, #3a3a5c);
126
126
  }
127
127
  .guest-signin-error {
128
128
  padding: 6px 10px;
129
129
  font-size: 12px;
130
- color: var(--shell-error, #d32f2f);
131
- background: color-mix(in srgb, var(--shell-error, #d32f2f) 10%, transparent);
132
- border-radius: var(--shell-radius, 6px);
130
+ color: var(--sh3-error, #d32f2f);
131
+ background: color-mix(in srgb, var(--sh3-error, #d32f2f) 10%, transparent);
132
+ border-radius: var(--sh3-radius, 6px);
133
133
  }
134
134
  </style>
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  /**
3
- * SignInWall — standalone sign-in screen shown before shell boots.
3
+ * SignInWall — standalone sign-in screen shown before sh3 boots.
4
4
  * Mounted directly to the target element by createShell().
5
5
  */
6
6
 
@@ -134,8 +134,8 @@
134
134
  display: flex;
135
135
  align-items: center;
136
136
  justify-content: center;
137
- background: var(--shell-grad-bg, var(--shell-bg, #1a1a2e));
138
- color: var(--shell-fg, #e0e0e0);
137
+ background: var(--sh3-grad-bg, var(--sh3-bg, #1a1a2e));
138
+ color: var(--sh3-fg, #e0e0e0);
139
139
  font-family: system-ui, sans-serif;
140
140
  }
141
141
  .signin-card {
@@ -144,15 +144,15 @@
144
144
  align-items: center;
145
145
  gap: 16px;
146
146
  padding: 48px 40px;
147
- background: var(--shell-grad-bg-elevated, var(--shell-bg-elevated, #252540));
148
- border: 1px solid var(--shell-border, #3a3a5c);
149
- border-radius: var(--shell-radius-lg, 12px);
147
+ background: var(--sh3-grad-bg-elevated, var(--sh3-bg-elevated, #252540));
148
+ border: 1px solid var(--sh3-border, #3a3a5c);
149
+ border-radius: var(--sh3-radius-lg, 12px);
150
150
  min-width: 320px;
151
151
  }
152
152
  .signin-brand {
153
153
  margin: 0 0 8px;
154
154
  font-size: 42px;
155
- color: var(--shell-accent, #7c7cf0);
155
+ color: var(--sh3-accent, #7c7cf0);
156
156
  letter-spacing: 2px;
157
157
  }
158
158
  .signin-form {
@@ -163,18 +163,18 @@
163
163
  }
164
164
  .signin-input {
165
165
  padding: 10px 14px;
166
- background: var(--shell-bg, #1a1a2e);
167
- color: var(--shell-fg, #e0e0e0);
168
- border: 1px solid var(--shell-border, #3a3a5c);
169
- border-radius: var(--shell-radius, 6px);
166
+ background: var(--sh3-bg, #1a1a2e);
167
+ color: var(--sh3-fg, #e0e0e0);
168
+ border: 1px solid var(--sh3-border, #3a3a5c);
169
+ border-radius: var(--sh3-radius, 6px);
170
170
  font-size: 14px;
171
171
  }
172
172
  .signin-input::placeholder {
173
- color: var(--shell-fg-muted, #888);
173
+ color: var(--sh3-fg-muted, #888);
174
174
  }
175
175
  .signin-btn {
176
176
  padding: 10px 16px;
177
- color: var(--shell-bg, #1a1a2e);
177
+ color: var(--sh3-bg, #1a1a2e);
178
178
  font-weight: 600;
179
179
  font-size: 14px;
180
180
  }
@@ -184,7 +184,7 @@
184
184
  }
185
185
  .signin-link {
186
186
  background: none;
187
- color: var(--shell-accent, #7c7cf0);
187
+ color: var(--sh3-accent, #7c7cf0);
188
188
  font-size: 13px;
189
189
  padding: 0;
190
190
  }
@@ -194,9 +194,9 @@
194
194
  .signin-error {
195
195
  padding: 8px 12px;
196
196
  font-size: 13px;
197
- color: var(--shell-error, #d32f2f);
198
- background: color-mix(in srgb, var(--shell-error, #d32f2f) 10%, transparent);
199
- border-radius: var(--shell-radius, 6px);
197
+ color: var(--sh3-error, #d32f2f);
198
+ background: color-mix(in srgb, var(--sh3-error, #d32f2f) 10%, transparent);
199
+ border-radius: var(--sh3-radius, 6px);
200
200
  width: 100%;
201
201
  text-align: center;
202
202
  }
@@ -4,7 +4,7 @@
4
4
  * The boot flow (createShell) calls initFromBoot() with the server's
5
5
  * boot config. After that, login/logout call the server and update
6
6
  * the reactive state. isAdmin/isGuest/isAuthenticated are reactive
7
- * getters consumed by shell components.
7
+ * getters consumed by sh3 components.
8
8
  *
9
9
  * .svelte.ts because it uses $state for reactive auth status.
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * The boot flow (createShell) calls initFromBoot() with the server's
5
5
  * boot config. After that, login/logout call the server and update
6
6
  * the reactive state. isAdmin/isGuest/isAuthenticated are reactive
7
- * getters consumed by shell components.
7
+ * getters consumed by sh3 components.
8
8
  *
9
9
  * .svelte.ts because it uses $state for reactive auth status.
10
10
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Satellite payload — what a host shell tells a freshly-spawned satellite
2
+ * Satellite payload — what a host sh3 tells a freshly-spawned satellite
3
3
  * window to render. Encoded as URL-safe base64 JSON in the `payload` query
4
4
  * param of the satellite's URL.
5
5
  */
package/dist/build.d.ts CHANGED
@@ -36,7 +36,34 @@ export interface Sh3ArtifactOptions {
36
36
  serverEntry?: string;
37
37
  /** Override manifest fields not extractable from code (description, author, requires). */
38
38
  manifest?: Partial<Pick<ArtifactManifest, 'description' | 'author' | 'requires'>>;
39
+ /**
40
+ * Append a semver build-metadata suffix to the artifact `version` written
41
+ * into `manifest.json`. Per ADR-013 the package.json version remains the
42
+ * release-version source; this option layers an artifact-level counter on
43
+ * top so test iterations and hotfix variants of the same release can ship
44
+ * as distinct artifacts without bumping the release number.
45
+ *
46
+ * - omit / undefined: artifact version equals package.json.version (default).
47
+ * - 'auto': resolved from `git describe --tags --abbrev=0` →
48
+ * `git rev-list --count <tag>..HEAD`. Suffix is omitted when the
49
+ * count is 0 (canonical release) or when git is unavailable.
50
+ * - string: literal suffix. Empty string is treated as no suffix.
51
+ *
52
+ * Example: package.json says "1.2.3", git is 4 commits past `v1.2.3` →
53
+ * manifest.json says `"version": "1.2.3+4"`.
54
+ */
55
+ buildSuffix?: 'auto' | string;
39
56
  }
57
+ /**
58
+ * Compose a release version (`pkgVersion`) with an optional semver
59
+ * build-metadata suffix. Pure function — no I/O — for testability.
60
+ *
61
+ * Returns `pkgVersion` unchanged when `suffix` is empty/undefined.
62
+ * Throws when `pkgVersion` already carries build metadata or when the
63
+ * suffix is not a valid semver build-metadata identifier
64
+ * (dot-separated `[0-9A-Za-z-]+`).
65
+ */
66
+ export declare function composeArtifactVersion(pkgVersion: string, suffix: string | undefined): string;
40
67
  /**
41
68
  * Vite plugin that produces a distributable artifact directory after build.
42
69
  *
package/dist/build.js CHANGED
@@ -17,6 +17,7 @@
17
17
  * });
18
18
  */
19
19
  import { readFileSync, writeFileSync, unlinkSync, readdirSync, copyFileSync, existsSync } from 'node:fs';
20
+ import { execSync } from 'node:child_process';
20
21
  import { join } from 'node:path';
21
22
  /**
22
23
  * Vite plugin that inlines extracted CSS into the JS bundle.
@@ -83,6 +84,52 @@ export function sh3CssInline() {
83
84
  },
84
85
  };
85
86
  }
87
+ /**
88
+ * Compose a release version (`pkgVersion`) with an optional semver
89
+ * build-metadata suffix. Pure function — no I/O — for testability.
90
+ *
91
+ * Returns `pkgVersion` unchanged when `suffix` is empty/undefined.
92
+ * Throws when `pkgVersion` already carries build metadata or when the
93
+ * suffix is not a valid semver build-metadata identifier
94
+ * (dot-separated `[0-9A-Za-z-]+`).
95
+ */
96
+ export function composeArtifactVersion(pkgVersion, suffix) {
97
+ if (!suffix)
98
+ return pkgVersion;
99
+ if (pkgVersion.includes('+')) {
100
+ throw new Error(`[sh3-artifact] package.json version "${pkgVersion}" already contains semver build metadata; cannot append additional suffix "${suffix}".`);
101
+ }
102
+ if (!/^[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*$/.test(suffix)) {
103
+ throw new Error(`[sh3-artifact] buildSuffix "${suffix}" is not a valid semver build-metadata identifier (expected dot-separated [0-9A-Za-z-]+).`);
104
+ }
105
+ return `${pkgVersion}+${suffix}`;
106
+ }
107
+ /**
108
+ * Resolve the auto build suffix from git: count of commits between the
109
+ * latest reachable tag and HEAD. Returns '' if git is unavailable, no
110
+ * tags exist, or HEAD is exactly at the tag (canonical release).
111
+ */
112
+ function resolveAutoBuildSuffix() {
113
+ try {
114
+ const lastTag = execSync('git describe --tags --abbrev=0', {
115
+ encoding: 'utf-8',
116
+ stdio: ['ignore', 'pipe', 'ignore'],
117
+ }).trim();
118
+ if (!lastTag)
119
+ return '';
120
+ const count = execSync(`git rev-list --count ${lastTag}..HEAD`, {
121
+ encoding: 'utf-8',
122
+ stdio: ['ignore', 'pipe', 'ignore'],
123
+ }).trim();
124
+ const n = parseInt(count, 10);
125
+ if (!Number.isFinite(n) || n <= 0)
126
+ return '';
127
+ return String(n);
128
+ }
129
+ catch (_a) {
130
+ return '';
131
+ }
132
+ }
86
133
  /**
87
134
  * Vite plugin that produces a distributable artifact directory after build.
88
135
  *
@@ -224,6 +271,17 @@ export function sh3Artifact(options = {}) {
224
271
  throw new Error('[sh3-artifact] Missing "version" in package.json. Per ADR-013 the package '
225
272
  + 'version is read from package.json, not from the source manifest.');
226
273
  }
274
+ // --- Resolve build suffix and compose the artifact version ---
275
+ // Per ADR-013 amendment: package.json holds the release version;
276
+ // sh3Artifact may layer a build-metadata suffix on top.
277
+ let resolvedSuffix = '';
278
+ if (options.buildSuffix === 'auto') {
279
+ resolvedSuffix = resolveAutoBuildSuffix();
280
+ }
281
+ else if (typeof options.buildSuffix === 'string') {
282
+ resolvedSuffix = options.buildSuffix;
283
+ }
284
+ const artifactVersion = composeArtifactVersion(pkgVersion, resolvedSuffix);
227
285
  // --- Write manifest.json ---
228
286
  const overrides = (_c = options.manifest) !== null && _c !== void 0 ? _c : {};
229
287
  const finalDescription = (_d = overrides.description) !== null && _d !== void 0 ? _d : pkgDescription;
@@ -234,7 +292,7 @@ export function sh3Artifact(options = {}) {
234
292
  if (!finalAuthor) {
235
293
  throw new Error('[sh3-artifact] Missing "author". Add it to package.json or pass it via sh3Artifact({ manifest: { author } }).');
236
294
  }
237
- const manifest = Object.assign(Object.assign(Object.assign({ id: id || 'unknown', type, label: label || id || 'unknown', version: pkgVersion, contractVersion: 1, client: 'client.js' }, (hasServer ? { server: 'server.js' } : {})), { description: finalDescription, author: finalAuthor }), overrides);
295
+ const manifest = Object.assign(Object.assign(Object.assign({ id: id || 'unknown', type, label: label || id || 'unknown', version: artifactVersion, contractVersion: 1, client: 'client.js' }, (hasServer ? { server: 'server.js' } : {})), { description: finalDescription, author: finalAuthor }), overrides);
238
296
  writeFileSync(join(outDir, 'manifest.json'), JSON.stringify(manifest, null, 2) + '\n');
239
297
  // --- Log summary ---
240
298
  const files = ['manifest.json', 'client.js'];
@@ -0,0 +1,31 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { composeArtifactVersion } from './build';
3
+ describe('composeArtifactVersion', () => {
4
+ it('returns pkgVersion unchanged when suffix is undefined', () => {
5
+ expect(composeArtifactVersion('1.2.3', undefined)).toBe('1.2.3');
6
+ });
7
+ it('returns pkgVersion unchanged when suffix is empty string', () => {
8
+ expect(composeArtifactVersion('1.2.3', '')).toBe('1.2.3');
9
+ });
10
+ it('appends a numeric suffix as build metadata', () => {
11
+ expect(composeArtifactVersion('1.2.3', '42')).toBe('1.2.3+42');
12
+ });
13
+ it('appends dotted alphanumeric suffix as build metadata', () => {
14
+ expect(composeArtifactVersion('1.2.3', 'build.42')).toBe('1.2.3+build.42');
15
+ });
16
+ it('composes onto a prerelease version (semver allows -pre+meta)', () => {
17
+ expect(composeArtifactVersion('1.2.3-rc.1', '7')).toBe('1.2.3-rc.1+7');
18
+ });
19
+ it('throws when pkgVersion already has build metadata', () => {
20
+ expect(() => composeArtifactVersion('1.2.3+local', '42')).toThrow(/already contains semver build metadata/);
21
+ });
22
+ it('throws when suffix contains an invalid character', () => {
23
+ expect(() => composeArtifactVersion('1.2.3', 'build_42')).toThrow(/not a valid semver build-metadata identifier/);
24
+ });
25
+ it('throws when suffix has empty dot-separated identifier', () => {
26
+ expect(() => composeArtifactVersion('1.2.3', 'build..42')).toThrow(/not a valid semver build-metadata identifier/);
27
+ });
28
+ it('throws when suffix starts with a plus', () => {
29
+ expect(() => composeArtifactVersion('1.2.3', '+42')).toThrow(/not a valid semver build-metadata identifier/);
30
+ });
31
+ });
@@ -22,7 +22,7 @@ export interface ColorContribution {
22
22
  priority?: number;
23
23
  open(opts: ColorPickOptions): Promise<string | null>;
24
24
  }
25
- /** Shell-level color API, mounted at `shell.color`. */
25
+ /** Sh3-level color API, mounted at `sh3.color`. */
26
26
  export interface ColorApi {
27
27
  /**
28
28
  * Open a color picker. Resolves with the chosen color as '#rrggbb'
package/dist/color/api.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Public types for the color-picker contribution point.
3
3
  *
4
4
  * A contribution registered at COLOR_PICKER_POINT is picked by the
5
- * primitive in ./primitive.ts when `shell.color.pick()` is called.
5
+ * primitive in ./primitive.ts when `sh3.color.pick()` is called.
6
6
  * The native <input type="color"> fallback is inlined there at priority 0;
7
7
  * contributed pickers typically register at priority >= 10.
8
8
  */
@@ -1,9 +1,9 @@
1
1
  /*
2
- * shell.color assembled API.
2
+ * sh3.color assembled API.
3
3
  *
4
4
  * The selector + inlined native fallback live in primitive.ts;
5
- * this file just binds `pick` onto the object exposed on the shell
6
- * singleton, mirroring conflicts/shell-api.ts.
5
+ * this file just binds `pick` onto the object exposed on the sh3
6
+ * singleton, mirroring conflicts/sh3-api.ts.
7
7
  */
8
8
  import { pickColor } from './primitive';
9
9
  export const colorApi = {
@@ -16,7 +16,7 @@
16
16
  skipped: string[],
17
17
  ) => void;
18
18
  onCancel: () => void;
19
- /** Provided by shell.modal.open wrapping; we must call to actually close. */
19
+ /** Provided by sh3.modal.open wrapping; we must call to actually close. */
20
20
  close: () => void;
21
21
  }
22
22
  const props: Props = $props();
@@ -11,7 +11,7 @@ interface Props {
11
11
  meta?: Record<string, unknown>;
12
12
  }>, skipped: string[]) => void;
13
13
  onCancel: () => void;
14
- /** Provided by shell.modal.open wrapping; we must call to actually close. */
14
+ /** Provided by sh3.modal.open wrapping; we must call to actually close. */
15
15
  close: () => void;
16
16
  }
17
17
  declare const ConflictModal: import("svelte").Component<Props, {}, "">;