@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,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlApplicationProps extends AvlBaseProps {
4
+ width?: number;
5
+ height?: number;
6
+ label?: string;
7
+ }
8
+ export declare const AvlApplication: React.FC<AvlApplicationProps>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface AvlBindingProps {
3
+ x1: number;
4
+ y1: number;
5
+ x2: number;
6
+ y2: number;
7
+ label?: string;
8
+ color?: string;
9
+ opacity?: number;
10
+ className?: string;
11
+ }
12
+ export declare const AvlBinding: React.FC<AvlBindingProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlBindingRefProps extends AvlBaseProps {
4
+ path: string;
5
+ size?: number;
6
+ }
7
+ export declare const AvlBindingRef: React.FC<AvlBindingRefProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps, AvlEffectType } from './types';
3
+ export interface AvlEffectProps extends AvlBaseProps {
4
+ effectType: AvlEffectType;
5
+ size?: number;
6
+ label?: string;
7
+ }
8
+ export declare const AvlEffect: React.FC<AvlEffectProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps, AvlPersistenceKind } from './types';
3
+ export interface AvlEntityProps extends AvlBaseProps {
4
+ r?: number;
5
+ fieldCount?: number;
6
+ persistence?: AvlPersistenceKind;
7
+ label?: string;
8
+ }
9
+ export declare const AvlEntity: React.FC<AvlEntityProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlEventProps extends AvlBaseProps {
4
+ size?: number;
5
+ label?: string;
6
+ }
7
+ export declare const AvlEvent: React.FC<AvlEventProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlFieldProps extends AvlBaseProps {
4
+ /** Angle in radians from entity center. */
5
+ angle?: number;
6
+ length?: number;
7
+ required?: boolean;
8
+ label?: string;
9
+ }
10
+ export declare const AvlField: React.FC<AvlFieldProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps, AvlFieldTypeKind } from './types';
3
+ export interface AvlFieldTypeProps extends AvlBaseProps {
4
+ kind: AvlFieldTypeKind;
5
+ size?: number;
6
+ label?: string;
7
+ }
8
+ export declare const AvlFieldType: React.FC<AvlFieldTypeProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlGuardProps extends AvlBaseProps {
4
+ size?: number;
5
+ label?: string;
6
+ }
7
+ export declare const AvlGuard: React.FC<AvlGuardProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlLiteralProps extends AvlBaseProps {
4
+ value: string;
5
+ size?: number;
6
+ }
7
+ export declare const AvlLiteral: React.FC<AvlLiteralProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps, AvlOperatorNamespace } from './types';
3
+ export interface AvlOperatorProps extends AvlBaseProps {
4
+ name: string;
5
+ namespace?: AvlOperatorNamespace;
6
+ size?: number;
7
+ }
8
+ export declare const AvlOperator: React.FC<AvlOperatorProps>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface AvlOrbitalProps {
3
+ cx?: number;
4
+ cy?: number;
5
+ r?: number;
6
+ label?: string;
7
+ color?: string;
8
+ opacity?: number;
9
+ className?: string;
10
+ }
11
+ export declare const AvlOrbital: React.FC<AvlOrbitalProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlPageProps extends AvlBaseProps {
4
+ size?: number;
5
+ label?: string;
6
+ }
7
+ export declare const AvlPage: React.FC<AvlPageProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps, AvlPersistenceKind } from './types';
3
+ export interface AvlPersistenceProps extends AvlBaseProps {
4
+ kind: AvlPersistenceKind;
5
+ size?: number;
6
+ label?: string;
7
+ }
8
+ export declare const AvlPersistence: React.FC<AvlPersistenceProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlSExprProps extends AvlBaseProps {
4
+ width?: number;
5
+ height?: number;
6
+ label?: string;
7
+ }
8
+ export declare const AvlSExpr: React.FC<AvlSExprProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { AvlBaseProps } from './types';
3
+ export interface AvlStateProps extends AvlBaseProps {
4
+ name?: string;
5
+ isInitial?: boolean;
6
+ isTerminal?: boolean;
7
+ width?: number;
8
+ height?: number;
9
+ }
10
+ export declare const AvlState: React.FC<AvlStateProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface AvlTraitProps {
3
+ cx?: number;
4
+ cy?: number;
5
+ rx?: number;
6
+ ry?: number;
7
+ rotation?: number;
8
+ label?: string;
9
+ color?: string;
10
+ opacity?: number;
11
+ className?: string;
12
+ }
13
+ export declare const AvlTrait: React.FC<AvlTraitProps>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export interface AvlTransitionProps {
3
+ x1: number;
4
+ y1: number;
5
+ x2: number;
6
+ y2: number;
7
+ curved?: boolean;
8
+ /** Center point to curve away from (curves outward if provided). */
9
+ curveAwayFrom?: {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ label?: string;
14
+ color?: string;
15
+ opacity?: number;
16
+ className?: string;
17
+ }
18
+ export declare const AvlTransition: React.FC<AvlTransitionProps>;
@@ -0,0 +1,20 @@
1
+ export type { AvlBaseProps, AvlEffectType, AvlFieldTypeKind, AvlPersistenceKind, AvlOperatorNamespace, } from './types';
2
+ export { AVL_OPERATOR_COLORS, AVL_FIELD_TYPE_SHAPES } from './types';
3
+ export { AvlOrbital, type AvlOrbitalProps } from './AvlOrbital';
4
+ export { AvlEntity, type AvlEntityProps } from './AvlEntity';
5
+ export { AvlTrait, type AvlTraitProps } from './AvlTrait';
6
+ export { AvlPage, type AvlPageProps } from './AvlPage';
7
+ export { AvlApplication, type AvlApplicationProps } from './AvlApplication';
8
+ export { AvlState, type AvlStateProps } from './AvlState';
9
+ export { AvlTransition, type AvlTransitionProps } from './AvlTransition';
10
+ export { AvlEvent, type AvlEventProps } from './AvlEvent';
11
+ export { AvlGuard, type AvlGuardProps } from './AvlGuard';
12
+ export { AvlEffect, type AvlEffectProps } from './AvlEffect';
13
+ export { AvlField, type AvlFieldProps } from './AvlField';
14
+ export { AvlFieldType, type AvlFieldTypeProps } from './AvlFieldType';
15
+ export { AvlBinding, type AvlBindingProps } from './AvlBinding';
16
+ export { AvlPersistence, type AvlPersistenceProps } from './AvlPersistence';
17
+ export { AvlOperator, type AvlOperatorProps } from './AvlOperator';
18
+ export { AvlSExpr, type AvlSExprProps } from './AvlSExpr';
19
+ export { AvlLiteral, type AvlLiteralProps } from './AvlLiteral';
20
+ export { AvlBindingRef, type AvlBindingRefProps } from './AvlBindingRef';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Almadar Visual Language (AVL) shared types.
3
+ *
4
+ * Every AVL atom renders a `<g>` element (not `<svg>`) and accepts
5
+ * AvlBaseProps for positioning and styling within a parent SVG.
6
+ */
7
+ export interface AvlBaseProps {
8
+ x?: number;
9
+ y?: number;
10
+ color?: string;
11
+ opacity?: number;
12
+ className?: string;
13
+ }
14
+ export type AvlEffectType = 'render-ui' | 'set' | 'persist' | 'fetch' | 'emit' | 'navigate' | 'notify' | 'call-service' | 'spawn' | 'despawn' | 'do' | 'if' | 'log';
15
+ export type AvlFieldTypeKind = 'string' | 'number' | 'boolean' | 'date' | 'enum' | 'object' | 'array';
16
+ export type AvlPersistenceKind = 'persistent' | 'runtime' | 'singleton' | 'instance';
17
+ export type AvlOperatorNamespace = 'arithmetic' | 'comparison' | 'logic' | 'string' | 'collection' | 'time' | 'control' | 'async';
18
+ export declare const AVL_OPERATOR_COLORS: Record<AvlOperatorNamespace, string>;
19
+ export declare const AVL_FIELD_TYPE_SHAPES: Record<AvlFieldTypeKind, string>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { AvlEffectType } from '../../atoms/avl/types';
3
+ export interface AvlClosedCircuitState {
4
+ name: string;
5
+ }
6
+ export interface AvlClosedCircuitTransition {
7
+ from: string;
8
+ to: string;
9
+ event?: string;
10
+ guard?: string;
11
+ effects?: AvlEffectType[];
12
+ }
13
+ export interface AvlClosedCircuitProps {
14
+ states: AvlClosedCircuitState[];
15
+ transitions: AvlClosedCircuitTransition[];
16
+ className?: string;
17
+ color?: string;
18
+ animated?: boolean;
19
+ }
20
+ export declare const AvlClosedCircuit: React.FC<AvlClosedCircuitProps>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface AvlEmitListenProps {
3
+ emitter: {
4
+ name: string;
5
+ fields?: number;
6
+ };
7
+ listener: {
8
+ name: string;
9
+ fields?: number;
10
+ };
11
+ eventName?: string;
12
+ className?: string;
13
+ color?: string;
14
+ animated?: boolean;
15
+ }
16
+ export declare const AvlEmitListen: React.FC<AvlEmitListenProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface AvlExprTreeNode {
3
+ label: string;
4
+ type: 'operator' | 'literal' | 'binding';
5
+ children?: AvlExprTreeNode[];
6
+ }
7
+ export interface AvlExprTreeProps {
8
+ expression: AvlExprTreeNode;
9
+ className?: string;
10
+ color?: string;
11
+ animated?: boolean;
12
+ }
13
+ export declare const AvlExprTree: React.FC<AvlExprTreeProps>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { AvlPersistenceKind } from '../../atoms/avl/types';
3
+ export interface AvlOrbitalUnitTrait {
4
+ name: string;
5
+ color?: string;
6
+ }
7
+ export interface AvlOrbitalUnitPage {
8
+ name: string;
9
+ }
10
+ export interface AvlOrbitalUnitProps {
11
+ entityName: string;
12
+ fields?: number;
13
+ persistence?: AvlPersistenceKind;
14
+ traits: AvlOrbitalUnitTrait[];
15
+ pages: AvlOrbitalUnitPage[];
16
+ className?: string;
17
+ color?: string;
18
+ animated?: boolean;
19
+ }
20
+ export declare const AvlOrbitalUnit: React.FC<AvlOrbitalUnitProps>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface AvlSlotMapSlot {
3
+ name: string;
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface AvlSlotMapProps {
10
+ slots: AvlSlotMapSlot[];
11
+ pageWidth?: number;
12
+ pageHeight?: number;
13
+ className?: string;
14
+ color?: string;
15
+ animated?: boolean;
16
+ }
17
+ export declare const AvlSlotMap: React.FC<AvlSlotMapProps>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { AvlEffectType } from '../../atoms/avl/types';
3
+ export interface AvlStateMachineState {
4
+ name: string;
5
+ isInitial?: boolean;
6
+ isTerminal?: boolean;
7
+ }
8
+ export interface AvlStateMachineTransition {
9
+ from: string;
10
+ to: string;
11
+ event?: string;
12
+ guard?: string;
13
+ effects?: AvlEffectType[];
14
+ }
15
+ export interface AvlStateMachineProps {
16
+ states: AvlStateMachineState[];
17
+ transitions: AvlStateMachineTransition[];
18
+ className?: string;
19
+ color?: string;
20
+ animated?: boolean;
21
+ }
22
+ export declare const AvlStateMachine: React.FC<AvlStateMachineProps>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * AVL layout utilities for positioning atoms in composed diagrams.
3
+ */
4
+ /** Distribute N points evenly around a ring. */
5
+ export declare function ringPositions(cx: number, cy: number, r: number, count: number, startAngle?: number): Array<{
6
+ x: number;
7
+ y: number;
8
+ angle: number;
9
+ }>;
10
+ /** Create an SVG arc path between two angles on a circle. */
11
+ export declare function arcPath(cx: number, cy: number, r: number, startAngle: number, endAngle: number): string;
12
+ /** Distribute N points radially from a center. */
13
+ export declare function radialPositions(cx: number, cy: number, innerR: number, outerR: number, count: number, startAngle?: number): Array<{
14
+ x1: number;
15
+ y1: number;
16
+ x2: number;
17
+ y2: number;
18
+ angle: number;
19
+ }>;
20
+ /** Simple grid layout: position items in columns and rows. */
21
+ export declare function gridPositions(startX: number, startY: number, cols: number, cellWidth: number, cellHeight: number, count: number): Array<{
22
+ x: number;
23
+ y: number;
24
+ col: number;
25
+ row: number;
26
+ }>;
27
+ /** Compute a quadratic bezier control point offset perpendicular to the line. */
28
+ export declare function curveControlPoint(x1: number, y1: number, x2: number, y2: number, offset: number): {
29
+ cpx: number;
30
+ cpy: number;
31
+ };
@@ -0,0 +1,7 @@
1
+ export { AvlStateMachine, type AvlStateMachineProps, type AvlStateMachineState, type AvlStateMachineTransition } from './AvlStateMachine';
2
+ export { AvlOrbitalUnit, type AvlOrbitalUnitProps, type AvlOrbitalUnitTrait, type AvlOrbitalUnitPage } from './AvlOrbitalUnit';
3
+ export { AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitState, type AvlClosedCircuitTransition } from './AvlClosedCircuit';
4
+ export { AvlEmitListen, type AvlEmitListenProps } from './AvlEmitListen';
5
+ export { AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot } from './AvlSlotMap';
6
+ export { AvlExprTree, type AvlExprTreeProps, type AvlExprTreeNode } from './AvlExprTree';
7
+ export { ringPositions, arcPath, radialPositions, gridPositions, curveControlPoint } from './avl-layout';