@cosmicdrift/kumiko-types 0.258.1 → 0.260.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 +30 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-types",
3
- "version": "0.258.1",
3
+ "version": "0.260.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
@@ -530,6 +530,10 @@ export type MetricNavigate = {
530
530
  readonly entity?: string;
531
531
  readonly entityId?: string;
532
532
  readonly params?: RowFieldExtractor;
533
+ /** Section id of the tab to activate at the destination. Alone (no
534
+ * `screen`/`entity`), it activates that tab on the current record
535
+ * instead of navigating away. */
536
+ readonly tab?: string;
533
537
  };
534
538
 
535
539
  // A metric can navigate on click, so the plain string shorthand (field name,
@@ -709,6 +713,23 @@ export type DashboardCustomPanel = {
709
713
  readonly component: PlatformComponent;
710
714
  };
711
715
 
716
+ // Live query, so a write that flips `field` swaps panels without reload; hidden while loading.
717
+ export type DashboardPanelVisibility = {
718
+ readonly query: string;
719
+ readonly field: string;
720
+ readonly eq: string | number | boolean | null;
721
+ };
722
+
723
+ // Embedded redirect/cancelTarget navigate away from the dashboard — targets meant for tiles omit both.
724
+ export type DashboardScreenPanel = {
725
+ readonly kind: "screen";
726
+ readonly id: string;
727
+ /** Same-feature short id or cross-feature QN `<feature>:screen:<id>`. */
728
+ readonly screen: string;
729
+ readonly label?: string;
730
+ readonly visibleWhen?: DashboardPanelVisibility;
731
+ };
732
+
712
733
  export type DashboardPanelDefinition =
713
734
  | DashboardStatPanel
714
735
  | DashboardStatGroupPanel
@@ -716,7 +737,8 @@ export type DashboardPanelDefinition =
716
737
  | DashboardListPanel
717
738
  | DashboardFeedPanel
718
739
  | DashboardProgressListPanel
719
- | DashboardCustomPanel;
740
+ | DashboardCustomPanel
741
+ | DashboardScreenPanel;
720
742
 
721
743
  // Screen-weiter Picker (Combobox), dessen gewählter Wert unter `id` in JEDE
722
744
  // Panel-Query dieses Screens gemerged wird (Query-Handler validieren den Wert
@@ -1008,8 +1030,13 @@ export type EntityEditScreenDefinition = {
1008
1030
  * feature to the target at boot time — an app that doesn't mount the
1009
1031
  * target feature fails the boot-validator; only use this form in a
1010
1032
  * reusable feature when the target feature is guaranteed to be
1011
- * mounted alongside it. */
1012
- readonly redirect?: string;
1033
+ * mounted alongside it.
1034
+ *
1035
+ * The object form additionally names the success-payload field the
1036
+ * navigation id comes from (`ActionFormRedirect.idFrom`) — needed when
1037
+ * the edited record is a child and the target screen is the parent's
1038
+ * detail screen. */
1039
+ readonly redirect?: string | ActionFormRedirect;
1013
1040
  /** Parent list screen (short id) for breadcrumb + nav highlighting when
1014
1041
  * this screen has no nav entry of its own. Same field/semantics as on
1015
1042
  * `custom`/`projectionDetail`; an explicit value here wins over the