@almadar/shell-web 0.0.0-stage → 1.0.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/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
- package/dist/AvlGlyph-EPJKFEO3.js +6 -0
- package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
- package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
- package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
- package/dist/BehaviorView-YS5G4GNB.js +11 -0
- package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
- package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-AUMTWMNG.js +26 -0
- package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -0
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
- package/dist/LayersPanel-M2LHWUFF.js +6 -0
- package/dist/ModuleCard-QHDGK5XK.js +7 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/OrbInspector-QCPEPUPH.js +26 -0
- package/dist/Select-B-iDdnvE.d.ts +185 -0
- package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-C7WWOK43.js +26 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +2 -0
- package/dist/auth/react/index.d.ts +56 -0
- package/dist/auth/react/index.js +157 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2248 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-3S54FWRC.js +131 -0
- package/dist/chunk-3VZ36ZKO.js +775 -0
- package/dist/chunk-4T3P43NS.js +1133 -0
- package/dist/chunk-4YXBKHHM.js +11488 -0
- package/dist/chunk-57DC34LY.js +525 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AB3X7QTE.js +505 -0
- package/dist/chunk-AE7VCQB6.js +561 -0
- package/dist/chunk-AGXD77SL.js +98 -0
- package/dist/chunk-AU7O65OX.js +66 -0
- package/dist/chunk-CPLN6NBQ.js +701 -0
- package/dist/chunk-DZBQA2OW.js +176 -0
- package/dist/chunk-E6KA4J6N.js +227 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GFXCPUMX.js +1334 -0
- package/dist/chunk-HH5KSMH5.js +311 -0
- package/dist/chunk-ILQXJ2AR.js +280 -0
- package/dist/chunk-ILZ7ORX7.js +432 -0
- package/dist/chunk-K4MOPSEL.js +674 -0
- package/dist/chunk-LHP2TK7O.js +47587 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PCR37T3U.js +296 -0
- package/dist/chunk-PRXQGGCO.js +580 -0
- package/dist/chunk-REXYVBUO.js +191 -0
- package/dist/chunk-ROICKAU7.js +24 -0
- package/dist/chunk-SP5CDJ6K.js +338 -0
- package/dist/chunk-TUPZWTRE.js +1051 -0
- package/dist/chunk-TXAUOLWZ.js +490 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-UTDC2NEA.js +14 -0
- package/dist/chunk-UU57VNS2.js +1053 -0
- package/dist/chunk-UXLE3IPR.js +421 -0
- package/dist/chunk-VO2TTLS5.js +94 -0
- package/dist/chunk-X3DMMX27.js +11 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11299 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +8 -0
- package/dist/core.d.ts +2599 -0
- package/dist/core.js +3 -0
- package/dist/design-classes/index.cjs +431 -0
- package/dist/design-classes/index.d.cts +165 -0
- package/dist/design-classes/index.d.ts +165 -0
- package/dist/design-classes/index.js +399 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +971 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +178 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-TZKGHJRY.js +516 -0
- package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1289 -0
- package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -0
- package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
- package/dist/perf-CKiBKbkw.d.ts +22 -0
- package/dist/perf-Dr28-AgT.d.ts +57 -0
- package/dist/prism-X5YWKXO5.js +136 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +355 -0
- package/dist/providers/index.js +29 -0
- package/dist/renderer/index.d.ts +465 -0
- package/dist/renderer/index.js +4 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +239 -0
- package/dist/runtime/index.js +28 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +9739 -0
- package/dist/ssr/index.d.cts +464 -0
- package/dist/ssr/index.d.ts +464 -0
- package/dist/ssr/index.js +9703 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +2 -0
- package/dist/test-support.d.ts +42 -0
- package/dist/test-support.js +181 -0
- package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
- package/dist/three/index.css +503 -0
- package/dist/three/index.d.ts +1185 -0
- package/dist/three/index.js +3908 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +273 -3
- package/src/core/lib/band-shapes.json +7 -0
- package/src/core/locales/ar.json +1276 -0
- package/src/core/locales/en.json +1276 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1276 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +1020 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { effectCategoryOf, EFFECT_CATEGORY_COLORS, asEffectOperator } from './chunk-UXLE3IPR.js';
|
|
2
|
+
import { createLogger } from '@almadar/logger';
|
|
3
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var log = createLogger("almadar:ui:avl:effect");
|
|
6
|
+
function headIcon(type, x, y, s, color) {
|
|
7
|
+
switch (type) {
|
|
8
|
+
case "render-ui":
|
|
9
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
10
|
+
/* @__PURE__ */ jsx("rect", { x: x - s, y: y - s, width: s * 2, height: s * 2, fill: "none", stroke: color, strokeWidth: 1.5, rx: 1 }),
|
|
11
|
+
/* @__PURE__ */ jsx("line", { x1: x, y1: y - s, x2: x, y2: y + s, stroke: color, strokeWidth: 1 }),
|
|
12
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y, x2: x + s, y2: y, stroke: color, strokeWidth: 1 })
|
|
13
|
+
] });
|
|
14
|
+
case "set":
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: `M${x - s * 0.6},${y + s} L${x - s},${y + s * 0.4} L${x + s * 0.4},${y - s} L${x + s},${y - s * 0.4} Z`,
|
|
19
|
+
fill: "none",
|
|
20
|
+
stroke: color,
|
|
21
|
+
strokeWidth: 1.5,
|
|
22
|
+
strokeLinejoin: "round"
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
case "persist":
|
|
26
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
27
|
+
/* @__PURE__ */ jsx("ellipse", { cx: x, cy: y - s * 0.6, rx: s, ry: s * 0.4, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
28
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.6, x2: x - s, y2: y + s * 0.4, stroke: color, strokeWidth: 1.5 }),
|
|
29
|
+
/* @__PURE__ */ jsx("line", { x1: x + s, y1: y - s * 0.6, x2: x + s, y2: y + s * 0.4, stroke: color, strokeWidth: 1.5 }),
|
|
30
|
+
/* @__PURE__ */ jsx("ellipse", { cx: x, cy: y + s * 0.4, rx: s, ry: s * 0.4, fill: "none", stroke: color, strokeWidth: 1.5 })
|
|
31
|
+
] });
|
|
32
|
+
case "fetch":
|
|
33
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
34
|
+
/* @__PURE__ */ jsx("line", { x1: x, y1: y - s, x2: x, y2: y + s * 0.6, stroke: color, strokeWidth: 1.5 }),
|
|
35
|
+
/* @__PURE__ */ jsx("polyline", { points: `${x - s * 0.5},${y + s * 0.1} ${x},${y + s} ${x + s * 0.5},${y + s * 0.1}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
|
|
36
|
+
] });
|
|
37
|
+
case "emit":
|
|
38
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
39
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.3, fill: color }),
|
|
40
|
+
/* @__PURE__ */ jsx("path", { d: `M${x - s * 0.7},${y - s * 0.7} A${s},${s} 0 0,1 ${x + s * 0.7},${y - s * 0.7}`, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
41
|
+
/* @__PURE__ */ jsx("path", { d: `M${x - s},${y - s} A${s * 1.4},${s * 1.4} 0 0,1 ${x + s},${y - s}`, fill: "none", stroke: color, strokeWidth: 1, opacity: 0.6 })
|
|
42
|
+
] });
|
|
43
|
+
case "navigate":
|
|
44
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
45
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y, x2: x + s * 0.6, y2: y, stroke: color, strokeWidth: 1.5 }),
|
|
46
|
+
/* @__PURE__ */ jsx("polyline", { points: `${x + s * 0.1},${y - s * 0.5} ${x + s},${y} ${x + s * 0.1},${y + s * 0.5}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
|
|
47
|
+
] });
|
|
48
|
+
case "call-service":
|
|
49
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
50
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.3, x2: x + s, y2: y - s * 0.3, stroke: color, strokeWidth: 1.5 }),
|
|
51
|
+
/* @__PURE__ */ jsx("polyline", { points: `${x + s * 0.5},${y - s * 0.7} ${x + s},${y - s * 0.3} ${x + s * 0.5},${y + s * 0.1}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" }),
|
|
52
|
+
/* @__PURE__ */ jsx("line", { x1: x + s, y1: y + s * 0.3, x2: x - s, y2: y + s * 0.3, stroke: color, strokeWidth: 1.5 }),
|
|
53
|
+
/* @__PURE__ */ jsx("polyline", { points: `${x - s * 0.5},${y - s * 0.1} ${x - s},${y + s * 0.3} ${x - s * 0.5},${y + s * 0.7}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
|
|
54
|
+
] });
|
|
55
|
+
case "spawn":
|
|
56
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
57
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
58
|
+
/* @__PURE__ */ jsx("line", { x1: x - s * 0.5, y1: y, x2: x + s * 0.5, y2: y, stroke: color, strokeWidth: 1.5 }),
|
|
59
|
+
/* @__PURE__ */ jsx("line", { x1: x, y1: y - s * 0.5, x2: x, y2: y + s * 0.5, stroke: color, strokeWidth: 1.5 })
|
|
60
|
+
] });
|
|
61
|
+
case "despawn":
|
|
62
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
63
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
64
|
+
/* @__PURE__ */ jsx("line", { x1: x - s * 0.5, y1: y, x2: x + s * 0.5, y2: y, stroke: color, strokeWidth: 1.5 })
|
|
65
|
+
] });
|
|
66
|
+
case "do":
|
|
67
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
68
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
69
|
+
/* @__PURE__ */ jsx("polygon", { points: `${x - s * 0.3},${y - s * 0.5} ${x + s * 0.5},${y} ${x - s * 0.3},${y + s * 0.5}`, fill: color })
|
|
70
|
+
] });
|
|
71
|
+
case "if":
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"polygon",
|
|
74
|
+
{
|
|
75
|
+
points: `${x},${y - s} ${x + s * 0.7},${y} ${x},${y + s} ${x - s * 0.7},${y}`,
|
|
76
|
+
fill: "none",
|
|
77
|
+
stroke: color,
|
|
78
|
+
strokeWidth: 1.5,
|
|
79
|
+
strokeLinejoin: "round"
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
case "log":
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
"text",
|
|
85
|
+
{
|
|
86
|
+
x,
|
|
87
|
+
y,
|
|
88
|
+
textAnchor: "middle",
|
|
89
|
+
dominantBaseline: "central",
|
|
90
|
+
fill: color,
|
|
91
|
+
fontSize: s * 2.2,
|
|
92
|
+
fontFamily: "serif",
|
|
93
|
+
children: "\xB6"
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
default:
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
var clock = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
|
|
101
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.5 }),
|
|
102
|
+
/* @__PURE__ */ jsx("polyline", { points: `${x},${y - s * 0.6} ${x},${y} ${x + s * 0.5},${y + s * 0.3}`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round" })
|
|
103
|
+
] });
|
|
104
|
+
var neuron = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
|
|
105
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y - s * 0.6, x2: x + s * 0.8, y2: y, stroke: color, strokeWidth: 1 }),
|
|
106
|
+
/* @__PURE__ */ jsx("line", { x1: x - s, y1: y + s * 0.6, x2: x + s * 0.8, y2: y, stroke: color, strokeWidth: 1 }),
|
|
107
|
+
/* @__PURE__ */ jsx("circle", { cx: x - s, cy: y - s * 0.6, r: s * 0.3, fill: color }),
|
|
108
|
+
/* @__PURE__ */ jsx("circle", { cx: x - s, cy: y + s * 0.6, r: s * 0.3, fill: color }),
|
|
109
|
+
/* @__PURE__ */ jsx("circle", { cx: x + s * 0.8, cy: y, r: s * 0.35, fill: color })
|
|
110
|
+
] });
|
|
111
|
+
var gear = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
|
|
112
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.75, fill: "none", stroke: color, strokeWidth: 1.5, strokeDasharray: `${s * 0.5} ${s * 0.3}` }),
|
|
113
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s * 0.3, fill: color })
|
|
114
|
+
] });
|
|
115
|
+
var unknown = (x, y, s, color) => /* @__PURE__ */ jsxs("g", { children: [
|
|
116
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: s, fill: "none", stroke: color, strokeWidth: 1.2, strokeDasharray: "2 2" }),
|
|
117
|
+
/* @__PURE__ */ jsx("text", { x, y, textAnchor: "middle", dominantBaseline: "central", fill: color, fontSize: s * 1.4, children: "?" })
|
|
118
|
+
] });
|
|
119
|
+
var CATEGORY_GLYPH = {
|
|
120
|
+
ui: (x, y, s, c) => headIcon("render-ui", x, y, s, c),
|
|
121
|
+
data: (x, y, s, c) => headIcon("set", x, y, s, c),
|
|
122
|
+
communication: (x, y, s, c) => headIcon("emit", x, y, s, c),
|
|
123
|
+
lifecycle: (x, y, s, c) => headIcon("spawn", x, y, s, c),
|
|
124
|
+
control: (x, y, s, c) => headIcon("if", x, y, s, c),
|
|
125
|
+
async: clock,
|
|
126
|
+
compute: neuron,
|
|
127
|
+
system: gear
|
|
128
|
+
};
|
|
129
|
+
function effectIcon(type, x, y, s, color) {
|
|
130
|
+
const op = asEffectOperator(type);
|
|
131
|
+
const own = op ? headIcon(op, x, y, s, color) : null;
|
|
132
|
+
if (own) return own;
|
|
133
|
+
const category = effectCategoryOf(type);
|
|
134
|
+
if (category) return CATEGORY_GLYPH[category](x, y, s, color);
|
|
135
|
+
log.error("unknown-effect-operator", { effectType: type });
|
|
136
|
+
return unknown(x, y, s, color);
|
|
137
|
+
}
|
|
138
|
+
var AvlEffect = ({
|
|
139
|
+
x = 0,
|
|
140
|
+
y = 0,
|
|
141
|
+
effectType,
|
|
142
|
+
size = 8,
|
|
143
|
+
label,
|
|
144
|
+
color = "var(--color-primary)",
|
|
145
|
+
opacity = 1,
|
|
146
|
+
className,
|
|
147
|
+
showBackground = false
|
|
148
|
+
}) => {
|
|
149
|
+
const category = effectCategoryOf(effectType);
|
|
150
|
+
const catColors = category ? EFFECT_CATEGORY_COLORS[category] : null;
|
|
151
|
+
const iconColor = showBackground && catColors ? catColors.color : color;
|
|
152
|
+
return /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
153
|
+
showBackground && catColors && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
154
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: catColors.bg }),
|
|
155
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: size * 1.2, fill: "none", stroke: catColors.color, strokeWidth: 0.5, opacity: 0.3 })
|
|
156
|
+
] }),
|
|
157
|
+
effectIcon(effectType, x, y, size, iconColor),
|
|
158
|
+
label && /* @__PURE__ */ jsx(
|
|
159
|
+
"text",
|
|
160
|
+
{
|
|
161
|
+
x,
|
|
162
|
+
y: y + size + 10,
|
|
163
|
+
textAnchor: "middle",
|
|
164
|
+
fill: iconColor,
|
|
165
|
+
fontSize: 11,
|
|
166
|
+
fontWeight: 500,
|
|
167
|
+
fontFamily: "inherit",
|
|
168
|
+
opacity: 0.7,
|
|
169
|
+
children: label
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
] });
|
|
173
|
+
};
|
|
174
|
+
AvlEffect.displayName = "AvlEffect";
|
|
175
|
+
|
|
176
|
+
export { AvlEffect };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { AvlState, AvlEntity, AvlFieldType, AvlPage } from './chunk-HH5KSMH5.js';
|
|
2
|
+
import { AvlExplain, useEffectLines } from './chunk-AB3X7QTE.js';
|
|
3
|
+
import { AvlEffect } from './chunk-DZBQA2OW.js';
|
|
4
|
+
import { getStateRole, CONNECTION_COLORS } from './chunk-UXLE3IPR.js';
|
|
5
|
+
import { useTranslate, Box, cn, domPassthrough } from './chunk-4YXBKHHM.js';
|
|
6
|
+
import { useNodeId, ReactFlowProvider, Handle, Position } from '@xyflow/react';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var hitStyle = (b) => ({ position: "absolute", left: b.left, top: b.top, width: b.width, height: b.height });
|
|
11
|
+
var HIT_CLASS = "rounded-full cursor-help focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
12
|
+
var EffectHit = ({ effectType, box, note }) => {
|
|
13
|
+
const lines = useEffectLines(effectType);
|
|
14
|
+
return /* @__PURE__ */ jsx(AvlExplain, { lines, note, children: /* @__PURE__ */ jsx(Box, { as: "span", role: "img", tabIndex: 0, "aria-label": effectType, className: HIT_CLASS, style: hitStyle(box) }) });
|
|
15
|
+
};
|
|
16
|
+
var NODE_W = 24;
|
|
17
|
+
var NODE_H = 16;
|
|
18
|
+
var GAP = 8;
|
|
19
|
+
var ARROW_W = 16;
|
|
20
|
+
var INITIAL_MARGIN = 24;
|
|
21
|
+
var TERMINAL_OUTSET = 4;
|
|
22
|
+
var EFFECT_SIZE = 5;
|
|
23
|
+
var EFFECT_R = EFFECT_SIZE * 1.2;
|
|
24
|
+
var EFFECT_GAP = 4;
|
|
25
|
+
var ROW_GAP = 6;
|
|
26
|
+
var EDGE = 2;
|
|
27
|
+
var MiniStateMachine = ({ data, annotations, className }) => {
|
|
28
|
+
const { t } = useTranslate();
|
|
29
|
+
const states = data.states;
|
|
30
|
+
if (states.length === 0) return null;
|
|
31
|
+
const transitionCounts = {};
|
|
32
|
+
for (const s of states) transitionCounts[s.name] = 0;
|
|
33
|
+
for (const t2 of data.transitions) {
|
|
34
|
+
transitionCounts[t2.from] = (transitionCounts[t2.from] ?? 0) + 1;
|
|
35
|
+
transitionCounts[t2.to] = (transitionCounts[t2.to] ?? 0) + 1;
|
|
36
|
+
}
|
|
37
|
+
const maxTC = Math.max(...Object.values(transitionCounts), 0);
|
|
38
|
+
const effectTypes = /* @__PURE__ */ new Set();
|
|
39
|
+
for (const t2 of data.transitions) {
|
|
40
|
+
for (const e of t2.effects) effectTypes.add(e.type);
|
|
41
|
+
}
|
|
42
|
+
const effectList = Array.from(effectTypes).slice(0, 6);
|
|
43
|
+
const stateStep = NODE_W + GAP + ARROW_W + GAP;
|
|
44
|
+
const rowTop = TERMINAL_OUTSET + EDGE;
|
|
45
|
+
const statesRight = INITIAL_MARGIN + (states.length - 1) * stateStep + NODE_W + TERMINAL_OUTSET;
|
|
46
|
+
const effectTop = rowTop + NODE_H + TERMINAL_OUTSET + ROW_GAP;
|
|
47
|
+
const effectCy = effectTop + EFFECT_R;
|
|
48
|
+
const effectStep = EFFECT_R * 2 + EFFECT_GAP;
|
|
49
|
+
const effectsRight = EDGE + effectList.length * effectStep - EFFECT_GAP;
|
|
50
|
+
const svgW = Math.max(statesRight, effectsRight) + EDGE;
|
|
51
|
+
const svgH = (effectList.length > 0 ? effectTop + EFFECT_R * 2 : rowTop + NODE_H + TERMINAL_OUTSET) + EDGE;
|
|
52
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("relative inline-block", className), style: { width: svgW, height: svgH }, children: [
|
|
53
|
+
/* @__PURE__ */ jsxs("svg", { width: svgW, height: svgH, viewBox: `0 0 ${svgW} ${svgH}`, "aria-hidden": "true", children: [
|
|
54
|
+
states.map((s, i) => {
|
|
55
|
+
const x = INITIAL_MARGIN + i * stateStep;
|
|
56
|
+
const tc = transitionCounts[s.name] ?? 0;
|
|
57
|
+
const role = getStateRole(s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
58
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
AvlState,
|
|
61
|
+
{
|
|
62
|
+
x,
|
|
63
|
+
y: rowTop,
|
|
64
|
+
width: NODE_W,
|
|
65
|
+
height: NODE_H,
|
|
66
|
+
name: "",
|
|
67
|
+
role,
|
|
68
|
+
isInitial: s.isInitial ?? void 0,
|
|
69
|
+
isTerminal: s.isTerminal ?? void 0
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
i < states.length - 1 && /* @__PURE__ */ jsxs("g", { children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
"line",
|
|
75
|
+
{
|
|
76
|
+
x1: x + NODE_W + GAP,
|
|
77
|
+
y1: rowTop + NODE_H / 2,
|
|
78
|
+
x2: x + NODE_W + GAP + ARROW_W - 3,
|
|
79
|
+
y2: rowTop + NODE_H / 2,
|
|
80
|
+
stroke: "var(--color-muted-foreground)",
|
|
81
|
+
strokeWidth: 1,
|
|
82
|
+
opacity: 0.4
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
"polygon",
|
|
87
|
+
{
|
|
88
|
+
points: `${x + NODE_W + GAP + ARROW_W - 3},${rowTop + NODE_H / 2 - 2.5} ${x + NODE_W + GAP + ARROW_W},${rowTop + NODE_H / 2} ${x + NODE_W + GAP + ARROW_W - 3},${rowTop + NODE_H / 2 + 2.5}`,
|
|
89
|
+
fill: "var(--color-muted-foreground)",
|
|
90
|
+
opacity: 0.4
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] })
|
|
94
|
+
] }, s.name);
|
|
95
|
+
}),
|
|
96
|
+
effectList.length > 0 && /* @__PURE__ */ jsx("g", { children: effectList.map((et, i) => /* @__PURE__ */ jsx("g", { "data-testid": "mini-sm-effect", children: /* @__PURE__ */ jsx(
|
|
97
|
+
AvlEffect,
|
|
98
|
+
{
|
|
99
|
+
x: EDGE + EFFECT_R + i * effectStep,
|
|
100
|
+
y: effectCy,
|
|
101
|
+
effectType: et,
|
|
102
|
+
size: EFFECT_SIZE,
|
|
103
|
+
showBackground: true
|
|
104
|
+
}
|
|
105
|
+
) }, et)) })
|
|
106
|
+
] }),
|
|
107
|
+
states.map((s, i) => {
|
|
108
|
+
const marks = [...s.isInitial ? [t("avl.stateInitial")] : [], ...s.isTerminal ? [t("avl.stateTerminal")] : []];
|
|
109
|
+
return /* @__PURE__ */ jsx(AvlExplain, { lines: marks.length > 0 ? [s.name, marks.join(" \xB7 ")] : [s.name], note: annotations?.states?.[s.name], children: /* @__PURE__ */ jsx(
|
|
110
|
+
Box,
|
|
111
|
+
{
|
|
112
|
+
as: "span",
|
|
113
|
+
role: "img",
|
|
114
|
+
tabIndex: 0,
|
|
115
|
+
"aria-label": s.name,
|
|
116
|
+
className: HIT_CLASS,
|
|
117
|
+
style: hitStyle({ left: INITIAL_MARGIN + i * stateStep, top: rowTop, width: NODE_W, height: NODE_H })
|
|
118
|
+
}
|
|
119
|
+
) }, `hit-${s.name}`);
|
|
120
|
+
}),
|
|
121
|
+
effectList.map((et, i) => /* @__PURE__ */ jsx(
|
|
122
|
+
EffectHit,
|
|
123
|
+
{
|
|
124
|
+
effectType: et,
|
|
125
|
+
note: annotations?.effects?.[et],
|
|
126
|
+
box: { left: EDGE + i * effectStep, top: effectTop, width: EFFECT_R * 2, height: EFFECT_R * 2 }
|
|
127
|
+
},
|
|
128
|
+
`hit-${et}`
|
|
129
|
+
))
|
|
130
|
+
] });
|
|
131
|
+
};
|
|
132
|
+
MiniStateMachine.displayName = "MiniStateMachine";
|
|
133
|
+
function toFieldKind(type) {
|
|
134
|
+
const normalized = type.toLowerCase();
|
|
135
|
+
if (["string", "number", "boolean", "date", "enum", "object", "array"].includes(normalized)) {
|
|
136
|
+
return normalized;
|
|
137
|
+
}
|
|
138
|
+
return "string";
|
|
139
|
+
}
|
|
140
|
+
var PERSISTENCE_BORDER = {
|
|
141
|
+
persistent: "border-l-[3px] border-l-primary border-solid",
|
|
142
|
+
runtime: "border-l-[3px] border-l-primary border-dashed",
|
|
143
|
+
singleton: "border-l-[3px] border-l-primary border-double",
|
|
144
|
+
instance: "border-l-[3px] border-l-primary border-dotted"
|
|
145
|
+
};
|
|
146
|
+
var PERSISTENCE_ICON = {
|
|
147
|
+
persistent: "\u26C1",
|
|
148
|
+
// ⛁ cylinder
|
|
149
|
+
runtime: "\u27F3",
|
|
150
|
+
// ⟳ cycle
|
|
151
|
+
singleton: "\u25CE",
|
|
152
|
+
// ◎ double ring
|
|
153
|
+
instance: "\u22A1"
|
|
154
|
+
// ⊡ box
|
|
155
|
+
};
|
|
156
|
+
var ModuleCardInner = ({ data, annotations, ...rest }) => {
|
|
157
|
+
const {
|
|
158
|
+
orbitalName,
|
|
159
|
+
entityName,
|
|
160
|
+
persistence,
|
|
161
|
+
fields,
|
|
162
|
+
traits,
|
|
163
|
+
pages,
|
|
164
|
+
traitDetails,
|
|
165
|
+
externalLinks
|
|
166
|
+
} = data;
|
|
167
|
+
const cols = Math.min(3, Math.max(2, Math.ceil(fields.length / 3)));
|
|
168
|
+
return /* @__PURE__ */ jsxs(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
...domPassthrough(rest),
|
|
172
|
+
className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] shadow-sm overflow-hidden",
|
|
173
|
+
style: { minWidth: 280, maxWidth: 400 },
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Left, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
176
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Right, className: "!w-2.5 !h-2.5 !bg-warning" }),
|
|
177
|
+
/* @__PURE__ */ jsx("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx("span", { className: "text-base font-bold text-[var(--color-foreground)]", children: orbitalName }) }),
|
|
178
|
+
/* @__PURE__ */ jsxs("div", { className: `px-3 py-2 border-b border-[var(--color-border)] ${PERSISTENCE_BORDER[persistence] ?? ""}`, children: [
|
|
179
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
|
|
180
|
+
/* @__PURE__ */ jsx("svg", { width: 18, height: 18, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx(AvlEntity, { x: 10, y: 10, r: 8, persistence }) }),
|
|
181
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[var(--color-foreground)]", children: entityName }),
|
|
182
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto text-xs opacity-50", title: persistence, children: PERSISTENCE_ICON[persistence] ?? "" })
|
|
183
|
+
] }),
|
|
184
|
+
fields.length > 0 && /* @__PURE__ */ jsx("div", { className: `grid gap-x-3 gap-y-0.5`, style: { gridTemplateColumns: `repeat(${cols}, 1fr)` }, children: fields.map((f) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
185
|
+
/* @__PURE__ */ jsx(AvlExplain, { lines: [f.name, f.type], children: /* @__PURE__ */ jsx(Box, { as: "span", role: "img", tabIndex: 0, "aria-label": `${f.name}: ${f.type}`, className: "inline-flex cursor-help rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx(AvlFieldType, { x: 8, y: 8, kind: toFieldKind(f.type), size: 6 }) }) }) }),
|
|
186
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-[var(--color-muted-foreground)] truncate", children: f.name })
|
|
187
|
+
] }, f.name)) })
|
|
188
|
+
] }),
|
|
189
|
+
traits.map((trait) => {
|
|
190
|
+
const detail = traitDetails[trait.name];
|
|
191
|
+
const traitEmits = externalLinks.filter((l) => l.direction === "out" && l.traitName === trait.name);
|
|
192
|
+
const traitListens = externalLinks.filter((l) => l.direction === "in" && l.traitName === trait.name);
|
|
193
|
+
return /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
194
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold text-[var(--color-foreground)] mb-1", children: trait.name }),
|
|
195
|
+
detail && /* @__PURE__ */ jsx(MiniStateMachine, { data: detail, annotations: annotations?.[trait.name], className: "mb-1" }),
|
|
196
|
+
(traitEmits.length > 0 || traitListens.length > 0) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[9px] mt-1", children: [
|
|
197
|
+
traitListens.map((l) => /* @__PURE__ */ jsxs("span", { style: { color: CONNECTION_COLORS.emitListen.color }, children: [
|
|
198
|
+
"\u25C0~~",
|
|
199
|
+
" ",
|
|
200
|
+
l.eventName
|
|
201
|
+
] }, l.eventName)),
|
|
202
|
+
traitListens.length > 0 && traitEmits.length > 0 && /* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
203
|
+
traitEmits.map((l) => /* @__PURE__ */ jsxs("span", { style: { color: CONNECTION_COLORS.emitListen.color }, className: "ml-auto", children: [
|
|
204
|
+
l.eventName,
|
|
205
|
+
" ",
|
|
206
|
+
"~~\u25B6"
|
|
207
|
+
] }, l.eventName))
|
|
208
|
+
] })
|
|
209
|
+
] }, trait.name);
|
|
210
|
+
}),
|
|
211
|
+
pages.length > 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-1.5 flex items-center gap-2 flex-wrap", children: pages.map((p) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
|
|
212
|
+
/* @__PURE__ */ jsx("svg", { width: 10, height: 10, viewBox: "0 0 12 12", children: /* @__PURE__ */ jsx(AvlPage, { x: 6, y: 6, size: 5 }) }),
|
|
213
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-[var(--color-muted-foreground)]", children: p.route })
|
|
214
|
+
] }, p.name)) })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
};
|
|
219
|
+
ModuleCardInner.displayName = "ModuleCardInner";
|
|
220
|
+
var ModuleCard = (props) => {
|
|
221
|
+
const nodeId = useNodeId();
|
|
222
|
+
if (nodeId !== null) return /* @__PURE__ */ jsx(ModuleCardInner, { ...props });
|
|
223
|
+
return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(ModuleCardInner, { ...props }) });
|
|
224
|
+
};
|
|
225
|
+
ModuleCard.displayName = "ModuleCard";
|
|
226
|
+
|
|
227
|
+
export { MiniStateMachine, ModuleCard };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
var DEFAULT_CONFIG = {
|
|
4
|
+
modelOverrides: {},
|
|
5
|
+
effectsEnabled: true,
|
|
6
|
+
palette: null
|
|
7
|
+
};
|
|
8
|
+
var Avl3DContext = createContext(DEFAULT_CONFIG);
|
|
9
|
+
function useAvl3DConfig() {
|
|
10
|
+
return useContext(Avl3DContext);
|
|
11
|
+
}
|
|
12
|
+
function useAvl3DPalette() {
|
|
13
|
+
return useContext(Avl3DContext).palette;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Avl3DContext, useAvl3DConfig, useAvl3DPalette };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
|
|
19
|
+
export { __export, __reExport };
|