@cosmicdrift/kumiko-types 0.275.0 → 0.276.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.275.0",
3
+ "version": "0.276.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/fields.ts CHANGED
@@ -445,6 +445,19 @@ export type DecimalFieldDef = {
445
445
  readonly access?: FieldAccess;
446
446
  } & ResolvedPiiFlags;
447
447
 
448
+ /** Where a money field's currency comes from, for the fields that opt in.
449
+ * Discriminated union so #2839 can add `{ kind: "literal", code }` and
450
+ * `{ kind: "field", of }` variants without a breaking change. `"tenant"` is
451
+ * the tenant-settings bundle's per-tenant currency (`tenant-settings:config:
452
+ * currency`) — see kumiko-framework#2933. */
453
+ export type MoneyCurrencySource = { readonly kind: "tenant" };
454
+
455
+ /** Qualified config key a `{ kind: "tenant" }` MoneyCurrencySource resolves
456
+ * against — the tenant-settings bundle's per-tenant currency. Lives here
457
+ * (client-safe) rather than framework/engine so renderer code can read it
458
+ * without a runtime-only import (kumiko-framework#2937). */
459
+ export const TENANT_CURRENCY_CONFIG_KEY = "tenant-settings:config:currency";
460
+
448
461
  export type MoneyFieldDef = {
449
462
  readonly type: "money";
450
463
  readonly description?: string;
@@ -453,6 +466,11 @@ export type MoneyFieldDef = {
453
466
  readonly filterable?: boolean;
454
467
  readonly sensitive?: boolean;
455
468
  readonly access?: FieldAccess;
469
+ /** Declares where this field's currency comes from for a currently-empty
470
+ * value in an entityEdit form. Undefined = unchanged existing behaviour
471
+ * (`entity.defaultCurrency ?? "EUR"`); a stored value always keeps its
472
+ * own currency regardless of this declaration. */
473
+ readonly currency?: MoneyCurrencySource;
456
474
  };
457
475
 
458
476
  // Reference-Field (Tier 2.7e-3) — FK-Style Verweis auf eine andere
package/src/screen.ts CHANGED
@@ -1474,6 +1474,8 @@ export type SecretsEditScreenDefinition = {
1474
1474
 
1475
1475
  export type ScreenSlots = {
1476
1476
  readonly header?: PlatformComponent;
1477
+ /** entityEdit / actionForm: rendered on the right of the form title, same row. */
1478
+ readonly titleAction?: PlatformComponent;
1477
1479
  readonly beforeForm?: PlatformComponent;
1478
1480
  readonly afterForm?: PlatformComponent;
1479
1481
  readonly sidebar?: PlatformComponent;