@wildwinter/app-shell 0.37.0 → 0.38.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/README.md +13 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/settings.css +11 -0
- package/dist/settings.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -193,11 +193,29 @@ declare function mountPaneShell(host: HTMLElement, opts: PaneShellOptions): Pane
|
|
|
193
193
|
|
|
194
194
|
/** A compact list row: a single `.set-rowline` (inline controls) plus, when
|
|
195
195
|
* `details` are given, a disclosure that reveals a `.set-details` panel below,
|
|
196
|
-
* so a list scans like a table with secondary fields tucked away.
|
|
196
|
+
* so a list scans like a table with secondary fields tucked away. `name` is
|
|
197
|
+
* what the row declares (a property's name, a field's), stamped on it as
|
|
198
|
+
* `data-name` so `revealRow` can land on it. */
|
|
197
199
|
declare function expandableRow(opts: {
|
|
198
200
|
line: HTMLElement[];
|
|
199
201
|
details?: HTMLElement[];
|
|
202
|
+
name?: string;
|
|
200
203
|
}): HTMLElement;
|
|
204
|
+
/**
|
|
205
|
+
* Land on one row of a list by the `name` it was built with: open its details
|
|
206
|
+
* (an enum's values sit behind the disclosure, and they are usually what the
|
|
207
|
+
* jump was for), bring it to the middle of its scroller, and light it for a
|
|
208
|
+
* moment (`.set-row.landed` in settings.css). "Go to definition" in both apps
|
|
209
|
+
* used to open the page a property is declared on and stop there, with the
|
|
210
|
+
* declaration below the fold and nothing marking it (Storyletter, 2026-09-14).
|
|
211
|
+
*
|
|
212
|
+
* Returns false when no row carries the name, so a host whose page fills in
|
|
213
|
+
* asynchronously can ask again on a later frame; asking again is the host's,
|
|
214
|
+
* since only the host knows what opens on its own time. The row is matched by
|
|
215
|
+
* reading the stamp rather than by an attribute selector, so a name needs no
|
|
216
|
+
* escaping.
|
|
217
|
+
*/
|
|
218
|
+
declare function revealRow(within: ParentNode, name: string): boolean;
|
|
201
219
|
/** After a "+ Add" re-renders a list, bring the new (last) row into view and
|
|
202
220
|
* focus its name input (`.set-name`, else the first input). */
|
|
203
221
|
declare function focusNewRow(listEl: HTMLElement | null | undefined): void;
|
|
@@ -900,4 +918,4 @@ declare function historyNav(onBack: () => void, onForward: () => void): {
|
|
|
900
918
|
set(canBack: boolean, canForward: boolean): void;
|
|
901
919
|
};
|
|
902
920
|
|
|
903
|
-
export { type AboutOptions, type AnchoredPanel, type AnchoredPanelOptions, type Child, type Comment, type CommentMessage, type CommentsOptions, type ConfirmOptions, type DocLine, type DupGuard, type ElProps, type GameIdEditorOptions, type IconName, type IconSvgName, type Identity, type IdentityOptions, type JobProgressOptions, type JobProgressView, type NavHistory, type NavHistoryOptions, type Notes, type NotesEditorOptions, PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, type PaneShell, type PaneShellOptions, type PaneShellState, type PaneSide, type PaneSideConfig, type PinButton, type PinButtonOptions, type PropertyRefOptions, RESERVED_PROPERTY_NAMES, type SaveController, type SaveControllerOptions, type SaveIndicator, type SaveStatus, type SettingsDialog, type SettingsDialogOptions, type SettingsSection, type SettingsSectionHandle, type ShardVc, type StaleBarOptions, type StepperBarOptions, type StepperItem, type StepperTone, type TipRect, type ToastKind, type ToastOptions, type TooltipOptions, type VcMap, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
|
921
|
+
export { type AboutOptions, type AnchoredPanel, type AnchoredPanelOptions, type Child, type Comment, type CommentMessage, type CommentsOptions, type ConfirmOptions, type DocLine, type DupGuard, type ElProps, type GameIdEditorOptions, type IconName, type IconSvgName, type Identity, type IdentityOptions, type JobProgressOptions, type JobProgressView, type NavHistory, type NavHistoryOptions, type Notes, type NotesEditorOptions, PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, type PaneShell, type PaneShellOptions, type PaneShellState, type PaneSide, type PaneSideConfig, type PinButton, type PinButtonOptions, type PropertyRefOptions, RESERVED_PROPERTY_NAMES, type SaveController, type SaveControllerOptions, type SaveIndicator, type SaveStatus, type SettingsDialog, type SettingsDialogOptions, type SettingsSection, type SettingsSectionHandle, type ShardVc, type StaleBarOptions, type StepperBarOptions, type StepperItem, type StepperTone, type TipRect, type ToastKind, type ToastOptions, type TooltipOptions, type VcMap, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, revealRow, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
package/dist/index.d.ts
CHANGED
|
@@ -193,11 +193,29 @@ declare function mountPaneShell(host: HTMLElement, opts: PaneShellOptions): Pane
|
|
|
193
193
|
|
|
194
194
|
/** A compact list row: a single `.set-rowline` (inline controls) plus, when
|
|
195
195
|
* `details` are given, a disclosure that reveals a `.set-details` panel below,
|
|
196
|
-
* so a list scans like a table with secondary fields tucked away.
|
|
196
|
+
* so a list scans like a table with secondary fields tucked away. `name` is
|
|
197
|
+
* what the row declares (a property's name, a field's), stamped on it as
|
|
198
|
+
* `data-name` so `revealRow` can land on it. */
|
|
197
199
|
declare function expandableRow(opts: {
|
|
198
200
|
line: HTMLElement[];
|
|
199
201
|
details?: HTMLElement[];
|
|
202
|
+
name?: string;
|
|
200
203
|
}): HTMLElement;
|
|
204
|
+
/**
|
|
205
|
+
* Land on one row of a list by the `name` it was built with: open its details
|
|
206
|
+
* (an enum's values sit behind the disclosure, and they are usually what the
|
|
207
|
+
* jump was for), bring it to the middle of its scroller, and light it for a
|
|
208
|
+
* moment (`.set-row.landed` in settings.css). "Go to definition" in both apps
|
|
209
|
+
* used to open the page a property is declared on and stop there, with the
|
|
210
|
+
* declaration below the fold and nothing marking it (Storyletter, 2026-09-14).
|
|
211
|
+
*
|
|
212
|
+
* Returns false when no row carries the name, so a host whose page fills in
|
|
213
|
+
* asynchronously can ask again on a later frame; asking again is the host's,
|
|
214
|
+
* since only the host knows what opens on its own time. The row is matched by
|
|
215
|
+
* reading the stamp rather than by an attribute selector, so a name needs no
|
|
216
|
+
* escaping.
|
|
217
|
+
*/
|
|
218
|
+
declare function revealRow(within: ParentNode, name: string): boolean;
|
|
201
219
|
/** After a "+ Add" re-renders a list, bring the new (last) row into view and
|
|
202
220
|
* focus its name input (`.set-name`, else the first input). */
|
|
203
221
|
declare function focusNewRow(listEl: HTMLElement | null | undefined): void;
|
|
@@ -900,4 +918,4 @@ declare function historyNav(onBack: () => void, onForward: () => void): {
|
|
|
900
918
|
set(canBack: boolean, canForward: boolean): void;
|
|
901
919
|
};
|
|
902
920
|
|
|
903
|
-
export { type AboutOptions, type AnchoredPanel, type AnchoredPanelOptions, type Child, type Comment, type CommentMessage, type CommentsOptions, type ConfirmOptions, type DocLine, type DupGuard, type ElProps, type GameIdEditorOptions, type IconName, type IconSvgName, type Identity, type IdentityOptions, type JobProgressOptions, type JobProgressView, type NavHistory, type NavHistoryOptions, type Notes, type NotesEditorOptions, PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, type PaneShell, type PaneShellOptions, type PaneShellState, type PaneSide, type PaneSideConfig, type PinButton, type PinButtonOptions, type PropertyRefOptions, RESERVED_PROPERTY_NAMES, type SaveController, type SaveControllerOptions, type SaveIndicator, type SaveStatus, type SettingsDialog, type SettingsDialogOptions, type SettingsSection, type SettingsSectionHandle, type ShardVc, type StaleBarOptions, type StepperBarOptions, type StepperItem, type StepperTone, type TipRect, type ToastKind, type ToastOptions, type TooltipOptions, type VcMap, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
|
921
|
+
export { type AboutOptions, type AnchoredPanel, type AnchoredPanelOptions, type Child, type Comment, type CommentMessage, type CommentsOptions, type ConfirmOptions, type DocLine, type DupGuard, type ElProps, type GameIdEditorOptions, type IconName, type IconSvgName, type Identity, type IdentityOptions, type JobProgressOptions, type JobProgressView, type NavHistory, type NavHistoryOptions, type Notes, type NotesEditorOptions, PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, type PaneShell, type PaneShellOptions, type PaneShellState, type PaneSide, type PaneSideConfig, type PinButton, type PinButtonOptions, type PropertyRefOptions, RESERVED_PROPERTY_NAMES, type SaveController, type SaveControllerOptions, type SaveIndicator, type SaveStatus, type SettingsDialog, type SettingsDialogOptions, type SettingsSection, type SettingsSectionHandle, type ShardVc, type StaleBarOptions, type StepperBarOptions, type StepperItem, type StepperTone, type TipRect, type ToastKind, type ToastOptions, type TooltipOptions, type VcMap, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, revealRow, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
package/dist/index.js
CHANGED
|
@@ -470,6 +470,7 @@ function mountPaneShell(host, opts) {
|
|
|
470
470
|
// src/settings.ts
|
|
471
471
|
function expandableRow(opts) {
|
|
472
472
|
const row = el("div", "set-row");
|
|
473
|
+
if (opts.name !== void 0) row.dataset.name = opts.name;
|
|
473
474
|
const line = el("div", "set-rowline");
|
|
474
475
|
if (opts.details && opts.details.length) {
|
|
475
476
|
const details = el("div", "set-details");
|
|
@@ -495,6 +496,19 @@ function expandableRow(opts) {
|
|
|
495
496
|
}
|
|
496
497
|
return row;
|
|
497
498
|
}
|
|
499
|
+
function revealRow(within, name) {
|
|
500
|
+
const row = [...within.querySelectorAll(".set-row")].find((r) => r.dataset.name === name);
|
|
501
|
+
if (!row) return false;
|
|
502
|
+
const toggle = row.querySelector(".set-rowline > .set-expand");
|
|
503
|
+
if (toggle && toggle.getAttribute("aria-expanded") !== "true") toggle.click();
|
|
504
|
+
const still = typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
505
|
+
row.scrollIntoView({ block: "center", behavior: still ? "auto" : "smooth" });
|
|
506
|
+
row.classList.remove("landed");
|
|
507
|
+
void row.offsetWidth;
|
|
508
|
+
row.classList.add("landed");
|
|
509
|
+
row.addEventListener("animationend", () => row.classList.remove("landed"), { once: true });
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
498
512
|
function focusNewRow(listEl) {
|
|
499
513
|
const last = listEl?.lastElementChild;
|
|
500
514
|
if (!(last instanceof HTMLElement)) return;
|
|
@@ -1789,6 +1803,6 @@ function historyNav(onBack, onForward) {
|
|
|
1789
1803
|
};
|
|
1790
1804
|
}
|
|
1791
1805
|
|
|
1792
|
-
export { PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, RESERVED_PROPERTY_NAMES, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
|
1806
|
+
export { PALETTE, PALETTE_SIZE, PROPERTY_NAME_HINT, RESERVED_PROPERTY_NAMES, askIdentity, bindPropertyName, bindPropertyRef, closeAnchoredPanel, closeWithExit, colourFor, colourIndex, confirmDialog, createNavHistory, createSaveController, dismissToast, dupGuard, el, expandableRow, firstIllegalPropertyName, focusNewRow, foldVc, gameIdify, hideTip, historyNav, icon, iconBtn, iconSvg, initTooltips, isCaseOnlyPropertyName, isValidGameId, isValidPropertyName, labelled, lockControls, lockNotice, mountJobProgress, mountPaneShell, mountSettingsDialog, moveItem, openAnchoredPanel, openComments, openGameIdEditor, openNotesEditor, paintVcBadges, pinButton, placeAnchored, propertyNameProblem, propertyNameify, propertyRefProblem, renderStepperBar, revalidatePropertyRefs, revealRow, saveIndicator, showAbout, staleBar, tagChips, tipAt, tipBold, toast, vcBadgeFor };
|
|
1793
1807
|
//# sourceMappingURL=index.js.map
|
|
1794
1808
|
//# sourceMappingURL=index.js.map
|