@backbay/glia 0.2.0-alpha.6 → 0.2.0-alpha.8

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 (226) hide show
  1. package/dist/audio/index.js +1145 -5
  2. package/dist/audio/index.js.map +1 -1
  3. package/dist/components/index.js +3187 -10
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/core.js +19714 -12
  6. package/dist/core.js.map +1 -1
  7. package/dist/emotion/index.js +1 -1
  8. package/dist/emotion/index.js.map +1 -1
  9. package/dist/hooks/index.js +941 -6
  10. package/dist/hooks/index.js.map +1 -1
  11. package/dist/index.js +31841 -183
  12. package/dist/index.js.map +1 -1
  13. package/dist/primitives/index.js +21111 -57
  14. package/dist/primitives/index.js.map +1 -1
  15. package/dist/protocol/index.js +360 -2
  16. package/dist/protocol/index.js.map +1 -1
  17. package/dist/speakeasy/index.js +2786 -38
  18. package/dist/speakeasy/index.js.map +1 -1
  19. package/dist/styles.css +1 -1
  20. package/dist/theme/index.js +1150 -3
  21. package/dist/theme/index.js.map +1 -1
  22. package/dist/vision/index.js +370 -2
  23. package/dist/vision/index.js.map +1 -1
  24. package/dist/workspace/index.js +16824 -2
  25. package/dist/workspace/index.js.map +1 -1
  26. package/package.json +16 -10
  27. package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
  28. package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
  29. package/dist/BentoGrid-CDARICNM.js +0 -6
  30. package/dist/BentoGrid-CDARICNM.js.map +0 -1
  31. package/dist/CommandPalette-JCWJKRBY.js +0 -6
  32. package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
  33. package/dist/Glass-H4X4ZI4P.js +0 -7
  34. package/dist/Glass-H4X4ZI4P.js.map +0 -1
  35. package/dist/GlitchText-KLQ57PPY.js +0 -6
  36. package/dist/GlitchText-KLQ57PPY.js.map +0 -1
  37. package/dist/GlowButton-VGBPMZO7.js +0 -6
  38. package/dist/GlowButton-VGBPMZO7.js.map +0 -1
  39. package/dist/Graph3D-GO7N2EZQ.js +0 -540
  40. package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
  41. package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
  42. package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
  43. package/dist/KPIStat-PBQK27ZB.js +0 -6
  44. package/dist/KPIStat-PBQK27ZB.js.map +0 -1
  45. package/dist/NeonToast-W5F7MU3U.js +0 -6
  46. package/dist/NeonToast-W5F7MU3U.js.map +0 -1
  47. package/dist/ParticleField-WK6CNHWU.js +0 -51
  48. package/dist/ParticleField-WK6CNHWU.js.map +0 -1
  49. package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
  50. package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
  51. package/dist/ThreeDCard-VH5I3SSY.js +0 -6
  52. package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
  53. package/dist/TypingAnimation-GIWOHPIX.js +0 -6
  54. package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
  55. package/dist/alert-dialog-QOSYBIIE.js +0 -19
  56. package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
  57. package/dist/avatar-N5R37PCU.js +0 -10
  58. package/dist/avatar-N5R37PCU.js.map +0 -1
  59. package/dist/badge-GTVIIGPY.js +0 -8
  60. package/dist/badge-GTVIIGPY.js.map +0 -1
  61. package/dist/button-D7IMSV2D.js +0 -8
  62. package/dist/button-D7IMSV2D.js.map +0 -1
  63. package/dist/chunk-3CMPQOMY.js +0 -69
  64. package/dist/chunk-3CMPQOMY.js.map +0 -1
  65. package/dist/chunk-3OQT6IYR.js +0 -41
  66. package/dist/chunk-3OQT6IYR.js.map +0 -1
  67. package/dist/chunk-43B2WVLS.js +0 -85
  68. package/dist/chunk-43B2WVLS.js.map +0 -1
  69. package/dist/chunk-4SRFO5W3.js +0 -121
  70. package/dist/chunk-4SRFO5W3.js.map +0 -1
  71. package/dist/chunk-5IZELOOU.js +0 -362
  72. package/dist/chunk-5IZELOOU.js.map +0 -1
  73. package/dist/chunk-6DM4ACSS.js +0 -154
  74. package/dist/chunk-6DM4ACSS.js.map +0 -1
  75. package/dist/chunk-6IGT34PC.js +0 -50
  76. package/dist/chunk-6IGT34PC.js.map +0 -1
  77. package/dist/chunk-6RKBCJHN.js +0 -194
  78. package/dist/chunk-6RKBCJHN.js.map +0 -1
  79. package/dist/chunk-6RX2WGCO.js +0 -108
  80. package/dist/chunk-6RX2WGCO.js.map +0 -1
  81. package/dist/chunk-7K4WZM3U.js +0 -189
  82. package/dist/chunk-7K4WZM3U.js.map +0 -1
  83. package/dist/chunk-7MDBHJPT.js +0 -407
  84. package/dist/chunk-7MDBHJPT.js.map +0 -1
  85. package/dist/chunk-7UQD6ROV.js +0 -9
  86. package/dist/chunk-7UQD6ROV.js.map +0 -1
  87. package/dist/chunk-AFNIVLZP.js +0 -1069
  88. package/dist/chunk-AFNIVLZP.js.map +0 -1
  89. package/dist/chunk-ANWYRO6A.js +0 -407
  90. package/dist/chunk-ANWYRO6A.js.map +0 -1
  91. package/dist/chunk-DIXPOHDO.js +0 -71
  92. package/dist/chunk-DIXPOHDO.js.map +0 -1
  93. package/dist/chunk-DWYMKYPI.js +0 -3
  94. package/dist/chunk-DWYMKYPI.js.map +0 -1
  95. package/dist/chunk-E3NVDCZG.js +0 -280
  96. package/dist/chunk-E3NVDCZG.js.map +0 -1
  97. package/dist/chunk-EBM7YBKL.js +0 -399
  98. package/dist/chunk-EBM7YBKL.js.map +0 -1
  99. package/dist/chunk-EPAM7IWW.js +0 -294
  100. package/dist/chunk-EPAM7IWW.js.map +0 -1
  101. package/dist/chunk-EXQ7GYRS.js +0 -134
  102. package/dist/chunk-EXQ7GYRS.js.map +0 -1
  103. package/dist/chunk-F4QTUZ3C.js +0 -136
  104. package/dist/chunk-F4QTUZ3C.js.map +0 -1
  105. package/dist/chunk-FEW533R2.js +0 -105
  106. package/dist/chunk-FEW533R2.js.map +0 -1
  107. package/dist/chunk-FFZLJKC7.js +0 -270
  108. package/dist/chunk-FFZLJKC7.js.map +0 -1
  109. package/dist/chunk-GEAMOBF7.js +0 -8486
  110. package/dist/chunk-GEAMOBF7.js.map +0 -1
  111. package/dist/chunk-GRTRSCTD.js +0 -74
  112. package/dist/chunk-GRTRSCTD.js.map +0 -1
  113. package/dist/chunk-IKGYOGLK.js +0 -16
  114. package/dist/chunk-IKGYOGLK.js.map +0 -1
  115. package/dist/chunk-IQ7WYWVJ.js +0 -73
  116. package/dist/chunk-IQ7WYWVJ.js.map +0 -1
  117. package/dist/chunk-IXIVWQLF.js +0 -543
  118. package/dist/chunk-IXIVWQLF.js.map +0 -1
  119. package/dist/chunk-JCJU57RC.js +0 -115
  120. package/dist/chunk-JCJU57RC.js.map +0 -1
  121. package/dist/chunk-KORSTBU4.js +0 -117
  122. package/dist/chunk-KORSTBU4.js.map +0 -1
  123. package/dist/chunk-KSEZ6UM2.js +0 -235
  124. package/dist/chunk-KSEZ6UM2.js.map +0 -1
  125. package/dist/chunk-MHPF7R3O.js +0 -1376
  126. package/dist/chunk-MHPF7R3O.js.map +0 -1
  127. package/dist/chunk-MPC5IH7E.js +0 -81
  128. package/dist/chunk-MPC5IH7E.js.map +0 -1
  129. package/dist/chunk-MQIU2NYA.js +0 -114
  130. package/dist/chunk-MQIU2NYA.js.map +0 -1
  131. package/dist/chunk-NYMBJOGR.js +0 -2192
  132. package/dist/chunk-NYMBJOGR.js.map +0 -1
  133. package/dist/chunk-OBZD2M3C.js +0 -169
  134. package/dist/chunk-OBZD2M3C.js.map +0 -1
  135. package/dist/chunk-ODM2AG6G.js +0 -176
  136. package/dist/chunk-ODM2AG6G.js.map +0 -1
  137. package/dist/chunk-ONDKF5LP.js +0 -53
  138. package/dist/chunk-ONDKF5LP.js.map +0 -1
  139. package/dist/chunk-P25YCWQB.js +0 -41
  140. package/dist/chunk-P25YCWQB.js.map +0 -1
  141. package/dist/chunk-PFYVNM6H.js +0 -14
  142. package/dist/chunk-PFYVNM6H.js.map +0 -1
  143. package/dist/chunk-PWNNSGFL.js +0 -20
  144. package/dist/chunk-PWNNSGFL.js.map +0 -1
  145. package/dist/chunk-Q2PGZVOT.js +0 -36
  146. package/dist/chunk-Q2PGZVOT.js.map +0 -1
  147. package/dist/chunk-Q2XDMV7U.js +0 -76
  148. package/dist/chunk-Q2XDMV7U.js.map +0 -1
  149. package/dist/chunk-QG7FH2FI.js +0 -45
  150. package/dist/chunk-QG7FH2FI.js.map +0 -1
  151. package/dist/chunk-R7HUOK2D.js +0 -1914
  152. package/dist/chunk-R7HUOK2D.js.map +0 -1
  153. package/dist/chunk-REUYY7G5.js +0 -773
  154. package/dist/chunk-REUYY7G5.js.map +0 -1
  155. package/dist/chunk-RHC2Z2HT.js +0 -199
  156. package/dist/chunk-RHC2Z2HT.js.map +0 -1
  157. package/dist/chunk-RMCVLIFE.js +0 -23
  158. package/dist/chunk-RMCVLIFE.js.map +0 -1
  159. package/dist/chunk-ROZLTXGR.js +0 -234
  160. package/dist/chunk-ROZLTXGR.js.map +0 -1
  161. package/dist/chunk-RSS2C2O3.js +0 -17
  162. package/dist/chunk-RSS2C2O3.js.map +0 -1
  163. package/dist/chunk-SAGCG5SH.js +0 -355
  164. package/dist/chunk-SAGCG5SH.js.map +0 -1
  165. package/dist/chunk-TM6AOUSD.js +0 -40
  166. package/dist/chunk-TM6AOUSD.js.map +0 -1
  167. package/dist/chunk-TPK4BYCO.js +0 -970
  168. package/dist/chunk-TPK4BYCO.js.map +0 -1
  169. package/dist/chunk-UNQIL4K2.js +0 -34
  170. package/dist/chunk-UNQIL4K2.js.map +0 -1
  171. package/dist/chunk-UUG6L75Y.js +0 -47
  172. package/dist/chunk-UUG6L75Y.js.map +0 -1
  173. package/dist/chunk-V2SYMV4W.js +0 -114
  174. package/dist/chunk-V2SYMV4W.js.map +0 -1
  175. package/dist/chunk-V7EN5CTH.js +0 -130
  176. package/dist/chunk-V7EN5CTH.js.map +0 -1
  177. package/dist/chunk-VITKG2HL.js +0 -1125
  178. package/dist/chunk-VITKG2HL.js.map +0 -1
  179. package/dist/chunk-VYEWU5LO.js +0 -2631
  180. package/dist/chunk-VYEWU5LO.js.map +0 -1
  181. package/dist/chunk-W67QAGSH.js +0 -178
  182. package/dist/chunk-W67QAGSH.js.map +0 -1
  183. package/dist/chunk-WWBIN6KV.js +0 -1353
  184. package/dist/chunk-WWBIN6KV.js.map +0 -1
  185. package/dist/chunk-X77Z4PFB.js +0 -224
  186. package/dist/chunk-X77Z4PFB.js.map +0 -1
  187. package/dist/chunk-X7VG7OTT.js +0 -8
  188. package/dist/chunk-X7VG7OTT.js.map +0 -1
  189. package/dist/chunk-XE4K2SGI.js +0 -74
  190. package/dist/chunk-XE4K2SGI.js.map +0 -1
  191. package/dist/chunk-YIUG7IJK.js +0 -628
  192. package/dist/chunk-YIUG7IJK.js.map +0 -1
  193. package/dist/chunk-YNVN3V4Y.js +0 -13
  194. package/dist/chunk-YNVN3V4Y.js.map +0 -1
  195. package/dist/chunk-Z2S54IZX.js +0 -198
  196. package/dist/chunk-Z2S54IZX.js.map +0 -1
  197. package/dist/chunk-ZR6AH25Z.js +0 -17
  198. package/dist/chunk-ZR6AH25Z.js.map +0 -1
  199. package/dist/dialog-SPM3DTTI.js +0 -17
  200. package/dist/dialog-SPM3DTTI.js.map +0 -1
  201. package/dist/dropdown-menu-HMTWKWGK.js +0 -21
  202. package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
  203. package/dist/input-BH4P4S26.js +0 -6
  204. package/dist/input-BH4P4S26.js.map +0 -1
  205. package/dist/label-5Z4Q6VER.js +0 -8
  206. package/dist/label-5Z4Q6VER.js.map +0 -1
  207. package/dist/popover-IFOUXYLI.js +0 -18
  208. package/dist/popover-IFOUXYLI.js.map +0 -1
  209. package/dist/scroll-area-DJXNW6QX.js +0 -14
  210. package/dist/scroll-area-DJXNW6QX.js.map +0 -1
  211. package/dist/select-FZ277C3G.js +0 -22
  212. package/dist/select-FZ277C3G.js.map +0 -1
  213. package/dist/separator-BTMLN4NB.js +0 -8
  214. package/dist/separator-BTMLN4NB.js.map +0 -1
  215. package/dist/skeleton-DXIWBH4W.js +0 -6
  216. package/dist/skeleton-DXIWBH4W.js.map +0 -1
  217. package/dist/switch-4MCXIZBY.js +0 -13
  218. package/dist/switch-4MCXIZBY.js.map +0 -1
  219. package/dist/tabs-O7AW3APK.js +0 -17
  220. package/dist/tabs-O7AW3APK.js.map +0 -1
  221. package/dist/textarea-IB5WAFDO.js +0 -6
  222. package/dist/textarea-IB5WAFDO.js.map +0 -1
  223. package/dist/toggle-XVPPG6P4.js +0 -10
  224. package/dist/toggle-XVPPG6P4.js.map +0 -1
  225. package/dist/tooltip-JICZTD4F.js +0 -18
  226. package/dist/tooltip-JICZTD4F.js.map +0 -1
@@ -1,2631 +0,0 @@
1
- import { createContext, useContext, useMemo, useState, useCallback } from 'react';
2
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
-
4
- // src/workspace/WorkspaceRenderer.tsx
5
-
6
- // src/workspace/registry/manifests/atoms.ts
7
- var glowButtonManifest = {
8
- id: "glow-button",
9
- name: "GlowButton",
10
- version: "1.0.0",
11
- category: "atoms",
12
- purpose: ["call-to-action", "confirmation"],
13
- description: "Animated button with glowing border effect. Creates visual emphasis for primary actions.",
14
- bestFor: [
15
- "Primary form submissions",
16
- "Key call-to-action buttons",
17
- "Hero section CTAs",
18
- "Confirmation dialogs"
19
- ],
20
- avoid: [
21
- "Secondary or tertiary actions",
22
- "Destructive actions (use red variant)",
23
- "Dense button groups (too much visual noise)",
24
- "Navigation links"
25
- ],
26
- props: {
27
- children: {
28
- type: "ReactNode",
29
- description: "Button content (text, icons, or both)",
30
- required: true
31
- },
32
- variant: {
33
- type: "enum",
34
- description: "Visual style variant",
35
- enum: ["primary", "secondary", "ghost", "destructive"],
36
- default: "primary"
37
- },
38
- size: {
39
- type: "enum",
40
- description: "Button size",
41
- enum: ["sm", "md", "lg"],
42
- default: "md"
43
- },
44
- disabled: {
45
- type: "boolean",
46
- description: "Disable interactions",
47
- default: false
48
- },
49
- glowColor: {
50
- type: "string",
51
- description: "Custom glow color (CSS color value)"
52
- },
53
- glowIntensity: {
54
- type: "number",
55
- description: "Glow intensity multiplier (0-2)",
56
- default: 1
57
- },
58
- onClick: {
59
- type: "function",
60
- description: "Click handler"
61
- }
62
- },
63
- slots: [],
64
- validParents: ["glass-panel", "bento-grid", "command-palette"],
65
- validChildren: [],
66
- styles: ["neon", "animated", "gradient"],
67
- supportsTheme: true,
68
- cssVariables: ["--glow-color", "--glow-intensity"],
69
- interactions: ["click", "hover", "focus", "keyboard"],
70
- a11y: ["aria-labels", "keyboard-nav", "focus-visible"],
71
- examples: [
72
- {
73
- name: "Primary CTA",
74
- description: "Standard primary action button",
75
- props: { variant: "primary", children: "Get Started" },
76
- context: "Hero sections, form submissions"
77
- },
78
- {
79
- name: "Custom Glow",
80
- description: "Button with custom glow color",
81
- props: {
82
- variant: "secondary",
83
- glowColor: "#00ff88",
84
- children: "Connect"
85
- },
86
- context: "Themed interfaces, brand-specific CTAs"
87
- }
88
- ],
89
- source: "components/atoms/GlowButton/GlowButton.tsx",
90
- storybook: "atoms-glowbutton",
91
- tags: ["button", "cta", "glow", "animated", "interactive"]
92
- };
93
- var hudProgressRingManifest = {
94
- id: "hud-progress-ring",
95
- name: "HUDProgressRing",
96
- version: "1.0.0",
97
- category: "atoms",
98
- purpose: ["progress-feedback", "status-indicator", "data-display"],
99
- description: "Circular progress indicator with HUD-style aesthetics. SVG-based with smooth animations.",
100
- bestFor: [
101
- "Task completion percentage",
102
- "Loading states with known progress",
103
- "Skill/stat displays",
104
- "Timer countdowns",
105
- "Dashboard KPIs"
106
- ],
107
- avoid: [
108
- "Indeterminate loading (use spinner instead)",
109
- "Very small sizes (illegible)",
110
- "Dense data tables (too much visual weight)"
111
- ],
112
- props: {
113
- value: {
114
- type: "number",
115
- description: "Progress value (0-100)",
116
- required: true
117
- },
118
- size: {
119
- type: "number",
120
- description: "Ring diameter in pixels",
121
- default: 120
122
- },
123
- strokeWidth: {
124
- type: "number",
125
- description: "Ring stroke width",
126
- default: 8
127
- },
128
- color: {
129
- type: "string",
130
- description: "Progress color",
131
- default: "#00ff88"
132
- },
133
- trackColor: {
134
- type: "string",
135
- description: "Background track color",
136
- default: "rgba(255,255,255,0.1)"
137
- },
138
- showValue: {
139
- type: "boolean",
140
- description: "Display percentage in center",
141
- default: true
142
- },
143
- label: {
144
- type: "string",
145
- description: "Label text below value"
146
- },
147
- animated: {
148
- type: "boolean",
149
- description: "Animate progress changes",
150
- default: true
151
- }
152
- },
153
- slots: [
154
- {
155
- name: "center",
156
- description: "Custom content for ring center",
157
- accepts: ["*"],
158
- required: false
159
- }
160
- ],
161
- validParents: ["glass-panel", "bento-grid", "kpi-stat"],
162
- validChildren: [],
163
- styles: ["cyberpunk", "animated", "minimal"],
164
- supportsTheme: true,
165
- cssVariables: ["--ring-color", "--ring-track-color"],
166
- interactions: ["hover"],
167
- a11y: ["aria-labels", "screen-reader"],
168
- examples: [
169
- {
170
- name: "Task Progress",
171
- description: "Show task completion",
172
- props: { value: 75, label: "Complete", color: "#00ff88" },
173
- context: "Dashboard widgets, task trackers"
174
- },
175
- {
176
- name: "Skill Level",
177
- description: "Display skill or stat level",
178
- props: { value: 42, label: "TypeScript", size: 80 },
179
- context: "Profile pages, skill trees"
180
- }
181
- ],
182
- source: "components/atoms/HUDProgressRing/HUDProgressRing.tsx",
183
- storybook: "atoms-hudprogressring",
184
- tags: ["progress", "ring", "circular", "hud", "stats", "animated"]
185
- };
186
- var typingAnimationManifest = {
187
- id: "typing-animation",
188
- name: "TypingAnimation",
189
- version: "1.0.0",
190
- category: "atoms",
191
- purpose: ["animation", "data-display"],
192
- description: "Typewriter effect that reveals text character by character. Creates dynamic, engaging text displays.",
193
- bestFor: [
194
- "Hero headlines",
195
- "AI/bot responses",
196
- "Onboarding sequences",
197
- "Loading messages",
198
- "Code demonstrations"
199
- ],
200
- avoid: [
201
- "Long paragraphs (use TextGenerateEffect instead)",
202
- "Critical information users need immediately",
203
- "Accessibility-focused contexts (can be disorienting)"
204
- ],
205
- props: {
206
- text: {
207
- type: "string",
208
- description: "Text to type out",
209
- required: true
210
- },
211
- speed: {
212
- type: "number",
213
- description: "Milliseconds per character",
214
- default: 50
215
- },
216
- delay: {
217
- type: "number",
218
- description: "Initial delay before typing starts",
219
- default: 0
220
- },
221
- cursor: {
222
- type: "boolean",
223
- description: "Show blinking cursor",
224
- default: true
225
- },
226
- cursorChar: {
227
- type: "string",
228
- description: "Cursor character",
229
- default: "|"
230
- },
231
- onComplete: {
232
- type: "function",
233
- description: "Callback when typing completes"
234
- },
235
- loop: {
236
- type: "boolean",
237
- description: "Loop the animation",
238
- default: false
239
- }
240
- },
241
- slots: [],
242
- validParents: ["glass-panel", "bento-grid"],
243
- validChildren: [],
244
- styles: ["animated", "retro"],
245
- supportsTheme: true,
246
- interactions: [],
247
- a11y: ["screen-reader", "reduced-motion"],
248
- examples: [
249
- {
250
- name: "Hero Title",
251
- description: "Animated hero headline",
252
- props: { text: "Welcome to the future", speed: 80, cursor: true },
253
- context: "Landing pages, hero sections"
254
- },
255
- {
256
- name: "AI Response",
257
- description: "Simulated AI typing",
258
- props: { text: "Processing your request...", speed: 30 },
259
- context: "Chatbots, AI interfaces"
260
- }
261
- ],
262
- source: "components/atoms/TypingAnimation/TypingAnimation.tsx",
263
- storybook: "atoms-typinganimation",
264
- tags: ["text", "typewriter", "animation", "typing", "reveal"]
265
- };
266
- var textGenerateEffectManifest = {
267
- id: "text-generate-effect",
268
- name: "TextGenerateEffect",
269
- version: "1.0.0",
270
- category: "atoms",
271
- purpose: ["animation", "data-display"],
272
- description: "Word-by-word text reveal animation. More suitable for longer text than character-by-character typing.",
273
- bestFor: [
274
- "AI-generated content reveal",
275
- "Quote displays",
276
- "Paragraph introductions",
277
- "Story/narrative text"
278
- ],
279
- avoid: [
280
- "Short single words (use TypingAnimation)",
281
- "Time-critical information",
282
- "Forms and inputs"
283
- ],
284
- props: {
285
- words: {
286
- type: "string",
287
- description: "Text to animate (split by spaces)",
288
- required: true
289
- },
290
- className: {
291
- type: "string",
292
- description: "Additional CSS classes"
293
- },
294
- filter: {
295
- type: "boolean",
296
- description: "Apply blur filter during reveal",
297
- default: true
298
- },
299
- duration: {
300
- type: "number",
301
- description: "Animation duration per word (seconds)",
302
- default: 0.5
303
- }
304
- },
305
- slots: [],
306
- validParents: ["glass-panel", "bento-grid"],
307
- validChildren: [],
308
- styles: ["animated", "gradient"],
309
- supportsTheme: true,
310
- interactions: [],
311
- a11y: ["screen-reader", "reduced-motion"],
312
- examples: [
313
- {
314
- name: "AI Response",
315
- description: "Reveal AI-generated text",
316
- props: {
317
- words: "The quick brown fox jumps over the lazy dog",
318
- filter: true
319
- },
320
- context: "AI chat interfaces, content generation"
321
- }
322
- ],
323
- source: "components/atoms/TextGenerateEffect/TextGenerateEffect.tsx",
324
- storybook: "atoms-textgenerateeffect",
325
- tags: ["text", "animation", "reveal", "words", "ai"]
326
- };
327
- var glitchTextManifest = {
328
- id: "glitch-text",
329
- name: "GlitchText",
330
- version: "1.0.0",
331
- category: "atoms",
332
- purpose: ["decoration", "animation"],
333
- description: "Cyberpunk-style glitch effect on text. Creates visual distortion and RGB splitting.",
334
- bestFor: [
335
- "Error states with style",
336
- "Cyberpunk/tech aesthetics",
337
- "Game UI elements",
338
- "Attention-grabbing headlines"
339
- ],
340
- avoid: [
341
- "Readable body text",
342
- "Accessibility-critical content",
343
- "Professional/corporate contexts",
344
- "Frequent use (loses impact)"
345
- ],
346
- props: {
347
- text: {
348
- type: "string",
349
- description: "Text to display with glitch effect",
350
- required: true
351
- },
352
- intensity: {
353
- type: "enum",
354
- description: "Glitch intensity level",
355
- enum: ["low", "medium", "high"],
356
- default: "medium"
357
- },
358
- color: {
359
- type: "string",
360
- description: "Base text color"
361
- },
362
- speed: {
363
- type: "number",
364
- description: "Animation speed multiplier",
365
- default: 1
366
- },
367
- continuous: {
368
- type: "boolean",
369
- description: "Continuously animate vs on-hover only",
370
- default: false
371
- }
372
- },
373
- slots: [],
374
- validParents: ["glass-panel", "bento-grid"],
375
- validChildren: [],
376
- styles: ["cyberpunk", "animated", "neon"],
377
- supportsTheme: false,
378
- interactions: ["hover"],
379
- a11y: ["reduced-motion"],
380
- examples: [
381
- {
382
- name: "Error Display",
383
- description: "Stylized error message",
384
- props: { text: "SYSTEM ERROR", intensity: "high", continuous: true },
385
- context: "Error states, warnings"
386
- },
387
- {
388
- name: "Hover Effect",
389
- description: "Glitch on hover only",
390
- props: { text: "ENTER", intensity: "low", continuous: false },
391
- context: "Interactive elements, buttons"
392
- }
393
- ],
394
- source: "components/atoms/GlitchText/GlitchText.tsx",
395
- storybook: "atoms-glitchtext",
396
- tags: ["text", "glitch", "cyberpunk", "animation", "effect"]
397
- };
398
- var auroraBackgroundManifest = {
399
- id: "aurora-background",
400
- name: "AuroraBackground",
401
- version: "1.0.0",
402
- category: "atoms",
403
- purpose: ["background", "decoration"],
404
- description: "Animated aurora borealis gradient background. Creates atmospheric, dynamic backgrounds.",
405
- bestFor: [
406
- "Hero sections",
407
- "Landing pages",
408
- "Modal backgrounds",
409
- "Full-page backgrounds"
410
- ],
411
- avoid: [
412
- "Content-heavy areas (distracting)",
413
- "Small containers",
414
- "Performance-critical contexts"
415
- ],
416
- props: {
417
- children: {
418
- type: "ReactNode",
419
- description: "Content to display over the aurora"
420
- },
421
- showRadialGradient: {
422
- type: "boolean",
423
- description: "Add radial gradient overlay",
424
- default: true
425
- },
426
- className: {
427
- type: "string",
428
- description: "Additional CSS classes"
429
- }
430
- },
431
- slots: [
432
- {
433
- name: "default",
434
- description: "Content overlaid on aurora",
435
- accepts: ["*"],
436
- multiple: true
437
- }
438
- ],
439
- validParents: [],
440
- validChildren: ["*"],
441
- styles: ["gradient", "animated"],
442
- supportsTheme: true,
443
- interactions: [],
444
- a11y: ["reduced-motion"],
445
- examples: [
446
- {
447
- name: "Hero Background",
448
- description: "Full-page hero with aurora",
449
- props: { showRadialGradient: true },
450
- context: "Landing pages, hero sections"
451
- }
452
- ],
453
- source: "components/atoms/AuroraBackground/AuroraBackground.tsx",
454
- storybook: "atoms-aurorabackground",
455
- tags: ["background", "aurora", "gradient", "animated", "atmospheric"]
456
- };
457
- var atomManifests = [
458
- glowButtonManifest,
459
- hudProgressRingManifest,
460
- typingAnimationManifest,
461
- textGenerateEffectManifest,
462
- glitchTextManifest,
463
- auroraBackgroundManifest
464
- ];
465
-
466
- // src/workspace/registry/manifests/molecules.ts
467
- var kpiStatManifest = {
468
- id: "kpi-stat",
469
- name: "KPIStat",
470
- version: "1.0.0",
471
- category: "molecules",
472
- purpose: ["data-display", "status-indicator"],
473
- description: "Key Performance Indicator display with label, value, trend indicator, and optional sparkline.",
474
- bestFor: [
475
- "Dashboard metrics",
476
- "Analytics displays",
477
- "Summary statistics",
478
- "Real-time counters"
479
- ],
480
- avoid: [
481
- "Long text content",
482
- "Non-numeric data",
483
- "Dense data tables (too large)"
484
- ],
485
- props: {
486
- label: {
487
- type: "string",
488
- description: "Metric label",
489
- required: true
490
- },
491
- value: {
492
- type: "string",
493
- description: "Display value (formatted)",
494
- required: true
495
- },
496
- trend: {
497
- type: "enum",
498
- description: "Trend direction",
499
- enum: ["up", "down", "neutral"]
500
- },
501
- trendValue: {
502
- type: "string",
503
- description: "Trend percentage or delta"
504
- },
505
- icon: {
506
- type: "ReactNode",
507
- description: "Optional icon"
508
- },
509
- sparkline: {
510
- type: "array",
511
- description: "Data points for mini sparkline chart",
512
- items: { type: "number", description: "Data point" }
513
- },
514
- variant: {
515
- type: "enum",
516
- description: "Visual variant",
517
- enum: ["default", "compact", "large"],
518
- default: "default"
519
- }
520
- },
521
- slots: [
522
- {
523
- name: "icon",
524
- description: "Icon slot",
525
- accepts: ["*"],
526
- required: false
527
- }
528
- ],
529
- validParents: ["bento-grid", "glass-panel"],
530
- validChildren: [],
531
- styles: ["minimal", "glassmorphism"],
532
- supportsTheme: true,
533
- cssVariables: ["--kpi-trend-up-color", "--kpi-trend-down-color"],
534
- interactions: ["hover"],
535
- a11y: ["aria-labels", "screen-reader"],
536
- examples: [
537
- {
538
- name: "Revenue Metric",
539
- description: "Revenue with positive trend",
540
- props: {
541
- label: "Revenue",
542
- value: "$42,500",
543
- trend: "up",
544
- trendValue: "+12.5%"
545
- },
546
- context: "Financial dashboards"
547
- },
548
- {
549
- name: "User Count",
550
- description: "Active users with sparkline",
551
- props: {
552
- label: "Active Users",
553
- value: "1,234",
554
- sparkline: [10, 25, 18, 30, 45, 38, 52]
555
- },
556
- context: "Analytics dashboards"
557
- }
558
- ],
559
- source: "components/molecules/KPIStat/KPIStat.tsx",
560
- storybook: "molecules-kpistat",
561
- tags: ["kpi", "stat", "metric", "dashboard", "analytics", "trend"]
562
- };
563
- var neonToastManifest = {
564
- id: "neon-toast",
565
- name: "NeonToast",
566
- version: "1.0.0",
567
- category: "molecules",
568
- purpose: ["notification", "status-indicator"],
569
- description: "Notification toast with neon glow effect. Supports multiple severity levels.",
570
- bestFor: [
571
- "Success notifications",
572
- "Error messages",
573
- "Warnings",
574
- "Info alerts"
575
- ],
576
- avoid: [
577
- "Critical errors requiring user action (use modal)",
578
- "Long-form content",
579
- "Permanent displays"
580
- ],
581
- props: {
582
- title: {
583
- type: "string",
584
- description: "Toast title",
585
- required: true
586
- },
587
- description: {
588
- type: "string",
589
- description: "Toast description/message"
590
- },
591
- variant: {
592
- type: "enum",
593
- description: "Severity/type variant",
594
- enum: ["success", "error", "warning", "info"],
595
- default: "info"
596
- },
597
- duration: {
598
- type: "number",
599
- description: "Auto-dismiss duration in ms (0 = persistent)",
600
- default: 5e3
601
- },
602
- action: {
603
- type: "object",
604
- description: "Optional action button config",
605
- properties: {
606
- label: { type: "string", description: "Button label", required: true },
607
- onClick: { type: "function", description: "Click handler" }
608
- }
609
- },
610
- onDismiss: {
611
- type: "function",
612
- description: "Callback when toast is dismissed"
613
- }
614
- },
615
- slots: [],
616
- validParents: [],
617
- validChildren: [],
618
- styles: ["neon", "glassmorphism", "animated"],
619
- supportsTheme: true,
620
- cssVariables: [
621
- "--toast-success-color",
622
- "--toast-error-color",
623
- "--toast-warning-color",
624
- "--toast-info-color"
625
- ],
626
- interactions: ["click", "hover"],
627
- a11y: ["aria-labels", "screen-reader", "focus-visible"],
628
- examples: [
629
- {
630
- name: "Success",
631
- description: "Operation completed successfully",
632
- props: {
633
- title: "Saved",
634
- description: "Your changes have been saved",
635
- variant: "success"
636
- },
637
- context: "Form submissions, save operations"
638
- },
639
- {
640
- name: "Error with Action",
641
- description: "Error with retry action",
642
- props: {
643
- title: "Upload Failed",
644
- description: "Network error occurred",
645
- variant: "error",
646
- action: { label: "Retry" }
647
- },
648
- context: "Network errors, failed operations"
649
- }
650
- ],
651
- source: "components/molecules/NeonToast/NeonToast.tsx",
652
- storybook: "molecules-neontoast",
653
- tags: ["toast", "notification", "alert", "neon", "message"]
654
- };
655
- var threeDCardManifest = {
656
- id: "three-d-card",
657
- name: "ThreeDCard",
658
- version: "1.0.0",
659
- category: "molecules",
660
- purpose: ["container", "data-display"],
661
- description: "Card with 3D perspective effect on hover. Creates depth and interactivity.",
662
- bestFor: [
663
- "Feature showcases",
664
- "Product cards",
665
- "Team member cards",
666
- "Portfolio items"
667
- ],
668
- avoid: [
669
- "Dense grids (too much motion)",
670
- "Mobile-first designs (requires hover)",
671
- "Accessibility-critical contexts"
672
- ],
673
- props: {
674
- children: {
675
- type: "ReactNode",
676
- description: "Card content",
677
- required: true
678
- },
679
- className: {
680
- type: "string",
681
- description: "Additional CSS classes"
682
- },
683
- containerClassName: {
684
- type: "string",
685
- description: "Container wrapper classes"
686
- },
687
- rotationIntensity: {
688
- type: "number",
689
- description: "Max rotation degrees",
690
- default: 10
691
- },
692
- glareEnabled: {
693
- type: "boolean",
694
- description: "Enable glare effect on hover",
695
- default: true
696
- },
697
- glareMaxOpacity: {
698
- type: "number",
699
- description: "Max glare opacity (0-1)",
700
- default: 0.2
701
- }
702
- },
703
- slots: [
704
- {
705
- name: "default",
706
- description: "Card content",
707
- accepts: ["*"],
708
- required: true,
709
- multiple: true
710
- }
711
- ],
712
- validParents: ["bento-grid"],
713
- validChildren: ["*"],
714
- styles: ["3d", "animated", "glassmorphism"],
715
- supportsTheme: true,
716
- interactions: ["hover"],
717
- a11y: ["reduced-motion"],
718
- examples: [
719
- {
720
- name: "Feature Card",
721
- description: "Feature showcase card",
722
- props: { rotationIntensity: 15, glareEnabled: true },
723
- context: "Feature sections, product showcases",
724
- code: `<ThreeDCard>
725
- <h3>Feature Title</h3>
726
- <p>Feature description here</p>
727
- </ThreeDCard>`
728
- }
729
- ],
730
- source: "components/molecules/ThreeDCard/ThreeDCard.tsx",
731
- storybook: "molecules-threedcard",
732
- tags: ["card", "3d", "perspective", "hover", "interactive"]
733
- };
734
- var moleculeManifests = [
735
- kpiStatManifest,
736
- neonToastManifest,
737
- threeDCardManifest
738
- ];
739
-
740
- // src/workspace/registry/manifests/organisms.ts
741
- var commandPaletteManifest = {
742
- id: "command-palette",
743
- name: "CommandPalette",
744
- version: "1.0.0",
745
- category: "organisms",
746
- purpose: ["navigation", "selection"],
747
- description: "Keyboard-driven command palette (cmd+k style) for quick actions and navigation. Built on cmdk.",
748
- bestFor: [
749
- "Application command menus",
750
- "Quick navigation",
751
- "Action shortcuts",
752
- "Search interfaces"
753
- ],
754
- avoid: [
755
- "Mobile-only interfaces (keyboard required)",
756
- "Simple dropdowns (overkill)",
757
- "Contexts without keyboard users"
758
- ],
759
- props: {
760
- open: {
761
- type: "boolean",
762
- description: "Controlled open state",
763
- required: true
764
- },
765
- onOpenChange: {
766
- type: "function",
767
- description: "Open state change handler",
768
- required: true
769
- },
770
- commands: {
771
- type: "array",
772
- description: "List of available commands",
773
- required: true,
774
- items: {
775
- type: "object",
776
- description: "Command definition",
777
- properties: {
778
- id: { type: "string", description: "Unique command ID", required: true },
779
- label: { type: "string", description: "Display label", required: true },
780
- icon: { type: "ReactNode", description: "Command icon" },
781
- shortcut: { type: "string", description: "Keyboard shortcut hint" },
782
- group: { type: "string", description: "Command group name" },
783
- onSelect: { type: "function", description: "Selection handler" }
784
- }
785
- }
786
- },
787
- placeholder: {
788
- type: "string",
789
- description: "Search input placeholder",
790
- default: "Type a command or search..."
791
- },
792
- emptyMessage: {
793
- type: "string",
794
- description: "Message when no results",
795
- default: "No results found."
796
- }
797
- },
798
- slots: [],
799
- validParents: [],
800
- validChildren: [],
801
- styles: ["glassmorphism", "minimal"],
802
- supportsTheme: true,
803
- cssVariables: ["--command-bg", "--command-border"],
804
- interactions: ["keyboard", "click", "focus"],
805
- a11y: ["keyboard-nav", "aria-labels", "focus-visible", "screen-reader"],
806
- examples: [
807
- {
808
- name: "App Commands",
809
- description: "Application command palette",
810
- props: {
811
- placeholder: "Search commands...",
812
- commands: [
813
- { id: "new", label: "New File", shortcut: "Cmd+N", group: "File" },
814
- { id: "save", label: "Save", shortcut: "Cmd+S", group: "File" },
815
- { id: "settings", label: "Settings", shortcut: "Cmd+,", group: "App" }
816
- ]
817
- },
818
- context: "Desktop applications, power-user interfaces"
819
- }
820
- ],
821
- source: "components/organisms/CommandPalette/CommandPalette.tsx",
822
- storybook: "organisms-commandpalette",
823
- tags: ["command", "palette", "search", "keyboard", "navigation", "cmdk"]
824
- };
825
- var glassPanelManifest = {
826
- id: "glass-panel",
827
- name: "GlassPanel",
828
- version: "1.0.0",
829
- category: "organisms",
830
- purpose: ["container", "overlay"],
831
- description: "Glassmorphism container with backdrop blur, borders, and optional glow effects.",
832
- bestFor: [
833
- "Card containers",
834
- "Modal overlays",
835
- "Sidebar panels",
836
- "Floating UI elements"
837
- ],
838
- avoid: [
839
- "Dense content areas (blur is heavy)",
840
- "Low-end device targets",
841
- "Text-heavy content (readability)"
842
- ],
843
- props: {
844
- children: {
845
- type: "ReactNode",
846
- description: "Panel content",
847
- required: true
848
- },
849
- variant: {
850
- type: "enum",
851
- description: "Glass intensity",
852
- enum: ["light", "medium", "heavy"],
853
- default: "medium"
854
- },
855
- blur: {
856
- type: "number",
857
- description: "Backdrop blur amount (px)",
858
- default: 12
859
- },
860
- border: {
861
- type: "boolean",
862
- description: "Show border",
863
- default: true
864
- },
865
- glow: {
866
- type: "boolean",
867
- description: "Enable glow effect",
868
- default: false
869
- },
870
- glowColor: {
871
- type: "string",
872
- description: "Glow color"
873
- },
874
- padding: {
875
- type: "enum",
876
- description: "Internal padding",
877
- enum: ["none", "sm", "md", "lg"],
878
- default: "md"
879
- },
880
- rounded: {
881
- type: "enum",
882
- description: "Border radius",
883
- enum: ["none", "sm", "md", "lg", "full"],
884
- default: "md"
885
- }
886
- },
887
- slots: [
888
- {
889
- name: "default",
890
- description: "Panel content",
891
- accepts: ["*"],
892
- required: true,
893
- multiple: true
894
- }
895
- ],
896
- validParents: ["bento-grid"],
897
- validChildren: ["*"],
898
- styles: ["glassmorphism", "minimal"],
899
- supportsTheme: true,
900
- cssVariables: ["--glass-bg", "--glass-border", "--glass-blur"],
901
- interactions: [],
902
- a11y: ["high-contrast"],
903
- examples: [
904
- {
905
- name: "Card Container",
906
- description: "Standard glass card",
907
- props: { variant: "medium", padding: "lg", rounded: "lg" },
908
- context: "Card layouts, content containers"
909
- },
910
- {
911
- name: "Glowing Panel",
912
- description: "Panel with glow effect",
913
- props: { glow: true, glowColor: "#00ff88", border: true },
914
- context: "Feature highlights, CTAs"
915
- }
916
- ],
917
- source: "components/organisms/Glass/GlassPanel.tsx",
918
- storybook: "organisms-glasspanel",
919
- tags: ["glass", "panel", "container", "blur", "glassmorphism"]
920
- };
921
- var bentoGridManifest = {
922
- id: "bento-grid",
923
- name: "BentoGrid",
924
- version: "1.0.0",
925
- category: "organisms",
926
- purpose: ["grid-layout", "container"],
927
- description: "Responsive bento-style grid layout. Auto-places children in an asymmetric, visually interesting grid.",
928
- bestFor: [
929
- "Feature grids",
930
- "Dashboard layouts",
931
- "Portfolio displays",
932
- "Landing page sections"
933
- ],
934
- avoid: [
935
- "Simple linear content",
936
- "Dense data tables",
937
- "Uniform content sizes"
938
- ],
939
- props: {
940
- children: {
941
- type: "ReactNode",
942
- description: "Grid items",
943
- required: true
944
- },
945
- columns: {
946
- type: "number",
947
- description: "Number of columns",
948
- default: 4
949
- },
950
- gap: {
951
- type: "number",
952
- description: "Gap between items (px)",
953
- default: 16
954
- },
955
- className: {
956
- type: "string",
957
- description: "Additional CSS classes"
958
- }
959
- },
960
- slots: [
961
- {
962
- name: "default",
963
- description: "Grid items",
964
- accepts: ["glass-panel", "three-d-card", "kpi-stat"],
965
- required: true,
966
- multiple: true
967
- }
968
- ],
969
- validParents: [],
970
- validChildren: ["glass-panel", "three-d-card", "kpi-stat"],
971
- styles: ["minimal"],
972
- supportsTheme: true,
973
- cssVariables: ["--bento-gap"],
974
- interactions: ["resize"],
975
- a11y: [],
976
- examples: [
977
- {
978
- name: "Feature Grid",
979
- description: "4-column feature showcase",
980
- props: { columns: 4, gap: 24 },
981
- context: "Landing pages, feature sections",
982
- code: `<BentoGrid columns={4}>
983
- <GlassPanel>Feature 1</GlassPanel>
984
- <GlassPanel>Feature 2</GlassPanel>
985
- <GlassPanel>Feature 3</GlassPanel>
986
- </BentoGrid>`
987
- },
988
- {
989
- name: "Dashboard Grid",
990
- description: "Dashboard widget layout",
991
- props: { columns: 3, gap: 16 },
992
- context: "Dashboards, admin panels"
993
- }
994
- ],
995
- source: "components/organisms/BentoGrid/BentoGrid.tsx",
996
- storybook: "organisms-bentogrid",
997
- tags: ["grid", "bento", "layout", "responsive", "dashboard"]
998
- };
999
- var organismManifests = [
1000
- commandPaletteManifest,
1001
- glassPanelManifest,
1002
- bentoGridManifest
1003
- ];
1004
-
1005
- // src/workspace/registry/manifests/three.ts
1006
- var graph3DManifest = {
1007
- id: "graph-3d",
1008
- name: "Graph3D",
1009
- version: "1.0.0",
1010
- category: "three",
1011
- purpose: ["visualization", "data-display"],
1012
- description: "3D node-link graph visualization using Three.js. Force-directed layout with interactive navigation.",
1013
- bestFor: [
1014
- "Knowledge graphs",
1015
- "Network visualizations",
1016
- "Relationship mapping",
1017
- "Concept maps"
1018
- ],
1019
- avoid: [
1020
- "Simple hierarchies (use tree instead)",
1021
- "Mobile devices (performance)",
1022
- "Very large graphs (>1000 nodes)"
1023
- ],
1024
- props: {
1025
- nodes: {
1026
- type: "array",
1027
- description: "Graph nodes",
1028
- required: true,
1029
- items: {
1030
- type: "object",
1031
- description: "Node definition",
1032
- properties: {
1033
- id: { type: "string", description: "Unique node ID", required: true },
1034
- label: { type: "string", description: "Display label" },
1035
- color: { type: "string", description: "Node color" },
1036
- size: { type: "number", description: "Node size" },
1037
- group: { type: "string", description: "Grouping category" }
1038
- }
1039
- }
1040
- },
1041
- edges: {
1042
- type: "array",
1043
- description: "Graph edges",
1044
- required: true,
1045
- items: {
1046
- type: "object",
1047
- description: "Edge definition",
1048
- properties: {
1049
- source: { type: "string", description: "Source node ID", required: true },
1050
- target: { type: "string", description: "Target node ID", required: true },
1051
- label: { type: "string", description: "Edge label" },
1052
- weight: { type: "number", description: "Edge weight" }
1053
- }
1054
- }
1055
- },
1056
- width: {
1057
- type: "number",
1058
- description: "Container width"
1059
- },
1060
- height: {
1061
- type: "number",
1062
- description: "Container height"
1063
- },
1064
- onNodeClick: {
1065
- type: "function",
1066
- description: "Node click handler"
1067
- },
1068
- onNodeHover: {
1069
- type: "function",
1070
- description: "Node hover handler"
1071
- },
1072
- cameraPosition: {
1073
- type: "object",
1074
- description: "Initial camera position",
1075
- properties: {
1076
- x: { type: "number", description: "X position" },
1077
- y: { type: "number", description: "Y position" },
1078
- z: { type: "number", description: "Z position" }
1079
- }
1080
- },
1081
- enableZoom: {
1082
- type: "boolean",
1083
- description: "Enable zoom controls",
1084
- default: true
1085
- },
1086
- enableRotate: {
1087
- type: "boolean",
1088
- description: "Enable rotation controls",
1089
- default: true
1090
- }
1091
- },
1092
- slots: [],
1093
- validParents: ["glass-panel"],
1094
- validChildren: [],
1095
- styles: ["3d", "animated"],
1096
- supportsTheme: true,
1097
- cssVariables: ["--graph-node-color", "--graph-edge-color"],
1098
- interactions: ["click", "hover", "drag", "scroll"],
1099
- a11y: ["keyboard-nav"],
1100
- examples: [
1101
- {
1102
- name: "Knowledge Graph",
1103
- description: "Concept relationship graph",
1104
- props: {
1105
- nodes: [
1106
- { id: "1", label: "React", group: "frontend" },
1107
- { id: "2", label: "TypeScript", group: "language" },
1108
- { id: "3", label: "Node.js", group: "backend" }
1109
- ],
1110
- edges: [
1111
- { source: "1", target: "2" },
1112
- { source: "2", target: "3" }
1113
- ]
1114
- },
1115
- context: "Knowledge bases, learning paths"
1116
- }
1117
- ],
1118
- source: "components/three/Graph3D/Graph3D.tsx",
1119
- storybook: "three-graph3d",
1120
- tags: ["graph", "3d", "network", "visualization", "nodes", "edges"]
1121
- };
1122
- var particleFieldManifest = {
1123
- id: "particle-field",
1124
- name: "ParticleField",
1125
- version: "1.0.0",
1126
- category: "three",
1127
- purpose: ["background", "decoration", "visualization"],
1128
- description: "Animated particle system background. Creates atmospheric, dynamic visual effects.",
1129
- bestFor: [
1130
- "Hero backgrounds",
1131
- "Loading screens",
1132
- "Ambient effects",
1133
- "Interactive visualizations"
1134
- ],
1135
- avoid: [
1136
- "Content-heavy areas (distracting)",
1137
- "Low-end devices (performance)",
1138
- "Print/static contexts"
1139
- ],
1140
- props: {
1141
- count: {
1142
- type: "number",
1143
- description: "Number of particles",
1144
- default: 1e3
1145
- },
1146
- size: {
1147
- type: "number",
1148
- description: "Particle size",
1149
- default: 0.02
1150
- },
1151
- color: {
1152
- type: "string",
1153
- description: "Particle color",
1154
- default: "#ffffff"
1155
- },
1156
- speed: {
1157
- type: "number",
1158
- description: "Animation speed",
1159
- default: 1
1160
- },
1161
- spread: {
1162
- type: "number",
1163
- description: "Particle spread radius",
1164
- default: 10
1165
- },
1166
- interactive: {
1167
- type: "boolean",
1168
- description: "React to mouse movement",
1169
- default: false
1170
- },
1171
- opacity: {
1172
- type: "number",
1173
- description: "Particle opacity (0-1)",
1174
- default: 0.8
1175
- },
1176
- depth: {
1177
- type: "boolean",
1178
- description: "Enable depth variation",
1179
- default: true
1180
- }
1181
- },
1182
- slots: [],
1183
- validParents: [],
1184
- validChildren: [],
1185
- styles: ["3d", "animated"],
1186
- supportsTheme: true,
1187
- cssVariables: ["--particle-color"],
1188
- interactions: ["hover"],
1189
- a11y: ["reduced-motion"],
1190
- examples: [
1191
- {
1192
- name: "Starfield",
1193
- description: "Star-like particle background",
1194
- props: { count: 2e3, size: 0.01, color: "#ffffff", spread: 20 },
1195
- context: "Space themes, hero backgrounds"
1196
- },
1197
- {
1198
- name: "Interactive Dust",
1199
- description: "Mouse-reactive particles",
1200
- props: { count: 500, interactive: true, color: "#00ff88" },
1201
- context: "Landing pages, interactive experiences"
1202
- }
1203
- ],
1204
- source: "components/three/ParticleField/ParticleField.tsx",
1205
- storybook: "three-particlefield",
1206
- tags: ["particles", "3d", "background", "animation", "webgl"]
1207
- };
1208
- var threeManifests = [
1209
- graph3DManifest,
1210
- particleFieldManifest
1211
- ];
1212
-
1213
- // src/workspace/registry/manifests/layouts.ts
1214
- var splitPanelManifest = {
1215
- id: "split-panel",
1216
- name: "SplitPanel",
1217
- version: "1.0.0",
1218
- category: "layouts",
1219
- purpose: ["container", "grid-layout"],
1220
- description: "Resizable split panel layout. Divides space into two resizable sections.",
1221
- bestFor: [
1222
- "IDE-style layouts",
1223
- "Editor + preview layouts",
1224
- "Sidebar + content layouts",
1225
- "Comparison views"
1226
- ],
1227
- avoid: [
1228
- "Mobile layouts (not resizable)",
1229
- "Simple content (overkill)",
1230
- "More than 2 sections (nest instead)"
1231
- ],
1232
- props: {
1233
- direction: {
1234
- type: "enum",
1235
- description: "Split direction",
1236
- enum: ["horizontal", "vertical"],
1237
- default: "horizontal"
1238
- },
1239
- defaultSize: {
1240
- type: "number",
1241
- description: "Default first panel size (percentage)",
1242
- default: 50
1243
- },
1244
- minSize: {
1245
- type: "number",
1246
- description: "Minimum panel size (percentage)",
1247
- default: 10
1248
- },
1249
- maxSize: {
1250
- type: "number",
1251
- description: "Maximum panel size (percentage)",
1252
- default: 90
1253
- },
1254
- onResize: {
1255
- type: "function",
1256
- description: "Resize callback with new size"
1257
- },
1258
- children: {
1259
- type: "array",
1260
- description: "Exactly 2 children for each panel",
1261
- required: true
1262
- }
1263
- },
1264
- slots: [
1265
- {
1266
- name: "first",
1267
- description: "First panel content",
1268
- accepts: ["*"],
1269
- required: true
1270
- },
1271
- {
1272
- name: "second",
1273
- description: "Second panel content",
1274
- accepts: ["*"],
1275
- required: true
1276
- }
1277
- ],
1278
- validParents: ["workspace-root", "split-panel"],
1279
- validChildren: ["*"],
1280
- styles: ["minimal"],
1281
- supportsTheme: true,
1282
- cssVariables: ["--split-handle-color", "--split-handle-width"],
1283
- interactions: ["drag", "resize"],
1284
- a11y: ["keyboard-nav"],
1285
- examples: [
1286
- {
1287
- name: "Sidebar Layout",
1288
- description: "Sidebar + main content",
1289
- props: { direction: "horizontal", defaultSize: 25 },
1290
- context: "Dashboard layouts, file explorers"
1291
- },
1292
- {
1293
- name: "Editor Preview",
1294
- description: "Code editor + live preview",
1295
- props: { direction: "horizontal", defaultSize: 50 },
1296
- context: "Code playgrounds, markdown editors"
1297
- }
1298
- ],
1299
- source: "components/layouts/SplitPanel.tsx",
1300
- storybook: "layouts-splitpanel",
1301
- tags: ["layout", "split", "resize", "panel", "container"]
1302
- };
1303
- var tabsPanelManifest = {
1304
- id: "tabs-panel",
1305
- name: "TabsPanel",
1306
- version: "1.0.0",
1307
- category: "layouts",
1308
- purpose: ["navigation", "container"],
1309
- description: "Tabbed content panel. Switches between multiple content areas with tab navigation.",
1310
- bestFor: [
1311
- "Settings pages",
1312
- "Multi-section content",
1313
- "Code/preview toggles",
1314
- "Category navigation"
1315
- ],
1316
- avoid: [
1317
- "Many tabs (>6 becomes unwieldy)",
1318
- "Deep navigation (use routing)",
1319
- "Frequent switching content"
1320
- ],
1321
- props: {
1322
- tabs: {
1323
- type: "array",
1324
- description: "Tab definitions",
1325
- required: true,
1326
- items: {
1327
- type: "object",
1328
- description: "Tab definition",
1329
- properties: {
1330
- id: { type: "string", description: "Tab ID", required: true },
1331
- label: { type: "string", description: "Tab label", required: true },
1332
- icon: { type: "ReactNode", description: "Tab icon" },
1333
- disabled: { type: "boolean", description: "Disable tab" }
1334
- }
1335
- }
1336
- },
1337
- activeTab: {
1338
- type: "string",
1339
- description: "Controlled active tab ID"
1340
- },
1341
- defaultTab: {
1342
- type: "string",
1343
- description: "Default active tab ID"
1344
- },
1345
- onTabChange: {
1346
- type: "function",
1347
- description: "Tab change handler"
1348
- },
1349
- children: {
1350
- type: "ReactNode",
1351
- description: "Tab content (keyed by tab ID)",
1352
- required: true
1353
- },
1354
- orientation: {
1355
- type: "enum",
1356
- description: "Tab orientation",
1357
- enum: ["horizontal", "vertical"],
1358
- default: "horizontal"
1359
- }
1360
- },
1361
- slots: [],
1362
- validParents: ["split-panel", "workspace-root"],
1363
- validChildren: ["*"],
1364
- styles: ["minimal", "glassmorphism"],
1365
- supportsTheme: true,
1366
- cssVariables: ["--tab-active-color", "--tab-hover-color"],
1367
- interactions: ["click", "keyboard"],
1368
- a11y: ["keyboard-nav", "aria-labels", "focus-visible"],
1369
- examples: [
1370
- {
1371
- name: "Settings Tabs",
1372
- description: "Settings page with tabs",
1373
- props: {
1374
- tabs: [
1375
- { id: "general", label: "General" },
1376
- { id: "account", label: "Account" },
1377
- { id: "appearance", label: "Appearance" }
1378
- ],
1379
- defaultTab: "general"
1380
- },
1381
- context: "Settings pages, preferences"
1382
- }
1383
- ],
1384
- source: "components/layouts/TabsPanel.tsx",
1385
- storybook: "layouts-tabspanel",
1386
- tags: ["tabs", "navigation", "panel", "container", "switch"]
1387
- };
1388
- var stackLayoutManifest = {
1389
- id: "stack-layout",
1390
- name: "StackLayout",
1391
- version: "1.0.0",
1392
- category: "layouts",
1393
- purpose: ["container", "grid-layout"],
1394
- description: "Flexible stack layout (horizontal or vertical). CSS flexbox abstraction.",
1395
- bestFor: [
1396
- "Button groups",
1397
- "Form layouts",
1398
- "Card lists",
1399
- "Toolbar layouts"
1400
- ],
1401
- avoid: [
1402
- "Complex grid layouts (use BentoGrid)",
1403
- "Overlapping content"
1404
- ],
1405
- props: {
1406
- direction: {
1407
- type: "enum",
1408
- description: "Stack direction",
1409
- enum: ["row", "column"],
1410
- default: "column"
1411
- },
1412
- gap: {
1413
- type: "number",
1414
- description: "Gap between items (px)",
1415
- default: 8
1416
- },
1417
- align: {
1418
- type: "enum",
1419
- description: "Cross-axis alignment",
1420
- enum: ["start", "center", "end", "stretch"],
1421
- default: "stretch"
1422
- },
1423
- justify: {
1424
- type: "enum",
1425
- description: "Main-axis alignment",
1426
- enum: ["start", "center", "end", "between", "around"],
1427
- default: "start"
1428
- },
1429
- wrap: {
1430
- type: "boolean",
1431
- description: "Allow wrapping",
1432
- default: false
1433
- },
1434
- children: {
1435
- type: "ReactNode",
1436
- description: "Stack items",
1437
- required: true
1438
- }
1439
- },
1440
- slots: [
1441
- {
1442
- name: "default",
1443
- description: "Stack items",
1444
- accepts: ["*"],
1445
- required: true,
1446
- multiple: true
1447
- }
1448
- ],
1449
- validParents: ["*"],
1450
- validChildren: ["*"],
1451
- styles: ["minimal"],
1452
- supportsTheme: true,
1453
- interactions: [],
1454
- a11y: [],
1455
- examples: [
1456
- {
1457
- name: "Button Group",
1458
- description: "Horizontal button group",
1459
- props: { direction: "row", gap: 8, align: "center" },
1460
- context: "Action bars, toolbars"
1461
- },
1462
- {
1463
- name: "Form Layout",
1464
- description: "Vertical form fields",
1465
- props: { direction: "column", gap: 16 },
1466
- context: "Form layouts, settings"
1467
- }
1468
- ],
1469
- source: "components/layouts/StackLayout.tsx",
1470
- storybook: "layouts-stacklayout",
1471
- tags: ["layout", "stack", "flex", "row", "column"]
1472
- };
1473
- var layoutManifests = [
1474
- splitPanelManifest,
1475
- tabsPanelManifest,
1476
- stackLayoutManifest
1477
- ];
1478
-
1479
- // src/workspace/registry/manifests/index.ts
1480
- var allManifests = [
1481
- ...atomManifests,
1482
- ...moleculeManifests,
1483
- ...organismManifests,
1484
- ...threeManifests,
1485
- ...layoutManifests
1486
- ];
1487
- var manifestById = new Map(
1488
- allManifests.map((m) => [m.id, m])
1489
- );
1490
- var manifestsByCategory = {
1491
- atoms: atomManifests,
1492
- molecules: moleculeManifests,
1493
- organisms: organismManifests,
1494
- three: threeManifests,
1495
- layouts: layoutManifests
1496
- };
1497
-
1498
- // src/workspace/registry/registry.ts
1499
- var DefaultRegistry = class {
1500
- manifests;
1501
- byId;
1502
- byCategory;
1503
- constructor(manifests = allManifests) {
1504
- this.manifests = manifests;
1505
- this.byId = new Map(manifests.map((m) => [m.id, m]));
1506
- this.byCategory = manifests.reduce(
1507
- (acc, m) => {
1508
- if (!acc[m.category]) acc[m.category] = [];
1509
- acc[m.category].push(m);
1510
- return acc;
1511
- },
1512
- {}
1513
- );
1514
- }
1515
- /**
1516
- * Get a component by ID
1517
- */
1518
- get(id) {
1519
- return this.byId.get(id);
1520
- }
1521
- /**
1522
- * List components with optional filtering
1523
- */
1524
- list(query) {
1525
- if (!query) return this.manifests;
1526
- let results = [...this.manifests];
1527
- if (query.category) {
1528
- results = results.filter((m) => m.category === query.category);
1529
- }
1530
- if (query.purpose) {
1531
- const purposes = Array.isArray(query.purpose) ? query.purpose : [query.purpose];
1532
- results = results.filter(
1533
- (m) => purposes.some((p) => m.purpose.includes(p))
1534
- );
1535
- }
1536
- if (query.style) {
1537
- const styles = Array.isArray(query.style) ? query.style : [query.style];
1538
- results = results.filter(
1539
- (m) => styles.some((s) => m.styles.includes(s))
1540
- );
1541
- }
1542
- if (query.tags && query.tags.length > 0) {
1543
- results = results.filter(
1544
- (m) => query.tags.some((t) => m.tags.includes(t))
1545
- );
1546
- }
1547
- if (query.hasSlots !== void 0) {
1548
- results = results.filter(
1549
- (m) => (m.slots && m.slots.length > 0) === query.hasSlots
1550
- );
1551
- }
1552
- if (query.supportsChildren !== void 0) {
1553
- results = results.filter(
1554
- (m) => (m.validChildren && m.validChildren.length > 0) === query.supportsChildren
1555
- );
1556
- }
1557
- if (query.search) {
1558
- const searchLower = query.search.toLowerCase();
1559
- results = results.filter(
1560
- (m) => m.name.toLowerCase().includes(searchLower) || m.description.toLowerCase().includes(searchLower) || m.tags.some((t) => t.includes(searchLower)) || m.bestFor.some((b) => b.toLowerCase().includes(searchLower))
1561
- );
1562
- }
1563
- if (query.limit && query.limit > 0) {
1564
- results = results.slice(0, query.limit);
1565
- }
1566
- return results;
1567
- }
1568
- /**
1569
- * Search with relevance scoring
1570
- */
1571
- search(query) {
1572
- const queryLower = query.toLowerCase();
1573
- const queryTokens = queryLower.split(/\s+/).filter((t) => t.length > 2);
1574
- const results = this.manifests.map((component) => {
1575
- let score = 0;
1576
- const matchedOn = [];
1577
- if (component.name.toLowerCase().includes(queryLower)) {
1578
- score += 0.4;
1579
- matchedOn.push("name");
1580
- }
1581
- if (component.id.toLowerCase().includes(queryLower)) {
1582
- score += 0.2;
1583
- matchedOn.push("id");
1584
- }
1585
- const descLower = component.description.toLowerCase();
1586
- if (descLower.includes(queryLower)) {
1587
- score += 0.15;
1588
- matchedOn.push("description");
1589
- }
1590
- const matchedTags = component.tags.filter(
1591
- (t) => queryTokens.some((qt) => t.includes(qt))
1592
- );
1593
- if (matchedTags.length > 0) {
1594
- score += 0.1 * Math.min(matchedTags.length, 3);
1595
- matchedOn.push(`tags:${matchedTags.join(",")}`);
1596
- }
1597
- const matchedBestFor = component.bestFor.filter(
1598
- (b) => queryTokens.some((qt) => b.toLowerCase().includes(qt))
1599
- );
1600
- if (matchedBestFor.length > 0) {
1601
- score += 0.1 * Math.min(matchedBestFor.length, 2);
1602
- matchedOn.push("bestFor");
1603
- }
1604
- const matchedPurposes = component.purpose.filter(
1605
- (p) => queryTokens.some((qt) => p.includes(qt))
1606
- );
1607
- if (matchedPurposes.length > 0) {
1608
- score += 0.05 * matchedPurposes.length;
1609
- matchedOn.push(`purpose:${matchedPurposes.join(",")}`);
1610
- }
1611
- return { component, score, matchedOn };
1612
- });
1613
- return results.filter((r) => r.score > 0).sort((a, b) => b.score - a.score);
1614
- }
1615
- /**
1616
- * Check if a component can be placed inside another
1617
- */
1618
- canCompose(parentId, childId) {
1619
- const parent = this.get(parentId);
1620
- const child = this.get(childId);
1621
- if (!parent || !child) return false;
1622
- if (parent.validChildren) {
1623
- if (parent.validChildren.includes("*") || parent.validChildren.includes(childId)) {
1624
- return true;
1625
- }
1626
- }
1627
- if (child.validParents) {
1628
- if (child.validParents.includes("*") || child.validParents.includes(parentId)) {
1629
- return true;
1630
- }
1631
- }
1632
- if (parent.incompatibleWith?.includes(childId)) return false;
1633
- if (child.incompatibleWith?.includes(parentId)) return false;
1634
- return parent.slots !== void 0 && parent.slots.length > 0;
1635
- }
1636
- /**
1637
- * Get components that can be children of the given parent
1638
- */
1639
- getValidChildren(parentId) {
1640
- const parent = this.get(parentId);
1641
- if (!parent) return [];
1642
- return this.manifests.filter((child) => this.canCompose(parentId, child.id));
1643
- }
1644
- /**
1645
- * Get components that can be parents of the given child
1646
- */
1647
- getValidParents(childId) {
1648
- const child = this.get(childId);
1649
- if (!child) return [];
1650
- return this.manifests.filter((parent) => this.canCompose(parent.id, childId));
1651
- }
1652
- /**
1653
- * Get all categories
1654
- */
1655
- categories() {
1656
- return Object.keys(this.byCategory);
1657
- }
1658
- /**
1659
- * Get all purposes used across components
1660
- */
1661
- purposes() {
1662
- const purposes = /* @__PURE__ */ new Set();
1663
- this.manifests.forEach((m) => m.purpose.forEach((p) => purposes.add(p)));
1664
- return Array.from(purposes);
1665
- }
1666
- /**
1667
- * Get all tags used across components
1668
- */
1669
- tags() {
1670
- const tags = /* @__PURE__ */ new Set();
1671
- this.manifests.forEach((m) => m.tags.forEach((t) => tags.add(t)));
1672
- return Array.from(tags).sort();
1673
- }
1674
- /**
1675
- * Get total component count
1676
- */
1677
- count() {
1678
- return this.manifests.length;
1679
- }
1680
- };
1681
- var registryInstance = null;
1682
- function getRegistry() {
1683
- if (!registryInstance) {
1684
- registryInstance = new DefaultRegistry();
1685
- }
1686
- return registryInstance;
1687
- }
1688
- function createRegistry(manifests) {
1689
- return new DefaultRegistry(manifests);
1690
- }
1691
- var registry = getRegistry();
1692
- var WorkspaceContext = createContext(null);
1693
- function useWorkspace() {
1694
- const ctx = useContext(WorkspaceContext);
1695
- if (!ctx) {
1696
- throw new Error("useWorkspace must be used within WorkspaceRenderer");
1697
- }
1698
- return ctx;
1699
- }
1700
- var componentMap = {};
1701
- function registerComponent(id, component) {
1702
- componentMap[id] = component;
1703
- }
1704
- function getComponent(id) {
1705
- return componentMap[id] || null;
1706
- }
1707
- function SplitLayoutRenderer({ node }) {
1708
- const { direction, sizes, children } = node;
1709
- const isHorizontal = direction === "horizontal";
1710
- return /* @__PURE__ */ jsx(
1711
- "div",
1712
- {
1713
- className: "workspace-split",
1714
- style: {
1715
- display: "flex",
1716
- flexDirection: isHorizontal ? "row" : "column",
1717
- width: "100%",
1718
- height: "100%"
1719
- },
1720
- children: children.map((child, i) => {
1721
- const size = sizes?.[i];
1722
- const style = {
1723
- flex: size === "fill" ? 1 : void 0,
1724
- width: isHorizontal && typeof size === "number" ? size : void 0,
1725
- height: !isHorizontal && typeof size === "number" ? size : void 0
1726
- };
1727
- return /* @__PURE__ */ jsx("div", { className: "workspace-split-panel", style, children: /* @__PURE__ */ jsx(LayoutRenderer, { node: child }) }, i);
1728
- })
1729
- }
1730
- );
1731
- }
1732
- function StackLayoutRenderer({ node }) {
1733
- const { direction, gap = 8, align = "stretch", justify = "start", wrap, children } = node;
1734
- const alignMap = {
1735
- start: "flex-start",
1736
- center: "center",
1737
- end: "flex-end",
1738
- stretch: "stretch"
1739
- };
1740
- const justifyMap = {
1741
- start: "flex-start",
1742
- center: "center",
1743
- end: "flex-end",
1744
- between: "space-between",
1745
- around: "space-around"
1746
- };
1747
- return /* @__PURE__ */ jsx(
1748
- "div",
1749
- {
1750
- className: "workspace-stack",
1751
- style: {
1752
- display: "flex",
1753
- flexDirection: direction === "horizontal" ? "row" : "column",
1754
- gap,
1755
- alignItems: alignMap[align],
1756
- justifyContent: justifyMap[justify],
1757
- flexWrap: wrap ? "wrap" : "nowrap",
1758
- width: "100%",
1759
- height: "100%"
1760
- },
1761
- children: children.map((child, i) => /* @__PURE__ */ jsx("div", { className: "workspace-stack-item", children: /* @__PURE__ */ jsx(LayoutRenderer, { node: child }) }, i))
1762
- }
1763
- );
1764
- }
1765
- function TabsLayoutRenderer({ node }) {
1766
- const { orientation = "horizontal", defaultTab, children } = node;
1767
- const [activeTab, setActiveTab] = useState(defaultTab || children[0]?.id);
1768
- const activeContent = children.find((t) => t.id === activeTab)?.content;
1769
- return /* @__PURE__ */ jsxs(
1770
- "div",
1771
- {
1772
- className: "workspace-tabs",
1773
- style: {
1774
- display: "flex",
1775
- flexDirection: orientation === "horizontal" ? "column" : "row",
1776
- width: "100%",
1777
- height: "100%"
1778
- },
1779
- children: [
1780
- /* @__PURE__ */ jsx(
1781
- "div",
1782
- {
1783
- className: "workspace-tabs-list",
1784
- role: "tablist",
1785
- style: {
1786
- display: "flex",
1787
- flexDirection: orientation === "horizontal" ? "row" : "column",
1788
- gap: 4,
1789
- padding: 4,
1790
- borderBottom: orientation === "horizontal" ? "1px solid var(--border, #333)" : void 0,
1791
- borderRight: orientation === "vertical" ? "1px solid var(--border, #333)" : void 0
1792
- },
1793
- children: children.map((tab) => /* @__PURE__ */ jsx(
1794
- "button",
1795
- {
1796
- role: "tab",
1797
- "aria-selected": activeTab === tab.id,
1798
- disabled: tab.disabled,
1799
- onClick: () => setActiveTab(tab.id),
1800
- style: {
1801
- padding: "8px 16px",
1802
- background: activeTab === tab.id ? "var(--accent, #333)" : "transparent",
1803
- border: "none",
1804
- borderRadius: 4,
1805
- color: "inherit",
1806
- cursor: tab.disabled ? "not-allowed" : "pointer",
1807
- opacity: tab.disabled ? 0.5 : 1
1808
- },
1809
- children: tab.label
1810
- },
1811
- tab.id
1812
- ))
1813
- }
1814
- ),
1815
- /* @__PURE__ */ jsx(
1816
- "div",
1817
- {
1818
- className: "workspace-tabs-content",
1819
- role: "tabpanel",
1820
- style: { flex: 1, overflow: "auto" },
1821
- children: activeContent && /* @__PURE__ */ jsx(LayoutRenderer, { node: activeContent })
1822
- }
1823
- )
1824
- ]
1825
- }
1826
- );
1827
- }
1828
- function GridLayoutRenderer({ node }) {
1829
- const { columns = 1, rows, gap = 16, children } = node;
1830
- const gridTemplateColumns = typeof columns === "number" ? `repeat(${columns}, 1fr)` : columns;
1831
- const gridTemplateRows = typeof rows === "number" ? `repeat(${rows}, 1fr)` : rows;
1832
- const gridGap = Array.isArray(gap) ? `${gap[0]}px ${gap[1]}px` : gap;
1833
- return /* @__PURE__ */ jsx(
1834
- "div",
1835
- {
1836
- className: "workspace-grid",
1837
- style: {
1838
- display: "grid",
1839
- gridTemplateColumns,
1840
- gridTemplateRows: gridTemplateRows || void 0,
1841
- gap: gridGap,
1842
- width: "100%",
1843
- height: "100%"
1844
- },
1845
- children: children.map((item, i) => /* @__PURE__ */ jsx(
1846
- "div",
1847
- {
1848
- className: "workspace-grid-item",
1849
- style: {
1850
- gridColumn: item.colSpan ? `span ${item.colSpan}` : item.column,
1851
- gridRow: item.rowSpan ? `span ${item.rowSpan}` : item.row
1852
- },
1853
- children: /* @__PURE__ */ jsx(LayoutRenderer, { node: item.content })
1854
- },
1855
- item.id || i
1856
- ))
1857
- }
1858
- );
1859
- }
1860
- function PanelRenderer({ node }) {
1861
- const { component, props = {}, children } = node;
1862
- const ctx = useWorkspace();
1863
- const Component = getComponent(component);
1864
- if (!Component) {
1865
- const manifest = ctx.registry ? ctx.registry.get(component) : null;
1866
- return /* @__PURE__ */ jsxs(
1867
- "div",
1868
- {
1869
- className: "workspace-panel workspace-panel-placeholder",
1870
- style: {
1871
- padding: 16,
1872
- background: "var(--muted, #1a1a1a)",
1873
- borderRadius: 8,
1874
- border: "1px dashed var(--border, #333)"
1875
- },
1876
- children: [
1877
- /* @__PURE__ */ jsxs("div", { style: { opacity: 0.7, fontSize: 12 }, children: [
1878
- "Component: ",
1879
- /* @__PURE__ */ jsx("strong", { children: component })
1880
- ] }),
1881
- manifest && /* @__PURE__ */ jsx("div", { style: { opacity: 0.5, fontSize: 11, marginTop: 4 }, children: manifest.description }),
1882
- Object.keys(props).length > 0 && /* @__PURE__ */ jsx(
1883
- "pre",
1884
- {
1885
- style: {
1886
- marginTop: 8,
1887
- fontSize: 10,
1888
- opacity: 0.6,
1889
- overflow: "auto"
1890
- },
1891
- children: JSON.stringify(props, null, 2)
1892
- }
1893
- )
1894
- ]
1895
- }
1896
- );
1897
- }
1898
- const childNodes = children?.map((child, i) => /* @__PURE__ */ jsx(PanelRenderer, { node: child }, i));
1899
- return /* @__PURE__ */ jsx("div", { className: "workspace-panel", children: /* @__PURE__ */ jsx(Component, { ...props, children: childNodes }) });
1900
- }
1901
- function SlotRenderer({ node }) {
1902
- const { slots } = useWorkspace();
1903
- const content = slots?.[node.name];
1904
- if (content) {
1905
- return /* @__PURE__ */ jsx(Fragment, { children: content });
1906
- }
1907
- if (node.fallback) {
1908
- return /* @__PURE__ */ jsx(LayoutRenderer, { node: node.fallback });
1909
- }
1910
- return /* @__PURE__ */ jsxs(
1911
- "div",
1912
- {
1913
- className: "workspace-slot workspace-slot-empty",
1914
- style: {
1915
- padding: 16,
1916
- background: "var(--muted, #1a1a1a)",
1917
- borderRadius: 8,
1918
- border: "2px dashed var(--border, #333)",
1919
- textAlign: "center",
1920
- opacity: 0.5
1921
- },
1922
- children: [
1923
- "Slot: ",
1924
- node.name
1925
- ]
1926
- }
1927
- );
1928
- }
1929
- function LayoutRenderer({ node }) {
1930
- switch (node.type) {
1931
- case "split":
1932
- return /* @__PURE__ */ jsx(SplitLayoutRenderer, { node });
1933
- case "stack":
1934
- return /* @__PURE__ */ jsx(StackLayoutRenderer, { node });
1935
- case "tabs":
1936
- return /* @__PURE__ */ jsx(TabsLayoutRenderer, { node });
1937
- case "grid":
1938
- return /* @__PURE__ */ jsx(GridLayoutRenderer, { node });
1939
- case "panel":
1940
- return /* @__PURE__ */ jsx(PanelRenderer, { node });
1941
- case "slot":
1942
- return /* @__PURE__ */ jsx(SlotRenderer, { node });
1943
- default:
1944
- return /* @__PURE__ */ jsxs("div", { className: "workspace-unknown", children: [
1945
- "Unknown layout type: ",
1946
- node.type
1947
- ] });
1948
- }
1949
- }
1950
- function WorkspaceRenderer({
1951
- spec,
1952
- slots,
1953
- onEvent,
1954
- theme: themeOverrides,
1955
- surface = "desktop",
1956
- className,
1957
- style
1958
- }) {
1959
- const theme = useMemo(
1960
- () => ({ ...spec.theme, ...themeOverrides }),
1961
- [spec.theme, themeOverrides]
1962
- );
1963
- const [state, setStateObj] = useState(
1964
- spec.state?.initial || {}
1965
- );
1966
- const setState = useCallback((path, value) => {
1967
- setStateObj((prev) => {
1968
- const keys = path.split(".");
1969
- const newState = { ...prev };
1970
- let current = newState;
1971
- for (let i = 0; i < keys.length - 1; i++) {
1972
- const key = keys[i];
1973
- current[key] = { ...current[key] };
1974
- current = current[key];
1975
- }
1976
- current[keys[keys.length - 1]] = value;
1977
- return newState;
1978
- });
1979
- }, []);
1980
- const emit = useCallback(
1981
- (event, payload) => {
1982
- onEvent?.(event, payload);
1983
- },
1984
- [onEvent]
1985
- );
1986
- const context = useMemo(
1987
- () => ({
1988
- registry: getRegistry(),
1989
- theme,
1990
- state,
1991
- setState,
1992
- emit,
1993
- slots,
1994
- surface
1995
- }),
1996
- [theme, state, setState, emit, slots, surface]
1997
- );
1998
- const cssVariables = useMemo(() => {
1999
- const vars = {};
2000
- if (theme.background) vars["--workspace-bg"] = theme.background;
2001
- if (theme.foreground) vars["--workspace-fg"] = theme.foreground;
2002
- if (theme.accent) vars["--workspace-accent"] = theme.accent;
2003
- if (theme.muted) vars["--workspace-muted"] = theme.muted;
2004
- if (theme.borderColor) vars["--workspace-border"] = theme.borderColor;
2005
- if (theme.glowColor) vars["--workspace-glow"] = theme.glowColor;
2006
- if (theme.spacing) vars["--workspace-spacing"] = `${theme.spacing}px`;
2007
- if (theme.borderRadius)
2008
- vars["--workspace-radius"] = `${theme.borderRadius}px`;
2009
- if (theme.fontFamily) vars["--workspace-font"] = theme.fontFamily;
2010
- if (theme.fontSize) vars["--workspace-font-size"] = `${theme.fontSize}px`;
2011
- if (theme.variables) {
2012
- Object.entries(theme.variables).forEach(([key, value]) => {
2013
- vars[key.startsWith("--") ? key : `--${key}`] = value;
2014
- });
2015
- }
2016
- return vars;
2017
- }, [theme]);
2018
- return /* @__PURE__ */ jsx(WorkspaceContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
2019
- "div",
2020
- {
2021
- className: `workspace-root ${className || ""}`,
2022
- "data-workspace-id": spec.id,
2023
- "data-workspace-surface": surface,
2024
- style: {
2025
- width: "100%",
2026
- height: "100%",
2027
- overflow: "hidden",
2028
- background: "var(--workspace-bg, transparent)",
2029
- color: "var(--workspace-fg, inherit)",
2030
- fontFamily: "var(--workspace-font, inherit)",
2031
- fontSize: "var(--workspace-font-size, inherit)",
2032
- ...cssVariables,
2033
- ...style
2034
- },
2035
- children: /* @__PURE__ */ jsx(LayoutRenderer, { node: spec.layout })
2036
- }
2037
- ) });
2038
- }
2039
-
2040
- // src/workspace/validation.ts
2041
- function validateWorkspace(spec) {
2042
- const errors = [];
2043
- const warnings = [];
2044
- const registry2 = getRegistry();
2045
- if (!spec.id) {
2046
- errors.push({
2047
- path: "id",
2048
- message: "Workspace ID is required",
2049
- code: "MISSING_ID"
2050
- });
2051
- }
2052
- if (!spec.name) {
2053
- errors.push({
2054
- path: "name",
2055
- message: "Workspace name is required",
2056
- code: "MISSING_NAME"
2057
- });
2058
- }
2059
- if (!spec.layout) {
2060
- errors.push({
2061
- path: "layout",
2062
- message: "Workspace layout is required",
2063
- code: "MISSING_LAYOUT"
2064
- });
2065
- } else {
2066
- validateLayoutNode(spec.layout, "layout", errors, warnings, registry2);
2067
- }
2068
- if (spec.bindings) {
2069
- spec.bindings.forEach((binding, i) => {
2070
- if (!binding.source) {
2071
- errors.push({
2072
- path: `bindings[${i}].source`,
2073
- message: "Binding source is required",
2074
- code: "MISSING_BINDING_SOURCE"
2075
- });
2076
- }
2077
- if (!binding.event) {
2078
- errors.push({
2079
- path: `bindings[${i}].event`,
2080
- message: "Binding event is required",
2081
- code: "MISSING_BINDING_EVENT"
2082
- });
2083
- }
2084
- if (!binding.action) {
2085
- errors.push({
2086
- path: `bindings[${i}].action`,
2087
- message: "Binding action is required",
2088
- code: "MISSING_BINDING_ACTION"
2089
- });
2090
- }
2091
- });
2092
- }
2093
- if (spec.state?.persist && !spec.state.persist.key) {
2094
- errors.push({
2095
- path: "state.persist.key",
2096
- message: "Persistence key is required when persist is enabled",
2097
- code: "MISSING_PERSIST_KEY"
2098
- });
2099
- }
2100
- return {
2101
- valid: errors.length === 0,
2102
- errors,
2103
- warnings
2104
- };
2105
- }
2106
- function validateLayoutNode(node, path, errors, warnings, registry2) {
2107
- if (!node.type) {
2108
- errors.push({
2109
- path,
2110
- message: "Layout node type is required",
2111
- code: "MISSING_NODE_TYPE"
2112
- });
2113
- return;
2114
- }
2115
- switch (node.type) {
2116
- case "split":
2117
- if (!node.children || node.children.length < 2) {
2118
- errors.push({
2119
- path: `${path}.children`,
2120
- message: "Split layout requires at least 2 children",
2121
- code: "SPLIT_MIN_CHILDREN"
2122
- });
2123
- } else {
2124
- node.children.forEach((child, i) => {
2125
- validateLayoutNode(
2126
- child,
2127
- `${path}.children[${i}]`,
2128
- errors,
2129
- warnings,
2130
- registry2
2131
- );
2132
- });
2133
- }
2134
- break;
2135
- case "stack":
2136
- if (!node.children || node.children.length === 0) {
2137
- warnings.push({
2138
- path: `${path}.children`,
2139
- message: "Stack layout has no children",
2140
- suggestion: "Add child nodes or use a placeholder"
2141
- });
2142
- } else {
2143
- node.children.forEach((child, i) => {
2144
- validateLayoutNode(
2145
- child,
2146
- `${path}.children[${i}]`,
2147
- errors,
2148
- warnings,
2149
- registry2
2150
- );
2151
- });
2152
- }
2153
- break;
2154
- case "tabs":
2155
- if (!node.children || node.children.length === 0) {
2156
- errors.push({
2157
- path: `${path}.children`,
2158
- message: "Tabs layout requires at least one tab",
2159
- code: "TABS_MIN_CHILDREN"
2160
- });
2161
- } else {
2162
- const tabIds = /* @__PURE__ */ new Set();
2163
- node.children.forEach((tab, i) => {
2164
- if (!tab.id) {
2165
- errors.push({
2166
- path: `${path}.children[${i}].id`,
2167
- message: "Tab ID is required",
2168
- code: "MISSING_TAB_ID"
2169
- });
2170
- } else if (tabIds.has(tab.id)) {
2171
- errors.push({
2172
- path: `${path}.children[${i}].id`,
2173
- message: `Duplicate tab ID: ${tab.id}`,
2174
- code: "DUPLICATE_TAB_ID"
2175
- });
2176
- } else {
2177
- tabIds.add(tab.id);
2178
- }
2179
- if (!tab.label) {
2180
- warnings.push({
2181
- path: `${path}.children[${i}].label`,
2182
- message: "Tab label is missing",
2183
- suggestion: "Add a label for accessibility"
2184
- });
2185
- }
2186
- if (tab.content) {
2187
- validateLayoutNode(
2188
- tab.content,
2189
- `${path}.children[${i}].content`,
2190
- errors,
2191
- warnings,
2192
- registry2
2193
- );
2194
- } else {
2195
- errors.push({
2196
- path: `${path}.children[${i}].content`,
2197
- message: "Tab content is required",
2198
- code: "MISSING_TAB_CONTENT"
2199
- });
2200
- }
2201
- });
2202
- if (node.defaultTab && !tabIds.has(node.defaultTab)) {
2203
- errors.push({
2204
- path: `${path}.defaultTab`,
2205
- message: `Default tab "${node.defaultTab}" not found`,
2206
- code: "INVALID_DEFAULT_TAB"
2207
- });
2208
- }
2209
- }
2210
- break;
2211
- case "grid":
2212
- if (!node.children || node.children.length === 0) {
2213
- warnings.push({
2214
- path: `${path}.children`,
2215
- message: "Grid layout has no items",
2216
- suggestion: "Add grid items"
2217
- });
2218
- } else {
2219
- node.children.forEach((item, i) => {
2220
- if (item.content) {
2221
- validateLayoutNode(
2222
- item.content,
2223
- `${path}.children[${i}].content`,
2224
- errors,
2225
- warnings,
2226
- registry2
2227
- );
2228
- } else {
2229
- errors.push({
2230
- path: `${path}.children[${i}].content`,
2231
- message: "Grid item content is required",
2232
- code: "MISSING_GRID_CONTENT"
2233
- });
2234
- }
2235
- });
2236
- }
2237
- break;
2238
- case "panel":
2239
- validatePanelNode(node, path, errors, warnings, registry2);
2240
- break;
2241
- case "slot":
2242
- if (!node.name) {
2243
- errors.push({
2244
- path: `${path}.name`,
2245
- message: "Slot name is required",
2246
- code: "MISSING_SLOT_NAME"
2247
- });
2248
- }
2249
- if (node.fallback) {
2250
- validateLayoutNode(
2251
- node.fallback,
2252
- `${path}.fallback`,
2253
- errors,
2254
- warnings,
2255
- registry2
2256
- );
2257
- }
2258
- break;
2259
- default:
2260
- errors.push({
2261
- path: `${path}.type`,
2262
- message: `Unknown layout type: ${node.type}`,
2263
- code: "UNKNOWN_NODE_TYPE"
2264
- });
2265
- }
2266
- }
2267
- function validatePanelNode(node, path, errors, warnings, registry2) {
2268
- if (!node.component) {
2269
- errors.push({
2270
- path: `${path}.component`,
2271
- message: "Panel component ID is required",
2272
- code: "MISSING_COMPONENT"
2273
- });
2274
- return;
2275
- }
2276
- const manifest = registry2.get(node.component);
2277
- if (!manifest) {
2278
- warnings.push({
2279
- path: `${path}.component`,
2280
- message: `Component "${node.component}" not found in registry`,
2281
- suggestion: "Check component ID or register the component"
2282
- });
2283
- return;
2284
- }
2285
- if (manifest.props) {
2286
- Object.entries(manifest.props).forEach(([propName, propSchema]) => {
2287
- if (propSchema.required && !(node.props && propName in node.props)) {
2288
- errors.push({
2289
- path: `${path}.props.${propName}`,
2290
- message: `Required prop "${propName}" is missing for ${node.component}`,
2291
- code: "MISSING_REQUIRED_PROP"
2292
- });
2293
- }
2294
- });
2295
- }
2296
- if (node.props && manifest.props) {
2297
- Object.entries(node.props).forEach(([propName, propValue]) => {
2298
- const propSchema = manifest.props[propName];
2299
- if (!propSchema) {
2300
- warnings.push({
2301
- path: `${path}.props.${propName}`,
2302
- message: `Unknown prop "${propName}" for ${node.component}`,
2303
- suggestion: "Check prop name or remove it"
2304
- });
2305
- } else if (propSchema.enum && !propSchema.enum.includes(String(propValue))) {
2306
- errors.push({
2307
- path: `${path}.props.${propName}`,
2308
- message: `Invalid value "${propValue}" for ${propName}. Expected one of: ${propSchema.enum.join(", ")}`,
2309
- code: "INVALID_ENUM_VALUE"
2310
- });
2311
- }
2312
- });
2313
- }
2314
- if (node.children && node.children.length > 0) {
2315
- if (!manifest.slots || manifest.slots.length === 0) {
2316
- warnings.push({
2317
- path: `${path}.children`,
2318
- message: `Component "${node.component}" does not define slots but has children`,
2319
- suggestion: "Check if this component supports children"
2320
- });
2321
- }
2322
- node.children.forEach((child, i) => {
2323
- validatePanelNode(child, `${path}.children[${i}]`, errors, warnings, registry2);
2324
- const childManifest = registry2.get(child.component);
2325
- if (childManifest && !registry2.canCompose(node.component, child.component)) {
2326
- warnings.push({
2327
- path: `${path}.children[${i}]`,
2328
- message: `"${child.component}" may not be valid inside "${node.component}"`,
2329
- suggestion: "Check component composition rules"
2330
- });
2331
- }
2332
- });
2333
- }
2334
- }
2335
- function isValidWorkspace(spec) {
2336
- return validateWorkspace(spec).valid;
2337
- }
2338
- function extractComponentIds(spec) {
2339
- const ids = /* @__PURE__ */ new Set();
2340
- function extractFromNode(node) {
2341
- if (node.type === "panel") {
2342
- ids.add(node.component);
2343
- node.children?.forEach(extractFromNode);
2344
- } else if (node.type === "split" || node.type === "stack") {
2345
- node.children.forEach(extractFromNode);
2346
- } else if (node.type === "tabs") {
2347
- node.children.forEach((tab) => extractFromNode(tab.content));
2348
- } else if (node.type === "grid") {
2349
- node.children.forEach((item) => extractFromNode(item.content));
2350
- } else if (node.type === "slot" && node.fallback) {
2351
- extractFromNode(node.fallback);
2352
- }
2353
- }
2354
- extractFromNode(spec.layout);
2355
- return Array.from(ids);
2356
- }
2357
-
2358
- // src/workspace/componentBindings.ts
2359
- function initializeComponentBindings() {
2360
- Promise.all([
2361
- import('./GlowButton-VGBPMZO7.js').then(({ GlowButton }) => {
2362
- registerComponent("glow-button", GlowButton);
2363
- }),
2364
- import('./HUDProgressRing-N6C5NAEV.js').then(({ HUDProgressRing }) => {
2365
- registerComponent("hud-progress-ring", HUDProgressRing);
2366
- }),
2367
- import('./TypingAnimation-GIWOHPIX.js').then(({ TypingAnimation }) => {
2368
- registerComponent("typing-animation", TypingAnimation);
2369
- }),
2370
- import('./TextGenerateEffect-EUCEIIUJ.js').then(({ TextGenerateEffect }) => {
2371
- registerComponent("text-generate-effect", TextGenerateEffect);
2372
- }),
2373
- import('./GlitchText-KLQ57PPY.js').then(({ GlitchText }) => {
2374
- registerComponent("glitch-text", GlitchText);
2375
- }),
2376
- import('./AuroraBackground-AP6ZHVFA.js').then(({ AuroraBackground }) => {
2377
- registerComponent("aurora-background", AuroraBackground);
2378
- }),
2379
- // =========================================================================
2380
- // Molecules
2381
- // =========================================================================
2382
- import('./KPIStat-PBQK27ZB.js').then(({ KPIStat }) => {
2383
- registerComponent("kpi-stat", KPIStat);
2384
- }),
2385
- import('./NeonToast-W5F7MU3U.js').then(({ NeonToast }) => {
2386
- registerComponent("neon-toast", NeonToast);
2387
- }),
2388
- import('./ThreeDCard-VH5I3SSY.js').then(({ CardContainer, CardBody, CardItem }) => {
2389
- registerComponent("card-container", CardContainer);
2390
- registerComponent("card-body", CardBody);
2391
- registerComponent("card-item", CardItem);
2392
- }),
2393
- // =========================================================================
2394
- // Organisms
2395
- // =========================================================================
2396
- import('./CommandPalette-JCWJKRBY.js').then(({ CommandPalette }) => {
2397
- registerComponent("command-palette", CommandPalette);
2398
- }),
2399
- import('./Glass-H4X4ZI4P.js').then(({ GlassPanel }) => {
2400
- registerComponent("glass-panel", GlassPanel);
2401
- }),
2402
- import('./BentoGrid-CDARICNM.js').then(({ BentoGrid, BentoGridItem }) => {
2403
- registerComponent("bento-grid", BentoGrid);
2404
- registerComponent("bento-grid-item", BentoGridItem);
2405
- }),
2406
- // =========================================================================
2407
- // UI Primitives
2408
- // =========================================================================
2409
- import('./button-D7IMSV2D.js').then(({ Button }) => {
2410
- registerComponent("button", Button);
2411
- }),
2412
- import('./badge-GTVIIGPY.js').then(({ Badge }) => {
2413
- registerComponent("badge", Badge);
2414
- }),
2415
- import('./input-BH4P4S26.js').then(({ Input }) => {
2416
- registerComponent("input", Input);
2417
- }),
2418
- import('./textarea-IB5WAFDO.js').then(({ Textarea }) => {
2419
- registerComponent("textarea", Textarea);
2420
- }),
2421
- import('./label-5Z4Q6VER.js').then(({ Label }) => {
2422
- registerComponent("label", Label);
2423
- }),
2424
- import('./separator-BTMLN4NB.js').then(({ Separator }) => {
2425
- registerComponent("separator", Separator);
2426
- }),
2427
- import('./skeleton-DXIWBH4W.js').then(({ Skeleton }) => {
2428
- registerComponent("skeleton", Skeleton);
2429
- }),
2430
- import('./switch-4MCXIZBY.js').then(({ Switch }) => {
2431
- registerComponent("switch", Switch);
2432
- }),
2433
- import('./scroll-area-DJXNW6QX.js').then(({ ScrollArea }) => {
2434
- registerComponent("scroll-area", ScrollArea);
2435
- }),
2436
- import('./toggle-XVPPG6P4.js').then(({ Toggle }) => {
2437
- registerComponent("toggle", Toggle);
2438
- }),
2439
- // Tabs
2440
- import('./tabs-O7AW3APK.js').then(({ Tabs, TabsList, TabsTrigger, TabsContent }) => {
2441
- registerComponent("tabs", Tabs);
2442
- registerComponent("tabs-list", TabsList);
2443
- registerComponent("tabs-trigger", TabsTrigger);
2444
- registerComponent("tabs-content", TabsContent);
2445
- }),
2446
- // Dialog
2447
- import('./dialog-SPM3DTTI.js').then(({
2448
- Dialog,
2449
- DialogContent,
2450
- DialogHeader,
2451
- DialogTitle,
2452
- DialogDescription,
2453
- DialogFooter
2454
- }) => {
2455
- registerComponent("dialog", Dialog);
2456
- registerComponent("dialog-content", DialogContent);
2457
- registerComponent("dialog-header", DialogHeader);
2458
- registerComponent("dialog-title", DialogTitle);
2459
- registerComponent("dialog-description", DialogDescription);
2460
- registerComponent("dialog-footer", DialogFooter);
2461
- }),
2462
- // Tooltip
2463
- import('./tooltip-JICZTD4F.js').then(({
2464
- Tooltip,
2465
- TooltipTrigger,
2466
- TooltipContent,
2467
- TooltipProvider
2468
- }) => {
2469
- registerComponent("tooltip-provider", TooltipProvider);
2470
- registerComponent("tooltip", Tooltip);
2471
- registerComponent("tooltip-trigger", TooltipTrigger);
2472
- registerComponent("tooltip-content", TooltipContent);
2473
- }),
2474
- // Select
2475
- import('./select-FZ277C3G.js').then(({
2476
- Select,
2477
- SelectTrigger,
2478
- SelectValue,
2479
- SelectContent,
2480
- SelectItem
2481
- }) => {
2482
- registerComponent("select", Select);
2483
- registerComponent("select-trigger", SelectTrigger);
2484
- registerComponent("select-value", SelectValue);
2485
- registerComponent("select-content", SelectContent);
2486
- registerComponent("select-item", SelectItem);
2487
- }),
2488
- // Dropdown Menu
2489
- import('./dropdown-menu-HMTWKWGK.js').then(({
2490
- DropdownMenu,
2491
- DropdownMenuTrigger,
2492
- DropdownMenuContent,
2493
- DropdownMenuItem
2494
- }) => {
2495
- registerComponent("dropdown-menu", DropdownMenu);
2496
- registerComponent("dropdown-menu-trigger", DropdownMenuTrigger);
2497
- registerComponent("dropdown-menu-content", DropdownMenuContent);
2498
- registerComponent("dropdown-menu-item", DropdownMenuItem);
2499
- }),
2500
- // Avatar
2501
- import('./avatar-N5R37PCU.js').then(({ Avatar, AvatarImage, AvatarFallback }) => {
2502
- registerComponent("avatar", Avatar);
2503
- registerComponent("avatar-image", AvatarImage);
2504
- registerComponent("avatar-fallback", AvatarFallback);
2505
- }),
2506
- // Alert Dialog
2507
- import('./alert-dialog-QOSYBIIE.js').then(({
2508
- AlertDialog,
2509
- AlertDialogAction,
2510
- AlertDialogCancel,
2511
- AlertDialogContent,
2512
- AlertDialogDescription,
2513
- AlertDialogFooter,
2514
- AlertDialogHeader,
2515
- AlertDialogTitle,
2516
- AlertDialogTrigger
2517
- }) => {
2518
- registerComponent("alert-dialog", AlertDialog);
2519
- registerComponent("alert-dialog-trigger", AlertDialogTrigger);
2520
- registerComponent("alert-dialog-content", AlertDialogContent);
2521
- registerComponent("alert-dialog-header", AlertDialogHeader);
2522
- registerComponent("alert-dialog-title", AlertDialogTitle);
2523
- registerComponent("alert-dialog-description", AlertDialogDescription);
2524
- registerComponent("alert-dialog-footer", AlertDialogFooter);
2525
- registerComponent("alert-dialog-action", AlertDialogAction);
2526
- registerComponent("alert-dialog-cancel", AlertDialogCancel);
2527
- }),
2528
- // Popover
2529
- import('./popover-IFOUXYLI.js').then(({
2530
- Popover,
2531
- PopoverTrigger,
2532
- PopoverContent
2533
- }) => {
2534
- registerComponent("popover", Popover);
2535
- registerComponent("popover-trigger", PopoverTrigger);
2536
- registerComponent("popover-content", PopoverContent);
2537
- })
2538
- ]).then(() => {
2539
- console.log("[AG-UI] Component bindings initialized");
2540
- });
2541
- }
2542
- function initializeComponentBindingsSync() {
2543
- console.log("[AG-UI] Sync component bindings not yet implemented");
2544
- }
2545
- async function loadThreeComponents() {
2546
- const [{ Graph3D }, { ParticleField }] = await Promise.all([
2547
- import('./Graph3D-GO7N2EZQ.js'),
2548
- import('./ParticleField-WK6CNHWU.js')
2549
- ]);
2550
- registerComponent("graph-3d", Graph3D);
2551
- registerComponent("particle-field", ParticleField);
2552
- console.log("[AG-UI] Three.js components loaded");
2553
- }
2554
- function getRegisteredComponents() {
2555
- return [
2556
- // Atoms
2557
- "glow-button",
2558
- "hud-progress-ring",
2559
- "typing-animation",
2560
- "text-generate-effect",
2561
- "glitch-text",
2562
- "aurora-background",
2563
- // Molecules
2564
- "kpi-stat",
2565
- "neon-toast",
2566
- "card-container",
2567
- "card-body",
2568
- "card-item",
2569
- // Organisms
2570
- "command-palette",
2571
- "glass-panel",
2572
- "bento-grid",
2573
- "bento-grid-item",
2574
- // UI Primitives
2575
- "button",
2576
- "badge",
2577
- "input",
2578
- "textarea",
2579
- "label",
2580
- "separator",
2581
- "skeleton",
2582
- "switch",
2583
- "scroll-area",
2584
- "toggle",
2585
- "tabs",
2586
- "tabs-list",
2587
- "tabs-trigger",
2588
- "tabs-content",
2589
- "dialog",
2590
- "dialog-content",
2591
- "dialog-header",
2592
- "dialog-title",
2593
- "dialog-description",
2594
- "dialog-footer",
2595
- "tooltip-provider",
2596
- "tooltip",
2597
- "tooltip-trigger",
2598
- "tooltip-content",
2599
- "select",
2600
- "select-trigger",
2601
- "select-value",
2602
- "select-content",
2603
- "select-item",
2604
- "dropdown-menu",
2605
- "dropdown-menu-trigger",
2606
- "dropdown-menu-content",
2607
- "dropdown-menu-item",
2608
- "avatar",
2609
- "avatar-image",
2610
- "avatar-fallback",
2611
- "alert-dialog",
2612
- "alert-dialog-trigger",
2613
- "alert-dialog-content",
2614
- "alert-dialog-header",
2615
- "alert-dialog-title",
2616
- "alert-dialog-description",
2617
- "alert-dialog-footer",
2618
- "alert-dialog-action",
2619
- "alert-dialog-cancel",
2620
- "popover",
2621
- "popover-trigger",
2622
- "popover-content",
2623
- // Three.js (lazy loaded)
2624
- "graph-3d",
2625
- "particle-field"
2626
- ];
2627
- }
2628
-
2629
- export { WorkspaceRenderer, allManifests, atomManifests, auroraBackgroundManifest, bentoGridManifest, commandPaletteManifest, createRegistry, extractComponentIds, getRegisteredComponents, getRegistry, glassPanelManifest, glitchTextManifest, glowButtonManifest, graph3DManifest, hudProgressRingManifest, initializeComponentBindings, initializeComponentBindingsSync, isValidWorkspace, kpiStatManifest, layoutManifests, loadThreeComponents, manifestById, manifestsByCategory, moleculeManifests, neonToastManifest, organismManifests, particleFieldManifest, registerComponent, registry, splitPanelManifest, stackLayoutManifest, tabsPanelManifest, textGenerateEffectManifest, threeDCardManifest, threeManifests, typingAnimationManifest, useWorkspace, validateWorkspace };
2630
- //# sourceMappingURL=chunk-VYEWU5LO.js.map
2631
- //# sourceMappingURL=chunk-VYEWU5LO.js.map