@almadar/ui 5.21.12 → 5.22.3

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 (87) hide show
  1. package/dist/avl/index.cjs +2432 -3173
  2. package/dist/avl/index.js +1373 -2114
  3. package/dist/components/core/molecules/CalendarGrid.d.ts +3 -10
  4. package/dist/components/core/molecules/ContentRenderer.d.ts +2 -2
  5. package/dist/components/core/molecules/DataGrid.d.ts +11 -20
  6. package/dist/components/core/molecules/DataList.d.ts +9 -15
  7. package/dist/components/core/molecules/FormSection.d.ts +4 -4
  8. package/dist/components/core/molecules/PositionedCanvas.d.ts +4 -17
  9. package/dist/components/core/molecules/ReplyTree.d.ts +2 -13
  10. package/dist/components/core/molecules/RichBlockEditor.d.ts +3 -6
  11. package/dist/components/core/molecules/SortableList.d.ts +7 -5
  12. package/dist/components/core/molecules/TableView.d.ts +7 -7
  13. package/dist/components/core/molecules/index.d.ts +3 -3
  14. package/dist/components/core/molecules/useDataDnd.d.ts +5 -5
  15. package/dist/components/core/organisms/CardGrid.d.ts +5 -2
  16. package/dist/components/core/organisms/CaseStudyOrganism.d.ts +4 -3
  17. package/dist/components/core/organisms/DataTable.d.ts +4 -2
  18. package/dist/components/core/organisms/DetailPanel.d.ts +6 -6
  19. package/dist/components/core/organisms/FeatureGridOrganism.d.ts +4 -3
  20. package/dist/components/core/organisms/HeroOrganism.d.ts +4 -5
  21. package/dist/components/core/organisms/List.d.ts +5 -2
  22. package/dist/components/core/organisms/MasterDetail.d.ts +4 -2
  23. package/dist/components/core/organisms/MediaGallery.d.ts +4 -2
  24. package/dist/components/core/organisms/ShowcaseOrganism.d.ts +4 -3
  25. package/dist/components/core/organisms/StatCard.d.ts +5 -2
  26. package/dist/components/core/organisms/StepFlowOrganism.d.ts +4 -3
  27. package/dist/components/core/organisms/Timeline.d.ts +2 -2
  28. package/dist/components/core/organisms/book/index.d.ts +1 -1
  29. package/dist/components/core/organisms/book/types.d.ts +28 -48
  30. package/dist/components/core/organisms/index.d.ts +1 -2
  31. package/dist/components/core/organisms/layout/DashboardGrid.d.ts +2 -2
  32. package/dist/components/core/organisms/marketing-types.d.ts +5 -94
  33. package/dist/components/core/organisms/types.d.ts +9 -27
  34. package/dist/components/core/templates/index.d.ts +6 -6
  35. package/dist/components/game/organisms/BattleBoard.d.ts +14 -90
  36. package/dist/components/game/organisms/CastleBoard.d.ts +7 -21
  37. package/dist/components/game/organisms/UncontrolledBattleBoard.d.ts +2 -7
  38. package/dist/components/game/organisms/WorldMapBoard.d.ts +13 -59
  39. package/dist/components/game/organisms/boardEntity.d.ts +44 -0
  40. package/dist/components/game/organisms/hooks/useBattleState.d.ts +7 -7
  41. package/dist/components/game/organisms/index.d.ts +3 -3
  42. package/dist/components/game/organisms/puzzles/builder/BuilderBoard.d.ts +7 -20
  43. package/dist/components/game/organisms/puzzles/builder/index.d.ts +1 -1
  44. package/dist/components/game/organisms/puzzles/classifier/ClassifierBoard.d.ts +7 -20
  45. package/dist/components/game/organisms/puzzles/classifier/index.d.ts +1 -1
  46. package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +6 -22
  47. package/dist/components/game/organisms/puzzles/debugger/index.d.ts +1 -1
  48. package/dist/components/game/organisms/puzzles/event-handler/EventHandlerBoard.d.ts +6 -33
  49. package/dist/components/game/organisms/puzzles/event-handler/ObjectRulePanel.d.ts +3 -21
  50. package/dist/components/game/organisms/puzzles/event-handler/index.d.ts +2 -2
  51. package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -0
  52. package/dist/components/game/organisms/puzzles/negotiator/NegotiatorBoard.d.ts +8 -24
  53. package/dist/components/game/organisms/puzzles/negotiator/index.d.ts +1 -1
  54. package/dist/components/game/organisms/puzzles/sequencer/ActionTile.d.ts +2 -2
  55. package/dist/components/game/organisms/puzzles/sequencer/SequencerBoard.d.ts +7 -36
  56. package/dist/components/game/organisms/puzzles/sequencer/index.d.ts +1 -1
  57. package/dist/components/game/organisms/puzzles/simulator/SimulatorBoard.d.ts +6 -25
  58. package/dist/components/game/organisms/puzzles/simulator/index.d.ts +1 -1
  59. package/dist/components/game/organisms/puzzles/state-architect/StateArchitectBoard.d.ts +7 -40
  60. package/dist/components/game/organisms/puzzles/state-architect/VariablePanel.d.ts +3 -9
  61. package/dist/components/game/organisms/puzzles/state-architect/index.d.ts +2 -2
  62. package/dist/components/game/organisms/three/index.cjs +35 -21
  63. package/dist/components/game/organisms/three/index.js +35 -21
  64. package/dist/components/game/templates/BattleTemplate.d.ts +2 -3
  65. package/dist/components/game/templates/CastleTemplate.d.ts +2 -3
  66. package/dist/components/game/templates/GameCanvas3DBattleTemplate.d.ts +1 -16
  67. package/dist/components/game/templates/GameCanvas3DCastleTemplate.d.ts +1 -18
  68. package/dist/components/game/templates/GameCanvas3DWorldMapTemplate.d.ts +1 -14
  69. package/dist/components/game/templates/GameTemplate.d.ts +1 -6
  70. package/dist/components/game/templates/WorldMapTemplate.d.ts +2 -3
  71. package/dist/components/index.cjs +2016 -1668
  72. package/dist/components/index.js +1128 -780
  73. package/dist/components/marketing/organisms/PricingOrganism.d.ts +4 -3
  74. package/dist/components/marketing/organisms/StatsOrganism.d.ts +4 -3
  75. package/dist/components/marketing/organisms/TeamOrganism.d.ts +4 -3
  76. package/dist/components/marketing/organisms/book/BookChapterView.d.ts +5 -2
  77. package/dist/components/marketing/organisms/book/BookTableOfContents.d.ts +3 -2
  78. package/dist/components/marketing/organisms/book/BookViewer.d.ts +4 -4
  79. package/dist/components/marketing/templates/AboutPageTemplate.d.ts +32 -6
  80. package/dist/components/marketing/templates/FeatureDetailPageTemplate.d.ts +14 -4
  81. package/dist/components/marketing/templates/LandingPageTemplate.d.ts +47 -9
  82. package/dist/components/marketing/templates/PricingPageTemplate.d.ts +23 -5
  83. package/dist/providers/index.cjs +912 -624
  84. package/dist/providers/index.js +912 -624
  85. package/dist/runtime/index.cjs +914 -626
  86. package/dist/runtime/index.js +914 -626
  87. package/package.json +2 -2
@@ -6,14 +6,7 @@
6
6
  * Composes DayCell and TimeSlotCell atoms into a 7-day grid.
7
7
  */
8
8
  import React from "react";
9
- import type { EventEmit, EventPayload, EntityCollection } from "@almadar/core";
10
- export type CalendarEvent = {
11
- id: string;
12
- title: string;
13
- startTime: string | Date;
14
- endTime?: string | Date;
15
- color?: string;
16
- };
9
+ import type { EventEmit, EventPayload, EntityRow, EntityWith } from "@almadar/core";
17
10
  /**
18
11
  * Number of day columns rendered at once. Matches the responsiveness-
19
12
  * audit tiers exactly: 1 day on mobile (≤640), 3 on tablet (641–1024),
@@ -26,13 +19,13 @@ export interface CalendarGridProps {
26
19
  /** Time slot labels (defaults to 09:00-17:00) */
27
20
  timeSlots?: string[];
28
21
  /** Events to display on the grid */
29
- events?: EntityCollection<CalendarEvent>;
22
+ events?: readonly EntityWith<'id' | 'title' | 'startTime'>[];
30
23
  /** Called when a time slot is clicked */
31
24
  onSlotClick?: (day: Date, time: string) => void;
32
25
  /** Called when a day header is clicked */
33
26
  onDayClick?: (day: Date) => void;
34
27
  /** Called when an event is clicked */
35
- onEventClick?: (event: CalendarEvent) => void;
28
+ onEventClick?: (event: EntityRow) => void;
36
29
  /** Additional CSS classes */
37
30
  className?: string;
38
31
  /** Event emitted on long-press of a time slot: UI:{longPressEvent} with { date, time, ...longPressPayload } */
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import React from 'react';
13
13
  import { type ContentSegment } from '../../../lib/parseContentSegments';
14
- import type { EntityDisplayProps } from '../organisms/types';
15
- export interface ContentRendererProps extends EntityDisplayProps {
14
+ import type { DisplayStateProps } from '../organisms/types';
15
+ export interface ContentRendererProps extends DisplayStateProps {
16
16
  /** Raw content string — auto-parsed into segments */
17
17
  content?: string;
18
18
  /** Pre-parsed segments (overrides content) */
@@ -11,7 +11,7 @@
11
11
  * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
12
12
  */
13
13
  import React from 'react';
14
- import type { EntityRow, EventKey, EntityCollection } from '@almadar/core';
14
+ import type { EntityRow, EventKey } from '@almadar/core';
15
15
  import { type DataDndProps } from './useDataDnd';
16
16
  import type { UiError } from '../atoms/types';
17
17
  export interface DataGridField {
@@ -47,22 +47,13 @@ export interface DataGridItemAction {
47
47
  /** Button variant */
48
48
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
49
49
  }
50
- export interface DataGridProps<T extends EntityRow = EntityRow> extends DataDndProps {
50
+ export interface DataGridProps extends DataDndProps {
51
51
  /**
52
- * Schema entity data — single record or collection, typed against
53
- * `@almadar/core`'s `EntityRow` so the narrow type declared on the
54
- * emitting trait's `Event { data : [X] }` flows through to the prop
55
- * without widening. The generic `T` lets consumers pass a narrower
56
- * entity (e.g. `CartItem`) and have the `children` render function
57
- * receive cards typed to that exact shape.
58
- *
59
- * Declared as the pattern's data INLET via `EntityCollection<T>` (the inlet
60
- * half of the circuit, symmetric with the `EventKey` outlet props below):
61
- * pattern-sync tags it `kind:"entity", cardinality:"collection"` so consumers
62
- * bind the domain entity without name-matching the prop. Structurally still
63
- * `T | readonly T[]` — see the brand's doc.
52
+ * Schema entity data — the collection of rows to render. pattern-sync tags
53
+ * it `kind:"entity", cardinality:"collection"` so consumers bind the domain
54
+ * entity without name-matching the prop.
64
55
  */
65
- entity: EntityCollection<T>;
56
+ entity: readonly EntityRow[];
66
57
  /**
67
58
  * Field definitions for rendering each card. The pattern contract in
68
59
  * `@almadar/patterns` documents `columns` as the wire-format alias the
@@ -101,16 +92,16 @@ export interface DataGridProps<T extends EntityRow = EntityRow> extends DataDndP
101
92
  loadMoreEvent?: EventKey;
102
93
  /** Whether more items are available for infinite scroll */
103
94
  hasMore?: boolean;
104
- /** Render prop for custom per-card content, typed to the grid's entity
105
- * shape `T`. When provided, `fields` and `itemActions` are ignored. */
106
- children?: (item: T, index: number) => React.ReactNode;
95
+ /** Render prop for custom per-card content. When provided, `fields` and
96
+ * `itemActions` are ignored. */
97
+ children?: (item: EntityRow, index: number) => React.ReactNode;
107
98
  /**
108
99
  * Per-item render function (schema-level alias for children render prop).
109
100
  * In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }]
110
101
  * The compiler converts this to the children render prop.
111
102
  * @deprecated Use children render prop in React code. This prop exists for pattern registry sync.
112
103
  */
113
- renderItem?: (item: T, index: number) => React.ReactNode;
104
+ renderItem?: (item: EntityRow, index: number) => React.ReactNode;
114
105
  /** Max items to show before "Show More" button. Defaults to 0 (disabled). */
115
106
  pageSize?: number;
116
107
  /**
@@ -119,7 +110,7 @@ export interface DataGridProps<T extends EntityRow = EntityRow> extends DataDndP
119
110
  */
120
111
  look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
121
112
  }
122
- export declare function DataGrid<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
113
+ export declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
123
114
  export declare namespace DataGrid {
124
115
  var displayName: string;
125
116
  }
@@ -11,7 +11,7 @@
11
11
  * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
12
12
  */
13
13
  import React from 'react';
14
- import type { EntityRow, EntityCollection, EventKey } from "@almadar/core";
14
+ import type { EntityRow, EventKey } from "@almadar/core";
15
15
  import { type DataDndProps } from './useDataDnd';
16
16
  import type { UiError } from '../atoms/types';
17
17
  export interface DataListField {
@@ -45,16 +45,11 @@ export interface DataListSwipeAction {
45
45
  /** Button variant */
46
46
  variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
47
47
  }
48
- export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndProps {
48
+ export interface DataListProps extends DataDndProps {
49
49
  /**
50
- * Schema entity data — single record or collection, typed against
51
- * `@almadar/core`'s `EntityRow` so the narrow type declared on the
52
- * emitting trait's `Event { data : [X] }` flows through to the prop
53
- * without widening. The generic `T` lets consumers pass a narrower
54
- * entity (e.g. `CartItem`) and have the `children` render function
55
- * receive items of that exact shape.
50
+ * Schema entity data — the collection of rows to render.
56
51
  */
57
- entity: EntityCollection<T>;
52
+ entity: readonly EntityRow[];
58
53
  /**
59
54
  * Field definitions for rendering each row. The pattern contract in
60
55
  * `@almadar/patterns` documents `columns` as the wire-format alias the
@@ -108,18 +103,17 @@ export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndP
108
103
  hasMore?: boolean;
109
104
  /** Render prop for custom per-item content. When provided, `fields` and `itemActions` are ignored. */
110
105
  /**
111
- * Render function for each row's content. Receives an item of the
112
- * component's entity type `T` (narrowed via the generic parameter)
113
- * and the row's index in the materialised array.
106
+ * Render function for each row's content. Receives a row and the row's
107
+ * index in the materialised array.
114
108
  */
115
- children?: (item: T, index: number) => React.ReactNode;
109
+ children?: (item: EntityRow, index: number) => React.ReactNode;
116
110
  /**
117
111
  * Per-item render function (schema-level alias for children render prop).
118
112
  * In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }]
119
113
  * The compiler converts this to the children render prop.
120
114
  * @deprecated Use children render prop in React code. This prop exists for pattern registry sync.
121
115
  */
122
- renderItem?: (item: T, index: number) => React.ReactNode;
116
+ renderItem?: (item: EntityRow, index: number) => React.ReactNode;
123
117
  /** Max items to show before "Show More" button. Defaults to 5. Set to 0 to disable. */
124
118
  pageSize?: number;
125
119
  /**
@@ -128,7 +122,7 @@ export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndP
128
122
  */
129
123
  look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
130
124
  }
131
- export declare function DataList<T extends EntityRow = EntityRow>({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, currentUser, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps<T>): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
125
+ export declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, currentUser, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
132
126
  export declare namespace DataList {
133
127
  var displayName: string;
134
128
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { EntityDisplayProps } from "../organisms/types";
3
- export interface FormSectionProps extends EntityDisplayProps {
2
+ import type { DisplayStateProps } from "../organisms/types";
3
+ export interface FormSectionProps extends DisplayStateProps {
4
4
  /** Section title */
5
5
  title?: string;
6
6
  /** Section description */
@@ -20,7 +20,7 @@ export declare const FormSection: React.FC<FormSectionProps>;
20
20
  /**
21
21
  * Form layout with multiple sections
22
22
  */
23
- export interface FormLayoutProps extends EntityDisplayProps {
23
+ export interface FormLayoutProps extends DisplayStateProps {
24
24
  children: React.ReactNode;
25
25
  /** Show section dividers */
26
26
  dividers?: boolean;
@@ -29,7 +29,7 @@ export declare const FormLayout: React.FC<FormLayoutProps>;
29
29
  /**
30
30
  * Form actions bar (submit/cancel buttons)
31
31
  */
32
- export interface FormActionsProps extends EntityDisplayProps {
32
+ export interface FormActionsProps extends DisplayStateProps {
33
33
  children: React.ReactNode;
34
34
  /** Sticky at bottom */
35
35
  sticky?: boolean;
@@ -1,26 +1,13 @@
1
1
  import React from "react";
2
- import type { EventEmit, EntityCollection } from "@almadar/core";
2
+ import type { EventEmit, EntityWith } from "@almadar/core";
3
3
  export type CanvasItemStatus = 'empty' | 'seated' | 'ordered' | 'awaiting-bill' | 'cleaning';
4
4
  export type CanvasItemShape = 'round' | 'rectangle' | 'square';
5
- export interface CanvasItem {
6
- id: string;
7
- label: string;
8
- x: number;
9
- y: number;
10
- shape?: CanvasItemShape;
11
- capacity: number;
12
- status?: CanvasItemStatus;
13
- partySize?: number;
14
- serverName?: string;
15
- }
16
5
  export interface PositionedCanvasProps {
17
6
  /**
18
- * Items to render. Accepts either a typed array (direct consumers) or the
19
- * runtime payload shape from a render-ui binding (`@payload.data`). The
20
- * molecule narrows non-array values to `[]` and validates element shape at
21
- * render time via the `id` / `x` / `y` guards.
7
+ * Items to render. The molecule narrows non-array values to `[]` and reads
8
+ * each row's `id` / `x` / `y` / `label` fields at render time.
22
9
  */
23
- items: EntityCollection<CanvasItem>;
10
+ items: readonly EntityWith<'id' | 'label' | 'x' | 'y'>[];
24
11
  width?: number;
25
12
  height?: number;
26
13
  selectedId?: string | null;
@@ -5,21 +5,10 @@
5
5
  * Composes the VoteStack molecule + Avatar/Typography/Button atoms.
6
6
  */
7
7
  import React from "react";
8
- import type { EventEmit, EntityCollection } from "@almadar/core";
8
+ import type { EventEmit, EntityWith } from "@almadar/core";
9
9
  import { type VoteValue } from "./VoteStack";
10
- export interface ReplyNode {
11
- id: string;
12
- authorName: string;
13
- authorAvatarUrl?: string;
14
- content: string;
15
- postedAt: string;
16
- voteCount?: number;
17
- userVote?: VoteValue;
18
- replies?: ReplyNode[];
19
- collapsed?: boolean;
20
- }
21
10
  export interface ReplyTreeProps {
22
- nodes: EntityCollection<ReplyNode>;
11
+ nodes: readonly EntityWith<'id' | 'authorName' | 'content'>[];
23
12
  maxDepth?: number;
24
13
  onVote?: (nodeId: string, vote: VoteValue) => void;
25
14
  onReply?: (parentNodeId: string) => void;
@@ -20,13 +20,10 @@ export interface RichBlock {
20
20
  }
21
21
  export interface RichBlockEditorProps {
22
22
  /**
23
- * Initial block payload. Accepts strongly-typed RichBlock[] from native
24
- * callers and the wider EntityRow[] shape that orb-bound traits emit
25
- * (orb `[object]` lowers to `Record<string, FieldValue | undefined>[]`,
26
- * which is structurally EntityRow[]). Items missing id/type are normalized
27
- * into paragraph blocks at mount.
23
+ * Initial block payload the rows that orb-bound traits emit. Items missing
24
+ * id/type are normalized into paragraph blocks at mount.
28
25
  */
29
- initialBlocks?: readonly RichBlock[] | readonly EntityRow[];
26
+ initialBlocks?: readonly EntityRow[];
30
27
  onChange?: (blocks: RichBlock[]) => void;
31
28
  changeEvent?: EventEmit<{
32
29
  blocks: RichBlock[];
@@ -6,13 +6,15 @@
6
6
  * Shows a drop indicator line at the target position during drag.
7
7
  */
8
8
  import React from 'react';
9
- import type { EntityCollection, EventKey, EventPayload, EventPayloadValue } from "@almadar/core";
10
- export interface SortableListProps<T extends EventPayloadValue = EventPayload> {
11
- items: EntityCollection<T>;
12
- renderItem: (item: T, index: number) => React.ReactNode;
9
+ import type { EntityRow, EventKey, EventPayload } from "@almadar/core";
10
+ export interface SortableListProps {
11
+ items: readonly EntityRow[];
12
+ renderItem: (item: EntityRow, index: number) => React.ReactNode;
13
13
  reorderEvent: EventKey;
14
14
  reorderPayload?: EventPayload;
15
15
  dragHandlePosition?: 'left' | 'right';
16
16
  className?: string;
17
17
  }
18
- export declare const SortableList: <T extends EventPayloadValue = EventPayload>(props: SortableListProps<T>) => React.ReactElement;
18
+ declare function SortableListInner({ items: initialItemsProp, renderItem, reorderEvent, reorderPayload, dragHandlePosition, className, }: SortableListProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare const SortableList: typeof SortableListInner;
20
+ export {};
@@ -12,7 +12,7 @@
12
12
  * Icon, Checkbox, Divider.
13
13
  */
14
14
  import React from 'react';
15
- import type { EntityRow, EventKey, EntityCollection } from '@almadar/core';
15
+ import type { EntityRow, EventKey } from '@almadar/core';
16
16
  import { type DataDndProps } from './useDataDnd';
17
17
  import type { UiError } from '../atoms/types';
18
18
  export interface TableViewColumn {
@@ -51,9 +51,9 @@ export interface TableViewItemAction {
51
51
  /** Button variant. */
52
52
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
53
53
  }
54
- export interface TableViewProps<T extends EntityRow = EntityRow> extends DataDndProps {
55
- /** Schema entity data — single record or collection. */
56
- entity: EntityCollection<T>;
54
+ export interface TableViewProps extends DataDndProps {
55
+ /** Schema entity data — the collection of rows to render. */
56
+ entity: readonly EntityRow[];
57
57
  /** Column definitions. The compiler emits `columns`; `fields` is the alias. */
58
58
  columns?: readonly TableViewColumn[];
59
59
  /** Alias for `columns`. */
@@ -91,20 +91,20 @@ export interface TableViewProps<T extends EntityRow = EntityRow> extends DataDnd
91
91
  * to this function (columns are ignored for the body; the header still
92
92
  * renders). Mirrors DataList's children render prop.
93
93
  */
94
- children?: (item: T, index: number) => React.ReactNode;
94
+ children?: (item: EntityRow, index: number) => React.ReactNode;
95
95
  /**
96
96
  * Per-row render function (schema alias). In .orb: ["fn","item",{...}].
97
97
  * The compiler converts this to the children render prop.
98
98
  * @deprecated Use children in React code; exists for pattern registry sync.
99
99
  */
100
- renderItem?: (item: T, index: number) => React.ReactNode;
100
+ renderItem?: (item: EntityRow, index: number) => React.ReactNode;
101
101
  /**
102
102
  * Layer 2 visual treatment — mirrors the data-list / entity-table look enum
103
103
  * so authors share one knob name across row renderers.
104
104
  */
105
105
  look?: 'dense' | 'spacious' | 'striped' | 'borderless' | 'bordered';
106
106
  }
107
- export declare function TableView<T extends EntityRow = EntityRow>({ entity, columns, fields, itemActions, maxInlineActions, selectable, selectEvent, selectedIds, sortEvent, sortColumn, sortDirection, className, emptyMessage, isLoading, error, groupBy, pageSize, children, renderItem: _schemaRenderItem, look, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, }: TableViewProps<T>): import("react/jsx-runtime").JSX.Element;
107
+ export declare function TableView({ entity, columns, fields, itemActions, maxInlineActions, selectable, selectEvent, selectedIds, sortEvent, sortColumn, sortDirection, className, emptyMessage, isLoading, error, groupBy, pageSize, children, renderItem: _schemaRenderItem, look, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, }: TableViewProps): import("react/jsx-runtime").JSX.Element;
108
108
  export declare namespace TableView {
109
109
  var displayName: string;
110
110
  }
@@ -36,7 +36,7 @@ export { MarkdownContent, type MarkdownContentProps } from './markdown/MarkdownC
36
36
  export { CodeBlock, type CodeBlockProps } from './markdown/CodeBlock';
37
37
  export { QuizBlock, type QuizBlockProps } from './QuizBlock';
38
38
  export { ScaledDiagram, type ScaledDiagramProps } from './ScaledDiagram';
39
- export { CalendarGrid, type CalendarGridProps, type CalendarEvent } from './CalendarGrid';
39
+ export { CalendarGrid, type CalendarGridProps } from './CalendarGrid';
40
40
  export { RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem } from './RepeatableFormSection';
41
41
  export { ViolationAlert, type ViolationAlertProps, type ViolationRecord } from './ViolationAlert';
42
42
  export { FormSectionHeader, type FormSectionHeaderProps } from './FormSectionHeader';
@@ -88,9 +88,9 @@ export { LikertScale, type LikertScaleProps, type LikertOption, DEFAULT_LIKERT_O
88
88
  export { MatrixQuestion, type MatrixQuestionProps, type MatrixRow, type MatrixColumn, DEFAULT_MATRIX_COLUMNS } from './MatrixQuestion';
89
89
  export { QrScanner, type QrScannerProps, type QrScanResult } from './QrScanner';
90
90
  export { OptionConstraintGroup, type OptionConstraintGroupProps, type OptionConstraintOption, type OptionConstraint } from './OptionConstraintGroup';
91
- export { PositionedCanvas, type PositionedCanvasProps, type CanvasItem, type CanvasItemStatus, type CanvasItemShape } from './PositionedCanvas';
91
+ export { PositionedCanvas, type PositionedCanvasProps, type CanvasItemStatus, type CanvasItemShape } from './PositionedCanvas';
92
92
  export { RichBlockEditor, type RichBlockEditorProps, type RichBlock, type BlockType } from './RichBlockEditor';
93
- export { ReplyTree, type ReplyTreeProps, type ReplyNode } from './ReplyTree';
93
+ export { ReplyTree, type ReplyTreeProps } from './ReplyTree';
94
94
  export { BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule } from './BranchingLogicBuilder';
95
95
  export { VersionDiff, type VersionDiffProps, type DiffRevision, type DiffLine as VersionDiffLine, type DiffLineType } from './VersionDiff';
96
96
  export { DocBreadcrumb, type DocBreadcrumbProps, type DocBreadcrumbItem } from './DocBreadcrumb';
@@ -44,11 +44,11 @@ export interface DataDndProps {
44
44
  */
45
45
  dndRoot?: boolean;
46
46
  }
47
- interface UseDataDndArgs<T extends EntityRow> extends DataDndProps {
48
- items: readonly T[];
47
+ interface UseDataDndArgs extends DataDndProps {
48
+ items: readonly EntityRow[];
49
49
  layout: 'list' | 'grid';
50
50
  }
51
- interface UseDataDndResult<T extends EntityRow> {
51
+ interface UseDataDndResult {
52
52
  enabled: boolean;
53
53
  /** True when this container is a sortable zone (own items are draggable). False in dndRoot-only mode. */
54
54
  isZone: boolean;
@@ -57,7 +57,7 @@ interface UseDataDndResult<T extends EntityRow> {
57
57
  id: UniqueIdentifier;
58
58
  children: React.ReactNode;
59
59
  }>;
60
- orderedItems: readonly T[];
60
+ orderedItems: readonly EntityRow[];
61
61
  }
62
- export declare function useDataDnd<T extends EntityRow>(args: UseDataDndArgs<T>): UseDataDndResult<T>;
62
+ export declare function useDataDnd(args: UseDataDndArgs): UseDataDndResult;
63
63
  export {};
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import React from 'react';
12
12
  import type { EventKey } from "@almadar/core";
13
- import type { EntityDisplayProps } from './types';
13
+ import type { DisplayStateProps } from './types';
14
+ import type { EntityRow } from '@almadar/core';
14
15
  export type CardGridGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
15
16
  /**
16
17
  * Action configuration for card items (schema-driven)
@@ -40,7 +41,9 @@ export type FieldDef = string | {
40
41
  name?: string;
41
42
  label?: string;
42
43
  };
43
- export interface CardGridProps extends EntityDisplayProps {
44
+ export interface CardGridProps extends DisplayStateProps {
45
+ /** Entity data (single record or collection). */
46
+ entity?: EntityRow | readonly EntityRow[];
44
47
  /** Minimum width of each card (default: 280px) */
45
48
  minCardWidth?: number;
46
49
  /** Maximum number of columns */
@@ -10,9 +10,10 @@
10
10
  * - Never listens to events
11
11
  */
12
12
  import React from 'react';
13
- import type { EntityDisplayProps } from './types';
14
- import type { CaseStudyEntity } from './marketing-types';
15
- export interface CaseStudyOrganismProps extends EntityDisplayProps<CaseStudyEntity> {
13
+ import type { EntityWith } from '@almadar/core';
14
+ import type { DisplayStateProps } from './types';
15
+ export interface CaseStudyOrganismProps extends DisplayStateProps {
16
+ entity?: EntityWith<'title'> | readonly EntityWith<'title'>[];
16
17
  heading?: string;
17
18
  subtitle?: string;
18
19
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { EventKey } from "@almadar/core";
3
3
  import { LucideIcon } from "lucide-react";
4
- import { EntityDisplayProps } from "./types";
4
+ import { DisplayStateProps } from "./types";
5
5
  import type { EntityRow } from "@almadar/core";
6
6
  export type EntityTableLook = "dense" | "spacious" | "striped" | "borderless" | "card-rows";
7
7
  export interface Column<T> {
@@ -29,7 +29,9 @@ export interface DataTableEmptyAction {
29
29
  }
30
30
  export interface DataTableProps<T extends EntityRow & {
31
31
  id: string | number;
32
- }> extends EntityDisplayProps<T> {
32
+ }> extends DisplayStateProps {
33
+ /** Entity rows to display (collection cardinality). */
34
+ entity?: readonly EntityRow[];
33
35
  /** Fields to display - accepts string[] or Column[] for unified interface. Alias for columns */
34
36
  fields: readonly Column<T>[] | readonly string[];
35
37
  /** Columns can be Column objects or simple string field names */
@@ -4,12 +4,12 @@
4
4
  * Composes atoms and molecules to create a professional detail view.
5
5
  *
6
6
  * Data is provided by the runtime via the `entity` prop.
7
- * See EntityDisplayProps in ./types.ts for base prop contract.
7
+ * Extends DisplayStateProps (see ./types.ts) and declares `entity?: EntityRow`.
8
8
  */
9
9
  import React from "react";
10
- import type { EntityRecord, EntityRow } from "@almadar/core";
10
+ import type { EntityRow } from "@almadar/core";
11
11
  import type { LucideIcon } from "lucide-react";
12
- import type { EntityDisplayProps } from "./types";
12
+ import type { DisplayStateProps } from "./types";
13
13
  export interface DetailField {
14
14
  label: string;
15
15
  value: React.ReactNode;
@@ -48,9 +48,9 @@ export interface DetailPanelStatus {
48
48
  label: string;
49
49
  variant?: "default" | "success" | "warning" | "danger" | "info";
50
50
  }
51
- export interface DetailPanelProps extends EntityDisplayProps {
52
- /** RECORD-cardinality override: renders ONE record (see body collapse below). */
53
- entity?: EntityRecord<EntityRow>;
51
+ export interface DetailPanelProps extends DisplayStateProps {
52
+ /** RECORD-cardinality: renders ONE record (see body collapse below). */
53
+ entity?: EntityRow;
54
54
  title?: string;
55
55
  subtitle?: string;
56
56
  status?: DetailPanelStatus;
@@ -10,9 +10,10 @@
10
10
  * - Never listens to events
11
11
  */
12
12
  import React from 'react';
13
- import type { EntityDisplayProps } from './types';
14
- import type { FeatureEntity } from './marketing-types';
15
- export interface FeatureGridOrganismProps extends EntityDisplayProps<FeatureEntity> {
13
+ import type { EntityWith } from '@almadar/core';
14
+ import type { DisplayStateProps } from './types';
15
+ export interface FeatureGridOrganismProps extends DisplayStateProps {
16
+ entity?: EntityWith<'title'> | readonly EntityWith<'title'>[];
16
17
  columns?: 2 | 3 | 4 | 6;
17
18
  heading?: string;
18
19
  subtitle?: string;
@@ -10,11 +10,10 @@
10
10
  * - Never listens to events
11
11
  */
12
12
  import React from 'react';
13
- import type { EntityRecord } from '@almadar/core';
14
- import type { EntityDisplayProps } from './types';
15
- import type { HeroEntity } from './marketing-types';
16
- export interface HeroOrganismProps extends EntityDisplayProps<HeroEntity> {
17
- entity?: EntityRecord<HeroEntity>;
13
+ import type { EntityWith } from '@almadar/core';
14
+ import type { DisplayStateProps } from './types';
15
+ export interface HeroOrganismProps extends DisplayStateProps {
16
+ entity?: EntityWith<'title'>;
18
17
  children?: React.ReactNode;
19
18
  }
20
19
  export declare const HeroOrganism: React.FC<HeroOrganismProps>;
@@ -20,7 +20,8 @@ import React from "react";
20
20
  import type { EventKey } from "@almadar/core";
21
21
  import type { LucideIcon } from "lucide-react";
22
22
  import { type MenuItem } from "../molecules/Menu";
23
- import type { EntityDisplayProps } from "./types";
23
+ import type { DisplayStateProps } from "./types";
24
+ import type { EntityRow } from "@almadar/core";
24
25
  export type ListItem = {
25
26
  id: string;
26
27
  title?: string;
@@ -61,7 +62,9 @@ export type FieldDef = string | {
61
62
  name?: string;
62
63
  label?: string;
63
64
  };
64
- export interface ListProps extends EntityDisplayProps {
65
+ export interface ListProps extends DisplayStateProps {
66
+ /** Entity data (single record or collection). */
67
+ entity?: EntityRow | readonly EntityRow[];
65
68
  /** Entity type name for display */
66
69
  entityType?: string;
67
70
  selectable?: boolean;
@@ -9,13 +9,15 @@
9
9
  * to a sidebar or detail panel when an item is selected.
10
10
  */
11
11
  import React from 'react';
12
- import type { EntityDisplayProps } from './types';
12
+ import type { DisplayStateProps } from './types';
13
13
  import type { EntityRow } from '@almadar/core';
14
14
  export interface MasterDetailProps<T extends EntityRow & {
15
15
  id: string | number;
16
16
  } = EntityRow & {
17
17
  id: string | number;
18
- }> extends EntityDisplayProps<T> {
18
+ }> extends DisplayStateProps {
19
+ /** Entity rows to display in the master list (collection cardinality). */
20
+ entity?: readonly EntityRow[];
19
21
  /** Fields to show in the master list (maps to DataTable columns) */
20
22
  masterFields: readonly string[];
21
23
  /** Fields for detail view (passed through but typically handled by separate render_ui) */
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import React from "react";
14
14
  import type { EventEmit } from "@almadar/core";
15
- import type { EntityDisplayProps } from "./types";
15
+ import type { DisplayStateProps } from "./types";
16
16
  import type { EntityRow } from "@almadar/core";
17
17
  export type MediaItem = EntityRow & {
18
18
  /** Unique identifier */
@@ -36,7 +36,9 @@ export interface MediaGalleryAction {
36
36
  navigatesTo?: string;
37
37
  variant?: "primary" | "secondary" | "ghost";
38
38
  }
39
- export interface MediaGalleryProps extends EntityDisplayProps<EntityRow> {
39
+ export interface MediaGalleryProps extends DisplayStateProps {
40
+ /** Entity rows to display (collection cardinality). */
41
+ entity?: readonly EntityRow[];
40
42
  /** Gallery title */
41
43
  title?: string;
42
44
  /** Media items */
@@ -10,9 +10,10 @@
10
10
  * - Never listens to events
11
11
  */
12
12
  import React from 'react';
13
- import type { EntityDisplayProps } from './types';
14
- import type { ShowcaseEntity } from './marketing-types';
15
- export interface ShowcaseOrganismProps extends EntityDisplayProps<ShowcaseEntity> {
13
+ import type { EntityWith } from '@almadar/core';
14
+ import type { DisplayStateProps } from './types';
15
+ export interface ShowcaseOrganismProps extends DisplayStateProps {
16
+ entity?: EntityWith<'title'> | readonly EntityWith<'title'>[];
16
17
  columns?: 2 | 3 | 4;
17
18
  heading?: string;
18
19
  subtitle?: string;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { LucideIcon } from "lucide-react";
3
- import type { EntityDisplayProps } from "./types";
3
+ import type { DisplayStateProps } from "./types";
4
+ import type { EntityRow } from "@almadar/core";
4
5
  /**
5
6
  * Schema metric definition
6
7
  * Supports both computed metrics (with field) and static metrics (with value)
@@ -17,7 +18,9 @@ export interface MetricDefinition {
17
18
  /** Value format (e.g., 'currency', 'percent', 'number') */
18
19
  format?: "currency" | "percent" | "number" | string;
19
20
  }
20
- export interface StatCardProps extends EntityDisplayProps {
21
+ export interface StatCardProps extends DisplayStateProps {
22
+ /** Entity data (single record or collection) used to compute metrics. */
23
+ entity?: EntityRow | readonly EntityRow[];
21
24
  /** Main label */
22
25
  label?: string;
23
26
  /** Title (alias for label) */
@@ -9,9 +9,10 @@
9
9
  * - No events (display-only)
10
10
  */
11
11
  import React from 'react';
12
- import type { EntityDisplayProps } from './types';
13
- import type { StepEntity } from './marketing-types';
14
- export interface StepFlowOrganismProps extends EntityDisplayProps<StepEntity> {
12
+ import type { EntityWith } from '@almadar/core';
13
+ import type { DisplayStateProps } from './types';
14
+ export interface StepFlowOrganismProps extends DisplayStateProps {
15
+ entity?: EntityWith<'title'> | readonly EntityWith<'title'>[];
15
16
  orientation?: 'horizontal' | 'vertical';
16
17
  showConnectors?: boolean;
17
18
  heading?: string;