@cosmicdrift/kumiko-types 0.247.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 +1 -1
- package/src/nav.ts +3 -2
- package/src/tree-node.ts +14 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "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
|
-
//
|
|
51
|
-
//
|
|
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/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
|
-
//
|
|
36
|
-
//
|
|
37
|
-
|
|
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-
|
|
63
|
-
//
|
|
64
|
-
// `createAction.
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
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
|
|