@wildwinter/app-shell 0.51.0 → 0.53.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/{chunk-B56FWJ5Y.js → chunk-5BKGDTYD.js} +3 -3
- package/dist/{chunk-B56FWJ5Y.js.map → chunk-5BKGDTYD.js.map} +1 -1
- package/dist/{chunk-ELEDQRZ7.js → chunk-XJM733E6.js} +26 -5
- package/dist/chunk-XJM733E6.js.map +1 -0
- package/dist/controls.css +3 -0
- package/dist/controls.css.map +1 -1
- package/dist/extension-copy.cjs +88 -0
- package/dist/extension-copy.cjs.map +1 -0
- package/dist/extension-copy.d.cts +54 -0
- package/dist/extension-copy.d.ts +54 -0
- package/dist/extension-copy.js +82 -0
- package/dist/extension-copy.js.map +1 -0
- package/dist/history.cjs +5 -0
- package/dist/history.cjs.map +1 -1
- package/dist/history.d.cts +3 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +5 -0
- package/dist/history.js.map +1 -1
- package/dist/index.cjs +23 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/property-list.cjs.map +1 -1
- package/dist/property-list.js +2 -2
- package/dist/value-control.cjs +24 -2
- package/dist/value-control.cjs.map +1 -1
- package/dist/value-control.d.cts +12 -1
- package/dist/value-control.d.ts +12 -1
- package/dist/value-control.js +1 -1
- package/dist/value-rows.cjs +37 -8
- package/dist/value-rows.cjs.map +1 -1
- package/dist/value-rows.d.cts +8 -0
- package/dist/value-rows.d.ts +8 -0
- package/dist/value-rows.js +15 -7
- package/dist/value-rows.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-ELEDQRZ7.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-5BKGDTYD.js';
|
|
2
|
+
import './chunk-XJM733E6.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,7 +530,10 @@ function fieldRow(initial) {
|
|
|
512
530
|
purpose.id = `${caption.id}-p`;
|
|
513
531
|
problem.id = `${caption.id}-m`;
|
|
514
532
|
const sayProblem = () => {
|
|
515
|
-
const
|
|
533
|
+
const help = valueHelpText(opts.decl, opts.value);
|
|
534
|
+
valueHelp.textContent = help;
|
|
535
|
+
valueHelp.hidden = help === "";
|
|
536
|
+
const words = opts.replaceProblem !== void 0 ? [opts.replaceProblem].filter((w) => w !== "") : [typing || fieldValueProblem(opts.decl, opts.value), opts.problem ?? ""].filter((w) => w !== "");
|
|
516
537
|
problem.textContent = words.join(" ");
|
|
517
538
|
problem.hidden = words.length === 0;
|
|
518
539
|
row.classList.toggle("has-problem", 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);
|
|
@@ -812,5 +833,6 @@ exports.fieldRows = fieldRows;
|
|
|
812
833
|
exports.fieldValueProblem = fieldValueProblem;
|
|
813
834
|
exports.rungStrip = rungStrip;
|
|
814
835
|
exports.stageGateNote = stageGateNote;
|
|
836
|
+
exports.valueHelpText = valueHelpText;
|
|
815
837
|
//# sourceMappingURL=value-control.cjs.map
|
|
816
838
|
//# sourceMappingURL=value-control.cjs.map
|