@almadar/ui 5.21.12 → 5.22.2
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/avl/index.cjs +919 -631
- package/dist/avl/index.js +919 -631
- package/dist/components/core/molecules/CalendarGrid.d.ts +3 -10
- package/dist/components/core/molecules/ContentRenderer.d.ts +2 -2
- package/dist/components/core/molecules/DataGrid.d.ts +11 -20
- package/dist/components/core/molecules/DataList.d.ts +9 -15
- package/dist/components/core/molecules/FormSection.d.ts +4 -4
- package/dist/components/core/molecules/PositionedCanvas.d.ts +4 -17
- package/dist/components/core/molecules/ReplyTree.d.ts +2 -13
- package/dist/components/core/molecules/RichBlockEditor.d.ts +3 -6
- package/dist/components/core/molecules/SortableList.d.ts +7 -5
- package/dist/components/core/molecules/TableView.d.ts +7 -7
- package/dist/components/core/molecules/index.d.ts +3 -3
- package/dist/components/core/molecules/useDataDnd.d.ts +5 -5
- package/dist/components/core/organisms/CardGrid.d.ts +5 -2
- package/dist/components/core/organisms/CaseStudyOrganism.d.ts +4 -3
- package/dist/components/core/organisms/DataTable.d.ts +4 -2
- package/dist/components/core/organisms/DetailPanel.d.ts +6 -6
- package/dist/components/core/organisms/FeatureGridOrganism.d.ts +4 -3
- package/dist/components/core/organisms/HeroOrganism.d.ts +4 -5
- package/dist/components/core/organisms/List.d.ts +5 -2
- package/dist/components/core/organisms/MasterDetail.d.ts +4 -2
- package/dist/components/core/organisms/MediaGallery.d.ts +4 -2
- package/dist/components/core/organisms/ShowcaseOrganism.d.ts +4 -3
- package/dist/components/core/organisms/StatCard.d.ts +5 -2
- package/dist/components/core/organisms/StepFlowOrganism.d.ts +4 -3
- package/dist/components/core/organisms/Timeline.d.ts +2 -2
- package/dist/components/core/organisms/book/index.d.ts +1 -1
- package/dist/components/core/organisms/book/types.d.ts +28 -48
- package/dist/components/core/organisms/index.d.ts +1 -2
- package/dist/components/core/organisms/layout/DashboardGrid.d.ts +2 -2
- package/dist/components/core/organisms/marketing-types.d.ts +5 -94
- package/dist/components/core/organisms/types.d.ts +9 -27
- package/dist/components/core/templates/index.d.ts +6 -6
- package/dist/components/game/organisms/BattleBoard.d.ts +14 -90
- package/dist/components/game/organisms/CastleBoard.d.ts +7 -21
- package/dist/components/game/organisms/UncontrolledBattleBoard.d.ts +2 -7
- package/dist/components/game/organisms/WorldMapBoard.d.ts +13 -59
- package/dist/components/game/organisms/boardEntity.d.ts +44 -0
- package/dist/components/game/organisms/hooks/useBattleState.d.ts +7 -7
- package/dist/components/game/organisms/index.d.ts +3 -3
- package/dist/components/game/organisms/puzzles/builder/BuilderBoard.d.ts +7 -20
- package/dist/components/game/organisms/puzzles/builder/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/classifier/ClassifierBoard.d.ts +7 -20
- package/dist/components/game/organisms/puzzles/classifier/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +6 -22
- package/dist/components/game/organisms/puzzles/debugger/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/event-handler/EventHandlerBoard.d.ts +6 -33
- package/dist/components/game/organisms/puzzles/event-handler/ObjectRulePanel.d.ts +3 -21
- package/dist/components/game/organisms/puzzles/event-handler/index.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -0
- package/dist/components/game/organisms/puzzles/negotiator/NegotiatorBoard.d.ts +8 -24
- package/dist/components/game/organisms/puzzles/negotiator/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/sequencer/ActionTile.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/sequencer/SequencerBoard.d.ts +7 -36
- package/dist/components/game/organisms/puzzles/sequencer/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/simulator/SimulatorBoard.d.ts +6 -25
- package/dist/components/game/organisms/puzzles/simulator/index.d.ts +1 -1
- package/dist/components/game/organisms/puzzles/state-architect/StateArchitectBoard.d.ts +7 -40
- package/dist/components/game/organisms/puzzles/state-architect/VariablePanel.d.ts +3 -9
- package/dist/components/game/organisms/puzzles/state-architect/index.d.ts +2 -2
- package/dist/components/game/organisms/three/index.cjs +35 -21
- package/dist/components/game/organisms/three/index.js +35 -21
- package/dist/components/game/templates/BattleTemplate.d.ts +2 -3
- package/dist/components/game/templates/CastleTemplate.d.ts +2 -3
- package/dist/components/game/templates/GameCanvas3DBattleTemplate.d.ts +1 -16
- package/dist/components/game/templates/GameCanvas3DCastleTemplate.d.ts +1 -18
- package/dist/components/game/templates/GameCanvas3DWorldMapTemplate.d.ts +1 -14
- package/dist/components/game/templates/GameTemplate.d.ts +1 -6
- package/dist/components/game/templates/WorldMapTemplate.d.ts +2 -3
- package/dist/components/index.cjs +2016 -1668
- package/dist/components/index.js +1128 -780
- package/dist/components/marketing/organisms/PricingOrganism.d.ts +4 -3
- package/dist/components/marketing/organisms/StatsOrganism.d.ts +4 -3
- package/dist/components/marketing/organisms/TeamOrganism.d.ts +4 -3
- package/dist/components/marketing/organisms/book/BookChapterView.d.ts +5 -2
- package/dist/components/marketing/organisms/book/BookTableOfContents.d.ts +3 -2
- package/dist/components/marketing/organisms/book/BookViewer.d.ts +4 -4
- package/dist/components/marketing/templates/AboutPageTemplate.d.ts +32 -6
- package/dist/components/marketing/templates/FeatureDetailPageTemplate.d.ts +14 -4
- package/dist/components/marketing/templates/LandingPageTemplate.d.ts +47 -9
- package/dist/components/marketing/templates/PricingPageTemplate.d.ts +23 -5
- package/dist/providers/index.cjs +912 -624
- package/dist/providers/index.js +912 -624
- package/dist/runtime/index.cjs +914 -626
- package/dist/runtime/index.js +914 -626
- 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,
|
|
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?:
|
|
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:
|
|
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 {
|
|
15
|
-
export interface ContentRendererProps extends
|
|
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
|
|
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
|
|
50
|
+
export interface DataGridProps extends DataDndProps {
|
|
51
51
|
/**
|
|
52
|
-
* Schema entity data —
|
|
53
|
-
*
|
|
54
|
-
*
|
|
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:
|
|
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
|
|
105
|
-
*
|
|
106
|
-
children?: (item:
|
|
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:
|
|
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
|
|
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,
|
|
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
|
|
48
|
+
export interface DataListProps extends DataDndProps {
|
|
49
49
|
/**
|
|
50
|
-
* Schema entity data —
|
|
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:
|
|
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
|
|
112
|
-
*
|
|
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:
|
|
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:
|
|
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
|
|
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 {
|
|
3
|
-
export interface FormSectionProps extends
|
|
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
|
|
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
|
|
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,
|
|
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.
|
|
19
|
-
*
|
|
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:
|
|
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,
|
|
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:
|
|
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
|
|
24
|
-
*
|
|
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
|
|
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 {
|
|
10
|
-
export interface SortableListProps
|
|
11
|
-
items:
|
|
12
|
-
renderItem: (item:
|
|
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
|
-
|
|
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
|
|
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
|
|
55
|
-
/** Schema entity data —
|
|
56
|
-
entity:
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
48
|
-
items: readonly
|
|
47
|
+
interface UseDataDndArgs extends DataDndProps {
|
|
48
|
+
items: readonly EntityRow[];
|
|
49
49
|
layout: 'list' | 'grid';
|
|
50
50
|
}
|
|
51
|
-
interface UseDataDndResult
|
|
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
|
|
60
|
+
orderedItems: readonly EntityRow[];
|
|
61
61
|
}
|
|
62
|
-
export declare function useDataDnd
|
|
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 {
|
|
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
|
|
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 {
|
|
14
|
-
import type {
|
|
15
|
-
export interface CaseStudyOrganismProps extends
|
|
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 {
|
|
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
|
|
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
|
-
*
|
|
7
|
+
* Extends DisplayStateProps (see ./types.ts) and declares `entity?: EntityRow`.
|
|
8
8
|
*/
|
|
9
9
|
import React from "react";
|
|
10
|
-
import type {
|
|
10
|
+
import type { EntityRow } from "@almadar/core";
|
|
11
11
|
import type { LucideIcon } from "lucide-react";
|
|
12
|
-
import type {
|
|
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
|
|
52
|
-
/** RECORD-cardinality
|
|
53
|
-
entity?:
|
|
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 {
|
|
14
|
-
import type {
|
|
15
|
-
export interface FeatureGridOrganismProps extends
|
|
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 {
|
|
14
|
-
import type {
|
|
15
|
-
|
|
16
|
-
|
|
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 {
|
|
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
|
|
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 {
|
|
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
|
|
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 {
|
|
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
|
|
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 {
|
|
14
|
-
import type {
|
|
15
|
-
export interface ShowcaseOrganismProps extends
|
|
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 {
|
|
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
|
|
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 {
|
|
13
|
-
import type {
|
|
14
|
-
export interface StepFlowOrganismProps extends
|
|
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;
|