@cosmicdrift/kumiko-types 0.240.0 → 0.241.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 +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.240.0",
3
+ "version": "0.241.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
@@ -72,6 +72,8 @@ export interface FieldFormatRegistry {
72
72
  // Prefer fieldOptionLabelKeyPrefix() from @cosmicdrift/kumiko-headless
73
73
  // over hand-typed prefix strings.
74
74
  enumOption: { readonly keyPrefix: string };
75
+ /** JSON-safe structured value rendered as indented text. */
76
+ json: { readonly indent?: number };
75
77
  }
76
78
 
77
79
  // Discriminated union derived from the registry — one variant per key.
@@ -481,6 +483,18 @@ export type ProjectionDetailScreenDefinition = {
481
483
  readonly query: string;
482
484
  /** Query-payload key for the row-id. Default "id". */
483
485
  readonly idParam?: string;
486
+ /** The server determines the shown row from the caller's session/context
487
+ * instead of a row id in the path — a self-service screen ("my profile",
488
+ * "my data") that has no row to link to (unlike `EntityEditScreenDefinition.
489
+ * singleton`, which still resolves via `<entity>:list` limit 1; here the
490
+ * query itself owns the row selection, e.g. `user:query:user:me`). The
491
+ * query is called WITHOUT the `idParam` key — there is no id to send, so
492
+ * the boot-validator rejects declaring `idParam` alongside this flag
493
+ * instead of letting one silently win. Stricter than an id-addressed
494
+ * screen, not looser: the server picks the row, so no client-supplied id
495
+ * can reach the query — a stray id on the path is ignored, never
496
+ * forwarded. */
497
+ readonly singleton?: boolean;
484
498
  readonly layout: EditLayout;
485
499
  /** Optionaler per-Field-Label-i18n-Key (Field-Name → Key), analog zu
486
500
  * entityEdit.fieldLabels. Die Pseudo-Entity `__projection-detail__` hat
@@ -529,6 +543,10 @@ export type DashboardStatPanel = {
529
543
  /** Anzeige-Text (i18n-Key). */
530
544
  readonly label: string;
531
545
  readonly query: string;
546
+ /** Static, author-set query parameters merged on top of the screen's
547
+ * dynamic filterParams — lets a panel pin a value (e.g. a status facet)
548
+ * the screen-wide filter doesn't cover, without needing its own query. */
549
+ readonly params?: Readonly<Record<string, unknown>>;
532
550
  readonly valueField: string;
533
551
  readonly subField?: string;
534
552
  readonly toneField?: string;