@almadar/ui 2.15.13 → 2.16.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.
Files changed (37) hide show
  1. package/dist/avl/index.cjs +1837 -0
  2. package/dist/avl/index.d.cts +312 -0
  3. package/dist/avl/index.d.ts +33 -0
  4. package/dist/avl/index.js +1801 -0
  5. package/dist/components/atoms/avl/AvlApplication.d.ts +8 -0
  6. package/dist/components/atoms/avl/AvlBinding.d.ts +12 -0
  7. package/dist/components/atoms/avl/AvlBindingRef.d.ts +7 -0
  8. package/dist/components/atoms/avl/AvlEffect.d.ts +8 -0
  9. package/dist/components/atoms/avl/AvlEntity.d.ts +9 -0
  10. package/dist/components/atoms/avl/AvlEvent.d.ts +7 -0
  11. package/dist/components/atoms/avl/AvlField.d.ts +10 -0
  12. package/dist/components/atoms/avl/AvlFieldType.d.ts +8 -0
  13. package/dist/components/atoms/avl/AvlGuard.d.ts +7 -0
  14. package/dist/components/atoms/avl/AvlLiteral.d.ts +7 -0
  15. package/dist/components/atoms/avl/AvlOperator.d.ts +8 -0
  16. package/dist/components/atoms/avl/AvlOrbital.d.ts +11 -0
  17. package/dist/components/atoms/avl/AvlPage.d.ts +7 -0
  18. package/dist/components/atoms/avl/AvlPersistence.d.ts +8 -0
  19. package/dist/components/atoms/avl/AvlSExpr.d.ts +8 -0
  20. package/dist/components/atoms/avl/AvlState.d.ts +10 -0
  21. package/dist/components/atoms/avl/AvlTrait.d.ts +13 -0
  22. package/dist/components/atoms/avl/AvlTransition.d.ts +18 -0
  23. package/dist/components/atoms/avl/index.d.ts +20 -0
  24. package/dist/components/atoms/avl/types.d.ts +19 -0
  25. package/dist/components/molecules/avl/AvlClosedCircuit.d.ts +20 -0
  26. package/dist/components/molecules/avl/AvlEmitListen.d.ts +16 -0
  27. package/dist/components/molecules/avl/AvlExprTree.d.ts +13 -0
  28. package/dist/components/molecules/avl/AvlOrbitalUnit.d.ts +20 -0
  29. package/dist/components/molecules/avl/AvlSlotMap.d.ts +17 -0
  30. package/dist/components/molecules/avl/AvlStateMachine.d.ts +22 -0
  31. package/dist/components/molecules/avl/avl-layout.d.ts +31 -0
  32. package/dist/components/molecules/avl/index.d.ts +7 -0
  33. package/dist/illustrations/index.cjs +1789 -20
  34. package/dist/illustrations/index.d.cts +276 -1
  35. package/dist/illustrations/index.d.ts +24 -0
  36. package/dist/illustrations/index.js +1765 -20
  37. package/package.json +6 -1
@@ -0,0 +1,312 @@
1
+ import React from 'react';
2
+
3
+ /**
4
+ * Almadar Visual Language (AVL) shared types.
5
+ *
6
+ * Every AVL atom renders a `<g>` element (not `<svg>`) and accepts
7
+ * AvlBaseProps for positioning and styling within a parent SVG.
8
+ */
9
+ interface AvlBaseProps {
10
+ x?: number;
11
+ y?: number;
12
+ color?: string;
13
+ opacity?: number;
14
+ className?: string;
15
+ }
16
+ type AvlEffectType = 'render-ui' | 'set' | 'persist' | 'fetch' | 'emit' | 'navigate' | 'notify' | 'call-service' | 'spawn' | 'despawn' | 'do' | 'if' | 'log';
17
+ type AvlFieldTypeKind = 'string' | 'number' | 'boolean' | 'date' | 'enum' | 'object' | 'array';
18
+ type AvlPersistenceKind = 'persistent' | 'runtime' | 'singleton' | 'instance';
19
+ type AvlOperatorNamespace = 'arithmetic' | 'comparison' | 'logic' | 'string' | 'collection' | 'time' | 'control' | 'async';
20
+ declare const AVL_OPERATOR_COLORS: Record<AvlOperatorNamespace, string>;
21
+ declare const AVL_FIELD_TYPE_SHAPES: Record<AvlFieldTypeKind, string>;
22
+
23
+ interface AvlOrbitalProps {
24
+ cx?: number;
25
+ cy?: number;
26
+ r?: number;
27
+ label?: string;
28
+ color?: string;
29
+ opacity?: number;
30
+ className?: string;
31
+ }
32
+ declare const AvlOrbital: React.FC<AvlOrbitalProps>;
33
+
34
+ interface AvlEntityProps extends AvlBaseProps {
35
+ r?: number;
36
+ fieldCount?: number;
37
+ persistence?: AvlPersistenceKind;
38
+ label?: string;
39
+ }
40
+ declare const AvlEntity: React.FC<AvlEntityProps>;
41
+
42
+ interface AvlTraitProps {
43
+ cx?: number;
44
+ cy?: number;
45
+ rx?: number;
46
+ ry?: number;
47
+ rotation?: number;
48
+ label?: string;
49
+ color?: string;
50
+ opacity?: number;
51
+ className?: string;
52
+ }
53
+ declare const AvlTrait: React.FC<AvlTraitProps>;
54
+
55
+ interface AvlPageProps extends AvlBaseProps {
56
+ size?: number;
57
+ label?: string;
58
+ }
59
+ declare const AvlPage: React.FC<AvlPageProps>;
60
+
61
+ interface AvlApplicationProps extends AvlBaseProps {
62
+ width?: number;
63
+ height?: number;
64
+ label?: string;
65
+ }
66
+ declare const AvlApplication: React.FC<AvlApplicationProps>;
67
+
68
+ interface AvlStateProps extends AvlBaseProps {
69
+ name?: string;
70
+ isInitial?: boolean;
71
+ isTerminal?: boolean;
72
+ width?: number;
73
+ height?: number;
74
+ }
75
+ declare const AvlState: React.FC<AvlStateProps>;
76
+
77
+ interface AvlTransitionProps {
78
+ x1: number;
79
+ y1: number;
80
+ x2: number;
81
+ y2: number;
82
+ curved?: boolean;
83
+ /** Center point to curve away from (curves outward if provided). */
84
+ curveAwayFrom?: {
85
+ x: number;
86
+ y: number;
87
+ };
88
+ label?: string;
89
+ color?: string;
90
+ opacity?: number;
91
+ className?: string;
92
+ }
93
+ declare const AvlTransition: React.FC<AvlTransitionProps>;
94
+
95
+ interface AvlEventProps extends AvlBaseProps {
96
+ size?: number;
97
+ label?: string;
98
+ }
99
+ declare const AvlEvent: React.FC<AvlEventProps>;
100
+
101
+ interface AvlGuardProps extends AvlBaseProps {
102
+ size?: number;
103
+ label?: string;
104
+ }
105
+ declare const AvlGuard: React.FC<AvlGuardProps>;
106
+
107
+ interface AvlEffectProps extends AvlBaseProps {
108
+ effectType: AvlEffectType;
109
+ size?: number;
110
+ label?: string;
111
+ }
112
+ declare const AvlEffect: React.FC<AvlEffectProps>;
113
+
114
+ interface AvlFieldProps extends AvlBaseProps {
115
+ /** Angle in radians from entity center. */
116
+ angle?: number;
117
+ length?: number;
118
+ required?: boolean;
119
+ label?: string;
120
+ }
121
+ declare const AvlField: React.FC<AvlFieldProps>;
122
+
123
+ interface AvlFieldTypeProps extends AvlBaseProps {
124
+ kind: AvlFieldTypeKind;
125
+ size?: number;
126
+ label?: string;
127
+ }
128
+ declare const AvlFieldType: React.FC<AvlFieldTypeProps>;
129
+
130
+ interface AvlBindingProps {
131
+ x1: number;
132
+ y1: number;
133
+ x2: number;
134
+ y2: number;
135
+ label?: string;
136
+ color?: string;
137
+ opacity?: number;
138
+ className?: string;
139
+ }
140
+ declare const AvlBinding: React.FC<AvlBindingProps>;
141
+
142
+ interface AvlPersistenceProps extends AvlBaseProps {
143
+ kind: AvlPersistenceKind;
144
+ size?: number;
145
+ label?: string;
146
+ }
147
+ declare const AvlPersistence: React.FC<AvlPersistenceProps>;
148
+
149
+ interface AvlOperatorProps extends AvlBaseProps {
150
+ name: string;
151
+ namespace?: AvlOperatorNamespace;
152
+ size?: number;
153
+ }
154
+ declare const AvlOperator: React.FC<AvlOperatorProps>;
155
+
156
+ interface AvlSExprProps extends AvlBaseProps {
157
+ width?: number;
158
+ height?: number;
159
+ label?: string;
160
+ }
161
+ declare const AvlSExpr: React.FC<AvlSExprProps>;
162
+
163
+ interface AvlLiteralProps extends AvlBaseProps {
164
+ value: string;
165
+ size?: number;
166
+ }
167
+ declare const AvlLiteral: React.FC<AvlLiteralProps>;
168
+
169
+ interface AvlBindingRefProps extends AvlBaseProps {
170
+ path: string;
171
+ size?: number;
172
+ }
173
+ declare const AvlBindingRef: React.FC<AvlBindingRefProps>;
174
+
175
+ interface AvlStateMachineState {
176
+ name: string;
177
+ isInitial?: boolean;
178
+ isTerminal?: boolean;
179
+ }
180
+ interface AvlStateMachineTransition {
181
+ from: string;
182
+ to: string;
183
+ event?: string;
184
+ guard?: string;
185
+ effects?: AvlEffectType[];
186
+ }
187
+ interface AvlStateMachineProps {
188
+ states: AvlStateMachineState[];
189
+ transitions: AvlStateMachineTransition[];
190
+ className?: string;
191
+ color?: string;
192
+ animated?: boolean;
193
+ }
194
+ declare const AvlStateMachine: React.FC<AvlStateMachineProps>;
195
+
196
+ interface AvlOrbitalUnitTrait {
197
+ name: string;
198
+ color?: string;
199
+ }
200
+ interface AvlOrbitalUnitPage {
201
+ name: string;
202
+ }
203
+ interface AvlOrbitalUnitProps {
204
+ entityName: string;
205
+ fields?: number;
206
+ persistence?: AvlPersistenceKind;
207
+ traits: AvlOrbitalUnitTrait[];
208
+ pages: AvlOrbitalUnitPage[];
209
+ className?: string;
210
+ color?: string;
211
+ animated?: boolean;
212
+ }
213
+ declare const AvlOrbitalUnit: React.FC<AvlOrbitalUnitProps>;
214
+
215
+ interface AvlClosedCircuitState {
216
+ name: string;
217
+ }
218
+ interface AvlClosedCircuitTransition {
219
+ from: string;
220
+ to: string;
221
+ event?: string;
222
+ guard?: string;
223
+ effects?: AvlEffectType[];
224
+ }
225
+ interface AvlClosedCircuitProps {
226
+ states: AvlClosedCircuitState[];
227
+ transitions: AvlClosedCircuitTransition[];
228
+ className?: string;
229
+ color?: string;
230
+ animated?: boolean;
231
+ }
232
+ declare const AvlClosedCircuit: React.FC<AvlClosedCircuitProps>;
233
+
234
+ interface AvlEmitListenProps {
235
+ emitter: {
236
+ name: string;
237
+ fields?: number;
238
+ };
239
+ listener: {
240
+ name: string;
241
+ fields?: number;
242
+ };
243
+ eventName?: string;
244
+ className?: string;
245
+ color?: string;
246
+ animated?: boolean;
247
+ }
248
+ declare const AvlEmitListen: React.FC<AvlEmitListenProps>;
249
+
250
+ interface AvlSlotMapSlot {
251
+ name: string;
252
+ x: number;
253
+ y: number;
254
+ width: number;
255
+ height: number;
256
+ }
257
+ interface AvlSlotMapProps {
258
+ slots: AvlSlotMapSlot[];
259
+ pageWidth?: number;
260
+ pageHeight?: number;
261
+ className?: string;
262
+ color?: string;
263
+ animated?: boolean;
264
+ }
265
+ declare const AvlSlotMap: React.FC<AvlSlotMapProps>;
266
+
267
+ interface AvlExprTreeNode {
268
+ label: string;
269
+ type: 'operator' | 'literal' | 'binding';
270
+ children?: AvlExprTreeNode[];
271
+ }
272
+ interface AvlExprTreeProps {
273
+ expression: AvlExprTreeNode;
274
+ className?: string;
275
+ color?: string;
276
+ animated?: boolean;
277
+ }
278
+ declare const AvlExprTree: React.FC<AvlExprTreeProps>;
279
+
280
+ /**
281
+ * AVL layout utilities for positioning atoms in composed diagrams.
282
+ */
283
+ /** Distribute N points evenly around a ring. */
284
+ declare function ringPositions(cx: number, cy: number, r: number, count: number, startAngle?: number): Array<{
285
+ x: number;
286
+ y: number;
287
+ angle: number;
288
+ }>;
289
+ /** Create an SVG arc path between two angles on a circle. */
290
+ declare function arcPath(cx: number, cy: number, r: number, startAngle: number, endAngle: number): string;
291
+ /** Distribute N points radially from a center. */
292
+ declare function radialPositions(cx: number, cy: number, innerR: number, outerR: number, count: number, startAngle?: number): Array<{
293
+ x1: number;
294
+ y1: number;
295
+ x2: number;
296
+ y2: number;
297
+ angle: number;
298
+ }>;
299
+ /** Simple grid layout: position items in columns and rows. */
300
+ declare function gridPositions(startX: number, startY: number, cols: number, cellWidth: number, cellHeight: number, count: number): Array<{
301
+ x: number;
302
+ y: number;
303
+ col: number;
304
+ row: number;
305
+ }>;
306
+ /** Compute a quadratic bezier control point offset perpendicular to the line. */
307
+ declare function curveControlPoint(x1: number, y1: number, x2: number, y2: number, offset: number): {
308
+ cpx: number;
309
+ cpy: number;
310
+ };
311
+
312
+ export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, AvlApplication, type AvlApplicationProps, type AvlBaseProps, AvlBinding, type AvlBindingProps, AvlBindingRef, type AvlBindingRefProps, AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitState, type AvlClosedCircuitTransition, AvlEffect, type AvlEffectProps, type AvlEffectType, AvlEmitListen, type AvlEmitListenProps, AvlEntity, type AvlEntityProps, AvlEvent, type AvlEventProps, AvlExprTree, type AvlExprTreeNode, type AvlExprTreeProps, AvlField, type AvlFieldProps, AvlFieldType, type AvlFieldTypeKind, type AvlFieldTypeProps, AvlGuard, type AvlGuardProps, AvlLiteral, type AvlLiteralProps, AvlOperator, type AvlOperatorNamespace, type AvlOperatorProps, AvlOrbital, type AvlOrbitalProps, AvlOrbitalUnit, type AvlOrbitalUnitPage, type AvlOrbitalUnitProps, type AvlOrbitalUnitTrait, AvlPage, type AvlPageProps, AvlPersistence, type AvlPersistenceKind, type AvlPersistenceProps, AvlSExpr, type AvlSExprProps, AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot, AvlState, AvlStateMachine, type AvlStateMachineProps, type AvlStateMachineState, type AvlStateMachineTransition, type AvlStateProps, AvlTrait, type AvlTraitProps, AvlTransition, type AvlTransitionProps, arcPath, curveControlPoint, gridPositions, radialPositions, ringPositions };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @almadar/ui/avl
3
+ *
4
+ * Almadar Visual Language (AVL) - Formal visual notation for .orb constructs.
5
+ * Atoms render <g> elements for composition. Molecules render full <svg>.
6
+ */
7
+ export { AvlOrbital, type AvlOrbitalProps } from '../components/atoms/avl';
8
+ export { AvlEntity, type AvlEntityProps } from '../components/atoms/avl';
9
+ export { AvlTrait, type AvlTraitProps } from '../components/atoms/avl';
10
+ export { AvlPage, type AvlPageProps } from '../components/atoms/avl';
11
+ export { AvlApplication, type AvlApplicationProps } from '../components/atoms/avl';
12
+ export { AvlState, type AvlStateProps } from '../components/atoms/avl';
13
+ export { AvlTransition, type AvlTransitionProps } from '../components/atoms/avl';
14
+ export { AvlEvent, type AvlEventProps } from '../components/atoms/avl';
15
+ export { AvlGuard, type AvlGuardProps } from '../components/atoms/avl';
16
+ export { AvlEffect, type AvlEffectProps } from '../components/atoms/avl';
17
+ export { AvlField, type AvlFieldProps } from '../components/atoms/avl';
18
+ export { AvlFieldType, type AvlFieldTypeProps } from '../components/atoms/avl';
19
+ export { AvlBinding, type AvlBindingProps } from '../components/atoms/avl';
20
+ export { AvlPersistence, type AvlPersistenceProps } from '../components/atoms/avl';
21
+ export { AvlOperator, type AvlOperatorProps } from '../components/atoms/avl';
22
+ export { AvlSExpr, type AvlSExprProps } from '../components/atoms/avl';
23
+ export { AvlLiteral, type AvlLiteralProps } from '../components/atoms/avl';
24
+ export { AvlBindingRef, type AvlBindingRefProps } from '../components/atoms/avl';
25
+ export type { AvlBaseProps, AvlEffectType, AvlFieldTypeKind, AvlPersistenceKind, AvlOperatorNamespace, } from '../components/atoms/avl';
26
+ export { AVL_OPERATOR_COLORS, AVL_FIELD_TYPE_SHAPES } from '../components/atoms/avl';
27
+ export { AvlStateMachine, type AvlStateMachineProps, type AvlStateMachineState, type AvlStateMachineTransition } from '../components/molecules/avl';
28
+ export { AvlOrbitalUnit, type AvlOrbitalUnitProps, type AvlOrbitalUnitTrait, type AvlOrbitalUnitPage } from '../components/molecules/avl';
29
+ export { AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitState, type AvlClosedCircuitTransition } from '../components/molecules/avl';
30
+ export { AvlEmitListen, type AvlEmitListenProps } from '../components/molecules/avl';
31
+ export { AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot } from '../components/molecules/avl';
32
+ export { AvlExprTree, type AvlExprTreeProps, type AvlExprTreeNode } from '../components/molecules/avl';
33
+ export { ringPositions, arcPath, radialPositions, gridPositions, curveControlPoint } from '../components/molecules/avl';