@cosmicdrift/kumiko-renderer 0.79.3 → 0.80.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-renderer",
3
- "version": "0.79.3",
3
+ "version": "0.80.0",
4
4
  "description": "Platform-agnostic React renderer for Kumiko screens. Contains the shared logic — primitives-contract, hooks, KumikoScreen, navigation & SSE abstractions — that any platform-specific renderer (web, native) composes. No DOM, no EventSource, no react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -15,8 +15,8 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@cosmicdrift/kumiko-framework": "0.79.3",
19
- "@cosmicdrift/kumiko-headless": "0.79.3",
18
+ "@cosmicdrift/kumiko-framework": "0.80.0",
19
+ "@cosmicdrift/kumiko-headless": "0.80.0",
20
20
  "react": "^19.2.6"
21
21
  },
22
22
  "devDependencies": {
@@ -31,6 +31,7 @@ const testPrimitives: CorePrimitives = {
31
31
  DataTable: noop,
32
32
  Form: noop,
33
33
  Section: noop,
34
+ Card: noop,
34
35
  Grid: noop,
35
36
  GridCell: noop,
36
37
  Text: noop,
package/src/index.ts CHANGED
@@ -91,6 +91,9 @@ export type {
91
91
  AppPrimitives,
92
92
  BannerProps,
93
93
  ButtonProps,
94
+ CardOptions,
95
+ CardProps,
96
+ CardSlots,
94
97
  CorePrimitives,
95
98
  DataTableFacet,
96
99
  DataTableProps,
@@ -591,6 +591,42 @@ export type ConfigCascadeViewProps = {
591
591
  readonly onToggle?: () => void;
592
592
  };
593
593
 
594
+ /** Card-Slots — benannte Inhalts-Regionen, alle optional. Neue Slots später =
595
+ * rein additiv → Consumer müssen NIE migriert werden. `header` ist der Escape-
596
+ * Hatch: ein roher Knoten ersetzt den Default-Header (title/subtitle/
597
+ * headerActions) komplett, wenn die Convenience-Slots nicht reichen. */
598
+ export type CardSlots = {
599
+ readonly header?: ReactNode;
600
+ readonly title?: ReactNode;
601
+ readonly subtitle?: ReactNode;
602
+ /** Rechtsbündiger Header-Slot (Range-Umschalter, Filter, Badge …). */
603
+ readonly headerActions?: ReactNode;
604
+ /** Footer-Inhalt, abgehoben (border-t). Default rechtsbündig. */
605
+ readonly footer?: ReactNode;
606
+ };
607
+
608
+ /** Card-Options — Verhalten/Optik, ebenfalls additiv erweiterbar. */
609
+ export type CardOptions = {
610
+ /** Body-Padding (px-6 py-6). false = randlos (Tabelle/eigene Tiles). Default true. */
611
+ readonly padded?: boolean;
612
+ /** Eckenradius. Default "xl" (= Entity-Card). */
613
+ readonly radius?: "lg" | "xl";
614
+ /** Footer abgehoben mit border-t + bg-muted/30. Default true. */
615
+ readonly footerBordered?: boolean;
616
+ };
617
+
618
+ /** Generische Card-Chrome (border/bg/radius/shadow + Header/Body/Footer) als
619
+ * Primitive — eine Quelle für alle Card-Flächen, statt pro App nachgebaut.
620
+ * Slot- + Options-basiert, damit der Contract stabil bleibt. */
621
+ export type CardProps = {
622
+ readonly slots?: CardSlots;
623
+ readonly options?: CardOptions;
624
+ /** Body-Inhalt (Normalfall; Header/Footer kommen über slots). */
625
+ readonly children?: ReactNode;
626
+ readonly className?: string;
627
+ readonly testId?: string;
628
+ };
629
+
594
630
  // ---- Core-Registry (Kumiko-eigene Primitives) ----
595
631
 
596
632
  export type CorePrimitives = {
@@ -601,6 +637,7 @@ export type CorePrimitives = {
601
637
  readonly DataTable: ComponentType<DataTableProps>;
602
638
  readonly Form: ComponentType<FormProps>;
603
639
  readonly Section: ComponentType<SectionProps>;
640
+ readonly Card: ComponentType<CardProps>;
604
641
  readonly Grid: ComponentType<GridProps>;
605
642
  readonly GridCell: ComponentType<GridCellProps>;
606
643
  readonly Text: ComponentType<TextProps>;