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

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 (217) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  4. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  5. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  6. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +19 -0
  7. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  8. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  9. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
  10. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +12 -9
  11. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +2 -0
  12. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  13. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +2 -0
  14. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  15. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  16. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  17. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +12 -0
  18. package/dist/modules/agent/runtime/app/tools/schemas.js +20 -0
  19. package/dist/modules/agent/runtime/app/tools/search_media/index.js +1 -1
  20. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  21. package/dist/modules/agent/runtime/server/agent.js +0 -1
  22. package/dist/modules/agent/runtime/server/classes/Session/index.js +4 -0
  23. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  24. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  25. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  26. package/dist/modules/drupal/index.mjs +6 -1
  27. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  28. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  29. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  30. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  31. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  32. package/dist/runtime/editor/components/Actions/Title/index.vue +2 -2
  33. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  34. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  35. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  36. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  37. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  38. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  39. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  40. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  41. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  42. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  43. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  44. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  45. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  46. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  47. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  48. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  49. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  50. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  51. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  52. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  53. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  54. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  55. package/dist/runtime/editor/components/DiffApproval/index.vue +1 -0
  56. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  57. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  58. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  59. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  60. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  61. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  62. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  63. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  64. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  65. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  66. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  67. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  68. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  69. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  70. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  71. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  72. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  73. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  74. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  75. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  76. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  77. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  78. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  79. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  80. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  81. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  82. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  83. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  84. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  85. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  86. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  87. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  88. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  89. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  90. package/dist/runtime/editor/components/index.d.ts +1 -0
  91. package/dist/runtime/editor/components/index.js +1 -0
  92. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  93. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  94. package/dist/runtime/editor/composables/index.d.ts +3 -0
  95. package/dist/runtime/editor/composables/index.js +2 -0
  96. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  97. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  98. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  99. package/dist/runtime/editor/css/output.css +1 -1
  100. package/dist/runtime/editor/events/index.d.ts +23 -0
  101. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  102. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  103. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  104. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  105. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  106. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  107. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  108. package/dist/runtime/editor/features/anchors/types.js +1 -0
  109. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  110. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  111. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  112. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  113. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  114. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  115. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  116. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  117. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  118. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  119. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  120. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  121. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  122. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  123. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  124. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  125. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  126. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  127. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  128. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  129. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  130. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  131. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  132. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  133. package/dist/runtime/editor/features/comments/index.vue +28 -3
  134. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  135. package/dist/runtime/editor/features/delete/types.js +1 -0
  136. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  137. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  138. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  139. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  140. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  141. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  142. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  143. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  144. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  145. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  146. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  147. package/dist/runtime/editor/features/grid/index.vue +16 -15
  148. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  149. package/dist/runtime/editor/features/grid/types.js +1 -0
  150. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  151. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  152. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  153. package/dist/runtime/editor/features/help/index.vue +52 -47
  154. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  155. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  156. package/dist/runtime/editor/features/history/types.js +1 -0
  157. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  158. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  159. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  160. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  161. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  162. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  163. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  164. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  165. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  166. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  167. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  168. package/dist/runtime/editor/features/notifications/types.js +20 -0
  169. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  170. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  171. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  172. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  173. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  174. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  175. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  176. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  177. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  178. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  179. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  180. package/dist/runtime/editor/features/options/index.vue +7 -1
  181. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  182. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  183. package/dist/runtime/editor/features/ownership/types.js +1 -0
  184. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  185. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  186. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  187. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  188. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  189. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  190. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  191. package/dist/runtime/editor/features/revert/types.js +1 -0
  192. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  193. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  194. package/dist/runtime/editor/features/swap/types.js +1 -0
  195. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  196. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  197. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  198. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  199. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  200. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  201. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  202. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  203. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  204. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  205. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  206. package/dist/runtime/editor/plugins/index.js +1 -3
  207. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  208. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  209. package/dist/runtime/editor/providers/plugin.js +9 -0
  210. package/dist/runtime/editor/translations/de.json +51 -19
  211. package/dist/runtime/editor/translations/fr.json +16 -4
  212. package/dist/runtime/editor/translations/gsw_CH.json +44 -19
  213. package/dist/runtime/editor/translations/it.json +16 -4
  214. package/package.json +4 -5
  215. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  216. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  217. package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
@@ -9,7 +9,6 @@
9
9
  <FormToggle
10
10
  v-model="showResolved"
11
11
  :label="$t('commentsShowResolved', 'Show resolved')"
12
- data-test="comments-show-resolved"
13
12
  />
14
13
  </div>
15
14
 
@@ -22,6 +21,7 @@
22
21
  :key="root.uuid"
23
22
  :root="root"
24
23
  :replies="repliesByRoot.get(root.uuid) || []"
24
+ :highlight-uuid="highlightUuid"
25
25
  boxed
26
26
  @reply="$emit('reply', $event)"
27
27
  @edit="$emit('edit', $event)"
@@ -29,18 +29,22 @@
29
29
  @resolve="$emit('resolve', root.uuid)"
30
30
  @unresolve="$emit('unresolve', root.uuid)"
31
31
  @toggle-task="$emit('toggleTask', $event)"
32
+ @dismiss-highlight="$emit('dismissHighlight')"
32
33
  />
33
34
  </div>
34
35
  <div
35
36
  v-else
36
- class="_bk_flex-1 _bk_flex _bk_items-center _bk_justify-center _bk_p-30 _bk_text-center _bk_text-sm _bk_text-mono-500"
37
+ class="_bk_flex-1 _bk_flex _bk_flex-col _bk_items-center _bk_justify-center _bk_p-30 _bk_text-center _bk_text-base _bk_text-mono-500"
37
38
  >
38
- {{
39
- roots.length ? $t(
39
+ <Icon name="bk_mdi_mark_chat_read" class="_bk_size-70 _bk_mb-20" />
40
+ <div class="_bk_text-balance">
41
+ {{
42
+ roots.length ? $t(
40
43
  "commentsAllResolved",
41
44
  'All comments are resolved. Toggle "Show resolved" to view them.'
42
45
  ) : $t("commentsEmpty", "No comments yet.")
43
- }}
46
+ }}
47
+ </div>
44
48
  </div>
45
49
 
46
50
  <SidebarAddForm @submit="$emit('add', $event)" @start="onStartNewComment" />
@@ -49,15 +53,16 @@
49
53
 
50
54
  <script setup>
51
55
  import { computed, useBlokkli, useTemplateRef } from "#imports";
52
- import { FormToggle } from "#blokkli/editor/components";
56
+ import { FormToggle, Icon } from "#blokkli/editor/components";
53
57
  import CommentThread from "../Thread/index.vue";
54
58
  import SidebarAddForm from "./AddForm/index.vue";
55
59
  const { $t } = useBlokkli();
56
60
  const props = defineProps({
57
61
  comments: { type: Array, required: true },
58
- recentlyResolved: { type: Array, required: true }
62
+ recentlyResolved: { type: Array, required: true },
63
+ highlightUuid: { type: [String, null], required: false }
59
64
  });
60
- defineEmits(["reply", "edit", "toggleTask", "add", "delete", "resolve", "unresolve"]);
65
+ defineEmits(["reply", "edit", "toggleTask", "add", "delete", "resolve", "unresolve", "dismissHighlight"]);
61
66
  const rootEl = useTemplateRef("rootEl");
62
67
  const showResolved = defineModel("showResolved", { type: Boolean, ...{
63
68
  default: false
@@ -4,6 +4,13 @@ export default _default;
4
4
  declare const __VLS_export: import("vue").DefineComponent<{
5
5
  comments: CommentItem[];
6
6
  recentlyResolved: string[];
7
+ /**
8
+ * UUID of the deep-link target comment (root or reply). Passed through
9
+ * to each `<Comment>` via the thread; the matching comment self-scrolls
10
+ * and shows a persistent highlight ring. Cleared by the parent on the
11
+ * `dismissHighlight` event.
12
+ */
13
+ highlightUuid?: string | null;
7
14
  } & {
8
15
  showResolved?: boolean;
9
16
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -23,10 +30,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
23
30
  delete: (value: string) => void;
24
31
  resolve: (value: string) => void;
25
32
  unresolve: (value: string) => void;
33
+ dismissHighlight: () => void;
26
34
  "update:showResolved": (value: boolean) => void;
27
35
  }, string, import("vue").PublicProps, Readonly<{
28
36
  comments: CommentItem[];
29
37
  recentlyResolved: string[];
38
+ /**
39
+ * UUID of the deep-link target comment (root or reply). Passed through
40
+ * to each `<Comment>` via the thread; the matching comment self-scrolls
41
+ * and shows a persistent highlight ring. Cleared by the parent on the
42
+ * `dismissHighlight` event.
43
+ */
44
+ highlightUuid?: string | null;
30
45
  } & {
31
46
  showResolved?: boolean;
32
47
  }> & Readonly<{
@@ -42,6 +57,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
42
57
  uuid: string;
43
58
  taskIndex: number;
44
59
  }) => any) | undefined;
60
+ onDismissHighlight?: (() => any) | undefined;
45
61
  onReply?: ((value: {
46
62
  parentUuid: string;
47
63
  body: string;
@@ -4,7 +4,6 @@
4
4
  <button
5
5
  type="button"
6
6
  class="_bk_flex _bk_items-center _bk_text-xs _bk_font-medium _bk_gap-5 _bk_py-8 _bk_px-8 _bk_w-full _bk_hover:bg-mono-100 _bk_text-mono-500 _bk_border _bk_border-mono-200 _bk_rounded _bk_hover:border-mono-400 _bk_cursor-text!"
7
- data-test="comment-reply-button"
8
7
  @click="open"
9
8
  >
10
9
  <Icon name="bk_mdi_reply" class="_bk_size-15" />
@@ -5,6 +5,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
5
5
  root: CommentItem;
6
6
  replies: CommentItem[];
7
7
  boxed?: boolean;
8
+ /**
9
+ * UUID of the deep-link target inside this thread (root or reply).
10
+ * The matching `<Comment>` renders with a persistent highlight ring
11
+ * and emits `dismissHighlight` on the first `pointerleave` after
12
+ * engagement, which the thread forwards up.
13
+ */
14
+ highlightUuid?: string | null;
8
15
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
16
  reply: (value: {
10
17
  parentUuid: string;
@@ -21,10 +28,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
21
28
  delete: (uuid: string) => void;
22
29
  resolve: () => void;
23
30
  unresolve: () => void;
31
+ dismissHighlight: () => void;
24
32
  }, string, import("vue").PublicProps, Readonly<{
25
33
  root: CommentItem;
26
34
  replies: CommentItem[];
27
35
  boxed?: boolean;
36
+ /**
37
+ * UUID of the deep-link target inside this thread (root or reply).
38
+ * The matching `<Comment>` renders with a persistent highlight ring
39
+ * and emits `dismissHighlight` on the first `pointerleave` after
40
+ * engagement, which the thread forwards up.
41
+ */
42
+ highlightUuid?: string | null;
28
43
  }> & Readonly<{
29
44
  onDelete?: ((uuid: string) => any) | undefined;
30
45
  onEdit?: ((value: {
@@ -37,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
37
52
  uuid: string;
38
53
  taskIndex: number;
39
54
  }) => any) | undefined;
55
+ onDismissHighlight?: (() => any) | undefined;
40
56
  onReply?: ((value: {
41
57
  parentUuid: string;
42
58
  body: string;
@@ -1,9 +1,6 @@
1
1
  <template>
2
2
  <article
3
3
  class="bk-comment-thread _bk_relative _bk_font-sans"
4
- data-test="comment-thread"
5
- :data-test-uuid="root.uuid"
6
- :data-test-resolved="root.resolved"
7
4
  :class="{
8
5
  '_bk_rounded _bk_border _bk_hover:border-mono-400': boxed,
9
6
  '_bk_bg-white': !boxed,
@@ -13,12 +10,13 @@
13
10
  >
14
11
  <div
15
12
  :class="{
16
- '_bk_opacity-60 _bk_hover:opacity-100': root.resolved
13
+ '_bk_opacity-60 _bk_hover:opacity-100': root.resolved && !hasHighlightedComment
17
14
  }"
18
15
  >
19
16
  <Comment
20
17
  :comment="root"
21
18
  :is-reply="false"
19
+ :highlighted="root.uuid === highlightUuid"
22
20
  class="_bk_pb-10!"
23
21
  @select-blocks="onSelectBlocks"
24
22
  @edit="$emit('edit', { uuid: root.uuid, body: $event })"
@@ -28,6 +26,7 @@
28
26
  @toggle-task="
29
27
  $emit('toggleTask', { uuid: root.uuid, taskIndex: $event })
30
28
  "
29
+ @dismiss-highlight="$emit('dismissHighlight')"
31
30
  />
32
31
  <div
33
32
  v-if="replies.length"
@@ -41,12 +40,14 @@
41
40
  v-for="reply in replies"
42
41
  :key="reply.uuid"
43
42
  :comment="reply"
43
+ :highlighted="reply.uuid === highlightUuid"
44
44
  is-reply
45
45
  @edit="$emit('edit', { uuid: reply.uuid, body: $event })"
46
46
  @delete="$emit('delete', reply.uuid)"
47
47
  @toggle-task="
48
48
  $emit('toggleTask', { uuid: reply.uuid, taskIndex: $event })
49
49
  "
50
+ @dismiss-highlight="$emit('dismissHighlight')"
50
51
  />
51
52
  <div
52
53
  v-if="canReply"
@@ -70,10 +71,29 @@ const { adapter, eventBus } = useBlokkli();
70
71
  const props = defineProps({
71
72
  root: { type: Object, required: true },
72
73
  replies: { type: Array, required: true },
73
- boxed: { type: Boolean, required: false }
74
+ boxed: { type: Boolean, required: false },
75
+ highlightUuid: { type: [String, null], required: false }
74
76
  });
75
- defineEmits(["reply", "edit", "toggleTask", "delete", "resolve", "unresolve"]);
77
+ defineEmits(["reply", "edit", "toggleTask", "delete", "resolve", "unresolve", "dismissHighlight"]);
76
78
  const canReply = computed(() => !!adapter.replyToComment);
79
+ const hasHighlightedComment = computed(() => {
80
+ if (!props.highlightUuid) {
81
+ return false;
82
+ }
83
+ if (props.root.uuid === props.highlightUuid) {
84
+ return true;
85
+ }
86
+ for (let i = 0; i < props.replies.length; i++) {
87
+ const reply = props.replies[i];
88
+ if (!reply) {
89
+ continue;
90
+ }
91
+ if (reply.uuid === props.highlightUuid) {
92
+ return true;
93
+ }
94
+ }
95
+ return false;
96
+ });
77
97
  function onSelectBlocks() {
78
98
  if (props.root.blockUuids?.length) {
79
99
  const uuid = props.root.blockUuids[0];
@@ -5,6 +5,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
5
5
  root: CommentItem;
6
6
  replies: CommentItem[];
7
7
  boxed?: boolean;
8
+ /**
9
+ * UUID of the deep-link target inside this thread (root or reply).
10
+ * The matching `<Comment>` renders with a persistent highlight ring
11
+ * and emits `dismissHighlight` on the first `pointerleave` after
12
+ * engagement, which the thread forwards up.
13
+ */
14
+ highlightUuid?: string | null;
8
15
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
16
  reply: (value: {
10
17
  parentUuid: string;
@@ -21,10 +28,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
21
28
  delete: (uuid: string) => void;
22
29
  resolve: () => void;
23
30
  unresolve: () => void;
31
+ dismissHighlight: () => void;
24
32
  }, string, import("vue").PublicProps, Readonly<{
25
33
  root: CommentItem;
26
34
  replies: CommentItem[];
27
35
  boxed?: boolean;
36
+ /**
37
+ * UUID of the deep-link target inside this thread (root or reply).
38
+ * The matching `<Comment>` renders with a persistent highlight ring
39
+ * and emits `dismissHighlight` on the first `pointerleave` after
40
+ * engagement, which the thread forwards up.
41
+ */
42
+ highlightUuid?: string | null;
28
43
  }> & Readonly<{
29
44
  onDelete?: ((uuid: string) => any) | undefined;
30
45
  onEdit?: ((value: {
@@ -37,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
37
52
  uuid: string;
38
53
  taskIndex: number;
39
54
  }) => any) | undefined;
55
+ onDismissHighlight?: (() => any) | undefined;
40
56
  onReply?: ((value: {
41
57
  parentUuid: string;
42
58
  body: string;
@@ -12,6 +12,7 @@
12
12
  v-model:show-resolved="showResolved"
13
13
  :comments
14
14
  :recently-resolved
15
+ :highlight-uuid="deepLinkUuid"
15
16
  @add="onAddComment($event, [])"
16
17
  @reply="onReply($event.parentUuid, $event.body)"
17
18
  @edit="onEditComment($event.uuid, $event.body)"
@@ -19,12 +20,12 @@
19
20
  @resolve="onResolveComment($event)"
20
21
  @unresolve="onUnresolveComment($event)"
21
22
  @toggle-task="onToggleTask($event.uuid, $event.taskIndex)"
23
+ @dismiss-highlight="deepLinkUuid = null"
22
24
  />
23
25
 
24
26
  <template v-if="unresolvedCount" #badge>
25
27
  <div
26
28
  class="bk-sidebar-badge bk-is-yellow"
27
- data-test="comments-unresolved-badge"
28
29
  >
29
30
  {{ unresolvedCount }}
30
31
  </div>
@@ -80,7 +81,9 @@ import {
80
81
  defineBlokkliFeature,
81
82
  computed,
82
83
  useTemplateRef,
83
- defineAsyncComponent
84
+ defineAsyncComponent,
85
+ onMounted,
86
+ useRoute
84
87
  } from "#imports";
85
88
  import { PluginSidebar, PluginItemAction } from "#blokkli/editor/plugins";
86
89
  import { BlokkliTransition } from "#blokkli/editor/components";
@@ -98,7 +101,8 @@ const { adapter } = defineBlokkliFeature({
98
101
  description: "Provides comment functionality for blocks.",
99
102
  screenshot: "feature-comments.jpg"
100
103
  });
101
- const { $t, selection, ui, storage } = useBlokkli();
104
+ const { $t, selection, ui, storage, eventBus } = useBlokkli();
105
+ const route = useRoute();
102
106
  const showResolved = storage.useWithContextPrefix("commentsShowResolved", false);
103
107
  const recentlyResolved = ref([]);
104
108
  const commentForm = useTemplateRef("commentForm");
@@ -113,6 +117,27 @@ comments.value = await adapter.loadComments();
113
117
  const unresolvedCount = computed(
114
118
  () => comments.value.filter((c) => !c.parentUuid && !c.resolved).length
115
119
  );
120
+ const deepLinkUuid = ref(null);
121
+ onMounted(() => {
122
+ const requested = route.query.blokkliComment;
123
+ if (typeof requested !== "string" || !requested) {
124
+ return;
125
+ }
126
+ const target = comments.value.find((c) => c.uuid === requested);
127
+ if (!target) {
128
+ return;
129
+ }
130
+ const rootUuid = target.parentUuid ?? target.uuid;
131
+ const root = comments.value.find((c) => c.uuid === rootUuid);
132
+ if (!root) {
133
+ return;
134
+ }
135
+ if (root.resolved) {
136
+ showResolved.value = true;
137
+ }
138
+ eventBus.emit("sidebar:open", "comments");
139
+ deepLinkUuid.value = target.uuid;
140
+ });
116
141
  const onAddComment = async (body, providedUuids) => {
117
142
  if (!adapter.addComment) {
118
143
  return;
@@ -6,3 +6,4 @@ declare module '#blokkli/editor/adapter' {
6
6
  deleteBlocks?: (uuids: string[]) => Promise<MutationResponseLike<T>>;
7
7
  }
8
8
  }
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,14 +1,4 @@
1
1
  <template>
2
- <PluginViewOption
3
- id="dev_mode"
4
- v-model="isEnabled"
5
- :label="$t('toggleInteractionLayers', 'Toggle interaction layers')"
6
- :title-on="$t('interactionLayersOn', 'Hide interaction layers')"
7
- :title-off="$t('interactionLayerOff', 'Show interaction layers')"
8
- icon="bk_mdi_logo_dev"
9
- key-code="I"
10
- weight="-99999"
11
- />
12
2
  <Teleport :to="ui.mainLayoutElement.value">
13
3
  <div v-if="fieldMappingValidations.length" class="bk bk-dev-mode">
14
4
  <div class="bk-dev-mode-inner">
@@ -43,10 +33,12 @@
43
33
  </template>
44
34
 
45
35
  <script setup>
46
- import { useBlokkli, defineBlokkliFeature, ref, computed } from "#imports";
47
- import { PluginViewOption } from "#blokkli/editor/plugins";
36
+ import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
48
37
  import { Banner, BannerInner } from "#blokkli/editor/components";
49
- import { addElementClasses } from "#blokkli/editor/composables";
38
+ import {
39
+ addElementClasses,
40
+ defineViewOption
41
+ } from "#blokkli/editor/composables";
50
42
  import { falsy } from "#blokkli/helpers";
51
43
  import { itemEntityType } from "#blokkli-build/config";
52
44
  defineBlokkliFeature({
@@ -58,7 +50,17 @@ defineBlokkliFeature({
58
50
  devOnly: true
59
51
  });
60
52
  const { $t, types, definitions, ui } = useBlokkli();
61
- const isEnabled = ref(false);
53
+ const { isVisible } = defineViewOption({
54
+ id: "dev_mode",
55
+ label: $t("viewOptionInteractionLayers", "Interaction layers"),
56
+ description: $t(
57
+ "viewOptionInteractionLayersDescription",
58
+ "Hides the editor overlays to preview the page as it will render."
59
+ ),
60
+ icon: "bk_mdi_logo_dev",
61
+ keyCode: "I",
62
+ weight: -99999
63
+ });
62
64
  const fieldMappingValidations = computed(() => {
63
65
  return definitions.blockDefinitions.value.flatMap((definition) => {
64
66
  if (definition.renderFor) {
@@ -100,7 +102,7 @@ const fieldMappingValidations = computed(() => {
100
102
  addElementClasses(
101
103
  document.documentElement,
102
104
  "bk-hide-interaction-layers",
103
- isEnabled
105
+ isVisible
104
106
  );
105
107
  </script>
106
108
 
@@ -399,6 +399,7 @@ onBeforeUnmount(() => {
399
399
  position: fixed;
400
400
  top: 0px;
401
401
  left: 0px;
402
+ border-radius: 4px;
402
403
  padding: 8px;
403
404
  white-space: nowrap;
404
405
  display: flex;
@@ -6,3 +6,4 @@ declare module '#blokkli/editor/adapter' {
6
6
  duplicateBlocks?: (uuids: string[]) => Promise<MutationResponseLike<T>>;
7
7
  }
8
8
  }
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -10,8 +10,6 @@
10
10
  :style
11
11
  :src="url"
12
12
  class="_bk_block _bk_w-full"
13
- data-test="editable-frame"
14
- :data-test-src="url"
15
13
  @load="onIframeLoad"
16
14
  />
17
15
  </div>
@@ -3,7 +3,6 @@
3
3
  id="bk-editable-field-textarea"
4
4
  v-model="modelValue"
5
5
  class="bk bk-editable-field-textarea"
6
- data-test="editable-plaintext"
7
6
  enterkeyhint="done"
8
7
  submit-on-enter
9
8
  rows="2"
@@ -3,9 +3,6 @@
3
3
  v-if="readabilityScore != null && readabilityBand"
4
4
  class="bk-editable-field-readability _bk_group/tooltip"
5
5
  :class="{ 'bk-is-stale': stale }"
6
- data-test="editable-readability"
7
- :data-test-band="readabilityBand"
8
- :data-test-too-short="false"
9
6
  >
10
7
  <span
11
8
  class="bk-editable-field-readability-dot"
@@ -79,8 +76,6 @@
79
76
  <div
80
77
  v-else-if="tooShort"
81
78
  class="bk-editable-field-readability"
82
- data-test="editable-readability"
83
- :data-test-too-short="true"
84
79
  >
85
80
  <span class="bk-editable-field-readability-dot" />
86
81
  <span>{{ $t("readabilityTooShort", "Too short") }}</span>
@@ -30,8 +30,6 @@
30
30
  <form
31
31
  ref="form"
32
32
  class="bk-editable-field-input"
33
- data-test="editable-overlay"
34
- :data-test-type="config.type"
35
33
  @submit.prevent="save"
36
34
  >
37
35
  <div ref="input">
@@ -69,7 +67,6 @@
69
67
  <button
70
68
  :disabled="!hasChanged"
71
69
  class="bk-artboard-tooltip-info-button bk-scheme-red"
72
- data-test="editable-discard"
73
70
  @click.prevent="discard"
74
71
  >
75
72
  {{ $t("editableFieldDiscard", "Discard") }}
@@ -108,8 +105,6 @@
108
105
  <div
109
106
  v-if="!isMarkup"
110
107
  class="bk-editable-field-info-count _bk_relative _bk_group/tooltip"
111
- data-test="editable-char-count"
112
- :data-test-count="count"
113
108
  >
114
109
  <span>{{ count }}</span>
115
110
  <span v-if="maxlength >= 1">&nbsp;/&nbsp;{{ maxlength }}</span>
@@ -1,25 +1,13 @@
1
1
  <template>
2
- <PluginViewOption
3
- id="mask"
4
- v-model="isActive"
5
- :label="$t('maskToggle', 'Toggle non-editable areas')"
6
- :title-on="$t('maskHide', 'Hide non-editable areas')"
7
- :title-off="$t('maskShow', 'Show non-editable areas')"
8
- :tour-text="
9
- $t(
10
- 'maskTourText',
11
- 'Toggle between showing or hiding non-editable parts of the page.'
12
- )
13
- "
14
- icon="bk_mdi_texture"
15
- key-code="M"
16
- />
2
+ <div />
17
3
  </template>
18
4
 
19
5
  <script setup>
20
- import { useBlokkli, defineBlokkliFeature, ref } from "#imports";
21
- import { PluginViewOption } from "#blokkli/editor/plugins";
22
- import { addElementClasses } from "#blokkli/editor/composables";
6
+ import { useBlokkli, defineBlokkliFeature } from "#imports";
7
+ import {
8
+ addElementClasses,
9
+ defineViewOption
10
+ } from "#blokkli/editor/composables";
23
11
  defineBlokkliFeature({
24
12
  id: "editable-mask",
25
13
  icon: "bk_mdi_texture",
@@ -28,8 +16,21 @@ defineBlokkliFeature({
28
16
  viewports: ["desktop"]
29
17
  });
30
18
  const { $t } = useBlokkli();
31
- const isActive = ref(false);
32
- addElementClasses(document.documentElement, "bk-hide-non-editable", isActive);
19
+ const { isVisible } = defineViewOption({
20
+ id: "mask",
21
+ label: $t("viewOptionNonEditableAreas", "Only editable areas"),
22
+ description: $t(
23
+ "viewOptionNonEditableAreasDescription",
24
+ "Hides parts of the page that cannot be edited."
25
+ ),
26
+ tourText: $t(
27
+ "maskTourText",
28
+ "Toggle between showing or hiding non-editable parts of the page."
29
+ ),
30
+ icon: "bk_mdi_texture",
31
+ keyCode: "M"
32
+ });
33
+ addElementClasses(document.documentElement, "bk-hide-non-editable", isVisible);
33
34
  </script>
34
35
 
35
36
  <script>
@@ -3,8 +3,6 @@
3
3
  <button
4
4
  v-if="scheduledDate"
5
5
  class="bk-toolbar-title-scheduled _bk_group/tooltip"
6
- data-test="toolbar-scheduled-date"
7
- :data-test-scheduled-date="scheduledDate"
8
6
  @click.prevent="onShowPublishDialog"
9
7
  >
10
8
  <Icon name="bk_mdi_calendar_clock" />
@@ -20,8 +18,6 @@
20
18
  <button
21
19
  ref="buttonEl"
22
20
  class="bk-toolbar-button _bk_group/tooltip _bk_w-full _bk_justify-start _bk_relative"
23
- data-test="entity-title"
24
- :data-test-entity-status="statusIndicatorStatus"
25
21
  :disabled="!state.canEdit.value"
26
22
  @click="onEditEntity"
27
23
  >
@@ -25,7 +25,6 @@
25
25
  v-model="searchText"
26
26
  type="text"
27
27
  class="bk-form-input"
28
- data-test="fragments-search"
29
28
  :placeholder="
30
29
  $t('fragmentsPlaceDialogSearchPlaceholder', 'Search fragments')
31
30
  "
@@ -45,8 +44,6 @@
45
44
  'bk-is-selected': selectedItem === item.name
46
45
  }"
47
46
  :data-bk-fragment-name="item.name"
48
- data-test="fragment-option"
49
- :data-test-fragment-name="item.name"
50
47
  @click="selectedItem = item.name"
51
48
  >
52
49
  <FragmentItem
@@ -62,7 +59,6 @@
62
59
  <template #footer>
63
60
  <button
64
61
  class="bk-button bk-scheme-accent"
65
- data-test="fragments-submit"
66
62
  @click="onSubmit"
67
63
  >
68
64
  {{ $t("fragmentsPlaceDialogSubmitButton", "Add selected fragment") }}
@@ -1,23 +1,10 @@
1
1
  <template>
2
- <PluginViewOption
3
- id="grid"
4
- v-slot="{ isActive }"
5
- :label="$t('gridToggle', 'Toggle grid')"
6
- :title-on="$t('gridShow', 'Show grid')"
7
- :title-off="$t('gridHide', 'Hide grid')"
8
- :tour-text="
9
- $t('gridTourText', 'Display a layout grid overlay on top of the page.')
10
- "
11
- key-code="G"
12
- icon="bk_mdi_grid_view"
13
- >
14
- <div v-if="isActive" class="bk-grid-overlay" v-html="gridMarkup" />
15
- </PluginViewOption>
2
+ <div v-if="isVisible" class="bk-grid-overlay" v-html="gridMarkup" />
16
3
  </template>
17
4
 
18
5
  <script setup>
19
6
  import { useBlokkli, defineBlokkliFeature } from "#imports";
20
- import { PluginViewOption } from "#blokkli/editor/plugins";
7
+ import { defineViewOption } from "#blokkli/editor/composables";
21
8
  const { adapter } = defineBlokkliFeature({
22
9
  id: "grid",
23
10
  label: "Grid",
@@ -28,6 +15,20 @@ const { adapter } = defineBlokkliFeature({
28
15
  });
29
16
  const gridMarkup = await Promise.resolve(adapter.getGridMarkup());
30
17
  const { $t } = useBlokkli();
18
+ const { isVisible } = defineViewOption({
19
+ id: "grid",
20
+ label: $t("viewOptionGrid", "Grid"),
21
+ description: $t(
22
+ "viewOptionGridDescription",
23
+ "Shows a layout grid overlay on top of the page."
24
+ ),
25
+ tourText: $t(
26
+ "gridTourText",
27
+ "Display a layout grid overlay on top of the page."
28
+ ),
29
+ keyCode: "G",
30
+ icon: "bk_mdi_grid_view"
31
+ });
31
32
  </script>
32
33
 
33
34
  <script>
@@ -6,3 +6,4 @@ declare module '#blokkli/editor/adapter' {
6
6
  getGridMarkup?: () => Promise<string> | string;
7
7
  }
8
8
  }
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
+ cancel: () => any;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onCancel?: (() => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;