@kortix/ui 0.14.11 → 0.14.13

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 (447) hide show
  1. package/README.md +1 -1
  2. package/dist/_vendor/kortix-shared.js +521 -7045
  3. package/dist/_vendor/shared/app-config.d.ts +8 -0
  4. package/dist/_vendor/shared/artifact-annotations.d.ts +708 -0
  5. package/dist/_vendor/shared/artifact-comments.d.ts +327 -0
  6. package/dist/_vendor/shared/index.d.ts +3 -1
  7. package/dist/_vendor/shared/my-kortix-agent.d.ts +40 -0
  8. package/dist/_vendor/shared/peer-message-prompt.d.ts +35 -0
  9. package/dist/_vendor/shared/pixel-mark.d.ts +11 -0
  10. package/dist/_vendor/shared/prompt-attachments.d.ts +1 -0
  11. package/dist/_vendor/shared/reminder-prompt.d.ts +8 -2
  12. package/dist/_vendor/shared/runtime-versions.d.ts +8 -0
  13. package/dist/artifacts/artifact-frame.d.ts +1 -0
  14. package/dist/artifacts/artifact-frame.js +18 -5
  15. package/dist/artifacts/frame-policy.d.ts +1 -1
  16. package/dist/artifacts/frame-policy.js +10 -5
  17. package/dist/browser/browser-panel.d.ts +2 -1
  18. package/dist/browser/browser-panel.js +12 -2
  19. package/dist/customize/agents/agent-access-text.d.ts +16 -0
  20. package/dist/customize/agents/agent-access-text.js +54 -0
  21. package/dist/customize/agents/agent-approval-rules.d.ts +8 -0
  22. package/dist/customize/agents/agent-approval-rules.js +26 -0
  23. package/dist/customize/agents/agent-authority-card.js +4 -1
  24. package/dist/customize/agents/agent-cover-card.d.ts +4 -1
  25. package/dist/customize/agents/agent-cover-card.js +2 -2
  26. package/dist/customize/agents/agent-detail-aside.d.ts +1 -2
  27. package/dist/customize/agents/agent-detail-aside.js +8 -11
  28. package/dist/customize/agents/agent-drives-section.d.ts +23 -7
  29. package/dist/customize/agents/agent-drives-section.js +107 -41
  30. package/dist/customize/agents/agent-instructions.d.ts +11 -0
  31. package/dist/customize/agents/agent-instructions.js +114 -0
  32. package/dist/customize/agents/agent-model-view.d.ts +17 -0
  33. package/dist/customize/agents/agent-model-view.js +67 -0
  34. package/dist/customize/agents/agent-overview.d.ts +53 -0
  35. package/dist/customize/agents/agent-overview.js +242 -0
  36. package/dist/customize/agents/agent-page-chrome.d.ts +128 -0
  37. package/dist/customize/agents/agent-page-chrome.js +145 -0
  38. package/dist/customize/agents/agent-page.d.ts +13 -1
  39. package/dist/customize/agents/agent-page.js +478 -367
  40. package/dist/customize/agents/agent-pin-button.d.ts +10 -0
  41. package/dist/customize/agents/agent-pin-button.js +20 -0
  42. package/dist/customize/agents/agent-policy-sets-section.d.ts +16 -0
  43. package/dist/customize/agents/agent-policy-sets-section.js +80 -0
  44. package/dist/customize/agents/agent-policy-sets.js +1 -1
  45. package/dist/customize/agents/agent-section-rail.d.ts +21 -0
  46. package/dist/customize/agents/agent-section-rail.js +23 -0
  47. package/dist/customize/agents/agent-share-control.d.ts +4 -3
  48. package/dist/customize/agents/agent-share-control.js +15 -16
  49. package/dist/customize/agents/{agent-people-section.d.ts → agent-share-dialog.d.ts} +3 -1
  50. package/dist/customize/agents/{agent-people-section.js → agent-share-dialog.js} +21 -21
  51. package/dist/customize/agents/agent-tabs.d.ts +95 -0
  52. package/dist/customize/agents/agent-tabs.js +199 -0
  53. package/dist/customize/agents/agents-page.d.ts +0 -21
  54. package/dist/customize/agents/agents-page.js +104 -118
  55. package/dist/customize/agents/connectors-required.d.ts +16 -0
  56. package/dist/customize/agents/connectors-required.js +19 -0
  57. package/dist/customize/agents/create-agent-modal.d.ts +19 -0
  58. package/dist/customize/agents/create-agent-modal.js +94 -0
  59. package/dist/customize/connectors/agent-access.d.ts +4 -4
  60. package/dist/customize/connectors/agent-access.js +7 -10
  61. package/dist/customize/connectors/connector-identity.d.ts +12 -0
  62. package/dist/customize/connectors/connector-identity.js +15 -2
  63. package/dist/customize/connectors/connector-routes.js +2 -2
  64. package/dist/customize/connectors/connectors-page.d.ts +14 -1
  65. package/dist/customize/connectors/connectors-page.js +101 -32
  66. package/dist/customize/connectors/detail/app-page.js +1 -1
  67. package/dist/customize/connectors/detail/connector-agents.js +0 -3
  68. package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
  69. package/dist/customize/connectors/detail/connector-page.js +5 -2
  70. package/dist/customize/connectors/detail/connector-policy-sets.js +1 -1
  71. package/dist/customize/connectors/detail/connector-triggers.js +2 -2
  72. package/dist/customize/connectors/use-agent-access.d.ts +7 -5
  73. package/dist/customize/connectors/use-agent-access.js +2 -6
  74. package/dist/customize/models/models-page.d.ts +7 -1
  75. package/dist/customize/models/models-page.js +2 -2
  76. package/dist/customize/project-settings/project-admin-sections.d.ts +63 -0
  77. package/dist/customize/project-settings/project-admin-sections.js +80 -0
  78. package/dist/customize/project-settings/project-settings-page.d.ts +1 -1
  79. package/dist/customize/project-settings/project-settings-page.js +4 -13
  80. package/dist/customize/project-settings/project-settings-sections.d.ts +5 -5
  81. package/dist/customize/project-settings/project-settings-sections.js +6 -20
  82. package/dist/customize/providers/provider-accordion.js +29 -17
  83. package/dist/customize/providers/provider-connect.js +1 -1
  84. package/dist/customize/providers/provider-sheet.d.ts +4 -1
  85. package/dist/customize/providers/provider-sheet.js +15 -5
  86. package/dist/customize/secrets/secrets-page.d.ts +5 -1
  87. package/dist/customize/secrets/secrets-page.js +2 -2
  88. package/dist/customize/sections/gateway-view.d.ts +10 -2
  89. package/dist/customize/sections/gateway-view.js +16 -4
  90. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +12 -5
  91. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +131 -8
  92. package/dist/customize/sections/llm-provider/claude-code-step.d.ts +10 -0
  93. package/dist/customize/sections/llm-provider/claude-code-step.js +32 -0
  94. package/dist/customize/sections/llm-provider/models-tab.js +5 -1
  95. package/dist/customize/sections/view/account-secret-resources-panel.d.ts +5 -3
  96. package/dist/customize/sections/view/account-secret-resources-panel.js +122 -19
  97. package/dist/customize/sections/view/agent-editor-access-fields.d.ts +1 -1
  98. package/dist/customize/sections/view/agent-editor-access-fields.js +8 -4
  99. package/dist/customize/sections/view/agent-editor-basics-fields.d.ts +4 -1
  100. package/dist/customize/sections/view/agent-editor-basics-fields.js +33 -4
  101. package/dist/customize/sections/view/agent-editor-catalog.d.ts +2 -2
  102. package/dist/customize/sections/view/agent-editor-catalog.js +10 -12
  103. package/dist/customize/sections/view/agent-editor-primitives.d.ts +1 -1
  104. package/dist/customize/sections/view/agent-editor-primitives.js +4 -4
  105. package/dist/customize/sections/view/agent-editor.d.ts +37 -26
  106. package/dist/customize/sections/view/agent-editor.js +19 -19
  107. package/dist/customize/sections/view/grant-mode-field.d.ts +8 -20
  108. package/dist/customize/sections/view/grant-mode-field.js +31 -57
  109. package/dist/customize/sections/view/permission-editor.d.ts +3 -1
  110. package/dist/customize/sections/view/permission-editor.js +19 -10
  111. package/dist/customize/sections/view/review-view.d.ts +8 -0
  112. package/dist/customize/sections/view/review-view.js +12 -1
  113. package/dist/customize/sections/view/secret-delivery.js +1 -4
  114. package/dist/customize/sections/view/secrets-view.d.ts +7 -1
  115. package/dist/customize/sections/view/secrets-view.js +42 -6
  116. package/dist/customize/settings/rail.js +2 -8
  117. package/dist/customize/settings/settings-tabs.d.ts +2 -2
  118. package/dist/customize/settings/settings-tabs.js +17 -19
  119. package/dist/customize/settings/tabs/experimental-tab.d.ts +3 -0
  120. package/dist/customize/settings/tabs/experimental-tab.js +6 -1
  121. package/dist/customize/settings/tabs/sandbox-tab.d.ts +4 -6
  122. package/dist/customize/settings/tabs/sandbox-tab.js +9 -9
  123. package/dist/customize/shared/access-list.d.ts +39 -0
  124. package/dist/customize/shared/access-list.js +62 -0
  125. package/dist/customize/shared/agent-resource-scope.d.ts +87 -0
  126. package/dist/customize/shared/agent-resource-scope.js +123 -0
  127. package/dist/customize/shared/capability-library.d.ts +41 -0
  128. package/dist/customize/shared/capability-library.js +271 -0
  129. package/dist/customize/shared/capability-page-shell.d.ts +18 -1
  130. package/dist/customize/shared/capability-page-shell.js +21 -1
  131. package/dist/customize/shared/catalog/catalog-space-tabs.d.ts +14 -0
  132. package/dist/customize/shared/catalog/catalog-space-tabs.js +20 -0
  133. package/dist/customize/shared/customize-tab-bar.d.ts +13 -0
  134. package/dist/customize/shared/customize-tab-bar.js +95 -0
  135. package/dist/customize/shared/entity/entity-modal.d.ts +17 -1
  136. package/dist/customize/shared/entity/entity-modal.js +10 -9
  137. package/dist/customize/shared/leave-guard.d.ts +23 -0
  138. package/dist/customize/shared/leave-guard.js +87 -0
  139. package/dist/customize/shared/standalone-settings-nav.js +4 -1
  140. package/dist/customize/shared/tool-rules.d.ts +11 -0
  141. package/dist/customize/shared/tool-rules.js +29 -0
  142. package/dist/customize/skills/builtin-skill-modal.d.ts +6 -0
  143. package/dist/customize/skills/builtin-skill-modal.js +41 -0
  144. package/dist/customize/skills/skills-page.d.ts +21 -18
  145. package/dist/customize/skills/skills-page.js +16 -110
  146. package/dist/customize/triggers/runtime-triggers.d.ts +17 -0
  147. package/dist/customize/triggers/runtime-triggers.js +57 -0
  148. package/dist/customize/triggers/schedule/event-trigger-copy.js +2 -2
  149. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  150. package/dist/customize/triggers/schedule/schedule-copy.d.ts +11 -6
  151. package/dist/customize/triggers/schedule/schedule-copy.js +29 -8
  152. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +7 -3
  153. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +26 -1
  154. package/dist/customize/triggers/schedule/trigger-composer-logic.js +64 -3
  155. package/dist/customize/triggers/schedule/trigger-composer.js +57 -20
  156. package/dist/customize/triggers/schedule/trigger-edit-logic.js +18 -5
  157. package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -0
  158. package/dist/customize/triggers/schedule/trigger-filter.js +16 -0
  159. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
  160. package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
  161. package/dist/customize/triggers/schedule/use-trigger-mutations.d.ts +1 -1
  162. package/dist/customize/triggers/schedule/use-trigger-mutations.js +1 -1
  163. package/dist/customize/triggers/schedule/when-app.d.ts +15 -0
  164. package/dist/customize/triggers/schedule/when-app.js +21 -0
  165. package/dist/customize/triggers/schedule/when-change-request.d.ts +10 -0
  166. package/dist/customize/triggers/schedule/when-change-request.js +15 -0
  167. package/dist/customize/triggers/schedule-view.d.ts +17 -3
  168. package/dist/customize/triggers/schedule-view.js +46 -16
  169. package/dist/customize/triggers/triggers-page.d.ts +3 -3
  170. package/dist/customize/triggers/triggers-page.js +2 -2
  171. package/dist/customize/use-configure-thread.d.ts +8 -2
  172. package/dist/customize/use-configure-thread.js +30 -18
  173. package/dist/files/project/components/change-request-detail-dialog.js +2 -3
  174. package/dist/files/project/components/drive-explorer.js +6 -5
  175. package/dist/files/project/explorer-source.d.ts +3 -0
  176. package/dist/files/project/upload-batch.d.ts +3 -3
  177. package/dist/files/project/upload-batch.js +7 -6
  178. package/dist/files/runtime/sandbox-explorer-source.js +3 -3
  179. package/dist/i18n/en.d.ts +1331 -53
  180. package/dist/i18n/en.js +1423 -145
  181. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +16 -7
  182. package/dist/internal/auth/auth-primitives.d.ts +1 -3
  183. package/dist/internal/auth/auth-primitives.js +2 -2
  184. package/dist/internal/billing/session-cost-format.d.ts +1 -0
  185. package/dist/internal/billing/session-cost-format.js +11 -0
  186. package/dist/internal/components/agent-mark.d.ts +12 -1
  187. package/dist/internal/components/agent-mark.js +34 -11
  188. package/dist/internal/components/nav-rail.d.ts +22 -0
  189. package/dist/internal/components/nav-rail.js +16 -0
  190. package/dist/internal/components/repository-disconnected.js +2 -2
  191. package/dist/internal/goals/goal-meta.d.ts +15 -1
  192. package/dist/internal/goals/goal-meta.js +42 -2
  193. package/dist/internal/hooks/projects/use-agent-config.d.ts +11 -7
  194. package/dist/internal/hooks/projects/use-agent-config.js +28 -11
  195. package/dist/internal/hooks/use-slash-focus.d.ts +7 -1
  196. package/dist/internal/hooks/use-slash-focus.js +9 -3
  197. package/dist/internal/layout/project-capability-nav.d.ts +24 -0
  198. package/dist/internal/layout/project-capability-nav.js +86 -0
  199. package/dist/internal/layout/project-page-header.d.ts +1 -1
  200. package/dist/internal/layout/project-page-header.js +1 -1
  201. package/dist/internal/layout/project-settings-nav.d.ts +3 -2
  202. package/dist/internal/layout/project-settings-nav.js +5 -3
  203. package/dist/internal/lib/browser-noise/rules/extensions.js +3 -0
  204. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  205. package/dist/internal/lib/capability-tab-routes.d.ts +34 -3
  206. package/dist/internal/lib/capability-tab-routes.js +76 -8
  207. package/dist/internal/lib/manifest-health.d.ts +10 -0
  208. package/dist/internal/lib/manifest-health.js +20 -0
  209. package/dist/internal/lib/pixel-mark.d.ts +4 -1
  210. package/dist/internal/lib/pixel-mark.js +33 -6
  211. package/dist/internal/lib/project-actions.d.ts +1 -1
  212. package/dist/internal/lib/project-actions.js +0 -4
  213. package/dist/internal/lib/provider-branding.js +2 -0
  214. package/dist/internal/lib/space-scope.d.ts +29 -0
  215. package/dist/internal/lib/space-scope.js +28 -0
  216. package/dist/internal/lib/use-project-feature-flags.js +3 -3
  217. package/dist/internal/lib/web-notifications.d.ts +74 -8
  218. package/dist/internal/lib/web-notifications.js +243 -117
  219. package/dist/internal/notifications/notification-rows.d.ts +14 -7
  220. package/dist/internal/notifications/notification-rows.js +21 -14
  221. package/dist/internal/notifications/session-toast-cards.d.ts +2 -2
  222. package/dist/internal/reminders/reminder-format.d.ts +6 -2
  223. package/dist/internal/reminders/reminder-format.js +7 -1
  224. package/dist/internal/stores/active-space-store.d.ts +35 -0
  225. package/dist/internal/stores/active-space-store.js +29 -0
  226. package/dist/internal/stores/kortix-computer-store.d.ts +2 -1
  227. package/dist/internal/stores/kortix-computer-store.js +18 -7
  228. package/dist/internal/stores/pinned-agents-store.d.ts +26 -0
  229. package/dist/internal/stores/pinned-agents-store.js +20 -0
  230. package/dist/internal/stores/session-panel-memory-store.js +3 -0
  231. package/dist/internal/stores/turn-attention-store.d.ts +5 -4
  232. package/dist/lib/routes.d.ts +16 -1
  233. package/dist/lib/routes.js +15 -3
  234. package/dist/markdown/doc-editor/doc-embed.d.ts +31 -0
  235. package/dist/markdown/doc-editor/doc-embed.js +168 -0
  236. package/dist/markdown/doc-editor/doc-extensions.d.ts +26 -0
  237. package/dist/markdown/doc-editor/doc-extensions.js +149 -0
  238. package/dist/markdown/doc-editor/doc-menus.d.ts +9 -0
  239. package/dist/markdown/doc-editor/doc-menus.js +56 -0
  240. package/dist/markdown/doc-editor/markdown.d.ts +12 -0
  241. package/dist/markdown/doc-editor/markdown.js +140 -0
  242. package/dist/markdown/genui/components/inline.d.ts +1 -1
  243. package/dist/primitives/badge.d.ts +1 -1
  244. package/dist/primitives/button.d.ts +1 -1
  245. package/dist/primitives/pixel-kortix-mark.d.ts +5 -4
  246. package/dist/primitives/pixel-kortix-mark.js +5 -15
  247. package/dist/primitives/tag.d.ts +1 -1
  248. package/dist/primitives/textarea.js +14 -0
  249. package/dist/primitives/toast.d.ts +2 -0
  250. package/dist/primitives/toast.js +4 -2
  251. package/dist/providers/ui-provider.d.ts +16 -0
  252. package/dist/session/actions/session-label.d.ts +1 -1
  253. package/dist/session/actions/session-label.js +3 -3
  254. package/dist/session/agents/agent-model.d.ts +92 -0
  255. package/dist/session/agents/agent-model.js +123 -0
  256. package/dist/session/agents/agent-state-mark.d.ts +10 -0
  257. package/dist/session/agents/agent-state-mark.js +22 -0
  258. package/dist/session/agents/agent-strip.d.ts +58 -0
  259. package/dist/session/agents/agent-strip.js +259 -0
  260. package/dist/session/agents/held-messages.d.ts +33 -0
  261. package/dist/session/agents/held-messages.js +50 -0
  262. package/dist/session/agents/legacy-subagent-chat.d.ts +11 -0
  263. package/dist/session/agents/legacy-subagent-chat.js +19 -0
  264. package/dist/session/agents/session-peek.d.ts +20 -0
  265. package/dist/session/agents/session-peek.js +67 -0
  266. package/dist/session/agents/session-prompt.d.ts +13 -0
  267. package/dist/session/agents/session-prompt.js +18 -0
  268. package/dist/session/agents/steer-session.d.ts +13 -0
  269. package/dist/session/agents/steer-session.js +29 -0
  270. package/dist/session/agents/subagent-dialog-content.d.ts +11 -0
  271. package/dist/session/agents/subagent-dialog-content.js +115 -0
  272. package/dist/session/agents/subagent-view.d.ts +8 -0
  273. package/dist/session/agents/subagent-view.js +18 -0
  274. package/dist/session/agents/tasks-panel.d.ts +13 -0
  275. package/dist/session/agents/tasks-panel.js +41 -0
  276. package/dist/session/agents/workflow-run-controls.d.ts +43 -0
  277. package/dist/session/agents/workflow-run-controls.js +141 -0
  278. package/dist/session/composer/ComposerCard.d.ts +1 -1
  279. package/dist/session/composer/ComposerCard.js +3 -3
  280. package/dist/session/composer/agent-selector.js +13 -19
  281. package/dist/session/composer/composer-underbar.d.ts +3 -1
  282. package/dist/session/composer/composer-underbar.js +2 -2
  283. package/dist/session/composer/composer.d.ts +5 -0
  284. package/dist/session/composer/composer.js +16 -10
  285. package/dist/session/composer/editor/composer-editor.js +19 -8
  286. package/dist/session/composer/editor/ultracode.d.ts +34 -0
  287. package/dist/session/composer/editor/ultracode.js +127 -0
  288. package/dist/session/composer/index.d.ts +1 -0
  289. package/dist/session/composer/index.js +1 -0
  290. package/dist/session/composer/send-blockers.d.ts +1 -11
  291. package/dist/session/composer/send-blockers.js +1 -11
  292. package/dist/session/composer/session-composer-readiness.d.ts +1 -28
  293. package/dist/session/composer/session-composer-readiness.js +5 -16
  294. package/dist/session/header/reminder-parts.d.ts +1 -1
  295. package/dist/session/header/session-site-header.js +6 -3
  296. package/dist/session/header/subagent-hover-card.d.ts +0 -2
  297. package/dist/session/header/subagent-hover-card.js +1 -4
  298. package/dist/session/models/claude-connection-slot.d.ts +11 -0
  299. package/dist/session/models/claude-connection-slot.js +30 -0
  300. package/dist/session/models/model-availability.d.ts +3 -1
  301. package/dist/session/models/model-availability.js +3 -0
  302. package/dist/session/models/model-selector.js +11 -12
  303. package/dist/session/models/model-tags.d.ts +9 -0
  304. package/dist/session/models/model-tags.js +8 -0
  305. package/dist/session/panel/easy/detail-view.js +7 -0
  306. package/dist/session/panel/easy/easy-panel.js +1 -1
  307. package/dist/session/panel/easy/step-icon.js +5 -1
  308. package/dist/session/panel/mobile-tool-drawer.js +7 -3
  309. package/dist/session/panel/open-session-quick-view.js +1 -1
  310. package/dist/session/panel/session-action-panel-column.js +1 -1
  311. package/dist/session/panel/session-desktop.js +41 -14
  312. package/dist/session/panel/session-panel-provider.d.ts +1 -1
  313. package/dist/session/panel/session-panel-provider.js +7 -11
  314. package/dist/session/prompts/question-prompt.js +3 -1
  315. package/dist/session/status/session-error-banner.js +4 -1
  316. package/dist/session/thread/session-chat.js +286 -296
  317. package/dist/session/thread/session-context-modal.js +29 -10
  318. package/dist/session/thread/session-context-spawned-sessions.d.ts +13 -0
  319. package/dist/session/thread/session-context-spawned-sessions.js +44 -0
  320. package/dist/session/thread/session-context-sub-sessions.js +3 -8
  321. package/dist/session/thread/transcript.d.ts +3 -0
  322. package/dist/session/thread/transcript.js +32 -8
  323. package/dist/session/tool/shared/full-view-action.d.ts +29 -0
  324. package/dist/session/tool/shared/full-view-action.js +43 -0
  325. package/dist/session/tool/tool-part-renderer.js +10 -2
  326. package/dist/session/tool/tools/agent-message-tool.js +2 -2
  327. package/dist/session/tool/tools/agent-spawn-tool.js +2 -2
  328. package/dist/session/tool/tools/agent-status-tool.js +2 -2
  329. package/dist/session/tool/tools/kortix-action-tool.d.ts +2 -0
  330. package/dist/session/tool/tools/kortix-action-tool.js +148 -0
  331. package/dist/session/tool/tools/kortix-tool-card.d.ts +83 -0
  332. package/dist/session/tool/tools/kortix-tool-card.js +186 -0
  333. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +11 -0
  334. package/dist/session/tool/tools/multi-agent-tool-bodies.js +141 -0
  335. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +63 -0
  336. package/dist/session/tool/tools/multi-agent-tool-data.js +118 -0
  337. package/dist/session/tool/tools/multi-agent-tools.d.ts +9 -0
  338. package/dist/session/tool/tools/multi-agent-tools.js +38 -0
  339. package/dist/session/tool/tools/question-tool.js +1 -1
  340. package/dist/session/tool/tools/register.d.ts +3 -0
  341. package/dist/session/tool/tools/register.js +3 -0
  342. package/dist/session/tool/tools/session-spawn-tool.js +2 -2
  343. package/dist/session/tool/tools/task-tool.d.ts +1 -1
  344. package/dist/session/tool/tools/task-tool.js +29 -41
  345. package/dist/session/tool/tools/workflow-progress.d.ts +34 -0
  346. package/dist/session/tool/tools/workflow-progress.js +186 -0
  347. package/dist/session/tool/tools/workflow-run.d.ts +128 -0
  348. package/dist/session/tool/tools/workflow-run.js +251 -0
  349. package/dist/session/tool/tools/workflow-tool.d.ts +9 -0
  350. package/dist/session/tool/tools/workflow-tool.js +253 -0
  351. package/dist/session/turn/notice-batch-group.d.ts +12 -0
  352. package/dist/session/turn/notice-batch-group.js +17 -0
  353. package/dist/session/turn/peer-message-row.d.ts +14 -0
  354. package/dist/session/turn/peer-message-row.js +57 -0
  355. package/dist/session/turn/subagent-notice-row.d.ts +4 -0
  356. package/dist/session/turn/subagent-notice-row.js +50 -0
  357. package/dist/session/turn/subagent-notice.d.ts +58 -0
  358. package/dist/session/turn/subagent-notice.js +111 -0
  359. package/dist/session/turn/user-message.d.ts +5 -4
  360. package/dist/session/turn/user-message.js +31 -10
  361. package/dist/styles/tokens.css +2 -0
  362. package/dist/styles.css +1 -1
  363. package/dist/terminal/session-terminal-connect-bar.js +1 -1
  364. package/dist/workspace/admin/project-admin-dashboard.d.ts +53 -0
  365. package/dist/workspace/admin/project-admin-dashboard.js +252 -0
  366. package/dist/workspace/admin/project-admin-nav.d.ts +20 -0
  367. package/dist/workspace/admin/project-admin-nav.js +41 -0
  368. package/dist/workspace/home/welcome-body.js +25 -3
  369. package/dist/workspace/index.d.ts +6 -2
  370. package/dist/workspace/index.js +12 -2
  371. package/dist/workspace/layout/new-session-create.js +3 -3
  372. package/dist/workspace/layout/project-home.js +3 -3
  373. package/dist/workspace/memory/memory-labels.js +5 -0
  374. package/dist/workspace/repository-disconnected.js +2 -2
  375. package/dist/workspace/sessions/board-dispatch.d.ts +52 -0
  376. package/dist/workspace/sessions/board-dispatch.js +110 -0
  377. package/dist/workspace/sessions/board-grouping.d.ts +63 -0
  378. package/dist/workspace/sessions/board-grouping.js +141 -0
  379. package/dist/workspace/sessions/board-peek.d.ts +15 -0
  380. package/dist/workspace/sessions/board-peek.js +54 -0
  381. package/dist/workspace/sessions/board-state-mark.d.ts +15 -0
  382. package/dist/workspace/sessions/board-state-mark.js +24 -0
  383. package/dist/workspace/sessions/project-sessions-view.js +42 -31
  384. package/dist/workspace/sessions/sessions-board.d.ts +12 -0
  385. package/dist/workspace/sessions/sessions-board.js +214 -0
  386. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +46 -0
  387. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +85 -0
  388. package/dist/workspace/sidebar/footer/sidebar-alert.js +1 -1
  389. package/dist/workspace/sidebar/new-agent-modal-provider.d.ts +12 -0
  390. package/dist/workspace/sidebar/new-agent-modal-provider.js +19 -0
  391. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  392. package/dist/workspace/sidebar/project-nav-items.js +53 -5
  393. package/dist/workspace/sidebar/project-session-list.js +35 -12
  394. package/dist/workspace/sidebar/project-sidebar.js +6 -3
  395. package/dist/workspace/sidebar/session-filter-menu.js +2 -1
  396. package/dist/workspace/space/space-blocks.d.ts +25 -0
  397. package/dist/workspace/space/space-blocks.js +124 -0
  398. package/dist/workspace/space/space-filter-tabs.d.ts +17 -0
  399. package/dist/workspace/space/space-filter-tabs.js +31 -0
  400. package/dist/workspace/space/space-page.d.ts +24 -0
  401. package/dist/workspace/space/space-page.js +157 -0
  402. package/dist/workspace/space/space-room.d.ts +20 -0
  403. package/dist/workspace/space/space-room.js +27 -0
  404. package/dist/workspace/space/space-tab-menu.d.ts +14 -0
  405. package/dist/workspace/space/space-tab-menu.js +127 -0
  406. package/dist/workspace/space/space-tab-panels.d.ts +9 -0
  407. package/dist/workspace/space/space-tab-panels.js +203 -0
  408. package/dist/workspace/space/space-templates.d.ts +34 -0
  409. package/dist/workspace/space/space-templates.js +71 -0
  410. package/dist/workspace/space/use-space-filter.d.ts +10 -0
  411. package/dist/workspace/space/use-space-filter.js +40 -0
  412. package/dist/workspace/space/use-space-manifest.d.ts +8 -0
  413. package/dist/workspace/space/use-space-manifest.js +27 -0
  414. package/dist/workspace/spaces/space-timeline.js +2 -2
  415. package/package.json +56 -53
  416. package/skills/kortix-ui/SKILL.md +1 -1
  417. package/skills/kortix-ui/references/custom-dashboard.md +10 -4
  418. package/skills/kortix-ui/references/modules.md +11 -9
  419. package/dist/_vendor/shared/meta-agent.d.ts +0 -7
  420. package/dist/customize/agents/agent-grant-pages.d.ts +0 -37
  421. package/dist/customize/agents/agent-grant-pages.js +0 -226
  422. package/dist/customize/agents/agent-triggers-section.d.ts +0 -17
  423. package/dist/customize/agents/agent-triggers-section.js +0 -109
  424. package/dist/customize/migrate-to-v2/index.d.ts +0 -5
  425. package/dist/customize/migrate-to-v2/index.js +0 -5
  426. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +0 -16
  427. package/dist/customize/migrate-to-v2/migration-prompt.js +0 -59
  428. package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +0 -30
  429. package/dist/customize/migrate-to-v2/upgrade-defs.js +0 -43
  430. package/dist/customize/migrate-to-v2/upgrade-view.d.ts +0 -32
  431. package/dist/customize/migrate-to-v2/upgrade-view.js +0 -152
  432. package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +0 -18
  433. package/dist/customize/migrate-to-v2/use-run-upgrade.js +0 -16
  434. package/dist/customize/shared/capability-tabs.d.ts +0 -3
  435. package/dist/customize/shared/capability-tabs.js +0 -137
  436. package/dist/customize/skills/skill-scope.d.ts +0 -14
  437. package/dist/customize/skills/skill-scope.js +0 -18
  438. package/dist/internal/lib/manifest-version.d.ts +0 -21
  439. package/dist/internal/lib/manifest-version.js +0 -55
  440. package/dist/session/composer/hooks/use-composer-escape-stop.d.ts +0 -6
  441. package/dist/session/composer/hooks/use-composer-escape-stop.js +0 -28
  442. package/dist/session/thread/sub-session-modal-content.d.ts +0 -8
  443. package/dist/session/thread/sub-session-modal-content.js +0 -23
  444. package/dist/session/thread/sub-session-modal.d.ts +0 -2
  445. package/dist/session/thread/sub-session-modal.js +0 -14
  446. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.d.ts +0 -13
  447. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +0 -48
@@ -0,0 +1,168 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from '../../primitives/button.js';
4
+ import { ButtonGroup } from '../../primitives/button-group.js';
5
+ import { FaviconAvatar } from '../../primitives/favicon-avatar.js';
6
+ import { Hint } from '../../primitives/hint.js';
7
+ import { faviconUrlForUrl } from '../../lib/favicon.js';
8
+ import { successToast } from '../../primitives/toast.js';
9
+ import { ArrowSquareOutIcon, LinkSimpleIcon, TextTIcon, TrashIcon } from '@phosphor-icons/react';
10
+ import { Node } from '@tiptap/core';
11
+ import { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react';
12
+ import { useState } from 'react';
13
+ import { useTranslations } from '../../i18n/index.js';
14
+ const SUMMARY_MAX = 220;
15
+ /** A link that can be a card: any http(s) address. */
16
+ export function canEmbed(href) {
17
+ return /^https?:\/\/[^\s]+$/i.test(href) && URL.canParse(href);
18
+ }
19
+ /** `fix-the-thing` → `Fix the thing`. */
20
+ function fromSlug(slug) {
21
+ const words = decodeURIComponent(slug).replace(/[-_]+/g, ' ').trim();
22
+ return words.charAt(0).toUpperCase() + words.slice(1);
23
+ }
24
+ /** A Linear page's id and name from its URL: its pages need a login, so they tell nothing more. */
25
+ function linearTitle(url) {
26
+ if (url.hostname !== 'linear.app')
27
+ return null;
28
+ const [, section, id, slug] = url.pathname.split('/').filter(Boolean);
29
+ if (section === 'issue' && id)
30
+ return [id.toUpperCase(), slug ? fromSlug(slug) : ''].filter(Boolean).join(' ');
31
+ // A project or document link ends in `<name>-<hash>`.
32
+ return id ? fromSlug(id.replace(/-[0-9a-f]{8,}$/i, '')) : 'Linear';
33
+ }
34
+ /** Strip complete HTML comments in one forward pass, including nested opening markers. */
35
+ function withoutComments(text) {
36
+ const chunks = [];
37
+ let cursor = 0;
38
+ for (;;) {
39
+ const start = text.indexOf('<!--', cursor);
40
+ if (start === -1)
41
+ break;
42
+ const end = text.indexOf('-->', start + 4);
43
+ if (end === -1)
44
+ break;
45
+ chunks.push(text.slice(cursor, start), ' ');
46
+ cursor = end + 3;
47
+ }
48
+ chunks.push(text.slice(cursor));
49
+ return chunks.join('');
50
+ }
51
+ /** One plain line from page text (Markdown or HTML removed), capped. */
52
+ export function plainSummary(text) {
53
+ if (!text)
54
+ return '';
55
+ const plain = withoutComments(text)
56
+ .replace(/```[\s\S]*?```/g, ' ')
57
+ .replace(/<[^<>]+>/g, ' ')
58
+ .replace(/!\[[^\]]*\]\([^)]*\)/g, ' ')
59
+ .replace(/\[([^\]]*)\]\([^)]*\)/g, '$1')
60
+ .replace(/^\s{0,3}(#{1,6}|>|[-*+]|\d+\.)\s+/gm, '')
61
+ .replace(/[*_`~]/g, '')
62
+ // Text a page escaped twice (GitHub's descriptions): shown as written, after tags are gone.
63
+ .replace(/&(lt|gt|quot|#39|apos|amp);/g, (_m, name) => ({ lt: '<', gt: '>', quot: '"', '#39': "'", apos: "'", amp: '&' })[name] ?? '')
64
+ .replace(/\s+/g, ' ')
65
+ .trim();
66
+ return plain.length > SUMMARY_MAX ? `${plain.slice(0, SUMMARY_MAX - 1).trimEnd()}…` : plain;
67
+ }
68
+ /** What the URL alone tells: the card when the page says nothing (a private page, Linear, a failed read). */
69
+ export function embedFromUrl(href) {
70
+ if (!canEmbed(href))
71
+ return null;
72
+ const url = new URL(href);
73
+ const title = linearTitle(url) ?? `${url.hostname}${url.pathname === '/' ? '' : url.pathname}`;
74
+ return { href, title, summary: '', image: '' };
75
+ }
76
+ /**
77
+ * The card for a link: the page's own title, description and image, read by
78
+ * the API (`read`: `getLinkPreview` for the doc's project). GitHub's title
79
+ * reads "… by author · Pull Request #12 · owner/repo". Linear is not read (its
80
+ * pages need a login); a page that cannot be read is the card the URL gives.
81
+ */
82
+ export async function fetchEmbed(href, read) {
83
+ const base = embedFromUrl(href);
84
+ if (!base || new URL(href).hostname === 'linear.app')
85
+ return base;
86
+ try {
87
+ const page = await read(href);
88
+ return { href, title: page.title ?? base.title, summary: plainSummary(page.description), image: page.image_url ?? '' };
89
+ }
90
+ catch {
91
+ return base;
92
+ }
93
+ }
94
+ const text = (el, cls) => el.querySelector(`.${cls}`)?.textContent?.trim() ?? '';
95
+ /** The card's markup: the same in the editor and in the stored HTML. */
96
+ function CardBody({ href, title, summary, image, onClick }) {
97
+ // An image that does not load (gone, blocked) leaves the card text only.
98
+ const [broken, setBroken] = useState(false);
99
+ return (_jsxs("a", { href: href, target: "_blank", rel: "noopener noreferrer", onClick: onClick, children: [_jsxs("span", { className: "kx-embed-text", children: [_jsx("span", { className: "kx-embed-title", children: title }), summary ? _jsx("span", { className: "kx-embed-summary", children: summary }) : null, _jsxs("span", { className: "kx-embed-url", children: [!image || broken ? _jsx(FaviconAvatar, { value: href, size: "2xs" }) : null, _jsx("span", { className: "kx-embed-href", children: href })] })] }), image && !broken ? _jsx("img", { className: "kx-embed-image", src: image, alt: "", referrerPolicy: "no-referrer", onError: () => setBroken(true) }) : null] }));
100
+ }
101
+ /**
102
+ * The card in the editor, with its actions on hover, in one button group:
103
+ * Open link, Convert to a plain link, Copy link, Delete. While editing, a click on the card selects
104
+ * it; Open link opens the page.
105
+ */
106
+ function LinkEmbedView({ node, editor, getPos, deleteNode }) {
107
+ const t = useTranslations('artifacts');
108
+ const meta = node.attrs;
109
+ const editable = editor.isEditable;
110
+ const convert = () => {
111
+ const at = getPos();
112
+ if (typeof at !== 'number')
113
+ return;
114
+ editor
115
+ .chain()
116
+ .focus()
117
+ .insertContentAt({ from: at, to: at + node.nodeSize }, { type: 'paragraph', content: [{ type: 'text', text: meta.href, marks: [{ type: 'link', attrs: { href: meta.href } }] }] })
118
+ .run();
119
+ };
120
+ const copy = async () => {
121
+ await navigator.clipboard.writeText(meta.href);
122
+ successToast(t('linkCopied'));
123
+ };
124
+ const action = (label, Icon, run) => (_jsx(Hint, { label: label, side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": label, onClick: run, children: _jsx(Icon, { className: "size-3.5" }) }) }));
125
+ return (_jsxs(NodeViewWrapper, { className: "kx-embed group/embed relative", children: [_jsx(CardBody, { ...meta, onClick: editable ? (e) => e.preventDefault() : undefined }), _jsx("div", { contentEditable: false, "data-embed-actions": "", className: "absolute top-2 right-2 opacity-0 transition-opacity group-focus-within/embed:opacity-100 group-hover/embed:opacity-100", children: _jsxs(ButtonGroup, { children: [action(t('embedOpen'), ArrowSquareOutIcon, () => window.open(meta.href, '_blank', 'noopener,noreferrer')), editable ? action(t('embedConvert'), TextTIcon, convert) : null, action(t('embedCopy'), LinkSimpleIcon, () => void copy()), editable ? action(t('embedDelete'), TrashIcon, deleteNode) : null] }) })] }));
126
+ }
127
+ /** The card in a doc: an atom block, `div.kx-embed` in the HTML and in the Markdown file. */
128
+ export const LinkEmbed = Node.create({
129
+ name: 'linkEmbed',
130
+ group: 'block',
131
+ atom: true,
132
+ draggable: true,
133
+ selectable: true,
134
+ addAttributes() {
135
+ return {
136
+ href: { default: '', rendered: false, parseHTML: (el) => el.querySelector('a')?.getAttribute('href') ?? '' },
137
+ title: { default: '', rendered: false, parseHTML: (el) => text(el, 'kx-embed-title') },
138
+ summary: { default: '', rendered: false, parseHTML: (el) => text(el, 'kx-embed-summary') },
139
+ image: { default: '', rendered: false, parseHTML: (el) => el.querySelector('img.kx-embed-image')?.getAttribute('src') ?? '' },
140
+ };
141
+ },
142
+ parseHTML() {
143
+ return [{ tag: 'div.kx-embed', priority: 60 }];
144
+ },
145
+ renderHTML({ node }) {
146
+ const { href, title, summary, image } = node.attrs;
147
+ const textParts = [['span', { class: 'kx-embed-title' }, title]];
148
+ if (summary)
149
+ textParts.push(['span', { class: 'kx-embed-summary' }, summary]);
150
+ const favicon = image ? null : faviconUrlForUrl(href);
151
+ textParts.push([
152
+ 'span',
153
+ { class: 'kx-embed-url' },
154
+ ...(favicon ? [['img', { class: 'kx-embed-favicon', src: favicon, alt: '', referrerpolicy: 'no-referrer' }]] : []),
155
+ ['span', { class: 'kx-embed-href' }, href],
156
+ ]);
157
+ const body = [['span', { class: 'kx-embed-text' }, ...textParts]];
158
+ if (image)
159
+ body.push(['img', { class: 'kx-embed-image', src: image, alt: '', referrerpolicy: 'no-referrer' }]);
160
+ return ['div', { class: 'kx-embed' }, ['a', { href, target: '_blank', rel: 'noopener noreferrer' }, ...body]];
161
+ },
162
+ addNodeView() {
163
+ // The editor leaves the action buttons to themselves (see DocCodeBlock).
164
+ return ReactNodeViewRenderer(LinkEmbedView, {
165
+ stopEvent: ({ event }) => !!event.target?.closest?.('[data-embed-actions]'),
166
+ });
167
+ },
168
+ });
@@ -0,0 +1,26 @@
1
+ import { Node, type Extensions } from '@tiptap/core';
2
+ /** An image in a doc (`![alt](src)` in the file). */
3
+ export declare const DocImage: Node<import("@tiptap/extension-image").ImageOptions, any>;
4
+ /** A video in a doc: `<video src controls>`, kept as HTML in the Markdown file. */
5
+ export declare const Video: Node<any, any>;
6
+ /**
7
+ * Code blocks; a ```mermaid block also shows its diagram under the source.
8
+ * The editor ignores events in the caption and the diagram: they belong to the
9
+ * language field, Copy and Edit. A doc's diagram has no fullscreen view.
10
+ */
11
+ export declare const DocCodeBlock: Node<import("@tiptap/extension-code-block").CodeBlockOptions, any>;
12
+ /**
13
+ * A line break in the Markdown source inside a paragraph. It reads as a space
14
+ * and saves as the newline it was (`markdown.ts`), so a hard-wrapped file
15
+ * keeps its lines. Backspace over it joins the words, like a space.
16
+ */
17
+ export declare const SoftBreak: Node<any, any>;
18
+ /** The document editor's extensions. `placeholder` names the empty line. */
19
+ export declare function docExtensions({ editable, placeholder, }: {
20
+ editable: boolean;
21
+ placeholder: (node: {
22
+ type: {
23
+ name: string;
24
+ };
25
+ }) => string;
26
+ }): Extensions;
@@ -0,0 +1,149 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The one Kortix document editor's schema: what a Markdown doc can hold when
5
+ * a person edits it in place. Doc artifacts and an agent's instructions use
6
+ * the same set, so a doc reads and edits the same everywhere. The look is
7
+ * `ARTIFACT_DOC_CSS` (`.kx-doc`); Markdown goes in and out through
8
+ * `markdown.ts`.
9
+ */
10
+ import { Code } from '@tiptap/extension-code';
11
+ import CodeBlock from '@tiptap/extension-code-block';
12
+ import Image from '@tiptap/extension-image';
13
+ import { TaskItem, TaskList } from '@tiptap/extension-list';
14
+ import { TableKit } from '@tiptap/extension-table';
15
+ import { Placeholder } from '@tiptap/extensions';
16
+ import { Node, mergeAttributes } from '@tiptap/core';
17
+ import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react';
18
+ import StarterKit from '@tiptap/starter-kit';
19
+ import { CheckIcon, PencilSimpleIcon } from '@phosphor-icons/react';
20
+ import { useState } from 'react';
21
+ import { useTranslations } from '../../i18n/index.js';
22
+ import { Button } from '../../primitives/button.js';
23
+ import Hint from '../../primitives/hint.js';
24
+ import { SessionDotMatrix } from '../../primitives/dot-matrix/session-dot-matrix.js';
25
+ import { MermaidRenderer } from '../../primitives/mermaid-renderer.js';
26
+ import { TextShimmer } from '../../primitives/text-shimmer.js';
27
+ import { CopyButton } from '../copy-button.js';
28
+ import { LinkEmbed } from './doc-embed.js';
29
+ /**
30
+ * `uploading`: a pasted or dropped file shown from a local URL while it
31
+ * uploads (`data-uploading`). Never saved: `htmlToMarkdown` drops it.
32
+ */
33
+ const uploadingAttribute = {
34
+ uploading: {
35
+ default: false,
36
+ parseHTML: (el) => el.hasAttribute('data-uploading'),
37
+ renderHTML: (attrs) => (attrs.uploading ? { 'data-uploading': '' } : {}),
38
+ },
39
+ };
40
+ /** An image or video in the editor, with an "Uploading…" chip while its file uploads. */
41
+ function MediaView({ node }) {
42
+ const t = useTranslations('artifacts');
43
+ const { src, alt, title, uploading } = node.attrs;
44
+ return (_jsxs(NodeViewWrapper, { className: "kx-media", "data-uploading": uploading || undefined, "data-drag-handle": "", children: [node.type.name === 'video' ? (_jsx("video", { src: src, controls: true, preload: "metadata" })) : (
45
+ // eslint-disable-next-line @next/next/no-img-element -- a doc's own media, any origin
46
+ _jsx("img", { src: src, alt: alt ?? '', title: title })), uploading ? (_jsxs("span", { contentEditable: false, className: "bg-popover text-foreground absolute bottom-3 left-3 flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium shadow-sm", children: [_jsx(SessionDotMatrix, { sessionId: src, size: 14, className: "shrink-0" }), _jsx(TextShimmer, { duration: 1, spread: 2, className: "text-xs", children: t('uploading') })] })) : null] }));
47
+ }
48
+ /** An image in a doc (`![alt](src)` in the file). */
49
+ export const DocImage = Image.extend({
50
+ draggable: true,
51
+ addAttributes() {
52
+ return { ...this.parent?.(), ...uploadingAttribute };
53
+ },
54
+ addNodeView() {
55
+ return ReactNodeViewRenderer(MediaView);
56
+ },
57
+ });
58
+ /** A video in a doc: `<video src controls>`, kept as HTML in the Markdown file. */
59
+ export const Video = Node.create({
60
+ name: 'video',
61
+ group: 'block',
62
+ atom: true,
63
+ draggable: true,
64
+ addAttributes() {
65
+ return { src: { default: null }, ...uploadingAttribute };
66
+ },
67
+ addNodeView() {
68
+ return ReactNodeViewRenderer(MediaView);
69
+ },
70
+ parseHTML() {
71
+ return [{ tag: 'video[src]' }];
72
+ },
73
+ renderHTML({ HTMLAttributes }) {
74
+ return ['video', mergeAttributes(HTMLAttributes, { controls: 'true', preload: 'metadata' })];
75
+ },
76
+ });
77
+ /** The code-fence language id of a block that names none: a Markdown token, not UI copy. */
78
+ const PLAIN_LANGUAGE = 'text';
79
+ function CodeBlockView({ node, editor, updateAttributes }) {
80
+ const t = useTranslations('artifacts');
81
+ const [editing, setEditing] = useState(false);
82
+ const source = node.textContent.trim();
83
+ const language = node.attrs.language ?? '';
84
+ const diagram = language === 'mermaid' && source;
85
+ // A diagram shows as a picture; its source opens only for someone editing it.
86
+ const showSource = !diagram || editing;
87
+ return (_jsxs(NodeViewWrapper, { as: "div", children: [_jsxs("figure", { className: "kx-code", hidden: !showSource, children: [_jsxs("figcaption", { contentEditable: false, children: [editor.isEditable ? (_jsx("input", { "aria-label": t('codeLanguage'), placeholder: PLAIN_LANGUAGE, value: language, onChange: (e) => updateAttributes({ language: e.target.value.trim().toLowerCase() || null }) })) : (_jsx("span", { children: language || PLAIN_LANGUAGE })), source ? _jsx(CopyButton, { code: node.textContent }) : null] }), _jsx("pre", { children: _jsx(NodeViewContent, { as: "code" }) })] }), diagram ? (_jsx("div", { contentEditable: false, className: "kx-diagram", children: _jsx(MermaidRenderer, { chart: source, enableFullscreen: false, actions: editor.isEditable ? (_jsx(Hint, { label: editing ? t('diagramDone') : t('diagramEdit'), side: "top", children: _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": editing ? t('diagramDone') : t('diagramEdit'), "aria-pressed": editing, onClick: () => setEditing((v) => !v), children: editing ? _jsx(CheckIcon, { className: "size-3.5" }) : _jsx(PencilSimpleIcon, { className: "size-3.5" }) }) })) : null }) })) : null] }));
88
+ }
89
+ /**
90
+ * Code blocks; a ```mermaid block also shows its diagram under the source.
91
+ * The editor ignores events in the caption and the diagram: they belong to the
92
+ * language field, Copy and Edit. A doc's diagram has no fullscreen view.
93
+ */
94
+ export const DocCodeBlock = CodeBlock.extend({
95
+ addNodeView() {
96
+ // The element a DOM node or event target is, or sits in (a text node's parent).
97
+ const elementOf = (target) => target instanceof Element ? target : (target?.parentElement ?? null);
98
+ const controls = (target) => !!elementOf(target)?.closest('.kx-diagram, .kx-code > figcaption');
99
+ return ReactNodeViewRenderer(CodeBlockView, {
100
+ stopEvent: ({ event }) => controls(event.target),
101
+ });
102
+ },
103
+ });
104
+ /**
105
+ * A line break in the Markdown source inside a paragraph. It reads as a space
106
+ * and saves as the newline it was (`markdown.ts`), so a hard-wrapped file
107
+ * keeps its lines. Backspace over it joins the words, like a space.
108
+ */
109
+ export const SoftBreak = Node.create({
110
+ name: 'softBreak',
111
+ group: 'inline',
112
+ inline: true,
113
+ selectable: false,
114
+ parseHTML() {
115
+ return [{ tag: 'span[data-soft-break]' }];
116
+ },
117
+ renderHTML() {
118
+ return ['span', { 'data-soft-break': '' }, ' '];
119
+ },
120
+ renderText() {
121
+ return ' ';
122
+ },
123
+ });
124
+ /**
125
+ * Inline code that may sit inside bold or a link: StarterKit's code mark
126
+ * excludes every other mark, which would drop the bold from
127
+ * "**`view` before a task**" on the first save.
128
+ */
129
+ const DocCode = Code.extend({ excludes: '' });
130
+ /** The document editor's extensions. `placeholder` names the empty line. */
131
+ export function docExtensions({ editable, placeholder, }) {
132
+ return [
133
+ StarterKit.configure({
134
+ code: false,
135
+ codeBlock: false,
136
+ link: { openOnClick: !editable, autolink: true, defaultProtocol: 'https' },
137
+ }),
138
+ DocCode,
139
+ DocCodeBlock,
140
+ SoftBreak,
141
+ TableKit.configure({ table: { resizable: false } }),
142
+ DocImage,
143
+ Video,
144
+ TaskList,
145
+ TaskItem.configure({ nested: true }),
146
+ LinkEmbed,
147
+ Placeholder.configure({ placeholder: ({ node }) => placeholder(node) }),
148
+ ];
149
+ }
@@ -0,0 +1,9 @@
1
+ import { type Editor } from '@tiptap/react';
2
+ export declare function DocMenus({ editor, blockMenu, editable, canComment, commenting, onComment, }: {
3
+ editor: Editor;
4
+ blockMenu?: boolean;
5
+ editable?: boolean;
6
+ canComment?: boolean;
7
+ commenting?: boolean;
8
+ onComment?: () => void;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The document editor's two menus: one over selected text (marks, headings,
5
+ * quote, table rows) and a `+` menu on an empty line (blocks). Markdown
6
+ * shortcuts (`# `, `- `, `1. `, `[ ] `, `> `, ``` ```) work without them.
7
+ * `blockMenu={false}` drops the `+` menu, for an editor with a `/` block menu.
8
+ * `canComment` adds a Comment button over selected text; with `editable={false}`
9
+ * it is the only button.
10
+ */
11
+ import { ChatCircleIcon, CheckSquareIcon, CodeBlockIcon, CodeIcon, LinkSimpleIcon, ListBulletsIcon, ListNumbersIcon, MinusIcon, PlusIcon, QuotesIcon, TableIcon, TextBIcon, TextHOneIcon, TextHThreeIcon, TextHTwoIcon, TextItalicIcon, TextStrikethroughIcon, TrashIcon, } from '@phosphor-icons/react';
12
+ import { TextSelection } from '@tiptap/pm/state';
13
+ import { useEditorState } from '@tiptap/react';
14
+ import { BubbleMenu, FloatingMenu } from '@tiptap/react/menus';
15
+ import { useTranslations } from '../../i18n/index.js';
16
+ import { Button } from '../../primitives/button.js';
17
+ import Hint from '../../primitives/hint.js';
18
+ function MenuButton({ icon: IconCmp, label, active, onClick, disabled, }) {
19
+ return (_jsx(Hint, { label: label, side: "top", sideOffset: 6, children: _jsx(Button, { type: "button", size: "icon-sm", variant: "ghost", "aria-label": label, "aria-pressed": active, "aria-busy": disabled || undefined, disabled: disabled, onMouseDown: (e) => e.preventDefault(), onClick: onClick, className: "data-[active=true]:bg-active data-[active=true]:text-foreground text-muted-foreground", "data-active": active || undefined, children: _jsx(IconCmp, { className: "size-4" }) }) }));
20
+ }
21
+ const MENU = 'bg-popover text-popover-foreground flex items-center gap-0.5 rounded-lg border p-1 shadow-md';
22
+ export function DocMenus({ editor, blockMenu = true, editable = true, canComment = false, commenting = false, onComment, }) {
23
+ const t = useTranslations('artifacts');
24
+ const state = useEditorState({
25
+ editor,
26
+ selector: ({ editor: e }) => ({
27
+ bold: e.isActive('bold'),
28
+ italic: e.isActive('italic'),
29
+ strike: e.isActive('strike'),
30
+ code: e.isActive('code'),
31
+ link: e.isActive('link'),
32
+ h1: e.isActive('heading', { level: 1 }),
33
+ h2: e.isActive('heading', { level: 2 }),
34
+ h3: e.isActive('heading', { level: 3 }),
35
+ quote: e.isActive('blockquote'),
36
+ table: e.isActive('table'),
37
+ }),
38
+ });
39
+ const chain = () => editor.chain().focus();
40
+ const setLink = () => {
41
+ const previous = editor.getAttributes('link').href;
42
+ const url = window.prompt(t('linkPrompt'), previous ?? 'https://');
43
+ if (url === null)
44
+ return;
45
+ if (url.trim() === '')
46
+ chain().extendMarkRange('link').unsetLink().run();
47
+ else
48
+ chain().extendMarkRange('link').setLink({ href: url.trim() }).run();
49
+ };
50
+ return (_jsxs(_Fragment, { children: [_jsx(BubbleMenu, { editor: editor, options: { placement: 'top' }, shouldShow: ({ editor: e, state: s, from, to }) => (editable || canComment) &&
51
+ s.selection instanceof TextSelection &&
52
+ from !== to &&
53
+ !!s.doc.textBetween(from, to).trim() &&
54
+ !e.isActive('image') &&
55
+ !e.isActive('video'), children: _jsxs("div", { className: MENU, children: [editable ? (_jsxs(_Fragment, { children: [_jsx(MenuButton, { icon: TextBIcon, label: t('bold'), active: state.bold, onClick: () => chain().toggleBold().run() }), _jsx(MenuButton, { icon: TextItalicIcon, label: t('italic'), active: state.italic, onClick: () => chain().toggleItalic().run() }), _jsx(MenuButton, { icon: TextStrikethroughIcon, label: t('strike'), active: state.strike, onClick: () => chain().toggleStrike().run() }), _jsx(MenuButton, { icon: CodeIcon, label: t('inlineCode'), active: state.code, onClick: () => chain().toggleCode().run() }), _jsx(MenuButton, { icon: LinkSimpleIcon, label: t('link'), active: state.link, onClick: setLink }), _jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }), _jsx(MenuButton, { icon: TextHOneIcon, label: t('heading1'), active: state.h1, onClick: () => chain().toggleHeading({ level: 1 }).run() }), _jsx(MenuButton, { icon: TextHTwoIcon, label: t('heading2'), active: state.h2, onClick: () => chain().toggleHeading({ level: 2 }).run() }), _jsx(MenuButton, { icon: TextHThreeIcon, label: t('heading3'), active: state.h3, onClick: () => chain().toggleHeading({ level: 3 }).run() }), _jsx(MenuButton, { icon: QuotesIcon, label: t('quote'), active: state.quote, onClick: () => chain().toggleBlockquote().run() }), state.table ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }), _jsx(MenuButton, { icon: PlusIcon, label: t('addRow'), onClick: () => chain().addRowAfter().run() }), _jsx(MenuButton, { icon: ListBulletsIcon, label: t('addColumn'), onClick: () => chain().addColumnAfter().run() }), _jsx(MenuButton, { icon: MinusIcon, label: t('deleteRow'), onClick: () => chain().deleteRow().run() }), _jsx(MenuButton, { icon: TrashIcon, label: t('deleteTable'), onClick: () => chain().deleteTable().run() })] })) : null] })) : null, canComment && onComment ? (_jsxs(_Fragment, { children: [editable ? _jsx("span", { className: "bg-border mx-0.5 h-5 w-px" }) : null, _jsx(MenuButton, { icon: ChatCircleIcon, label: t('discussion.commentSelection'), onClick: onComment, disabled: commenting })] })) : null] }) }), editable && blockMenu ? (_jsx(FloatingMenu, { editor: editor, options: { placement: 'bottom-start', offset: 6 }, children: _jsxs("div", { className: MENU, children: [_jsx(MenuButton, { icon: TextHOneIcon, label: t('heading1'), onClick: () => chain().setHeading({ level: 1 }).run() }), _jsx(MenuButton, { icon: TextHTwoIcon, label: t('heading2'), onClick: () => chain().setHeading({ level: 2 }).run() }), _jsx(MenuButton, { icon: TextHThreeIcon, label: t('heading3'), onClick: () => chain().setHeading({ level: 3 }).run() }), _jsx(MenuButton, { icon: ListBulletsIcon, label: t('bulletList'), onClick: () => chain().toggleBulletList().run() }), _jsx(MenuButton, { icon: ListNumbersIcon, label: t('numberedList'), onClick: () => chain().toggleOrderedList().run() }), _jsx(MenuButton, { icon: CheckSquareIcon, label: t('taskList'), onClick: () => chain().toggleTaskList().run() }), _jsx(MenuButton, { icon: QuotesIcon, label: t('quote'), onClick: () => chain().toggleBlockquote().run() }), _jsx(MenuButton, { icon: CodeBlockIcon, label: t('codeBlock'), onClick: () => chain().toggleCodeBlock().run() }), _jsx(MenuButton, { icon: TableIcon, label: t('table'), onClick: () => chain().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run() }), _jsx(MenuButton, { icon: MinusIcon, label: t('divider'), onClick: () => chain().setHorizontalRule().run() })] }) })) : null] }));
56
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The document editor holds Markdown files (a doc artifact, an agent's
3
+ * instructions). The editor works in HTML, so a doc goes Markdown → HTML on
4
+ * load and HTML → Markdown on save. GFM tables, strikethrough and task lists
5
+ * survive the round trip, and so do the file's own line breaks: a source
6
+ * line break inside a paragraph (a soft break) becomes
7
+ * `<span data-soft-break>`, which reads as a space and saves as a newline.
8
+ * A file wrapped at 72 columns stays wrapped, so a one-word edit is a
9
+ * one-line diff.
10
+ */
11
+ export declare function markdownToHtml(markdown: string): string;
12
+ export declare function htmlToMarkdown(html: string): string;
@@ -0,0 +1,140 @@
1
+ import { Marked } from 'marked';
2
+ import TurndownService from 'turndown';
3
+ import { strikethrough, tables } from 'turndown-plugin-gfm';
4
+ const escapeHtml = (text) => text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
5
+ /**
6
+ * Raw HTML in the Markdown shows as the text it is (`<package>` in a
7
+ * sentence), so the editor keeps it and saves it back. The editor has no
8
+ * node for an unknown tag and would drop it. A `<video>` and a link card
9
+ * (`<div class="kx-embed">`, doc-embed.tsx) are the tags a doc holds as HTML.
10
+ */
11
+ const DOC_HTML = /^(<\/?video\b|<div class="kx-embed">)/i;
12
+ const parser = new Marked({
13
+ renderer: {
14
+ html: ({ text }) => (DOC_HTML.test(text.trim()) ? text : escapeHtml(text)),
15
+ },
16
+ });
17
+ /**
18
+ * The document editor holds Markdown files (a doc artifact, an agent's
19
+ * instructions). The editor works in HTML, so a doc goes Markdown → HTML on
20
+ * load and HTML → Markdown on save. GFM tables, strikethrough and task lists
21
+ * survive the round trip, and so do the file's own line breaks: a source
22
+ * line break inside a paragraph (a soft break) becomes
23
+ * `<span data-soft-break>`, which reads as a space and saves as a newline.
24
+ * A file wrapped at 72 columns stays wrapped, so a one-word edit is a
25
+ * one-line diff.
26
+ */
27
+ export function markdownToHtml(markdown) {
28
+ const html = parser.parse(markdown, { gfm: true, async: false })
29
+ // marked's task items → the editor's (`li[data-type=taskItem]`).
30
+ // A loose list (blank lines between items) puts the box inside a <p>: keep the <p> as the item's text.
31
+ .replace(/<li>(<p>)?<input (checked="" )?disabled="" type="checkbox">\s*/g, (_m, p, checked) => `<li data-type="taskItem" data-checked="${checked ? 'true' : 'false'}">${p ?? ''}`)
32
+ .replace(/<ul>(\s*<li data-type="taskItem")/g, '<ul data-type="taskList">$1')
33
+ // marked keeps a fence's last newline; the editor would show it as an empty line.
34
+ .replace(/\n<\/code><\/pre>/g, '</code></pre>');
35
+ return markSoftBreaks(html);
36
+ }
37
+ const TEXT_BLOCK = 'p, li, h1, h2, h3, h4, h5, h6, td, th';
38
+ const BLOCK_TAGS = new Set(['UL', 'OL', 'P', 'PRE', 'BLOCKQUOTE', 'TABLE', 'DIV', 'HR', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']);
39
+ const CONTAINER_TAGS = new Set([...BLOCK_TAGS, 'LI', 'THEAD', 'TBODY', 'TR']);
40
+ /** Each newline inside a text block's text → `<span data-soft-break> </span>`. */
41
+ function markSoftBreaks(html) {
42
+ const doc = new DOMParser().parseFromString(html, 'text/html');
43
+ const walker = doc.createTreeWalker(doc.body, 4 /* NodeFilter.SHOW_TEXT */);
44
+ const texts = [];
45
+ for (let node = walker.nextNode(); node; node = walker.nextNode())
46
+ texts.push(node);
47
+ for (const text of texts) {
48
+ const parent = text.parentElement;
49
+ if (!parent || !text.data.includes('\n') || parent.closest('pre, code'))
50
+ continue;
51
+ const block = parent.closest(TEXT_BLOCK);
52
+ // Only text that flows in the block: not the newlines between a nested list's items.
53
+ if (!block || (parent !== block && CONTAINER_TAGS.has(parent.nodeName)))
54
+ continue;
55
+ // A newline beside a block edge (before a nested list, at the item's end) is layout, not a break.
56
+ const edge = (sibling) => (sibling ? BLOCK_TAGS.has(sibling.nodeName) : parent === block);
57
+ let data = text.data;
58
+ if (edge(text.nextSibling))
59
+ data = data.replace(/\n+$/, '');
60
+ if (edge(text.previousSibling))
61
+ data = data.replace(/^\n+/, '');
62
+ const pieces = [];
63
+ data.split('\n').forEach((part, i) => {
64
+ if (i > 0) {
65
+ const soft = doc.createElement('span');
66
+ soft.setAttribute('data-soft-break', '');
67
+ soft.textContent = ' ';
68
+ pieces.push(soft);
69
+ }
70
+ if (part)
71
+ pieces.push(doc.createTextNode(part));
72
+ });
73
+ text.replaceWith(...pieces);
74
+ }
75
+ return doc.body.innerHTML;
76
+ }
77
+ let service = null;
78
+ function turndown() {
79
+ if (service)
80
+ return service;
81
+ const td = new TurndownService({
82
+ headingStyle: 'atx',
83
+ bulletListMarker: '-',
84
+ codeBlockStyle: 'fenced',
85
+ emDelimiter: '*',
86
+ // A soft break holds only a space, so turndown sees it as blank: it saves as the newline it was.
87
+ blankReplacement: (_content, node) => node.nodeName === 'SPAN' && node.hasAttribute('data-soft-break')
88
+ ? '\n'
89
+ : node.isBlock
90
+ ? '\n\n'
91
+ : '',
92
+ });
93
+ tables(td);
94
+ strikethrough(td);
95
+ td.addRule('taskItem', {
96
+ filter: (node) => node.nodeName === 'LI' && node.getAttribute('data-type') === 'taskItem',
97
+ replacement: (content, node) => `- [${node.getAttribute('data-checked') === 'true' ? 'x' : ' '}] ${content.trim().replace(/\n+/g, ' ')}\n`,
98
+ });
99
+ // Tight items (`- a`, `1. a`), nested lines indented to the marker's width.
100
+ // Added after taskItem, so it would win (turndown tries later rules first): skip task items.
101
+ td.addRule('listItem', {
102
+ filter: (node) => node.nodeName === 'LI' && node.getAttribute('data-type') !== 'taskItem',
103
+ replacement: (content, node) => {
104
+ const parent = node.parentNode;
105
+ const index = parent ? Array.prototype.indexOf.call(parent.children, node) : 0;
106
+ const start = Number(parent?.getAttribute('start') ?? 1);
107
+ const prefix = parent?.nodeName === 'OL' ? `${start + index}. ` : '- ';
108
+ const body = content.replace(/^\n+/, '').replace(/\n+$/, '').replace(/\n/g, `\n${' '.repeat(prefix.length)}`);
109
+ return `${prefix}${body}\n`;
110
+ },
111
+ });
112
+ // An underscore inside a word (`feature_disabled`) never starts emphasis: keep it bare.
113
+ const escape = td.escape.bind(td);
114
+ td.escape = (text) => escape(text).replace(/(\w)\\_(?=\w)/g, '$1_');
115
+ td.remove(['label']);
116
+ // A video stays an HTML tag inside the Markdown: Markdown has none.
117
+ td.keep(['video']);
118
+ // A link card stays one line of HTML (doc-embed.tsx): a Markdown HTML block, served as written.
119
+ td.addRule('linkEmbed', {
120
+ filter: (node) => node.nodeName === 'DIV' && node.classList.contains('kx-embed'),
121
+ replacement: (_content, node) => `\n\n${node.outerHTML.replace(/\s*\n\s*/g, ' ')}\n\n`,
122
+ });
123
+ service = td;
124
+ return td;
125
+ }
126
+ export function htmlToMarkdown(html) {
127
+ const doc = new DOMParser().parseFromString(html, 'text/html');
128
+ // A table cell holds one line in Markdown: unwrap the editor's paragraphs.
129
+ doc.querySelectorAll('td > p, th > p').forEach((p) => p.replaceWith(...Array.from(p.childNodes)));
130
+ // A list item with one paragraph is one line: unwrap it, so the list stays tight.
131
+ doc.querySelectorAll('li > p:only-of-type').forEach((p) => p.replaceWith(...Array.from(p.childNodes)));
132
+ doc.querySelectorAll('colgroup').forEach((c) => c.remove());
133
+ // Media still uploading is a local preview: the file gets it once the upload lands.
134
+ doc.querySelectorAll('[data-uploading]').forEach((el) => el.remove());
135
+ // Empty, so turndown adds no flanking space: the soft break saves as a bare newline.
136
+ doc.querySelectorAll('span[data-soft-break]').forEach((s) => {
137
+ s.textContent = '';
138
+ });
139
+ return `${turndown().turndown(doc.body.innerHTML).trim()}\n`;
140
+ }
@@ -12,6 +12,6 @@ export declare const genuiBadgeClass: (tone: BadgeTone) => string;
12
12
  export declare function GenuiBadge({ props }: GenuiComponentProps): import("react").JSX.Element;
13
13
  export declare function GenuiCallout({ props }: GenuiComponentProps): import("react").JSX.Element;
14
14
  /** Set inside an image gallery (layout.tsx): the tile sizes the image, which covers it. A `tile` shows its caption on hover. */
15
- export declare const GenuiImageGridContext: import("react").Context<false | "tile" | "lead">;
15
+ export declare const GenuiImageGridContext: import("react").Context<false | "lead" | "tile">;
16
16
  export declare function GenuiImage({ props }: GenuiComponentProps): import("react").JSX.Element;
17
17
  export declare function GenuiLink({ props }: GenuiComponentProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "destructive" | "update" | "new" | "muted" | "transparent" | "solid" | "badgeSuccess" | "highlight" | "royal" | null | undefined;
4
+ variant?: "outline" | "accent" | "secondary" | "success" | "warning" | "info" | "beta" | "default" | "kortix" | "new" | "destructive" | "update" | "muted" | "transparent" | "solid" | "badgeSuccess" | "highlight" | "royal" | null | undefined;
5
5
  size?: "default" | "xs" | "sm" | "tabular" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare function Badge({ className, variant, size, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "input" | "text" | "popover" | "background" | "outline" | "accent" | "error" | "secondary" | "success" | "warning" | "info" | "default" | "destructive" | "muted" | "danger" | "blue" | "transparent" | "brand" | "blue-ghost" | "blue-secondary" | "outline-ghost" | "secondary-outline" | "sidebar" | "ghost" | "foreground" | "outline-foreground" | "inverse" | "invert-outline-foreground" | "ghost-input" | "ghost-sidebar" | "outline-sidebar" | null | undefined;
4
+ variant?: "link" | "input" | "text" | "popover" | "background" | "outline" | "accent" | "error" | "secondary" | "success" | "warning" | "info" | "default" | "destructive" | "blue" | "muted" | "danger" | "transparent" | "brand" | "blue-ghost" | "blue-secondary" | "outline-ghost" | "secondary-outline" | "sidebar" | "ghost" | "foreground" | "outline-foreground" | "inverse" | "invert-outline-foreground" | "ghost-input" | "ghost-sidebar" | "outline-sidebar" | null | undefined;
5
5
  size?: "base" | "default" | "icon" | "toolbar" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-base" | "icon-md" | "icon-lg" | "magic-sm" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -1,10 +1,11 @@
1
+ import { PIXEL_KORTIX_ROWS } from '../_vendor/shared/pixel-mark.js';
1
2
  import { type ComponentPropsWithoutRef } from 'react';
2
3
  /**
3
- * The Kortix symbol (`kortix-logo.tsx`, `variant="icon"`) sampled onto a
4
- * 12 × 10 grid. `#` is a cell the symbol fully covers; `+` is a cell on a curve
5
- * that it only partly covers, drawn as a checker so the curves read as dither.
4
+ * The Kortix symbol on a 12 × 10 grid: `#` a full cell, `+` a curve cell drawn
5
+ * as a checker. The rows live in `@kortix/shared/pixel-mark` so the TUI splash
6
+ * draws the same symbol; this module re-exports them under the same name.
6
7
  */
7
- export declare const PIXEL_KORTIX_ROWS: readonly ["## ## ##", "## ## ##", "+#+ ## +#+", " ##+ ## +## ", " ######## ", " ######## ", " ##+ ## +## ", "+#+ ## +#+", "## ## ##", "## ## ##"];
8
+ export { PIXEL_KORTIX_ROWS };
8
9
  /**
9
10
  * Decorative pixel art of the Kortix symbol, for empty states. It paints in
10
11
  * `currentColor`, so the caller sets the tone. It is always `aria-hidden`: the