@almadar/ui 5.70.0 → 5.72.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/avl/index.cjs +2198 -2218
- package/dist/avl/index.d.cts +93 -56
- package/dist/avl/index.js +931 -951
- package/dist/components/avl/molecules/AvlEventWireEdge.d.ts +2 -1
- package/dist/components/avl/molecules/AvlTransitionEdge.d.ts +2 -1
- package/dist/components/avl/molecules/avl-behavior-compose-converter.d.ts +7 -5
- package/dist/components/avl/molecules/avl-behavior-compose-types.d.ts +41 -21
- package/dist/components/avl/molecules/avl-canvas-types.d.ts +10 -7
- package/dist/components/avl/molecules/avl-preview-converter.d.ts +5 -5
- package/dist/components/avl/molecules/avl-preview-types.d.ts +15 -4
- package/dist/components/avl/organisms/FlowCanvas.d.ts +2 -2
- package/dist/components/avl/organisms/avl-schema-parser.d.ts +18 -16
- package/dist/components/core/atoms/Button.d.ts +2 -0
- package/dist/components/core/atoms/ConditionalWrapper.d.ts +5 -4
- package/dist/components/core/molecules/Carousel.d.ts +2 -2
- package/dist/components/core/molecules/OrbitalVisualization.d.ts +4 -3
- package/dist/components/core/molecules/PageHeader.d.ts +3 -3
- package/dist/components/core/molecules/RepeatableFormSection.d.ts +4 -3
- package/dist/components/core/molecules/ViolationAlert.d.ts +2 -0
- package/dist/components/core/molecules/WizardContainer.d.ts +23 -22
- package/dist/components/core/organisms/CardGrid.d.ts +2 -2
- package/dist/components/core/organisms/CustomPattern.d.ts +3 -4
- package/dist/components/core/organisms/DataTable.d.ts +2 -2
- package/dist/components/core/organisms/DetailPanel.d.ts +1 -1
- package/dist/components/core/organisms/Form.d.ts +11 -11
- package/dist/components/core/organisms/List.d.ts +3 -5
- package/dist/components/core/organisms/StatCard.d.ts +2 -2
- package/dist/components/core/organisms/book/types.d.ts +1 -1
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
- package/dist/components/core/organisms/layout/DashboardGrid.d.ts +0 -2
- package/dist/components/core/organisms/types.d.ts +3 -2
- package/dist/components/game/atoms/ScoreDisplay.d.ts +3 -3
- package/dist/components/game/atoms/Sprite.d.ts +6 -1
- package/dist/components/game/atoms/XPBar.d.ts +1 -1
- package/dist/components/game/molecules/GameCanvas3D.d.ts +0 -2
- package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -2
- package/dist/components/game/molecules/PlatformerCanvas.d.ts +4 -1
- package/dist/components/game/molecules/StatBadge.d.ts +3 -1
- package/dist/components/game/molecules/three/hooks/useSceneGraph.d.ts +2 -1
- package/dist/components/game/molecules/three/index.cjs +41 -105
- package/dist/components/game/molecules/three/index.js +41 -105
- package/dist/components/game/molecules/useUnitSpriteAtlas.d.ts +3 -2
- package/dist/components/game/organisms/PinballBoard.d.ts +4 -4
- package/dist/components/game/organisms/boardEntity.d.ts +6 -6
- package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +16 -2
- package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -10
- package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +2 -1
- package/dist/components/game/organisms/types/isometric.d.ts +16 -0
- package/dist/components/index.cjs +2228 -2251
- package/dist/components/index.js +1116 -1139
- package/dist/docs/index.cjs +107 -104
- package/dist/docs/index.d.cts +2 -0
- package/dist/docs/index.js +38 -35
- package/dist/lib/getNestedValue.d.ts +2 -13
- package/dist/marketing/index.cjs +97 -98
- package/dist/marketing/index.d.cts +2 -0
- package/dist/marketing/index.js +54 -55
- package/dist/providers/index.cjs +1908 -1951
- package/dist/providers/index.js +808 -851
- package/dist/runtime/index.cjs +1966 -2009
- package/dist/runtime/index.js +814 -857
- package/package.json +1 -1
package/dist/avl/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { JsonObject, JsonValue, OrbitalSchema, Expression, UISlot, EntityData, EditFocus, EventPayload, ThemeDefinition } from '@almadar/core';
|
|
4
4
|
import { Node, Edge, NodeProps, EdgeProps } from '@xyflow/react';
|
|
5
|
+
import { AnyPatternConfig } from '@almadar/patterns';
|
|
5
6
|
import { useDraggable } from '@dnd-kit/core';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -454,6 +455,10 @@ declare function curveControlPoint(x1: number, y1: number, x2: number, y2: numbe
|
|
|
454
455
|
* @packageDocumentation
|
|
455
456
|
*/
|
|
456
457
|
|
|
458
|
+
interface SerializedEffect extends JsonObject {
|
|
459
|
+
type: string;
|
|
460
|
+
args: JsonValue[];
|
|
461
|
+
}
|
|
457
462
|
interface ApplicationOrbitalData {
|
|
458
463
|
name: string;
|
|
459
464
|
entityName: string;
|
|
@@ -477,13 +482,13 @@ interface ApplicationLevelData {
|
|
|
477
482
|
orbitals: ApplicationOrbitalData[];
|
|
478
483
|
crossLinks: CrossLink[];
|
|
479
484
|
}
|
|
480
|
-
interface FieldInfo {
|
|
485
|
+
interface FieldInfo extends JsonObject {
|
|
481
486
|
name: string;
|
|
482
487
|
type: string;
|
|
483
488
|
required: boolean;
|
|
484
489
|
hasDefault: boolean;
|
|
485
490
|
}
|
|
486
|
-
interface OrbitalTraitInfo {
|
|
491
|
+
interface OrbitalTraitInfo extends JsonObject {
|
|
487
492
|
name: string;
|
|
488
493
|
stateCount: number;
|
|
489
494
|
eventCount: number;
|
|
@@ -491,14 +496,14 @@ interface OrbitalTraitInfo {
|
|
|
491
496
|
emits: string[];
|
|
492
497
|
listens: string[];
|
|
493
498
|
}
|
|
494
|
-
interface OrbitalPageInfo {
|
|
499
|
+
interface OrbitalPageInfo extends JsonObject {
|
|
495
500
|
name: string;
|
|
496
501
|
route: string;
|
|
497
502
|
}
|
|
498
|
-
interface ExternalLink {
|
|
503
|
+
interface ExternalLink extends JsonObject {
|
|
499
504
|
targetOrbital: string;
|
|
500
505
|
eventName: string;
|
|
501
|
-
direction:
|
|
506
|
+
direction: string;
|
|
502
507
|
traitName: string;
|
|
503
508
|
}
|
|
504
509
|
interface OrbitalLevelData {
|
|
@@ -512,23 +517,20 @@ interface OrbitalLevelData {
|
|
|
512
517
|
pages: OrbitalPageInfo[];
|
|
513
518
|
externalLinks: ExternalLink[];
|
|
514
519
|
}
|
|
515
|
-
interface TraitStateInfo {
|
|
520
|
+
interface TraitStateInfo extends JsonObject {
|
|
516
521
|
name: string;
|
|
517
|
-
isInitial
|
|
518
|
-
isTerminal
|
|
522
|
+
isInitial: boolean | null;
|
|
523
|
+
isTerminal: boolean | null;
|
|
519
524
|
}
|
|
520
|
-
interface TraitTransitionInfo {
|
|
525
|
+
interface TraitTransitionInfo extends JsonObject {
|
|
521
526
|
from: string;
|
|
522
527
|
to: string;
|
|
523
528
|
event: string;
|
|
524
|
-
guard
|
|
525
|
-
effects:
|
|
526
|
-
type: string;
|
|
527
|
-
args: unknown[];
|
|
528
|
-
}>;
|
|
529
|
+
guard: JsonValue | null;
|
|
530
|
+
effects: SerializedEffect[];
|
|
529
531
|
index: number;
|
|
530
532
|
}
|
|
531
|
-
interface TraitLevelData {
|
|
533
|
+
interface TraitLevelData extends JsonObject {
|
|
532
534
|
name: string;
|
|
533
535
|
linkedEntity: string;
|
|
534
536
|
states: TraitStateInfo[];
|
|
@@ -587,24 +589,24 @@ declare const ZOOM_BAND_THRESHOLDS: {
|
|
|
587
589
|
readonly detail: readonly [2.5, 5];
|
|
588
590
|
};
|
|
589
591
|
/** Data carried by every orbital node in the unified canvas. */
|
|
590
|
-
interface AvlNodeData extends
|
|
592
|
+
interface AvlNodeData extends JsonObject {
|
|
591
593
|
orbitalName: string;
|
|
592
594
|
entityName: string;
|
|
593
595
|
persistence: string;
|
|
594
596
|
fields: FieldInfo[];
|
|
595
597
|
traits: OrbitalTraitInfo[];
|
|
596
598
|
pages: OrbitalPageInfo[];
|
|
597
|
-
traitDetails:
|
|
599
|
+
traitDetails: {
|
|
600
|
+
[k: string]: TraitLevelData;
|
|
601
|
+
};
|
|
598
602
|
externalLinks: ExternalLink[];
|
|
599
603
|
}
|
|
600
|
-
/** Edge kind determines visual style. */
|
|
601
|
-
type AvlEdgeKind = 'eventWire' | 'page';
|
|
602
604
|
/** Data carried by edges in the unified canvas. */
|
|
603
|
-
interface AvlEdgeData extends
|
|
604
|
-
edgeKind:
|
|
605
|
-
event
|
|
606
|
-
fromTrait
|
|
607
|
-
toTrait
|
|
605
|
+
interface AvlEdgeData extends JsonObject {
|
|
606
|
+
edgeKind: string;
|
|
607
|
+
event: string | null;
|
|
608
|
+
fromTrait: string | null;
|
|
609
|
+
toTrait: string | null;
|
|
608
610
|
}
|
|
609
611
|
|
|
610
612
|
/** Determine which zoom band the current viewport zoom falls into. */
|
|
@@ -781,7 +783,8 @@ declare const AvlOrbitalNode: React__default.FC<NodeProps>;
|
|
|
781
783
|
* backward transitions are dashed lighter.
|
|
782
784
|
*/
|
|
783
785
|
|
|
784
|
-
interface AvlTransitionEdgeData
|
|
786
|
+
interface AvlTransitionEdgeData {
|
|
787
|
+
[key: string]: string | boolean | undefined;
|
|
785
788
|
event: string;
|
|
786
789
|
hasGuard?: boolean;
|
|
787
790
|
hasEffects?: boolean;
|
|
@@ -796,7 +799,8 @@ declare const AvlTransitionEdge: React__default.FC<EdgeProps<AvlTransitionFlowEd
|
|
|
796
799
|
* Uses AVL CONNECTION_COLORS.emitListen styling.
|
|
797
800
|
*/
|
|
798
801
|
|
|
799
|
-
interface AvlEventWireEdgeData
|
|
802
|
+
interface AvlEventWireEdgeData {
|
|
803
|
+
[key: string]: string | boolean | undefined;
|
|
800
804
|
event: string;
|
|
801
805
|
compatible?: boolean;
|
|
802
806
|
}
|
|
@@ -900,10 +904,15 @@ interface PatternEventSource {
|
|
|
900
904
|
/** A slot + pattern config pair extracted from a render-ui effect. */
|
|
901
905
|
interface RenderUIEntry {
|
|
902
906
|
slot: UISlot | string;
|
|
903
|
-
pattern:
|
|
907
|
+
pattern: AnyPatternConfig;
|
|
904
908
|
}
|
|
905
909
|
/** Data for a preview node (used at both overview and expanded levels). */
|
|
906
|
-
interface PreviewNodeData
|
|
910
|
+
interface PreviewNodeData {
|
|
911
|
+
[key: string]: string | number | boolean | string[] | Expression | null | RenderUIEntry[] | PatternEventSource[] | Array<{
|
|
912
|
+
event: string;
|
|
913
|
+
fromState: string;
|
|
914
|
+
toState: string;
|
|
915
|
+
}> | OrbitalSchema | EntityData | undefined;
|
|
907
916
|
/** Orbital this node belongs to. */
|
|
908
917
|
orbitalName: string;
|
|
909
918
|
/** Trait name (only at expanded level). */
|
|
@@ -1018,9 +1027,14 @@ interface PreviewNodeData extends Record<string, unknown> {
|
|
|
1018
1027
|
* trait operates on. Mirrors `Trait.linkedEntity` from the resolved schema.
|
|
1019
1028
|
*/
|
|
1020
1029
|
linkedEntity?: string;
|
|
1030
|
+
/** Full parsed schema threaded to node renderers (e.g. TraitCardNode). */
|
|
1031
|
+
_fullSchema?: OrbitalSchema;
|
|
1032
|
+
/** Mock entity data for the orbital preview. */
|
|
1033
|
+
_mockData?: EntityData;
|
|
1021
1034
|
}
|
|
1022
1035
|
/** Data for event flow edges. */
|
|
1023
|
-
interface EventEdgeData
|
|
1036
|
+
interface EventEdgeData {
|
|
1037
|
+
[key: string]: string | boolean | undefined;
|
|
1024
1038
|
/** The event name displayed on the edge. */
|
|
1025
1039
|
event: string;
|
|
1026
1040
|
/** Source state name (expanded level). */
|
|
@@ -1063,7 +1077,7 @@ interface EventEdgeData extends Record<string, unknown> {
|
|
|
1063
1077
|
* Build a React Flow graph for the overview level.
|
|
1064
1078
|
* Each orbital gets one node showing its INIT transition's UI.
|
|
1065
1079
|
*/
|
|
1066
|
-
declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?:
|
|
1080
|
+
declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?: EntityData, behaviorMeta?: Record<string, {
|
|
1067
1081
|
layer: string;
|
|
1068
1082
|
}>, layoutHint?: 'pipeline' | 'grid', orbitalStatus?: Record<string, PreviewNodeData['status']>, screenSize?: ScreenSize): {
|
|
1069
1083
|
nodes: Node<PreviewNodeData>[];
|
|
@@ -1080,7 +1094,7 @@ declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?: Record<
|
|
|
1080
1094
|
* anonymous `INIT` peers (STUDIO-1). Drill into a grouped card to reach
|
|
1081
1095
|
* L3 (`orbitalAliasToExpandedGraph`).
|
|
1082
1096
|
*/
|
|
1083
|
-
declare function orbitalToExpandedGraph(schema: OrbitalSchema, orbitalName: string, mockData?:
|
|
1097
|
+
declare function orbitalToExpandedGraph(schema: OrbitalSchema, orbitalName: string, mockData?: EntityData, screenSize?: ScreenSize): {
|
|
1084
1098
|
nodes: Node<PreviewNodeData>[];
|
|
1085
1099
|
edges: Edge<EventEdgeData>[];
|
|
1086
1100
|
};
|
|
@@ -1126,50 +1140,71 @@ declare const EventFlowEdge: React__default.NamedExoticComponent<EdgeProps>;
|
|
|
1126
1140
|
* Expanded: One node per UI state within an orbital (OrbPreviewNode)
|
|
1127
1141
|
*/
|
|
1128
1142
|
|
|
1143
|
+
/** Serializable payload field — mirrors EventPayloadField from @almadar/core. */
|
|
1144
|
+
interface SerializedPayloadField extends JsonObject {
|
|
1145
|
+
name: string;
|
|
1146
|
+
type: string;
|
|
1147
|
+
required: boolean | null;
|
|
1148
|
+
description: string | null;
|
|
1149
|
+
}
|
|
1150
|
+
/** Serializable behavior glyph child — mirrors BehaviorGlyphChild from AvlBehaviorGlyph. */
|
|
1151
|
+
interface SerializedGlyphChild extends JsonObject {
|
|
1152
|
+
name: string;
|
|
1153
|
+
fieldCount: number | null;
|
|
1154
|
+
stateCount: number | null;
|
|
1155
|
+
persistence: string | null;
|
|
1156
|
+
effectTypes: string[];
|
|
1157
|
+
}
|
|
1158
|
+
/** Serializable behavior glyph connection — mirrors BehaviorGlyphConnection from AvlBehaviorGlyph. */
|
|
1159
|
+
interface SerializedGlyphConnection extends JsonObject {
|
|
1160
|
+
from: string;
|
|
1161
|
+
to: string;
|
|
1162
|
+
event: string;
|
|
1163
|
+
}
|
|
1129
1164
|
/** Extended view level adding 'behavior' to the existing overview/expanded. */
|
|
1130
1165
|
type ComposeViewLevel = 'behavior' | 'overview' | 'expanded';
|
|
1131
1166
|
/** An event that can be wired between behaviors. */
|
|
1132
|
-
interface ConnectableEvent {
|
|
1167
|
+
interface ConnectableEvent extends JsonObject {
|
|
1133
1168
|
/** Event name (e.g., "ADD_TO_CART"). */
|
|
1134
1169
|
event: string;
|
|
1135
1170
|
/** Typed payload fields if declared. */
|
|
1136
|
-
payloadFields
|
|
1171
|
+
payloadFields: SerializedPayloadField[] | null;
|
|
1137
1172
|
/** Vertical position hint (0..1) for handle placement on the node. */
|
|
1138
1173
|
positionHint: number;
|
|
1139
1174
|
}
|
|
1140
1175
|
/** Data for a BehaviorComposeNode in React Flow. */
|
|
1141
|
-
interface BehaviorComposeNodeData extends
|
|
1176
|
+
interface BehaviorComposeNodeData extends JsonObject {
|
|
1142
1177
|
/** Behavior name from registry (e.g., "std-cart"). */
|
|
1143
1178
|
behaviorName: string;
|
|
1144
1179
|
/** Composition level: atom, molecule, organism. */
|
|
1145
|
-
level:
|
|
1180
|
+
level: string;
|
|
1146
1181
|
/** Domain for color coding (e.g., "commerce"). */
|
|
1147
|
-
domain
|
|
1182
|
+
domain: string | null;
|
|
1148
1183
|
/** Layer classification (e.g., "Domain", "UI Patterns"). */
|
|
1149
|
-
layer
|
|
1184
|
+
layer: string | null;
|
|
1150
1185
|
/** Primary entity name (e.g., "CartItem"). */
|
|
1151
1186
|
entityName: string;
|
|
1152
1187
|
/** Number of states in the behavior. */
|
|
1153
1188
|
stateCount: number;
|
|
1154
1189
|
/** Number of entity fields. */
|
|
1155
|
-
fieldCount
|
|
1190
|
+
fieldCount: number | null;
|
|
1156
1191
|
/** Persistence kind. */
|
|
1157
|
-
persistence
|
|
1192
|
+
persistence: string | null;
|
|
1158
1193
|
/** Effect types used by this behavior. */
|
|
1159
|
-
effectTypes
|
|
1194
|
+
effectTypes: string[] | null;
|
|
1160
1195
|
/** Child behaviors for molecule/organism glyphs. */
|
|
1161
|
-
children
|
|
1196
|
+
children: SerializedGlyphChild[] | null;
|
|
1162
1197
|
/** Connections between children (for organism glyphs). */
|
|
1163
|
-
connections
|
|
1198
|
+
connections: SerializedGlyphConnection[] | null;
|
|
1164
1199
|
/** Events this behavior can emit (source handles). */
|
|
1165
1200
|
connectableEvents: ConnectableEvent[];
|
|
1166
1201
|
/** Behaviors this is composable with (for palette hints). */
|
|
1167
|
-
composableWith
|
|
1202
|
+
composableWith: string[] | null;
|
|
1168
1203
|
/** Names of orbitals produced by this behavior (for drill-down). */
|
|
1169
1204
|
orbitalNames: string[];
|
|
1170
1205
|
}
|
|
1171
1206
|
/** Edge data for behavior-level wiring. */
|
|
1172
|
-
interface BehaviorWireEdgeData extends
|
|
1207
|
+
interface BehaviorWireEdgeData extends JsonObject {
|
|
1173
1208
|
/** The event name displayed on the edge. */
|
|
1174
1209
|
event: string;
|
|
1175
1210
|
/** Source behavior name. */
|
|
@@ -1177,7 +1212,7 @@ interface BehaviorWireEdgeData extends Record<string, unknown> {
|
|
|
1177
1212
|
/** Target behavior name. */
|
|
1178
1213
|
targetBehavior: string;
|
|
1179
1214
|
/** Typed payload fields if declared. */
|
|
1180
|
-
payloadFields
|
|
1215
|
+
payloadFields: SerializedPayloadField[] | null;
|
|
1181
1216
|
}
|
|
1182
1217
|
/** Mapping from behavior name to its metadata + produced orbitals. */
|
|
1183
1218
|
interface BehaviorCanvasEntry {
|
|
@@ -1196,13 +1231,13 @@ interface BehaviorCanvasEntry {
|
|
|
1196
1231
|
/** Number of entity fields. */
|
|
1197
1232
|
fieldCount?: number;
|
|
1198
1233
|
/** Persistence kind. */
|
|
1199
|
-
persistence?:
|
|
1234
|
+
persistence?: string;
|
|
1200
1235
|
/** Effect types used. */
|
|
1201
|
-
effectTypes?:
|
|
1236
|
+
effectTypes?: string[];
|
|
1202
1237
|
/** Child behaviors (molecule/organism). */
|
|
1203
|
-
children?:
|
|
1238
|
+
children?: SerializedGlyphChild[];
|
|
1204
1239
|
/** Connections between children (organism). */
|
|
1205
|
-
connections?:
|
|
1240
|
+
connections?: SerializedGlyphConnection[];
|
|
1206
1241
|
/** Events available for wiring. */
|
|
1207
1242
|
connectableEvents: ConnectableEvent[];
|
|
1208
1243
|
/** Compatible behavior names. */
|
|
@@ -1264,11 +1299,13 @@ interface BehaviorRegistryRecord {
|
|
|
1264
1299
|
}>;
|
|
1265
1300
|
};
|
|
1266
1301
|
connectableEvents: string[];
|
|
1267
|
-
eventPayloads:
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1302
|
+
eventPayloads: {
|
|
1303
|
+
[k: string]: Array<{
|
|
1304
|
+
name: string;
|
|
1305
|
+
type: string;
|
|
1306
|
+
required?: boolean;
|
|
1307
|
+
}>;
|
|
1308
|
+
};
|
|
1272
1309
|
composableWith: string[];
|
|
1273
1310
|
}
|
|
1274
1311
|
/**
|
|
@@ -1499,7 +1536,7 @@ declare namespace OrbInspector {
|
|
|
1499
1536
|
|
|
1500
1537
|
interface FlowCanvasProps {
|
|
1501
1538
|
schema: OrbitalSchema | string;
|
|
1502
|
-
mockData?:
|
|
1539
|
+
mockData?: EntityData;
|
|
1503
1540
|
className?: string;
|
|
1504
1541
|
width?: number | string;
|
|
1505
1542
|
height?: number | string;
|