@almadar/ui 2.22.2 → 2.24.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 +699 -343
- package/dist/avl/index.d.cts +47 -10
- package/dist/avl/index.d.ts +2 -0
- package/dist/avl/index.js +696 -345
- package/dist/components/atoms/PatternTile.d.ts +41 -0
- package/dist/components/atoms/avl/AvlEffect.d.ts +2 -0
- package/dist/components/atoms/avl/AvlState.d.ts +5 -0
- package/dist/components/atoms/avl/index.d.ts +2 -0
- package/dist/components/atoms/avl/types.d.ts +34 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.cjs +2136 -1124
- package/dist/components/index.js +1272 -264
- package/dist/components/molecules/EdgeDecoration.d.ts +35 -0
- package/dist/components/molecules/GeometricPattern.d.ts +33 -0
- package/dist/components/molecules/avl/AvlSwimLane.d.ts +10 -0
- package/dist/components/molecules/avl/AvlTransitionLane.d.ts +18 -0
- package/dist/components/molecules/avl/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +2 -0
- package/dist/components/organisms/avl/AvlTraitScene.d.ts +3 -3
- package/dist/components/organisms/avl/AvlTransitionScene.d.ts +3 -6
- package/dist/docs/index.cjs +3 -3
- package/dist/docs/index.js +3 -3
- package/dist/illustrations/index.cjs +65 -12
- package/dist/illustrations/index.d.cts +7 -0
- package/dist/illustrations/index.js +65 -12
- package/dist/marketing/index.cjs +1035 -23
- package/dist/marketing/index.d.cts +112 -1
- package/dist/marketing/index.d.ts +6 -0
- package/dist/marketing/index.js +1034 -26
- package/dist/providers/index.cjs +125 -125
- package/dist/providers/index.js +37 -37
- package/dist/runtime/enrichFromResponse.d.ts +1 -1
- package/dist/runtime/index.cjs +1006 -998
- package/dist/runtime/index.js +247 -239
- package/package.json +1 -1
- package/themes/almadar-website.css +36 -34
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EdgeDecoration Molecule
|
|
3
|
+
*
|
|
4
|
+
* Standalone SVG decorative elements positioned on section edges.
|
|
5
|
+
* Unlike GeometricPattern (which tiles small units), these are large
|
|
6
|
+
* singular shapes placed at specific positions: left edge, right edge,
|
|
7
|
+
* or both.
|
|
8
|
+
*
|
|
9
|
+
* Variants:
|
|
10
|
+
* arch — Concentric pointed mihrab arches (half-circles opening inward)
|
|
11
|
+
* vine — Flowing arabesque scroll tendrils running vertically
|
|
12
|
+
* lattice — Fine curved diamond lattice mesh
|
|
13
|
+
*
|
|
14
|
+
* Each variant renders as an absolutely-positioned SVG on one or both
|
|
15
|
+
* sides of the parent container.
|
|
16
|
+
*/
|
|
17
|
+
import React from 'react';
|
|
18
|
+
export type EdgeVariant = 'arch' | 'vine' | 'lattice';
|
|
19
|
+
export type EdgeSide = 'left' | 'right' | 'both';
|
|
20
|
+
export interface EdgeDecorationProps {
|
|
21
|
+
/** Which decorative element */
|
|
22
|
+
variant?: EdgeVariant;
|
|
23
|
+
/** Which side(s) to place the decoration */
|
|
24
|
+
side?: EdgeSide;
|
|
25
|
+
/** Overall opacity (default: 0.15) */
|
|
26
|
+
opacity?: number;
|
|
27
|
+
/** Stroke color */
|
|
28
|
+
color?: string;
|
|
29
|
+
/** Stroke width */
|
|
30
|
+
strokeWidth?: number;
|
|
31
|
+
/** Width of the decoration area as percentage of container (default: 15) */
|
|
32
|
+
width?: number;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const EdgeDecoration: React.FC<EdgeDecorationProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeometricPattern Molecule
|
|
3
|
+
*
|
|
4
|
+
* Composes PatternTile into reusable layout modes for Islamic geometric
|
|
5
|
+
* background decoration. Supports four modes:
|
|
6
|
+
*
|
|
7
|
+
* background — full tiling fill behind content
|
|
8
|
+
* left/right — pattern fades from one side toward the other
|
|
9
|
+
* frame — thin decorative strips above and below content
|
|
10
|
+
*
|
|
11
|
+
* Uses SVG <pattern> for efficient tiling and <mask> for fade effects.
|
|
12
|
+
* All rendering is pure SVG (SSR-safe, no browser APIs).
|
|
13
|
+
*/
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import type { PatternVariant } from '../atoms/PatternTile';
|
|
16
|
+
export interface GeometricPatternProps {
|
|
17
|
+
/** Which geometric tile design */
|
|
18
|
+
variant?: PatternVariant;
|
|
19
|
+
/** Layout mode */
|
|
20
|
+
mode?: 'background' | 'left' | 'right' | 'dual' | 'around' | 'frame';
|
|
21
|
+
/** Overall opacity (default: 0.06) */
|
|
22
|
+
opacity?: number;
|
|
23
|
+
/** Stroke color passed to PatternTile */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Tile scale multiplier (default: 1) */
|
|
26
|
+
scale?: number;
|
|
27
|
+
/** Stroke width passed to PatternTile */
|
|
28
|
+
strokeWidth?: number;
|
|
29
|
+
/** Content to wrap (used in frame mode) */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const GeometricPattern: React.FC<GeometricPatternProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AvlSwimLaneProps {
|
|
3
|
+
listenedEvents: string[];
|
|
4
|
+
emittedEvents: string[];
|
|
5
|
+
centerWidth: number;
|
|
6
|
+
height: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const AvlSwimLane: React.FC<AvlSwimLaneProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AvlEffectType } from '../../atoms/avl/types';
|
|
3
|
+
export interface AvlTransitionLaneEffect {
|
|
4
|
+
type: AvlEffectType | string;
|
|
5
|
+
}
|
|
6
|
+
export interface AvlTransitionLaneProps {
|
|
7
|
+
event: string;
|
|
8
|
+
guard?: string;
|
|
9
|
+
effects: AvlTransitionLaneEffect[];
|
|
10
|
+
width: number;
|
|
11
|
+
x?: number;
|
|
12
|
+
y?: number;
|
|
13
|
+
isBackward?: boolean;
|
|
14
|
+
isSelfLoop?: boolean;
|
|
15
|
+
color?: string;
|
|
16
|
+
onTransitionClick?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const AvlTransitionLane: React.FC<AvlTransitionLaneProps>;
|
|
@@ -4,6 +4,8 @@ export { AvlClosedCircuit, type AvlClosedCircuitProps, type AvlClosedCircuitStat
|
|
|
4
4
|
export { AvlEmitListen, type AvlEmitListenProps } from './AvlEmitListen';
|
|
5
5
|
export { AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot } from './AvlSlotMap';
|
|
6
6
|
export { AvlExprTree, type AvlExprTreeProps, type AvlExprTreeNode } from './AvlExprTree';
|
|
7
|
+
export { AvlTransitionLane, type AvlTransitionLaneProps, type AvlTransitionLaneEffect } from './AvlTransitionLane';
|
|
8
|
+
export { AvlSwimLane, type AvlSwimLaneProps } from './AvlSwimLane';
|
|
7
9
|
export { ringPositions, arcPath, radialPositions, gridPositions, curveControlPoint } from './avl-layout';
|
|
8
10
|
export { Avl3DOrbitalNode, type Avl3DOrbitalNodeProps } from './Avl3DOrbitalNode';
|
|
9
11
|
export { Avl3DCrossWire, type Avl3DCrossWireProps } from './Avl3DCrossWire';
|
|
@@ -76,3 +76,5 @@ export { TagCloud, type TagCloudProps, type TagCloudItem } from './TagCloud';
|
|
|
76
76
|
export { CommunityLinks, type CommunityLinksProps } from './CommunityLinks';
|
|
77
77
|
export { TeamCard, type TeamCardProps } from './TeamCard';
|
|
78
78
|
export { ShowcaseCard, type ShowcaseCardProps } from './ShowcaseCard';
|
|
79
|
+
export { GeometricPattern, type GeometricPatternProps } from './GeometricPattern';
|
|
80
|
+
export { EdgeDecoration, type EdgeDecorationProps, type EdgeVariant, type EdgeSide } from './EdgeDecoration';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AvlTraitScene - Zoom Level 3
|
|
2
|
+
* AvlTraitScene V2 - Zoom Level 3
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Left-to-right horizontal flow with color-coded states,
|
|
5
|
+
* transition lanes, and swim lanes for emit/listen events.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { TraitLevelData } from './avl-schema-parser';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AvlTransitionScene - Zoom Level 4
|
|
2
|
+
* AvlTransitionScene V2 - Zoom Level 4
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Labels are placed in cards between arrow segments,
|
|
8
|
-
* never overlapping the lines.
|
|
4
|
+
* Card layout replacing vertical waterfall.
|
|
5
|
+
* Reads like a spec card: from → to, trigger, guard, effects.
|
|
9
6
|
*/
|
|
10
7
|
import React from 'react';
|
|
11
8
|
import type { TransitionLevelData } from './avl-schema-parser';
|
package/dist/docs/index.cjs
CHANGED
|
@@ -3047,9 +3047,9 @@ var variantStyles2 = {
|
|
|
3047
3047
|
"active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
|
|
3048
3048
|
].join(" "),
|
|
3049
3049
|
secondary: [
|
|
3050
|
-
"bg-
|
|
3051
|
-
"border-[length:var(--border-width
|
|
3052
|
-
"hover:bg-[var(--color-
|
|
3050
|
+
"bg-transparent text-[var(--color-accent)]",
|
|
3051
|
+
"border-[length:var(--border-width)] border-[var(--color-accent)]",
|
|
3052
|
+
"hover:bg-[var(--color-accent)] hover:text-white",
|
|
3053
3053
|
"active:scale-[var(--active-scale)]"
|
|
3054
3054
|
].join(" "),
|
|
3055
3055
|
ghost: [
|
package/dist/docs/index.js
CHANGED
|
@@ -3023,9 +3023,9 @@ var variantStyles2 = {
|
|
|
3023
3023
|
"active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
|
|
3024
3024
|
].join(" "),
|
|
3025
3025
|
secondary: [
|
|
3026
|
-
"bg-
|
|
3027
|
-
"border-[length:var(--border-width
|
|
3028
|
-
"hover:bg-[var(--color-
|
|
3026
|
+
"bg-transparent text-[var(--color-accent)]",
|
|
3027
|
+
"border-[length:var(--border-width)] border-[var(--color-accent)]",
|
|
3028
|
+
"hover:bg-[var(--color-accent)] hover:text-white",
|
|
3029
3029
|
"active:scale-[var(--active-scale)]"
|
|
3030
3030
|
].join(" "),
|
|
3031
3031
|
ghost: [
|
|
@@ -2952,6 +2952,35 @@ var AVL_OPERATOR_COLORS = {
|
|
|
2952
2952
|
control: "#E74C3C",
|
|
2953
2953
|
async: "#E91E8F"
|
|
2954
2954
|
};
|
|
2955
|
+
var STATE_COLORS = {
|
|
2956
|
+
initial: { fill: "#22C55E1F", border: "#16A34A" },
|
|
2957
|
+
terminal: { fill: "#EF44441F", border: "#DC2626" },
|
|
2958
|
+
hub: { fill: "#3B82F61F", border: "#2563EB" },
|
|
2959
|
+
error: { fill: "#F59E0B1F", border: "#D97706" },
|
|
2960
|
+
default: { fill: "#6B72801F", border: "#4B5563" }
|
|
2961
|
+
};
|
|
2962
|
+
var EFFECT_CATEGORY_COLORS = {
|
|
2963
|
+
ui: { color: "#8B5CF6", bg: "#8B5CF614" },
|
|
2964
|
+
data: { color: "#3B82F6", bg: "#3B82F614" },
|
|
2965
|
+
communication: { color: "#F97316", bg: "#F9731614" },
|
|
2966
|
+
lifecycle: { color: "#10B981", bg: "#10B98114" },
|
|
2967
|
+
control: { color: "#6B7280", bg: "#6B728014" }
|
|
2968
|
+
};
|
|
2969
|
+
var EFFECT_TYPE_TO_CATEGORY = {
|
|
2970
|
+
"render-ui": "ui",
|
|
2971
|
+
"navigate": "ui",
|
|
2972
|
+
"set": "data",
|
|
2973
|
+
"persist": "data",
|
|
2974
|
+
"fetch": "data",
|
|
2975
|
+
"emit": "communication",
|
|
2976
|
+
"notify": "communication",
|
|
2977
|
+
"call-service": "communication",
|
|
2978
|
+
"spawn": "lifecycle",
|
|
2979
|
+
"despawn": "lifecycle",
|
|
2980
|
+
"do": "control",
|
|
2981
|
+
"if": "control",
|
|
2982
|
+
"log": "control"
|
|
2983
|
+
};
|
|
2955
2984
|
var AvlOrbital = ({
|
|
2956
2985
|
cx = 0,
|
|
2957
2986
|
cy = 0,
|
|
@@ -3223,19 +3252,33 @@ var AvlApplication = ({
|
|
|
3223
3252
|
] });
|
|
3224
3253
|
};
|
|
3225
3254
|
AvlApplication.displayName = "AvlApplication";
|
|
3255
|
+
function computeWidth(explicit, transitionCount) {
|
|
3256
|
+
if (explicit != null) return explicit;
|
|
3257
|
+
if (transitionCount == null) return 100;
|
|
3258
|
+
if (transitionCount >= 5) return 160;
|
|
3259
|
+
if (transitionCount >= 3) return 130;
|
|
3260
|
+
return 100;
|
|
3261
|
+
}
|
|
3226
3262
|
var AvlState = ({
|
|
3227
3263
|
x = 0,
|
|
3228
3264
|
y = 0,
|
|
3229
3265
|
name,
|
|
3230
3266
|
isInitial = false,
|
|
3231
3267
|
isTerminal = false,
|
|
3232
|
-
width
|
|
3268
|
+
width: explicitWidth,
|
|
3233
3269
|
height = 40,
|
|
3234
3270
|
color = "var(--color-primary)",
|
|
3235
3271
|
opacity = 1,
|
|
3236
|
-
className
|
|
3272
|
+
className,
|
|
3273
|
+
role,
|
|
3274
|
+
transitionCount
|
|
3237
3275
|
}) => {
|
|
3276
|
+
const width = computeWidth(explicitWidth, transitionCount);
|
|
3238
3277
|
const rx = height / 2;
|
|
3278
|
+
const roleColors = role ? STATE_COLORS[role] : null;
|
|
3279
|
+
const fillColor = roleColors ? roleColors.fill : "none";
|
|
3280
|
+
const strokeColor = roleColors ? roleColors.border : color;
|
|
3281
|
+
const textColor = roleColors ? roleColors.border : color;
|
|
3239
3282
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
|
|
3240
3283
|
isInitial && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3241
3284
|
"circle",
|
|
@@ -3243,7 +3286,7 @@ var AvlState = ({
|
|
|
3243
3286
|
cx: -16,
|
|
3244
3287
|
cy: height / 2,
|
|
3245
3288
|
r: 6,
|
|
3246
|
-
fill:
|
|
3289
|
+
fill: strokeColor
|
|
3247
3290
|
}
|
|
3248
3291
|
),
|
|
3249
3292
|
isTerminal && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3256,7 +3299,7 @@ var AvlState = ({
|
|
|
3256
3299
|
rx: rx + 4,
|
|
3257
3300
|
ry: rx + 4,
|
|
3258
3301
|
fill: "none",
|
|
3259
|
-
stroke:
|
|
3302
|
+
stroke: strokeColor,
|
|
3260
3303
|
strokeWidth: 1,
|
|
3261
3304
|
opacity: 0.5
|
|
3262
3305
|
}
|
|
@@ -3270,8 +3313,8 @@ var AvlState = ({
|
|
|
3270
3313
|
height,
|
|
3271
3314
|
rx,
|
|
3272
3315
|
ry: rx,
|
|
3273
|
-
fill:
|
|
3274
|
-
stroke:
|
|
3316
|
+
fill: fillColor,
|
|
3317
|
+
stroke: strokeColor,
|
|
3275
3318
|
strokeWidth: 2
|
|
3276
3319
|
}
|
|
3277
3320
|
),
|
|
@@ -3282,8 +3325,9 @@ var AvlState = ({
|
|
|
3282
3325
|
y: height / 2,
|
|
3283
3326
|
textAnchor: "middle",
|
|
3284
3327
|
dominantBaseline: "central",
|
|
3285
|
-
fill:
|
|
3286
|
-
fontSize: 11,
|
|
3328
|
+
fill: textColor,
|
|
3329
|
+
fontSize: role ? 14 : 11,
|
|
3330
|
+
fontWeight: role ? 600 : 400,
|
|
3287
3331
|
fontFamily: "inherit",
|
|
3288
3332
|
children: name
|
|
3289
3333
|
}
|
|
@@ -3552,18 +3596,27 @@ var AvlEffect = ({
|
|
|
3552
3596
|
label,
|
|
3553
3597
|
color = "var(--color-primary)",
|
|
3554
3598
|
opacity = 1,
|
|
3555
|
-
className
|
|
3599
|
+
className,
|
|
3600
|
+
showBackground = false
|
|
3556
3601
|
}) => {
|
|
3602
|
+
const category = EFFECT_TYPE_TO_CATEGORY[effectType];
|
|
3603
|
+
const catColors = EFFECT_CATEGORY_COLORS[category];
|
|
3604
|
+
const iconColor = showBackground ? catColors.color : color;
|
|
3557
3605
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className, opacity, children: [
|
|
3558
|
-
|
|
3606
|
+
showBackground && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3607
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: catColors.bg }),
|
|
3608
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: "none", stroke: catColors.color, strokeWidth: 0.5, opacity: 0.3 })
|
|
3609
|
+
] }),
|
|
3610
|
+
effectIcon(effectType, x, y, size, iconColor),
|
|
3559
3611
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3560
3612
|
"text",
|
|
3561
3613
|
{
|
|
3562
3614
|
x,
|
|
3563
3615
|
y: y + size + 10,
|
|
3564
3616
|
textAnchor: "middle",
|
|
3565
|
-
fill:
|
|
3566
|
-
fontSize:
|
|
3617
|
+
fill: iconColor,
|
|
3618
|
+
fontSize: 11,
|
|
3619
|
+
fontWeight: 500,
|
|
3567
3620
|
fontFamily: "inherit",
|
|
3568
3621
|
opacity: 0.7,
|
|
3569
3622
|
children: label
|
|
@@ -275,6 +275,7 @@ type AvlEffectType = 'render-ui' | 'set' | 'persist' | 'fetch' | 'emit' | 'navig
|
|
|
275
275
|
type AvlFieldTypeKind = 'string' | 'number' | 'boolean' | 'date' | 'enum' | 'object' | 'array';
|
|
276
276
|
type AvlPersistenceKind = 'persistent' | 'runtime' | 'singleton' | 'instance';
|
|
277
277
|
type AvlOperatorNamespace = 'arithmetic' | 'comparison' | 'logic' | 'string' | 'collection' | 'time' | 'control' | 'async';
|
|
278
|
+
type StateRole = 'initial' | 'terminal' | 'hub' | 'error' | 'default';
|
|
278
279
|
|
|
279
280
|
interface AvlOrbitalProps {
|
|
280
281
|
cx?: number;
|
|
@@ -327,6 +328,10 @@ interface AvlStateProps extends AvlBaseProps {
|
|
|
327
328
|
isTerminal?: boolean;
|
|
328
329
|
width?: number;
|
|
329
330
|
height?: number;
|
|
331
|
+
/** V2: Role-based fill color. When set, overrides monochrome rendering. */
|
|
332
|
+
role?: StateRole;
|
|
333
|
+
/** V2: Number of transitions touching this state. Drives proportional width. */
|
|
334
|
+
transitionCount?: number;
|
|
330
335
|
}
|
|
331
336
|
declare const AvlState: React.FC<AvlStateProps>;
|
|
332
337
|
|
|
@@ -364,6 +369,8 @@ interface AvlEffectProps extends AvlBaseProps {
|
|
|
364
369
|
effectType: AvlEffectType;
|
|
365
370
|
size?: number;
|
|
366
371
|
label?: string;
|
|
372
|
+
/** V2: Render a category-colored background circle behind the icon. */
|
|
373
|
+
showBackground?: boolean;
|
|
367
374
|
}
|
|
368
375
|
declare const AvlEffect: React.FC<AvlEffectProps>;
|
|
369
376
|
|
|
@@ -2946,6 +2946,35 @@ var AVL_OPERATOR_COLORS = {
|
|
|
2946
2946
|
control: "#E74C3C",
|
|
2947
2947
|
async: "#E91E8F"
|
|
2948
2948
|
};
|
|
2949
|
+
var STATE_COLORS = {
|
|
2950
|
+
initial: { fill: "#22C55E1F", border: "#16A34A" },
|
|
2951
|
+
terminal: { fill: "#EF44441F", border: "#DC2626" },
|
|
2952
|
+
hub: { fill: "#3B82F61F", border: "#2563EB" },
|
|
2953
|
+
error: { fill: "#F59E0B1F", border: "#D97706" },
|
|
2954
|
+
default: { fill: "#6B72801F", border: "#4B5563" }
|
|
2955
|
+
};
|
|
2956
|
+
var EFFECT_CATEGORY_COLORS = {
|
|
2957
|
+
ui: { color: "#8B5CF6", bg: "#8B5CF614" },
|
|
2958
|
+
data: { color: "#3B82F6", bg: "#3B82F614" },
|
|
2959
|
+
communication: { color: "#F97316", bg: "#F9731614" },
|
|
2960
|
+
lifecycle: { color: "#10B981", bg: "#10B98114" },
|
|
2961
|
+
control: { color: "#6B7280", bg: "#6B728014" }
|
|
2962
|
+
};
|
|
2963
|
+
var EFFECT_TYPE_TO_CATEGORY = {
|
|
2964
|
+
"render-ui": "ui",
|
|
2965
|
+
"navigate": "ui",
|
|
2966
|
+
"set": "data",
|
|
2967
|
+
"persist": "data",
|
|
2968
|
+
"fetch": "data",
|
|
2969
|
+
"emit": "communication",
|
|
2970
|
+
"notify": "communication",
|
|
2971
|
+
"call-service": "communication",
|
|
2972
|
+
"spawn": "lifecycle",
|
|
2973
|
+
"despawn": "lifecycle",
|
|
2974
|
+
"do": "control",
|
|
2975
|
+
"if": "control",
|
|
2976
|
+
"log": "control"
|
|
2977
|
+
};
|
|
2949
2978
|
var AvlOrbital = ({
|
|
2950
2979
|
cx = 0,
|
|
2951
2980
|
cy = 0,
|
|
@@ -3217,19 +3246,33 @@ var AvlApplication = ({
|
|
|
3217
3246
|
] });
|
|
3218
3247
|
};
|
|
3219
3248
|
AvlApplication.displayName = "AvlApplication";
|
|
3249
|
+
function computeWidth(explicit, transitionCount) {
|
|
3250
|
+
if (explicit != null) return explicit;
|
|
3251
|
+
if (transitionCount == null) return 100;
|
|
3252
|
+
if (transitionCount >= 5) return 160;
|
|
3253
|
+
if (transitionCount >= 3) return 130;
|
|
3254
|
+
return 100;
|
|
3255
|
+
}
|
|
3220
3256
|
var AvlState = ({
|
|
3221
3257
|
x = 0,
|
|
3222
3258
|
y = 0,
|
|
3223
3259
|
name,
|
|
3224
3260
|
isInitial = false,
|
|
3225
3261
|
isTerminal = false,
|
|
3226
|
-
width
|
|
3262
|
+
width: explicitWidth,
|
|
3227
3263
|
height = 40,
|
|
3228
3264
|
color = "var(--color-primary)",
|
|
3229
3265
|
opacity = 1,
|
|
3230
|
-
className
|
|
3266
|
+
className,
|
|
3267
|
+
role,
|
|
3268
|
+
transitionCount
|
|
3231
3269
|
}) => {
|
|
3270
|
+
const width = computeWidth(explicitWidth, transitionCount);
|
|
3232
3271
|
const rx = height / 2;
|
|
3272
|
+
const roleColors = role ? STATE_COLORS[role] : null;
|
|
3273
|
+
const fillColor = roleColors ? roleColors.fill : "none";
|
|
3274
|
+
const strokeColor = roleColors ? roleColors.border : color;
|
|
3275
|
+
const textColor = roleColors ? roleColors.border : color;
|
|
3233
3276
|
return /* @__PURE__ */ jsxs("g", { className, opacity, transform: `translate(${x},${y})`, children: [
|
|
3234
3277
|
isInitial && /* @__PURE__ */ jsx(
|
|
3235
3278
|
"circle",
|
|
@@ -3237,7 +3280,7 @@ var AvlState = ({
|
|
|
3237
3280
|
cx: -16,
|
|
3238
3281
|
cy: height / 2,
|
|
3239
3282
|
r: 6,
|
|
3240
|
-
fill:
|
|
3283
|
+
fill: strokeColor
|
|
3241
3284
|
}
|
|
3242
3285
|
),
|
|
3243
3286
|
isTerminal && /* @__PURE__ */ jsx(
|
|
@@ -3250,7 +3293,7 @@ var AvlState = ({
|
|
|
3250
3293
|
rx: rx + 4,
|
|
3251
3294
|
ry: rx + 4,
|
|
3252
3295
|
fill: "none",
|
|
3253
|
-
stroke:
|
|
3296
|
+
stroke: strokeColor,
|
|
3254
3297
|
strokeWidth: 1,
|
|
3255
3298
|
opacity: 0.5
|
|
3256
3299
|
}
|
|
@@ -3264,8 +3307,8 @@ var AvlState = ({
|
|
|
3264
3307
|
height,
|
|
3265
3308
|
rx,
|
|
3266
3309
|
ry: rx,
|
|
3267
|
-
fill:
|
|
3268
|
-
stroke:
|
|
3310
|
+
fill: fillColor,
|
|
3311
|
+
stroke: strokeColor,
|
|
3269
3312
|
strokeWidth: 2
|
|
3270
3313
|
}
|
|
3271
3314
|
),
|
|
@@ -3276,8 +3319,9 @@ var AvlState = ({
|
|
|
3276
3319
|
y: height / 2,
|
|
3277
3320
|
textAnchor: "middle",
|
|
3278
3321
|
dominantBaseline: "central",
|
|
3279
|
-
fill:
|
|
3280
|
-
fontSize: 11,
|
|
3322
|
+
fill: textColor,
|
|
3323
|
+
fontSize: role ? 14 : 11,
|
|
3324
|
+
fontWeight: role ? 600 : 400,
|
|
3281
3325
|
fontFamily: "inherit",
|
|
3282
3326
|
children: name
|
|
3283
3327
|
}
|
|
@@ -3546,18 +3590,27 @@ var AvlEffect = ({
|
|
|
3546
3590
|
label,
|
|
3547
3591
|
color = "var(--color-primary)",
|
|
3548
3592
|
opacity = 1,
|
|
3549
|
-
className
|
|
3593
|
+
className,
|
|
3594
|
+
showBackground = false
|
|
3550
3595
|
}) => {
|
|
3596
|
+
const category = EFFECT_TYPE_TO_CATEGORY[effectType];
|
|
3597
|
+
const catColors = EFFECT_CATEGORY_COLORS[category];
|
|
3598
|
+
const iconColor = showBackground ? catColors.color : color;
|
|
3551
3599
|
return /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
3552
|
-
|
|
3600
|
+
showBackground && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3601
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: catColors.bg }),
|
|
3602
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: "none", stroke: catColors.color, strokeWidth: 0.5, opacity: 0.3 })
|
|
3603
|
+
] }),
|
|
3604
|
+
effectIcon(effectType, x, y, size, iconColor),
|
|
3553
3605
|
label && /* @__PURE__ */ jsx(
|
|
3554
3606
|
"text",
|
|
3555
3607
|
{
|
|
3556
3608
|
x,
|
|
3557
3609
|
y: y + size + 10,
|
|
3558
3610
|
textAnchor: "middle",
|
|
3559
|
-
fill:
|
|
3560
|
-
fontSize:
|
|
3611
|
+
fill: iconColor,
|
|
3612
|
+
fontSize: 11,
|
|
3613
|
+
fontWeight: 500,
|
|
3561
3614
|
fontFamily: "inherit",
|
|
3562
3615
|
opacity: 0.7,
|
|
3563
3616
|
children: label
|