@wildwinter/app-shell 0.38.0 → 0.40.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/LICENSES.md +62 -0
- package/README.md +8 -0
- package/dist/about.css +17 -38
- package/dist/about.css.map +1 -1
- package/dist/anchored.css +9 -9
- package/dist/anchored.css.map +1 -1
- package/dist/app-store.cjs +15 -0
- package/dist/app-store.cjs.map +1 -1
- package/dist/app-store.d.cts +25 -1
- package/dist/app-store.d.ts +25 -1
- package/dist/app-store.js +14 -1
- package/dist/app-store.js.map +1 -1
- package/dist/chunk-2ECJUTSX.js +97 -0
- package/dist/chunk-2ECJUTSX.js.map +1 -0
- package/dist/chunk-DS4XXAZS.js +56 -0
- package/dist/chunk-DS4XXAZS.js.map +1 -0
- package/dist/chunk-EHR2KBZC.js +82 -0
- package/dist/chunk-EHR2KBZC.js.map +1 -0
- package/dist/chunk-IU7EY6BI.js +26 -0
- package/dist/chunk-IU7EY6BI.js.map +1 -0
- package/dist/chunk-OPZPFOPS.js +66 -0
- package/dist/chunk-OPZPFOPS.js.map +1 -0
- package/dist/chunk-P4G4ERG6.js +60 -0
- package/dist/chunk-P4G4ERG6.js.map +1 -0
- package/dist/chunk-P6WLAEKZ.js +71 -0
- package/dist/chunk-P6WLAEKZ.js.map +1 -0
- package/dist/chunk-R3NXPHRZ.js +534 -0
- package/dist/chunk-R3NXPHRZ.js.map +1 -0
- package/dist/chunk-SDOKZTAR.js +87 -0
- package/dist/chunk-SDOKZTAR.js.map +1 -0
- package/dist/chunk-SEWJLUOD.js +70 -0
- package/dist/chunk-SEWJLUOD.js.map +1 -0
- package/dist/chunk-UG2P777F.js +587 -0
- package/dist/chunk-UG2P777F.js.map +1 -0
- package/dist/chunk-YRFJLJUH.js +55 -0
- package/dist/chunk-YRFJLJUH.js.map +1 -0
- package/dist/chunk-YWMSQFXX.js +146 -0
- package/dist/chunk-YWMSQFXX.js.map +1 -0
- package/dist/comments.css +16 -14
- package/dist/comments.css.map +1 -1
- package/dist/confirm.css +2 -55
- package/dist/confirm.css.map +1 -1
- package/dist/context-menu.cjs +250 -0
- package/dist/context-menu.cjs.map +1 -0
- package/dist/context-menu.css +64 -0
- package/dist/context-menu.css.map +1 -0
- package/dist/context-menu.d.cts +25 -0
- package/dist/context-menu.d.ts +25 -0
- package/dist/context-menu.js +5 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/controls.css +214 -0
- package/dist/controls.css.map +1 -0
- package/dist/dialog.cjs +222 -0
- package/dist/dialog.cjs.map +1 -0
- package/dist/dialog.css +56 -0
- package/dist/dialog.css.map +1 -0
- package/dist/dialog.d.cts +28 -0
- package/dist/dialog.d.ts +28 -0
- package/dist/dialog.js +5 -0
- package/dist/dialog.js.map +1 -0
- package/dist/floating.cjs +83 -0
- package/dist/floating.cjs.map +1 -0
- package/dist/floating.d.cts +25 -0
- package/dist/floating.d.ts +25 -0
- package/dist/floating.js +4 -0
- package/dist/floating.js.map +1 -0
- package/dist/identity.css +15 -50
- package/dist/identity.css.map +1 -1
- package/dist/index.cjs +1553 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +385 -152
- package/dist/index.d.ts +385 -152
- package/dist/index.js +264 -823
- package/dist/index.js.map +1 -1
- package/dist/job.css +24 -1
- package/dist/job.css.map +1 -1
- package/dist/keys.cjs +155 -0
- package/dist/keys.cjs.map +1 -0
- package/dist/keys.css +41 -0
- package/dist/keys.css.map +1 -0
- package/dist/keys.d.cts +57 -0
- package/dist/keys.d.ts +57 -0
- package/dist/keys.js +3 -0
- package/dist/keys.js.map +1 -0
- package/dist/link-status.cjs +430 -0
- package/dist/link-status.cjs.map +1 -0
- package/dist/link-status.css +76 -0
- package/dist/link-status.css.map +1 -0
- package/dist/link-status.d.cts +53 -0
- package/dist/link-status.d.ts +53 -0
- package/dist/link-status.js +5 -0
- package/dist/link-status.js.map +1 -0
- package/dist/menu.cjs +62 -1
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.d.cts +88 -1
- package/dist/menu.d.ts +88 -1
- package/dist/menu.js +1 -1
- package/dist/notes-editor.css +9 -52
- package/dist/notes-editor.css.map +1 -1
- package/dist/pane-shell.css +23 -5
- package/dist/pane-shell.css.map +1 -1
- package/dist/problems.cjs +61 -0
- package/dist/problems.cjs.map +1 -0
- package/dist/problems.d.cts +57 -0
- package/dist/problems.d.ts +57 -0
- package/dist/problems.js +3 -0
- package/dist/problems.js.map +1 -0
- package/dist/property-list-D3VZCJzi.d.cts +162 -0
- package/dist/property-list-D3VZCJzi.d.ts +162 -0
- package/dist/property-list.cjs +784 -0
- package/dist/property-list.cjs.map +1 -0
- package/dist/property-list.d.cts +1 -0
- package/dist/property-list.d.ts +1 -0
- package/dist/property-list.js +4 -0
- package/dist/property-list.js.map +1 -0
- package/dist/save.css +1 -1
- package/dist/save.css.map +1 -1
- package/dist/settings.css +62 -18
- package/dist/settings.css.map +1 -1
- package/dist/stale.css +4 -1
- package/dist/stale.css.map +1 -1
- package/dist/stepper.css +47 -3
- package/dist/stepper.css.map +1 -1
- package/dist/toast.css +5 -5
- package/dist/toast.css.map +1 -1
- package/dist/tokens.css +20 -0
- package/dist/tokens.css.map +1 -1
- package/dist/tool-window.cjs +63 -0
- package/dist/tool-window.cjs.map +1 -1
- package/dist/tool-window.css +8 -4
- package/dist/tool-window.css.map +1 -1
- package/dist/tool-window.d.cts +67 -1
- package/dist/tool-window.d.ts +67 -1
- package/dist/tool-window.js +63 -1
- package/dist/tool-window.js.map +1 -1
- package/dist/tooltip.css +3 -3
- package/dist/tooltip.css.map +1 -1
- package/dist/updater-view.cjs +283 -0
- package/dist/updater-view.cjs.map +1 -0
- package/dist/updater-view.d.cts +23 -0
- package/dist/updater-view.d.ts +23 -0
- package/dist/updater-view.js +6 -0
- package/dist/updater-view.js.map +1 -0
- package/dist/updater.cjs +12 -16
- package/dist/updater.cjs.map +1 -1
- package/dist/updater.css +44 -0
- package/dist/updater.css.map +1 -0
- package/dist/updater.js +12 -16
- package/dist/updater.js.map +1 -1
- package/dist/util.cjs +78 -0
- package/dist/util.cjs.map +1 -0
- package/dist/util.d.cts +37 -0
- package/dist/util.d.ts +37 -0
- package/dist/util.js +3 -0
- package/dist/util.js.map +1 -0
- package/dist/vc.css +4 -3
- package/dist/vc.css.map +1 -1
- package/dist/welcome.cjs +215 -0
- package/dist/welcome.cjs.map +1 -0
- package/dist/welcome.css +112 -0
- package/dist/welcome.css.map +1 -0
- package/dist/welcome.d.cts +55 -0
- package/dist/welcome.d.ts +55 -0
- package/dist/welcome.js +4 -0
- package/dist/welcome.js.map +1 -0
- package/package.json +72 -2
- package/dist/chunk-QDPFU4WX.js +0 -43
- package/dist/chunk-QDPFU4WX.js.map +0 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/** A compact list row: a single `.set-rowline` (inline controls) plus, when
|
|
2
|
+
* `details` are given, a disclosure that reveals a `.set-details` panel below,
|
|
3
|
+
* so a list scans like a table with secondary fields tucked away. `name` is
|
|
4
|
+
* what the row declares (a property's name, a field's), stamped on it as
|
|
5
|
+
* `data-name` so `revealRow` can land on it. */
|
|
6
|
+
declare function expandableRow(opts: {
|
|
7
|
+
line: HTMLElement[];
|
|
8
|
+
details?: HTMLElement[];
|
|
9
|
+
name?: string;
|
|
10
|
+
}): HTMLElement;
|
|
11
|
+
/**
|
|
12
|
+
* Land on one row of a list by the `name` it was built with: open its details
|
|
13
|
+
* (an enum's values sit behind the disclosure, and they are usually what the
|
|
14
|
+
* jump was for), bring it to the middle of its scroller, and light it for a
|
|
15
|
+
* moment (`.set-row.landed` in settings.css). "Go to definition" in both apps
|
|
16
|
+
* used to open the page a property is declared on and stop there, with the
|
|
17
|
+
* declaration below the fold and nothing marking it (Storyletter, 2026-09-14).
|
|
18
|
+
*
|
|
19
|
+
* Returns false when no row carries the name, so a host whose page fills in
|
|
20
|
+
* asynchronously can ask again on a later frame; asking again is the host's,
|
|
21
|
+
* since only the host knows what opens on its own time. The row is matched by
|
|
22
|
+
* reading the stamp rather than by an attribute selector, so a name needs no
|
|
23
|
+
* escaping.
|
|
24
|
+
*/
|
|
25
|
+
declare function revealRow(within: ParentNode, name: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* `revealRow`, retried over the next frames until the row exists or the tries
|
|
28
|
+
* run out: for a page that fills in on its own time after a navigation. Both
|
|
29
|
+
* apps hand-rolled this as `landOn` with the same twelve tries
|
|
30
|
+
* (ui-review-2026-09, finding 29). Resolves true when it landed, false when it
|
|
31
|
+
* gave up, and giving up is quiet: a name no page shows as a row is not a fault.
|
|
32
|
+
*/
|
|
33
|
+
declare function revealRowWhenReady(within: ParentNode, name: string, tries?: number): Promise<boolean>;
|
|
34
|
+
/** After a "+ Add" re-renders a list, bring the new (last) row into view and
|
|
35
|
+
* focus its name input (`.set-name`, else the first input). */
|
|
36
|
+
declare function focusNewRow(listEl: HTMLElement | null | undefined): void;
|
|
37
|
+
interface DupGuard {
|
|
38
|
+
/** Forget the previous render's inputs (call at the top of render). */
|
|
39
|
+
reset(): void;
|
|
40
|
+
/** Register a name input; `key` returns the comparison string (default the
|
|
41
|
+
* input's value). Re-checks live on input. `also` = extra inputs that change the key. */
|
|
42
|
+
track(input: HTMLInputElement, key?: () => string, also?: HTMLInputElement[]): void;
|
|
43
|
+
/** Re-paint duplicates; true if any two non-blank keys collide. */
|
|
44
|
+
check(): boolean;
|
|
45
|
+
/** The first input currently flagged (after a fresh check), or null. */
|
|
46
|
+
firstDuplicate(): HTMLInputElement | null;
|
|
47
|
+
}
|
|
48
|
+
/** Case-insensitive duplicate-name detection: paints clashing inputs `.invalid`
|
|
49
|
+
* and lets a Save gate block + jump via `firstDuplicate()`. */
|
|
50
|
+
declare function dupGuard(): DupGuard;
|
|
51
|
+
interface SettingsSectionHandle {
|
|
52
|
+
/** The first invalid control to jump to, blocking Save (e.g. a duplicate
|
|
53
|
+
* name). Return `{ el, message }` to say WHICH fault in the error line;
|
|
54
|
+
* a bare element says it through its own `data-tip` (the dup guard's, a
|
|
55
|
+
* property-name field's), and the line falls back to a generic sentence
|
|
56
|
+
* when it has neither. */
|
|
57
|
+
firstInvalid?(): HTMLElement | {
|
|
58
|
+
el: HTMLElement;
|
|
59
|
+
message?: string;
|
|
60
|
+
} | null;
|
|
61
|
+
}
|
|
62
|
+
interface SettingsSection {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
/** Optional left-rail group heading above this tab. */
|
|
66
|
+
group?: string;
|
|
67
|
+
/** Build the section body into `host`; called fresh on each open so it reads
|
|
68
|
+
* the current data. Return a handle (for the Save gate). */
|
|
69
|
+
mount(host: HTMLElement): SettingsSectionHandle;
|
|
70
|
+
/** Why this tab cannot be used right now, or null when it can. A reason
|
|
71
|
+
* renders the tab dimmed and inert with the reason as its rollover
|
|
72
|
+
* (Patterpad's Audio tab while the project is not voiced). Read on open
|
|
73
|
+
* and on `refreshTabs()`, so a control inside the dialog can flip it. */
|
|
74
|
+
disabled?: () => string | null;
|
|
75
|
+
}
|
|
76
|
+
interface SettingsDialogOptions {
|
|
77
|
+
title: string;
|
|
78
|
+
sections: SettingsSection[];
|
|
79
|
+
/** Fired when Save is clicked and every section validates. The app reads its
|
|
80
|
+
* own section state and persists. May be async; the dialog stays open until
|
|
81
|
+
* it resolves, then closes. */
|
|
82
|
+
onSave: () => void | Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
interface SettingsDialog {
|
|
85
|
+
/** Open (optionally on a given tab id). Sections re-mount from current data. */
|
|
86
|
+
open(tabId?: string): void;
|
|
87
|
+
/** Re-read every section's `disabled()`; a tab that has just become
|
|
88
|
+
* disabled while showing hands over to the first usable one. */
|
|
89
|
+
refreshTabs(): void;
|
|
90
|
+
destroy(): void;
|
|
91
|
+
}
|
|
92
|
+
/** Build a settings dialog. The frame owns the modal, the tab rail, save-on-Save
|
|
93
|
+
* (with a validation gate), and Cancel; the sections own their content + state. */
|
|
94
|
+
declare function mountSettingsDialog(opts: SettingsDialogOptions): SettingsDialog;
|
|
95
|
+
|
|
96
|
+
/** The six types both apps declare. */
|
|
97
|
+
type PropertyListType = "number" | "boolean" | "string" | "enum" | "flags" | "quality";
|
|
98
|
+
/** The shape a row edits. Apps' DTOs carry more (shared, writable, durable);
|
|
99
|
+
* those ride through untouched. */
|
|
100
|
+
interface PropertyDeclLike {
|
|
101
|
+
name: string;
|
|
102
|
+
type: string;
|
|
103
|
+
default?: unknown;
|
|
104
|
+
/** enum / flags */
|
|
105
|
+
values?: string[];
|
|
106
|
+
/** quality: the ladder, in order */
|
|
107
|
+
stages?: string[];
|
|
108
|
+
purpose?: string;
|
|
109
|
+
}
|
|
110
|
+
/** The type list, in the family's order, with the words the select shows. */
|
|
111
|
+
declare const PROPERTY_TYPES: ReadonlyArray<readonly [PropertyListType, string]>;
|
|
112
|
+
interface DefaultControlOptions {
|
|
113
|
+
/**
|
|
114
|
+
* How the default is stored. `false` (default): the string the field shows,
|
|
115
|
+
* "" for none (Storyletter's DTO). `true`: a typed value (boolean, number,
|
|
116
|
+
* string), and none DELETES the key (Patterpad's model).
|
|
117
|
+
*/
|
|
118
|
+
typed?: boolean;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The type-appropriate control for a declaration's DEFAULT: a true / false
|
|
122
|
+
* picker for a boolean, the value list for an enum, the stage list for a
|
|
123
|
+
* quality (blank = the first rung), a note for flags (a set starts empty), a
|
|
124
|
+
* number or text field otherwise. The one label for "no default" is "(none)".
|
|
125
|
+
*/
|
|
126
|
+
declare function defaultControl(p: PropertyDeclLike, onChange?: () => void, opts?: DefaultControlOptions): HTMLElement;
|
|
127
|
+
interface PropertyListOptions<T extends PropertyDeclLike> extends DefaultControlOptions {
|
|
128
|
+
/** Called after every mutation; a centre editor feeds its autosave here. */
|
|
129
|
+
onChange?: () => void;
|
|
130
|
+
/** The add button's label. Default "+ Add property". */
|
|
131
|
+
addLabel?: string;
|
|
132
|
+
/** The empty sentence. Default "No properties yet." */
|
|
133
|
+
emptyText?: string;
|
|
134
|
+
/** The type select's entries; default `PROPERTY_TYPES`. */
|
|
135
|
+
types?: ReadonlyArray<readonly [string, string]>;
|
|
136
|
+
/** A fresh declaration for the add button. Default: a blank of the first type. */
|
|
137
|
+
newDecl?: () => T;
|
|
138
|
+
/** Controls on the row's line, between the default and the movers
|
|
139
|
+
* (Storyletter's "uses" affordance). */
|
|
140
|
+
extraLine?: (decl: T, index: number) => (HTMLElement | null)[];
|
|
141
|
+
/** Fields behind the disclosure, before Values / Stages / Purpose
|
|
142
|
+
* (Shared, Temporary, Read-only, Durable). */
|
|
143
|
+
extraDetails?: (decl: T, index: number) => (HTMLElement | null)[];
|
|
144
|
+
/** Offer the Purpose field. Default true. */
|
|
145
|
+
purpose?: boolean;
|
|
146
|
+
}
|
|
147
|
+
interface PropertyListHandle extends SettingsSectionHandle {
|
|
148
|
+
/** Both faults, for the Save gate: a duplicate first, then an illegal name. */
|
|
149
|
+
firstInvalid(): HTMLInputElement | null;
|
|
150
|
+
/** The first name that clashes with another, or null. */
|
|
151
|
+
firstDuplicate(): HTMLInputElement | null;
|
|
152
|
+
/** The first name no expression could reach, or null. */
|
|
153
|
+
firstIllegalName(): HTMLInputElement | null;
|
|
154
|
+
/** Redraw from `decls` (after an outside change). */
|
|
155
|
+
render(): void;
|
|
156
|
+
}
|
|
157
|
+
/** Mount the list into `host`. Mutates `decls` in place; the caller reads
|
|
158
|
+
* them back on save (pruning blank names is the caller's, since only it
|
|
159
|
+
* knows its DTO). */
|
|
160
|
+
declare function mountPropertyList<T extends PropertyDeclLike>(host: HTMLElement, decls: T[], opts?: PropertyListOptions<T>): PropertyListHandle;
|
|
161
|
+
|
|
162
|
+
export { type DefaultControlOptions as D, PROPERTY_TYPES as P, type SettingsDialog as S, type DupGuard as a, type PropertyDeclLike as b, type PropertyListHandle as c, type PropertyListOptions as d, type PropertyListType as e, type SettingsDialogOptions as f, type SettingsSection as g, type SettingsSectionHandle as h, defaultControl as i, dupGuard as j, expandableRow as k, focusNewRow as l, mountPropertyList as m, mountSettingsDialog as n, revealRowWhenReady as o, revealRow as r };
|