@cosmicdrift/kumiko-types 0.348.1 → 0.350.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/dist/screen.d.ts +41 -3
- package/package.json +1 -1
package/dist/screen.d.ts
CHANGED
|
@@ -152,9 +152,12 @@ export type RowFieldExtractor = {
|
|
|
152
152
|
/** How a row action renders inline in the row-action column. `"button"` is a
|
|
153
153
|
* bordered button (its colour follows the action's `style`), `"link"` a text
|
|
154
154
|
* link, `"icon"` an icon-only button (needs a resolved icon, falls back to
|
|
155
|
-
* `"link"` without one).
|
|
156
|
-
*
|
|
157
|
-
|
|
155
|
+
* `"link"` without one). `"responsive"` is a `"button"` with icon and label
|
|
156
|
+
* from tablet width up and an icon-only button below it, the label staying the
|
|
157
|
+
* accessible name (needs a resolved icon, falls back to `"button"` without
|
|
158
|
+
* one). Unset: the renderer decides (primary action as link, the rest in the
|
|
159
|
+
* kebab menu). */
|
|
160
|
+
export type RowActionDisplay = "button" | "link" | "icon" | "responsive";
|
|
158
161
|
/** Row-action column layout. `"adaptive"` (default): primary action as link,
|
|
159
162
|
* the rest in a kebab menu — except actions with an explicit `display`, which
|
|
160
163
|
* stay inline. `"inline"`: every action inline, no kebab. */
|
|
@@ -649,6 +652,34 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
649
652
|
* Set "form" to opt back into the disabled-Input look (fw#2245). */
|
|
650
653
|
readonly valueDisplay?: "form" | "text";
|
|
651
654
|
};
|
|
655
|
+
/** Text a query handler can send untranslated: the renderer translates it. */
|
|
656
|
+
export type DashboardI18nText = {
|
|
657
|
+
readonly i18nKey: string;
|
|
658
|
+
readonly i18nParams?: Readonly<Record<string, DashboardTextParam>>;
|
|
659
|
+
};
|
|
660
|
+
/** Minor units (like Money fields), formatted with the user locale. */
|
|
661
|
+
export type DashboardMoneyParam = {
|
|
662
|
+
readonly kind: "money";
|
|
663
|
+
readonly amountMinor: number;
|
|
664
|
+
readonly currency: string;
|
|
665
|
+
};
|
|
666
|
+
/** Epoch ms, rendered as a medium date in the user time zone. */
|
|
667
|
+
export type DashboardDateParam = {
|
|
668
|
+
readonly kind: "date";
|
|
669
|
+
readonly atMs: number;
|
|
670
|
+
};
|
|
671
|
+
/** Nested DashboardI18nText params resolve first (e.g. a duration "{years} {months}"
|
|
672
|
+
* with one plural key each); numbers stay raw so plural rules can read `count`. */
|
|
673
|
+
export type DashboardTextParam = string | number | DashboardI18nText | DashboardMoneyParam | DashboardDateParam;
|
|
674
|
+
/** Plain string is displayed as-is; DashboardI18nText is translated by the renderer. */
|
|
675
|
+
export type DashboardText = string | DashboardI18nText;
|
|
676
|
+
/** Chart/stat values are minor units, formatted with the user locale. */
|
|
677
|
+
export type DashboardValueFormat = {
|
|
678
|
+
readonly kind: "currency";
|
|
679
|
+
readonly currency: string;
|
|
680
|
+
/** Defaults to the currency's own decimals. */
|
|
681
|
+
readonly fractionDigits?: number;
|
|
682
|
+
};
|
|
652
683
|
export type DashboardPanelQueryOptions = {
|
|
653
684
|
/** Static, author-set query parameters merged on top of the screen's
|
|
654
685
|
* dynamic filterParams — lets a panel pin a value (e.g. a status facet)
|
|
@@ -677,6 +708,8 @@ export type DashboardStatPanel = DashboardPanelQueryOptions & {
|
|
|
677
708
|
readonly valueField: string;
|
|
678
709
|
readonly subField?: string;
|
|
679
710
|
readonly toneField?: string;
|
|
711
|
+
/** Formats a numeric value as currency (minor units); ignored for string values. The sparkline is not formatted. */
|
|
712
|
+
readonly valueFormat?: DashboardValueFormat;
|
|
680
713
|
/** Fixed tone when `toneField` is unset or yields none; not applied while the value is 0. */
|
|
681
714
|
readonly tone?: "default" | "positive" | "warn" | "negative";
|
|
682
715
|
/** Record field holding `{ atMs, value | null }[]` (MetricResult.points),
|
|
@@ -714,6 +747,11 @@ export type DashboardChartPanel = DashboardPanelQueryOptions & DashboardPanelEmp
|
|
|
714
747
|
readonly subtitle?: string;
|
|
715
748
|
/** Series/segment key -> tone; unmapped keys fall back to a palette. */
|
|
716
749
|
readonly seriesTones?: Readonly<Record<string, DashboardChartTone>>;
|
|
750
|
+
/** Formats values as currency (minor units): y ticks, legend totals and tooltips on
|
|
751
|
+
* stacked-bars/segment-bars/stacked-area, only the y ticks on timeseries. */
|
|
752
|
+
readonly valueFormat?: DashboardValueFormat;
|
|
753
|
+
/** Only for chart "stacked-area": fixed width per bucket, plot scrolls horizontally. */
|
|
754
|
+
readonly scrollable?: boolean;
|
|
717
755
|
};
|
|
718
756
|
export type DashboardListPanel = DashboardPanelQueryOptions & DashboardPanelEmptyState & {
|
|
719
757
|
readonly kind: "list";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.350.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>",
|