@agent-native/core 0.109.3 → 0.109.4

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 (249) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +8 -0
  3. package/corpus/core/docs/content/agent-native-toolkit.mdx +46 -13
  4. package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
  5. package/corpus/core/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
  6. package/corpus/core/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
  7. package/corpus/core/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
  8. package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
  9. package/corpus/core/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
  10. package/corpus/core/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
  11. package/corpus/core/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
  12. package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
  13. package/corpus/core/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
  14. package/corpus/core/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
  15. package/corpus/core/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
  16. package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
  17. package/corpus/core/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
  18. package/corpus/core/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
  19. package/corpus/core/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
  20. package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
  21. package/corpus/core/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
  22. package/corpus/core/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
  23. package/corpus/core/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
  24. package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
  25. package/corpus/core/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
  26. package/corpus/core/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
  27. package/corpus/core/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
  28. package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
  29. package/corpus/core/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
  30. package/corpus/core/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
  31. package/corpus/core/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
  32. package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
  33. package/corpus/core/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
  34. package/corpus/core/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
  35. package/corpus/core/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
  36. package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
  37. package/corpus/core/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
  38. package/corpus/core/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
  39. package/corpus/core/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
  40. package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
  41. package/corpus/core/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
  42. package/corpus/core/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
  43. package/corpus/core/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
  44. package/corpus/core/docs/content/toolkit-capability-packages.mdx +52 -0
  45. package/corpus/core/docs/content/toolkit-context-knowledge.mdx +46 -0
  46. package/corpus/core/docs/content/toolkit-editors-canvases.mdx +55 -0
  47. package/corpus/core/package.json +35 -34
  48. package/corpus/core/src/cli/create.ts +39 -3
  49. package/corpus/core/src/cli/package-lifecycle.ts +2 -0
  50. package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +2 -0
  51. package/corpus/core/src/client/context-xray/ContextMeter.tsx +31 -111
  52. package/corpus/core/src/client/context-xray/ContextSegmentRow.tsx +8 -111
  53. package/corpus/core/src/client/context-xray/ContextTreemap.tsx +6 -111
  54. package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +31 -391
  55. package/corpus/core/src/client/context-xray/SegmentProvenancePopover.tsx +4 -52
  56. package/corpus/core/src/client/context-xray/format.ts +0 -33
  57. package/corpus/core/src/client/rich-markdown-editor/index.ts +42 -57
  58. package/corpus/core/src/client/rich-markdown-editor/uploadEditorImage.ts +2 -1
  59. package/corpus/core/src/client/visual-style-controls.tsx +1 -1088
  60. package/corpus/core/src/collab/agent-identity.ts +5 -22
  61. package/corpus/core/src/collab/client.ts +1 -53
  62. package/corpus/core/src/styles/rich-markdown-editor.css +1 -510
  63. package/corpus/core/src/testing.ts +1 -1
  64. package/corpus/core/src/vite/client.ts +3 -0
  65. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +5 -3
  66. package/corpus/templates/content/app/components/editor/extensions/DragHandle.tsx +4 -4
  67. package/corpus/templates/content/package.json +25 -25
  68. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
  69. package/corpus/templates/design/package.json +1 -1
  70. package/corpus/templates/mail/package.json +9 -9
  71. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +2 -0
  72. package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +8 -8
  73. package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +6 -6
  74. package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +4 -7
  75. package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +6 -4
  76. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +1 -1
  77. package/corpus/templates/plan/changelog/2026-07-18-visual-plans-now-open-on-wireframes-by-default-when-a-protot.md +6 -0
  78. package/corpus/templates/plan/package.json +3 -3
  79. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +2 -2
  80. package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +2 -2
  81. package/corpus/templates/slides/package.json +13 -13
  82. package/dist/catalog.json +39 -1
  83. package/dist/cli/create.d.ts.map +1 -1
  84. package/dist/cli/create.js +32 -3
  85. package/dist/cli/create.js.map +1 -1
  86. package/dist/cli/package-lifecycle.d.ts.map +1 -1
  87. package/dist/cli/package-lifecycle.js +2 -0
  88. package/dist/cli/package-lifecycle.js.map +1 -1
  89. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  90. package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
  91. package/dist/cli/skills-content/visual-plan-skill.js +2 -0
  92. package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
  93. package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
  94. package/dist/client/context-xray/ContextMeter.js +8 -23
  95. package/dist/client/context-xray/ContextMeter.js.map +1 -1
  96. package/dist/client/context-xray/ContextSegmentRow.d.ts.map +1 -1
  97. package/dist/client/context-xray/ContextSegmentRow.js +3 -19
  98. package/dist/client/context-xray/ContextSegmentRow.js.map +1 -1
  99. package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
  100. package/dist/client/context-xray/ContextTreemap.js +3 -54
  101. package/dist/client/context-xray/ContextTreemap.js.map +1 -1
  102. package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
  103. package/dist/client/context-xray/ContextXRayPanel.js +21 -163
  104. package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
  105. package/dist/client/context-xray/SegmentProvenancePopover.d.ts.map +1 -1
  106. package/dist/client/context-xray/SegmentProvenancePopover.js +3 -4
  107. package/dist/client/context-xray/SegmentProvenancePopover.js.map +1 -1
  108. package/dist/client/context-xray/format.d.ts +0 -4
  109. package/dist/client/context-xray/format.d.ts.map +1 -1
  110. package/dist/client/context-xray/format.js +0 -49
  111. package/dist/client/context-xray/format.js.map +1 -1
  112. package/dist/client/rich-markdown-editor/index.d.ts +1 -12
  113. package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
  114. package/dist/client/rich-markdown-editor/index.js +1 -12
  115. package/dist/client/rich-markdown-editor/index.js.map +1 -1
  116. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +1 -1
  117. package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -1
  118. package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -1
  119. package/dist/client/visual-style-controls.d.ts +1 -89
  120. package/dist/client/visual-style-controls.d.ts.map +1 -1
  121. package/dist/client/visual-style-controls.js +1 -498
  122. package/dist/client/visual-style-controls.js.map +1 -1
  123. package/dist/collab/agent-identity.d.ts +1 -14
  124. package/dist/collab/agent-identity.d.ts.map +1 -1
  125. package/dist/collab/agent-identity.js +1 -13
  126. package/dist/collab/agent-identity.js.map +1 -1
  127. package/dist/collab/awareness.d.ts +2 -2
  128. package/dist/collab/awareness.d.ts.map +1 -1
  129. package/dist/collab/client.d.ts +1 -19
  130. package/dist/collab/client.d.ts.map +1 -1
  131. package/dist/collab/client.js +1 -53
  132. package/dist/collab/client.js.map +1 -1
  133. package/dist/collab/routes.d.ts +1 -1
  134. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  135. package/dist/notifications/routes.d.ts +3 -3
  136. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  137. package/dist/styles/rich-markdown-editor.css +1 -510
  138. package/dist/testing.d.ts +1 -1
  139. package/dist/testing.d.ts.map +1 -1
  140. package/dist/testing.js +1 -1
  141. package/dist/testing.js.map +1 -1
  142. package/dist/vite/client.d.ts.map +1 -1
  143. package/dist/vite/client.js +3 -0
  144. package/dist/vite/client.js.map +1 -1
  145. package/docs/content/agent-native-toolkit.mdx +46 -13
  146. package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
  147. package/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
  148. package/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
  149. package/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
  150. package/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
  151. package/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
  152. package/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
  153. package/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
  154. package/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
  155. package/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
  156. package/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
  157. package/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
  158. package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
  159. package/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
  160. package/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
  161. package/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
  162. package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
  163. package/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
  164. package/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
  165. package/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
  166. package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
  167. package/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
  168. package/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
  169. package/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
  170. package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
  171. package/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
  172. package/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
  173. package/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
  174. package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
  175. package/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
  176. package/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
  177. package/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
  178. package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
  179. package/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
  180. package/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
  181. package/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
  182. package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
  183. package/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
  184. package/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
  185. package/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
  186. package/docs/content/toolkit-capability-packages.mdx +52 -0
  187. package/docs/content/toolkit-context-knowledge.mdx +46 -0
  188. package/docs/content/toolkit-editors-canvases.mdx +55 -0
  189. package/package.json +27 -26
  190. package/corpus/core/src/client/rich-markdown-editor/BubbleToolbar.tsx +0 -253
  191. package/corpus/core/src/client/rich-markdown-editor/CodeBlockNode.tsx +0 -258
  192. package/corpus/core/src/client/rich-markdown-editor/DragHandle.ts +0 -1437
  193. package/corpus/core/src/client/rich-markdown-editor/ImageExtension.ts +0 -306
  194. package/corpus/core/src/client/rich-markdown-editor/RichMarkdownEditor.tsx +0 -80
  195. package/corpus/core/src/client/rich-markdown-editor/RunId.ts +0 -61
  196. package/corpus/core/src/client/rich-markdown-editor/SharedRichEditor.tsx +0 -321
  197. package/corpus/core/src/client/rich-markdown-editor/SlashCommandMenu.tsx +0 -310
  198. package/corpus/core/src/client/rich-markdown-editor/extensions.ts +0 -402
  199. package/corpus/core/src/client/rich-markdown-editor/gfmDoc.ts +0 -92
  200. package/corpus/core/src/client/rich-markdown-editor/surgical-apply.ts +0 -192
  201. package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +0 -590
  202. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +0 -37
  203. package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +0 -1
  204. package/dist/client/rich-markdown-editor/BubbleToolbar.js +0 -171
  205. package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +0 -1
  206. package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts +0 -49
  207. package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts.map +0 -1
  208. package/dist/client/rich-markdown-editor/CodeBlockNode.js +0 -127
  209. package/dist/client/rich-markdown-editor/CodeBlockNode.js.map +0 -1
  210. package/dist/client/rich-markdown-editor/DragHandle.d.ts +0 -97
  211. package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +0 -1
  212. package/dist/client/rich-markdown-editor/DragHandle.js +0 -1066
  213. package/dist/client/rich-markdown-editor/DragHandle.js.map +0 -1
  214. package/dist/client/rich-markdown-editor/ImageExtension.d.ts +0 -63
  215. package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +0 -1
  216. package/dist/client/rich-markdown-editor/ImageExtension.js +0 -243
  217. package/dist/client/rich-markdown-editor/ImageExtension.js.map +0 -1
  218. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +0 -51
  219. package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +0 -1
  220. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +0 -37
  221. package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +0 -1
  222. package/dist/client/rich-markdown-editor/RunId.d.ts +0 -28
  223. package/dist/client/rich-markdown-editor/RunId.d.ts.map +0 -1
  224. package/dist/client/rich-markdown-editor/RunId.js +0 -60
  225. package/dist/client/rich-markdown-editor/RunId.js.map +0 -1
  226. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +0 -110
  227. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +0 -1
  228. package/dist/client/rich-markdown-editor/SharedRichEditor.js +0 -144
  229. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +0 -1
  230. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +0 -41
  231. package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +0 -1
  232. package/dist/client/rich-markdown-editor/SlashCommandMenu.js +0 -221
  233. package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +0 -1
  234. package/dist/client/rich-markdown-editor/extensions.d.ts +0 -178
  235. package/dist/client/rich-markdown-editor/extensions.d.ts.map +0 -1
  236. package/dist/client/rich-markdown-editor/extensions.js +0 -224
  237. package/dist/client/rich-markdown-editor/extensions.js.map +0 -1
  238. package/dist/client/rich-markdown-editor/gfmDoc.d.ts +0 -24
  239. package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +0 -1
  240. package/dist/client/rich-markdown-editor/gfmDoc.js +0 -83
  241. package/dist/client/rich-markdown-editor/gfmDoc.js.map +0 -1
  242. package/dist/client/rich-markdown-editor/surgical-apply.d.ts +0 -66
  243. package/dist/client/rich-markdown-editor/surgical-apply.d.ts.map +0 -1
  244. package/dist/client/rich-markdown-editor/surgical-apply.js +0 -147
  245. package/dist/client/rich-markdown-editor/surgical-apply.js.map +0 -1
  246. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +0 -110
  247. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +0 -1
  248. package/dist/client/rich-markdown-editor/useCollabReconcile.js +0 -441
  249. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.109.3",
3
+ "version": "0.109.4",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -31,6 +31,7 @@
31
31
  "type": "module",
32
32
  "sideEffects": [
33
33
  "*.css",
34
+ "dist/client/index.js",
34
35
  "dist/client/chat/widgets/builtin-tool-renderers.js",
35
36
  "dist/client/dev-overlay/builtins.js"
36
37
  ],
@@ -269,12 +270,12 @@
269
270
  "@mozilla/readability": "0.6.0",
270
271
  "@neondatabase/serverless": "^1.1.0",
271
272
  "@opentelemetry/sdk-trace-base": "^2.8.0",
272
- "@radix-ui/react-dialog": "1.1.15",
273
- "@radix-ui/react-dropdown-menu": "^2.1.16",
274
- "@radix-ui/react-hover-card": "^1.1.15",
275
- "@radix-ui/react-popover": "^1.1.15",
276
- "@radix-ui/react-select": "^2.2.6",
277
- "@radix-ui/react-tooltip": "^1.2.8",
273
+ "@radix-ui/react-dialog": "^1.1.19",
274
+ "@radix-ui/react-dropdown-menu": "^2.1.20",
275
+ "@radix-ui/react-hover-card": "^1.1.19",
276
+ "@radix-ui/react-popover": "^1.1.19",
277
+ "@radix-ui/react-select": "^2.3.3",
278
+ "@radix-ui/react-tooltip": "^1.2.12",
278
279
  "@react-router/dev": "^8.1.0",
279
280
  "@react-router/fs-routes": "^8.1.0",
280
281
  "@resvg/resvg-js": "^2.6.2",
@@ -284,23 +285,23 @@
284
285
  "@shadcn/react": "^0.2.0",
285
286
  "@standard-schema/spec": "^1.1.0",
286
287
  "@tanstack/react-table": "^8.21.3",
287
- "@tiptap/core": "3.27.1",
288
- "@tiptap/extension-code-block-lowlight": "3.27.1",
289
- "@tiptap/extension-collaboration": "3.27.1",
290
- "@tiptap/extension-collaboration-caret": "3.27.1",
291
- "@tiptap/extension-image": "3.27.1",
292
- "@tiptap/extension-link": "3.27.1",
293
- "@tiptap/extension-placeholder": "3.27.1",
294
- "@tiptap/extension-table": "3.27.1",
295
- "@tiptap/extension-table-cell": "3.27.1",
296
- "@tiptap/extension-table-header": "3.27.1",
297
- "@tiptap/extension-table-row": "3.27.1",
298
- "@tiptap/extension-task-item": "3.27.1",
299
- "@tiptap/extension-task-list": "3.27.1",
300
- "@tiptap/pm": "3.27.1",
301
- "@tiptap/react": "3.27.1",
302
- "@tiptap/starter-kit": "3.27.1",
303
- "@tiptap/y-tiptap": "^3.0.5",
288
+ "@tiptap/core": "3.28.0",
289
+ "@tiptap/extension-code-block-lowlight": "3.28.0",
290
+ "@tiptap/extension-collaboration": "3.28.0",
291
+ "@tiptap/extension-collaboration-caret": "3.28.0",
292
+ "@tiptap/extension-image": "3.28.0",
293
+ "@tiptap/extension-link": "3.28.0",
294
+ "@tiptap/extension-placeholder": "3.28.0",
295
+ "@tiptap/extension-table": "3.28.0",
296
+ "@tiptap/extension-table-cell": "3.28.0",
297
+ "@tiptap/extension-table-header": "3.28.0",
298
+ "@tiptap/extension-table-row": "3.28.0",
299
+ "@tiptap/extension-task-item": "3.28.0",
300
+ "@tiptap/extension-task-list": "3.28.0",
301
+ "@tiptap/pm": "3.28.0",
302
+ "@tiptap/react": "3.28.0",
303
+ "@tiptap/starter-kit": "3.28.0",
304
+ "@tiptap/y-tiptap": "3.0.7",
304
305
  "@uiw/react-codemirror": "^4.25.10",
305
306
  "ajv": "^8.20.0",
306
307
  "better-auth": "1.6.16",
@@ -328,7 +329,7 @@
328
329
  "prettier": "^3.8.3",
329
330
  "react-i18next": "17.0.8",
330
331
  "react-markdown": "^10.1.0",
331
- "recharts": "^3.8.1",
332
+ "recharts": "^3.9.2",
332
333
  "remark-gfm": "^4.0.1",
333
334
  "roughjs": "4.6.6",
334
335
  "safe-regex2": "5.1.1",
@@ -343,7 +344,7 @@
343
344
  "yjs": "^13.6.31",
344
345
  "zod": "^4.3.6",
345
346
  "@agent-native/recap-cli": "0.4.4",
346
- "@agent-native/toolkit": "^0.4.10"
347
+ "@agent-native/toolkit": "^0.5.0"
347
348
  },
348
349
  "devDependencies": {
349
350
  "@ai-sdk/anthropic": "^3.0.71",
@@ -1,253 +0,0 @@
1
- import { TextSelection } from "@tiptap/pm/state";
2
- import type { Editor } from "@tiptap/react";
3
- import { useEffect, useState, type CSSProperties } from "react";
4
-
5
- import { cn } from "../utils.js";
6
-
7
- /** A bubble-toolbar button or a divider. */
8
- export type BubbleToolbarItem =
9
- | {
10
- /** Short label/glyph shown on the button. */
11
- label: string;
12
- /** Accessible/title text. */
13
- title: string;
14
- action: () => void;
15
- isActive: () => boolean;
16
- style?: CSSProperties;
17
- }
18
- | { type: "divider" };
19
-
20
- /**
21
- * Builds the default selection-toolbar items (Plan's current set): bold,
22
- * italic, strike, code, headings 1-3, and a link toggle. `toggleLink` is
23
- * supplied by the toolbar so the link-editor input can be opened.
24
- */
25
- export function buildDefaultBubbleItems(
26
- editor: Editor,
27
- toggleLink: () => void,
28
- ): BubbleToolbarItem[] {
29
- return [
30
- {
31
- label: "B",
32
- title: "Bold",
33
- action: () => editor.chain().focus().toggleBold().run(),
34
- isActive: () => editor.isActive("bold"),
35
- style: { fontWeight: 700 },
36
- },
37
- {
38
- label: "I",
39
- title: "Italic",
40
- action: () => editor.chain().focus().toggleItalic().run(),
41
- isActive: () => editor.isActive("italic"),
42
- style: { fontStyle: "italic" },
43
- },
44
- {
45
- label: "S",
46
- title: "Strikethrough",
47
- action: () => editor.chain().focus().toggleStrike().run(),
48
- isActive: () => editor.isActive("strike"),
49
- style: { textDecoration: "line-through" },
50
- },
51
- {
52
- label: "<>",
53
- title: "Code",
54
- action: () => editor.chain().focus().toggleCode().run(),
55
- isActive: () => editor.isActive("code"),
56
- style: { fontFamily: "monospace", fontSize: 11 },
57
- },
58
- { type: "divider" },
59
- {
60
- label: "H1",
61
- title: "Heading 1",
62
- action: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
63
- isActive: () => editor.isActive("heading", { level: 1 }),
64
- },
65
- {
66
- label: "H2",
67
- title: "Heading 2",
68
- action: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
69
- isActive: () => editor.isActive("heading", { level: 2 }),
70
- },
71
- {
72
- label: "H3",
73
- title: "Heading 3",
74
- action: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
75
- isActive: () => editor.isActive("heading", { level: 3 }),
76
- },
77
- { type: "divider" },
78
- {
79
- label: "Link",
80
- title: "Link",
81
- action: toggleLink,
82
- isActive: () => editor.isActive("link"),
83
- },
84
- ];
85
- }
86
-
87
- export interface BubbleToolbarProps {
88
- editor: Editor;
89
- /**
90
- * Custom item builder. Receives the editor and the `toggleLink` helper (so a
91
- * custom set can still open the built-in link editor). Defaults to
92
- * {@link buildDefaultBubbleItems}.
93
- */
94
- buildItems?: (editor: Editor, toggleLink: () => void) => BubbleToolbarItem[];
95
- }
96
-
97
- /**
98
- * The shared floating selection toolbar. Tracks the current text selection and
99
- * positions a fixed toolbar above it, with an inline link editor. Extracted
100
- * from the inline plan toolbar so embedders share one implementation; apps swap
101
- * the item set via `buildItems`.
102
- */
103
- export function BubbleToolbar({
104
- editor,
105
- buildItems = buildDefaultBubbleItems,
106
- }: BubbleToolbarProps) {
107
- const [visible, setVisible] = useState(false);
108
- const [coords, setCoords] = useState({ top: 0, left: 0 });
109
- const [showLinkInput, setShowLinkInput] = useState(false);
110
- const [linkUrl, setLinkUrl] = useState("");
111
-
112
- useEffect(() => {
113
- const update = () => {
114
- const selectionState = editor.state.selection;
115
- const { from, to } = selectionState;
116
- const selection = window.getSelection();
117
- const selectionInsideEditor =
118
- !!selection?.anchorNode &&
119
- !!selection.focusNode &&
120
- editor.view.dom.contains(selection.anchorNode) &&
121
- editor.view.dom.contains(selection.focusNode);
122
- if (
123
- !(selectionState instanceof TextSelection) ||
124
- from === to ||
125
- !selectionInsideEditor
126
- ) {
127
- setVisible(false);
128
- return;
129
- }
130
- if (!selection || selection.rangeCount === 0) {
131
- setVisible(false);
132
- return;
133
- }
134
- const rect = selection.getRangeAt(0).getBoundingClientRect();
135
- if (rect.width === 0 && rect.height === 0) {
136
- setVisible(false);
137
- return;
138
- }
139
- setCoords({
140
- top: rect.top - 8,
141
- left: rect.left + rect.width / 2,
142
- });
143
- setVisible(true);
144
- };
145
- editor.on("selectionUpdate", update);
146
- editor.on("transaction", update);
147
- document.addEventListener("selectionchange", update);
148
- const onBlur = () => {
149
- setTimeout(() => {
150
- if (!editor.isFocused) setVisible(false);
151
- }, 140);
152
- };
153
- editor.on("blur", onBlur);
154
- return () => {
155
- editor.off("selectionUpdate", update);
156
- editor.off("transaction", update);
157
- document.removeEventListener("selectionchange", update);
158
- editor.off("blur", onBlur);
159
- };
160
- }, [editor]);
161
-
162
- const handleSetLink = () => {
163
- if (linkUrl.trim()) {
164
- editor
165
- .chain()
166
- .focus()
167
- .extendMarkRange("link")
168
- .setLink({ href: linkUrl.trim() })
169
- .run();
170
- } else {
171
- editor.chain().focus().extendMarkRange("link").unsetLink().run();
172
- }
173
- setShowLinkInput(false);
174
- setLinkUrl("");
175
- };
176
-
177
- const toggleLink = () => {
178
- if (editor.isActive("link")) {
179
- editor.chain().focus().unsetLink().run();
180
- return;
181
- }
182
- setLinkUrl(editor.getAttributes("link").href || "");
183
- setShowLinkInput(true);
184
- };
185
-
186
- const items = buildItems(editor, toggleLink);
187
-
188
- if (!visible) return null;
189
-
190
- return (
191
- <div
192
- className="an-rich-md-bubble-toolbar"
193
- style={{
194
- position: "fixed",
195
- top: coords.top,
196
- left: coords.left,
197
- transform: "translate(-50%, -100%)",
198
- }}
199
- onMouseDown={(event) => event.preventDefault()}
200
- data-plan-interactive
201
- >
202
- {showLinkInput ? (
203
- <div className="an-rich-md-link-editor">
204
- <input
205
- autoFocus
206
- type="url"
207
- placeholder="Paste link..."
208
- value={linkUrl}
209
- onChange={(event) => setLinkUrl(event.target.value)}
210
- onKeyDown={(event) => {
211
- if (event.key === "Enter") handleSetLink();
212
- if (event.key === "Escape") {
213
- setShowLinkInput(false);
214
- setLinkUrl("");
215
- }
216
- }}
217
- />
218
- <button type="button" onClick={handleSetLink}>
219
- Apply
220
- </button>
221
- </div>
222
- ) : (
223
- <div className="an-rich-md-bubble-items">
224
- {items.map((item, index) => {
225
- if ("type" in item) {
226
- return (
227
- <span
228
- key={`divider-${index}`}
229
- className="an-rich-md-bubble-divider"
230
- />
231
- );
232
- }
233
- return (
234
- <button
235
- key={item.title}
236
- type="button"
237
- title={item.title}
238
- className={cn(
239
- "an-rich-md-bubble-button",
240
- item.isActive() && "an-rich-md-bubble-button--active",
241
- )}
242
- style={item.style}
243
- onClick={item.action}
244
- >
245
- {item.label}
246
- </button>
247
- );
248
- })}
249
- </div>
250
- )}
251
- </div>
252
- );
253
- }
@@ -1,258 +0,0 @@
1
- import { IconCheck, IconChevronDown } from "@tabler/icons-react";
2
- import type { Node as TiptapNode } from "@tiptap/core";
3
- import { CodeBlockLowlight } from "@tiptap/extension-code-block-lowlight";
4
- import {
5
- NodeViewContent,
6
- NodeViewWrapper,
7
- ReactNodeViewRenderer,
8
- type NodeViewProps,
9
- } from "@tiptap/react";
10
- import type { createLowlight } from "lowlight";
11
- import { useMemo, useState } from "react";
12
-
13
- import {
14
- Popover,
15
- PopoverContent,
16
- PopoverTrigger,
17
- } from "../components/ui/popover.js";
18
- import { cn } from "../utils.js";
19
-
20
- /**
21
- * A selectable language for the code-block picker. `value === null` is the
22
- * "Auto" sentinel: the block stores no language and the lowlight plugin
23
- * auto-detects (biased toward the editor's registered, web-leaning grammar
24
- * set). Keeping it first makes Auto the default, matching how plans skew toward
25
- * JS/TS/JSON without the author having to choose.
26
- */
27
- export interface CodeLanguageOption {
28
- value: string | null;
29
- label: string;
30
- }
31
-
32
- /** Default picker list — Auto first, then the web-leaning grammars plans use. */
33
- export const DEFAULT_CODE_LANGUAGES: CodeLanguageOption[] = [
34
- { value: null, label: "Auto" },
35
- { value: "typescript", label: "TypeScript" },
36
- { value: "javascript", label: "JavaScript" },
37
- { value: "tsx", label: "TSX" },
38
- { value: "jsx", label: "JSX" },
39
- { value: "json", label: "JSON" },
40
- { value: "html", label: "HTML" },
41
- { value: "css", label: "CSS" },
42
- { value: "bash", label: "Bash" },
43
- { value: "python", label: "Python" },
44
- { value: "sql", label: "SQL" },
45
- { value: "yaml", label: "YAML" },
46
- { value: "markdown", label: "Markdown" },
47
- { value: "graphql", label: "GraphQL" },
48
- { value: "go", label: "Go" },
49
- { value: "rust", label: "Rust" },
50
- { value: "diff", label: "Diff" },
51
- ];
52
-
53
- /** Class hooks so each app themes the shared node with its own palette. */
54
- export interface CodeBlockClassNames {
55
- wrapper: string;
56
- header: string;
57
- langButton: string;
58
- langButtonReadonly: string;
59
- picker: string;
60
- search: string;
61
- list: string;
62
- option: string;
63
- optionActive: string;
64
- }
65
-
66
- const DEFAULT_CLASS_NAMES: CodeBlockClassNames = {
67
- wrapper: "an-code-block",
68
- header: "an-code-block__header",
69
- langButton: "an-code-block__lang",
70
- langButtonReadonly: "an-code-block__lang--readonly",
71
- picker: "an-code-block__picker",
72
- search: "an-code-block__search",
73
- list: "an-code-block__list",
74
- option: "an-code-block__option",
75
- optionActive: "is-active",
76
- };
77
-
78
- export interface CreateCodeBlockNodeOptions {
79
- /** Lowlight instance backing syntax highlighting (same one the app registers). */
80
- lowlight: ReturnType<typeof createLowlight>;
81
- /** Picker languages. Defaults to {@link DEFAULT_CODE_LANGUAGES} (Auto first). */
82
- languages?: CodeLanguageOption[];
83
- /** Class hooks for per-app theming. Defaults to the shared `an-code-block__*`. */
84
- classNames?: Partial<CodeBlockClassNames>;
85
- }
86
-
87
- function optionLabel(
88
- language: string | null,
89
- languages: CodeLanguageOption[],
90
- ): string {
91
- if (!language) return languages[0]?.label ?? "Auto";
92
- const match = languages.find((option) => option.value === language);
93
- return match?.label ?? language;
94
- }
95
-
96
- interface CodeBlockNodeViewExtraOptions {
97
- languagePickerOptions: CodeLanguageOption[];
98
- codeBlockClassNames: CodeBlockClassNames;
99
- }
100
-
101
- function CodeBlockView({
102
- node,
103
- updateAttributes,
104
- editor,
105
- extension,
106
- }: NodeViewProps) {
107
- const options = extension.options as unknown as CodeBlockNodeViewExtraOptions;
108
- const languages = options.languagePickerOptions;
109
- const classNames = options.codeBlockClassNames;
110
-
111
- const [open, setOpen] = useState(false);
112
- const [filter, setFilter] = useState("");
113
- const isEditable = editor.isEditable;
114
-
115
- const current = (node.attrs.language as string | null) || null;
116
- const label = optionLabel(current, languages);
117
-
118
- const filtered = useMemo(() => {
119
- const query = filter.trim().toLowerCase();
120
- if (!query) return languages;
121
- return languages.filter((option) =>
122
- option.label.toLowerCase().includes(query),
123
- );
124
- }, [filter, languages]);
125
-
126
- const select = (value: string | null) => {
127
- // Store `""` for Auto so tiptap-markdown emits a bare fence (no language),
128
- // matching the auto-detect read path.
129
- updateAttributes({ language: value ?? "" });
130
- setFilter("");
131
- setOpen(false);
132
- };
133
-
134
- return (
135
- <NodeViewWrapper className={classNames.wrapper}>
136
- <div className={classNames.header} contentEditable={false}>
137
- {isEditable ? (
138
- <Popover
139
- open={open}
140
- onOpenChange={(next) => {
141
- setOpen(next);
142
- if (!next) setFilter("");
143
- }}
144
- >
145
- <PopoverTrigger asChild>
146
- <button type="button" className={classNames.langButton}>
147
- {label}
148
- <IconChevronDown className="size-3" />
149
- </button>
150
- </PopoverTrigger>
151
- <PopoverContent align="start" side="bottom" className="w-52 p-0">
152
- <input
153
- autoFocus
154
- type="text"
155
- value={filter}
156
- onChange={(event) => setFilter(event.target.value)}
157
- onKeyDown={(event) => {
158
- if (event.key === "Enter" && filtered.length > 0) {
159
- event.preventDefault();
160
- select(filtered[0].value);
161
- }
162
- }}
163
- placeholder="Search languages…"
164
- className={classNames.search}
165
- />
166
- <div className={classNames.list}>
167
- {filtered.map((option) => {
168
- const active =
169
- option.value === current || (!option.value && !current);
170
- return (
171
- <button
172
- key={option.value ?? "auto"}
173
- type="button"
174
- className={cn(
175
- classNames.option,
176
- active && classNames.optionActive,
177
- )}
178
- onClick={() => select(option.value)}
179
- >
180
- {option.label}
181
- {active && <IconCheck className="size-3.5" />}
182
- </button>
183
- );
184
- })}
185
- </div>
186
- </PopoverContent>
187
- </Popover>
188
- ) : (
189
- label && (
190
- <span
191
- className={cn(
192
- classNames.langButton,
193
- classNames.langButtonReadonly,
194
- )}
195
- >
196
- {label}
197
- </span>
198
- )
199
- )}
200
- </div>
201
- <pre>
202
- <NodeViewContent as={"code" as never} />
203
- </pre>
204
- </NodeViewWrapper>
205
- );
206
- }
207
-
208
- /**
209
- * The shared Notion-style code block: {@link CodeBlockLowlight} (so fenced
210
- * markdown round-trips byte-identically — the node name and `language` attr are
211
- * unchanged) plus a React node view that adds a language picker header instead
212
- * of a bare highlighted `<pre>`. "Auto" stores no language and the lowlight
213
- * plugin auto-detects.
214
- *
215
- * Lifted from the Content editor's bespoke code block so Plans (and any app
216
- * opting into `features.codeBlock`) share one implementation. Theming is fully
217
- * class-driven via {@link CreateCodeBlockNodeOptions.classNames}, so each app
218
- * maps the hooks onto its own palette.
219
- */
220
- export function createCodeBlockNode({
221
- lowlight,
222
- languages = DEFAULT_CODE_LANGUAGES,
223
- classNames,
224
- }: CreateCodeBlockNodeOptions): TiptapNode {
225
- const resolvedClassNames: CodeBlockClassNames = {
226
- ...DEFAULT_CLASS_NAMES,
227
- ...(classNames ?? {}),
228
- };
229
-
230
- return CodeBlockLowlight.extend({
231
- addOptions() {
232
- return {
233
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
234
- ...this.parent!(),
235
- languagePickerOptions: languages,
236
- codeBlockClassNames: resolvedClassNames,
237
- };
238
- },
239
- addNodeView() {
240
- return ReactNodeViewRenderer(CodeBlockView);
241
- },
242
- addKeyboardShortcuts() {
243
- return {
244
- ...this.parent?.(),
245
- Tab: ({ editor }) => {
246
- if (editor.isActive(this.name)) {
247
- editor.commands.insertContent("\t");
248
- return true;
249
- }
250
- return false;
251
- },
252
- };
253
- },
254
- }).configure({
255
- lowlight,
256
- defaultLanguage: null,
257
- }) as unknown as TiptapNode;
258
- }