@cosmicdrift/kumiko-types 0.208.3 → 0.209.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/screen.ts +57 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.208.3",
3
+ "version": "0.209.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": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
package/src/screen.ts CHANGED
@@ -232,9 +232,10 @@ export type RowActionNavigate = {
232
232
  readonly rowClick?: boolean;
233
233
  };
234
234
 
235
- // ToolbarAction — Button im List-Header. Zwei Varianten: navigate auf
236
- // einen anderen Screen (z.B. zu einem actionForm) oder direkt einen
237
- // Handler dispatchen (z.B. "Sync All" ohne Form).
235
+ // ToolbarAction — button in the list header. Three variants: navigate to
236
+ // another screen (e.g. a full-page actionForm), dispatch a handler directly
237
+ // (e.g. "Sync All" without a form), or mount an actionForm in a Drawer
238
+ // without leaving the list (fw#2225).
238
239
  export type ToolbarAction =
239
240
  | {
240
241
  readonly kind: "navigate";
@@ -257,6 +258,18 @@ export type ToolbarAction =
257
258
  /** i18n-Key für Confirm-Button-Text im Dialog. Default = `label`. */
258
259
  readonly confirmLabel?: string;
259
260
  readonly style?: "primary" | "secondary" | "danger";
261
+ }
262
+ | {
263
+ readonly kind: "drawer";
264
+ readonly id: string;
265
+ readonly label: string;
266
+ /** Short, unqualified id of an `actionForm` screen in the same
267
+ * feature. Boot validator rejects a missing screen and a screen
268
+ * whose `type` isn't `actionForm` — the caller decides full-page
269
+ * vs. drawer, not the form (see docs/plans/bundled-features-screen-
270
+ * standardisierung.md §2.6c). */
271
+ readonly screen: string;
272
+ readonly style?: "primary" | "secondary";
260
273
  };
261
274
 
262
275
  export type EntityListScreenDefinition = {
@@ -313,6 +326,27 @@ export type EntityListScreenDefinition = {
313
326
  // auto create-navigation (a projection isn't an editable entity list). Row
314
327
  // interaction is explicit via `rowActions`. The query must return the same
315
328
  // paged envelope as an entity list-query: `{ rows, nextCursor, total? }`.
329
+ // User-toggleable facet dropdown on a projectionList screen (fw#2224).
330
+ // entityList derives the same UI from `filterable: true` entity fields plus
331
+ // the `<feature>:entity:<entity>:field:<field>:option:<value>` i18n
332
+ // convention — a projectionList has no entity to derive from, so every
333
+ // label here is explicit instead. Sent to the server as
334
+ // `{field, op:"in", value}` in `payload.filters`, ANDed with `filter`.
335
+ export type ListFacetSpec =
336
+ | {
337
+ readonly field: string;
338
+ readonly type: "select";
339
+ readonly label: string;
340
+ readonly options: readonly { readonly value: string; readonly label: string }[];
341
+ }
342
+ | {
343
+ readonly field: string;
344
+ readonly type: "boolean";
345
+ readonly label: string;
346
+ readonly trueLabel: string;
347
+ readonly falseLabel: string;
348
+ };
349
+
316
350
  export type ProjectionListScreenDefinition = {
317
351
  readonly id: string;
318
352
  readonly type: "projectionList";
@@ -336,6 +370,14 @@ export type ProjectionListScreenDefinition = {
336
370
  * or `offset` param present). See `sortable` doc for why this is
337
371
  * boot-enforced rather than type-enforced. */
338
372
  readonly paginated?: boolean;
373
+ /** Server-side filter, fixed on the screen — see `ScreenFilter` doc above
374
+ * (entityList). Field existence can't be checked without an entity; the
375
+ * boot-validator only checks structure (`op:"in"` ⇒ array value). */
376
+ readonly filter?: ScreenFilter;
377
+ /** User-toggleable facet dropdowns — see `ListFacetSpec` doc. `field`
378
+ * must be a declared column; the bound query handler must accept
379
+ * `filters` in its Zod schema — the boot-validator checks both. */
380
+ readonly facets?: readonly ListFacetSpec[];
339
381
  readonly slots?: ScreenSlots;
340
382
  readonly access?: AccessRule;
341
383
  };
@@ -379,6 +421,18 @@ export type ProjectionDetailScreenDefinition = {
379
421
  * `rowClick` has no target here (there is no row to click) and is
380
422
  * rejected by the boot-validator. */
381
423
  readonly actions?: readonly RowAction[];
424
+ /** How head fields render. Default "text" — plain text instead of a
425
+ * disabled Input, since every field on this screen type is forced
426
+ * readOnly anyway (there is no write path, see the shim doc above).
427
+ * Set "form" to opt back into the disabled-Input look (fw#2245). */
428
+ readonly valueDisplay?: "form" | "text";
429
+ /** Hides RenderEdit's action-bar footer (effectively just the "Cancel"
430
+ * button here — this screen type never has Save/Delete). Default false,
431
+ * matching the pre-fw#2245 behavior: Cancel is shown whenever
432
+ * `listScreenId` is set. `resolveDetailBreadcrumb` (renderer-web) also
433
+ * reads `listScreenId` on this screen type, so the breadcrumb still
434
+ * offers "back" when the footer is hidden. */
435
+ readonly hideActions?: boolean;
382
436
  };
383
437
 
384
438
  // --- dashboard ---