sh3-core 0.1.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.
- package/dist/Shell.svelte +185 -0
- package/dist/Shell.svelte.d.ts +4 -0
- package/dist/api.d.ts +22 -0
- package/dist/api.js +45 -0
- package/dist/apps/lifecycle.d.ts +37 -0
- package/dist/apps/lifecycle.js +153 -0
- package/dist/apps/registry.svelte.d.ts +37 -0
- package/dist/apps/registry.svelte.js +60 -0
- package/dist/apps/types.d.ts +61 -0
- package/dist/apps/types.js +10 -0
- package/dist/assets/icons.svg +1119 -0
- package/dist/auth/auth.svelte.d.ts +44 -0
- package/dist/auth/auth.svelte.js +119 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/build.d.ts +29 -0
- package/dist/build.js +85 -0
- package/dist/contract.d.ts +20 -0
- package/dist/contract.js +28 -0
- package/dist/documents/backends.d.ts +17 -0
- package/dist/documents/backends.js +156 -0
- package/dist/documents/config.d.ts +7 -0
- package/dist/documents/config.js +27 -0
- package/dist/documents/handle.d.ts +6 -0
- package/dist/documents/handle.js +154 -0
- package/dist/documents/http-backend.d.ts +22 -0
- package/dist/documents/http-backend.js +78 -0
- package/dist/documents/index.d.ts +6 -0
- package/dist/documents/index.js +8 -0
- package/dist/documents/notifications.d.ts +9 -0
- package/dist/documents/notifications.js +39 -0
- package/dist/documents/types.d.ts +97 -0
- package/dist/documents/types.js +12 -0
- package/dist/host-entry.d.ts +9 -0
- package/dist/host-entry.js +15 -0
- package/dist/host.d.ts +13 -0
- package/dist/host.js +73 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -0
- package/dist/layout/DragPreview.svelte +63 -0
- package/dist/layout/DragPreview.svelte.d.ts +3 -0
- package/dist/layout/LayoutRenderer.svelte +260 -0
- package/dist/layout/LayoutRenderer.svelte.d.ts +6 -0
- package/dist/layout/SlotContainer.svelte +140 -0
- package/dist/layout/SlotContainer.svelte.d.ts +8 -0
- package/dist/layout/SlotDropZone.svelte +122 -0
- package/dist/layout/SlotDropZone.svelte.d.ts +8 -0
- package/dist/layout/drag.svelte.d.ts +45 -0
- package/dist/layout/drag.svelte.js +191 -0
- package/dist/layout/inspection.d.ts +52 -0
- package/dist/layout/inspection.js +157 -0
- package/dist/layout/ops.d.ts +78 -0
- package/dist/layout/ops.js +281 -0
- package/dist/layout/slotHostPool.svelte.d.ts +36 -0
- package/dist/layout/slotHostPool.svelte.js +229 -0
- package/dist/layout/store.svelte.d.ts +39 -0
- package/dist/layout/store.svelte.js +150 -0
- package/dist/layout/tree-walk.d.ts +15 -0
- package/dist/layout/tree-walk.js +33 -0
- package/dist/layout/types.d.ts +108 -0
- package/dist/layout/types.js +25 -0
- package/dist/overlays/ModalFrame.svelte +87 -0
- package/dist/overlays/ModalFrame.svelte.d.ts +10 -0
- package/dist/overlays/PopupFrame.svelte +85 -0
- package/dist/overlays/PopupFrame.svelte.d.ts +10 -0
- package/dist/overlays/ToastItem.svelte +77 -0
- package/dist/overlays/ToastItem.svelte.d.ts +9 -0
- package/dist/overlays/focusTrap.d.ts +1 -0
- package/dist/overlays/focusTrap.js +64 -0
- package/dist/overlays/modal.d.ts +9 -0
- package/dist/overlays/modal.js +141 -0
- package/dist/overlays/popup.d.ts +9 -0
- package/dist/overlays/popup.js +108 -0
- package/dist/overlays/roots.d.ts +4 -0
- package/dist/overlays/roots.js +31 -0
- package/dist/overlays/toast.d.ts +6 -0
- package/dist/overlays/toast.js +93 -0
- package/dist/overlays/types.d.ts +31 -0
- package/dist/overlays/types.js +15 -0
- package/dist/primitives/.gitkeep +0 -0
- package/dist/primitives/ResizableSplitter.svelte +333 -0
- package/dist/primitives/ResizableSplitter.svelte.d.ts +35 -0
- package/dist/primitives/TabbedPanel.svelte +305 -0
- package/dist/primitives/TabbedPanel.svelte.d.ts +50 -0
- package/dist/registry/client.d.ts +74 -0
- package/dist/registry/client.js +118 -0
- package/dist/registry/index.d.ts +13 -0
- package/dist/registry/index.js +14 -0
- package/dist/registry/installer.d.ts +53 -0
- package/dist/registry/installer.js +170 -0
- package/dist/registry/integrity.d.ts +32 -0
- package/dist/registry/integrity.js +92 -0
- package/dist/registry/loader.d.ts +50 -0
- package/dist/registry/loader.js +145 -0
- package/dist/registry/schema.d.ts +47 -0
- package/dist/registry/schema.js +180 -0
- package/dist/registry/storage.d.ts +37 -0
- package/dist/registry/storage.js +101 -0
- package/dist/registry/types.d.ts +245 -0
- package/dist/registry/types.js +14 -0
- package/dist/registry-shard/RegistryView.svelte +561 -0
- package/dist/registry-shard/RegistryView.svelte.d.ts +3 -0
- package/dist/registry-shard/registryApp.d.ts +10 -0
- package/dist/registry-shard/registryApp.js +24 -0
- package/dist/registry-shard/registryShard.svelte.d.ts +45 -0
- package/dist/registry-shard/registryShard.svelte.js +125 -0
- package/dist/shards/activate.svelte.d.ts +45 -0
- package/dist/shards/activate.svelte.js +124 -0
- package/dist/shards/registry.d.ts +4 -0
- package/dist/shards/registry.js +28 -0
- package/dist/shards/types.d.ts +155 -0
- package/dist/shards/types.js +20 -0
- package/dist/shell-shard/ShellHome.svelte +285 -0
- package/dist/shell-shard/ShellHome.svelte.d.ts +3 -0
- package/dist/shell-shard/shellShard.svelte.d.ts +2 -0
- package/dist/shell-shard/shellShard.svelte.js +47 -0
- package/dist/shellRuntime.svelte.d.ts +27 -0
- package/dist/shellRuntime.svelte.js +27 -0
- package/dist/state/backends.d.ts +26 -0
- package/dist/state/backends.js +99 -0
- package/dist/state/types.d.ts +38 -0
- package/dist/state/types.js +15 -0
- package/dist/state/zones.svelte.d.ts +52 -0
- package/dist/state/zones.svelte.js +141 -0
- package/dist/store/InstalledView.svelte +201 -0
- package/dist/store/InstalledView.svelte.d.ts +3 -0
- package/dist/store/StoreView.svelte +470 -0
- package/dist/store/StoreView.svelte.d.ts +3 -0
- package/dist/store/storeApp.d.ts +11 -0
- package/dist/store/storeApp.js +26 -0
- package/dist/store/storeShard.svelte.d.ts +29 -0
- package/dist/store/storeShard.svelte.js +99 -0
- package/dist/tokens.css +79 -0
- package/package.json +50 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry protocol types.
|
|
3
|
+
*
|
|
4
|
+
* A registry is any static HTTP endpoint serving a `registry.json` index
|
|
5
|
+
* and pre-built ESM bundle files. These types define the wire format for
|
|
6
|
+
* the index document and the local metadata stored after installation.
|
|
7
|
+
*
|
|
8
|
+
* Registry flow:
|
|
9
|
+
* 1. Client fetches `<registryUrl>/registry.json` → `RegistryIndex`
|
|
10
|
+
* 2. User picks a `PackageEntry` and a `PackageVersion`
|
|
11
|
+
* 3. Client downloads `bundleUrl`, verifies `integrity`, hot-loads the ESM bundle
|
|
12
|
+
* 4. On success the client writes an `InstalledPackage` record to local storage
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Top-level registry index document.
|
|
16
|
+
*
|
|
17
|
+
* Served as static JSON at the root of any SH3 registry endpoint.
|
|
18
|
+
* The `version` field gates forward compatibility — clients that do not
|
|
19
|
+
* recognise the version must refuse to load the index.
|
|
20
|
+
*/
|
|
21
|
+
export interface RegistryIndex {
|
|
22
|
+
/**
|
|
23
|
+
* Protocol version discriminator. Currently always `1`.
|
|
24
|
+
* Future breaking changes increment this number.
|
|
25
|
+
*/
|
|
26
|
+
version: 1;
|
|
27
|
+
/**
|
|
28
|
+
* All packages published to this registry.
|
|
29
|
+
* Order is not defined by the protocol; store UI should sort as needed.
|
|
30
|
+
*/
|
|
31
|
+
packages: PackageEntry[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A single package (shard or app) listed in the registry.
|
|
35
|
+
*
|
|
36
|
+
* A package has a stable `id` and may publish multiple `versions`. The
|
|
37
|
+
* store UI displays `label`, `description`, `author`, and optional `icon`.
|
|
38
|
+
*/
|
|
39
|
+
export interface PackageEntry {
|
|
40
|
+
/**
|
|
41
|
+
* Unique, stable identifier for this package.
|
|
42
|
+
* Convention: `@author/package-name` or `plain-name`.
|
|
43
|
+
* Must not change across versions.
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether this package is a shard (module that contributes views/commands)
|
|
48
|
+
* or an app (composition document that wires shards into a layout).
|
|
49
|
+
*/
|
|
50
|
+
type: 'shard' | 'app';
|
|
51
|
+
/**
|
|
52
|
+
* Human-readable display name shown in the store UI.
|
|
53
|
+
* Should be short (under 40 characters).
|
|
54
|
+
*/
|
|
55
|
+
label: string;
|
|
56
|
+
/**
|
|
57
|
+
* Short description shown in the store UI.
|
|
58
|
+
* Should be one or two sentences, plain text.
|
|
59
|
+
*/
|
|
60
|
+
description: string;
|
|
61
|
+
/**
|
|
62
|
+
* Author information. Extended fields (email, url) may be added
|
|
63
|
+
* in future protocol versions.
|
|
64
|
+
*/
|
|
65
|
+
author: {
|
|
66
|
+
/** Human-readable author name. */
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Optional URL to a square icon image (PNG or SVG recommended).
|
|
71
|
+
* Displayed in the store package card. If omitted the store shows
|
|
72
|
+
* a generic placeholder.
|
|
73
|
+
*/
|
|
74
|
+
icon?: string;
|
|
75
|
+
/**
|
|
76
|
+
* All published versions of this package, newest-first by convention.
|
|
77
|
+
* Must contain at least one entry.
|
|
78
|
+
*/
|
|
79
|
+
versions: PackageVersion[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A specific published version of a package.
|
|
83
|
+
*
|
|
84
|
+
* Each version ships a self-contained pre-built ESM bundle at `bundleUrl`.
|
|
85
|
+
* The `integrity` field is an SRI hash (sha384 recommended) used to verify
|
|
86
|
+
* the download before execution.
|
|
87
|
+
*/
|
|
88
|
+
export interface PackageVersion {
|
|
89
|
+
/**
|
|
90
|
+
* Semver version string (e.g. `"1.2.3"`).
|
|
91
|
+
* Must be unique within a `PackageEntry.versions` array.
|
|
92
|
+
*/
|
|
93
|
+
version: string;
|
|
94
|
+
/**
|
|
95
|
+
* The `sh3-framework` contract version this bundle was built against
|
|
96
|
+
* (e.g. `"0.1.0"`). The install API checks this against the running
|
|
97
|
+
* framework version and may warn or block on mismatch.
|
|
98
|
+
*/
|
|
99
|
+
contractVersion: string;
|
|
100
|
+
/**
|
|
101
|
+
* Absolute or registry-relative URL to the pre-built ESM bundle.
|
|
102
|
+
* The client fetches this URL and verifies the download against `integrity`
|
|
103
|
+
* before executing.
|
|
104
|
+
*/
|
|
105
|
+
bundleUrl: string;
|
|
106
|
+
/**
|
|
107
|
+
* SRI integrity hash for the bundle file.
|
|
108
|
+
* Format: `"<algorithm>-<base64digest>"` (e.g. `"sha384-abc123..."`).
|
|
109
|
+
* Algorithms: sha256, sha384 (recommended), sha512.
|
|
110
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
|
111
|
+
*/
|
|
112
|
+
integrity: string;
|
|
113
|
+
/**
|
|
114
|
+
* Other shards that must be installed and active before this package
|
|
115
|
+
* can be loaded. Optional — omit if the package has no dependencies.
|
|
116
|
+
*
|
|
117
|
+
* For apps: lists the shards the app's layout references.
|
|
118
|
+
* For shards: lists shards this shard imports from at runtime.
|
|
119
|
+
* Version ranges follow semver (e.g. `"^2.0.0"`, `">=1.0.0 <2.0.0"`).
|
|
120
|
+
*/
|
|
121
|
+
requires?: RequiredDependency[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A declared dependency on another shard with a semver version range.
|
|
125
|
+
*
|
|
126
|
+
* The install API resolves and validates all dependencies before loading
|
|
127
|
+
* the bundle, refusing to install if a dependency is missing or incompatible.
|
|
128
|
+
*/
|
|
129
|
+
export interface RequiredDependency {
|
|
130
|
+
/**
|
|
131
|
+
* The shard id that must be present.
|
|
132
|
+
* Must match a `PackageEntry.id` in some available registry.
|
|
133
|
+
*/
|
|
134
|
+
id: string;
|
|
135
|
+
/**
|
|
136
|
+
* Semver range the installed shard version must satisfy.
|
|
137
|
+
* Examples: `"^1.0.0"`, `">=2.0.0 <3.0.0"`, `"1.2.x"`.
|
|
138
|
+
* Uses standard semver range notation.
|
|
139
|
+
*/
|
|
140
|
+
versionRange: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Metadata for an installed package, persisted in local storage.
|
|
144
|
+
*
|
|
145
|
+
* Written by the install API on successful installation. Used to show
|
|
146
|
+
* installed/update-available status in the store UI, and to reconstruct
|
|
147
|
+
* the package registry after a page reload without re-fetching remote indices.
|
|
148
|
+
*/
|
|
149
|
+
export interface InstalledPackage {
|
|
150
|
+
/**
|
|
151
|
+
* Package id. Matches the `PackageEntry.id` from the registry.
|
|
152
|
+
*/
|
|
153
|
+
id: string;
|
|
154
|
+
/**
|
|
155
|
+
* Whether this is a shard or an app.
|
|
156
|
+
*/
|
|
157
|
+
type: 'shard' | 'app';
|
|
158
|
+
/**
|
|
159
|
+
* The version that was installed.
|
|
160
|
+
*/
|
|
161
|
+
version: string;
|
|
162
|
+
/**
|
|
163
|
+
* URL of the registry this package was fetched from.
|
|
164
|
+
* Stored so the store UI can check for updates from the same source.
|
|
165
|
+
*/
|
|
166
|
+
sourceRegistry: string;
|
|
167
|
+
/**
|
|
168
|
+
* The `sh3-framework` contract version the installed bundle was built
|
|
169
|
+
* against. Used to detect contract version mismatches after framework
|
|
170
|
+
* upgrades.
|
|
171
|
+
*/
|
|
172
|
+
contractVersion: string;
|
|
173
|
+
/**
|
|
174
|
+
* ISO 8601 timestamp of when the package was installed.
|
|
175
|
+
* Example: `"2026-04-06T12:34:56.789Z"`.
|
|
176
|
+
*/
|
|
177
|
+
installedAt: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Result of an install operation.
|
|
181
|
+
*
|
|
182
|
+
* Returned by the framework install API after attempting to download,
|
|
183
|
+
* verify, and hot-load a package bundle.
|
|
184
|
+
*/
|
|
185
|
+
export interface InstallResult {
|
|
186
|
+
/**
|
|
187
|
+
* Whether the installation succeeded.
|
|
188
|
+
* On `false`, inspect `error` for the reason.
|
|
189
|
+
*/
|
|
190
|
+
success: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* The `InstalledPackage` record written to local storage on success.
|
|
193
|
+
* Undefined on failure.
|
|
194
|
+
*/
|
|
195
|
+
package?: InstalledPackage;
|
|
196
|
+
/**
|
|
197
|
+
* Whether the package was activated in the current session without
|
|
198
|
+
* requiring a page reload. `false` means the user must reload before
|
|
199
|
+
* the package is usable.
|
|
200
|
+
*/
|
|
201
|
+
hotLoaded: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Human-readable error message on failure.
|
|
204
|
+
* Undefined on success.
|
|
205
|
+
*/
|
|
206
|
+
error?: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Metadata passed to the install API alongside the raw bundle bytes.
|
|
210
|
+
*
|
|
211
|
+
* Carries the provenance information needed to write an `InstalledPackage`
|
|
212
|
+
* record and to verify the download's integrity before execution.
|
|
213
|
+
*/
|
|
214
|
+
export interface PackageMeta {
|
|
215
|
+
/**
|
|
216
|
+
* Package id. Matches `PackageEntry.id`.
|
|
217
|
+
*/
|
|
218
|
+
id: string;
|
|
219
|
+
/**
|
|
220
|
+
* Whether this is a shard or an app.
|
|
221
|
+
*/
|
|
222
|
+
type: 'shard' | 'app';
|
|
223
|
+
/**
|
|
224
|
+
* The version being installed. Matches `PackageVersion.version`.
|
|
225
|
+
*/
|
|
226
|
+
version: string;
|
|
227
|
+
/**
|
|
228
|
+
* The `sh3-framework` contract version the bundle was built against.
|
|
229
|
+
*/
|
|
230
|
+
contractVersion: string;
|
|
231
|
+
/**
|
|
232
|
+
* URL of the registry this package was fetched from.
|
|
233
|
+
*/
|
|
234
|
+
sourceRegistry: string;
|
|
235
|
+
/**
|
|
236
|
+
* SRI hash to verify the downloaded bundle against before executing.
|
|
237
|
+
* Must match `PackageVersion.integrity`.
|
|
238
|
+
*/
|
|
239
|
+
integrity: string;
|
|
240
|
+
/**
|
|
241
|
+
* Declared shard dependencies. Mirrors `PackageVersion.requires`.
|
|
242
|
+
* Undefined if no dependencies.
|
|
243
|
+
*/
|
|
244
|
+
requires?: RequiredDependency[];
|
|
245
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry protocol types.
|
|
3
|
+
*
|
|
4
|
+
* A registry is any static HTTP endpoint serving a `registry.json` index
|
|
5
|
+
* and pre-built ESM bundle files. These types define the wire format for
|
|
6
|
+
* the index document and the local metadata stored after installation.
|
|
7
|
+
*
|
|
8
|
+
* Registry flow:
|
|
9
|
+
* 1. Client fetches `<registryUrl>/registry.json` → `RegistryIndex`
|
|
10
|
+
* 2. User picks a `PackageEntry` and a `PackageVersion`
|
|
11
|
+
* 3. Client downloads `bundleUrl`, verifies `integrity`, hot-loads the ESM bundle
|
|
12
|
+
* 4. On success the client writes an `InstalledPackage` record to local storage
|
|
13
|
+
*/
|
|
14
|
+
export {};
|