@cosmicdrift/kumiko-types 0.246.0 → 0.248.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.246.0",
3
+ "version": "0.248.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/nav.ts CHANGED
@@ -47,8 +47,9 @@ export type NavDefinition = {
47
47
  // Hover-Actions rechts in der Zeile (VS-Code-Pattern) — erst bei Hover
48
48
  // sichtbar. Reihenfolge wie deklariert.
49
49
  readonly actions?: readonly TreeAction[];
50
- // „+"-Affordance am Knoten. Klick dispatcht createAction.target; der
51
- // Provider weiß was „leer befüllen" für ihn heißt (neuer Page-Slug etc.).
50
+ // "+" affordance on the node. Click navigates to createAction.screen or
51
+ // dispatches createAction.target; the provider knows what "create empty"
52
+ // means for it (new page slug, etc.).
52
53
  readonly createAction?: TreeAction;
53
54
  // Children kommen zur Laufzeit aus einem registrierten nav-provider
54
55
  // (lazy beim Ausklappen, SSE-live via treeEntities), keyed auf diese
package/src/screen.ts CHANGED
@@ -130,6 +130,11 @@ export type ListColumnSpec =
130
130
  /** Row field on the referenced entity shown as the label (default
131
131
  * "id"). Only meaningful together with `refEntity`. */
132
132
  readonly refLabelField?: string;
133
+ /** Marks this column as sortable via a clickable header — for
134
+ * relatedList columns, which have no `EntityDefinition` field to carry
135
+ * `sortable` on. Ignored on `entityList` columns, where the entity
136
+ * field's own `sortable` flag wins. */
137
+ readonly sortable?: boolean;
133
138
  };
134
139
 
135
140
  // Pagination-Modi für entityList:
@@ -811,6 +816,11 @@ export type EditRelatedListSection = {
811
816
  readonly parentParam?: string;
812
817
  readonly columns: readonly ListColumnSpec[];
813
818
  readonly pageSize?: number;
819
+ /** Initial sort on mount, applied client-side over the already-loaded rows
820
+ * (this section has no pager, so there is no "loaded subset" to mislead).
821
+ * `field` must name a column with `sortable: true` — boot-validator pins
822
+ * that, same as `entityList.defaultSort`. */
823
+ readonly defaultSort?: ListSortSpec;
814
824
  /** Row click opens the target entity's detail screen via ObjectTarget —
815
825
  * the `detailFor` lookup owns the entity→screen mapping, so no screenId
816
826
  * is named here. `idColumn` names the row key holding that id (default
package/src/tree-node.ts CHANGED
@@ -32,9 +32,14 @@ export type TreeAction = {
32
32
  // i18n-Translation-Key oder roher String. Vom Renderer aufgelöst, Engine
33
33
  // behandelt opak (mirrors NavDefinition.label, WorkspaceDefinition.label).
34
34
  readonly label: string;
35
- // Klick-Ziel der Action. PflichtAction ohne target ist semantisch
36
- // sinnlos (Hover-Icon das nichts tut).
37
- readonly target: TargetRef;
35
+ // Qualified screen name ("<feature>:screen:<id>")renders as a route
36
+ // link. Exactly one of `screen`/`target` must be set; an action with
37
+ // neither is a Hover-Icon that does nothing, the boot validator rejects
38
+ // it.
39
+ readonly screen?: string;
40
+ // EditorPanel dispatch target — renders as a click-dispatch button.
41
+ // Exactly one of `screen`/`target` must be set.
42
+ readonly target?: TargetRef;
38
43
  };
39
44
 
40
45
  export type TreeNode = {
@@ -59,12 +64,12 @@ export type TreeNode = {
59
64
  // erst beim Ausklappen aufgerufen (lazy); die Function-Form erlaubt
60
65
  // SSE-gefütterte Live-Updates wenn neue Entity-Rows reinkommen.
61
66
  readonly children?: readonly TreeNode[] | TreeChildrenSubscribe;
62
- // Provider-deklarierte „+ create"-Action für Knoten mit `state: "empty"`.
63
- // Tree-Component zeigt automatisch ein „+"-Icon und dispatcht
64
- // `createAction.target` bei KlickProvider weiß was „leer befüllen"
65
- // für ihn bedeutet (z.B. „neuer Page-Slug" vs „neue Entity-Row"),
66
- // Convention könnte das nicht raten. Konsistent zu `state` (auch
67
- // Provider-explizit). Siehe visual-tree.md V.1.1-Decision D3.
67
+ // Provider-declared "+ create" action for nodes with `state: "empty"`.
68
+ // The tree component automatically shows a "+" icon; click navigates to
69
+ // `createAction.screen` or dispatches `createAction.target` the
70
+ // provider knows what "create empty" means for it (e.g. "new page slug"
71
+ // vs. "new entity row"), convention couldn't guess that. Consistent with
72
+ // `state` (also provider-explicit). See visual-tree.md V.1.1 Decision D3.
68
73
  readonly createAction?: TreeAction;
69
74
  };
70
75