@almadar/shell-web 1.0.0 → 1.1.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 (70) hide show
  1. package/dist/AvlGlyph-PIXU6QH5.js +5 -0
  2. package/dist/AvlStateMachine-CKGMECMG.js +8 -0
  3. package/dist/{AvlTransitionDetail-63SD6GZF.js → AvlTransitionDetail-QZX6G5KJ.js} +4 -5
  4. package/dist/AvlTransitionExplainer-26WLEIC6.js +11 -0
  5. package/dist/BehaviorView-JLZ4PKWY.js +10 -0
  6. package/dist/{FileTree-BCFnBEuQ.d.ts → FileTree-B3GDAjaQ.d.ts} +131 -4
  7. package/dist/{FlowCanvas-AUMTWMNG.js → FlowCanvas-RPII4V24.js} +10 -13
  8. package/dist/{FlowCanvas-3JRMNJLV.css → FlowCanvas-VWUPMBKB.css} +189 -191
  9. package/dist/{GameAudioProvider-ceM_n0ey.d.ts → GameAudioProvider-D7wo5ryN.d.ts} +1 -1
  10. package/dist/{KernelEngineContext-CcxGYtlr.d.ts → KernelEngineContext-CPeWQMAz.d.ts} +15 -2
  11. package/dist/ModuleCard-NJD6JQGD.js +6 -0
  12. package/dist/{OrbInspector-QCPEPUPH.js → OrbInspector-OWWKPOBF.js} +10 -13
  13. package/dist/{OrbInspector-MHLJ6OEE.css → OrbInspector-VMTMZHNQ.css} +189 -191
  14. package/dist/{Select-B-iDdnvE.d.ts → Select-C2Uq6t86.d.ts} +1 -1
  15. package/dist/{UISlotRenderer-KVFO6J7R.css → UISlotRenderer-BIS6KT7T.css} +189 -191
  16. package/dist/{UISlotRenderer-C7WWOK43.js → UISlotRenderer-PY7FIJXN.js} +10 -13
  17. package/dist/avl/index.css +189 -191
  18. package/dist/avl/index.d.ts +19 -7
  19. package/dist/avl/index.js +157 -26
  20. package/dist/{chunk-TUPZWTRE.js → chunk-2WGR4TDJ.js} +464 -35
  21. package/dist/{chunk-SP5CDJ6K.js → chunk-4YJ53G7S.js} +3 -3
  22. package/dist/{chunk-HH5KSMH5.js → chunk-7N6ZPHQ5.js} +1 -1
  23. package/dist/{chunk-CPLN6NBQ.js → chunk-AGVSO4WY.js} +2 -3
  24. package/dist/{chunk-UXLE3IPR.js → chunk-FAKU5F62.js} +205 -4
  25. package/dist/{chunk-TXAUOLWZ.js → chunk-M74BCDBQ.js} +1 -1
  26. package/dist/{chunk-LHP2TK7O.js → chunk-MS4K3K2R.js} +2908 -4574
  27. package/dist/{chunk-K4MOPSEL.js → chunk-OWNG4JZI.js} +3 -4
  28. package/dist/{chunk-AB3X7QTE.js → chunk-PRLHKBXG.js} +1 -2
  29. package/dist/{chunk-X3DMMX27.js → chunk-VHC2M26B.js} +1 -1
  30. package/dist/{chunk-E6KA4J6N.js → chunk-VUIACGDU.js} +3 -4
  31. package/dist/{chunk-ROICKAU7.js → chunk-YYIHRIDH.js} +1 -1
  32. package/dist/{chunk-3VZ36ZKO.js → chunk-ZDRDJKYB.js} +5 -2
  33. package/dist/components/index.css +189 -191
  34. package/dist/components/index.d.ts +417 -173
  35. package/dist/components/index.js +14 -17
  36. package/dist/core.d.ts +3 -3
  37. package/dist/{fx-CmQjnHmT.d.ts → fx-Br8zjvu9.d.ts} +6 -6
  38. package/dist/index.d.ts +4 -0
  39. package/dist/index.js +2 -2
  40. package/dist/{kernel-client-TZKGHJRY.js → kernel-client-JW6OH5FX.js} +24 -3
  41. package/dist/{kernel-wire-wNdAPfhJ.d.ts → kernel-wire-DGAySGhX.d.ts} +7 -0
  42. package/dist/lib/index.d.ts +2 -3
  43. package/dist/lib/index.js +2 -3
  44. package/dist/providers/index.css +189 -191
  45. package/dist/providers/index.d.ts +6 -8
  46. package/dist/providers/index.js +10 -14
  47. package/dist/runtime/index.css +189 -191
  48. package/dist/runtime/index.d.ts +6 -1
  49. package/dist/runtime/index.js +10 -13
  50. package/dist/test-support.js +2 -2
  51. package/dist/{paintDispatch-CuJLsr9Y.d.ts → verificationRegistry-oopV1J1n.d.ts} +127 -15
  52. package/package.json +8 -36
  53. package/dist/AvlGlyph-EPJKFEO3.js +0 -6
  54. package/dist/AvlStateMachine-RKZIKNGC.js +0 -9
  55. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +0 -12
  56. package/dist/BehaviorView-YS5G4GNB.js +0 -11
  57. package/dist/Canvas3DHost-BkZQB5l2.d.ts +0 -552
  58. package/dist/ModuleCard-QHDGK5XK.js +0 -7
  59. package/dist/avl-3d-context-BycmO6tG.d.ts +0 -201
  60. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +0 -132
  61. package/dist/avl-zoom-state-CKMVuBFg.d.ts +0 -17
  62. package/dist/chunk-4T3P43NS.js +0 -1133
  63. package/dist/chunk-DZBQA2OW.js +0 -176
  64. package/dist/chunk-EOWMARUB.js +0 -16
  65. package/dist/chunk-GFXCPUMX.js +0 -1334
  66. package/dist/chunk-ILZ7ORX7.js +0 -432
  67. package/dist/three/index.css +0 -503
  68. package/dist/three/index.d.ts +0 -1185
  69. package/dist/three/index.js +0 -3908
  70. package/dist/verificationRegistry-CVrcxG1s.d.ts +0 -122
@@ -1,176 +0,0 @@
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 };
@@ -1,16 +0,0 @@
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 };