vintage-frames 0.16.1 → 0.17.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.
@@ -9,7 +9,7 @@
9
9
  * Its API may change in any minor release while it is experimental.
10
10
  * docs/SHELL.md is the guide.
11
11
  */
12
- export { createShell, defineApp, appIdOf, APP_KIND } from './shell.js';
12
+ export { createShell, defineApp } from './shell.js';
13
13
  export type { AppContext, AppDefinition, CatalogSetup, KindDefinition, Shell, ShellOptions } from './shell.js';
14
14
  export { createWindowManager, focusInto } from './windows.js';
15
15
  export type { AdoptOptions, ArrangeGroup, BoxInput, CloseHandler, FocusHome, HomeBox, OpenOptions, PlacePolicy, Placed, WindowManager, WindowManagerOptions, } from './windows.js';
@@ -17,7 +17,7 @@ export { finder, FINDER } from './finder.js';
17
17
  export type { FinderAlert, FinderAlertHandler, FinderAlerts, FinderApi, FinderArt, FinderCommand, FinderCommandSpec, FinderFailedAction, FinderMenu, FinderOpen, FinderOptions, } from './finder.js';
18
18
  export { fileByDrag } from './filing.js';
19
19
  export type { FilingOptions } from './filing.js';
20
- export { createCatalog, memoryStorage, childrenOf, containerOf, copyName, descendantsOf, enclosingFolders, isContainerKind, isInside, isTrashed, isVolume, itemCount, itemOf, nextFolderName, DISK, FOLDER, TRASH, UNTITLED_FOLDER, } from './catalog.js';
20
+ export { createCatalog, memoryStorage, appIdOf, childrenOf, containerOf, copyName, descendantsOf, enclosingFolders, isContainerKind, isInside, isTrashed, isVolume, itemCount, itemOf, nextFolderName, APP_KIND, DISK, FOLDER, TRASH, UNTITLED_FOLDER, } from './catalog.js';
21
21
  export type { Catalog, CatalogArchive, CatalogOptions, CatalogState, CatalogStorage, Item, KindHooks, NewItem, Volumes, } from './catalog.js';
22
22
  export { indexedDbStorage } from './storage.js';
23
23
  export { localStorageState, mergeSession, openWindowsOf, readSession } from './state.js';
@@ -25,3 +25,6 @@ export type { LocalStorageStateOptions, SavedSession, SavedWindow, SessionSnapsh
25
25
  export { BAND, CASCADE_SLOTS, CASCADE_STEP, ICON_CELL, ICON_COLUMN, ICON_INSET, ICON_ROW, NEAR, WINDOW_ORIGIN, cascadedBox, cascadeFrom, cascadeSlot, centeredBox, cleanUp, collisions, desktopLattice, fieldExtent, fillOrder, folderLattice, frameOf, isPin, latticeCell, latticeSlot, nearBox, nextFreeCell, pinOf, pinTo, trashCell, windowOrigin, } from './geometry.js';
26
26
  export type { Bands, Box, CascadeOptions, EdgePin, Frame, Lattice, LatticeOptions, Pin, Point, Policy, Size, } from './geometry.js';
27
27
  export { startClock, formatDate, formatTime, DATE_HOLD_MS } from './clock.js';
28
+ export { APP_FILE_FORMAT, readAppFile, satisfies } from './app-file.js';
29
+ export type { AppFile, AppManifest } from './app-file.js';
30
+ export { VERSION } from './version.js';
@@ -1,10 +1,12 @@
1
- import { DISK as e, FOLDER as t, TRASH as n, UNTITLED_FOLDER as r, childrenOf as i, containerOf as a, copyName as o, createCatalog as s, descendantsOf as c, enclosingFolders as l, isContainerKind as u, isInside as d, isTrashed as f, isVolume as p, itemCount as m, itemOf as h, memoryStorage as g, nextFolderName as _ } from "./catalog.js";
2
- import { BAND as v, CASCADE_SLOTS as y, CASCADE_STEP as b, ICON_CELL as x, ICON_COLUMN as S, ICON_INSET as C, ICON_ROW as w, NEAR as T, WINDOW_ORIGIN as E, cascadeFrom as D, cascadeSlot as O, cascadedBox as k, centeredBox as A, cleanUp as j, collisions as M, desktopLattice as N, fieldExtent as P, fillOrder as F, folderLattice as I, frameOf as L, isPin as R, latticeCell as z, latticeSlot as B, nearBox as V, nextFreeCell as H, pinOf as U, pinTo as W, trashCell as G, windowOrigin as K } from "./geometry.js";
3
- import { createWindowManager as q, focusInto as J } from "./windows.js";
4
- import { localStorageState as Y, mergeSession as X, openWindowsOf as Z, readSession as Q } from "./state.js";
5
- import { DATE_HOLD_MS as $, formatDate as ee, formatTime as te, startClock as ne } from "./clock.js";
6
- import { APP_KIND as re, appIdOf as ie, createShell as ae, defineApp as oe } from "./shell.js";
1
+ import { APP_KIND as e, DISK as t, FOLDER as n, TRASH as r, UNTITLED_FOLDER as i, appIdOf as a, childrenOf as o, containerOf as s, copyName as c, createCatalog as l, descendantsOf as u, enclosingFolders as d, isContainerKind as f, isInside as p, isTrashed as m, isVolume as h, itemCount as g, itemOf as _, memoryStorage as v, nextFolderName as y } from "./catalog.js";
2
+ import { BAND as b, CASCADE_SLOTS as x, CASCADE_STEP as S, ICON_CELL as C, ICON_COLUMN as w, ICON_INSET as T, ICON_ROW as E, NEAR as D, WINDOW_ORIGIN as O, cascadeFrom as k, cascadeSlot as A, cascadedBox as j, centeredBox as M, cleanUp as N, collisions as P, desktopLattice as F, fieldExtent as I, fillOrder as L, folderLattice as R, frameOf as z, isPin as B, latticeCell as V, latticeSlot as H, nearBox as U, nextFreeCell as W, pinOf as G, pinTo as K, trashCell as q, windowOrigin as J } from "./geometry.js";
3
+ import { createWindowManager as Y, focusInto as X } from "./windows.js";
4
+ import { localStorageState as Z, mergeSession as Q, openWindowsOf as $, readSession as ee } from "./state.js";
5
+ import { DATE_HOLD_MS as te, formatDate as ne, formatTime as re, startClock as ie } from "./clock.js";
6
+ import { createShell as ae, defineApp as oe } from "./shell.js";
7
7
  import { fileByDrag as se } from "./filing.js";
8
8
  import { FINDER as ce, finder as le } from "./finder.js";
9
9
  import { indexedDbStorage as ue } from "./storage.js";
10
- export { re as APP_KIND, v as BAND, y as CASCADE_SLOTS, b as CASCADE_STEP, $ as DATE_HOLD_MS, e as DISK, ce as FINDER, t as FOLDER, x as ICON_CELL, S as ICON_COLUMN, C as ICON_INSET, w as ICON_ROW, T as NEAR, n as TRASH, r as UNTITLED_FOLDER, E as WINDOW_ORIGIN, ie as appIdOf, D as cascadeFrom, O as cascadeSlot, k as cascadedBox, A as centeredBox, i as childrenOf, j as cleanUp, M as collisions, a as containerOf, o as copyName, s as createCatalog, ae as createShell, q as createWindowManager, oe as defineApp, c as descendantsOf, N as desktopLattice, l as enclosingFolders, P as fieldExtent, se as fileByDrag, F as fillOrder, le as finder, J as focusInto, I as folderLattice, ee as formatDate, te as formatTime, L as frameOf, ue as indexedDbStorage, u as isContainerKind, d as isInside, R as isPin, f as isTrashed, p as isVolume, m as itemCount, h as itemOf, z as latticeCell, B as latticeSlot, Y as localStorageState, g as memoryStorage, X as mergeSession, V as nearBox, _ as nextFolderName, H as nextFreeCell, Z as openWindowsOf, U as pinOf, W as pinTo, Q as readSession, ne as startClock, G as trashCell, K as windowOrigin };
10
+ import { APP_FILE_FORMAT as de, readAppFile as fe, satisfies as pe } from "./app-file.js";
11
+ import { VERSION as me } from "./version.js";
12
+ export { de as APP_FILE_FORMAT, e as APP_KIND, b as BAND, x as CASCADE_SLOTS, S as CASCADE_STEP, te as DATE_HOLD_MS, t as DISK, ce as FINDER, n as FOLDER, C as ICON_CELL, w as ICON_COLUMN, T as ICON_INSET, E as ICON_ROW, D as NEAR, r as TRASH, i as UNTITLED_FOLDER, me as VERSION, O as WINDOW_ORIGIN, a as appIdOf, k as cascadeFrom, A as cascadeSlot, j as cascadedBox, M as centeredBox, o as childrenOf, N as cleanUp, P as collisions, s as containerOf, c as copyName, l as createCatalog, ae as createShell, Y as createWindowManager, oe as defineApp, u as descendantsOf, F as desktopLattice, d as enclosingFolders, I as fieldExtent, se as fileByDrag, L as fillOrder, le as finder, X as focusInto, R as folderLattice, ne as formatDate, re as formatTime, z as frameOf, ue as indexedDbStorage, f as isContainerKind, p as isInside, B as isPin, m as isTrashed, h as isVolume, g as itemCount, _ as itemOf, V as latticeCell, H as latticeSlot, Z as localStorageState, v as memoryStorage, Q as mergeSession, U as nearBox, y as nextFolderName, W as nextFreeCell, $ as openWindowsOf, G as pinOf, K as pinTo, fe as readAppFile, ee as readSession, pe as satisfies, ie as startClock, q as trashCell, J as windowOrigin };
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * `vintage-frames/shell/pure` — the shell's pure modules on their own: the
3
- * catalog, the geometry and the saved session. They import nothing from the
4
- * kit and touch no DOM at import, so a site's own pure modules and their
5
- * tests import them under Node. `vintage-frames/shell` exports the same
6
- * names.
3
+ * catalog, the geometry, the saved session, the app file reader and the
4
+ * kit's version. They import nothing from the kit and touch no DOM at
5
+ * import, so a site's own pure modules and their tests import them under
6
+ * Node. `vintage-frames/shell` exports the same names.
7
7
  */
8
8
  export * from './catalog.js';
9
9
  export * from './geometry.js';
10
10
  export * from './state.js';
11
+ export { APP_FILE_FORMAT, readAppFile, satisfies } from './app-file.js';
12
+ export type { AppFile, AppManifest } from './app-file.js';
13
+ export { VERSION } from './version.js';
@@ -1,4 +1,6 @@
1
- import { DISK as e, FOLDER as t, TRASH as n, UNTITLED_FOLDER as r, childrenOf as i, containerOf as a, copyName as o, createCatalog as s, descendantsOf as c, enclosingFolders as l, isContainerKind as u, isInside as d, isTrashed as f, isVolume as p, itemCount as m, itemOf as h, memoryStorage as g, nextFolderName as _ } from "./catalog.js";
2
- import { BAND as v, CASCADE_SLOTS as y, CASCADE_STEP as b, ICON_CELL as x, ICON_COLUMN as S, ICON_INSET as C, ICON_ROW as w, NEAR as T, WINDOW_ORIGIN as E, cascadeFrom as D, cascadeSlot as O, cascadedBox as k, centeredBox as A, cleanUp as j, collisions as M, desktopLattice as N, fieldExtent as P, fillOrder as F, folderLattice as I, frameOf as L, isPin as R, latticeCell as z, latticeSlot as B, nearBox as V, nextFreeCell as H, pinOf as U, pinTo as W, trashCell as G, windowOrigin as K } from "./geometry.js";
3
- import { localStorageState as q, mergeSession as J, openWindowsOf as Y, readSession as X } from "./state.js";
4
- export { v as BAND, y as CASCADE_SLOTS, b as CASCADE_STEP, e as DISK, t as FOLDER, x as ICON_CELL, S as ICON_COLUMN, C as ICON_INSET, w as ICON_ROW, T as NEAR, n as TRASH, r as UNTITLED_FOLDER, E as WINDOW_ORIGIN, D as cascadeFrom, O as cascadeSlot, k as cascadedBox, A as centeredBox, i as childrenOf, j as cleanUp, M as collisions, a as containerOf, o as copyName, s as createCatalog, c as descendantsOf, N as desktopLattice, l as enclosingFolders, P as fieldExtent, F as fillOrder, I as folderLattice, L as frameOf, u as isContainerKind, d as isInside, R as isPin, f as isTrashed, p as isVolume, m as itemCount, h as itemOf, z as latticeCell, B as latticeSlot, q as localStorageState, g as memoryStorage, J as mergeSession, V as nearBox, _ as nextFolderName, H as nextFreeCell, Y as openWindowsOf, U as pinOf, W as pinTo, X as readSession, G as trashCell, K as windowOrigin };
1
+ import { APP_KIND as e, DISK as t, FOLDER as n, TRASH as r, UNTITLED_FOLDER as i, appIdOf as a, childrenOf as o, containerOf as s, copyName as c, createCatalog as l, descendantsOf as u, enclosingFolders as d, isContainerKind as f, isInside as p, isTrashed as m, isVolume as h, itemCount as g, itemOf as _, memoryStorage as v, nextFolderName as y } from "./catalog.js";
2
+ import { BAND as b, CASCADE_SLOTS as x, CASCADE_STEP as S, ICON_CELL as C, ICON_COLUMN as w, ICON_INSET as T, ICON_ROW as E, NEAR as D, WINDOW_ORIGIN as O, cascadeFrom as k, cascadeSlot as A, cascadedBox as j, centeredBox as M, cleanUp as N, collisions as P, desktopLattice as F, fieldExtent as I, fillOrder as L, folderLattice as R, frameOf as z, isPin as B, latticeCell as V, latticeSlot as H, nearBox as U, nextFreeCell as W, pinOf as G, pinTo as K, trashCell as q, windowOrigin as J } from "./geometry.js";
3
+ import { localStorageState as Y, mergeSession as X, openWindowsOf as Z, readSession as Q } from "./state.js";
4
+ import { APP_FILE_FORMAT as $, readAppFile as ee, satisfies as te } from "./app-file.js";
5
+ import { VERSION as ne } from "./version.js";
6
+ export { $ as APP_FILE_FORMAT, e as APP_KIND, b as BAND, x as CASCADE_SLOTS, S as CASCADE_STEP, t as DISK, n as FOLDER, C as ICON_CELL, w as ICON_COLUMN, T as ICON_INSET, E as ICON_ROW, D as NEAR, r as TRASH, i as UNTITLED_FOLDER, ne as VERSION, O as WINDOW_ORIGIN, a as appIdOf, k as cascadeFrom, A as cascadeSlot, j as cascadedBox, M as centeredBox, o as childrenOf, N as cleanUp, P as collisions, s as containerOf, c as copyName, l as createCatalog, u as descendantsOf, F as desktopLattice, d as enclosingFolders, I as fieldExtent, L as fillOrder, R as folderLattice, z as frameOf, f as isContainerKind, p as isInside, B as isPin, m as isTrashed, h as isVolume, g as itemCount, _ as itemOf, V as latticeCell, H as latticeSlot, Y as localStorageState, v as memoryStorage, X as mergeSession, U as nearBox, y as nextFolderName, W as nextFreeCell, Z as openWindowsOf, G as pinOf, K as pinTo, ee as readAppFile, Q as readSession, te as satisfies, q as trashCell, J as windowOrigin };
@@ -169,9 +169,5 @@ export interface Shell {
169
169
  readonly ready: Promise<void>;
170
170
  dispose(): void;
171
171
  }
172
- /** The kind the shell registers: an application's icon, which opens it. */
173
- export declare const APP_KIND = "app";
174
172
  /** Start the shell over `desktop`. The page has imported `vintage-frames` first. */
175
173
  export declare function createShell(desktop: VfDesktop, options: ShellOptions): Shell;
176
- /** The application an `app` item stands for. */
177
- export declare function appIdOf(item: Item): string | null;
@@ -1,31 +1,31 @@
1
1
  import { onScaleChange as e } from "../scale.js";
2
2
  import { VfWindow as t } from "../components/vf-window.js";
3
3
  import "../index.js";
4
- import { createCatalog as n } from "./catalog.js";
5
- import { createWindowManager as r, deepActiveElement as i, desktopRendered as a } from "./windows.js";
6
- import { openWindowsOf as o } from "./state.js";
7
- import { startClock as s } from "./clock.js";
4
+ import { appIdOf as n, createCatalog as r } from "./catalog.js";
5
+ import { createWindowManager as i, deepActiveElement as a, desktopRendered as o } from "./windows.js";
6
+ import { openWindowsOf as s } from "./state.js";
7
+ import { startClock as c } from "./clock.js";
8
8
  //#region src/shell/shell.ts
9
- function c(e) {
9
+ function l(e) {
10
10
  return e;
11
11
  }
12
- var l = "app", u = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e?.isContentEditable === !0;
13
- function d(c, l) {
14
- let d = l.apps, p = d.find((e) => e.catalog), m = l.defaultApp ?? p?.id ?? d[0]?.id ?? "", h = l.state ?? null, g = l.services ?? {}, _ = [], v = c.querySelector(":scope > vf-menu-bar");
12
+ var u = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e?.isContentEditable === !0;
13
+ function d(l, d) {
14
+ let f = d.apps, p = f.find((e) => e.catalog), m = d.defaultApp ?? p?.id ?? f[0]?.id ?? "", h = d.state ?? null, g = d.services ?? {}, _ = [], v = l.querySelector(":scope > vf-menu-bar");
15
15
  if (!v) throw Error("vintage-frames/shell: the desktop has no vf-menu-bar");
16
16
  let y = v.querySelector(":scope > vf-menu");
17
17
  if (!y) throw Error("vintage-frames/shell: the menu bar has no system menu");
18
18
  v.shortcuts = !0;
19
19
  let b = h?.saved?.pattern;
20
- b && (c.pattern = b);
20
+ b && (l.pattern = b);
21
21
  let x = null;
22
- if (l.fit === "viewport") {
22
+ if (d.fit === "viewport") {
23
23
  let t = () => {
24
24
  let e = {
25
- width: c.width,
26
- height: c.height
25
+ width: l.width,
26
+ height: l.height
27
27
  };
28
- c.fitWithin(document.documentElement.clientWidth, document.documentElement.clientHeight), x?.resized(e);
28
+ l.fitWithin(document.documentElement.clientWidth, document.documentElement.clientHeight), x?.resized(e);
29
29
  };
30
30
  t(), window.addEventListener("resize", t);
31
31
  let n = e(t);
@@ -33,34 +33,34 @@ function d(c, l) {
33
33
  window.removeEventListener("resize", t), n();
34
34
  });
35
35
  }
36
- let S = r(c, {
36
+ let S = i(l, {
37
37
  defaultApp: m,
38
38
  savedPin: (e) => h?.pin(e) ?? null
39
39
  });
40
40
  x = S;
41
41
  let C = (e) => {
42
- e.target === c && c.clearActive();
42
+ e.target === l && l.clearActive();
43
43
  };
44
- c.addEventListener("pointerdown", C), _.push(() => c.removeEventListener("pointerdown", C));
44
+ l.addEventListener("pointerdown", C), _.push(() => l.removeEventListener("pointerdown", C));
45
45
  let w = {}, T = /* @__PURE__ */ new Map();
46
46
  T.set("app", {
47
- art: (e) => d.find((t) => t.id === f(e))?.icon ?? "",
48
- open: (e, t) => void w[f(e) ?? ""]?.open?.({ from: t }),
47
+ art: (e) => f.find((t) => t.id === n(e))?.icon ?? "",
48
+ open: (e, t) => void w[n(e) ?? ""]?.open?.({ from: t }),
49
49
  editable: !1
50
50
  });
51
- for (let e of d) for (let [t, n] of Object.entries(e.kinds ?? {})) T.set(t, n);
52
- let E = p?.catalog ? n({
51
+ for (let e of f) for (let [t, n] of Object.entries(e.kinds ?? {})) T.set(t, n);
52
+ let E = p?.catalog ? r({
53
53
  storage: p.catalog.storage,
54
54
  volumes: p.catalog.volumes,
55
55
  listed: (e) => T.has(e),
56
56
  hooks: (e) => T.get(e)
57
- }) : null, D = () => !!document.querySelector("vf-dialog[open]"), O = () => u(i()), k = /* @__PURE__ */ new Map(), A = () => {
57
+ }) : null, D = () => !!document.querySelector("vf-dialog[open]"), O = () => u(a()), k = /* @__PURE__ */ new Map(), A = () => {
58
58
  for (let [e, t] of k) {
59
59
  let n = !t();
60
60
  e.disabled !== n && (e.disabled = n);
61
61
  }
62
62
  };
63
- document.addEventListener("pointerdown", A, !0), document.addEventListener("keydown", A, !0), c.addEventListener("vf-select", A), c.addEventListener("vf-activate", A), _.push(() => document.removeEventListener("pointerdown", A, !0), () => document.removeEventListener("keydown", A, !0), () => c.removeEventListener("vf-select", A), () => c.removeEventListener("vf-activate", A), S.onWindows(A), S.onLayout(A)), E && _.push(E.subscribe(A));
63
+ document.addEventListener("pointerdown", A, !0), document.addEventListener("keydown", A, !0), l.addEventListener("vf-select", A), l.addEventListener("vf-activate", A), _.push(() => document.removeEventListener("pointerdown", A, !0), () => document.removeEventListener("keydown", A, !0), () => l.removeEventListener("vf-select", A), () => l.removeEventListener("vf-activate", A), S.onWindows(A), S.onLayout(A)), E && _.push(E.subscribe(A));
64
64
  let j = (e) => {
65
65
  if (!e) return [];
66
66
  let t = document.createElement("div");
@@ -68,7 +68,7 @@ function d(c, l) {
68
68
  let n = [...t.children].filter((e) => e instanceof HTMLElement);
69
69
  for (let e of n) e.remove();
70
70
  return n;
71
- }, M = d.map((e) => ({
71
+ }, M = f.map((e) => ({
72
72
  def: e,
73
73
  menus: j(e.menus).filter((e) => e.localName === "vf-menu"),
74
74
  dialogs: j(e.dialogs).filter((e) => e.dataset.dialog != null),
@@ -85,7 +85,7 @@ function d(c, l) {
85
85
  o.clear();
86
86
  });
87
87
  let s = {
88
- desktop: c,
88
+ desktop: l,
89
89
  windows: S,
90
90
  menus: t,
91
91
  systemMenu: y,
@@ -95,7 +95,7 @@ function d(c, l) {
95
95
  state: h,
96
96
  kinds: T,
97
97
  kind: (e) => T.get(e),
98
- app: (e) => d.find((t) => t.id === e),
98
+ app: (e) => f.find((t) => t.id === e),
99
99
  menu(e) {
100
100
  let n = t.find((t) => t.dataset.menu === e);
101
101
  if (!n) throw Error(`${a}: missing menu ${e}`);
@@ -163,8 +163,8 @@ function d(c, l) {
163
163
  onDispose(e) {
164
164
  i.push(e);
165
165
  }
166
- }, l = e.init(s);
167
- l && (w[e.id] = l), N.push(() => {
166
+ }, c = e.init(s);
167
+ c && (w[e.id] = c), N.push(() => {
168
168
  for (let e of i.splice(0).reverse()) e();
169
169
  });
170
170
  }
@@ -175,16 +175,16 @@ function d(c, l) {
175
175
  y.after(...t.menus), v.label = t.def.name, P = t, A();
176
176
  }
177
177
  };
178
- if (_.push(S.onFront(F), S.onDialogs(F)), F(), l.clock !== !1) {
178
+ if (_.push(S.onFront(F), S.onDialogs(F)), F(), d.clock !== !1) {
179
179
  let e = v.querySelector(":scope > [slot=\"end\"]"), t = !e;
180
180
  e || (e = document.createElement("vf-label"), e.slot = "end", v.append(e));
181
- let n = s(e);
181
+ let n = c(e);
182
182
  _.push(() => {
183
183
  n(), t && e.remove();
184
184
  });
185
185
  }
186
186
  let I = /* @__PURE__ */ new WeakSet(), L = () => {
187
- if (E) for (let e of c.stackingOrder) {
187
+ if (E) for (let e of l.stackingOrder) {
188
188
  if (!(e instanceof t)) continue;
189
189
  let n = S.itemOf(e);
190
190
  if (n == null) continue;
@@ -193,39 +193,39 @@ function d(c, l) {
193
193
  }
194
194
  };
195
195
  return E && _.push(E.subscribe(L), S.onWindows(L)), h?.hold(), {
196
- desktop: c,
196
+ desktop: l,
197
197
  windows: S,
198
198
  catalog: E,
199
199
  apps: w,
200
200
  ready: (async () => {
201
201
  try {
202
- await a(c), E && (await E.refresh(), p?.catalog?.seed && await E.seed(p.catalog.seed));
203
- for (let { item: e, app: t } of o(h?.saved ?? null)) await w[t]?.open?.({ item: e });
202
+ await o(l), E && (await E.refresh(), p?.catalog?.seed && await E.seed(p.catalog.seed));
203
+ for (let { item: e, app: t } of s(h?.saved ?? null)) await w[t]?.open?.({ item: e });
204
204
  let e = h?.saved?.active;
205
205
  if (e) {
206
206
  let t = S.windowFor(e);
207
- t && c.bringToFront(t);
207
+ t && l.bringToFront(t);
208
208
  }
209
209
  } finally {
210
210
  if (h) {
211
211
  let e = h.start(() => ({
212
212
  windows: S.snapshot(),
213
- active: S.itemOf(c.activeWindow),
214
- pattern: c.pattern ?? null
213
+ active: S.itemOf(l.activeWindow),
214
+ pattern: l.pattern ?? null
215
215
  }), (e) => {
216
216
  let t = [
217
217
  S.onLayout(e),
218
218
  S.onWindows(e),
219
219
  ...E ? [E.subscribe(e)] : []
220
220
  ];
221
- c.addEventListener("vf-activate", e);
221
+ l.addEventListener("vf-activate", e);
222
222
  let n = new MutationObserver(e);
223
- return n.observe(c, {
223
+ return n.observe(l, {
224
224
  attributes: !0,
225
225
  attributeFilter: ["pattern"]
226
226
  }), () => {
227
227
  for (let e of t) e();
228
- c.removeEventListener("vf-activate", e), n.disconnect();
228
+ l.removeEventListener("vf-activate", e), n.disconnect();
229
229
  };
230
230
  });
231
231
  _.push(e), h.release();
@@ -241,9 +241,5 @@ function d(c, l) {
241
241
  }
242
242
  };
243
243
  }
244
- function f(e) {
245
- let t = e.data;
246
- return typeof t?.app == "string" ? t.app : null;
247
- }
248
244
  //#endregion
249
- export { l as APP_KIND, f as appIdOf, d as createShell, c as defineApp };
245
+ export { d as createShell, l as defineApp };
@@ -0,0 +1,2 @@
1
+ /** The kit's version, as published: package.json's `version`. `npm version` rewrites it (the `version` script). */
2
+ export declare const VERSION = "0.17.0";
@@ -0,0 +1,4 @@
1
+ //#region src/shell/version.ts
2
+ var e = "0.17.0";
3
+ //#endregion
4
+ export { e as VERSION };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * VF Body as data. GENERATED by fonts/manifest-to-font.py from
3
+ * fonts/VF-Body.glyphs.txt: edit the manifest and rebuild, never this file.
4
+ *
5
+ * Each character's advance, placement and ink, in whole design px, for
6
+ * drawing the kit's type without a browser. The ink is the kit's own
7
+ * re-drawn strike in the style of Geneva 9pt, the design Susan Kare
8
+ * created for Apple's original Macintosh, and the same artwork the face's
9
+ * woff2 is built from (fonts/README.md).
10
+ */
11
+ import type { Strike } from './strike.js';
12
+ export declare const VF_BODY_STRIKE: Strike;