@sixb/app 0.2.1 → 0.2.3

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 (422) hide show
  1. package/dist/agent/agent-chat.d.ts +9 -2
  2. package/dist/agent/agent-chat.d.ts.map +1 -1
  3. package/dist/agent/agent-panel.d.ts +9 -1
  4. package/dist/agent/agent-panel.d.ts.map +1 -1
  5. package/dist/agent/agent-surface.d.ts.map +1 -1
  6. package/dist/agent/artifact-card.d.ts +3 -1
  7. package/dist/agent/artifact-card.d.ts.map +1 -1
  8. package/dist/agent/artifact-panel.d.ts +7 -1
  9. package/dist/agent/artifact-panel.d.ts.map +1 -1
  10. package/dist/agent/components/composer-place.d.ts +3 -1
  11. package/dist/agent/components/composer-place.d.ts.map +1 -1
  12. package/dist/agent/components/composer.d.ts +20 -1
  13. package/dist/agent/components/composer.d.ts.map +1 -1
  14. package/dist/agent/components/context-chips.d.ts.map +1 -1
  15. package/dist/agent/components/context-meter.d.ts +1 -1
  16. package/dist/agent/components/conversation-panel.d.ts +3 -1
  17. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  18. package/dist/agent/components/message-parts.d.ts +3 -1
  19. package/dist/agent/components/message-parts.d.ts.map +1 -1
  20. package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
  21. package/dist/agent/composer-insertion.d.ts +24 -0
  22. package/dist/agent/composer-insertion.d.ts.map +1 -0
  23. package/dist/agent/delegation/use-children.d.ts +5 -5
  24. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  25. package/dist/agent/hooks/use-agent-conversation.d.ts +10 -4
  26. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  27. package/dist/agent/hooks/use-new-thread-place.d.ts +39 -17
  28. package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -1
  29. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  30. package/dist/agent/i18n/en.d.ts +14 -0
  31. package/dist/agent/i18n/en.d.ts.map +1 -1
  32. package/dist/agent/i18n/fr.d.ts.map +1 -1
  33. package/dist/agent/i18n/index.d.ts +20 -0
  34. package/dist/agent/i18n/index.d.ts.map +1 -1
  35. package/dist/agent/publish-artifact/interpret.d.ts +8 -2
  36. package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
  37. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
  38. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
  39. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
  40. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
  41. package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
  42. package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
  43. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  44. package/dist/agent/types.d.ts +3 -1
  45. package/dist/agent/types.d.ts.map +1 -1
  46. package/dist/artifacts/artifact-page.d.ts.map +1 -1
  47. package/dist/artifacts/artifact-viewer.d.ts +16 -0
  48. package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
  49. package/dist/artifacts/card-details.d.ts +1 -1
  50. package/dist/artifacts/card-details.d.ts.map +1 -1
  51. package/dist/artifacts/card-preview.d.ts.map +1 -1
  52. package/dist/artifacts/comments-context.d.ts +48 -0
  53. package/dist/artifacts/comments-context.d.ts.map +1 -0
  54. package/dist/artifacts/edit-session.d.ts +6 -6
  55. package/dist/artifacts/edit-session.d.ts.map +1 -1
  56. package/dist/artifacts/file-source.d.ts.map +1 -1
  57. package/dist/artifacts/frame.d.ts +10 -2
  58. package/dist/artifacts/frame.d.ts.map +1 -1
  59. package/dist/artifacts/guest-badge.d.ts +8 -0
  60. package/dist/artifacts/guest-badge.d.ts.map +1 -0
  61. package/dist/artifacts/held-artifact.d.ts +19 -0
  62. package/dist/artifacts/held-artifact.d.ts.map +1 -0
  63. package/dist/artifacts/holders.d.ts +10 -0
  64. package/dist/artifacts/holders.d.ts.map +1 -0
  65. package/dist/artifacts/live/boards.d.ts +15 -0
  66. package/dist/artifacts/live/boards.d.ts.map +1 -0
  67. package/dist/artifacts/live/canvas.d.ts +79 -0
  68. package/dist/artifacts/live/canvas.d.ts.map +1 -0
  69. package/dist/artifacts/live/header.d.ts +29 -0
  70. package/dist/artifacts/live/header.d.ts.map +1 -0
  71. package/dist/artifacts/live/hooks.d.ts +21 -0
  72. package/dist/artifacts/live/hooks.d.ts.map +1 -0
  73. package/dist/artifacts/live/presence.d.ts +32 -0
  74. package/dist/artifacts/live/presence.d.ts.map +1 -0
  75. package/dist/artifacts/live/session.d.ts +130 -0
  76. package/dist/artifacts/live/session.d.ts.map +1 -0
  77. package/dist/artifacts/live/view.d.ts +28 -0
  78. package/dist/artifacts/live/view.d.ts.map +1 -0
  79. package/dist/artifacts/messages.d.ts +424 -14
  80. package/dist/artifacts/messages.d.ts.map +1 -1
  81. package/dist/artifacts/page-queries.d.ts +2 -2
  82. package/dist/artifacts/page-queries.d.ts.map +1 -1
  83. package/dist/artifacts/page-state.d.ts.map +1 -1
  84. package/dist/artifacts/publish-edit.d.ts +24 -14
  85. package/dist/artifacts/publish-edit.d.ts.map +1 -1
  86. package/dist/artifacts/queries.d.ts +490 -9
  87. package/dist/artifacts/queries.d.ts.map +1 -1
  88. package/dist/artifacts/references/references.d.ts.map +1 -1
  89. package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
  90. package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
  91. package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
  92. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
  93. package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
  94. package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
  95. package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
  96. package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
  97. package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
  98. package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
  99. package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
  100. package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
  101. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
  102. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
  103. package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
  104. package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
  105. package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
  106. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
  107. package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
  108. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
  109. package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
  110. package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
  111. package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
  112. package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
  113. package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
  114. package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
  115. package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
  116. package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
  117. package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
  118. package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
  119. package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
  120. package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
  121. package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
  122. package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
  123. package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
  124. package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
  125. package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
  126. package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
  127. package/dist/artifacts/version-menu.d.ts +19 -0
  128. package/dist/artifacts/version-menu.d.ts.map +1 -0
  129. package/dist/artifacts/view-context.d.ts +43 -0
  130. package/dist/artifacts/view-context.d.ts.map +1 -0
  131. package/dist/artifacts/viewer.d.ts.map +1 -1
  132. package/dist/build.d.ts +5 -0
  133. package/dist/build.d.ts.map +1 -1
  134. package/dist/{chunk-ytadd0b5.js → chunk-001c4gnk.js} +6871 -3756
  135. package/dist/chunk-001c4gnk.js.map +204 -0
  136. package/dist/chunk-00wggsst.js +7 -0
  137. package/dist/chunk-00wggsst.js.map +10 -0
  138. package/dist/chunk-5crvhjp2.js +4704 -0
  139. package/dist/chunk-5crvhjp2.js.map +28 -0
  140. package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
  141. package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
  142. package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
  143. package/dist/chunk-fg6thecb.js.map +10 -0
  144. package/dist/{chunk-j8g956dt.js → chunk-fwb9mxwm.js} +1 -1
  145. package/dist/{chunk-7fj9cfkw.js → chunk-kes4ygmz.js} +1 -1
  146. package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
  147. package/dist/codegen.d.ts.map +1 -1
  148. package/dist/createCustomApp.d.ts.map +1 -1
  149. package/dist/index.d.ts +7 -1
  150. package/dist/index.d.ts.map +1 -1
  151. package/dist/index.js +930 -309
  152. package/dist/index.js.map +15 -10
  153. package/dist/locale-messages.d.ts +12 -0
  154. package/dist/locale-messages.d.ts.map +1 -1
  155. package/dist/locale.d.ts +12 -0
  156. package/dist/locale.d.ts.map +1 -1
  157. package/dist/locale.js +1 -1
  158. package/dist/metadata.d.ts +8 -0
  159. package/dist/metadata.d.ts.map +1 -1
  160. package/dist/pages/console/action-run.d.ts.map +1 -1
  161. package/dist/pages/console/data/connectors.d.ts.map +1 -1
  162. package/dist/pages/console/data/datasets.d.ts.map +1 -1
  163. package/dist/pages/console/data/lake-health.d.ts +3 -0
  164. package/dist/pages/console/data/lake-health.d.ts.map +1 -0
  165. package/dist/pages/console/data/messages.d.ts +98 -2
  166. package/dist/pages/console/data/messages.d.ts.map +1 -1
  167. package/dist/pages/console/data/pipelines.d.ts.map +1 -1
  168. package/dist/pages/console/data/projections.d.ts.map +1 -1
  169. package/dist/pages/console/data/syncs.d.ts.map +1 -1
  170. package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
  171. package/dist/pages/console/ontology/actions.d.ts.map +1 -1
  172. package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
  173. package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
  174. package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
  175. package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
  176. package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
  177. package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
  178. package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
  179. package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
  180. package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
  181. package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
  182. package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
  183. package/dist/pages/console/ontology/objects.d.ts.map +1 -1
  184. package/dist/pages/console/ontology/rules.d.ts.map +1 -1
  185. package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
  186. package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
  187. package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
  188. package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
  189. package/dist/pages/console/skeletons.d.ts +30 -0
  190. package/dist/pages/console/skeletons.d.ts.map +1 -0
  191. package/dist/pages/console/workflow-run.d.ts.map +1 -1
  192. package/dist/pages/section-page.d.ts +11 -1
  193. package/dist/pages/section-page.d.ts.map +1 -1
  194. package/dist/pages/section-ui.d.ts +25 -3
  195. package/dist/pages/section-ui.d.ts.map +1 -1
  196. package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
  197. package/dist/pages/settings/activity/connections.d.ts.map +1 -1
  198. package/dist/pages/settings/activity/page.d.ts.map +1 -1
  199. package/dist/pages/settings/activity/thread.d.ts.map +1 -1
  200. package/dist/pages/settings/activity/timeline.d.ts +2 -0
  201. package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
  202. package/dist/pages/settings/controls.d.ts +4 -0
  203. package/dist/pages/settings/controls.d.ts.map +1 -1
  204. package/dist/pages/settings/members.d.ts.map +1 -1
  205. package/dist/pages/settings/memory-history.d.ts +2 -0
  206. package/dist/pages/settings/memory-history.d.ts.map +1 -1
  207. package/dist/pages/settings/memory.d.ts.map +1 -1
  208. package/dist/pages/settings/service-accounts.d.ts.map +1 -1
  209. package/dist/pages/settings/sessions.d.ts.map +1 -1
  210. package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
  211. package/dist/pages/settings/usage/limits.d.ts.map +1 -1
  212. package/dist/pages/settings/usage/messages.d.ts +0 -2
  213. package/dist/pages/settings/usage/messages.d.ts.map +1 -1
  214. package/dist/pages/settings/usage/runs.d.ts +8 -2
  215. package/dist/pages/settings/usage/runs.d.ts.map +1 -1
  216. package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
  217. package/dist/pages/settings/usage/spend-model.d.ts +5 -0
  218. package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
  219. package/dist/pages/values.d.ts +6 -0
  220. package/dist/pages/values.d.ts.map +1 -1
  221. package/dist/pages.d.ts +4 -0
  222. package/dist/pages.d.ts.map +1 -1
  223. package/dist/pages.js +8188 -4841
  224. package/dist/pages.js.map +56 -47
  225. package/dist/sections/catalog.d.ts.map +1 -1
  226. package/dist/sections/sections.d.ts.map +1 -1
  227. package/dist/server.js +294 -23
  228. package/dist/server.js.map +8 -7
  229. package/dist/service-worker.d.ts +39 -0
  230. package/dist/service-worker.d.ts.map +1 -0
  231. package/dist/shared-session.d.ts +25 -0
  232. package/dist/shared-session.d.ts.map +1 -0
  233. package/dist/shell/app-return.d.ts +35 -0
  234. package/dist/shell/app-return.d.ts.map +1 -0
  235. package/dist/shell/app-shell.d.ts +1 -1
  236. package/dist/shell/app-shell.d.ts.map +1 -1
  237. package/dist/shell/nav-items.d.ts +2 -0
  238. package/dist/shell/nav-items.d.ts.map +1 -1
  239. package/dist/shell/phone/back.d.ts +6 -0
  240. package/dist/shell/phone/back.d.ts.map +1 -0
  241. package/dist/shell/phone/launch.d.ts +7 -0
  242. package/dist/shell/phone/launch.d.ts.map +1 -0
  243. package/dist/shell/phone/more-sheet.d.ts +36 -0
  244. package/dist/shell/phone/more-sheet.d.ts.map +1 -0
  245. package/dist/shell/phone/phone-foundations.d.ts +9 -0
  246. package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
  247. package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
  248. package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
  249. package/dist/shell/phone/routes.d.ts +12 -0
  250. package/dist/shell/phone/routes.d.ts.map +1 -0
  251. package/dist/shell/phone/screen-motion.d.ts +11 -0
  252. package/dist/shell/phone/screen-motion.d.ts.map +1 -0
  253. package/dist/shell/phone/scroll-restoration.d.ts +7 -0
  254. package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
  255. package/dist/shell/phone/startup-image.d.ts +17 -0
  256. package/dist/shell/phone/startup-image.d.ts.map +1 -0
  257. package/dist/shell/phone/tab-bar.d.ts +14 -0
  258. package/dist/shell/phone/tab-bar.d.ts.map +1 -0
  259. package/dist/shell/phone/top-bar.d.ts +24 -0
  260. package/dist/shell/phone/top-bar.d.ts.map +1 -0
  261. package/dist/shell/search-command.d.ts +3 -1
  262. package/dist/shell/search-command.d.ts.map +1 -1
  263. package/dist/shell/user-menu.d.ts +2 -0
  264. package/dist/shell/user-menu.d.ts.map +1 -1
  265. package/package.json +8 -5
  266. package/src/agent/agent-chat.tsx +51 -8
  267. package/src/agent/agent-panel.tsx +12 -0
  268. package/src/agent/agent-surface.tsx +4 -0
  269. package/src/agent/artifact-card.tsx +84 -16
  270. package/src/agent/artifact-panel.tsx +63 -43
  271. package/src/agent/components/agent-message-body.tsx +1 -1
  272. package/src/agent/components/composer-place.tsx +77 -53
  273. package/src/agent/components/composer.tsx +92 -7
  274. package/src/agent/components/context-chips.tsx +72 -2
  275. package/src/agent/components/conversation-panel.tsx +3 -2
  276. package/src/agent/components/message-parts.tsx +6 -1
  277. package/src/agent/components/thread-artifacts-menu.tsx +22 -5
  278. package/src/agent/composer-insertion.ts +36 -0
  279. package/src/agent/hooks/use-agent-conversation.ts +41 -10
  280. package/src/agent/hooks/use-new-thread-place.ts +149 -25
  281. package/src/agent/i18n/en.ts +14 -0
  282. package/src/agent/i18n/fr.ts +12 -0
  283. package/src/agent/publish-artifact/interpret.ts +27 -5
  284. package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
  285. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
  286. package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
  287. package/src/agent/react-router.tsx +2 -2
  288. package/src/agent/tool-views/built-in.tsx +3 -0
  289. package/src/agent/types.ts +4 -0
  290. package/src/artifacts/artifact-page.tsx +42 -17
  291. package/src/artifacts/artifact-viewer.tsx +56 -0
  292. package/src/artifacts/artifacts.css +80 -0
  293. package/src/artifacts/card-details.ts +2 -2
  294. package/src/artifacts/card-preview.tsx +17 -3
  295. package/src/artifacts/comments-context.ts +125 -0
  296. package/src/artifacts/edit-session.tsx +6 -6
  297. package/src/artifacts/file-source.ts +10 -3
  298. package/src/artifacts/frame.tsx +50 -12
  299. package/src/artifacts/gallery.tsx +9 -11
  300. package/src/artifacts/guest-badge.tsx +21 -0
  301. package/src/artifacts/held-artifact.tsx +241 -0
  302. package/src/artifacts/holders.tsx +170 -0
  303. package/src/artifacts/live/boards.ts +95 -0
  304. package/src/artifacts/live/canvas.ts +402 -0
  305. package/src/artifacts/live/header.tsx +137 -0
  306. package/src/artifacts/live/hooks.ts +94 -0
  307. package/src/artifacts/live/presence.ts +147 -0
  308. package/src/artifacts/live/session.ts +520 -0
  309. package/src/artifacts/live/view.ts +81 -0
  310. package/src/artifacts/messages.ts +415 -24
  311. package/src/artifacts/page-queries.ts +2 -3
  312. package/src/artifacts/page-state.ts +16 -7
  313. package/src/artifacts/publish-edit.ts +50 -22
  314. package/src/artifacts/queries.ts +108 -10
  315. package/src/artifacts/references/references.tsx +6 -9
  316. package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
  317. package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
  318. package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
  319. package/src/artifacts/renderers/canvas/board-source.ts +110 -0
  320. package/src/artifacts/renderers/canvas/board.tsx +309 -33
  321. package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
  322. package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
  323. package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
  324. package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
  325. package/src/artifacts/renderers/canvas/comments.ts +225 -0
  326. package/src/artifacts/renderers/canvas/draft.ts +41 -50
  327. package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
  328. package/src/artifacts/renderers/canvas/focus.tsx +175 -24
  329. package/src/artifacts/renderers/canvas/items.tsx +179 -52
  330. package/src/artifacts/renderers/canvas/layout.ts +99 -47
  331. package/src/artifacts/renderers/canvas/presence.tsx +184 -0
  332. package/src/artifacts/renderers/canvas/previews.ts +127 -0
  333. package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
  334. package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
  335. package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
  336. package/src/artifacts/renderers/slides/slides.tsx +1 -1
  337. package/src/artifacts/version-menu.tsx +438 -0
  338. package/src/artifacts/view-context.ts +102 -0
  339. package/src/artifacts/viewer.tsx +205 -147
  340. package/src/build.ts +96 -11
  341. package/src/codegen.ts +83 -5
  342. package/src/createCustomApp.ts +20 -7
  343. package/src/index.ts +12 -0
  344. package/src/locale-messages.ts +24 -0
  345. package/src/metadata.ts +12 -0
  346. package/src/pages/console/action-run.tsx +20 -0
  347. package/src/pages/console/data/connectors.tsx +27 -3
  348. package/src/pages/console/data/datasets.tsx +30 -1
  349. package/src/pages/console/data/lake-health.tsx +299 -0
  350. package/src/pages/console/data/messages.ts +143 -2
  351. package/src/pages/console/data/pipelines.tsx +91 -3
  352. package/src/pages/console/data/projections.tsx +23 -4
  353. package/src/pages/console/data/syncs.tsx +39 -2
  354. package/src/pages/console/ontology/action-runs.tsx +8 -2
  355. package/src/pages/console/ontology/actions.tsx +39 -15
  356. package/src/pages/console/ontology/components/action-button.tsx +10 -0
  357. package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
  358. package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
  359. package/src/pages/console/ontology/lib/action-params.ts +10 -0
  360. package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
  361. package/src/pages/console/ontology/object-page.tsx +2 -0
  362. package/src/pages/console/ontology/object-type.tsx +73 -14
  363. package/src/pages/console/ontology/object-types.tsx +56 -7
  364. package/src/pages/console/ontology/objects.tsx +167 -19
  365. package/src/pages/console/ontology/rules.tsx +186 -30
  366. package/src/pages/console/ontology/workflow.tsx +130 -74
  367. package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
  368. package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
  369. package/src/pages/console/ontology/workflows.tsx +34 -21
  370. package/src/pages/console/skeletons.tsx +99 -0
  371. package/src/pages/console/workflow-run.tsx +20 -0
  372. package/src/pages/section-page.tsx +37 -7
  373. package/src/pages/section-ui.tsx +96 -13
  374. package/src/pages/settings/activity/calendar.tsx +13 -6
  375. package/src/pages/settings/activity/connections.tsx +26 -9
  376. package/src/pages/settings/activity/page.tsx +31 -4
  377. package/src/pages/settings/activity/thread.tsx +32 -18
  378. package/src/pages/settings/activity/timeline.tsx +39 -0
  379. package/src/pages/settings/controls.tsx +19 -1
  380. package/src/pages/settings/developers.tsx +2 -2
  381. package/src/pages/settings/members.tsx +42 -9
  382. package/src/pages/settings/memory-history.tsx +76 -10
  383. package/src/pages/settings/memory.tsx +47 -5
  384. package/src/pages/settings/service-accounts.tsx +7 -2
  385. package/src/pages/settings/sessions.tsx +6 -2
  386. package/src/pages/settings/usage/breakdown.tsx +62 -2
  387. package/src/pages/settings/usage/limits.tsx +45 -3
  388. package/src/pages/settings/usage/messages.ts +0 -2
  389. package/src/pages/settings/usage/page.tsx +99 -52
  390. package/src/pages/settings/usage/runs.tsx +105 -8
  391. package/src/pages/settings/usage/spend-chart.tsx +79 -45
  392. package/src/pages/settings/usage/spend-model.ts +16 -0
  393. package/src/pages/values.tsx +72 -6
  394. package/src/pages.ts +4 -0
  395. package/src/sections/catalog.ts +6 -0
  396. package/src/sections/sections.tsx +2 -0
  397. package/src/service-worker.ts +176 -0
  398. package/src/shared-session.ts +73 -0
  399. package/src/shell/app-return.ts +115 -0
  400. package/src/shell/app-shell.tsx +125 -27
  401. package/src/shell/nav-items.tsx +2 -0
  402. package/src/shell/phone/back.ts +16 -0
  403. package/src/shell/phone/launch.ts +6 -0
  404. package/src/shell/phone/more-sheet.tsx +249 -0
  405. package/src/shell/phone/phone-foundations.tsx +43 -0
  406. package/src/shell/phone/phone.css +660 -0
  407. package/src/shell/phone/pull-to-refresh.tsx +201 -0
  408. package/src/shell/phone/routes.ts +34 -0
  409. package/src/shell/phone/screen-motion.ts +292 -0
  410. package/src/shell/phone/scroll-restoration.tsx +70 -0
  411. package/src/shell/phone/startup-image.ts +119 -0
  412. package/src/shell/phone/tab-bar.tsx +95 -0
  413. package/src/shell/phone/top-bar.tsx +195 -0
  414. package/src/shell/search-command.tsx +30 -14
  415. package/src/shell/user-menu.tsx +2 -1
  416. package/dist/chunk-4j3c3p72.js +0 -1487
  417. package/dist/chunk-4j3c3p72.js.map +0 -18
  418. package/dist/chunk-4mprsd2n.js.map +0 -10
  419. package/dist/chunk-ytadd0b5.js.map +0 -188
  420. /package/dist/{chunk-j8g956dt.js.map → chunk-fwb9mxwm.js.map} +0 -0
  421. /package/dist/{chunk-7fj9cfkw.js.map → chunk-kes4ygmz.js.map} +0 -0
  422. /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
@@ -1,43 +1,53 @@
1
1
  import {
2
2
  isSixbApiError,
3
- type PublishArtifactVersionResponse,
4
- publishArtifactVersion,
5
3
  type SixbClient,
4
+ type UpdateArtifactResponse,
5
+ updateArtifact,
6
6
  uploadFile,
7
7
  } from "@sixb/client"
8
8
  import type { ArtifactVersion } from "./queries"
9
9
 
10
- /** The version an artifact had moved on to when a save found it, and who published it. */
10
+ type Principal = { readonly type: string; readonly id: string }
11
+
12
+ /**
13
+ * What an artifact had moved on to when a save found it: its latest version and revision, who last
14
+ * wrote it, and, once someone created that version, who did.
15
+ */
11
16
  export interface ArtifactMoved {
12
17
  readonly version: number
13
- readonly author: { readonly type: string; readonly id: string }
18
+ readonly revision: number
19
+ readonly author: Principal
20
+ readonly frozenBy?: Principal
14
21
  }
15
22
 
16
- /** A save refused because another version was published after the one edited. */
23
+ /** A save refused because the artifact changed after the revision edited. */
17
24
  export class ArtifactMovedError extends Error {
18
25
  readonly name = "ArtifactMovedError"
19
26
 
20
27
  constructor(readonly latest: ArtifactMoved) {
21
- super(`[SixbApp] Version ${latest.version} was published while this one was being edited.`)
28
+ super(
29
+ `[SixbApp] The artifact changed to revision ${latest.revision} while it was being edited.`
30
+ )
22
31
  }
23
32
  }
24
33
 
25
34
  /**
26
- * Publishes a person's edit of a version as the artifact's next: uploads only the files that
27
- * changed, carries every other file over by reference, and publishes from the version edited, so a
28
- * version published meanwhile is never replaced unseen. A changed path maps to its new contents,
29
- * or to `null` to leave the file out. Rejects with {@link ArtifactMovedError} when the artifact has
30
- * moved past the version edited; `baseVersion` names a later one to publish over anyway.
35
+ * Saves a person's edit of a version as the artifact's latest: in place while it is open, as the
36
+ * next version once someone created it. Uploads only the files that changed, carries every other
37
+ * file over by reference, and saves from the revision edited, so a change made meanwhile is never
38
+ * replaced unseen. A changed path maps to its new contents, or to `null` to leave the file out.
39
+ * Rejects with {@link ArtifactMovedError} when the artifact changed since; `baseRevision` names a
40
+ * later revision to save over anyway.
31
41
  */
32
42
  export async function publishEdit(
33
43
  version: ArtifactVersion,
34
44
  changed: ReadonlyMap<string, Blob | null>,
35
45
  options: {
36
- readonly baseVersion?: number
46
+ readonly baseRevision?: number
37
47
  readonly client?: SixbClient
38
48
  readonly signal?: AbortSignal
39
49
  } = {}
40
- ): Promise<PublishArtifactVersionResponse> {
50
+ ): Promise<UpdateArtifactResponse> {
41
51
  const transport = {
42
52
  ...(options.client ? { client: options.client } : {}),
43
53
  ...(options.signal ? { signal: options.signal } : {}),
@@ -58,13 +68,13 @@ export async function publishEdit(
58
68
  ),
59
69
  ])
60
70
  try {
61
- const { data } = await publishArtifactVersion({
71
+ const { data } = await updateArtifact({
62
72
  path: { artifactId: version.artifactId },
63
73
  body: {
64
74
  kind: version.outline.kind,
65
75
  title: version.title,
66
76
  files,
67
- baseVersion: options.baseVersion ?? version.version,
77
+ baseRevision: options.baseRevision ?? version.revision,
68
78
  },
69
79
  throwOnError: true,
70
80
  ...transport,
@@ -77,14 +87,32 @@ export async function publishEdit(
77
87
  }
78
88
  }
79
89
 
80
- function movedTo(error: unknown): ArtifactMoved | null {
90
+ /** The latest version a 409 `artifact_moved` names, read from the API's body. */
91
+ export function movedTo(error: unknown): ArtifactMoved | null {
81
92
  if (!isSixbApiError(error) || error.status !== 409) return null
93
+
82
94
  const body = error.body as { code?: unknown; latest?: Partial<ArtifactMoved> } | null
83
95
  const latest = body?.latest
84
- return body?.code === "artifact_moved" &&
85
- typeof latest?.version === "number" &&
86
- typeof latest.author?.type === "string" &&
87
- typeof latest.author.id === "string"
88
- ? { version: latest.version, author: { type: latest.author.type, id: latest.author.id } }
89
- : null
96
+ if (
97
+ body?.code !== "artifact_moved" ||
98
+ typeof latest?.version !== "number" ||
99
+ typeof latest.revision !== "number" ||
100
+ !isPrincipal(latest.author)
101
+ ) {
102
+ return null
103
+ }
104
+
105
+ return {
106
+ version: latest.version,
107
+ revision: latest.revision,
108
+ author: { type: latest.author.type, id: latest.author.id },
109
+ ...(isPrincipal(latest.frozenBy)
110
+ ? { frozenBy: { type: latest.frozenBy.type, id: latest.frozenBy.id } }
111
+ : {}),
112
+ }
113
+ }
114
+
115
+ function isPrincipal(value: unknown): value is Principal {
116
+ const principal = value as Partial<Principal> | null | undefined
117
+ return typeof principal?.type === "string" && typeof principal.id === "string"
90
118
  }
@@ -4,7 +4,13 @@ import {
4
4
  getArtifactQuery,
5
5
  isSixbApiError,
6
6
  } from "@sixb/client"
7
- import { events, useEvents } from "@sixb/client/hooks"
7
+ import {
8
+ events,
9
+ getArtifactVersionOptions,
10
+ listArtifactCommentsQueryKey,
11
+ useEvents,
12
+ useEventsRegistry,
13
+ } from "@sixb/client/hooks"
8
14
  import {
9
15
  ARTIFACT_THEME_FILE,
10
16
  type ArtifactTheme,
@@ -18,12 +24,99 @@ import {
18
24
  useQuery,
19
25
  useQueryClient,
20
26
  } from "@tanstack/react-query"
21
- import { useCallback, useMemo, useSyncExternalStore } from "react"
27
+ import { useCallback, useEffect, useMemo, useSyncExternalStore } from "react"
22
28
  import { artifactFileSource, type FileSource } from "./file-source"
23
29
  import { type FileLoadError, fileLoadError, MAX_TEXT_PREVIEW_BYTES } from "./file-view"
24
30
 
25
31
  export type ArtifactVersion = GetArtifactVersionResponse
26
32
 
33
+ /** How long the open version read stays fresh: a view that opens after it reads it again. */
34
+ const OPEN_VERSION_STALE_MS = 30_000
35
+
36
+ /**
37
+ * A version as a view reads it. A frozen version never changes, so it is read once by its number;
38
+ * the open one changes at each write, which `artifact.updated` announces to the views that follow
39
+ * the artifact ({@link useArtifactUpdates}), and is read again when a view opens after half a
40
+ * minute. So is `latest` when frozen: the next write opens a newer version.
41
+ */
42
+ export function artifactVersionOptions(artifactId: string, version: number | "latest") {
43
+ return queryOptions({
44
+ ...getArtifactVersionOptions({ path: { artifactId, version: String(version) } }),
45
+ staleTime: (query) =>
46
+ version !== "latest" && query.state.data?.frozen
47
+ ? Number.POSITIVE_INFINITY
48
+ : OPEN_VERSION_STALE_MS,
49
+ retry: false,
50
+ })
51
+ }
52
+
53
+ /**
54
+ * A version, read again as soon as it is older than `revision`, a revision the view knows the
55
+ * artifact has reached, such as its gallery entry's.
56
+ */
57
+ export function useArtifactVersion(
58
+ artifactId: string,
59
+ version: number | "latest",
60
+ options: { readonly enabled?: boolean; readonly revision?: number } = {}
61
+ ) {
62
+ const query = useQuery({
63
+ ...artifactVersionOptions(artifactId, version),
64
+ enabled: options.enabled ?? true,
65
+ })
66
+
67
+ const behind =
68
+ options.revision !== undefined &&
69
+ query.data !== undefined &&
70
+ !query.data.frozen &&
71
+ query.data.revision < options.revision
72
+ const { refetch } = query
73
+ useEffect(() => {
74
+ if (behind) void refetch()
75
+ }, [behind, refetch])
76
+
77
+ return query
78
+ }
79
+
80
+ /**
81
+ * Follows changes to an artifact while a view shows it: each `artifact.updated` reads again what
82
+ * the change made stale, and each `artifact.commented` its comments, so a reader anywhere sees what someone else saved, the Agent wrote, or a
83
+ * version created. It listens on the app's event socket: a view mounted without one, as a test
84
+ * mounts it, opens none of its own, and reads the open version again as it goes stale.
85
+ */
86
+ export function useArtifactUpdates(artifactId: string | undefined): void {
87
+ const queries = useQueryClient()
88
+ const shared = useEventsRegistry() !== null
89
+ useEvents(
90
+ events.artifacts(),
91
+ (event) => {
92
+ if (event.payload.artifactId !== artifactId) return
93
+
94
+ // A comment changes the comments alone.
95
+ if (event.type === "artifact.commented") {
96
+ void queries.invalidateQueries({
97
+ queryKey: listArtifactCommentsQueryKey({ path: { artifactId } }),
98
+ })
99
+ return
100
+ }
101
+ artifactChanged(queries, artifactId)
102
+ },
103
+ { enabled: artifactId !== undefined && shared }
104
+ )
105
+ }
106
+
107
+ /**
108
+ * Reads again what a change to an artifact makes stale: the artifact and its versions, its restore
109
+ * points, its boards' previews, and the lists that show it. Only what a view shows is read now; the
110
+ * rest when one opens.
111
+ */
112
+ export function artifactChanged(queries: QueryClient, artifactId: string): void {
113
+ for (const id of ["getArtifact", "getArtifactVersion", "listArtifactRestorePoints"]) {
114
+ void queries.invalidateQueries({ queryKey: [{ _id: id, path: { artifactId } }] })
115
+ }
116
+ void queries.invalidateQueries({ queryKey: ["artifact-board-previews", artifactId] })
117
+ void queries.invalidateQueries({ queryKey: [{ _id: "listArtifacts" }] })
118
+ }
119
+
27
120
  /** Where a file's text is cached; a test seeds it there to render without a network. */
28
121
  export function fileTextQueryKey(source: FileSource | null): readonly unknown[] {
29
122
  return [...(source?.queryKey ?? ["no-file"]), "text"]
@@ -89,20 +182,25 @@ export function versionFileSource(version: ArtifactVersion, path: string): FileS
89
182
  : null
90
183
  }
91
184
 
92
- /** Where a version's query result is cached: every view of the version that shows it reads it once. */
93
- export function artifactQueryKey(artifactId: string, version: number, name: string) {
94
- return [...versionQueriesKey({ artifactId, version }), name] as const
185
+ /**
186
+ * Where a version's query result is cached: every view of the version that shows it reads it once.
187
+ * An open version's query file can change, so the result is the file's: a change elsewhere in the
188
+ * artifact keeps it.
189
+ */
190
+ export function artifactQueryKey(version: QueriedVersion, name: string) {
191
+ const file = version.files.find((candidate) => artifactQueryName(candidate.path) === name)
192
+ return [...versionQueriesKey(version), name, file?.file.digest ?? null] as const
95
193
  }
96
194
 
97
195
  /** Where every query result of a version is cached, one key under it each. */
98
- export function versionQueriesKey(version: QueriedVersion) {
196
+ export function versionQueriesKey(version: Pick<ArtifactVersion, "artifactId" | "version">) {
99
197
  return [ARTIFACT_QUERIES, version.artifactId, version.version] as const
100
198
  }
101
199
 
102
200
  const ARTIFACT_QUERIES = "artifact-query"
103
201
 
104
- /** The version a query runs at: the one the view or the frame shows. */
105
- export type QueriedVersion = Pick<ArtifactVersion, "artifactId" | "version">
202
+ /** The version a query runs at: the one the view or the frame shows, with its query files. */
203
+ export type QueriedVersion = Pick<ArtifactVersion, "artifactId" | "version" | "files">
106
204
 
107
205
  /** Read once a view shows it, and again when one opens after half a minute, as page state is. */
108
206
  const QUERY_STALE_MS = 30_000
@@ -113,7 +211,7 @@ const QUERY_STALE_MS = 30_000
113
211
  */
114
212
  export function artifactQueryOptions(version: QueriedVersion, name: string) {
115
213
  return queryOptions({
116
- queryKey: artifactQueryKey(version.artifactId, version.version, name),
214
+ queryKey: artifactQueryKey(version, name),
117
215
  staleTime: QUERY_STALE_MS,
118
216
  retry: false,
119
217
  queryFn: ({ signal }) => readQuery(version, name, signal),
@@ -187,7 +285,7 @@ export function holdsQueries(version: Pick<ArtifactVersion, "files">): boolean {
187
285
  * views that show one refetch it, and a frame's page hears its rows changed; one no view shows is
188
286
  * read when one opens.
189
287
  */
190
- export function useVersionQueries(version: QueriedVersion): {
288
+ export function useVersionQueries(version: Pick<ArtifactVersion, "artifactId" | "version">): {
191
289
  readonly readAt: number | null
192
290
  readonly refreshing: boolean
193
291
  readonly refresh: () => void
@@ -1,5 +1,5 @@
1
1
  import { isSixbApiError } from "@sixb/client"
2
- import { getArtifactOptions, getArtifactVersionOptions } from "@sixb/client/hooks"
2
+ import { getArtifactOptions } from "@sixb/client/hooks"
3
3
  import {
4
4
  type ArtifactAddress,
5
5
  type CellRange,
@@ -32,8 +32,10 @@ import { ArtifactKindIcon } from "../kind-icon"
32
32
  import { useArtifactMessages } from "../messages"
33
33
  import {
34
34
  type ArtifactVersion,
35
+ artifactVersionOptions,
35
36
  holdsQueries,
36
37
  useArtifactTheme,
38
+ useArtifactUpdates,
37
39
  useFileText,
38
40
  versionFileSource,
39
41
  } from "../queries"
@@ -261,14 +263,9 @@ function LoadedEmbed({
261
263
  readonly fill: boolean
262
264
  }) {
263
265
  const messages = useArtifactMessages().references
264
- const query = useQuery({
265
- ...getArtifactVersionOptions({
266
- path: { artifactId: address.artifactId, version: String(address.version ?? "latest") },
267
- }),
268
- // A pinned version never changes; the latest is read again when the embed mounts.
269
- staleTime: address.version === undefined ? 30_000 : Number.POSITIVE_INFINITY,
270
- retry: false,
271
- })
266
+ // A pinned version is a created one, which never changes; the latest follows the artifact.
267
+ const query = useQuery(artifactVersionOptions(address.artifactId, address.version ?? "latest"))
268
+ useArtifactUpdates(address.version === undefined ? address.artifactId : undefined)
272
269
  const version = query.data
273
270
  // An artifact that exists but is not shared where the reader reads this one says so, calmly.
274
271
  const notShared = isSixbApiError(query.error) && query.error.code === "not_shared"
@@ -1,3 +1,4 @@
1
+ import { ARTIFACT_LIMITS, type CanvasBox, canvasArrowLine } from "@sixb/core/artifacts"
1
2
  import {
2
3
  EdgeLabelRenderer,
3
4
  type EdgeProps,
@@ -5,31 +6,23 @@ import {
5
6
  type InternalNode,
6
7
  useInternalNode,
7
8
  } from "@xyflow/react"
8
- import { useNameScale } from "./items"
9
+ import { memo } from "react"
10
+ import { NAME_SCALE_VALUE, useNamesShown } from "./items"
9
11
  import type { CanvasFlowEdge } from "./layout"
10
12
 
11
- export const CANVAS_EDGE_TYPES: EdgeTypes = { floating: FloatingArrow }
13
+ export const CANVAS_EDGE_TYPES: EdgeTypes = { floating: memo(FloatingArrow) }
12
14
 
13
- /** Room between an item's edge and the arrow that leaves or meets it. */
14
- const GAP = 10
15
15
  const HEAD_LENGTH = 13
16
16
  const HEAD_WIDTH = 11
17
17
  /**
18
- * Where labels stack: over the arrows, which sit over every item, of which a canvas holds at most
19
- * 500. React Flow draws the labels in a layer of their own, under the arrows unless raised.
18
+ * Where labels stack: over the arrows, which sit over every item a canvas can hold. React Flow
19
+ * draws the labels in a layer of their own, under the arrows unless raised.
20
20
  */
21
- const LABEL_LAYER = 1000
21
+ const LABEL_LAYER = ARTIFACT_LIMITS.maxCanvasItems + 1
22
22
  /** The most of its arrow a label covers, so the line still shows on both sides of it. */
23
23
  const LABEL_SHARE = 0.7
24
24
 
25
- interface Rect {
26
- readonly x: number
27
- readonly y: number
28
- readonly width: number
29
- readonly height: number
30
- }
31
-
32
- function rectOf(node: InternalNode): Rect {
25
+ function rectOf(node: InternalNode): CanvasBox {
33
26
  return {
34
27
  x: node.internals.positionAbsolute.x,
35
28
  y: node.internals.positionAbsolute.y,
@@ -38,25 +31,6 @@ function rectOf(node: InternalNode): Rect {
38
31
  }
39
32
  }
40
33
 
41
- /**
42
- * Where the line from a rectangle's center toward a point leaves the rectangle, plus a gap; the
43
- * center itself for a point, which has no size.
44
- */
45
- export function exitPoint(rect: Rect, toward: { x: number; y: number }): { x: number; y: number } {
46
- const cx = rect.x + rect.width / 2
47
- const cy = rect.y + rect.height / 2
48
- const dx = toward.x - cx
49
- const dy = toward.y - cy
50
- if ((dx === 0 && dy === 0) || rect.width <= 1) return { x: cx, y: cy }
51
- const scale = Math.min(
52
- dx === 0 ? Number.POSITIVE_INFINITY : rect.width / 2 / Math.abs(dx),
53
- dy === 0 ? Number.POSITIVE_INFINITY : rect.height / 2 / Math.abs(dy)
54
- )
55
- const length = Math.hypot(dx, dy)
56
- const reach = scale * length + GAP
57
- return { x: cx + (dx / length) * reach, y: cy + (dy / length) * reach }
58
- }
59
-
60
34
  /**
61
35
  * An arrow between two items, straight from the side of one that faces the other, its head drawn
62
36
  * in the theme's color, dashed when the canvas says so, and its label on the line, kept readable
@@ -65,12 +39,11 @@ export function exitPoint(rect: Rect, toward: { x: number; y: number }): { x: nu
65
39
  function FloatingArrow({ id, source, target, data, selected }: EdgeProps<CanvasFlowEdge>) {
66
40
  const from = useInternalNode(source)
67
41
  const to = useInternalNode(target)
68
- const scale = useNameScale()
42
+ const shown = useNamesShown()
69
43
  if (!from || !to) return null
70
44
  const a = rectOf(from)
71
45
  const b = rectOf(to)
72
- const start = exitPoint(a, { x: b.x + b.width / 2, y: b.y + b.height / 2 })
73
- const end = exitPoint(b, { x: a.x + a.width / 2, y: a.y + a.height / 2 })
46
+ const { start, end } = canvasArrowLine(a, b)
74
47
  const angle = Math.atan2(end.y - start.y, end.x - start.x)
75
48
  // The line stops where the head begins, so a thick line doesn't poke through its point.
76
49
  const stem = {
@@ -88,7 +61,7 @@ function FloatingArrow({ id, source, target, data, selected }: EdgeProps<CanvasF
88
61
  const room =
89
62
  (LABEL_SHARE * Math.hypot(end.x - start.x, end.y - start.y)) /
90
63
  ((data?.label?.length ?? 0) * 6.6 + 24)
91
- const labelScale = scale === null ? null : Math.min(scale, Math.max(1, room))
64
+ const labelScale = `min(${NAME_SCALE_VALUE}, ${Math.max(1, room)})`
92
65
  const color = selected
93
66
  ? "var(--primary)"
94
67
  : "color-mix(in oklab, var(--foreground) 62%, transparent)"
@@ -116,7 +89,7 @@ function FloatingArrow({ id, source, target, data, selected }: EdgeProps<CanvasF
116
89
  style={{ fill: color }}
117
90
  strokeLinejoin="round"
118
91
  />
119
- {data?.label && labelScale ? (
92
+ {data?.label && shown ? (
120
93
  <EdgeLabelRenderer>
121
94
  <span
122
95
  className="pointer-events-none absolute rounded-full border border-border bg-background px-2.5 py-0.5 text-[12px] font-medium whitespace-nowrap text-foreground shadow-sm"