@cosmicdrift/kumiko-types 0.414.0 → 0.416.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/dist/config.d.ts CHANGED
@@ -83,6 +83,8 @@ export type ConfigMask = {
83
83
  readonly description?: string;
84
84
  readonly icon?: NavIconKey;
85
85
  readonly order?: number;
86
+ /** Shows the value on the generated settings screen without an input; a read-only key cannot also be `required`. */
87
+ readonly readOnly?: boolean;
86
88
  };
87
89
  export type ConfigDefinition = {
88
90
  readonly keys: Readonly<Record<string, ConfigKeyDefinition>>;
@@ -164,6 +166,8 @@ export type MaxPerTenantOptions = {
164
166
  readonly onLimit: "skip" | "defer";
165
167
  readonly deferMs?: number | undefined;
166
168
  };
169
+ export declare const IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES: readonly ["rebuildable-derived-data", "high-risk-or-cron-pipeline", "per-dispatch-record-key"];
170
+ export type IrreversibleWithoutEntryHandler = (typeof IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES)[number];
167
171
  export type JobDefinition = {
168
172
  readonly name: string;
169
173
  readonly handler: JobHandlerFn;
@@ -189,6 +193,7 @@ export type JobDefinition = {
189
193
  readonly tenantVisibleRun?: {
190
194
  readonly subjectFields?: readonly string[] | undefined;
191
195
  } | undefined;
196
+ readonly irreversibleWithoutEntryHandler?: IrreversibleWithoutEntryHandler | undefined;
192
197
  };
193
198
  export type NotificationRecipientFn = (result: import("./hooks.ts").SaveContext) => string | readonly string[] | {
194
199
  readonly tenant: string;
package/dist/config.js CHANGED
@@ -1 +1,10 @@
1
- export {};
1
+ // The only pipelines allowed to call an irreversible primitive (forget, hard delete, kms.eraseKey,
2
+ // readAsInstruction write) without a directly dispatched entry handler. A new case is a framework change.
3
+ // rebuildable-derived-data deletes derived data that is re-created from a reversible source
4
+ // high-risk-or-cron-pipeline runs behind a risk "high" handler or as a cron scan of expired data
5
+ // per-dispatch-record-key the step-dispatcher erasing its per-dispatch record key
6
+ export const IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES = [
7
+ "rebuildable-derived-data",
8
+ "high-risk-or-cron-pipeline",
9
+ "per-dispatch-record-key",
10
+ ];
package/dist/fields.d.ts CHANGED
@@ -227,8 +227,8 @@ export type MultiSelectFieldDef<TOptions extends readonly string[] = readonly st
227
227
  readonly access?: FieldAccess;
228
228
  /** Renderer metadata: `"checkboxes"` renders every option as a visible
229
229
  * checkbox with a select-all toggle. Default (omitted) stays the combobox
230
- * dropdown. */
231
- readonly display?: "checkboxes" | "dropdown";
230
+ * dropdown; `"chips"` renders toggle chips with a check mark on the chosen ones. */
231
+ readonly display?: "checkboxes" | "chips" | "dropdown";
232
232
  /** Renderer metadata: column count for the `"checkboxes"` grid at the widest
233
233
  * breakpoint; narrow viewports always collapse to one column. Omitted =
234
234
  * the renderer picks a sensible count. Ignored unless
@@ -830,4 +830,10 @@ export type EntityDefinition<F extends FieldsMap = FieldsMap, T extends EntityTe
830
830
  /** Attached files are readable only through the record's detail query: the files feature's
831
831
  * privilegedRoles do not bypass it, the uploader check stays. */
832
832
  readonly attachedFileAccess?: "record-only";
833
+ /** Files of this entity may be read from another tenant when `query`, run with `{ id: <entityId> }`
834
+ * as the requesting user, returns the record with that id. Read only: delete stays with the owning tenant. */
835
+ readonly crossTenantFileRead?: {
836
+ readonly query: string;
837
+ readonly reason: string;
838
+ };
833
839
  };
@@ -6,7 +6,7 @@ import type { EntityCache } from "./entity-cache.ts";
6
6
  import type { EnvelopeCipher } from "./envelope-cipher-types.ts";
7
7
  import type { FileContext } from "./file-handle-types.ts";
8
8
  import type { FileProviderResolver } from "./file-provider-resolver-types.ts";
9
- import type { DeliveryAttemptLogFactory, DeliveryAttemptLogFn, EscapeHatchAuditSink, JobRunnerRef, NotifyFactory, NotifyFn, SessionUser, TenantWriteTarget } from "./handlers.ts";
9
+ import type { DeliveryAttemptLogFn, EscapeHatchAuditSink, JobRunnerRef, NotifyFactory, NotifyFn, SessionUser, TenantWriteTarget } from "./handlers.ts";
10
10
  import type { TenantId } from "./identifiers.ts";
11
11
  import type { KmsAdapter } from "./kms-adapter-types.ts";
12
12
  import type { RateLimitResolver } from "./rate-limit-types.ts";
@@ -44,7 +44,6 @@ export type ContextServices = {
44
44
  readonly _notifyFactory?: NotifyFactory;
45
45
  readonly _notifyInTransactionFactory?: (user: SessionUser, tenantId: TenantId) => NotifyFn;
46
46
  readonly _notifyAfterCommitFactory?: (user: SessionUser, tenantId: TenantId) => NotifyFn;
47
- readonly _deliveryAttemptLogFactory?: DeliveryAttemptLogFactory;
48
47
  readonly _logOwnDeliveryAttempt?: DeliveryAttemptLogFn;
49
48
  readonly _escapeHatchAuditSink?: EscapeHatchAuditSink;
50
49
  readonly extensions: Readonly<Record<string, unknown>>;
@@ -143,6 +143,7 @@ export type JobRunnerRef = {
143
143
  readonly priority?: number;
144
144
  readonly jobId?: string;
145
145
  }): Promise<unknown>;
146
+ isJobPending?(jobName: string, jobId: string): Promise<boolean>;
146
147
  };
147
148
  export type DispatchWriteRef = {
148
149
  readonly write: (user: SessionUser, qn: string, payload: unknown, inheritedOrigin?: WriteOrigin) => Promise<WriteResult>;
@@ -8,7 +8,9 @@ import type { AppendEventFn, UnsafeAppendEventFn } from "./handlers.ts";
8
8
  import type { SecretsContext } from "./secrets-types.ts";
9
9
  export type MultiStreamApplyContext<TMap extends object = KumikoEventTypeMap> = {
10
10
  readonly appendEvent: AppendEventFn<TMap>;
11
- readonly unsafeAppendEvent: UnsafeAppendEventFn;
11
+ readonly unsafeAppendEvent: (args: Parameters<UnsafeAppendEventFn>[0] & {
12
+ readonly expectedVersion?: number;
13
+ }) => Promise<void>;
12
14
  readonly loadAggregate: (aggregateId: string, options?: {
13
15
  readonly asOf?: Temporal.Instant;
14
16
  }) => Promise<readonly StoredEvent[]>;
@@ -31,19 +31,32 @@ export type NamedListFilterRef = {
31
31
  readonly label: string;
32
32
  /** Order while this filter is active and the URL carries no sort of its own; wins over `defaultSort`. */
33
33
  readonly sort?: ListSortSpec;
34
- /** Shown instead of the generic "no matches" text when this filter yields an empty list and no search term is set; both are i18n keys. */
34
+ /** Select display: draws a divider line below this entry in the dropdown. */
35
+ readonly separatorAfter?: boolean;
36
+ /**
37
+ * Shown instead of the generic "no matches" text when this filter yields an empty list and no
38
+ * search term is set; `title` and `description` are i18n keys. `paramsQuery` (a registered query
39
+ * QN, called without payload) runs only while the empty state is on screen; its result object
40
+ * becomes the translation params of `description`. Without data (loading, error, no result) the
41
+ * description is not rendered.
42
+ */
35
43
  readonly emptyState?: {
36
44
  readonly title: string;
37
45
  readonly description?: string;
46
+ readonly paramsQuery?: string;
38
47
  };
39
- /** Set by the framework from the entity filter's role rule; the chip is offered only to users holding one of them. */
40
- readonly roles?: readonly string[];
48
+ /** Set by the framework from the entity filter's access rule; the client offers the chip only where `isUiAccessGranted` allows it. */
49
+ readonly access?: AccessRule;
41
50
  };
42
51
  /** How the named filters appear in the toolbar: toggle chips (default) or one single-choice select. */
43
52
  export type NamedFilterFacetOptions = {
44
53
  readonly display?: "chips" | "select";
45
54
  /** Ask the list query for each filter's hit count and show it next to the label. */
46
55
  readonly showCounts?: boolean;
56
+ /** Select entries with zero hits are left out (the active one and "all" stay). Asks for the counts like `showCounts` does, without showing the number unless `showCounts` is set. */
57
+ readonly hideEmpty?: boolean;
58
+ /** "behind-filter": the select opens behind the filter icon next to the search field instead of standing as a pill. Only below `sm`; otherwise it stays a pill. */
59
+ readonly narrowPlacement?: "behind-filter";
47
60
  /** i18n key for the select's label, e.g. "To do". */
48
61
  readonly label?: string;
49
62
  };
package/dist/nav-icon.js CHANGED
@@ -10,7 +10,7 @@
10
10
  // versa.
11
11
  //
12
12
  // Declared as a runtime tuple (not just a type) so callers that sit outside
13
- // this repo's `tsc --build` project graph (e.g. samples, external consumers
13
+ // this repo's typecheck project graph (e.g. samples, external consumers
14
14
  // resolving from a stale published type) still get a runtime-checkable
15
15
  // vocabulary — the boot-validator's validateActionHasIcon checks a declared
16
16
  // icon against NAV_ICON_KEYS instead of trusting "not undefined".
@@ -1,4 +1,4 @@
1
- import type { RunIn } from "./config.ts";
1
+ import type { IrreversibleWithoutEntryHandler, RunIn } from "./config.ts";
2
2
  import type { StoredEvent } from "./event-store-types.ts";
3
3
  import type { ExecutorManagedRunner } from "./executor-brand.ts";
4
4
  import type { EntityDefinition } from "./fields.ts";
@@ -38,4 +38,5 @@ export type MultiStreamProjectionDefinition = {
38
38
  readonly runIn?: RunIn;
39
39
  readonly delivery?: "shared" | "per-instance";
40
40
  readonly startFrom?: "beginning" | "now";
41
+ readonly irreversibleWithoutEntryHandler?: IrreversibleWithoutEntryHandler;
41
42
  };
@@ -1,9 +1,9 @@
1
- import type { FormFieldDefinition } from "./fields.ts";
1
+ import type { FormFieldDefinition, SelectOptionTone } from "./fields.ts";
2
2
  import type { AccessRule, AgentScreenHints } from "./handlers.ts";
3
3
  import type { IconKey } from "./nav-icon.ts";
4
4
  import type { ScreenNavSugar, ScreenSlots } from "./screen.ts";
5
5
  import type { ScreenVisibility } from "./screen-dashboard.ts";
6
- import type { EditLayout } from "./screen-entity-edit.ts";
6
+ import type { EditLayout, FieldTextRef } from "./screen-entity-edit.ts";
7
7
  import type { ScreenFallback } from "./screen-fallback.ts";
8
8
  /** A form field computed from other fields of the same form. `listSum` adds one
9
9
  * numeric cell over all rows of an embedded list field; its `whenEmpty`
@@ -70,7 +70,7 @@ export type ActionFormScreenDefinition = {
70
70
  readonly layout: EditLayout;
71
71
  /** Per-field label i18n key override, same type/semantics as
72
72
  * `EntityEditScreenDefinition.fieldLabels`. Falls back to the convention when absent. */
73
- readonly fieldLabels?: Readonly<Record<string, string>>;
73
+ readonly fieldLabels?: Readonly<Record<string, FieldTextRef>>;
74
74
  /** i18n key for the submit button. Default: the renderer's i18n default
75
75
  * (typically "actions.submit"). */
76
76
  readonly submitLabel?: string;
@@ -87,7 +87,22 @@ export type ActionFormScreenDefinition = {
87
87
  readonly title: string;
88
88
  readonly subtitle?: string;
89
89
  readonly params?: Readonly<Record<string, string>>;
90
+ /** Fields of the `load` result that fill `{name}` placeholders too (static `params` win). Needs `load`. */
91
+ readonly paramsFromLoad?: readonly string[];
90
92
  };
93
+ /** Help text under a field (field name -> i18n key). */
94
+ readonly fieldDescriptions?: Readonly<Record<string, FieldTextRef>>;
95
+ /** i18n key of a short note in a banner above the fields, with a sparkles icon (e.g. "the AI
96
+ * prepared everything, read the text, then send"). */
97
+ readonly infoBand?: string;
98
+ /** Badge next to a field's label (field name -> `{ label: i18n key, tone }`), e.g. "price
99
+ * source open" in `warn`. */
100
+ readonly fieldBadges?: Readonly<Record<string, {
101
+ readonly label: string;
102
+ readonly tone: SelectOptionTone;
103
+ }>>;
104
+ /** Shows a failed submit's error banner above the fields instead of below them. */
105
+ readonly formErrorOnTop?: boolean;
91
106
  /** Visual style of the submit button. "danger" renders it red — for a form
92
107
  * whose handler is destructive (terminate, revoke, delete), so the warning
93
108
  * isn't lost on the way from the calling screen to this one. Default "primary". */
@@ -181,11 +196,16 @@ export type ActionFormRedirect = {
181
196
  * Only used when the target screen type carries an id (`entityEdit`,
182
197
  * `projectionDetail`); a non-string or missing value navigates without
183
198
  * an id, same as a payload without `id` does today. */
184
- readonly idFrom: string;
199
+ readonly idFrom?: string;
185
200
  /** Section id to open on the target `projectionDetail` with `layout.mode:
186
201
  * "tabs"` (the `tab` search param, same as `ToolbarAction` navigate `tab`).
187
202
  * Boot rejects other targets and unknown section ids. */
188
203
  readonly tab?: string;
204
+ /** URL search params of the target, each read from a flat success-payload
205
+ * field (`{ cmd: "threadId" }` opens `?cmd=<threadId>`). Lets a redirect
206
+ * reach a custom screen that is driven by search params instead of a
207
+ * record id; a missing or non-string field leaves its param out. */
208
+ readonly searchParams?: Readonly<Record<string, string>>;
189
209
  };
190
210
  export type ActionFormLoad = {
191
211
  /** Query QN that returns the record. */
@@ -197,6 +217,10 @@ export type ActionFormLoad = {
197
217
  * (same semantics as `ProjectionDetailScreenDefinition.singleton`). Boot
198
218
  * rejects declaring `idParam` alongside it. */
199
219
  readonly singleton?: boolean;
220
+ /** Sends the values a drawer opens the form with (row-action params, e.g. `vehicleId`) in the
221
+ * load payload next to `idParam`, so the query can pre-fill for the chosen item. The query's
222
+ * schema must accept them. */
223
+ readonly passPrefill?: boolean;
200
224
  };
201
225
  /** One key figure of the success box, read from the handler's success payload. */
202
226
  export type ActionFormSuccessFact = {
@@ -217,7 +241,7 @@ export type ActionFormSuccessItems = {
217
241
  readonly link?: ActionFormSuccessLink;
218
242
  };
219
243
  /** A redirect target rendered as a link in the success box. */
220
- export type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom"> & {
244
+ export type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom" | "searchParams"> & {
221
245
  /** Success-payload field carrying the navigation id. Required for a record
222
246
  * target (`entityEdit`, `projectionDetail`); omit it for a list, dashboard
223
247
  * or form target, which opens without an id. */
@@ -59,11 +59,17 @@ export type DashboardPanelGate = {
59
59
  };
60
60
  /** Phone layout switch shared by every panel kind. */
61
61
  export type DashboardPanelNarrow = {
62
- /** Leaves the panel out below the `sm` breakpoint (phone). Not valid on a stat-group child: hide the group. */
62
+ /** Leaves the panel out below the `sm` breakpoint (phone). On a stat-group child it drops that stat from the group on a phone; not every child may hide. */
63
63
  readonly hideOnNarrow?: true;
64
64
  /** Position below `sm`, like CSS `order`: panels are laid out by ascending value, a panel without one counts as 0, equal values keep the declared order. Integer ≥ 0. Desktop keeps the declared order. */
65
65
  readonly narrowOrder?: number;
66
+ /** "side" puts the panel in the narrow right column of a `layout: "main-side"` dashboard, "top" in a full-width block above both columns; panels without it fill the main column. Not valid on a stat-group child or without that layout. */
67
+ readonly column?: DashboardPanelColumn;
66
68
  };
69
+ /** "top" spans both columns above the main and side column, in declared order. */
70
+ export type DashboardPanelColumn = "side" | "top";
71
+ /** "main-side": from `lg` up the main column (2/3) stacks every panel without `column`, the side column (1/3) every `column: "side"` panel, each with its own heights; `column: "top"` panels span both columns above them; below `lg` they stack, below `sm` by `narrowOrder`. Default: one 12-column grid. Panel `span` is ignored in this layout. */
72
+ export type DashboardLayout = "main-side";
67
73
  export type DashboardPanelSpan = "half" | "full" | "third" | "two-thirds";
68
74
  export type DashboardPanelEmptyState = {
69
75
  readonly span?: DashboardPanelSpan;
@@ -356,6 +362,8 @@ export type DashboardTextPanel = DashboardPanelGate & DashboardPanelQueryOptions
356
362
  readonly id: string;
357
363
  /** Panel title (i18n key). */
358
364
  readonly label?: string;
365
+ /** Icon shown before the text blocks (resolved like `DashboardStatGroupPanel.icon`). */
366
+ readonly icon?: PlatformComponent;
359
367
  readonly span?: DashboardPanelSpan;
360
368
  /** Query answering `{ blocks: DashboardTextBlock[] }`; its blocks replace the static ones.
361
369
  * Static blocks show while it loads, on error and when it answers empty. It may add
@@ -459,6 +467,8 @@ export type DashboardScreenDefinition = {
459
467
  /** Same-feature short id or cross-feature QN `<feature>:screen:<id>` shown when `visibleWhen` is unmet (default: standard notice). */
460
468
  readonly fallback?: ScreenFallback;
461
469
  readonly panels: readonly DashboardPanelDefinition[];
470
+ /** Panel arrangement, see DashboardLayout. */
471
+ readonly layout?: DashboardLayout;
462
472
  /** Binds the dashboard to one record via a URL search param, see DashboardRecordBinding. */
463
473
  readonly record?: DashboardRecordBinding;
464
474
  /** Header actions on the bound record (writeHandler, navigate, clientAction).
@@ -44,6 +44,13 @@ export type EditFieldSpec = string | {
44
44
  * the value can only come from the suggestion. Only for single-line
45
45
  * text and number inputs; other kinds ignore it. */
46
46
  readonly fillAction?: FieldFillAction;
47
+ /** Helper under a `text` or `longText` input: stackable chips and an optional free
48
+ * instruction call a query and write its `resultField` into the field. */
49
+ readonly aiAssist?: FieldAiAssist;
50
+ /** Quick-pick chips under a `number`, `decimal`, `bigInt` or `money` input; a chip sets
51
+ * the field to its value. The values come from another field of the same form that
52
+ * holds an array of numbers (e.g. hidden and `submit: false`, seeded by prefill). */
53
+ readonly valueChips?: FieldValueChips;
47
54
  /** Marks this field as a reference lookup instead of a plain value —
48
55
  * for projectionDetail fields, which have no `EntityDefinition` to
49
56
  * carry a real `reference` field type. Same target convention as
@@ -69,6 +76,41 @@ export type EditFieldSpec = string | {
69
76
  export type FieldAffix = string | {
70
77
  readonly field: string;
71
78
  };
79
+ /** A label or help text: an i18n key, or a key whose `{placeholder}`s are filled from form values.
80
+ * `params` maps each placeholder to the name of a form field (hidden fields count). */
81
+ export type FieldTextRef = string | {
82
+ readonly key: string;
83
+ readonly params: Readonly<Record<string, string>>;
84
+ };
85
+ /** One toggle chip: while active, its `params` are merged into the query payload. */
86
+ export type FieldAiAssistChip = {
87
+ /** i18n key of the chip label. */
88
+ readonly label: string;
89
+ readonly params: Readonly<Record<string, string | number | boolean>>;
90
+ };
91
+ export type FieldAiAssist = {
92
+ /** Qualified query name, run with the form's context payload (the `load` id of an actionForm,
93
+ * else the drawer row's prefill values) plus the `params` of the active chips. */
94
+ readonly query: string;
95
+ /** Key in the query result written into the field; the value must be a string. */
96
+ readonly resultField: string;
97
+ /** Key in the query result with a short note for the user (e.g. "could not rewrite, draft unchanged"). Shown as a quiet line under the field until the next result without one. */
98
+ readonly noteField?: string;
99
+ /** Other fields of the same form whose current values are sent in the payload (under their
100
+ * field names). Changing one of them runs the query again and replaces the text. */
101
+ readonly contextFields?: readonly string[];
102
+ readonly chips?: readonly FieldAiAssistChip[];
103
+ /** Adds an input where the user types a free instruction; it is sent under `param`. */
104
+ readonly prompt?: {
105
+ readonly param: string;
106
+ /** i18n key of the input's placeholder. */
107
+ readonly placeholder?: string;
108
+ };
109
+ };
110
+ export type FieldValueChips = {
111
+ /** Name of a field of the same form whose value is an array of numbers. For `money`, major units. */
112
+ readonly from: string;
113
+ };
72
114
  export type FieldFillAction = {
73
115
  /** i18n key (falls back to the literal) of the button label. */
74
116
  readonly label: string;
@@ -96,11 +138,15 @@ export type EditFieldPrefill = {
96
138
  readonly kind: "currentUser";
97
139
  readonly property: "displayName" | "email" | "id";
98
140
  };
99
- export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection;
141
+ export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection | EditStepListSection;
100
142
  type EditFieldsSectionBase = {
101
143
  /** Kebab-case tab id, used as the `?tab=` value. Required by the
102
144
  * boot-validator when the enclosing `EditLayout.mode` is "tabs". */
103
145
  readonly id?: string;
146
+ /** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
147
+ * same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
148
+ * output field of the detail query. */
149
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
104
150
  readonly kind?: "fields";
105
151
  /** Optional. Without a title the section only renders its fields (no h3
106
152
  * heading) — for flat forms (card title + fields directly, a single
@@ -152,10 +198,34 @@ export type EditFieldsSection = EditFieldsSectionBase & ({
152
198
  * here still need to exist. */
153
199
  readonly groups: readonly EditFieldGroup[];
154
200
  });
201
+ /** One step of an `EditStepListSection`; `status` renders as a pill in `statusTone`. */
202
+ export type StepListItem = {
203
+ readonly title: string;
204
+ readonly status?: string;
205
+ readonly statusTone?: SelectOptionTone;
206
+ readonly description?: string;
207
+ };
208
+ /** Vertical numbered step list (circles joined by a line), fed from one field of the detail
209
+ * query. Only supported on projectionDetail. Several sections sharing one `id` stack inside one
210
+ * tab, e.g. fields, relatedList and stepList under "Overview". */
211
+ export type EditStepListSection = {
212
+ readonly id?: string;
213
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
214
+ readonly kind: "stepList";
215
+ readonly title?: string;
216
+ /** Output field of the detail query holding a `StepListItem[]`. */
217
+ readonly field: string;
218
+ /** Present only so section-actions readers accept the union; a step list has no title-row actions. */
219
+ readonly actions?: undefined;
220
+ };
155
221
  export type EditExtensionSection = {
156
222
  /** Kebab-case tab id, used as the `?tab=` value. Required by the
157
223
  * boot-validator when the enclosing `EditLayout.mode` is "tabs". */
158
224
  readonly id?: string;
225
+ /** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
226
+ * same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
227
+ * output field of the detail query. */
228
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
159
229
  readonly kind: "extension";
160
230
  readonly title: string;
161
231
  /** Wizard layouts only: intro text above the step, same slot as `EditFieldsSection.description`. */
@@ -212,6 +282,10 @@ export type EditRelatedListSection = {
212
282
  /** Kebab-case tab id, used as the `?tab=` value. Required by the
213
283
  * boot-validator when the enclosing `EditLayout.mode` is "tabs". */
214
284
  readonly id?: string;
285
+ /** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
286
+ * same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
287
+ * output field of the detail query. */
288
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
215
289
  readonly kind: "relatedList";
216
290
  readonly title: string;
217
291
  /** Rows are aggregates or other values with no record of their own, so they lead nowhere on
@@ -322,6 +396,14 @@ export type EditRelatedListSection = {
322
396
  * ("kumiko.list.no-entries") applies. `action`'s icon must resolve, same
323
397
  * as `actions` above. */
324
398
  readonly emptyState?: RelatedListEmptyStateSpec;
399
+ /** Draws the rows as a tile grid of images instead of a table. Each tile shows the file in
400
+ * `imageField` and the row's `rowActions` underneath; `columns` only name the row fields. */
401
+ readonly photoGrid?: {
402
+ /** Row field holding a FileRef id (or an id array, the first shows). */
403
+ readonly imageField: string;
404
+ /** Row field printed under the image. */
405
+ readonly captionField?: string;
406
+ };
325
407
  };
326
408
  /** Empty-state text for one parent-record state, e.g. "still running" vs. "finished without rows". */
327
409
  export type RelatedListEmptyStateVariant = {
@@ -338,6 +420,10 @@ export type EditWriteFormSection = {
338
420
  /** Kebab-case tab id, used as the `?tab=` value. Required by the
339
421
  * boot-validator when the enclosing `EditLayout.mode` is "tabs". */
340
422
  readonly id?: string;
423
+ /** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
424
+ * same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
425
+ * output field of the detail query. */
426
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
341
427
  readonly kind: "writeForm";
342
428
  readonly title?: string;
343
429
  readonly description?: string;
@@ -388,6 +474,8 @@ export type EditLayout = {
388
474
  readonly variant?: "form" | "settings-list";
389
475
  /** Hides the asterisk after required field labels. Default false (shown). */
390
476
  readonly hideRequiredMarker?: boolean;
477
+ /** `false` switches off the "all fields are required" hint when every field is required; each label then carries its own asterisk. */
478
+ readonly allRequiredHint?: false;
391
479
  /** Persists in-progress wizard state as a resumable draft instead of
392
480
  * discarding it on navigation away. */
393
481
  readonly draft?: boolean;
@@ -509,7 +597,7 @@ export type EntityEditScreenDefinition = {
509
597
  * natural field namespace — the settings hub injects the config key's
510
598
  * `mask.title` label here. A missing entry falls back to the
511
599
  * convention. */
512
- readonly fieldLabels?: Readonly<Record<string, string>>;
600
+ readonly fieldLabels?: Readonly<Record<string, FieldTextRef>>;
513
601
  /** Record actions. Reuses `RowAction` — analogous to
514
602
  * `ProjectionDetailScreenDefinition.actions` (the loaded record stands
515
603
  * in for the "row"). `rowClick` has no target here and is rejected by
@@ -9,7 +9,7 @@ import type { ListEmptyStateSpec } from "./screen-entity-edit.ts";
9
9
  import type { EntityListExpandableRow } from "./screen-expandable-row.ts";
10
10
  import type { ScreenFallback } from "./screen-fallback.ts";
11
11
  import type { ListBulkAction } from "./screen-list-bulk.ts";
12
- import type { ListColumnPin, ListNarrowFacets, ListTableOptions } from "./screen-list-table.ts";
12
+ import type { ListColumnPin, ListNarrowFacets, ListTableOptions, ListToolbarActionsPlacement } from "./screen-list-table.ts";
13
13
  export type ListColumnSpec = string | {
14
14
  readonly field: string;
15
15
  readonly renderer?: FieldRenderer;
@@ -59,6 +59,8 @@ export type ListColumnSpec = string | {
59
59
  /** Counterpart of `hideOnNarrow`: the column shows only in the compact card layout and not in the table.
60
60
  * Not combinable with `hideOnNarrow`, `hidden` or `pinned`. */
61
61
  readonly showOnNarrowOnly?: true;
62
+ /** In the compact card, consecutive `narrowInline` columns stand side by side on one line (12px gap, no separator) instead of one line each. */
63
+ readonly narrowInline?: true;
62
64
  /** Start state for the column picker: the column begins hidden and the
63
65
  * user can show it. Only valid together with `table.columnPicker`. */
64
66
  readonly hidden?: boolean;
@@ -79,10 +81,17 @@ export type ListColumnSpec = string | {
79
81
  * entityList or projectionList table is a rowAction with display "button" (boot-rejected
80
82
  * on columns there). Other list renderers ignore `display`. */
81
83
  readonly display?: ListColumnDisplay;
84
+ /** `"primary"` draws a `display: "button"` link as a filled primary button instead of the outline default (dashboard list panels only). Needs `display: "button"`. */
85
+ readonly variant?: "primary";
82
86
  /** Row field naming the badge tone; only with `display: "badge"`. */
83
87
  readonly badgeToneField?: string;
84
88
  /** `false` draws the badge pill without its leading dot; only with `display: "badge"`. */
85
89
  readonly badgeDot?: false;
90
+ /** Row field holding a second label, drawn as a pill next to the cell's own value
91
+ * (e.g. a vehicle name with a "free" pill). Not combinable with `display` or `hint`. */
92
+ readonly pillField?: string;
93
+ /** Row field naming the tone of the `pillField` pill (a `ListBadgeTone`). Needs `pillField`. */
94
+ readonly pillToneField?: string;
86
95
  /** Row field holding a screen QN (`<feature>:screen:<id>`): the cell links
87
96
  * to that screen when the row sets it and the user may open it. For
88
97
  * query-backed lists (projectionList, relatedList), whose rows can point
@@ -98,6 +107,8 @@ export type ListColumnHint = {
98
107
  readonly detailField?: string;
99
108
  /** Row field shown as the detail line below `sm` instead of `detailField` (a shorter line, e.g. "5 days · Anna Schneider"). Needs `detailField`. */
100
109
  readonly narrowDetailField?: string;
110
+ /** Row field shown as the sentence on the phone card instead of the column's own value (a shorter sentence); the table keeps the column value. An empty value falls back to it. */
111
+ readonly narrowField?: string;
101
112
  /** Row field holding a SelectOptionTone; defaults to the screen's `rowToneField`. Tone `neutral` draws the sentence muted and not bold, like `emptyLabel`, and no stripe on the phone card. */
102
113
  readonly toneField?: string;
103
114
  /** Row field with a longer reason, shown behind a "Why?" toggle in the cell. */
@@ -111,7 +122,7 @@ export type ListColumnHint = {
111
122
  /** The sentence keeps the normal text color (still bold); the tone stays on the row stripe, a badge and the detail line. */
112
123
  readonly plainSentence?: true;
113
124
  };
114
- /** Computed fields for the loaded rows: one `query` call per page answer with `{ ...params, ids }`, answering `{ rows: [{ id, ...fields }] }`. Fields are merged into the rows and win over same-named row fields. */
125
+ /** Computed fields for the loaded rows: `query` calls with `{ ...params, ids }`, answering `{ rows: [{ id, ...fields }] }`. Fields are merged into the rows and win over same-named row fields. The ids go out in batches of the first page size (later pages send only the newly loaded ids; a reload re-asks all loaded rows batch by batch), so `ids.max` must cover at least the page size; a failing call shows plain rows. */
115
126
  export type ListRowDecoration = {
116
127
  readonly query: string;
117
128
  readonly params?: Readonly<Record<string, unknown>>;
@@ -153,9 +164,12 @@ export type RowActionDisplay = "button" | "link" | "icon" | "responsive";
153
164
  * stay inline. `"inline"`: every action inline, no kebab. `"menu"`: every
154
165
  * action in the kebab menu at the row end, none inline, the row opener
155
166
  * (`rowClick: true`) included as an entry, so every row has a kebab; phone
156
- * cards draw no kebab. */
167
+ * cards draw no kebab when the row opens, a card without a row target keeps it. */
157
168
  export type RowActionMode = "adaptive" | "inline" | "menu";
158
- export type RowAction = RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction;
169
+ export type RowAction = (RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction) & {
170
+ /** projectionDetail `footerActions` only: "start" sets the button apart on the left of the footer. */
171
+ readonly align?: "start";
172
+ };
159
173
  export type RowActionWriteHandler = {
160
174
  /** Default for RowActions without an explicitly set `kind` —
161
175
  * backwards-compatible form. Can also be set explicitly. */
@@ -318,8 +332,8 @@ export type RowActionClientAction = {
318
332
  /** Inline render form in the row-action column — see `RowActionDisplay`. */
319
333
  readonly display?: RowActionDisplay;
320
334
  /** i18n key of the toast shown after the handler reported `{ ok: true }`
321
- * (default `kumiko.clientAction.success`). */
322
- readonly successMessage?: string;
335
+ * (default `kumiko.clientAction.success`); `false` shows no toast. */
336
+ readonly successMessage?: string | false;
323
337
  };
324
338
  export type ToolbarAction = ({
325
339
  readonly kind: "navigate";
@@ -411,6 +425,8 @@ export type EntityListFacetExtraOption = {
411
425
  readonly values: readonly string[];
412
426
  /** Where the chip sits relative to the field's own options. Default "start". */
413
427
  readonly position?: "start" | "end";
428
+ /** Draws a divider line below this choice in the select dropdown (e.g. after a "needs action" bundle). */
429
+ readonly separatorAfter?: boolean;
414
430
  };
415
431
  export type EntityListFacetConfig = {
416
432
  /** `"select"` (default): dropdown with checkboxes. `"chips"`: one toggle
@@ -425,6 +441,8 @@ export type EntityListFacetConfig = {
425
441
  * `showCounts`'s requests even when the number itself is not shown. */
426
442
  readonly hideEmpty?: boolean;
427
443
  readonly extraOptions?: readonly EntityListFacetExtraOption[];
444
+ /** "behind-filter": the facet opens behind the filter icon next to the search field instead of standing as a pill. Only below `sm`; otherwise it stays a pill. The remaining facets follow the usual phone rules and share the toggle panel. */
445
+ readonly narrowPlacement?: "behind-filter";
428
446
  };
429
447
  export type EntityListScreenDefinition = {
430
448
  readonly id: string;
@@ -509,14 +527,14 @@ export type EntityListScreenDefinition = {
509
527
  readonly emptyState?: ListEmptyStateSpec;
510
528
  /** i18n key for the primary create button label (default `kumiko.actions.create`). */
511
529
  readonly createLabel?: string;
512
- /** "toolbar": from `sm` up the create button ends the filter row instead of standing in the header. Default "header". Needs a create button (no `allowCreate: false`). */
530
+ /** "toolbar": from `md` up (below md the compact header keeps its "+") the create button ends the filter row instead of standing in the header. Default "header". Needs a create button (no `allowCreate: false`). */
513
531
  readonly createPlacement?: "header" | "toolbar";
514
532
  /** From `sm` up, a "Sorted by" select in the filter row (same options as the narrow sort control); column headers stay sortable. */
515
533
  readonly toolbarSort?: true;
516
534
  /** "pills": below `sm` the select facets render as rounded pill triggers with a stronger border; from `sm` up unchanged. */
517
535
  readonly narrowFacets?: ListNarrowFacets;
518
536
  /** "toolbar": from `md` up the `toolbarActions` end the filter row, after the "Sorted by" select and the create button, instead of standing in the page header. Below `md` they stay in the header. Default "header". Needs `toolbarActions`. */
519
- readonly toolbarActionsPlacement?: "header" | "toolbar";
537
+ readonly toolbarActionsPlacement?: ListToolbarActionsPlacement;
520
538
  /** i18n key of the plural noun for the list size in the phone sort line (`{count}` pluralised). Default `<feature>:entity:<entity>:noun`. */
521
539
  readonly itemNounKey?: string;
522
540
  /** i18n key for the search field placeholder (default `kumiko.list.search-placeholder`). */
@@ -8,9 +8,34 @@ export type ListColumnPin = (typeof LIST_COLUMN_PINS)[number];
8
8
  export declare const LIST_TABLE_OPTION_KEYS: readonly ["rememberState", "resetAll", "columnPicker", "density", "pinning", "resizing", "keyboardNavigation", "export", "grouping", "totals", "summaryRow", "compactHeader", "frame"];
9
9
  export declare const LIST_TABLE_FRAMES: readonly ["card"];
10
10
  export type ListTableFrame = (typeof LIST_TABLE_FRAMES)[number];
11
+ export declare const LIST_TOOLBAR_ACTIONS_PLACEMENTS: readonly ["header", "toolbar"];
12
+ export type ListToolbarActionsPlacement = (typeof LIST_TOOLBAR_ACTIONS_PLACEMENTS)[number];
11
13
  export declare const LIST_NARROW_FACETS: readonly ["pills"];
12
14
  export type ListNarrowFacets = (typeof LIST_NARROW_FACETS)[number];
13
15
  export declare const LIST_TABLE_SUMMARY_ROW_KEYS: readonly ["query", "params"];
16
+ export type ListPayloadCapabilities = {
17
+ readonly searchable: boolean;
18
+ readonly filters: boolean;
19
+ readonly namedFilters: boolean;
20
+ readonly screenFilter: boolean;
21
+ };
22
+ export declare function listPayloadKeysSent(capabilities: ListPayloadCapabilities): readonly string[];
23
+ type FlaggedFields = {
24
+ readonly fields: Readonly<Record<string, object>>;
25
+ } | undefined;
26
+ /** True when the entity has a `filterable` field; the facet dropdowns and the `filters` payload key rest on it. */
27
+ export declare function entityHasFilterableFields(entity: FlaggedFields): boolean;
28
+ /** An explicit `searchable` wins, otherwise a searchable field turns search on. The renderer additionally needs a search adapter. */
29
+ export declare function entityListDeclaresSearch(screen: {
30
+ readonly searchable?: boolean;
31
+ }, entity: FlaggedFields): boolean;
32
+ /** Whether an entityList can send `filters`: filterable fields, default filters or a range facet. */
33
+ export declare function entityListDeclaresFilters(screen: {
34
+ readonly defaultFilters?: object;
35
+ readonly facets?: Readonly<Record<string, false | {
36
+ readonly display?: string;
37
+ }>>;
38
+ }, entity: FlaggedFields): boolean;
14
39
  export declare const LIST_TABLE_GROUPING_KEYS: readonly ["field", "label", "labels", "collapsedWhen", "userChoice", "fields"];
15
40
  export declare const LIST_TABLE_TOTAL_KEYS: readonly ["field", "kind"];
16
41
  export declare const LIST_TABLE_EXPORT_KEYS: readonly ["xlsx", "maxRows"];
@@ -90,3 +115,4 @@ export type BundledListsOptions = {
90
115
  /** Pins the first column left on every bundled list where no column is pinned. Needs `table.pinning: true`. */
91
116
  readonly pinFirstColumn?: boolean;
92
117
  };
118
+ export {};
@@ -18,8 +18,35 @@ export const LIST_TABLE_OPTION_KEYS = [
18
18
  "frame",
19
19
  ];
20
20
  export const LIST_TABLE_FRAMES = ["card"];
21
+ export const LIST_TOOLBAR_ACTIONS_PLACEMENTS = ["header", "toolbar"];
21
22
  export const LIST_NARROW_FACETS = ["pills"];
22
23
  export const LIST_TABLE_SUMMARY_ROW_KEYS = ["query", "params"];
24
+ // The optional list-query keys a list screen sends for what it declares, in one place so the boot
25
+ // validator (summary-row schema check) and the renderer's payload tests agree on them.
26
+ export function listPayloadKeysSent(capabilities) {
27
+ return [
28
+ ...(capabilities.searchable ? ["search"] : []),
29
+ ...(capabilities.filters ? ["filters"] : []),
30
+ ...(capabilities.namedFilters ? ["namedFilter"] : []),
31
+ ...(capabilities.screenFilter ? ["filter"] : []),
32
+ ];
33
+ }
34
+ function someFieldFlagged(entity, flag) {
35
+ return Object.values(entity?.fields ?? {}).some((field) => Reflect.get(field, flag) === true);
36
+ }
37
+ /** True when the entity has a `filterable` field; the facet dropdowns and the `filters` payload key rest on it. */
38
+ export function entityHasFilterableFields(entity) {
39
+ return someFieldFlagged(entity, "filterable");
40
+ }
41
+ /** An explicit `searchable` wins, otherwise a searchable field turns search on. The renderer additionally needs a search adapter. */
42
+ export function entityListDeclaresSearch(screen, entity) {
43
+ return screen.searchable ?? someFieldFlagged(entity, "searchable");
44
+ }
45
+ /** Whether an entityList can send `filters`: filterable fields, default filters or a range facet. */
46
+ export function entityListDeclaresFilters(screen, entity) {
47
+ const hasRangeFacet = Object.values(screen.facets ?? {}).some((facet) => facet !== false && facet.display === "range");
48
+ return entityHasFilterableFields(entity) || screen.defaultFilters !== undefined || hasRangeFacet;
49
+ }
23
50
  export const LIST_TABLE_GROUPING_KEYS = [
24
51
  "field",
25
52
  "label",
@@ -1,3 +1,4 @@
1
+ import type { FieldCondition } from "./field-state-conditions.ts";
1
2
  import type { SelectOptionTone } from "./fields.ts";
2
3
  import type { AccessRule, AgentScreenHints } from "./handlers.ts";
3
4
  import type { NamedFilterFacetOptions, NamedListFilterRef } from "./named-list-filters.ts";
@@ -8,12 +9,14 @@ import type { EditLayout, ListEmptyStateSpec } from "./screen-entity-edit.ts";
8
9
  import type { ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortOption, ListSortSpec, RowAction, RowActionMode, RowFieldExtractor, ScreenFilter, ToolbarAction } from "./screen-entity-list.ts";
9
10
  import type { ScreenFallback } from "./screen-fallback.ts";
10
11
  import type { ListBulkAction } from "./screen-list-bulk.ts";
11
- import type { ListNarrowFacets, ListTableOptions } from "./screen-list-table.ts";
12
+ import type { ListNarrowFacets, ListTableOptions, ListToolbarActionsPlacement } from "./screen-list-table.ts";
12
13
  import type { RecordBannerSpec, RecordBreadcrumbSpec, RecordProgressSpec, RecordStepsSpec, RecordSummarySpec } from "./screen-record-guidance.ts";
13
14
  export type ListFacetSpec = {
14
15
  readonly field: string;
15
16
  readonly type: "select";
16
17
  readonly label: string;
18
+ /** Below `sm` the facet opens behind the filter icon next to the search field. */
19
+ readonly narrowPlacement?: "behind-filter";
17
20
  readonly options: readonly {
18
21
  readonly value: string;
19
22
  readonly label: string;
@@ -22,12 +25,16 @@ export type ListFacetSpec = {
22
25
  readonly field: string;
23
26
  readonly type: "boolean";
24
27
  readonly label: string;
28
+ /** Below `sm` the facet opens behind the filter icon next to the search field. */
29
+ readonly narrowPlacement?: "behind-filter";
25
30
  readonly trueLabel: string;
26
31
  readonly falseLabel: string;
27
32
  } | {
28
33
  readonly field: string;
29
34
  readonly type: "reference";
30
35
  readonly label: string;
36
+ /** Below `sm` the facet opens behind the filter icon next to the search field. */
37
+ readonly narrowPlacement?: "behind-filter";
31
38
  /** Entity name (same feature) or `feature:entity` (cross-feature), same
32
39
  * convention as `ListColumnSpec.refEntity`. Options load at render time. */
33
40
  readonly entity: string;
@@ -84,7 +91,7 @@ export type ProjectionListScreenDefinition = {
84
91
  readonly bulkActions?: readonly ListBulkAction[];
85
92
  readonly toolbarActions?: readonly ToolbarAction[];
86
93
  /** "toolbar": from `md` up the `toolbarActions` end the filter row, after the "Sorted by" select, instead of standing in the page header. Below `md` they stay in the header. Default "header". Needs `toolbarActions`. */
87
- readonly toolbarActionsPlacement?: "header" | "toolbar";
94
+ readonly toolbarActionsPlacement?: ListToolbarActionsPlacement;
88
95
  /** From `sm` up, a "Sorted by" select in the filter row (same options as the narrow sort control); column headers stay sortable. Needs `sortOptions`. */
89
96
  readonly toolbarSort?: true;
90
97
  /** "pills": below `sm` the select facets render as rounded pill triggers with a stronger border; from `sm` up unchanged. */
@@ -140,6 +147,8 @@ export type RecordHeaderSubtitlePart = string | {
140
147
  readonly navigate?: MetricNavigate;
141
148
  /** Formats the raw field value (e.g. `timestamp`); an empty value is still dropped. */
142
149
  readonly format?: FormatSpec;
150
+ /** i18n key of a text before the value ("Owner "); it stays plain text, a `navigate` link covers only the value. Dropped with an empty value. */
151
+ readonly prefix?: string;
143
152
  };
144
153
  export type RecordHeaderSpec = {
145
154
  readonly title: string;
@@ -190,6 +199,8 @@ export type MetricSpec = {
190
199
  readonly toneField?: string;
191
200
  /** Record field of the detail query shown as a small line under the value; the value stays the number. Same name as `DashboardStatPanel.subField`. */
192
201
  readonly subField?: string;
202
+ /** Record field shown instead of `subField` below `sm` ("of 2,850 €" instead of "0 of 2,850.00 €"). */
203
+ readonly subFieldNarrow?: string;
193
204
  /** Icon chip of the tile; only drawn with `metricsStyle: "tiles"`. */
194
205
  readonly icon?: NavIconKey;
195
206
  /** Formats the displayed value (e.g. `date`, `enumOption`); the tone still resolves on the raw value. */
@@ -285,9 +296,21 @@ export type ProjectionDetailScreenDefinition = {
285
296
  * collapses into the menu. Same id rules as `primaryAction`; the phone header keeps
286
297
  * its single icon button. */
287
298
  readonly inlineActions?: readonly string[];
299
+ /** Ids of `actions` shown in the pinned footer bar instead of the header, in declaration order.
300
+ * Style "primary" marks the main button. An id must not also be `primaryAction` or in `inlineActions`. */
301
+ readonly footerActions?: readonly string[];
302
+ /** i18n key of a note on the left of the footer bar ("Changes go out with the release"); hidden below `sm`. Needs `footerActions`. */
303
+ readonly footerHint?: string;
304
+ /** Tab that opens first when the URL names none: the first rule whose condition holds on the record wins, else the first visible tab. Needs `layout.mode: "tabs"`; every tab stays visible. */
305
+ readonly initialTab?: readonly ProjectionDetailInitialTab[];
288
306
  /** How head fields render. Default "text" — plain text instead of a
289
307
  * disabled Input, since every field on this screen type is forced
290
308
  * readOnly anyway (there is no write path, see the shim doc above).
291
309
  * Set "form" to opt back into the disabled-Input look. */
292
310
  readonly valueDisplay?: "form" | "text";
293
311
  };
312
+ /** One `initialTab` rule: `tab` is a section id of the layout. */
313
+ export type ProjectionDetailInitialTab = {
314
+ readonly when: Exclude<FieldCondition, boolean>;
315
+ readonly tab: string;
316
+ };
@@ -1,4 +1,6 @@
1
+ import type { FieldCondition } from "./field-state-conditions.ts";
1
2
  import type { SelectOptionTone } from "./fields.ts";
3
+ import type { IconKey } from "./nav-icon.ts";
2
4
  import type { RowAction } from "./screen-entity-list.ts";
3
5
  export type RecordBreadcrumbItem = {
4
6
  readonly label: string;
@@ -18,12 +20,18 @@ export type RecordGuidanceAction = RowAction & {
18
20
  export type RecordNotice = {
19
21
  readonly title: string;
20
22
  readonly text?: string;
23
+ /** Shown instead of `title` below `sm`. */
24
+ readonly narrowTitle?: string;
25
+ /** Shown instead of `text` below `sm`. */
26
+ readonly narrowText?: string;
21
27
  readonly tone?: SelectOptionTone;
22
28
  readonly [field: string]: unknown;
23
29
  };
24
30
  export type RecordStep = {
25
31
  readonly id: string;
26
32
  readonly title: string;
33
+ /** Shown instead of `title` below `sm`. */
34
+ readonly narrowTitle?: string;
27
35
  readonly detail?: string;
28
36
  /** Shown instead of `detail` below `sm`. */
29
37
  readonly narrowDetail?: string;
@@ -47,6 +55,8 @@ export type RecordSummarySpec = {
47
55
  readonly toneField?: string;
48
56
  /** Row field with a shorter sentence shown instead of `field` below `sm`. */
49
57
  readonly narrowField?: string;
58
+ /** Draws the sentence as plain text led by this icon (e.g. "sparkles" for an AI statement) instead of the bordered box. */
59
+ readonly icon?: IconKey;
50
60
  };
51
61
  export type RecordBannerSpec = {
52
62
  /** Holds `RecordNotice | null`; null shows no banner. */
@@ -64,6 +74,12 @@ export type RecordStepsSpec = {
64
74
  readonly emptyLabel?: string;
65
75
  /** Below `sm` only the first n steps show; the rest sits behind a "k more steps" toggle. */
66
76
  readonly narrowLimit?: number;
77
+ /** Plural base key for the toggle of the hidden rest: define `<key>.one` and `<key>.other` (the latter with `{count}`). Default `kumiko.detail.steps.more`. */
78
+ readonly narrowMoreLabel?: string;
79
+ /** i18n key of a short label before each step's further actions ("Clarify first?"). */
80
+ readonly moreActionsLabel?: string;
81
+ /** The whole panel is drawn only while the condition holds on the record. Default: always. */
82
+ readonly visibleWhen?: Exclude<FieldCondition, boolean>;
67
83
  readonly actions?: readonly RecordGuidanceAction[];
68
84
  };
69
85
  export type RecordProgressStep = {
package/dist/screen.d.ts CHANGED
@@ -29,10 +29,23 @@ export interface FieldFormatRegistry {
29
29
  /** IANA zone id (e.g. "Europe/Berlin"). Default: the runtime's zone. */
30
30
  readonly timeZone?: string;
31
31
  };
32
+ /** Epoch ms or ISO timestamp, shown as "5 minutes ago" at render time (a table cell does not tick).
33
+ * `style: "short"` gives "5 min. ago"; `withTime` adds the clock time to "yesterday" and to the absolute date;
34
+ * from `absoluteAfterDays` days on the absolute date ("29 Oct 2026") replaces the relative text. */
35
+ relativeTime: {
36
+ readonly locale?: string;
37
+ readonly style?: "long" | "short" | "narrow";
38
+ readonly absoluteAfterDays?: number;
39
+ readonly withTime?: boolean;
40
+ /** IANA zone id for the clock time and the day boundary. Default: the runtime's zone. */
41
+ readonly timeZone?: string;
42
+ };
32
43
  date: {
33
44
  readonly locale?: string;
34
45
  readonly dateStyle?: "full" | "long" | "medium" | "short";
35
46
  };
47
+ /** Telephone number shown as a `tel:` link in list cells, like a read-only `format: "phone"` field. */
48
+ phone: Record<never, never>;
36
49
  boolean: {
37
50
  readonly trueLabel?: string;
38
51
  readonly falseLabel?: string;
@@ -120,9 +133,9 @@ export type ScreenDefinition = EntityListScreenDefinition | ProjectionListScreen
120
133
  export type { NamedFilterFacetOptions } from "./named-list-filters.ts";
121
134
  export type { ActionFormFooterAction, ActionFormLoad, ActionFormRedirect, ActionFormScreenDefinition, ActionFormSuccessFact, ActionFormSuccessItems, ActionFormSuccessLink, FormFieldDerivation, FormFieldDerivationWithoutList, SecretMintConfirmStep, SecretMintScreenDefinition, SecretReveal, SecretRevealField, } from "./screen-action-form.ts";
122
135
  export type { ConfigEditAction, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, SecretsEditScreenDefinition, SecretsEditSection, } from "./screen-custom-config.ts";
123
- export type { DashboardChartKind, DashboardChartMarkerKind, DashboardChartPanel, DashboardChartRangeOption, DashboardChartRanges, DashboardChartTone, DashboardCurrencyFormat, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardListFooterLink, DashboardListNarrow, DashboardListPanel, DashboardListRowLink, DashboardListRowToneMarker, DashboardMoneyParam, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelGate, DashboardPanelNarrow, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardProgressTone, DashboardRecordBinding, DashboardRefresh, DashboardRelativeTimeFormat, DashboardRelativeTimeParam, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupLayout, DashboardStatGroupLink, DashboardStatGroupNarrow, DashboardStatGroupPanel, DashboardStatPanel, DashboardStatTone, DashboardText, DashboardTextBlock, DashboardTextPanel, DashboardTextParam, DashboardTimeRangeDefinition, DashboardValueFormat, ScreenVisibility, } from "./screen-dashboard.ts";
136
+ export type { DashboardChartKind, DashboardChartMarkerKind, DashboardChartPanel, DashboardChartRangeOption, DashboardChartRanges, DashboardChartTone, DashboardCurrencyFormat, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardLayout, DashboardListFooterLink, DashboardListNarrow, DashboardListPanel, DashboardListRowLink, DashboardListRowToneMarker, DashboardMoneyParam, DashboardPanelColumn, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelGate, DashboardPanelNarrow, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardProgressTone, DashboardRecordBinding, DashboardRefresh, DashboardRelativeTimeFormat, DashboardRelativeTimeParam, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupLayout, DashboardStatGroupLink, DashboardStatGroupNarrow, DashboardStatGroupPanel, DashboardStatPanel, DashboardStatTone, DashboardText, DashboardTextBlock, DashboardTextPanel, DashboardTextParam, DashboardTimeRangeDefinition, DashboardValueFormat, ScreenVisibility, } from "./screen-dashboard.ts";
124
137
  export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-dashboard.ts";
125
- export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldFillAction, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, } from "./screen-entity-edit.ts";
138
+ export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditStepListSection, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldAiAssist, FieldAiAssistChip, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } from "./screen-entity-edit.ts";
126
139
  export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.ts";
127
140
  export type { EntityListFacetConfig, EntityListFacetExtraOption, EntityListScreenDefinition, ListBadgeTone, ListColumnDisplay, ListColumnHint, ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortDir, ListSortOption, ListSortSpec, RelatedListToolbarAction, RowAction, RowActionClientAction, RowActionDisplay, RowActionDrawer, RowActionMode, RowActionNavigate, RowActionNavigateBase, RowActionWriteHandler, RowFieldExtractor, ScreenFilter, ScreenFilterOp, ToolbarAction, } from "./screen-entity-list.ts";
128
141
  export type { EntityListExpandableRow, ExpandableRowGrouping } from "./screen-expandable-row.ts";
@@ -130,7 +143,7 @@ export type { ScreenFallback, ScreenFallbackByReason, ScreenFallbackReason, } fr
130
143
  export { fallbackTargetFor, fallbackTargets, SCREEN_FALLBACK_REASONS } from "./screen-fallback.ts";
131
144
  export type { ListBulkAction } from "./screen-list-bulk.ts";
132
145
  export { LIST_BULK_ACTION_KEYS, MAX_BULK_SELECTION } from "./screen-list-bulk.ts";
133
- export type { BundledListsOptions, ListColumnPin, ListNarrowFacets, ListTableDensity, ListTableExportOptions, ListTableFrame, ListTableGrouping, ListTableOptions, ListTableSummaryRow, ListTableTotal, } from "./screen-list-table.ts";
134
- export { DEFAULT_EXPORT_MAX_ROWS, LIST_COLUMN_MAX_WIDTH_PX, LIST_COLUMN_PINS, LIST_NARROW_FACETS, LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_EXPORT_KEYS, LIST_TABLE_FRAMES, LIST_TABLE_GROUPING_KEYS, LIST_TABLE_OPTION_KEYS, LIST_TABLE_SUMMARY_ROW_KEYS, LIST_TABLE_TOTAL_KEYS, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.ts";
135
- export type { ListFacetSpec, MetricNavigate, MetricSpec, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSpec, RecordHeaderSubtitlePart, } from "./screen-projection.ts";
146
+ export type { BundledListsOptions, ListColumnPin, ListNarrowFacets, ListPayloadCapabilities, ListTableDensity, ListTableExportOptions, ListTableFrame, ListTableGrouping, ListTableOptions, ListTableSummaryRow, ListTableTotal, ListToolbarActionsPlacement, } from "./screen-list-table.ts";
147
+ export { DEFAULT_EXPORT_MAX_ROWS, entityHasFilterableFields, entityListDeclaresFilters, entityListDeclaresSearch, LIST_COLUMN_MAX_WIDTH_PX, LIST_COLUMN_PINS, LIST_NARROW_FACETS, LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_EXPORT_KEYS, LIST_TABLE_FRAMES, LIST_TABLE_GROUPING_KEYS, LIST_TABLE_OPTION_KEYS, LIST_TABLE_SUMMARY_ROW_KEYS, LIST_TABLE_TOTAL_KEYS, LIST_TOOLBAR_ACTIONS_PLACEMENTS, listPayloadKeysSent, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.ts";
148
+ export type { ListFacetSpec, MetricNavigate, MetricSpec, ProjectionDetailInitialTab, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSpec, RecordHeaderSubtitlePart, } from "./screen-projection.ts";
136
149
  export type { RecordBannerSpec, RecordBreadcrumbItem, RecordBreadcrumbSpec, RecordNotice, RecordProgress, RecordProgressSpec, RecordProgressStep, RecordStep, RecordStepsSpec, RecordSummarySpec, } from "./screen-record-guidance.ts";
package/dist/screen.js CHANGED
@@ -2,4 +2,4 @@ export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-da
2
2
  export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.js";
3
3
  export { fallbackTargetFor, fallbackTargets, SCREEN_FALLBACK_REASONS } from "./screen-fallback.js";
4
4
  export { LIST_BULK_ACTION_KEYS, MAX_BULK_SELECTION } from "./screen-list-bulk.js";
5
- export { DEFAULT_EXPORT_MAX_ROWS, LIST_COLUMN_MAX_WIDTH_PX, LIST_COLUMN_PINS, LIST_NARROW_FACETS, LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_EXPORT_KEYS, LIST_TABLE_FRAMES, LIST_TABLE_GROUPING_KEYS, LIST_TABLE_OPTION_KEYS, LIST_TABLE_SUMMARY_ROW_KEYS, LIST_TABLE_TOTAL_KEYS, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.js";
5
+ export { DEFAULT_EXPORT_MAX_ROWS, entityHasFilterableFields, entityListDeclaresFilters, entityListDeclaresSearch, LIST_COLUMN_MAX_WIDTH_PX, LIST_COLUMN_PINS, LIST_NARROW_FACETS, LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_EXPORT_KEYS, LIST_TABLE_FRAMES, LIST_TABLE_GROUPING_KEYS, LIST_TABLE_OPTION_KEYS, LIST_TABLE_SUMMARY_ROW_KEYS, LIST_TABLE_TOTAL_KEYS, LIST_TOOLBAR_ACTIONS_PLACEMENTS, listPayloadKeysSent, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.414.0",
3
+ "version": "0.416.0",
4
4
  "description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
5
5
  "license": "MIT",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",