@wildwinter/app-shell 0.46.4 → 0.47.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 +5 -4
- package/dist/{chunk-EHR2KBZC.js → chunk-5SQHL4YV.js} +3 -3
- package/dist/{chunk-EHR2KBZC.js.map → chunk-5SQHL4YV.js.map} +1 -1
- package/dist/{chunk-J6RSONXM.js → chunk-FPXEQKWM.js} +4 -4
- package/dist/{chunk-J6RSONXM.js.map → chunk-FPXEQKWM.js.map} +1 -1
- package/dist/{chunk-R3NXPHRZ.js → chunk-IFWLNIBR.js} +13 -5
- package/dist/chunk-IFWLNIBR.js.map +1 -0
- package/dist/{chunk-CUFREPJ5.js → chunk-IK3LWBQL.js} +4 -4
- package/dist/{chunk-CUFREPJ5.js.map → chunk-IK3LWBQL.js.map} +1 -1
- package/dist/{chunk-WKPKBAXS.js → chunk-NKL6DNBZ.js} +4 -4
- package/dist/{chunk-WKPKBAXS.js.map → chunk-NKL6DNBZ.js.map} +1 -1
- package/dist/{chunk-UG2P777F.js → chunk-QLVBKME7.js} +34 -6
- package/dist/chunk-QLVBKME7.js.map +1 -0
- package/dist/{chunk-P6WLAEKZ.js → chunk-QVACRWG7.js} +13 -3
- package/dist/chunk-QVACRWG7.js.map +1 -0
- package/dist/{chunk-2ECJUTSX.js → chunk-T25WXWPB.js} +3 -2
- package/dist/chunk-T25WXWPB.js.map +1 -0
- package/dist/{chunk-YRFJLJUH.js → chunk-XR4DRDMA.js} +3 -3
- package/dist/{chunk-YRFJLJUH.js.map → chunk-XR4DRDMA.js.map} +1 -1
- package/dist/{chunk-G2JT3HZH.js → chunk-XXDJCOXN.js} +9 -9
- package/dist/{chunk-G2JT3HZH.js.map → chunk-XXDJCOXN.js.map} +1 -1
- package/dist/context-menu.cjs.map +1 -1
- package/dist/context-menu.js +2 -2
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js +2 -2
- package/dist/index.cjs +80 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -12
- package/dist/index.d.ts +85 -12
- package/dist/index.js +34 -20
- package/dist/index.js.map +1 -1
- package/dist/kit-gallery.cjs.map +1 -1
- package/dist/kit-gallery.js +3 -3
- package/dist/link-status.cjs +12 -5
- package/dist/link-status.cjs.map +1 -1
- package/dist/link-status.d.cts +1 -1
- package/dist/link-status.d.ts +1 -1
- package/dist/link-status.js +3 -3
- package/dist/menu.cjs +1 -0
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.d.cts +8 -4
- package/dist/menu.d.ts +8 -4
- package/dist/menu.js +1 -1
- package/dist/{property-list-D3VZCJzi.d.cts → property-list-5mS4J2uy.d.cts} +8 -2
- package/dist/{property-list-D3VZCJzi.d.ts → property-list-5mS4J2uy.d.ts} +8 -2
- package/dist/property-list.cjs +10 -2
- package/dist/property-list.cjs.map +1 -1
- package/dist/property-list.d.cts +1 -1
- package/dist/property-list.d.ts +1 -1
- package/dist/property-list.js +2 -2
- package/dist/settings.css +54 -0
- package/dist/settings.css.map +1 -1
- package/dist/updater-view.cjs.map +1 -1
- package/dist/updater-view.js +3 -3
- package/dist/util.cjs +11 -0
- package/dist/util.cjs.map +1 -1
- package/dist/util.d.cts +18 -1
- package/dist/util.d.ts +18 -1
- package/dist/util.js +1 -1
- package/dist/welcome.cjs.map +1 -1
- package/dist/welcome.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-2ECJUTSX.js.map +0 -1
- package/dist/chunk-P6WLAEKZ.js.map +0 -1
- package/dist/chunk-R3NXPHRZ.js.map +0 -1
- package/dist/chunk-UG2P777F.js.map +0 -1
|
@@ -78,8 +78,14 @@ interface SettingsDialogOptions {
|
|
|
78
78
|
sections: SettingsSection[];
|
|
79
79
|
/** Fired when Save is clicked and every section validates. The app reads its
|
|
80
80
|
* own section state and persists. May be async; the dialog stays open until
|
|
81
|
-
* it resolves, then closes.
|
|
82
|
-
|
|
81
|
+
* it resolves, then closes.
|
|
82
|
+
*
|
|
83
|
+
* Return `false` (or a Promise of it) when the save was REFUSED, a version
|
|
84
|
+
* control lock say, and the dialog stays open with the author's edits in it
|
|
85
|
+
* for another try; saying why is the app's (a toast, usually). A throw, or a
|
|
86
|
+
* rejected Promise, is treated the same way rather than surfacing as an
|
|
87
|
+
* unhandled rejection. Anything else closes the dialog, as it always has. */
|
|
88
|
+
onSave: () => void | boolean | Promise<void | boolean>;
|
|
83
89
|
}
|
|
84
90
|
interface SettingsDialog {
|
|
85
91
|
/** Open (optionally on a given tab id). Sections re-mount from current data. */
|
|
@@ -78,8 +78,14 @@ interface SettingsDialogOptions {
|
|
|
78
78
|
sections: SettingsSection[];
|
|
79
79
|
/** Fired when Save is clicked and every section validates. The app reads its
|
|
80
80
|
* own section state and persists. May be async; the dialog stays open until
|
|
81
|
-
* it resolves, then closes.
|
|
82
|
-
|
|
81
|
+
* it resolves, then closes.
|
|
82
|
+
*
|
|
83
|
+
* Return `false` (or a Promise of it) when the save was REFUSED, a version
|
|
84
|
+
* control lock say, and the dialog stays open with the author's edits in it
|
|
85
|
+
* for another try; saying why is the app's (a toast, usually). A throw, or a
|
|
86
|
+
* rejected Promise, is treated the same way rather than surfacing as an
|
|
87
|
+
* unhandled rejection. Anything else closes the dialog, as it always has. */
|
|
88
|
+
onSave: () => void | boolean | Promise<void | boolean>;
|
|
83
89
|
}
|
|
84
90
|
interface SettingsDialog {
|
|
85
91
|
/** Open (optionally on a given tab id). Sections re-mount from current data. */
|
package/dist/property-list.cjs
CHANGED
|
@@ -260,11 +260,18 @@ var DRAWN = {
|
|
|
260
260
|
viewNode: stroked('<path d="m10.586 5.414-5.172 5.172"/><path d="m18.586 13.414-5.172 5.172"/><path d="M6 12h12"/><circle cx="12" cy="20" r="2"/><circle cx="12" cy="4" r="2"/><circle cx="20" cy="12" r="2"/><circle cx="4" cy="12" r="2"/>'),
|
|
261
261
|
/** Record: the disc, in whatever colour the button is. (a disc; see DISC_LARGE) */
|
|
262
262
|
record: DISC_LARGE,
|
|
263
|
+
/** Sound: play with audio. (volume-2: the cone and two waves. Patterpad's
|
|
264
|
+
* hand-drawn one had a single wave, which at 14px reads as quiet rather
|
|
265
|
+
* than as sound.) */
|
|
266
|
+
speaker: stroked('<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"/><path d="M16 9a5 5 0 0 1 0 6"/><path d="M19.364 18.364a9 9 0 0 0 0-12.728"/>'),
|
|
263
267
|
// --- handling -------------------------------------------------------------
|
|
264
268
|
/** The drag grip on a reorderable row. (grip-vertical) */
|
|
265
269
|
grip: stroked('<circle cx="9" cy="12" r="1"/><circle cx="9" cy="5" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="19" r="1"/>'),
|
|
266
270
|
/** Add one of whatever this list holds. (plus) */
|
|
267
271
|
add: stroked('<path d="M5 12h14"/><path d="M12 5v14"/>'),
|
|
272
|
+
/** Copy this to the clipboard. (copy: the front sheet whole, the back
|
|
273
|
+
* sheet showing round two of its sides) */
|
|
274
|
+
copy: stroked('<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>'),
|
|
268
275
|
/** Connect: to a server, a live link, a running game. (plug) */
|
|
269
276
|
connect: stroked('<path d="M12 22v-5"/><path d="M15 8V2"/><path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z"/><path d="M9 8V2"/>'),
|
|
270
277
|
/** Search. (search) */
|
|
@@ -345,16 +352,17 @@ function iconBtn(name, title, onClick, disabled = false, danger = false) {
|
|
|
345
352
|
b.addEventListener("click", onClick);
|
|
346
353
|
return b;
|
|
347
354
|
}
|
|
348
|
-
function labelled(label, control) {
|
|
355
|
+
function labelled(label, control, hint) {
|
|
349
356
|
const target = control.matches("input, select, textarea") ? control : control.querySelector("input:not([type=button]):not([type=submit]), select, textarea");
|
|
350
357
|
const w = el(target ? "label" : "div", "shell-labelled");
|
|
351
358
|
w.append(el("span", "shell-fieldcap", label), control);
|
|
352
359
|
if (target) {
|
|
353
|
-
if (!target.id) target.id =
|
|
360
|
+
if (!target.id) target.id = uid();
|
|
354
361
|
w.htmlFor = target.id;
|
|
355
362
|
}
|
|
356
363
|
return w;
|
|
357
364
|
}
|
|
365
|
+
var uid = () => `shell-f-${Math.random().toString(36).slice(2, 9)}`;
|
|
358
366
|
function moveItem(arr, i, delta) {
|
|
359
367
|
const j = i + delta;
|
|
360
368
|
if (j < 0 || j >= arr.length) return false;
|