@wildwinter/app-shell 0.58.0 → 0.58.1
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/dist/{chunk-XJM733E6.js → chunk-OO6O4LEL.js} +6 -2
- package/dist/chunk-OO6O4LEL.js.map +1 -0
- package/dist/{chunk-5BKGDTYD.js → chunk-RMQNBWLZ.js} +3 -3
- package/dist/{chunk-5BKGDTYD.js.map → chunk-RMQNBWLZ.js.map} +1 -1
- package/dist/index.cjs +4 -0
- 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 +4 -0
- package/dist/value-control.cjs.map +1 -1
- package/dist/value-control.d.cts +4 -4
- package/dist/value-control.d.ts +4 -4
- package/dist/value-control.js +1 -1
- package/dist/value-rows.cjs +8 -1
- package/dist/value-rows.cjs.map +1 -1
- package/dist/value-rows.js +5 -2
- package/dist/value-rows.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-XJM733E6.js.map +0 -1
package/dist/value-control.d.cts
CHANGED
|
@@ -55,13 +55,13 @@ interface FieldDeclLike extends ValueDeclLike {
|
|
|
55
55
|
name: string;
|
|
56
56
|
/** What the field is for, shown under the control. */
|
|
57
57
|
purpose?: string;
|
|
58
|
-
/** A sentence about each value (an enum's values, the flags, a quality's stages), as an
|
|
59
|
-
* gives them: the chosen value's is shown under the control, and each chosen flag's. */
|
|
58
|
+
/** A sentence about each value (an enum's values, the flags, a quality's stages, a pick's fixed words), as an
|
|
59
|
+
* extension's manifest gives them: the chosen value's is shown under the control, and each chosen flag's. */
|
|
60
60
|
valueHelp?: Readonly<Record<string, string>>;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* The help for what `decl` holds: the chosen enum value's or
|
|
64
|
-
* each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
|
|
63
|
+
* The help for what `decl` holds: the chosen enum value's, stage's or pick word's (the one it falls back to, when
|
|
64
|
+
* unset), or each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
|
|
65
65
|
*/
|
|
66
66
|
declare function valueHelpText(decl: FieldDeclLike, value: unknown): string;
|
|
67
67
|
interface FieldRowOptions {
|
package/dist/value-control.d.ts
CHANGED
|
@@ -55,13 +55,13 @@ interface FieldDeclLike extends ValueDeclLike {
|
|
|
55
55
|
name: string;
|
|
56
56
|
/** What the field is for, shown under the control. */
|
|
57
57
|
purpose?: string;
|
|
58
|
-
/** A sentence about each value (an enum's values, the flags, a quality's stages), as an
|
|
59
|
-
* gives them: the chosen value's is shown under the control, and each chosen flag's. */
|
|
58
|
+
/** A sentence about each value (an enum's values, the flags, a quality's stages, a pick's fixed words), as an
|
|
59
|
+
* extension's manifest gives them: the chosen value's is shown under the control, and each chosen flag's. */
|
|
60
60
|
valueHelp?: Readonly<Record<string, string>>;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* The help for what `decl` holds: the chosen enum value's or
|
|
64
|
-
* each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
|
|
63
|
+
* The help for what `decl` holds: the chosen enum value's, stage's or pick word's (the one it falls back to, when
|
|
64
|
+
* unset), or each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
|
|
65
65
|
*/
|
|
66
66
|
declare function valueHelpText(decl: FieldDeclLike, value: unknown): string;
|
|
67
67
|
interface FieldRowOptions {
|
package/dist/value-control.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defaultLabel, fallbackText, fieldRow, fieldRowFocus, fieldRows, fieldValueProblem, rungStrip, stageGateNote, valueHelpText } from './chunk-
|
|
1
|
+
export { defaultLabel, fallbackText, fieldRow, fieldRowFocus, fieldRows, fieldValueProblem, rungStrip, stageGateNote, valueHelpText } from './chunk-OO6O4LEL.js';
|
|
2
2
|
import './chunk-W4WC4FO5.js';
|
|
3
3
|
//# sourceMappingURL=value-control.js.map
|
|
4
4
|
//# sourceMappingURL=value-control.js.map
|
package/dist/value-rows.cjs
CHANGED
|
@@ -493,6 +493,10 @@ function valueHelpText(decl, value) {
|
|
|
493
493
|
return h === void 0 ? [] : [`${v}: ${h}`];
|
|
494
494
|
}).join("\n");
|
|
495
495
|
}
|
|
496
|
+
if (decl.type === "pick") {
|
|
497
|
+
const held = typeof value === "string" && value !== "" ? value : typeof decl.default === "string" ? decl.default : "";
|
|
498
|
+
return held === "" ? "" : said(held) ?? "";
|
|
499
|
+
}
|
|
496
500
|
return "";
|
|
497
501
|
}
|
|
498
502
|
var fallbackFlags = (decl) => Array.isArray(decl.default) ? decl.default.filter((v) => typeof v === "string") : [];
|
|
@@ -1205,9 +1209,10 @@ function pickRow(initial) {
|
|
|
1205
1209
|
const body = el("div", "shell-fieldrow-body");
|
|
1206
1210
|
const sel = el("select", "field shell-fieldrow-select");
|
|
1207
1211
|
const help = el("p", "shell-fieldrow-purpose");
|
|
1212
|
+
const valueHelp = el("p", "shell-fieldrow-purpose shell-fieldrow-valuehelp");
|
|
1208
1213
|
const problem = el("p", "shell-fieldrow-problem");
|
|
1209
1214
|
problem.setAttribute("role", "status");
|
|
1210
|
-
body.append(sel, help, problem);
|
|
1215
|
+
body.append(sel, help, valueHelp, problem);
|
|
1211
1216
|
row.append(caption, body);
|
|
1212
1217
|
sel.addEventListener("change", () => {
|
|
1213
1218
|
const v = sel.value === "" ? void 0 : sel.value;
|
|
@@ -1263,6 +1268,8 @@ function pickRow(initial) {
|
|
|
1263
1268
|
sel.disabled = o.onCommit === void 0 || o.disabled === true;
|
|
1264
1269
|
help.textContent = o.decl.help ?? o.decl.purpose ?? "";
|
|
1265
1270
|
help.hidden = help.textContent === "";
|
|
1271
|
+
valueHelp.textContent = valueHelpText(o.decl, o.value);
|
|
1272
|
+
valueHelp.hidden = valueHelp.textContent === "";
|
|
1266
1273
|
const words = o.replaceProblem ?? [ownProblems(o.decl, o.value, o.adapter), o.problem ?? ""].filter((w) => w !== "").join(" ");
|
|
1267
1274
|
problem.textContent = words;
|
|
1268
1275
|
problem.hidden = words === "";
|