@cosmicdrift/kumiko-types 0.348.1 → 0.349.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 +35 -0
- package/package.json +1 -1
package/dist/screen.d.ts
CHANGED
|
@@ -649,6 +649,34 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
649
649
|
* Set "form" to opt back into the disabled-Input look (fw#2245). */
|
|
650
650
|
readonly valueDisplay?: "form" | "text";
|
|
651
651
|
};
|
|
652
|
+
/** Text a query handler can send untranslated: the renderer translates it. */
|
|
653
|
+
export type DashboardI18nText = {
|
|
654
|
+
readonly i18nKey: string;
|
|
655
|
+
readonly i18nParams?: Readonly<Record<string, DashboardTextParam>>;
|
|
656
|
+
};
|
|
657
|
+
/** Minor units (like Money fields), formatted with the user locale. */
|
|
658
|
+
export type DashboardMoneyParam = {
|
|
659
|
+
readonly kind: "money";
|
|
660
|
+
readonly amountMinor: number;
|
|
661
|
+
readonly currency: string;
|
|
662
|
+
};
|
|
663
|
+
/** Epoch ms, rendered as a medium date in the user time zone. */
|
|
664
|
+
export type DashboardDateParam = {
|
|
665
|
+
readonly kind: "date";
|
|
666
|
+
readonly atMs: number;
|
|
667
|
+
};
|
|
668
|
+
/** Nested DashboardI18nText params resolve first (e.g. a duration "{years} {months}"
|
|
669
|
+
* with one plural key each); numbers stay raw so plural rules can read `count`. */
|
|
670
|
+
export type DashboardTextParam = string | number | DashboardI18nText | DashboardMoneyParam | DashboardDateParam;
|
|
671
|
+
/** Plain string is displayed as-is; DashboardI18nText is translated by the renderer. */
|
|
672
|
+
export type DashboardText = string | DashboardI18nText;
|
|
673
|
+
/** Chart/stat values are minor units, formatted with the user locale. */
|
|
674
|
+
export type DashboardValueFormat = {
|
|
675
|
+
readonly kind: "currency";
|
|
676
|
+
readonly currency: string;
|
|
677
|
+
/** Defaults to the currency's own decimals. */
|
|
678
|
+
readonly fractionDigits?: number;
|
|
679
|
+
};
|
|
652
680
|
export type DashboardPanelQueryOptions = {
|
|
653
681
|
/** Static, author-set query parameters merged on top of the screen's
|
|
654
682
|
* dynamic filterParams — lets a panel pin a value (e.g. a status facet)
|
|
@@ -677,6 +705,8 @@ export type DashboardStatPanel = DashboardPanelQueryOptions & {
|
|
|
677
705
|
readonly valueField: string;
|
|
678
706
|
readonly subField?: string;
|
|
679
707
|
readonly toneField?: string;
|
|
708
|
+
/** Formats a numeric value as currency (minor units); ignored for string values. The sparkline is not formatted. */
|
|
709
|
+
readonly valueFormat?: DashboardValueFormat;
|
|
680
710
|
/** Fixed tone when `toneField` is unset or yields none; not applied while the value is 0. */
|
|
681
711
|
readonly tone?: "default" | "positive" | "warn" | "negative";
|
|
682
712
|
/** Record field holding `{ atMs, value | null }[]` (MetricResult.points),
|
|
@@ -714,6 +744,11 @@ export type DashboardChartPanel = DashboardPanelQueryOptions & DashboardPanelEmp
|
|
|
714
744
|
readonly subtitle?: string;
|
|
715
745
|
/** Series/segment key -> tone; unmapped keys fall back to a palette. */
|
|
716
746
|
readonly seriesTones?: Readonly<Record<string, DashboardChartTone>>;
|
|
747
|
+
/** Formats values as currency (minor units): y ticks, legend totals and tooltips on
|
|
748
|
+
* stacked-bars/segment-bars/stacked-area, only the y ticks on timeseries. */
|
|
749
|
+
readonly valueFormat?: DashboardValueFormat;
|
|
750
|
+
/** Only for chart "stacked-area": fixed width per bucket, plot scrolls horizontally. */
|
|
751
|
+
readonly scrollable?: boolean;
|
|
717
752
|
};
|
|
718
753
|
export type DashboardListPanel = DashboardPanelQueryOptions & DashboardPanelEmptyState & {
|
|
719
754
|
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.349.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>",
|