@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.61

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 (324) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/index.mjs +2 -5
  4. package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
  5. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
  6. package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
  7. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
  8. package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
  9. package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
  10. package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
  11. package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
  12. package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
  13. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
  14. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
  15. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
  16. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
  17. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
  18. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
  19. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
  20. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
  21. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
  22. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
  23. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
  24. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
  25. package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
  26. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
  27. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
  28. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  29. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  30. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  31. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +28 -0
  32. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  33. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
  34. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
  35. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  36. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
  37. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
  38. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
  39. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
  40. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
  41. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
  42. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
  43. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
  44. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
  45. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
  46. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
  47. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
  48. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
  49. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +3 -3
  50. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
  51. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
  52. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
  53. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
  54. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
  55. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +15 -11
  56. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
  57. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
  58. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
  59. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
  60. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +8 -0
  61. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  62. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
  63. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
  64. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
  65. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
  66. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
  67. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
  68. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
  69. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
  70. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +16 -0
  71. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  72. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
  73. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
  74. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
  75. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
  76. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  77. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  78. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
  79. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
  80. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
  81. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
  82. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
  83. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
  84. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
  85. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
  86. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +25 -5
  87. package/dist/modules/agent/runtime/app/tools/schemas.js +37 -10
  88. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
  89. package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
  90. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
  91. package/dist/modules/agent/runtime/app/tools/search_media/index.js +3 -3
  92. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
  93. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
  94. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
  95. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
  96. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
  97. package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
  98. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  99. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
  100. package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
  101. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
  102. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
  103. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
  104. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
  105. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
  106. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
  107. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
  108. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
  109. package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
  110. package/dist/modules/agent/runtime/app/types/index.js +4 -3
  111. package/dist/modules/agent/runtime/server/agent.js +1 -2
  112. package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
  113. package/dist/modules/agent/runtime/server/classes/Session/index.js +10 -5
  114. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
  115. package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
  116. package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
  117. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  118. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  119. package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
  120. package/dist/modules/agent/runtime/shared/types.js +6 -1
  121. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
  122. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  123. package/dist/modules/drupal/index.mjs +6 -1
  124. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  125. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  126. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  127. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  128. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  129. package/dist/runtime/editor/components/Actions/Title/index.vue +9 -8
  130. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  131. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  132. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  133. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  134. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  135. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  136. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  137. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  138. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  139. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  140. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  141. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  142. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  143. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  144. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  145. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  146. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  147. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  148. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  149. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  150. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  151. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  152. package/dist/runtime/editor/components/DiffApproval/index.vue +3 -2
  153. package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
  154. package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
  155. package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
  156. package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
  157. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  158. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  159. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  160. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  161. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  162. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  163. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  164. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  165. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  166. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  167. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  168. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  169. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  170. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  171. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  172. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  173. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  174. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  175. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  176. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  177. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  178. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  179. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  180. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  181. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  182. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  183. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  184. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  185. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  186. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  187. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  188. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  189. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  190. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  191. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  192. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  193. package/dist/runtime/editor/components/index.d.ts +1 -0
  194. package/dist/runtime/editor/components/index.js +1 -0
  195. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  196. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  197. package/dist/runtime/editor/composables/index.d.ts +3 -0
  198. package/dist/runtime/editor/composables/index.js +2 -0
  199. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  200. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  201. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  202. package/dist/runtime/editor/css/output.css +1 -1
  203. package/dist/runtime/editor/events/index.d.ts +23 -0
  204. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  205. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  206. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  207. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  208. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  209. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  210. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  211. package/dist/runtime/editor/features/anchors/types.js +1 -0
  212. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  213. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  214. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  215. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  216. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  217. package/dist/runtime/editor/features/changelog/changelog.json +16 -0
  218. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  219. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  220. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  221. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  222. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  223. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  224. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  225. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  226. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  227. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  228. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  229. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  230. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  231. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  232. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  233. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  234. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  235. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  236. package/dist/runtime/editor/features/comments/index.vue +28 -3
  237. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  238. package/dist/runtime/editor/features/delete/types.js +1 -0
  239. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  240. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  241. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  242. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  243. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  244. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  245. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  246. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  247. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  248. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  249. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  250. package/dist/runtime/editor/features/grid/index.vue +16 -15
  251. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  252. package/dist/runtime/editor/features/grid/types.js +1 -0
  253. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  254. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  255. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  256. package/dist/runtime/editor/features/help/index.vue +52 -47
  257. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  258. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  259. package/dist/runtime/editor/features/history/types.js +1 -0
  260. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  261. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  262. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  263. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  264. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  265. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  266. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  267. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  268. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  269. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  270. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  271. package/dist/runtime/editor/features/notifications/types.js +20 -0
  272. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  273. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  274. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  275. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  276. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  277. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  278. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  279. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  280. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  281. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  282. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  283. package/dist/runtime/editor/features/options/index.vue +7 -1
  284. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  285. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  286. package/dist/runtime/editor/features/ownership/types.js +1 -0
  287. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  288. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  289. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  290. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  291. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  292. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  293. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  294. package/dist/runtime/editor/features/revert/types.js +1 -0
  295. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  296. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  297. package/dist/runtime/editor/features/swap/types.js +1 -0
  298. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  299. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  300. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  301. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  302. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  303. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  304. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  305. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  306. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  307. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  308. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  309. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  310. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  311. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  312. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  313. package/dist/runtime/editor/plugins/index.js +1 -3
  314. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  315. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  316. package/dist/runtime/editor/providers/plugin.js +9 -0
  317. package/dist/runtime/editor/translations/de.json +53 -19
  318. package/dist/runtime/editor/translations/fr.json +16 -4
  319. package/dist/runtime/editor/translations/gsw_CH.json +53 -19
  320. package/dist/runtime/editor/translations/it.json +16 -4
  321. package/package.json +6 -6
  322. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  323. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  324. package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
@@ -1,5 +1,6 @@
1
1
  import {
2
- agentErrorTypeSchema
2
+ agentErrorTypeSchema,
3
+ selectedBlockSchema
3
4
  } from "#blokkli/agent/shared/types";
4
5
  import { z } from "zod";
5
6
  const conversationItemBase = z.object({
@@ -35,7 +36,7 @@ const userConversationItemSchema = conversationItemBase.extend({
35
36
  * Original send parameters captured so retry produces byte-identical
36
37
  * execution — important for prompt-definition-driven sends where the
37
38
  * displayed text is a friendly label but the real work was driven by
38
- * `selectedUuids`, pre-computed tool results, auto-executed tools, and
39
+ * `selectedBlocks`, pre-computed tool results, auto-executed tools, and
39
40
  * auto-loaded tools/skills.
40
41
  *
41
42
  * Retry replays this context as-is. Edit discards `preSeededResults` and
@@ -45,7 +46,7 @@ const userConversationItemSchema = conversationItemBase.extend({
45
46
  sendContext: z.object({
46
47
  promptId: z.string().optional(),
47
48
  serverPrompt: z.string().optional(),
48
- selectedUuids: z.array(z.string()).optional(),
49
+ selectedBlocks: z.array(selectedBlockSchema).optional(),
49
50
  autoLoadTools: z.array(z.string()).optional(),
50
51
  autoLoadSkills: z.array(z.string()).optional(),
51
52
  preSeededResults: z.array(
@@ -58,7 +58,6 @@ export default defineWebSocketHandler({
58
58
  case "init":
59
59
  case "accept":
60
60
  case "reject":
61
- case "new_conversation":
62
61
  case "restore_conversation":
63
62
  send(peer, {
64
63
  type: "error",
@@ -86,7 +85,7 @@ export default defineWebSocketHandler({
86
85
  data.prompt,
87
86
  apiKey,
88
87
  authSecret,
89
- data.selectedUuids,
88
+ data.selectedBlocks,
90
89
  data.autoLoadTools,
91
90
  data.autoLoadSkills,
92
91
  data.preSeededResults,
@@ -1,5 +1,5 @@
1
1
  import type { Peer } from 'crossws';
2
- import type { PageContext, ClientToolDefinition, ServerToolMetadata, ConversationStateSnapshot } from '../../../shared/types.js';
2
+ import type { PageContext, ClientToolDefinition, ServerToolMetadata, ConversationStateSnapshot, SelectedBlock } from '../../../shared/types.js';
3
3
  import type { ServerPlan } from '../../server-tools/index.js';
4
4
  export declare class Session {
5
5
  /** The single, immutable source of truth for the conversation. */
@@ -56,7 +56,7 @@ export declare class Session {
56
56
  */
57
57
  private getToolSummary;
58
58
  init(toolNames: string[], pageContext: PageContext): void;
59
- start(peer: Peer, prompt: string, apiKey: string, authSecret: string, selectedUuids?: string[], autoLoadTools?: string[], autoLoadSkills?: string[], preSeededResults?: {
59
+ start(peer: Peer, prompt: string, apiKey: string, authSecret: string, selectedBlocks?: SelectedBlock[], autoLoadTools?: string[], autoLoadSkills?: string[], preSeededResults?: {
60
60
  toolName: string;
61
61
  params: Record<string, unknown>;
62
62
  result: unknown;
@@ -129,7 +129,7 @@ export class Session {
129
129
  this.loadedSkills = /* @__PURE__ */ new Set();
130
130
  this.pageContext = pageContext;
131
131
  }
132
- start(peer, prompt, apiKey, authSecret, selectedUuids, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools, rollbackToUserMessageIndex) {
132
+ start(peer, prompt, apiKey, authSecret, selectedBlocks, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools, rollbackToUserMessageIndex) {
133
133
  if (this.isProcessing) {
134
134
  send(peer, {
135
135
  type: "error",
@@ -156,7 +156,7 @@ export class Session {
156
156
  prompt,
157
157
  apiKey,
158
158
  authSecret,
159
- selectedUuids,
159
+ selectedBlocks,
160
160
  autoLoadTools,
161
161
  autoLoadSkills,
162
162
  preSeededResults,
@@ -231,6 +231,10 @@ export class Session {
231
231
  }
232
232
  newConversation(peer, authSecret) {
233
233
  this.abortController?.abort();
234
+ for (const pending of this.pendingToolCalls.values()) {
235
+ pending.reject(new Error("Cancelled"));
236
+ }
237
+ this.pendingToolCalls.clear();
234
238
  this.history.clear();
235
239
  this.lastTools = [];
236
240
  this.lastDebugPayload = null;
@@ -352,7 +356,7 @@ export class Session {
352
356
  this.pendingPlanApproval = { resolve };
353
357
  });
354
358
  }
355
- async runAgentLoop(peer, prompt, apiKey, authSecret, selectedUuids, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools) {
359
+ async runAgentLoop(peer, prompt, apiKey, authSecret, selectedBlocks, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools) {
356
360
  if (this.toolNames.length === 0) {
357
361
  this.isProcessing = false;
358
362
  send(peer, {
@@ -400,9 +404,10 @@ ${skill.content}`
400
404
  }
401
405
  }
402
406
  const userParts = [];
403
- if (selectedUuids?.length) {
407
+ if (selectedBlocks?.length) {
408
+ const formatted = selectedBlocks.map((b) => `${b.bundle} (${b.uuid})`).join(", ");
404
409
  userParts.push(
405
- `[User has selected the following paragraphs: ${selectedUuids.join(", ")}]`
410
+ selectedBlocks.length === 1 ? `[User has selected one block: ${formatted}]` : `[User has selected: ${formatted}]`
406
411
  );
407
412
  }
408
413
  userParts.push(prompt);
@@ -14,7 +14,8 @@ export default defineBlokkliAgentSystemPrompt({
14
14
  - Use the move_paragraphs tool when moving paragraphs, instead of creating a new paragraph of the same bundle and copy pasting text.
15
15
  - ALL mutation MCP tools will make sure that the mutation is valid - it's not possible for you to make a mistake there. They return a descriptive error message.
16
16
  - It's impossible for you to make irreversible mutations! All mutations can ALWAYS be undone. You can not actually publish any changes, this can only be done by a human.
17
- - When the user's prompt implies acting on specific paragraphs but doesn't specify which ones (e.g. "translate this to german", "make this bigger", "delete these"), ALWAYS call "get_selected_paragraphs" first to check what is selected. Do this even if the prompt seems ambiguous - the selection is the most likely target.
17
+ - The user's first message includes their selection inline as "[User has selected: <bundle> (<uuid>), ...]". Treat that as the target of vague references like "this", "these", "translate this", "make this bigger" \u2014 no extra tool call needed to identify them.
18
+ - For LATER messages where the prompt implies acting on the current selection but the first-message annotation is absent or stale, call "get_selected_paragraphs" \u2014 the user may have changed their selection since the conversation started.
18
19
  - You can output text as you please, markdown is allowed!
19
20
  `;
20
21
  }
@@ -13,8 +13,27 @@ import { z } from 'zod';
13
13
  *
14
14
  * Lives in `shared/` so both client tools and server-only tools build the same
15
15
  * coercion into their respective bundles from one source.
16
+ *
17
+ * Return type is explicit so mkdist's isolated-declaration emit preserves it
18
+ * when this helper appears nested inside another schema. Chaining `.optional()`
19
+ * or `.default()` on the result would degrade to `any` in the published `.d.ts`
20
+ * — use {@link optionalBooleanParam} / {@link booleanParamWithDefault} instead.
16
21
  */
17
22
  export declare function booleanParam(description: string): z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>;
23
+ /**
24
+ * Optional variant of {@link booleanParam}. Use instead of
25
+ * `booleanParam(...).optional()` so isolated-declaration emit can preserve the
26
+ * type — chained Zod method calls aren't resolvable by mkdist's per-file
27
+ * declaration emit and collapse to `any` in the published `.d.ts`.
28
+ */
29
+ export declare function optionalBooleanParam(description: string): z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
30
+ /**
31
+ * Optional boolean with a default. Use instead of
32
+ * `booleanParam(...).optional().default(value)` so isolated-declaration emit
33
+ * can preserve the type. The default value applies when the param is omitted
34
+ * or `undefined` at parse time.
35
+ */
36
+ export declare function booleanParamWithDefault(description: string, defaultValue: boolean): z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
18
37
  /**
19
38
  * Coerce double-serialized array/object params back to their real values.
20
39
  *
@@ -9,6 +9,12 @@ export function booleanParam(description) {
9
9
  return value;
10
10
  }, z.boolean().describe(description));
11
11
  }
12
+ export function optionalBooleanParam(description) {
13
+ return booleanParam(description).optional();
14
+ }
15
+ export function booleanParamWithDefault(description, defaultValue) {
16
+ return booleanParam(description).optional().default(defaultValue);
17
+ }
12
18
  export function coerceStringifiedParams(params) {
13
19
  const result = {};
14
20
  for (const key of Object.keys(params)) {
@@ -89,6 +89,10 @@ export declare class ToolResult {
89
89
  /**
90
90
  * Stale form: a volatile query whose data is outdated because a mutation
91
91
  * happened after it. Pure and idempotent.
92
+ *
93
+ * Error results are preserved verbatim — a failed call isn't "stale data",
94
+ * it's a failure the LLM may still need to act on (e.g. fix its input and
95
+ * retry). Collapsing it to a generic stale summary hides the cause.
92
96
  */
93
97
  stale(): ToolResult;
94
98
  }
@@ -145,9 +145,14 @@ export class ToolResult {
145
145
  /**
146
146
  * Stale form: a volatile query whose data is outdated because a mutation
147
147
  * happened after it. Pure and idempotent.
148
+ *
149
+ * Error results are preserved verbatim — a failed call isn't "stale data",
150
+ * it's a failure the LLM may still need to act on (e.g. fix its input and
151
+ * retry). Collapsing it to a generic stale summary hides the cause.
148
152
  */
149
153
  stale() {
150
154
  if (this.envelope.kind === "stale") return this;
155
+ if (this.envelope.kind === "error") return this;
151
156
  return ToolResult.fromWire(
152
157
  JSON.stringify({ stale: true, summary: this.staleSummary })
153
158
  );
@@ -207,6 +207,7 @@ export type PageContext = {
207
207
  * Both Anthropic and OpenAI SDKs map to these via HTTP status codes.
208
208
  */
209
209
  export declare const agentErrorTypeSchema: z.ZodEnum<{
210
+ unknown: "unknown";
210
211
  authentication: "authentication";
211
212
  rate_limit: "rate_limit";
212
213
  overloaded: "overloaded";
@@ -214,7 +215,6 @@ export declare const agentErrorTypeSchema: z.ZodEnum<{
214
215
  bad_request: "bad_request";
215
216
  connection: "connection";
216
217
  unauthorized: "unauthorized";
217
- unknown: "unknown";
218
218
  }>;
219
219
  export type AgentErrorType = z.infer<typeof agentErrorTypeSchema>;
220
220
  /**
@@ -312,6 +312,21 @@ export declare const pageStructureSchema: z.ZodObject<{
312
312
  entityContentFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
313
313
  }, z.core.$strip>;
314
314
  export type PageStructure = z.infer<typeof pageStructureSchema>;
315
+ /**
316
+ * A block the user had selected when sending the initial message. The bundle
317
+ * and label travel with the UUID so the LLM can disambiguate "this" / "these"
318
+ * without an extra `get_selected_paragraphs` round-trip.
319
+ */
320
+ export type SelectedBlock = {
321
+ uuid: string;
322
+ bundle: string;
323
+ label: string;
324
+ };
325
+ export declare const selectedBlockSchema: z.ZodObject<{
326
+ uuid: z.ZodString;
327
+ bundle: z.ZodString;
328
+ label: z.ZodString;
329
+ }, z.core.$strip>;
315
330
  export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
331
  type: z.ZodLiteral<"authenticate">;
317
332
  authToken: z.ZodString;
@@ -340,8 +355,8 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
340
355
  name: z.ZodString;
341
356
  label: z.ZodString;
342
357
  type: z.ZodEnum<{
343
- reference: "reference";
344
358
  link: "link";
359
+ reference: "reference";
345
360
  }>;
346
361
  allowed: z.ZodArray<z.ZodObject<{
347
362
  type: z.ZodString;
@@ -380,8 +395,8 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
380
395
  name: z.ZodString;
381
396
  label: z.ZodString;
382
397
  type: z.ZodEnum<{
383
- reference: "reference";
384
398
  link: "link";
399
+ reference: "reference";
385
400
  }>;
386
401
  allowed: z.ZodArray<z.ZodObject<{
387
402
  type: z.ZodString;
@@ -406,7 +421,11 @@ export declare const clientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
406
421
  }, z.core.$strip>, z.ZodObject<{
407
422
  type: z.ZodLiteral<"start">;
408
423
  prompt: z.ZodString;
409
- selectedUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
424
+ selectedBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
425
+ uuid: z.ZodString;
426
+ bundle: z.ZodString;
427
+ label: z.ZodString;
428
+ }, z.core.$strip>>>;
410
429
  autoLoadTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
411
430
  autoLoadSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
412
431
  preSeededResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -101,6 +101,11 @@ export const pageStructureSchema = z.object({
101
101
  fields: z.record(z.string(), z.array(pageStructureBlockSchema)),
102
102
  entityContentFields: z.record(z.string(), z.string()).optional()
103
103
  });
104
+ export const selectedBlockSchema = z.object({
105
+ uuid: z.string(),
106
+ bundle: z.string(),
107
+ label: z.string()
108
+ });
104
109
  const genericContentBlockSchema = z.discriminatedUnion("type", [
105
110
  z.object({ type: z.literal("text"), text: z.string() }),
106
111
  z.object({ type: z.literal("skill"), name: z.string(), text: z.string() }),
@@ -142,7 +147,7 @@ export const clientMessageSchema = z.discriminatedUnion("type", [
142
147
  z.object({
143
148
  type: z.literal("start"),
144
149
  prompt: z.string(),
145
- selectedUuids: z.array(z.string()).optional(),
150
+ selectedBlocks: z.array(selectedBlockSchema).optional(),
146
151
  autoLoadTools: z.array(z.string()).optional(),
147
152
  autoLoadSkills: z.array(z.string()).optional(),
148
153
  preSeededResults: z.array(
@@ -7,12 +7,10 @@
7
7
  />
8
8
  </template>
9
9
  <template #default="{ close }">
10
- <button
10
+ <DropdownItem
11
11
  v-for="entry in colorOptions"
12
12
  :key="entry.id"
13
- type="button"
14
- class="bk-dropdown-menu-item _bk_min-w-[200px] _bk_group/item"
15
- :class="{ 'bk-is-active': colorId === entry.id }"
13
+ :text="entry.label"
16
14
  @click="
17
15
  () => {
18
16
  emit('select', entry.id);
@@ -24,21 +22,14 @@
24
22
  class="bk-chart-color-swatch"
25
23
  :style="{ backgroundColor: entry.hex }"
26
24
  />
27
- <span
28
- :class="{
29
- '_bk_text-mono-500 _bk_font-normal _bk_group-hover/item:text-mono-900': colorId !== entry.id,
30
- '_bk_font-bold': colorId === entry.id
31
- }"
32
- >{{ entry.label }}</span
33
- >
34
- </button>
25
+ </DropdownItem>
35
26
  </template>
36
27
  </Dropdown>
37
28
  </template>
38
29
 
39
30
  <script setup>
40
31
  import { computed, useBlokkli } from "#imports";
41
- import { Dropdown } from "#blokkli/editor/components";
32
+ import { Dropdown, DropdownItem } from "#blokkli/editor/components";
42
33
  const props = defineProps({
43
34
  colorId: { type: String, required: true }
44
35
  });
@@ -0,0 +1,39 @@
1
+ fragment paragraphsBlokkliNotification on ParagraphsBlokkliNotification {
2
+ uuid
3
+ type
4
+ read
5
+ created
6
+ title
7
+ message
8
+ relatedEntityUuid
9
+ user {
10
+ id
11
+ name
12
+ imageUrl
13
+ }
14
+ host {
15
+ entityType
16
+ entityUuid
17
+ entityBundle
18
+ label
19
+ url
20
+ }
21
+ }
22
+
23
+ query pbGetNotifications($after: String, $markAsRead: Boolean) {
24
+ result: pbGetNotifications(after: $after, markAsRead: $markAsRead) {
25
+ items {
26
+ ...paragraphsBlokkliNotification
27
+ }
28
+ unreadCount
29
+ nextCursor
30
+ }
31
+ }
32
+
33
+ query pbGetNotificationCount {
34
+ count: pbGetNotificationCount
35
+ }
36
+
37
+ mutation pbMarkNotificationsAsRead($uuids: [String!]) {
38
+ count: pbMarkNotificationsAsRead(uuids: $uuids)
39
+ }
@@ -163,11 +163,16 @@ export declare const templateEditRouteName: string|null
163
163
  }
164
164
  addMutation("ignore_analyze");
165
165
  addMutation("unignore_analyze");
166
- if (graphql.schemaHasType("CommentBlokkliNode")) {
166
+ if (graphql.schemaHasType("ParagraphsBlokkliComment")) {
167
167
  addGraphqlDocument("features/comments.graphql");
168
168
  } else {
169
169
  context.features.disableFeature("comments");
170
170
  }
171
+ if (queryFields.has("pbGetNotifications") && queryFields.has("pbGetNotificationCount") && mutationFields.has("pbMarkNotificationsAsRead")) {
172
+ addGraphqlDocument("features/notifications.graphql");
173
+ } else {
174
+ context.features.disableFeature("notifications");
175
+ }
171
176
  if (mutationFields.has("paragraphsBlokkliAgentToken")) {
172
177
  addGraphqlDocument("features/agent.graphql");
173
178
  } else {
@@ -13,6 +13,7 @@ import {
13
13
  useRouter
14
14
  } from "#imports";
15
15
  import { ParagraphsBlokkliRemoteVideoProvider } from "#graphql-operations";
16
+ import { toValidNotificationType } from "#blokkli/editor/features/notifications/types";
16
17
  function mapBlokkliUser(user) {
17
18
  if (!user) {
18
19
  return null;
@@ -775,6 +776,43 @@ export default defineBlokkliEditAdapter(
775
776
  return updated;
776
777
  });
777
778
  }
779
+ if (hasQuery("pbGetNotifications")) {
780
+ adapter.loadNotifications = (options) => useGraphqlQuery("pbGetNotifications", {
781
+ after: options.after,
782
+ markAsRead: options.markAsRead
783
+ }).then((v) => {
784
+ const result = v.data.result;
785
+ return {
786
+ items: (result?.items ?? []).map((item) => ({
787
+ uuid: item.uuid,
788
+ type: toValidNotificationType(item.type),
789
+ read: item.read,
790
+ created: item.created,
791
+ title: item.title,
792
+ message: item.message ?? void 0,
793
+ relatedEntityUuid: item.relatedEntityUuid ?? void 0,
794
+ user: mapBlokkliUser(item.user),
795
+ host: item.host ? {
796
+ uuid: item.host.entityUuid,
797
+ entityType: item.host.entityType,
798
+ entityBundle: item.host.entityBundle,
799
+ label: item.host.label ?? "",
800
+ url: item.host.url ?? ""
801
+ } : null
802
+ })),
803
+ nextCursor: result?.nextCursor ?? null,
804
+ unreadCount: result?.unreadCount ?? 0
805
+ };
806
+ });
807
+ }
808
+ if (hasQuery("pbGetNotificationCount")) {
809
+ adapter.loadUnreadNotificationsCount = () => useGraphqlQuery("pbGetNotificationCount").then((v) => v.data.count ?? 0);
810
+ }
811
+ if (hasMutation("pbMarkNotificationsAsRead")) {
812
+ adapter.markAllNotificationsAsRead = () => useGraphqlMutation("pbMarkNotificationsAsRead", {
813
+ uuids: void 0
814
+ }).then((v) => v.data.count);
815
+ }
778
816
  if (hasQuery("pbReferencedEntities")) {
779
817
  adapter.getReferencedEntities = (uuids) => useGraphqlQuery("pbReferencedEntities", {
780
818
  ...ctx.value,
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <button
3
- :data-test="`item-dropdown-action-${action.id}`"
4
3
  class="_bk_gap-10 _bk_group/tooltip _bk_grid _bk_grid-cols-[20px_1fr] _bk_w-full _bk_text-mono-300 _bk_items-center _bk_left-left _bk_leading-none _bk_disabled:opacity-20 _bk_disabled:pointer-events-none _bk_hover:text-white _bk_hover:bg-mono-800 _bk_px-10"
5
4
  :class="{
6
5
  '_bk_hover:bg-orange-normal/10! _bk_hover:text-orange-light!': action.variant === 'agent',
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{
4
+ side: "left" | "right";
5
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ end: () => any;
7
+ start: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<{
9
+ side: "left" | "right";
10
+ }> & Readonly<{
11
+ onEnd?: (() => any) | undefined;
12
+ onStart?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ class="_bk_hidden _bk_lg:flex _bk_absolute _bk_top-1 _bk_bottom-1 _bk_z-actions _bk_w-40 _bk_cursor-pointer _bk_bg-mono-950/90 _bk_hover:bg-mono-700 _bk_items-center _bk_justify-center"
5
+ :class="
6
+ side === 'left' ? '_bk_left-0 _bk_border-r _bk_border-r-mono-700' : '_bk_right-0 _bk_border-l _bk_border-l-mono-700'
7
+ "
8
+ @pointerdown="onPointerDown"
9
+ >
10
+ <Icon
11
+ :name="
12
+ side === 'left' ? 'bk_mdi_chevron_backward' : 'bk_mdi_chevron_forward'
13
+ "
14
+ class="_bk_fill-current _bk_pointer-events-none _bk_size-30"
15
+ />
16
+ </button>
17
+ </template>
18
+
19
+ <script setup>
20
+ import { onBeforeUnmount } from "#imports";
21
+ import { Icon } from "#blokkli/editor/components";
22
+ defineProps({
23
+ side: { type: String, required: true }
24
+ });
25
+ const emit = defineEmits(["start", "end"]);
26
+ let isPressed = false;
27
+ function onRelease() {
28
+ if (!isPressed) {
29
+ return;
30
+ }
31
+ isPressed = false;
32
+ window.removeEventListener("pointerup", onRelease);
33
+ window.removeEventListener("pointercancel", onRelease);
34
+ emit("end");
35
+ }
36
+ function onPointerDown() {
37
+ if (isPressed) {
38
+ return;
39
+ }
40
+ isPressed = true;
41
+ window.addEventListener("pointerup", onRelease);
42
+ window.addEventListener("pointercancel", onRelease);
43
+ emit("start");
44
+ }
45
+ onBeforeUnmount(onRelease);
46
+ </script>
47
+
48
+ <script>
49
+ export default {
50
+ name: "ActionsScrollArrow"
51
+ };
52
+ </script>
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{
4
+ side: "left" | "right";
5
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ end: () => any;
7
+ start: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<{
9
+ side: "left" | "right";
10
+ }> & Readonly<{
11
+ onEnd?: (() => any) | undefined;
12
+ onStart?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -7,7 +7,6 @@
7
7
  }"
8
8
  >
9
9
  <button
10
- data-test="item-actions-dropdown-toggle"
11
10
  class="bk-blokkli-item-actions-type-button bk-item-icon-hover-parent _bk_group/tooltip _bk_pl-10 _bk_pr-3 _bk_flex _bk_items-center _bk_lg:min-w-[180px] _bk_text-mono-300 _bk_font-bold _bk_h-full _bk_leading-none _bk_relative _bk_w-full _bk_cursor-pointer _bk_hover:text-mono-50 _bk_hover:bg-mono-700"
12
11
  tabindex="-1"
13
12
  :class="{
@@ -92,21 +91,22 @@
92
91
  />
93
92
  </button>
94
93
  <div
95
- v-if="editingEnabled"
96
- v-show="showDropdown"
94
+ v-show="showDropdown && editingEnabled"
97
95
  id="bk-blokkli-item-actions-dropdown"
98
96
  class="_bk_absolute _bk_bottom-full _bk_left-0 _bk_min-w-[300px] _bk_bg-mono-900 _bk_text-mono-200 _bk_shadow-xl-inverted _bk_w-screen _bk_lg:w-auto _bk_flex _bk_flex-col _bk_lg:top-full _bk_lg:bottom-auto _bk_lg:shadow-xl _bk_lg:left-[23px]"
99
97
  >
100
- <EditActionsItemDropdown
101
- v-if="showDropdown"
102
- @close="showDropdown = false"
103
- />
98
+ <div>
99
+ <EditActionsItemDropdown
100
+ v-if="showDropdown"
101
+ @close="showDropdown = false"
102
+ />
103
+ </div>
104
104
  </div>
105
105
  </div>
106
106
  </template>
107
107
 
108
108
  <script setup>
109
- import { watch, computed, useBlokkli } from "#imports";
109
+ import { watch, computed, nextTick, useBlokkli } from "#imports";
110
110
  import { falsy } from "#blokkli/helpers";
111
111
  import {
112
112
  Icon,
@@ -147,6 +147,7 @@ async function onToggleDropdown() {
147
147
  const willOpen = !showDropdown.value;
148
148
  if (willOpen) {
149
149
  await ui.flushPendingChanges();
150
+ await nextTick();
150
151
  }
151
152
  showDropdown.value = willOpen;
152
153
  }