@cosmicdrift/kumiko-framework 0.415.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/agents/api/framework-engine.md +37 -5
- package/agents/api/framework-ui-types.md +59 -3
- package/agents/api/renderer-web.md +7 -1
- package/agents/api/types.md +21 -2
- package/agents/api.md +1 -1
- package/agents/boot-rules.md +33 -3
- package/agents/examples/embedded.md +24 -1
- package/agents/examples/handbook-knowledge.md +129 -0
- package/agents/examples/signature.md +186 -0
- package/agents/examples/writeform-section.md +1 -0
- package/agents/examples.md +2 -0
- package/agents/features-index.md +4 -0
- package/agents/features.md +14 -0
- package/dist/api/server-routes.js +2 -0
- package/dist/db/table-builder.js +3 -1
- package/dist/engine/boot-validator/boot-phases.js +5 -0
- package/dist/engine/boot-validator/boot-rules.d.ts +129 -4
- package/dist/engine/boot-validator/cross-tenant-file-read.d.ts +3 -0
- package/dist/engine/boot-validator/cross-tenant-file-read.js +19 -0
- package/dist/engine/boot-validator/entity-declaration-rules.d.ts +10 -0
- package/dist/engine/boot-validator/entity-declaration-rules.js +10 -0
- package/dist/engine/boot-validator/list-row-guidance-rules.d.ts +16 -1
- package/dist/engine/boot-validator/list-row-guidance-rules.js +16 -1
- package/dist/engine/boot-validator/list-row-guidance.d.ts +7 -0
- package/dist/engine/boot-validator/list-row-guidance.js +30 -0
- package/dist/engine/boot-validator/query-output-columns.js +18 -0
- package/dist/engine/boot-validator/query-output-guidance.js +2 -0
- package/dist/engine/boot-validator/query-refs.js +4 -1
- package/dist/engine/boot-validator/relative-time-format.d.ts +1 -0
- package/dist/engine/boot-validator/relative-time-format.js +51 -0
- package/dist/engine/boot-validator/screens-actions-rules.d.ts +16 -1
- package/dist/engine/boot-validator/screens-actions-rules.js +16 -1
- package/dist/engine/boot-validator/screens-actions.js +55 -15
- package/dist/engine/boot-validator/screens-dashboard-narrow.d.ts +2 -1
- package/dist/engine/boot-validator/screens-dashboard-narrow.js +43 -4
- package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +12 -2
- package/dist/engine/boot-validator/screens-dashboard-rules.js +12 -2
- package/dist/engine/boot-validator/screens-dashboard.js +2 -1
- package/dist/engine/boot-validator/screens-forms-layout-rules.d.ts +5 -0
- package/dist/engine/boot-validator/screens-forms-layout-rules.js +5 -0
- package/dist/engine/boot-validator/screens-forms-rules.d.ts +60 -0
- package/dist/engine/boot-validator/screens-forms-rules.js +60 -0
- package/dist/engine/boot-validator/screens-forms.d.ts +1 -1
- package/dist/engine/boot-validator/screens-forms.js +108 -2
- package/dist/engine/boot-validator/screens-kind-config-edit.js +1 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +5 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +5 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +30 -0
- package/dist/engine/boot-validator/screens-lists-rules.d.ts +5 -0
- package/dist/engine/boot-validator/screens-lists-rules.js +5 -0
- package/dist/engine/boot-validator/screens-lists.js +4 -1
- package/dist/engine/build-config-feature-schema.js +5 -35
- package/dist/engine/config-access-rules.d.ts +3 -0
- package/dist/engine/config-access-rules.js +34 -0
- package/dist/engine/factories.d.ts +2 -0
- package/dist/engine/project-app-schema-for-roles.js +2 -0
- package/dist/files/file-routes.d.ts +2 -0
- package/dist/files/file-routes.js +85 -22
- package/dist/files/foreign-tenant-file-read.d.ts +13 -0
- package/dist/files/foreign-tenant-file-read.js +64 -0
- package/dist/i18n/required-surface-keys.js +26 -6
- package/dist/ui-types/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/changes.json +42 -0
|
@@ -35,7 +35,7 @@ function createDecimalField<R extends true | false = false>(config: { precision:
|
|
|
35
35
|
function createDerivedField(spec: DerivedFieldDef): DerivedFieldDef; // Read-time computed field for `EntityDefinition.derivedFields` (NOT `fields`), never persisted.
|
|
36
36
|
function createEmbeddedField(schema: EmbeddedFieldDef["schema"], overrides?: Partial<Omit<EmbeddedFieldDef, "type" | "schema" | keyof ResolvedPiiFlags>> & PersonalAnnotationsNoFind): EmbeddedFieldDef;
|
|
37
37
|
function createEmbeddedListField(schema: EmbeddedFieldDef["schema"], overrides?: Partial<Omit<EmbeddedFieldDef, "type" | "schema" | "multiple" | keyof ResolvedPiiFlags>> & PersonalAnnotationsNoFind): EmbeddedFieldDef & { multiple: true; };
|
|
38
|
-
function createEntity<const F, const T extends EntityTenancy = "tenant">(def: { table?: string; fields: F; description?: string; softDelete?: boolean; systemStream?: boolean; systemRowsReadable?: boolean; webhookEvents?: boolean; eventVersion?: number; eventMigrations?: EntityDefinition["eventMigrations"]; searchWeight?: number; defaultCurrency?: string; transitions?: Readonly<Record<string, Readonly<Record<string, string[]>>>>; lockedWhen?: EntityDefinition["lockedWhen"]; indexes?: EntityIndexDef[]; idType?: "serial" | "uuid"; access?: EntityDefinition["access"]; parentRef?: EntityDefinition["parentRef"]; readGate?: EntityDefinition["readGate"]; retention?: RetentionDef; derivedFields?: EntityDefinition["derivedFields"]; namedFilters?: EntityDefinition["namedFilters"]; tenancy?: T; transferable?: boolean; attachedFileAccess?: EntityDefinition["attachedFileAccess"]; }): F extends FieldsMap ? EntityDefinition<F, T> : never;
|
|
38
|
+
function createEntity<const F, const T extends EntityTenancy = "tenant">(def: { table?: string; fields: F; description?: string; softDelete?: boolean; systemStream?: boolean; systemRowsReadable?: boolean; webhookEvents?: boolean; eventVersion?: number; eventMigrations?: EntityDefinition["eventMigrations"]; searchWeight?: number; defaultCurrency?: string; transitions?: Readonly<Record<string, Readonly<Record<string, string[]>>>>; lockedWhen?: EntityDefinition["lockedWhen"]; indexes?: EntityIndexDef[]; idType?: "serial" | "uuid"; access?: EntityDefinition["access"]; parentRef?: EntityDefinition["parentRef"]; readGate?: EntityDefinition["readGate"]; retention?: RetentionDef; derivedFields?: EntityDefinition["derivedFields"]; namedFilters?: EntityDefinition["namedFilters"]; tenancy?: T; transferable?: boolean; attachedFileAccess?: EntityDefinition["attachedFileAccess"]; crossTenantFileRead?: EntityDefinition["crossTenantFileRead"]; }): F extends FieldsMap ? EntityDefinition<F, T> : never;
|
|
39
39
|
function createEntityExecutor<E extends EntityDefinition>(entityName: string, entity: E): { table: EntityTable; executor: EventStoreExecutor<EntityRow<E>>; };
|
|
40
40
|
function createFileField(overrides?: Partial<Omit<FileFieldDef, "type" | keyof ResolvedPiiFlags>> & PersonalAnnotationsNoFind): FileFieldDef;
|
|
41
41
|
function createFilesField(overrides?: Partial<Omit<FilesFieldDef, "type" | keyof ResolvedPiiFlags>> & PersonalAnnotationsNoFind): FilesFieldDef;
|
|
@@ -281,14 +281,19 @@ type ActionFormScreenDefinition = {
|
|
|
281
281
|
fields: Readonly<Record<string, FormFieldDefinition>>; // Form shape: field map by name.
|
|
282
282
|
derive?: Readonly<Record<string, FormFieldDerivation>>; // Fields computed from other fields, shown read-only and recomputed on every change.
|
|
283
283
|
layout: EditLayout; // Layout analogous to EntityEditScreen: sections with fields from the fields map above.
|
|
284
|
-
fieldLabels?: Readonly<Record<string,
|
|
284
|
+
fieldLabels?: Readonly<Record<string, FieldTextRef>>; // Per-field label i18n key override, same type/semantics as `EntityEditScreenDefinition.fieldLabels`.
|
|
285
285
|
submitLabel?: string; // i18n key for the submit button.
|
|
286
286
|
footerActions?: ActionFormFooterAction[]; // Extra buttons in the form footer next to the submit button.
|
|
287
287
|
summary?: {
|
|
288
288
|
title: string;
|
|
289
289
|
subtitle?: string;
|
|
290
290
|
params?: Readonly<Record<string, string>>;
|
|
291
|
+
paramsFromLoad?: string[]; // Fields of the `load` result that fill `{name}` placeholders too (static `params` win).
|
|
291
292
|
}; // Context box above the fields (i18n keys).
|
|
293
|
+
fieldDescriptions?: Readonly<Record<string, FieldTextRef>>; // Help text under a field (field name -> i18n key).
|
|
294
|
+
infoBand?: string; // i18n key of a short note in a banner above the fields, with a sparkles icon (e.g. "the AI prepared everything, read the text, then send").
|
|
295
|
+
fieldBadges?: Readonly<Record<string, { label: string; tone: SelectOptionTone; }>>; // Badge next to a field's label (field name -> `{ label: i18n key, tone }`), e.g. "price source open" in `warn`.
|
|
296
|
+
formErrorOnTop?: boolean; // Shows a failed submit's error banner above the fields instead of below them.
|
|
292
297
|
submitStyle?: "primary" | "danger"; // Visual style of the submit button.
|
|
293
298
|
successMessage?: string; // i18n key of a confirmation shown above the form after a successful submit when the screen stays put (no `redirect`, not drawer-hosted).
|
|
294
299
|
redirect?: string | ActionFormRedirect; // Navigate to this screen ID after a successful submit: either a short ID (e.g. "item-list" — same feature, the nav-router resolves to the full path) or a fully-qualified cross-feature QN (`<feature>:screen:<id>`).
|
|
@@ -530,6 +535,8 @@ type EditFieldSpec =
|
|
|
530
535
|
prefix?: FieldAffix; // Static text shown before the input (i18n key, falls back to the literal), or `{ field }` for the current form value of another field (a hidden field carrying e.g. a base domain).
|
|
531
536
|
suffix?: FieldAffix; // Same as `prefix`, shown after the input.
|
|
532
537
|
fillAction?: FieldFillAction; // Button beside the input that runs a query and writes one scalar of its result into this field.
|
|
538
|
+
aiAssist?: FieldAiAssist; // Helper under a `text` or `longText` input: stackable chips and an optional free instruction call a query and write its `resultField` into the field.
|
|
539
|
+
valueChips?: FieldValueChips; // Quick-pick chips under a `number`, `decimal`, `bigInt` or `money` input; a chip sets the field to its value.
|
|
533
540
|
refEntity?: string; // Marks this field as a reference lookup instead of a plain value — for projectionDetail fields, which have no `EntityDefinition` to carry a real `reference` field type.
|
|
534
541
|
refLabelField?: string; // Row field on the referenced entity shown as the label (default "id").
|
|
535
542
|
format?: "email" | "phone"; // Text format for projectionDetail fields, which have no `EntityDefinition` to carry it: a read-only value renders as a `mailto:`/`tel:` link.
|
|
@@ -539,6 +546,7 @@ type EditFieldSpec =
|
|
|
539
546
|
;
|
|
540
547
|
type EditRelatedListSection = {
|
|
541
548
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
549
|
+
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
542
550
|
kind: "relatedList";
|
|
543
551
|
title: string;
|
|
544
552
|
readOnly?: boolean; // Rows are aggregates or other values with no record of their own, so they lead nowhere on purpose.
|
|
@@ -569,8 +577,12 @@ type EditRelatedListSection = {
|
|
|
569
577
|
count?: true; // Tab badge counted from this section's own query (`limit: 1, totalCount: true` → `total`), so it matches the tab's rows and stays live.
|
|
570
578
|
actions?: RowAction[]; // Rendered top-right in the section's Card title row — same navigate/drawer/writeHandler dispatch as `ProjectionDetailScreenDefinition.actions`, evaluated against the parent record.
|
|
571
579
|
emptyState?: RelatedListEmptyStateSpec; // Rendered inside the section's Card in place of the table when this section's query returns zero rows.
|
|
580
|
+
photoGrid?: {
|
|
581
|
+
imageField: string; // Row field holding a FileRef id (or an id array, the first shows).
|
|
582
|
+
captionField?: string; // Row field printed under the image.
|
|
583
|
+
}; // Draws the rows as a tile grid of images instead of a table.
|
|
572
584
|
};
|
|
573
|
-
type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection;
|
|
585
|
+
type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection | EditStepListSection;
|
|
574
586
|
type EffectiveFeaturesResolver = ((tenantId: TenantId) => ReadonlySet<string>) & { // Resolver callback shape: synchronous (on the dispatcher's hot path), per tenant.
|
|
575
587
|
trialGate?: TrialGate; // Optional live-trial gate, consulted by the dispatcher feature gate ONLY when the synchronous resolver reports a feature as disabled.
|
|
576
588
|
};
|
|
@@ -602,6 +614,10 @@ type EntityDefinition<F extends FieldsMap = FieldsMap, T extends EntityTenancy =
|
|
|
602
614
|
description?: string; // Optional free-text semantics for the AI agent manifest — see TextFieldDef.description.
|
|
603
615
|
transferable?: boolean; // Opts the rows into `tenant-handover`, a grant-legitimated move from an anonymous tenant to the signed-up account's tenant.
|
|
604
616
|
attachedFileAccess?: "record-only"; // Attached files are readable only through the record's detail query: the files feature's privilegedRoles do not bypass it, the uploader check stays.
|
|
617
|
+
crossTenantFileRead?: {
|
|
618
|
+
query: string;
|
|
619
|
+
reason: string;
|
|
620
|
+
}; // Files of this entity may be read from another tenant when `query`, run with `{ id: <entityId> }` as the requesting user, returns the record with that id.
|
|
605
621
|
};
|
|
606
622
|
type EntityEditScreenDefinition = {
|
|
607
623
|
id: string;
|
|
@@ -628,7 +644,7 @@ type EntityEditScreenDefinition = {
|
|
|
628
644
|
singleton?: boolean; // Default false.
|
|
629
645
|
redirect?: string | ActionFormRedirect; // Navigate to this screen ID after a successful save (create or update).
|
|
630
646
|
listScreenId?: string; // Parent list screen (short id) for breadcrumb + nav highlighting when this screen has no nav entry of its own.
|
|
631
|
-
fieldLabels?: Readonly<Record<string,
|
|
647
|
+
fieldLabels?: Readonly<Record<string, FieldTextRef>>; // Optional per-field label i18n key (field name → key), overrides the default convention `<feature>:entity:<entity>:field:<name>`.
|
|
632
648
|
actions?: EntityEditAction[]; // Record actions.
|
|
633
649
|
slots?: ScreenSlots;
|
|
634
650
|
access?: AccessRule;
|
|
@@ -858,10 +874,18 @@ interface FieldFormatRegistry {
|
|
|
858
874
|
timeStyle?: "full" | "long" | "medium" | "short";
|
|
859
875
|
timeZone?: string; // IANA zone id (e.g. "Europe/Berlin").
|
|
860
876
|
};
|
|
877
|
+
relativeTime: {
|
|
878
|
+
locale?: string;
|
|
879
|
+
style?: "long" | "short" | "narrow";
|
|
880
|
+
absoluteAfterDays?: number;
|
|
881
|
+
withTime?: boolean;
|
|
882
|
+
timeZone?: string; // IANA zone id for the clock time and the day boundary.
|
|
883
|
+
}; // Epoch ms or ISO timestamp, shown as "5 minutes ago" at render time (a table cell does not tick).
|
|
861
884
|
date: {
|
|
862
885
|
locale?: string;
|
|
863
886
|
dateStyle?: "full" | "long" | "medium" | "short";
|
|
864
887
|
};
|
|
888
|
+
phone: Record<never, never>; // Telephone number shown as a `tel:` link in list cells, like a read-only `format: "phone"` field.
|
|
865
889
|
boolean: {
|
|
866
890
|
trueLabel?: string;
|
|
867
891
|
falseLabel?: string;
|
|
@@ -1058,8 +1082,11 @@ type ListColumnSpec =
|
|
|
1058
1082
|
width?: number; // Start width in px.
|
|
1059
1083
|
minWidth?: number; // Smallest width in px the user can resize to.
|
|
1060
1084
|
display?: ListColumnDisplay; // One of "bar" | "badge" | "datetime" | "button".
|
|
1085
|
+
variant?: "primary"; // `"primary"` draws a `display: "button"` link as a filled primary button instead of the outline default (dashboard list panels only).
|
|
1061
1086
|
badgeToneField?: string; // Row field naming the badge tone; only with `display: "badge"`.
|
|
1062
1087
|
badgeDot?: false; // `false` draws the badge pill without its leading dot; only with `display: "badge"`.
|
|
1088
|
+
pillField?: string; // Row field holding a second label, drawn as a pill next to the cell's own value (e.g. a vehicle name with a "free" pill).
|
|
1089
|
+
pillToneField?: string; // Row field naming the tone of the `pillField` pill (a `ListBadgeTone`).
|
|
1063
1090
|
linkScreenField?: string; // Row field holding a screen QN (`<feature>:screen:<id>`): the cell links to that screen when the row sets it and the user may open it.
|
|
1064
1091
|
linkParamsField?: string; // Row field holding a params object for the linkScreenField target: `entityId` opens that record, the other keys become search params (e.g. actionForm prefill).
|
|
1065
1092
|
hint?: ListColumnHint; // "To do" cell: the column's field holds a sentence, shown emphasized in the row tone; an empty value shows `emptyLabel`.
|
|
@@ -1396,6 +1423,9 @@ type ProjectionDetailScreenDefinition = {
|
|
|
1396
1423
|
actions?: RowAction[]; // Header action buttons.
|
|
1397
1424
|
primaryAction?: string; // Id of the action that stays the visible header button when the actions collapse into a menu (and the one that keeps the phone icon slot when it has an icon and no confirm).
|
|
1398
1425
|
inlineActions?: string[]; // Action ids that stay visible buttons next to the primary action when the rest collapses into the menu.
|
|
1426
|
+
footerActions?: string[]; // Ids of `actions` shown in the pinned footer bar instead of the header, in declaration order.
|
|
1427
|
+
footerHint?: string; // i18n key of a note on the left of the footer bar ("Changes go out with the release"); hidden below `sm`.
|
|
1428
|
+
initialTab?: ProjectionDetailInitialTab[]; // Tab that opens first when the URL names none: the first rule whose condition holds on the record wins, else the first visible tab.
|
|
1399
1429
|
valueDisplay?: "form" | "text"; // How head fields render.
|
|
1400
1430
|
};
|
|
1401
1431
|
type ProjectionListScreenDefinition = {
|
|
@@ -1584,7 +1614,9 @@ type RoleAccessRule = {
|
|
|
1584
1614
|
personalData?: RoleAccessPersonalData;
|
|
1585
1615
|
anySignedIn?: true;
|
|
1586
1616
|
};
|
|
1587
|
-
type RowAction = RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction
|
|
1617
|
+
type RowAction = (RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction) & {
|
|
1618
|
+
align?: "start"; // projectionDetail `footerActions` only: "start" sets the button apart on the left of the footer.
|
|
1619
|
+
};
|
|
1588
1620
|
type RowActionWriteHandler = {
|
|
1589
1621
|
kind?: "writeHandler"; // Default for RowActions without an explicitly set `kind` — backwards-compatible form.
|
|
1590
1622
|
id: string; // Stable id per screen — kebab-case, unique within the action set.
|
|
@@ -65,11 +65,13 @@ type ActionFormLoad = {
|
|
|
65
65
|
query: string; // Query QN that returns the record.
|
|
66
66
|
idParam?: string; // Payload key carrying the record id (default "id").
|
|
67
67
|
singleton?: boolean; // The query picks the row from the caller's tenant/session context, so the form loads without a record id and the query is called WITHOUT `idParam` (same semantics as `ProjectionDetailScreenDefinition.singleton`).
|
|
68
|
+
passPrefill?: boolean; // Sends the values a drawer opens the form with (row-action params, e.g. `vehicleId`) in the load payload next to `idParam`, so the query can pre-fill for the chosen item.
|
|
68
69
|
};
|
|
69
70
|
type ActionFormRedirect = { // Redirect target plus the success-payload field carrying the navigation id.
|
|
70
71
|
screen: string; // Same target forms as the string `redirect`: short screen ID (same-feature) or a fully-qualified cross-feature screen QN.
|
|
71
|
-
idFrom
|
|
72
|
+
idFrom?: string; // Flat field name in the handler's success payload, e.g. "leaseId".
|
|
72
73
|
tab?: string; // Section id to open on the target `projectionDetail` with `layout.mode: "tabs"` (the `tab` search param, same as `ToolbarAction` navigate `tab`).
|
|
74
|
+
searchParams?: Readonly<Record<string, string>>; // URL search params of the target, each read from a flat success-payload field (`{ cmd: "threadId" }` opens `?cmd=<threadId>`).
|
|
73
75
|
};
|
|
74
76
|
type ActionFormSuccessFact = { // One key figure of the success box, read from the handler's success payload.
|
|
75
77
|
field: string; // Flat field name in the handler's success payload.
|
|
@@ -79,7 +81,7 @@ type ActionFormSuccessItems = { // Per-entry hints of the success box, read from
|
|
|
79
81
|
field: string; // Flat field name of an array in the success payload.
|
|
80
82
|
link?: ActionFormSuccessLink; // Link of each hint.
|
|
81
83
|
};
|
|
82
|
-
type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom"> & { // A redirect target rendered as a link in the success box.
|
|
84
|
+
type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom" | "searchParams"> & { // A redirect target rendered as a link in the success box.
|
|
83
85
|
idFrom?: string; // Success-payload field carrying the navigation id.
|
|
84
86
|
params?: Readonly<Record<string, string>>; // URL search params of the target, each read from a success-payload field (`{ cmd: "duplicateOfId" }` opens `?cmd=<duplicateOfId>`).
|
|
85
87
|
label: string; // Link text (i18n key).
|
|
@@ -162,6 +164,7 @@ type DashboardFilterDefinition = {
|
|
|
162
164
|
options?: { value: string; label: string; }[];
|
|
163
165
|
optionsQuery?: string; // Query-Result-Contract: `{ rows: { value: string; label: string }[] }`.
|
|
164
166
|
};
|
|
167
|
+
type DashboardLayout = "main-side"; // "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`.
|
|
165
168
|
type DashboardListFooterLink = { // Link to a screen from a panel; `label` is an i18n key, `namedFilter` only for list screens.
|
|
166
169
|
label: string;
|
|
167
170
|
moreText?: string; // i18n key of the text before the link when more rows exist than shown; `{count}` is the rest.
|
|
@@ -200,6 +203,7 @@ type DashboardMoneyParam = { // Minor units (like Money fields), formatted with
|
|
|
200
203
|
amountMinor: number;
|
|
201
204
|
currency: string;
|
|
202
205
|
};
|
|
206
|
+
type DashboardPanelColumn = "side" | "top"; // "top" spans both columns above the main and side column, in declared order.
|
|
203
207
|
type DashboardPanelDefinition = DashboardStatPanel | DashboardStatGroupPanel | DashboardChartPanel | DashboardListPanel | DashboardFeedPanel | DashboardProgressListPanel | DashboardTextPanel | DashboardCustomPanel | DashboardScreenPanel;
|
|
204
208
|
type DashboardPanelEmptyState = {
|
|
205
209
|
span?: DashboardPanelSpan;
|
|
@@ -209,6 +213,7 @@ type DashboardPanelEmptyState = {
|
|
|
209
213
|
type DashboardPanelNarrow = { // Phone layout switch shared by every panel kind.
|
|
210
214
|
hideOnNarrow?: true; // Leaves the panel out below the `sm` breakpoint (phone).
|
|
211
215
|
narrowOrder?: number; // 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.
|
|
216
|
+
column?: DashboardPanelColumn; // "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.
|
|
212
217
|
};
|
|
213
218
|
type DashboardPanelQueryOptions = {
|
|
214
219
|
params?: Readonly<Record<string, unknown>>; // Static, author-set query parameters merged on top of the screen's dynamic filterParams — lets a panel pin a value (e.g. a status facet) the screen-wide filter doesn't cover, without needing its own query.
|
|
@@ -254,6 +259,7 @@ type DashboardScreenDefinition = {
|
|
|
254
259
|
visibleWhen?: ScreenVisibility; // UI-only gate, also on direct URL access; handlers still enforce access.
|
|
255
260
|
fallback?: ScreenFallback; // Same-feature short id or cross-feature QN `<feature>:screen:<id>` shown when `visibleWhen` is unmet (default: standard notice).
|
|
256
261
|
panels: DashboardPanelDefinition[];
|
|
262
|
+
layout?: DashboardLayout; // Panel arrangement, see DashboardLayout.
|
|
257
263
|
record?: DashboardRecordBinding; // Binds the dashboard to one record via a URL search param, see DashboardRecordBinding.
|
|
258
264
|
actions?: RowAction[]; // Header actions on the bound record (writeHandler, navigate, clientAction).
|
|
259
265
|
refresh?: DashboardRefresh;
|
|
@@ -353,6 +359,7 @@ type DashboardTextPanel = DashboardPanelGate & DashboardPanelQueryOptions & Dash
|
|
|
353
359
|
kind: "text";
|
|
354
360
|
id: string;
|
|
355
361
|
label?: string; // Panel title (i18n key).
|
|
362
|
+
icon?: PlatformComponent; // Icon shown before the text blocks (resolved like `DashboardStatGroupPanel.icon`).
|
|
356
363
|
span?: DashboardPanelSpan;
|
|
357
364
|
query?: string; // Query answering `{ blocks: DashboardTextBlock[] }`; its blocks replace the static ones.
|
|
358
365
|
blocks?: DashboardTextBlock[];
|
|
@@ -370,6 +377,7 @@ type DerivedCellRoundingTarget = {
|
|
|
370
377
|
};
|
|
371
378
|
type EditExtensionSection = {
|
|
372
379
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
380
|
+
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
373
381
|
kind: "extension";
|
|
374
382
|
title: string;
|
|
375
383
|
description?: string; // Wizard layouts only: intro text above the step, same slot as `EditFieldsSection.description`.
|
|
@@ -389,6 +397,7 @@ type EditLayout = {
|
|
|
389
397
|
mode?: "single" | "wizard" | "tabs"; // Default "single".
|
|
390
398
|
variant?: "form" | "settings-list"; // "settings-list" lays each section out as a band with a title column on the left and one hairline-separated row per field (label + help left, control right) — the familiar settings pattern, for screens that are a list of independent preferences rather than one record form.
|
|
391
399
|
hideRequiredMarker?: boolean; // Hides the asterisk after required field labels.
|
|
400
|
+
allRequiredHint?: false; // `false` switches off the "all fields are required" hint when every field is required; each label then carries its own asterisk.
|
|
392
401
|
draft?: boolean; // Persists in-progress wizard state as a resumable draft instead of discarding it on navigation away.
|
|
393
402
|
wizard?: {
|
|
394
403
|
aside?: {
|
|
@@ -399,8 +408,17 @@ type EditLayout = {
|
|
|
399
408
|
submitDisabledWhen?: FieldCondition; // Disables the finish button (and blocks the submit) while the condition holds on the form values.
|
|
400
409
|
}; // Wizard layouts only.
|
|
401
410
|
};
|
|
411
|
+
type EditStepListSection = { // Vertical numbered step list (circles joined by a line), fed from one field of the detail query.
|
|
412
|
+
id?: string;
|
|
413
|
+
visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
414
|
+
kind: "stepList";
|
|
415
|
+
title?: string;
|
|
416
|
+
field: string; // Output field of the detail query holding a `StepListItem[]`.
|
|
417
|
+
actions?: undefined; // Present only so section-actions readers accept the union; a step list has no title-row actions.
|
|
418
|
+
};
|
|
402
419
|
type EditWriteFormSection = {
|
|
403
420
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
421
|
+
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
404
422
|
kind: "writeForm";
|
|
405
423
|
title?: string;
|
|
406
424
|
description?: string;
|
|
@@ -447,6 +465,21 @@ type FieldAffix =
|
|
|
447
465
|
field: string;
|
|
448
466
|
}
|
|
449
467
|
;
|
|
468
|
+
type FieldAiAssist = {
|
|
469
|
+
query: string; // Qualified query name, run with the form's context payload (the `load` id of an actionForm, else the drawer row's prefill values) plus the `params` of the active chips.
|
|
470
|
+
resultField: string; // Key in the query result written into the field; the value must be a string.
|
|
471
|
+
noteField?: string; // Key in the query result with a short note for the user (e.g. "could not rewrite, draft unchanged").
|
|
472
|
+
contextFields?: string[]; // Other fields of the same form whose current values are sent in the payload (under their field names).
|
|
473
|
+
chips?: FieldAiAssistChip[];
|
|
474
|
+
prompt?: {
|
|
475
|
+
param: string;
|
|
476
|
+
placeholder?: string; // i18n key of the input's placeholder.
|
|
477
|
+
}; // Adds an input where the user types a free instruction; it is sent under `param`.
|
|
478
|
+
};
|
|
479
|
+
type FieldAiAssistChip = { // One toggle chip: while active, its `params` are merged into the query payload.
|
|
480
|
+
label: string; // i18n key of the chip label.
|
|
481
|
+
params: Readonly<Record<string, string | number | boolean>>;
|
|
482
|
+
};
|
|
450
483
|
type FieldFillAction = {
|
|
451
484
|
label: string; // i18n key (falls back to the literal) of the button label.
|
|
452
485
|
query: string; // Qualified query name, run with the current form values picked by `params`.
|
|
@@ -455,6 +488,16 @@ type FieldFillAction = {
|
|
|
455
488
|
};
|
|
456
489
|
type FieldIconKey = "mail" | "lock" | "hash" | "search" | "user" | "phone" | "calendar" | "link" | "tag" | "building" | "globe" | "key" | "map-pin";
|
|
457
490
|
type FieldRenderer = PlatformComponent | string | FormatSpec;
|
|
491
|
+
type FieldTextRef = // A label or help text: an i18n key, or a key whose `{placeholder}`s are filled from form values.
|
|
492
|
+
| string
|
|
493
|
+
| {
|
|
494
|
+
key: string;
|
|
495
|
+
params: Readonly<Record<string, string>>;
|
|
496
|
+
}
|
|
497
|
+
;
|
|
498
|
+
type FieldValueChips = {
|
|
499
|
+
from: string; // Name of a field of the same form whose value is an array of numbers.
|
|
500
|
+
};
|
|
458
501
|
type FormDerivationScreen = {
|
|
459
502
|
fields: Readonly<Record<string, FormFieldDefinition>>;
|
|
460
503
|
derive?: Readonly<Record<string, FormFieldDerivation>>;
|
|
@@ -508,6 +551,10 @@ type PlatformComponent = {
|
|
|
508
551
|
react?: unknown;
|
|
509
552
|
native?: unknown;
|
|
510
553
|
};
|
|
554
|
+
type ProjectionDetailInitialTab = { // One `initialTab` rule: `tab` is a section id of the layout.
|
|
555
|
+
when: Exclude<FieldCondition, boolean>;
|
|
556
|
+
tab: string;
|
|
557
|
+
};
|
|
511
558
|
type QualifiedContentCollection = ContentCollectionDefinition & {
|
|
512
559
|
navQn: string;
|
|
513
560
|
};
|
|
@@ -575,12 +622,15 @@ type RecordStepsSpec = {
|
|
|
575
622
|
emptyLabel?: string; // i18n key for an empty list, default `kumiko.detail.steps.empty`.
|
|
576
623
|
narrowLimit?: number; // Below `sm` only the first n steps show; the rest sits behind a "k more steps" toggle.
|
|
577
624
|
narrowMoreLabel?: string; // Plural base key for the toggle of the hidden rest: define `<key>.one` and `<key>.other` (the latter with `{count}`).
|
|
625
|
+
moreActionsLabel?: string; // i18n key of a short label before each step's further actions ("Clarify first?").
|
|
626
|
+
visibleWhen?: Exclude<FieldCondition, boolean>; // The whole panel is drawn only while the condition holds on the record.
|
|
578
627
|
actions?: RecordGuidanceAction[];
|
|
579
628
|
};
|
|
580
629
|
type RecordSummarySpec = { // One emphasized sentence below the header; `field` holds a string.
|
|
581
630
|
field: string;
|
|
582
631
|
toneField?: string; // Row field holding a SelectOptionTone for the sentence's accent.
|
|
583
632
|
narrowField?: string; // Row field with a shorter sentence shown instead of `field` below `sm`.
|
|
633
|
+
icon?: IconKey; // Draws the sentence as plain text led by this icon (e.g. "sparkles" for an AI statement) instead of the bordered box.
|
|
584
634
|
};
|
|
585
635
|
type RelatedListEmptyStateSpec = ListEmptyStateSpec & { // The first `variants` entry whose `when` holds for the parent record replaces `title` and `description`; `action` stays.
|
|
586
636
|
variants?: RelatedListEmptyStateVariant[];
|
|
@@ -607,7 +657,7 @@ type RowActionClientAction = {
|
|
|
607
657
|
style?: "primary" | "secondary" | "danger"; // Visual style.
|
|
608
658
|
icon?: IconKey; // Overrides the id-based default icon, see `RowActionWriteHandler.icon`.
|
|
609
659
|
display?: RowActionDisplay; // Inline render form in the row-action column — see `RowActionDisplay`.
|
|
610
|
-
successMessage?: string; // i18n key of the toast shown after the handler reported `{ ok: true }` (default `kumiko.clientAction.success`).
|
|
660
|
+
successMessage?: string | false; // i18n key of the toast shown after the handler reported `{ ok: true }` (default `kumiko.clientAction.success`); `false` shows no toast.
|
|
611
661
|
};
|
|
612
662
|
type RowActionDisplay = "button" | "link" | "icon" | "responsive"; // How a row action renders inline in the row-action column.
|
|
613
663
|
type RowActionDrawer = {
|
|
@@ -678,6 +728,12 @@ type SecretsEditScreenDefinition = {
|
|
|
678
728
|
access?: AccessRule;
|
|
679
729
|
};
|
|
680
730
|
type SelectOptionTone = (typeof SELECT_OPTION_TONES)[number];
|
|
731
|
+
type StepListItem = { // One step of an `EditStepListSection`; `status` renders as a pill in `statusTone`.
|
|
732
|
+
title: string;
|
|
733
|
+
status?: string;
|
|
734
|
+
statusTone?: SelectOptionTone;
|
|
735
|
+
description?: string;
|
|
736
|
+
};
|
|
681
737
|
type TextFieldDef = PiiAndFieldState & {
|
|
682
738
|
type: "text";
|
|
683
739
|
description?: string; // Optional free-text semantics for the AI agent manifest — never rendered; the i18n label is what users see.
|
|
@@ -378,6 +378,8 @@ type CorePrimitives = {
|
|
|
378
378
|
MetricBand?: ComponentType<MetricBandProps>; // Optional — additive rollout, see StickyActionBar.
|
|
379
379
|
RecordBreadcrumb?: ComponentType<RecordBreadcrumbProps>; // Optional — without it the detail screen renders the path as plain links.
|
|
380
380
|
RecordSummary?: ComponentType<RecordSummaryProps>; // Optional — without it the summary renders as plain text.
|
|
381
|
+
PhotoGrid?: ComponentType<PhotoGridProps>; // Optional — without it a relatedList with `photoGrid` falls back to its table.
|
|
382
|
+
StepList?: ComponentType<StepListProps>; // Optional — without it a stepList section renders nothing.
|
|
381
383
|
RecordSteps?: ComponentType<RecordStepsProps>; // Optional — without it the steps render as a plain card.
|
|
382
384
|
ActionOverflowMenu?: ComponentType<ActionOverflowMenuProps>; // Optional: without an implementation, callers with >2 header/row actions fall back to today's all-buttons-inline rendering.
|
|
383
385
|
SecretReveal?: ComponentType<SecretRevealProps>; // Optional (unlike the other Core-Primitives) so existing partial CorePrimitives mocks in tests keep compiling — additive rollout of a new primitive shouldn't force every test double to grow a stub.
|
|
@@ -688,6 +690,7 @@ type GridProps = { // Column-based layout.
|
|
|
688
690
|
flow?: boolean; // Fields flow left to right in wrapping rows sized by `GridCell.width` instead of equal-width tracks (screen forms and drawers).
|
|
689
691
|
list?: boolean; // One full-width row per child, separated by hairlines — the field rows of a `settings-list` section.
|
|
690
692
|
ariaLabelledBy?: string; // Id of the element naming this grid (a Field label).
|
|
693
|
+
tight?: boolean; // With `columns: "auto"`: the small gap of a chip row instead of the tile gap.
|
|
691
694
|
};
|
|
692
695
|
type HeaderActionGroupProps = {
|
|
693
696
|
children: ReactNode;
|
|
@@ -1332,6 +1335,7 @@ type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
1332
1335
|
onDirtyChange?: (dirty: boolean) => void; // Fires when the form gains or loses unsaved input (field changes or a dirty extension section).
|
|
1333
1336
|
onCopyLink?: () => Promise<void> | void; // Copy-link action — only set in update mode (create mode has no entity id yet, hence no permalink).
|
|
1334
1337
|
actions?: RenderEditAction[]; // Header action buttons, rendered before the built-in copy-link/ delete/cancel/save controls.
|
|
1338
|
+
footerHint?: string; // Translated note on the left of the form footer (hidden below `sm`).
|
|
1335
1339
|
menuActions?: RenderEditAction[]; // Record actions declared with `placement: "menu"`, resolved like `actions`.
|
|
1336
1340
|
onRelatedListDrawerAction?: (action: RowActionDrawer, initialValues: Readonly<Record<string, unknown>> | undefined) => void; // Opens a relatedList section row's drawer-kind action.
|
|
1337
1341
|
submitLabel?: string; // i18n key for the submit button.
|
|
@@ -1345,7 +1349,8 @@ type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
1345
1349
|
labelAppendix?: (fieldName: string) => ReactNode | undefined; // Per-field extra content inline after the label (e.g. ConfigSourceBadge).
|
|
1346
1350
|
fieldAppendix?: (fieldName: string) => ReactNode | undefined; // Per-field extra content below the input (e.g. ConfigCascadeView).
|
|
1347
1351
|
fieldAppendixPlacement?: "above-control" | "below-control"; // Placement of every `fieldAppendix` relative to its control.
|
|
1348
|
-
|
|
1352
|
+
formErrorOnTop?: boolean; // Renders the form-error banner above the sections instead of below them.
|
|
1353
|
+
fieldDescription?: (fieldName: string, values: Readonly<Record<string, unknown>>) => ReactNode | undefined; // Per-field help text rendered under the label (translated by the caller).
|
|
1349
1354
|
rowAfterField?: (fieldName: string, state: { dirty: boolean; }) => ReactNode | undefined; // Extra full-width row drawn right after a field's cell (configEdit actions).
|
|
1350
1355
|
fieldAccent?: (fieldName: string) => boolean; // Marks fields whose value is set at this level; drawn by `settings-list` rows.
|
|
1351
1356
|
markChangedFields?: boolean; // Edit-mode "changed" markers also for screens without an entity id (configEdit loads its values from a query, not a record).
|
|
@@ -1357,6 +1362,7 @@ type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
1357
1362
|
hideActions?: boolean; // Renders the fields without RenderEdit's own action bar (save, cancel, delete, copy-link).
|
|
1358
1363
|
valueDisplay?: "form" | "text"; // "form" (default) — every field renders as its Input widget, disabled when `field.readOnly`, unchanged behavior.
|
|
1359
1364
|
hideSectionTitles?: boolean; // Suppresses every section's own title (fields-section header, relatedList Section title) AND the form's own top-level title/subtitle — for a host that already renders that label itself elsewhere (e.g. a tab strip whose label duplicates it, or a page-level header above RenderEdit).
|
|
1365
|
+
activeTabId?: string; // Id of the active tab of a tabbed projectionDetail; handed to the `afterForm` slot.
|
|
1360
1366
|
fillScreenHeight?: boolean; // Screen body fills the shell height: the form gets `fillHeight` and `stickyActions` (sections scroll, footer pinned).
|
|
1361
1367
|
leadContent?: ReactNode; // Rendered first inside the form, above the sections, in the same column and rhythm — for content that belongs to the form but is no field (e.g. the secret a confirm step refers to).
|
|
1362
1368
|
submitBlocked?: boolean; // Blocks submit (button and Enter) while fields stay editable — unlike `disabled`, which locks the whole form.
|
package/agents/api/types.md
CHANGED
|
@@ -1660,6 +1660,7 @@ type ExtensionSectionProps = {
|
|
|
1660
1660
|
isLast: boolean;
|
|
1661
1661
|
}; // Current wizard step, only set for `layout.mode === "wizard"` forms.
|
|
1662
1662
|
reportStepComplete?: (complete: boolean) => void; // Only set for extension steps of a `layout.mode: "wizard"` entityEdit editing an existing record (update mode); undefined everywhere else.
|
|
1663
|
+
activeTabId?: string; // Id of the active tab; only set in the `afterForm` slot of a projectionDetail screen with tabs, so the component can limit itself to one tab.
|
|
1663
1664
|
};
|
|
1664
1665
|
```
|
|
1665
1666
|
|
|
@@ -1734,6 +1735,8 @@ type RenderEditAction = {
|
|
|
1734
1735
|
confirmLabel?: string;
|
|
1735
1736
|
confirmRequired?: boolean; // Overrides the default "danger implies a confirm dialog" rule.
|
|
1736
1737
|
icon?: IconKey; // Resolved icon (author `RowAction.icon` or the id-derived default) — drives both the icon-left-of-text render and the icon-only collapse rule (see `shouldRenderActionsIconOnly`).
|
|
1738
|
+
align?: "start"; // "start" sets the button apart on the left of the form footer.
|
|
1739
|
+
pinnedOnPhone?: true; // Stays a visible button in the pinned footer below `sm` instead of folding into the "…" menu.
|
|
1737
1740
|
};
|
|
1738
1741
|
```
|
|
1739
1742
|
|
|
@@ -2217,7 +2220,7 @@ type EditFieldViewModel = {
|
|
|
2217
2220
|
query: string;
|
|
2218
2221
|
payload: OptionsQueryPayload;
|
|
2219
2222
|
}; // Set for `type: "select"` / `"multiSelect"` when optionsAvailabilityQuery is set: the renderer loads `{ rows: { value, disabled?, hint?
|
|
2220
|
-
display?: "checkboxes" | "dropdown" | "radio"; // Set for `type: "multiSelect"` when MultiSelectFieldDef.display is "checkboxes" — the renderer shows a checkbox grid with a select-all toggle instead of the default combobox dropdown.
|
|
2223
|
+
display?: "checkboxes" | "chips" | "dropdown" | "radio"; // Set for `type: "multiSelect"` when MultiSelectFieldDef.display is "checkboxes" — the renderer shows a checkbox grid with a select-all toggle instead of the default combobox dropdown.
|
|
2221
2224
|
optionTones?: Readonly<Partial<Record<string, SelectOptionTone>>>; // `type: "select"` only: tone per option, shown on the selected radio segment.
|
|
2222
2225
|
columns?: 1 | 2 | 3 | 4; // Set for `type: "multiSelect"` when MultiSelectFieldDef.columns is defined — column count for the checkbox grid at the widest breakpoint.
|
|
2223
2226
|
maxRows?: number; // Set for `type: "multiSelect"` when MultiSelectFieldDef.maxRows is defined — grid rows visible before the checkbox grid becomes scrollable.
|
|
@@ -2251,6 +2254,8 @@ type EditFieldViewModel = {
|
|
|
2251
2254
|
prefix?: FieldAffix; // From EditFieldSpec.prefix / suffix.
|
|
2252
2255
|
suffix?: FieldAffix;
|
|
2253
2256
|
fillAction?: FieldFillAction; // From EditFieldSpec.fillAction, `label` already translated.
|
|
2257
|
+
aiAssist?: FieldAiAssist; // From EditFieldSpec.aiAssist, chip labels and the prompt placeholder already translated.
|
|
2258
|
+
valueChips?: FieldValueChips; // From EditFieldSpec.valueChips.
|
|
2254
2259
|
embeddedListCells?: EmbeddedListCellViewModel[]; // Only set for an embedded-LIST field (`multiple: true`) — the per-cell metadata the renderer needs to draw each column/cell.
|
|
2255
2260
|
embeddedListMinItems?: number; // Minimum row count for the embedded list.
|
|
2256
2261
|
embeddedListMaxItems?: number; // Maximum row count for the embedded list.
|
|
@@ -2337,6 +2342,8 @@ type ListColumnViewModel = {
|
|
|
2337
2342
|
display?: ListColumnCellDisplay; // `ListColumnSpec.display` for list tables: a status pill or a link drawn as a button.
|
|
2338
2343
|
badgeToneField?: string; // Row field naming the pill tone; only with `display: "badge"`.
|
|
2339
2344
|
badgeDot?: false; // `false`: the pill has no leading dot.
|
|
2345
|
+
pillField?: string; // Row field with the label of a pill drawn beside the cell value (`ListColumnSpec.pillField`).
|
|
2346
|
+
pillToneField?: string; // Row field naming the pill tone.
|
|
2340
2347
|
emptyPlaceholder?: false; // `false`: an empty cell stays blank instead of showing "—".
|
|
2341
2348
|
};
|
|
2342
2349
|
type ListRowViewModel = {
|
|
@@ -2381,6 +2388,10 @@ type MetricProps = { // Compact label/value tile (record-detail metrics band).
|
|
|
2381
2388
|
## packages/renderer/src/primitives-record-guidance.ts
|
|
2382
2389
|
|
|
2383
2390
|
```ts
|
|
2391
|
+
type PhotoGridProps = { // Grid of image tiles; each tile shows a stored file and its own action buttons underneath.
|
|
2392
|
+
tiles: { id: string; imageId?: string; caption?: string; actions?: ReactNode; }[];
|
|
2393
|
+
testId?: string;
|
|
2394
|
+
};
|
|
2384
2395
|
type RecordBreadcrumbProps = { // Path above a record header; an item with a `link` is a link, the last item without one names the current record.
|
|
2385
2396
|
items: { label: string; link?: CellLink; }[];
|
|
2386
2397
|
ariaLabel: string;
|
|
@@ -2394,6 +2405,7 @@ type RecordStepsProps = { // "Next steps" panel; an item's `reason` sits behind
|
|
|
2394
2405
|
narrowLimit?: number; // Below the sm breakpoint only this many steps show; the rest sits behind a toggle.
|
|
2395
2406
|
moreLabel?: (hiddenCount: number) => string; // Toggle label for the hidden steps; receives their count.
|
|
2396
2407
|
lessLabel?: string;
|
|
2408
|
+
moreActionsLabel?: string; // Label before the further actions of each item.
|
|
2397
2409
|
items: { id: string; title: string; narrowTitle?: string; detail?: string; narrowDetail?: string; tone?: SelectOptionTone; reason?: string; reasonOpen?: true; reasonTitle?: string; actions?: ReactNode; moreActions?: ReactNode; }[];
|
|
2398
2410
|
count?: number; // Total number of steps, shown small beside the heading even when `narrowLimit` shortens the list.
|
|
2399
2411
|
testId?: string;
|
|
@@ -2402,6 +2414,11 @@ type RecordSummaryProps = { // One emphasized sentence below a record header; `t
|
|
|
2402
2414
|
text: string;
|
|
2403
2415
|
narrowText?: string; // Shown instead of `text` below the sm breakpoint.
|
|
2404
2416
|
tone?: SelectOptionTone;
|
|
2417
|
+
icon?: NavIconKey; // Leads the sentence; the sentence then has no bordered box.
|
|
2418
|
+
testId?: string;
|
|
2419
|
+
};
|
|
2420
|
+
type StepListProps = { // Vertical numbered steps joined by a line; each step has a title, an optional status pill and a description line.
|
|
2421
|
+
items: { id: string; title: string; status?: string; statusTone?: SelectOptionTone; description?: string; }[];
|
|
2405
2422
|
testId?: string;
|
|
2406
2423
|
};
|
|
2407
2424
|
```
|
|
@@ -3169,6 +3186,7 @@ type ConfigMask = {
|
|
|
3169
3186
|
description?: string; // i18n key for help text shown under the field label.
|
|
3170
3187
|
icon?: NavIconKey;
|
|
3171
3188
|
order?: number;
|
|
3189
|
+
readOnly?: boolean; // Shows the value on the generated settings screen without an input; a read-only key cannot also be `required`.
|
|
3172
3190
|
};
|
|
3173
3191
|
type ConfigSeedDef = {
|
|
3174
3192
|
key: string;
|
|
@@ -3924,7 +3942,7 @@ type MultiSelectFieldDef<TOptions extends string[] = string[]> = PiiAndFieldStat
|
|
|
3924
3942
|
sensitive?: boolean;
|
|
3925
3943
|
default?: TOptions[number][]; // Default selection.
|
|
3926
3944
|
access?: FieldAccess;
|
|
3927
|
-
display?: "checkboxes" | "dropdown"; // Renderer metadata: `"checkboxes"` renders every option as a visible checkbox with a select-all toggle.
|
|
3945
|
+
display?: "checkboxes" | "chips" | "dropdown"; // Renderer metadata: `"checkboxes"` renders every option as a visible checkbox with a select-all toggle.
|
|
3928
3946
|
columns?: 1 | 2 | 3 | 4; // Renderer metadata: column count for the `"checkboxes"` grid at the widest breakpoint; narrow viewports always collapse to one column.
|
|
3929
3947
|
maxRows?: number; // Renderer metadata: how many grid rows stay visible before the `"checkboxes"` grid becomes scrollable.
|
|
3930
3948
|
optionsAvailabilityQuery?: string; // Query returning `{ rows: { value, disabled?, hint?
|
|
@@ -5015,6 +5033,7 @@ type EditFieldPrefill =
|
|
|
5015
5033
|
;
|
|
5016
5034
|
type EditFieldsSectionBase = {
|
|
5017
5035
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
5036
|
+
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
5018
5037
|
kind?: "fields";
|
|
5019
5038
|
title?: string; // Optional.
|
|
5020
5039
|
description?: string; // Optional help text under the block heading (i18n key or raw string, like `title`) — makes a form usable without training instead of falling back to custom JSX for help text.
|
package/agents/api.md
CHANGED
|
@@ -10,7 +10,7 @@ Format: one line per function or constant, object and options types as property
|
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| `@cosmicdrift/kumiko-framework/engine` | `api/framework-engine.md` | 446 |
|
|
12
12
|
| `@cosmicdrift/kumiko-framework/errors` | `api/framework-errors.md` | 27 |
|
|
13
|
-
| `@cosmicdrift/kumiko-framework/ui-types` | `api/framework-ui-types.md` |
|
|
13
|
+
| `@cosmicdrift/kumiko-framework/ui-types` | `api/framework-ui-types.md` | 189 |
|
|
14
14
|
| `@cosmicdrift/kumiko-framework/db` | `api/framework-db.md` | 157 |
|
|
15
15
|
| `@cosmicdrift/kumiko-framework/event-store` | `api/framework-event-store.md` | 41 |
|
|
16
16
|
| `@cosmicdrift/kumiko-framework/seeding` | `api/framework-seeding.md` | 6 |
|