@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.
@@ -55,7 +55,15 @@ 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 extension's manifest
59
+ * gives them: the chosen value's is shown under the control, and each chosen flag's. */
60
+ valueHelp?: Readonly<Record<string, string>>;
58
61
  }
62
+ /**
63
+ * The help for what `decl` holds: the chosen enum value's or stage's (the one it falls back to, when unset), or
64
+ * each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
65
+ */
66
+ declare function valueHelpText(decl: FieldDeclLike, value: unknown): string;
59
67
  interface FieldRowOptions {
60
68
  decl: FieldDeclLike;
61
69
  /** The node's own value, typed (a flags value is a string list), or undefined where the node sets none. */
@@ -88,6 +96,14 @@ declare function fieldValueProblem(decl: ValueDeclLike, value: unknown): string;
88
96
  * purpose and any message under it. See the section comment above for the rules it carries.
89
97
  */
90
98
  declare function fieldRow(initial: FieldRowOptions): FieldRowHandle;
99
+ /**
100
+ * The focus keeping `fieldRows` does, for a host (or a structured row) that keeps row elements itself: call
101
+ * `settle` before it updates a row and `restore` once the row is back in the page.
102
+ */
103
+ declare const fieldRowFocus: {
104
+ settle: (row: HTMLElement) => void;
105
+ restore: (row: HTMLElement) => void;
106
+ };
91
107
  interface FieldRows {
92
108
  /**
93
109
  * The row for `key` (a node and a field, say `${nodeId}:${field}`): the same element as last time when
@@ -101,4 +117,4 @@ interface FieldRows {
101
117
  /** A cache of field rows for a host that redraws its whole view on every change. */
102
118
  declare function fieldRows(): FieldRows;
103
119
 
104
- export { type FieldDeclLike, type FieldRowHandle, type FieldRowOptions, type FieldRows, type FieldValue, type RungStripOptions, type ValueDeclLike, defaultLabel, fallbackText, fieldRow, fieldRows, fieldValueProblem, rungStrip, stageGateNote };
120
+ export { type FieldDeclLike, type FieldRowHandle, type FieldRowOptions, type FieldRows, type FieldValue, type RungStripOptions, type ValueDeclLike, defaultLabel, fallbackText, fieldRow, fieldRowFocus, fieldRows, fieldValueProblem, rungStrip, stageGateNote, valueHelpText };
@@ -55,7 +55,15 @@ 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 extension's manifest
59
+ * gives them: the chosen value's is shown under the control, and each chosen flag's. */
60
+ valueHelp?: Readonly<Record<string, string>>;
58
61
  }
62
+ /**
63
+ * The help for what `decl` holds: the chosen enum value's or stage's (the one it falls back to, when unset), or
64
+ * each chosen flag's, "name: sentence" a line each. Empty when the declaration describes none of them.
65
+ */
66
+ declare function valueHelpText(decl: FieldDeclLike, value: unknown): string;
59
67
  interface FieldRowOptions {
60
68
  decl: FieldDeclLike;
61
69
  /** The node's own value, typed (a flags value is a string list), or undefined where the node sets none. */
@@ -88,6 +96,14 @@ declare function fieldValueProblem(decl: ValueDeclLike, value: unknown): string;
88
96
  * purpose and any message under it. See the section comment above for the rules it carries.
89
97
  */
90
98
  declare function fieldRow(initial: FieldRowOptions): FieldRowHandle;
99
+ /**
100
+ * The focus keeping `fieldRows` does, for a host (or a structured row) that keeps row elements itself: call
101
+ * `settle` before it updates a row and `restore` once the row is back in the page.
102
+ */
103
+ declare const fieldRowFocus: {
104
+ settle: (row: HTMLElement) => void;
105
+ restore: (row: HTMLElement) => void;
106
+ };
91
107
  interface FieldRows {
92
108
  /**
93
109
  * The row for `key` (a node and a field, say `${nodeId}:${field}`): the same element as last time when
@@ -101,4 +117,4 @@ interface FieldRows {
101
117
  /** A cache of field rows for a host that redraws its whole view on every change. */
102
118
  declare function fieldRows(): FieldRows;
103
119
 
104
- export { type FieldDeclLike, type FieldRowHandle, type FieldRowOptions, type FieldRows, type FieldValue, type RungStripOptions, type ValueDeclLike, defaultLabel, fallbackText, fieldRow, fieldRows, fieldValueProblem, rungStrip, stageGateNote };
120
+ export { type FieldDeclLike, type FieldRowHandle, type FieldRowOptions, type FieldRows, type FieldValue, type RungStripOptions, type ValueDeclLike, defaultLabel, fallbackText, fieldRow, fieldRowFocus, fieldRows, fieldValueProblem, rungStrip, stageGateNote, valueHelpText };
@@ -1,4 +1,4 @@
1
- export { defaultLabel, fallbackText, fieldRow, fieldRows, fieldValueProblem, rungStrip, stageGateNote } from './chunk-JOFRUWTP.js';
1
+ export { defaultLabel, fallbackText, fieldRow, fieldRowFocus, fieldRows, fieldValueProblem, rungStrip, stageGateNote, valueHelpText } from './chunk-4QDD6GF3.js';
2
2
  import './chunk-W4WC4FO5.js';
3
3
  //# sourceMappingURL=value-control.js.map
4
4
  //# sourceMappingURL=value-control.js.map