@tldiagram/core-ui 1.87.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 (272) hide show
  1. package/dist/App.d.ts +1 -0
  2. package/dist/api/client.d.ts +143 -0
  3. package/dist/api/transport-vscode.d.ts +8 -0
  4. package/dist/api/transport.d.ts +1 -0
  5. package/dist/components/CodePreviewPanel-vscode.d.ts +7 -0
  6. package/dist/components/CodePreviewPanel.d.ts +9 -0
  7. package/dist/components/ConfirmDialog.d.ts +12 -0
  8. package/dist/components/ConnectorPanel.d.ts +21 -0
  9. package/dist/components/ContextBoundaryElement.d.ts +11 -0
  10. package/dist/components/ContextNeighborElement.d.ts +29 -0
  11. package/dist/components/ContextStraightConnector.d.ts +4 -0
  12. package/dist/components/CrossBranchControls.d.ts +9 -0
  13. package/dist/components/DependenciesOnboarding.d.ts +5 -0
  14. package/dist/components/DrawingCanvas.d.ts +39 -0
  15. package/dist/components/ElementLibrary-vscode.d.ts +7 -0
  16. package/dist/components/ElementLibrary.d.ts +22 -0
  17. package/dist/components/ElementNode.d.ts +36 -0
  18. package/dist/components/ElementPanel.d.ts +25 -0
  19. package/dist/components/ExploreOnboarding.d.ts +5 -0
  20. package/dist/components/ExplorePageOnboarding.d.ts +5 -0
  21. package/dist/components/ExportModal.d.ts +16 -0
  22. package/dist/components/FloatingEdge.d.ts +9 -0
  23. package/dist/components/GitSourceLinker.d.ts +8 -0
  24. package/dist/components/HeaderContext.d.ts +16 -0
  25. package/dist/components/Icons.d.ts +95 -0
  26. package/dist/components/ImportModal.d.ts +10 -0
  27. package/dist/components/InlineElementAdder.d.ts +17 -0
  28. package/dist/components/LayoutSection.d.ts +7 -0
  29. package/dist/components/LocalSourceLinker.d.ts +8 -0
  30. package/dist/components/MiniZoomOnboarding.d.ts +5 -0
  31. package/dist/components/NavBreadcrumb.d.ts +6 -0
  32. package/dist/components/NodeBody.d.ts +12 -0
  33. package/dist/components/NodeContainer.d.ts +8 -0
  34. package/dist/components/NodeHoverCard.d.ts +10 -0
  35. package/dist/components/PanelHeader.d.ts +8 -0
  36. package/dist/components/PanelUI.d.ts +3 -0
  37. package/dist/components/ProxyConnectorEdge.d.ts +4 -0
  38. package/dist/components/ProxyConnectorPanel.d.ts +9 -0
  39. package/dist/components/SafeBackground.d.ts +13 -0
  40. package/dist/components/ScrollIndicatorWrapper.d.ts +8 -0
  41. package/dist/components/SetChildModal.d.ts +10 -0
  42. package/dist/components/SetParentModal.d.ts +10 -0
  43. package/dist/components/SlidingPanel.d.ts +16 -0
  44. package/dist/components/TagUpsert.d.ts +8 -0
  45. package/dist/components/TopMenuBar.d.ts +8 -0
  46. package/dist/components/ViewBezierConnector.d.ts +4 -0
  47. package/dist/components/ViewDrawMenu.d.ts +22 -0
  48. package/dist/components/ViewEditorEdgeLabelLayout.d.ts +16 -0
  49. package/dist/components/ViewEditorOnboarding.d.ts +5 -0
  50. package/dist/components/ViewExplorer/TagManager/ColorPicker.d.ts +7 -0
  51. package/dist/components/ViewExplorer/TagManager/GroupNamingPopover.d.ts +10 -0
  52. package/dist/components/ViewExplorer/TagManager/LayerItem.d.ts +27 -0
  53. package/dist/components/ViewExplorer/TagManager/TagItem.d.ts +25 -0
  54. package/dist/components/ViewExplorer/TagManager/index.d.ts +21 -0
  55. package/dist/components/ViewExplorer/ViewNavigator.d.ts +11 -0
  56. package/dist/components/ViewExplorer/ViewSearch.d.ts +8 -0
  57. package/dist/components/ViewExplorer/ViewTree.d.ts +18 -0
  58. package/dist/components/ViewExplorer/index.d.ts +31 -0
  59. package/dist/components/ViewExplorer/types.d.ts +11 -0
  60. package/dist/components/ViewExplorer/utils.d.ts +6 -0
  61. package/dist/components/ViewExplorer-vscode.d.ts +6 -0
  62. package/dist/components/ViewFloatingMenu-vscode.d.ts +27 -0
  63. package/dist/components/ViewFloatingMenu.d.ts +39 -0
  64. package/dist/components/ViewGridNode.d.ts +29 -0
  65. package/dist/components/ViewHeaderButton.d.ts +11 -0
  66. package/dist/components/ViewPanel.d.ts +18 -0
  67. package/dist/components/ViewsGridOnboarding.d.ts +5 -0
  68. package/dist/components/ZUI/ZUICanvas.d.ts +18 -0
  69. package/dist/components/ZUI/index.d.ts +2 -0
  70. package/dist/components/ZUI/layout.d.ts +18 -0
  71. package/dist/components/ZUI/proxy.d.ts +25 -0
  72. package/dist/components/ZUI/renderer.d.ts +30 -0
  73. package/dist/components/ZUI/types.d.ts +140 -0
  74. package/dist/components/ZUI/useZUIInteraction.d.ts +21 -0
  75. package/dist/config/runtime-vscode.d.ts +22 -0
  76. package/dist/config/runtime.d.ts +5 -0
  77. package/dist/constants/colors.d.ts +27 -0
  78. package/dist/constants/diagramColors.d.ts +1 -0
  79. package/dist/context/ThemeContext.d.ts +27 -0
  80. package/dist/crossBranch/graph.d.ts +13 -0
  81. package/dist/crossBranch/resolve.d.ts +22 -0
  82. package/dist/crossBranch/settings.d.ts +6 -0
  83. package/dist/crossBranch/store.d.ts +11 -0
  84. package/dist/crossBranch/types.d.ts +96 -0
  85. package/dist/demo/DemoPage.d.ts +9 -0
  86. package/dist/demo/seed.d.ts +9 -0
  87. package/dist/demo/store.d.ts +137 -0
  88. package/dist/demo/viewEditor.d.ts +26 -0
  89. package/dist/favicon.svg +35 -0
  90. package/dist/hooks/useSafeFitView.d.ts +16 -0
  91. package/dist/index.css +1 -0
  92. package/dist/index.d.ts +115 -0
  93. package/dist/index.js +19966 -0
  94. package/dist/lib/vscodeBridge-vscode.d.ts +13 -0
  95. package/dist/lib/vscodeBridge.d.ts +5 -0
  96. package/dist/logo-120.png +0 -0
  97. package/dist/logo-bw.png +0 -0
  98. package/dist/logo-bw.svg +15 -0
  99. package/dist/logo-text.svg +51 -0
  100. package/dist/logo.svg +35 -0
  101. package/dist/pages/AppearanceSettings.d.ts +3 -0
  102. package/dist/pages/Dependencies.d.ts +1 -0
  103. package/dist/pages/InfiniteZoom.d.ts +7 -0
  104. package/dist/pages/Settings.d.ts +7 -0
  105. package/dist/pages/ViewEditor/components/EditorMenus.d.ts +24 -0
  106. package/dist/pages/ViewEditor/components/EditorOverlays.d.ts +30 -0
  107. package/dist/pages/ViewEditor/components/EmptyCanvasState.d.ts +7 -0
  108. package/dist/pages/ViewEditor/context.d.ts +13 -0
  109. package/dist/pages/ViewEditor/hooks/useCanvasInteractions.d.ts +201 -0
  110. package/dist/pages/ViewEditor/hooks/useDrawingEngine.d.ts +40 -0
  111. package/dist/pages/ViewEditor/hooks/useViewContextNeighbours.d.ts +20 -0
  112. package/dist/pages/ViewEditor/hooks/useViewData.d.ts +74 -0
  113. package/dist/pages/ViewEditor/index.d.ts +8 -0
  114. package/dist/pages/ViewEditor/utils.d.ts +14 -0
  115. package/dist/pages/Views.d.ts +6 -0
  116. package/dist/pages/ViewsGrid.d.ts +6 -0
  117. package/dist/pkg/importer/mermaid.d.ts +7 -0
  118. package/dist/pkg/importer/mermaid.test.d.ts +1 -0
  119. package/dist/platform/PlatformContext.d.ts +6 -0
  120. package/dist/platform/context.d.ts +3 -0
  121. package/dist/platform/local.d.ts +2 -0
  122. package/dist/platform/types.d.ts +17 -0
  123. package/dist/slots.d.ts +67 -0
  124. package/dist/theme.d.ts +2 -0
  125. package/dist/types/index.d.ts +193 -0
  126. package/dist/types/vscode-messages.d.ts +60 -0
  127. package/dist/utils/edgeDistribution.d.ts +34 -0
  128. package/dist/utils/githubApi.d.ts +4 -0
  129. package/dist/utils/githubCache.d.ts +17 -0
  130. package/dist/utils/ids.d.ts +2 -0
  131. package/dist/utils/technologyCatalog.d.ts +15 -0
  132. package/dist/utils/toast.d.ts +15 -0
  133. package/dist/utils/treesitter.d.ts +13 -0
  134. package/dist/utils/url.d.ts +12 -0
  135. package/package.json +159 -0
  136. package/src/App.tsx +141 -0
  137. package/src/api/client.ts +618 -0
  138. package/src/api/transport-vscode.ts +28 -0
  139. package/src/api/transport.ts +7 -0
  140. package/src/assets/logo-mark.svg +31 -0
  141. package/src/assets/logo-wordmark.svg +22 -0
  142. package/src/assets/logo.svg +35 -0
  143. package/src/components/CodePreviewPanel-vscode.tsx +85 -0
  144. package/src/components/CodePreviewPanel.tsx +384 -0
  145. package/src/components/ConfirmDialog.tsx +66 -0
  146. package/src/components/ConnectorPanel.tsx +403 -0
  147. package/src/components/ContextBoundaryElement.tsx +35 -0
  148. package/src/components/ContextNeighborElement.tsx +282 -0
  149. package/src/components/ContextStraightConnector.tsx +144 -0
  150. package/src/components/CrossBranchControls.tsx +105 -0
  151. package/src/components/DependenciesOnboarding.tsx +427 -0
  152. package/src/components/DrawingCanvas.tsx +391 -0
  153. package/src/components/ElementLibrary-vscode.tsx +9 -0
  154. package/src/components/ElementLibrary.tsx +512 -0
  155. package/src/components/ElementNode.tsx +1033 -0
  156. package/src/components/ElementPanel.tsx +928 -0
  157. package/src/components/ExploreOnboarding.tsx +347 -0
  158. package/src/components/ExplorePageOnboarding.tsx +383 -0
  159. package/src/components/ExportModal.tsx +132 -0
  160. package/src/components/FloatingEdge.tsx +115 -0
  161. package/src/components/GitSourceLinker.tsx +1053 -0
  162. package/src/components/HeaderContext.tsx +30 -0
  163. package/src/components/Icons.tsx +245 -0
  164. package/src/components/ImportModal.tsx +219 -0
  165. package/src/components/InlineElementAdder.tsx +216 -0
  166. package/src/components/LayoutSection.tsx +624 -0
  167. package/src/components/LocalSourceLinker.tsx +330 -0
  168. package/src/components/MiniZoomOnboarding.tsx +78 -0
  169. package/src/components/NavBreadcrumb.tsx +24 -0
  170. package/src/components/NodeBody.tsx +89 -0
  171. package/src/components/NodeContainer.tsx +58 -0
  172. package/src/components/NodeHoverCard.tsx +135 -0
  173. package/src/components/PanelHeader.tsx +36 -0
  174. package/src/components/PanelUI.tsx +24 -0
  175. package/src/components/ProxyConnectorEdge.tsx +169 -0
  176. package/src/components/ProxyConnectorPanel.tsx +130 -0
  177. package/src/components/SafeBackground.tsx +19 -0
  178. package/src/components/ScrollIndicatorWrapper.tsx +117 -0
  179. package/src/components/SetChildModal.tsx +191 -0
  180. package/src/components/SetParentModal.tsx +187 -0
  181. package/src/components/SlidingPanel.tsx +114 -0
  182. package/src/components/TagUpsert.tsx +142 -0
  183. package/src/components/TopMenuBar.tsx +380 -0
  184. package/src/components/ViewBezierConnector.tsx +143 -0
  185. package/src/components/ViewDrawMenu.tsx +270 -0
  186. package/src/components/ViewEditorEdgeLabelLayout.ts +189 -0
  187. package/src/components/ViewEditorOnboarding.tsx +445 -0
  188. package/src/components/ViewExplorer/TagManager/ColorPicker.tsx +49 -0
  189. package/src/components/ViewExplorer/TagManager/GroupNamingPopover.tsx +96 -0
  190. package/src/components/ViewExplorer/TagManager/LayerItem.tsx +228 -0
  191. package/src/components/ViewExplorer/TagManager/TagItem.tsx +242 -0
  192. package/src/components/ViewExplorer/TagManager/index.tsx +418 -0
  193. package/src/components/ViewExplorer/ViewNavigator.tsx +121 -0
  194. package/src/components/ViewExplorer/ViewSearch.tsx +33 -0
  195. package/src/components/ViewExplorer/ViewTree.tsx +98 -0
  196. package/src/components/ViewExplorer/index.tsx +384 -0
  197. package/src/components/ViewExplorer/types.ts +13 -0
  198. package/src/components/ViewExplorer/utils.ts +56 -0
  199. package/src/components/ViewExplorer-vscode.tsx +8 -0
  200. package/src/components/ViewFloatingMenu-vscode.tsx +248 -0
  201. package/src/components/ViewFloatingMenu.tsx +379 -0
  202. package/src/components/ViewGridNode.tsx +451 -0
  203. package/src/components/ViewHeaderButton.tsx +60 -0
  204. package/src/components/ViewPanel.tsx +162 -0
  205. package/src/components/ViewsGridOnboarding.tsx +400 -0
  206. package/src/components/ZUI/ZUICanvas.tsx +853 -0
  207. package/src/components/ZUI/index.ts +3 -0
  208. package/src/components/ZUI/layout.ts +323 -0
  209. package/src/components/ZUI/proxy.ts +278 -0
  210. package/src/components/ZUI/renderer.ts +1189 -0
  211. package/src/components/ZUI/types.ts +150 -0
  212. package/src/components/ZUI/useZUIInteraction.ts +720 -0
  213. package/src/config/runtime-vscode.ts +46 -0
  214. package/src/config/runtime.ts +30 -0
  215. package/src/constants/colors.ts +80 -0
  216. package/src/constants/diagramColors.ts +9 -0
  217. package/src/context/ThemeContext.tsx +158 -0
  218. package/src/crossBranch/graph.ts +207 -0
  219. package/src/crossBranch/resolve.ts +643 -0
  220. package/src/crossBranch/settings.ts +59 -0
  221. package/src/crossBranch/store.ts +71 -0
  222. package/src/crossBranch/types.ts +102 -0
  223. package/src/demo/DemoPage.tsx +184 -0
  224. package/src/demo/seed.ts +67 -0
  225. package/src/demo/store.ts +536 -0
  226. package/src/demo/viewEditor.ts +110 -0
  227. package/src/hooks/useSafeFitView.ts +60 -0
  228. package/src/index.css +309 -0
  229. package/src/index.ts +184 -0
  230. package/src/kafka-ss.png +0 -0
  231. package/src/lib/vscodeBridge-vscode.ts +27 -0
  232. package/src/lib/vscodeBridge.ts +7 -0
  233. package/src/main.tsx +46 -0
  234. package/src/pages/AppearanceSettings.tsx +135 -0
  235. package/src/pages/Dependencies.tsx +926 -0
  236. package/src/pages/InfiniteZoom.tsx +404 -0
  237. package/src/pages/Settings.tsx +91 -0
  238. package/src/pages/ViewEditor/EDGE_DISTRIBUTION.md +64 -0
  239. package/src/pages/ViewEditor/components/EditorMenus.tsx +112 -0
  240. package/src/pages/ViewEditor/components/EditorOverlays.tsx +172 -0
  241. package/src/pages/ViewEditor/components/EmptyCanvasState.tsx +42 -0
  242. package/src/pages/ViewEditor/context.tsx +21 -0
  243. package/src/pages/ViewEditor/hooks/useCanvasInteractions.ts +1349 -0
  244. package/src/pages/ViewEditor/hooks/useDrawingEngine.ts +127 -0
  245. package/src/pages/ViewEditor/hooks/useViewContextNeighbours.ts +501 -0
  246. package/src/pages/ViewEditor/hooks/useViewData.ts +491 -0
  247. package/src/pages/ViewEditor/index.tsx +1366 -0
  248. package/src/pages/ViewEditor/utils.ts +88 -0
  249. package/src/pages/Views.tsx +171 -0
  250. package/src/pages/ViewsGrid.tsx +1310 -0
  251. package/src/pkg/importer/mermaid.test.ts +141 -0
  252. package/src/pkg/importer/mermaid.ts +76 -0
  253. package/src/platform/PlatformContext.tsx +17 -0
  254. package/src/platform/context.ts +9 -0
  255. package/src/platform/local.tsx +15 -0
  256. package/src/platform/types.ts +19 -0
  257. package/src/slots.ts +92 -0
  258. package/src/styles/editor-panels.css +66 -0
  259. package/src/styles/theme.css +56 -0
  260. package/src/theme.ts +336 -0
  261. package/src/types/index.ts +234 -0
  262. package/src/types/offline-ambient.d.ts +14 -0
  263. package/src/types/vscode-messages.ts +32 -0
  264. package/src/utils/edgeDistribution.ts +103 -0
  265. package/src/utils/githubApi.ts +121 -0
  266. package/src/utils/githubCache.ts +108 -0
  267. package/src/utils/ids.ts +9 -0
  268. package/src/utils/technologyCatalog.ts +143 -0
  269. package/src/utils/toast.ts +100 -0
  270. package/src/utils/treesitter.ts +147 -0
  271. package/src/utils/url.ts +72 -0
  272. package/src/vite-env.d.ts +1 -0
package/src/theme.ts ADDED
@@ -0,0 +1,336 @@
1
+ import { extendTheme, type ThemeConfig } from '@chakra-ui/react'
2
+
3
+ const config: ThemeConfig = {
4
+ initialColorMode: 'dark',
5
+ useSystemColorMode: false,
6
+ }
7
+
8
+ export default extendTheme({
9
+ config,
10
+ fonts: {
11
+ heading: `'Josefin Sans', system-ui, -apple-system, sans-serif`,
12
+ body: `'Metrophobic', system-ui, -apple-system, sans-serif`,
13
+ },
14
+ breakpoints: {
15
+ base: '0em',
16
+ sm: '30em',
17
+ md: '48em',
18
+ compact: '53em',
19
+ lg: '62em',
20
+ xl: '80em',
21
+ '2xl': '96em',
22
+ },
23
+ colors: {
24
+ clay: {
25
+ bg: 'var(--bg-element)',
26
+ out: 'color-mix(in srgb, var(--bg-element), black 10%)',
27
+ in: 'color-mix(in srgb, var(--bg-element), black 10%)',
28
+ text: '#cbd5e0',
29
+ dim: '#4a5568',
30
+ },
31
+ glass: {
32
+ bg: 'var(--bg-panel)',
33
+ border: 'rgba(255, 255, 255, 0.08)',
34
+ },
35
+ },
36
+ shadows: {
37
+ // Semantic shadows for glass panels
38
+ 'panel': '0 8px 32px rgba(0,0,0,0.5)',
39
+ 'panel-sm': '0 4px 10px rgba(0,0,0,0.3)',
40
+ 'panel-hover': '0 6px 15px rgba(0,0,0,0.4)',
41
+ 'node-selected': '0 0 0 3px rgba(99,179,237,0.35), 0 10px 36px rgba(0,0,0,0.55), 0 3px 10px rgba(0,0,0,0.4)',
42
+ 'node-source': '0 0 0 3px rgba(72, 151, 187, 0.55), 0 0 24px rgba(72, 149, 187, 0.25)',
43
+ },
44
+ transitions: {
45
+ easing: {
46
+ pop: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
47
+ },
48
+ duration: {
49
+ fast: '0.15s',
50
+ normal: '0.2s',
51
+ slow: '0.3s',
52
+ },
53
+ },
54
+ styles: {
55
+ global: {
56
+ body: { bg: 'var(--bg-main)', color: 'gray.100' },
57
+ '.glass': {
58
+ bg: 'glass.bg',
59
+ backdropFilter: 'blur(16px)',
60
+ border: '1px solid',
61
+ borderColor: 'glass.border',
62
+ boxShadow: 'panel',
63
+ },
64
+ },
65
+ },
66
+ components: {
67
+ Modal: {
68
+ baseStyle: {
69
+ dialog: {
70
+ bg: 'clay.bg',
71
+ borderRadius: '16px',
72
+ boxShadow: 'clay-out',
73
+ border: '1px solid rgba(255,255,255,0.06)',
74
+ },
75
+ header: {
76
+ color: 'gray.100',
77
+ fontSize: 'lg',
78
+ fontWeight: 'bold',
79
+ borderBottom: '1px solid rgba(255,255,255,0.06)',
80
+ },
81
+ body: {
82
+ color: 'gray.300',
83
+ },
84
+ footer: {
85
+ borderTop: '1px solid rgba(255,255,255,0.06)',
86
+ },
87
+ },
88
+ },
89
+ Drawer: {
90
+ baseStyle: {
91
+ dialog: {
92
+ bg: 'clay.bg',
93
+ borderLeft: '1px solid rgba(255,255,255,0.06)',
94
+ boxShadow: 'clay-out',
95
+ },
96
+ },
97
+ },
98
+ Menu: {
99
+ baseStyle: {
100
+ list: {
101
+ bg: 'clay.bg',
102
+ boxShadow: 'clay-out',
103
+ border: '1px solid rgba(255,255,255,0.08)',
104
+ borderRadius: '12px',
105
+ py: 2,
106
+ minW: '200px',
107
+ zIndex: 9999,
108
+ },
109
+ item: {
110
+ bg: 'transparent',
111
+ color: 'clay.text',
112
+ fontSize: 'sm',
113
+ _hover: { bg: 'whiteAlpha.100' },
114
+ _focus: { bg: 'whiteAlpha.100' },
115
+ _active: { bg: 'whiteAlpha.200' },
116
+ },
117
+ },
118
+ },
119
+ Tooltip: {
120
+ baseStyle: {
121
+ bg: 'clay.out',
122
+ color: 'clay.text',
123
+ fontSize: '12px',
124
+ borderRadius: '8px',
125
+ px: 3,
126
+ py: 1.5,
127
+ boxShadow: '0 8px 30px rgba(0,0,0,0.6)',
128
+ border: '1px solid rgba(255,255,255,0.06)',
129
+ zIndex: 99999,
130
+ arrow: {
131
+ bg: 'clay.out',
132
+ },
133
+ },
134
+ },
135
+ Select: {
136
+ variants: {
137
+ clay: {
138
+ field: {
139
+ bg: 'clay.out',
140
+ color: 'clay.text',
141
+ boxShadow: 'clay-out',
142
+ borderRadius: '8px',
143
+ border: '1px solid rgba(255,255,255,0.06)',
144
+ transition: 'all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)',
145
+ _hover: { bg: 'color-mix(in srgb, var(--bg-element), white 15%)' },
146
+ _active: { bg: 'clay.in', boxShadow: 'clay-in' },
147
+ _focus: { ring: '1px', ringColor: 'var(--accent)' },
148
+ 'option': {
149
+ bg: 'clay.bg',
150
+ color: 'clay.text',
151
+ }
152
+ },
153
+ icon: {
154
+ color: 'clay.text',
155
+ },
156
+ },
157
+ elevated: {
158
+ field: {
159
+ bg: 'whiteAlpha.100',
160
+ color: 'whiteAlpha.900',
161
+ borderRadius: 'md',
162
+ border: '1px solid',
163
+ borderColor: 'whiteAlpha.100',
164
+ boxShadow: '0 4px 10px rgba(0,0,0,0.3)',
165
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
166
+ _hover: { bg: 'whiteAlpha.200', transform: 'translateY(-1px)', boxShadow: 'panel-hover' },
167
+ _active: { transform: 'translateY(0)' },
168
+ 'option': {
169
+ bg: 'gray.800',
170
+ color: 'white',
171
+ }
172
+ },
173
+ icon: {
174
+ color: 'whiteAlpha.600',
175
+ },
176
+ },
177
+ },
178
+ defaultProps: {
179
+ variant: 'elevated',
180
+ },
181
+ },
182
+ Input: {
183
+ variants: {
184
+ clay: {
185
+ field: {
186
+ bg: 'gray.800',
187
+ color: 'clay.text',
188
+ borderRadius: '8px',
189
+ border: '1px solid rgba(255,255,255,0.08)',
190
+ transition: 'all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)',
191
+ _hover: { borderColor: 'whiteAlpha.300' },
192
+ _focus: { borderColor: 'var(--accent)', ring: '1px', ringColor: 'var(--accent)' },
193
+ },
194
+ },
195
+ elevated: {
196
+ field: {
197
+ bg: 'whiteAlpha.50',
198
+ color: 'white',
199
+ borderRadius: 'md',
200
+ border: '1px solid',
201
+ borderColor: 'whiteAlpha.100',
202
+ transition: 'all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)',
203
+ _hover: { borderColor: 'whiteAlpha.300' },
204
+ _focus: { borderColor: 'var(--accent)', ring: '1px', ringColor: 'var(--accent)' },
205
+ },
206
+ },
207
+ },
208
+ defaultProps: {
209
+ variant: 'elevated',
210
+ },
211
+ },
212
+ Textarea: {
213
+ variants: {
214
+ clay: {
215
+ bg: 'gray.800',
216
+ color: 'clay.text',
217
+ borderRadius: '8px',
218
+ border: '1px solid rgba(255,255,255,0.08)',
219
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
220
+ _hover: { borderColor: 'whiteAlpha.300' },
221
+ _focus: { borderColor: 'var(--accent)', ring: '1px', ringColor: 'var(--accent)' },
222
+ },
223
+ elevated: {
224
+ bg: 'whiteAlpha.50',
225
+ color: 'white',
226
+ borderRadius: 'md',
227
+ border: '1px solid',
228
+ borderColor: 'whiteAlpha.100',
229
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
230
+ _hover: { borderColor: 'whiteAlpha.300' },
231
+ _focus: { borderColor: 'var(--accent)', ring: '1px', ringColor: 'var(--accent)' },
232
+ },
233
+ },
234
+ defaultProps: {
235
+ variant: 'elevated',
236
+ },
237
+ },
238
+ FormLabel: {
239
+ baseStyle: {
240
+ fontFamily: 'heading',
241
+ fontSize: 'sm',
242
+ color: 'gray.200',
243
+ mb: 2,
244
+ fontWeight: 'medium',
245
+ },
246
+ },
247
+ Button: {
248
+ variants: {
249
+ clay: {
250
+ bg: 'clay.out',
251
+ color: 'clay.text',
252
+ boxShadow: 'clay-out',
253
+ borderRadius: '8px',
254
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
255
+ _hover: {
256
+ bg: 'color-mix(in srgb, var(--bg-element), white 15%)',
257
+ boxShadow: 'clay-out-hover',
258
+ _disabled: { bg: 'clay.out' },
259
+ },
260
+ _active: {
261
+ bg: 'clay.in',
262
+ boxShadow: 'clay-in',
263
+ transform: 'translateY(1px)',
264
+ },
265
+ _focusVisible: {
266
+ ring: '2px',
267
+ ringColor: 'var(--accent)',
268
+ ringOffset: '1px',
269
+ ringOffsetColor: 'gray.900',
270
+ },
271
+ },
272
+ 'clay-ghost': {
273
+ bg: 'transparent',
274
+ color: 'clay.dim',
275
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
276
+ _hover: {
277
+ bg: 'whiteAlpha.50',
278
+ color: 'clay.text',
279
+ },
280
+ _active: {
281
+ bg: 'whiteAlpha.100',
282
+ transform: 'translateY(1px)',
283
+ },
284
+ _focusVisible: {
285
+ ring: '2px',
286
+ ringColor: 'var(--accent)',
287
+ ringOffset: '1px',
288
+ ringOffsetColor: 'gray.900',
289
+ },
290
+ },
291
+ elevated: {
292
+ bg: 'whiteAlpha.100',
293
+ color: 'whiteAlpha.900',
294
+ borderRadius: 'md',
295
+ boxShadow: 'panel-sm',
296
+ border: '1px solid',
297
+ borderColor: 'whiteAlpha.100',
298
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
299
+ _hover: {
300
+ bg: 'whiteAlpha.200',
301
+ transform: 'translateY(-1px)',
302
+ boxShadow: 'panel-hover',
303
+ _disabled: {
304
+ bg: 'whiteAlpha.100',
305
+ transform: 'none',
306
+ boxShadow: 'panel-sm',
307
+ }
308
+ },
309
+ _active: { transform: 'translateY(0)' },
310
+ _focusVisible: {
311
+ ring: '2px',
312
+ ringColor: 'var(--accent)',
313
+ ringOffset: '1px',
314
+ ringOffsetColor: 'gray.900',
315
+ },
316
+ },
317
+ destructive: {
318
+ bg: 'red.900',
319
+ color: 'red.100',
320
+ transition: 'all 0.2s var(--chakra-transitions-easing-pop)',
321
+ _hover: { bg: 'red.800', transform: 'translateY(-1px)' },
322
+ _active: { transform: 'translateY(0)' },
323
+ _focusVisible: {
324
+ ring: '2px',
325
+ ringColor: 'red.400',
326
+ ringOffset: '1px',
327
+ ringOffsetColor: 'gray.900',
328
+ },
329
+ },
330
+ },
331
+ defaultProps: {
332
+ variant: 'elevated',
333
+ },
334
+ },
335
+ },
336
+ })
@@ -0,0 +1,234 @@
1
+ export interface TechnologyConnector {
2
+ type: 'catalog' | 'custom'
3
+ slug?: string
4
+ label: string
5
+ is_primary_icon?: boolean
6
+ }
7
+
8
+ export interface TechnologyCatalogItem {
9
+ iconUrl: string
10
+ name: string
11
+ provider: string
12
+ docsUrl: string
13
+ description: string
14
+ websiteUrl: string
15
+ nameShort: string
16
+ defaultSlug: string
17
+ }
18
+
19
+ export interface Tag {
20
+ name: string
21
+ color: string
22
+ description: string | null
23
+ }
24
+
25
+ export interface LibraryElement {
26
+ id: number
27
+ name: string
28
+ kind: string | null
29
+ description: string | null
30
+ technology: string | null
31
+ url: string | null
32
+ logo_url: string | null
33
+ technology_connectors: TechnologyConnector[]
34
+ tags: string[]
35
+ repo?: string | null
36
+ branch?: string | null
37
+ file_path?: string | null
38
+ language?: string | null
39
+ created_at: string
40
+ updated_at: string
41
+ has_view: boolean
42
+ view_label: string | null
43
+ }
44
+
45
+ export interface View {
46
+ id: number
47
+ owner_element_id: number | null
48
+ name: string
49
+ label: string | null
50
+ is_root: boolean
51
+ created_at: string
52
+ updated_at: string
53
+ }
54
+
55
+ export interface ElementPlacement {
56
+ id: number
57
+ view_id: number
58
+ element_id: number
59
+ position_x: number
60
+ position_y: number
61
+ }
62
+
63
+ export interface PlacedElement {
64
+ id: number
65
+ view_id: number
66
+ element_id: number
67
+ position_x: number
68
+ position_y: number
69
+ name: string
70
+ description: string | null
71
+ kind: string | null
72
+ technology: string | null
73
+ url: string | null
74
+ logo_url: string | null
75
+ technology_connectors: TechnologyConnector[]
76
+ tags: string[]
77
+ repo?: string | null
78
+ branch?: string | null
79
+ file_path?: string | null
80
+ language?: string | null
81
+ has_view: boolean
82
+ view_label: string | null
83
+ }
84
+
85
+ export interface NavigationConnector {
86
+ id: number
87
+ element_id: number | null
88
+ from_view_id: number
89
+ to_view_id: number
90
+ to_view_name: string
91
+ relation_type: string
92
+ }
93
+
94
+ export interface Connector {
95
+ id: number
96
+ view_id: number
97
+ source_element_id: number
98
+ target_element_id: number
99
+ label: string | null
100
+ description: string | null
101
+ relationship: string | null
102
+ direction: string
103
+ style: string
104
+ url: string | null
105
+ source_handle: string | null
106
+ target_handle: string | null
107
+ created_at: string
108
+ updated_at: string
109
+ }
110
+
111
+ export interface ViewTreeNode {
112
+ id: number
113
+ owner_element_id?: number | null
114
+ name: string
115
+ description: string | null
116
+ level_label: string | null
117
+ level: number
118
+ depth: number
119
+ created_at: string
120
+ updated_at: string
121
+ parent_view_id: number | null
122
+ children: ViewTreeNode[]
123
+ }
124
+
125
+ export interface ViewLayer {
126
+ id: number
127
+ diagram_id: number
128
+ name: string
129
+ tags: string[]
130
+ color?: string
131
+ created_at?: string
132
+ updated_at?: string
133
+ }
134
+
135
+ export interface DependencyElement {
136
+ id: string
137
+ name: string
138
+ description?: string | null
139
+ type?: string | null
140
+ technology?: string | null
141
+ url?: string | null
142
+ logo_url?: string | null
143
+ technology_connectors: TechnologyConnector[]
144
+ tags: string[]
145
+ repo?: string | null
146
+ branch?: string | null
147
+ language?: string | null
148
+ file_path?: string | null
149
+ created_at: string
150
+ updated_at: string
151
+ }
152
+
153
+ export interface DependencyConnector {
154
+ id: string
155
+ view_id: string
156
+ source_element_id: string
157
+ target_element_id: string
158
+ label?: string | null
159
+ description?: string | null
160
+ relationship_type?: string | null
161
+ direction: string
162
+ connector_type: string
163
+ url?: string | null
164
+ source_handle?: string | null
165
+ target_handle?: string | null
166
+ created_at: string
167
+ updated_at: string
168
+ }
169
+
170
+ export interface ViewConnector {
171
+ id: number
172
+ element_id: number | null
173
+ from_view_id: number
174
+ to_view_id: number
175
+ to_view_name: string
176
+ relation_type: string
177
+ }
178
+
179
+ export interface ViewConnectorsResult {
180
+ child_links: ViewConnector[]
181
+ parent_links: ViewConnector[]
182
+ }
183
+
184
+ export interface IncomingViewConnector {
185
+ id: number
186
+ element_id: number
187
+ element_name: string
188
+ from_view_id: number
189
+ from_view_name: string
190
+ to_view_id: number
191
+ }
192
+
193
+ export interface ViewPlacement {
194
+ view_id: number
195
+ view_name: string
196
+ }
197
+
198
+ export interface ExploreViewData {
199
+ placements: PlacedElement[]
200
+ connectors: Connector[]
201
+ }
202
+
203
+ export interface ExploreData {
204
+ tree: ViewTreeNode[]
205
+ views: Record<string, ExploreViewData>
206
+ navigations: ViewConnector[]
207
+ password_required?: boolean
208
+ }
209
+
210
+ export const ELEMENT_TYPES = [
211
+ 'person',
212
+ 'system',
213
+ 'container',
214
+ 'component',
215
+ 'database',
216
+ 'queue',
217
+ 'api',
218
+ 'service',
219
+ 'external',
220
+ ] as const
221
+
222
+ export type ElementType = (typeof ELEMENT_TYPES)[number]
223
+
224
+ export const TYPE_COLORS: Record<string, string> = {
225
+ person: 'teal',
226
+ system: 'blue',
227
+ container: 'purple',
228
+ component: 'orange',
229
+ database: 'cyan',
230
+ queue: 'yellow',
231
+ api: 'green',
232
+ service: 'pink',
233
+ external: 'gray',
234
+ }
@@ -0,0 +1,14 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module "*.svg" {
4
+ const src: string
5
+ export default src
6
+ }
7
+
8
+ declare global {
9
+ interface Window {
10
+ __TLD_VSCODE__?: boolean
11
+ }
12
+ }
13
+
14
+ export {}
@@ -0,0 +1,32 @@
1
+ import type { LibraryElement } from './index'
2
+
3
+ export interface WorkspaceSymbol {
4
+ name: string
5
+ kind: string
6
+ filePath: string
7
+ startLine: number
8
+ }
9
+
10
+ // Messages sent from the VS Code extension host to the webview
11
+ export type ExtensionToWebviewMessage =
12
+ | { type: 'workspace-symbols'; requestId: string; symbols: WorkspaceSymbol[] }
13
+ | { type: 'workspace-files'; requestId: string; files: string[] }
14
+ | { type: 'element-placed'; elementId: number; x: number; y: number }
15
+ | { type: 'focus-element'; elementId: number }
16
+ | { type: 'diagnostics-update'; elementId: number; severity: string; message: string }
17
+ | { type: 'file-content'; requestId: string; content: string; startLineOffset: number }
18
+
19
+ // Messages sent from the webview to the VS Code extension host
20
+ export type WebviewToExtensionMessage =
21
+ | { type: 'ready' }
22
+ | {
23
+ type: 'open-file'
24
+ filePath: string
25
+ startLine?: number
26
+ symbolName?: string
27
+ symbolKind?: string
28
+ }
29
+ | { type: 'request-workspace-files'; requestId: string; pattern: string }
30
+ | { type: 'request-symbol-list-for-file'; requestId: string; filePath: string }
31
+ | { type: 'diagram-loaded'; diagramId: number; elements: LibraryElement[] }
32
+ | { type: 'request-file-content'; requestId: string; filePath: string; startLine: number }