@wildwinter/app-shell 0.50.0 → 0.52.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 +43 -0
- package/dist/{chunk-JOFRUWTP.js → chunk-4QDD6GF3.js} +29 -4
- package/dist/chunk-4QDD6GF3.js.map +1 -0
- package/dist/{chunk-TETY2BTN.js → chunk-NGLZUDOT.js} +3 -3
- package/dist/{chunk-TETY2BTN.js.map → chunk-NGLZUDOT.js.map} +1 -1
- package/dist/controls.css +34 -0
- package/dist/controls.css.map +1 -1
- package/dist/history.cjs +194 -0
- package/dist/history.cjs.map +1 -0
- package/dist/history.d.cts +111 -0
- package/dist/history.d.ts +111 -0
- package/dist/history.js +188 -0
- package/dist/history.js.map +1 -0
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/property-list.cjs.map +1 -1
- package/dist/property-list.js +2 -2
- package/dist/value-control.cjs +28 -1
- package/dist/value-control.cjs.map +1 -1
- package/dist/value-control.d.cts +17 -1
- package/dist/value-control.d.ts +17 -1
- package/dist/value-control.js +1 -1
- package/dist/value-rows.cjs +1132 -0
- package/dist/value-rows.cjs.map +1 -0
- package/dist/value-rows.d.cts +77 -0
- package/dist/value-rows.d.ts +77 -0
- package/dist/value-rows.js +305 -0
- package/dist/value-rows.js.map +1 -0
- package/package.json +21 -4
- package/dist/chunk-JOFRUWTP.js.map +0 -1
package/dist/property-list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { PROPERTY_TYPES, defaultControl, mountPropertyList } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PROPERTY_TYPES, defaultControl, mountPropertyList } from './chunk-NGLZUDOT.js';
|
|
2
|
+
import './chunk-4QDD6GF3.js';
|
|
3
3
|
import './chunk-W4WC4FO5.js';
|
|
4
4
|
//# sourceMappingURL=property-list.js.map
|
|
5
5
|
//# sourceMappingURL=property-list.js.map
|
package/dist/value-control.cjs
CHANGED
|
@@ -452,6 +452,23 @@ function rungStrip(opts) {
|
|
|
452
452
|
}
|
|
453
453
|
return strip;
|
|
454
454
|
}
|
|
455
|
+
function valueHelpText(decl, value) {
|
|
456
|
+
const help = decl.valueHelp;
|
|
457
|
+
if (help === void 0) return "";
|
|
458
|
+
const said = (v) => Object.prototype.hasOwnProperty.call(help, v) ? help[v] : void 0;
|
|
459
|
+
if (decl.type === "enum" || decl.type === "quality") {
|
|
460
|
+
const held = typeof value === "string" && value !== "" ? value : typeof decl.default === "string" && decl.default !== "" ? decl.default : decl.type === "enum" ? decl.values?.[0] : decl.stages?.[0];
|
|
461
|
+
return held === void 0 ? "" : said(held) ?? "";
|
|
462
|
+
}
|
|
463
|
+
if (decl.type === "flags") {
|
|
464
|
+
const held = Array.isArray(value) ? value.map(String) : Array.isArray(decl.default) ? decl.default.map(String) : [];
|
|
465
|
+
return held.flatMap((v) => {
|
|
466
|
+
const h = said(v);
|
|
467
|
+
return h === void 0 ? [] : [`${v}: ${h}`];
|
|
468
|
+
}).join("\n");
|
|
469
|
+
}
|
|
470
|
+
return "";
|
|
471
|
+
}
|
|
455
472
|
var fallbackFlags = (decl) => Array.isArray(decl.default) ? decl.default.filter((v) => typeof v === "string") : [];
|
|
456
473
|
function fieldValueProblem(decl, value) {
|
|
457
474
|
if (value === void 0 || value === null || value === "") return "";
|
|
@@ -492,6 +509,7 @@ function fieldRow(initial) {
|
|
|
492
509
|
caption.id = `shell-fr-${Math.random().toString(36).slice(2, 9)}`;
|
|
493
510
|
const body = el("div", "shell-fieldrow-body");
|
|
494
511
|
const purpose = el("p", "shell-fieldrow-purpose");
|
|
512
|
+
const valueHelp = el("p", "shell-fieldrow-purpose shell-fieldrow-valuehelp");
|
|
495
513
|
const problem = el("p", "shell-fieldrow-problem");
|
|
496
514
|
problem.setAttribute("role", "status");
|
|
497
515
|
row.append(caption, body);
|
|
@@ -512,6 +530,9 @@ function fieldRow(initial) {
|
|
|
512
530
|
purpose.id = `${caption.id}-p`;
|
|
513
531
|
problem.id = `${caption.id}-m`;
|
|
514
532
|
const sayProblem = () => {
|
|
533
|
+
const help = valueHelpText(opts.decl, opts.value);
|
|
534
|
+
valueHelp.textContent = help;
|
|
535
|
+
valueHelp.hidden = help === "";
|
|
515
536
|
const words = [typing || fieldValueProblem(opts.decl, opts.value), opts.problem ?? ""].filter((w) => w !== "");
|
|
516
537
|
problem.textContent = words.join(" ");
|
|
517
538
|
problem.hidden = words.length === 0;
|
|
@@ -701,7 +722,7 @@ function fieldRow(initial) {
|
|
|
701
722
|
purpose.textContent = decl.purpose ?? "";
|
|
702
723
|
if (decl.purpose) body.append(purpose);
|
|
703
724
|
else purpose.remove();
|
|
704
|
-
body.append(problem);
|
|
725
|
+
body.append(valueHelp, problem);
|
|
705
726
|
sayProblem();
|
|
706
727
|
};
|
|
707
728
|
draw(initial);
|
|
@@ -775,6 +796,10 @@ var keeper = /* @__PURE__ */ (() => {
|
|
|
775
796
|
holds: (row) => memos.has(row)
|
|
776
797
|
};
|
|
777
798
|
})();
|
|
799
|
+
var fieldRowFocus = {
|
|
800
|
+
settle: (row) => keeper.settle(row),
|
|
801
|
+
restore: (row) => keeper.restore(row)
|
|
802
|
+
};
|
|
778
803
|
function fieldRows() {
|
|
779
804
|
const rows = /* @__PURE__ */ new Map();
|
|
780
805
|
return {
|
|
@@ -803,9 +828,11 @@ function fieldRows() {
|
|
|
803
828
|
exports.defaultLabel = defaultLabel;
|
|
804
829
|
exports.fallbackText = fallbackText;
|
|
805
830
|
exports.fieldRow = fieldRow;
|
|
831
|
+
exports.fieldRowFocus = fieldRowFocus;
|
|
806
832
|
exports.fieldRows = fieldRows;
|
|
807
833
|
exports.fieldValueProblem = fieldValueProblem;
|
|
808
834
|
exports.rungStrip = rungStrip;
|
|
809
835
|
exports.stageGateNote = stageGateNote;
|
|
836
|
+
exports.valueHelpText = valueHelpText;
|
|
810
837
|
//# sourceMappingURL=value-control.cjs.map
|
|
811
838
|
//# sourceMappingURL=value-control.cjs.map
|