@blokkli/editor 2.0.0-alpha.45 → 2.0.0-alpha.47

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 (87) hide show
  1. package/dist/module.d.mts +2 -2
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +23 -1
  4. package/dist/modules/agent/index.d.mts +1 -1
  5. package/dist/modules/agent/runtime/app/helpers/validation.d.ts +13 -0
  6. package/dist/modules/agent/runtime/app/helpers/validation.js +22 -0
  7. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +12 -0
  8. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +12 -1
  9. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +12 -0
  10. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +10 -0
  11. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +12 -0
  12. package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -0
  13. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +15 -0
  14. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +12 -0
  15. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +12 -0
  16. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +16 -1
  17. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +17 -0
  18. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +11 -0
  19. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +8 -0
  20. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +10 -0
  21. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +10 -0
  22. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +15 -0
  23. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +21 -1
  24. package/dist/modules/agent/runtime/app/types/index.d.ts +6 -6
  25. package/dist/modules/charts/index.d.mts +1 -1
  26. package/dist/modules/drupal/index.d.mts +1 -1
  27. package/dist/modules/drupal/index.mjs +2 -1
  28. package/dist/modules/drupal/runtime/adapter/index.js +15 -3
  29. package/dist/modules/table-of-contents/index.d.mts +1 -1
  30. package/dist/runtime/editor/components/Actions/index.vue +47 -2
  31. package/dist/runtime/editor/components/AnimationCanvas/index.vue +6 -3
  32. package/dist/runtime/editor/components/BundleSelector/index.d.vue.ts +8 -4
  33. package/dist/runtime/editor/components/BundleSelector/index.vue +111 -13
  34. package/dist/runtime/editor/components/BundleSelector/index.vue.d.ts +8 -4
  35. package/dist/runtime/editor/components/EditProvider.vue +2 -2
  36. package/dist/runtime/editor/components/FlexTextarea/index.vue +227 -11
  37. package/dist/runtime/editor/css/output.css +1 -1
  38. package/dist/runtime/editor/features/add-list/Blocks/index.vue +6 -3
  39. package/dist/runtime/editor/features/analyze/Renderer/index.vue +1 -1
  40. package/dist/runtime/editor/features/block-scheduler/index.vue +7 -1
  41. package/dist/runtime/editor/features/changelog/Dialog/index.d.vue.ts +7 -0
  42. package/dist/runtime/editor/features/changelog/Dialog/index.vue +43 -0
  43. package/dist/runtime/editor/features/changelog/Dialog/index.vue.d.ts +7 -0
  44. package/dist/runtime/editor/features/changelog/changelog.json +50 -0
  45. package/dist/runtime/editor/features/changelog/index.d.vue.ts +3 -0
  46. package/dist/runtime/editor/features/changelog/index.vue +56 -0
  47. package/dist/runtime/editor/features/changelog/index.vue.d.ts +3 -0
  48. package/dist/runtime/editor/features/clipboard/index.vue +6 -1
  49. package/dist/runtime/editor/features/comments/AddForm/index.d.vue.ts +2 -2
  50. package/dist/runtime/editor/features/comments/AddForm/index.vue.d.ts +2 -2
  51. package/dist/runtime/editor/features/delete/index.vue +17 -2
  52. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +12 -2
  53. package/dist/runtime/editor/features/dragging-overlay/index.vue +5 -2
  54. package/dist/runtime/editor/features/duplicate/index.vue +23 -7
  55. package/dist/runtime/editor/features/edit/index.vue +29 -8
  56. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  57. package/dist/runtime/editor/features/editable-field/index.vue +15 -1
  58. package/dist/runtime/editor/features/fragments/index.vue +5 -2
  59. package/dist/runtime/editor/features/hover/Renderer/index.vue +19 -6
  60. package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +5 -2
  61. package/dist/runtime/editor/features/library/index.vue +52 -8
  62. package/dist/runtime/editor/features/media-library/index.vue +7 -2
  63. package/dist/runtime/editor/features/multi-select/Renderer/index.vue +4 -1
  64. package/dist/runtime/editor/features/search/index.vue +7 -2
  65. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -1
  66. package/dist/runtime/editor/features/selection/AddButtons/index.vue +26 -2
  67. package/dist/runtime/editor/features/selection/Renderer/index.vue +23 -5
  68. package/dist/runtime/editor/features/selection/Renderer/vertex.glsl +5 -2
  69. package/dist/runtime/editor/features/selection/index.vue +17 -5
  70. package/dist/runtime/editor/features/translations/index.vue +17 -11
  71. package/dist/runtime/editor/helpers/dropTargets/index.d.ts +1 -1
  72. package/dist/runtime/editor/helpers/dropTargets/index.js +2 -2
  73. package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +4 -1
  74. package/dist/runtime/editor/plugins/ItemAction/index.vue +9 -3
  75. package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +4 -1
  76. package/dist/runtime/editor/providers/permissions.d.ts +22 -1
  77. package/dist/runtime/editor/providers/permissions.js +99 -3
  78. package/dist/runtime/editor/providers/selection.d.ts +2 -1
  79. package/dist/runtime/editor/providers/selection.js +10 -5
  80. package/dist/runtime/editor/translations/de.json +109 -1
  81. package/dist/runtime/editor/translations/fr.json +109 -1
  82. package/dist/runtime/editor/translations/gsw_CH.json +109 -1
  83. package/dist/runtime/editor/translations/it.json +109 -1
  84. package/dist/runtime/editor/types/definitions.d.ts +2 -0
  85. package/dist/shared/{editor.BdBm1Z7C.d.mts → editor.BVregnEC.d.mts} +24 -0
  86. package/dist/types.d.mts +1 -1
  87. package/package.json +2 -1
@@ -274,7 +274,8 @@ fragment paragraphsBlokkliParagraphEditContext on ParagraphsBlokkliParagraphEdit
274
274
  "allowReusable",
275
275
  "isTranslatable",
276
276
  "hasPublishOn",
277
- "hasUnpublishOn"
277
+ "hasUnpublishOn",
278
+ "permissions"
278
279
  ].includes(field);
279
280
  });
280
281
  graphql.addDocument(
@@ -137,9 +137,21 @@ export default defineBlokkliEditAdapter(
137
137
  clipboard: v.data.clipboards || [],
138
138
  userPermissions: v.data.userPermissions,
139
139
  availableFeatures: v.data.features,
140
- allTypes: (v.data.allTypes.items || []).filter(
141
- (v2) => v2 && "id" in v2
142
- ),
140
+ allTypes: (v.data.allTypes.items || []).map((v2) => {
141
+ if (v2 && "id" in v2 && v2.id) {
142
+ return {
143
+ id: v2.id,
144
+ label: v2.label ?? "",
145
+ description: v2.description ?? "",
146
+ allowReusable: !!v2.allowReusable,
147
+ isTranslatable: !!v2.isTranslatable,
148
+ hasPublishOn: !!v2.hasPublishOn,
149
+ hasUnpublishOn: !!v2.hasUnpublishOn,
150
+ permissions: v2.permissions ?? []
151
+ };
152
+ }
153
+ return null;
154
+ }).filter(falsy),
143
155
  fieldConfig: v.data.fieldConfig || [],
144
156
  editableFieldConfig: v.data.editableFieldConfig || [],
145
157
  droppableFieldConfig: v.data.droppableFieldConfig || [],
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.BdBm1Z7C.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.BVregnEC.mjs';
2
2
  import 'nuxt/schema';
3
3
  import 'consola';
4
4
  import '../../../dist/global/types/definitions.js';
@@ -29,7 +29,13 @@
29
29
  @click.prevent="showDropdown = !showDropdown"
30
30
  >
31
31
  <div v-if="shouldRenderButton" class="bk-tooltip">
32
- {{ $t("actionsDropdownToolip", "Further actions") }}
32
+ <span>{{ $t("actionsDropdownToolip", "Further actions") }}</span>
33
+ <div
34
+ v-if="restrictedPermissionsLabel"
35
+ class="bk-item-action-disabled-reason"
36
+ >
37
+ <span>{{ restrictedPermissionsLabel }}</span>
38
+ </div>
33
39
  </div>
34
40
  <div
35
41
  v-show="!hasSelectedHost"
@@ -57,6 +63,14 @@
57
63
  class="bk-blokkli-item-actions-title-count"
58
64
  >{{ selection.items.value.length }}</span
59
65
  >
66
+
67
+ <span
68
+ v-show="isPermissionRestricted"
69
+ class="bk-blokkli-item-actions-title-pill bk-is-restricted"
70
+ >
71
+ <Icon name="bk_mdi_lock" />
72
+ </span>
73
+
60
74
  <span
61
75
  v-show="selectedIsNew"
62
76
  class="bk-blokkli-item-actions-title-pill"
@@ -101,7 +115,7 @@ import {
101
115
  fragmentBlockBundle,
102
116
  fromLibraryBlockBundle
103
117
  } from "#blokkli-build/config";
104
- const { selection, $t, types, state, ui, definitions, debug } = useBlokkli();
118
+ const { selection, $t, types, state, ui, definitions, debug, permissions } = useBlokkli();
105
119
  const editingEnabled = computed(
106
120
  () => state.editMode.value === "editing" || state.editMode.value === "translating"
107
121
  );
@@ -225,6 +239,37 @@ const selectedIsNew = computed(() => {
225
239
  const items = selection.items.value;
226
240
  return !!items.length && items.every((v) => v.isNew);
227
241
  });
242
+ const permissionsForSelected = computed(() => {
243
+ const bundles = selection.bundles.value;
244
+ if (!bundles.length) {
245
+ return [];
246
+ }
247
+ const allPermissions = ["add", "delete", "edit"];
248
+ return allPermissions.filter(
249
+ (permission) => bundles.every(
250
+ (bundle) => permissions.checkBlockBundlePermission(bundle, permission)
251
+ )
252
+ );
253
+ });
254
+ const isPermissionRestricted = computed(
255
+ () => selection.items.value.length > 0 && permissionsForSelected.value.length < 3
256
+ );
257
+ const restrictedPermissionsLabel = computed(() => {
258
+ if (!isPermissionRestricted.value) {
259
+ return null;
260
+ }
261
+ const shared = permissionsForSelected.value;
262
+ if (shared.length === 0) {
263
+ return $t(
264
+ "restrictedPermissionsAll",
265
+ "Some actions are not available due to missing permissions."
266
+ );
267
+ }
268
+ return $t(
269
+ "restrictedPermissionsSome",
270
+ "Some actions are restricted due to missing permissions."
271
+ );
272
+ });
228
273
  const itemBundle = computed(() => {
229
274
  if (selection.bundles.value.length !== 1) {
230
275
  return;
@@ -45,7 +45,8 @@ const {
45
45
  state,
46
46
  directive,
47
47
  blocks,
48
- fields
48
+ fields,
49
+ permissions
49
50
  } = useBlokkli();
50
51
  function onCanvasFocus() {
51
52
  ui.setCanvasFocused(true);
@@ -114,7 +115,8 @@ function getInteractedElement(e) {
114
115
  const editableField = directive.getEditableAtPoint(x, y);
115
116
  if (editableField) {
116
117
  const editableUuid = editableField.type === itemEntityType ? editableField.uuid : void 0;
117
- if (!editableUuid || editableUuid === deepestUuid) {
118
+ const canEdit = !editableUuid || permissions.checkBlockBundlePermission(editableField.bundle, "edit") && !permissions.blockHasRestrictedAncestor(editableUuid);
119
+ if (canEdit && (!editableUuid || editableUuid === deepestUuid)) {
118
120
  return {
119
121
  editableFieldName: editableField.fieldName,
120
122
  uuid: editableUuid,
@@ -125,8 +127,9 @@ function getInteractedElement(e) {
125
127
  }
126
128
  }
127
129
  if (deepestUuid) {
130
+ const restrictedAncestor = permissions.getRestrictedAncestor(deepestUuid);
128
131
  return {
129
- uuid: deepestUuid,
132
+ uuid: restrictedAncestor ?? deepestUuid,
130
133
  timestamp: Date.now(),
131
134
  x,
132
135
  y
@@ -1,19 +1,23 @@
1
1
  import type { Coord } from '#blokkli/editor/types/geometry';
2
+ import type { BlokkliFieldElement } from '#blokkli/editor/types/field';
2
3
  type __VLS_Props = {
3
4
  bundles: string[];
4
5
  anchorEl?: HTMLElement;
5
6
  anchorCoordinates?: Coord;
6
7
  label: string;
7
8
  hideActions?: boolean;
9
+ field?: BlokkliFieldElement;
8
10
  };
9
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- select: (id: string) => any;
11
- close: () => any;
12
- action: (action: AddAction) => any;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ select: (id: string) => void;
13
+ fragment: (id: string) => void;
14
+ action: (action: AddAction) => void;
15
+ close: () => void;
13
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
17
  onSelect?: ((id: string) => any) | undefined;
15
18
  onClose?: (() => any) | undefined;
16
19
  onAction?: ((action: AddAction) => any) | undefined;
20
+ onFragment?: ((id: string) => any) | undefined;
17
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
22
  declare const _default: typeof __VLS_export;
19
23
  export default _default;
@@ -13,7 +13,7 @@
13
13
  class="bk-selection-add-overlay-wrapper bk-scrollbar-dark"
14
14
  >
15
15
  <div
16
- v-if="items.length > 4"
16
+ v-if="allItems.length > 4"
17
17
  class="bk-selection-add-overlay-form"
18
18
  @pointerdown.stop
19
19
  @keydown.capture.stop
@@ -47,14 +47,50 @@
47
47
  height
48
48
  }"
49
49
  >
50
- <div class="bk-selection-add-overlay-list" @wheel.passive="onWheel">
50
+ <div
51
+ v-if="filteredBlocks.length"
52
+ class="bk-selection-add-overlay-list"
53
+ @wheel.passive="onWheel"
54
+ >
51
55
  <AddListItem
52
- v-for="item in filteredItems"
56
+ v-for="item in filteredBlocks"
53
57
  :key="item.props.id"
54
58
  v-bind="item.props"
55
59
  @click.prevent="onClick(item)"
56
60
  />
57
61
  </div>
62
+ <div
63
+ v-if="filteredActions.length"
64
+ class="bk-selection-add-overlay-section"
65
+ >
66
+ <div class="bk-selection-add-overlay-section-label">
67
+ <span>{{ $t("bundleSelectorActionsLabel", "Actions") }}</span>
68
+ </div>
69
+ <div class="bk-selection-add-overlay-list" @wheel.passive="onWheel">
70
+ <AddListItem
71
+ v-for="item in filteredActions"
72
+ :key="item.props.id"
73
+ v-bind="item.props"
74
+ @click.prevent="onClick(item)"
75
+ />
76
+ </div>
77
+ </div>
78
+ <div
79
+ v-if="filteredFragments.length"
80
+ class="bk-selection-add-overlay-section"
81
+ >
82
+ <div class="bk-selection-add-overlay-section-label">
83
+ <span>{{ $t("bundleSelectorFragmentsLabel", "Fragments") }}</span>
84
+ </div>
85
+ <div class="bk-selection-add-overlay-list" @wheel.passive="onWheel">
86
+ <AddListItem
87
+ v-for="item in filteredFragments"
88
+ :key="item.props.id"
89
+ v-bind="item.props"
90
+ @click.prevent="onClick(item)"
91
+ />
92
+ </div>
93
+ </div>
58
94
  </div>
59
95
  </div>
60
96
  </ArtboardTooltip>
@@ -72,14 +108,16 @@ import {
72
108
  import { ArtboardTooltip, AddListItem, Icon } from "#blokkli/editor/components";
73
109
  import { isInternalBundle } from "#blokkli/editor/helpers/bundles";
74
110
  import { Fzf } from "fzf";
111
+ import { fragmentBlockBundle } from "#blokkli-build/config";
75
112
  const props = defineProps({
76
113
  bundles: { type: Array, required: true },
77
114
  anchorEl: { type: null, required: false },
78
115
  anchorCoordinates: { type: Object, required: false },
79
116
  label: { type: String, required: true },
80
- hideActions: { type: Boolean, required: false }
117
+ hideActions: { type: Boolean, required: false },
118
+ field: { type: Object, required: false }
81
119
  });
82
- const emit = defineEmits(["select", "action", "close"]);
120
+ const emit = defineEmits(["select", "fragment", "action", "close"]);
83
121
  const searchText = ref("");
84
122
  const width = ref("auto");
85
123
  const height = ref("auto");
@@ -106,7 +144,7 @@ function onClearSearchText() {
106
144
  }
107
145
  searchText.value = "";
108
146
  }
109
- const { types, plugins, storage, $t, definitions } = useBlokkli();
147
+ const { types, plugins, storage, $t, definitions, permissions, ui } = useBlokkli();
110
148
  const favorites = storage.use("blockFavorites", []);
111
149
  const blocks = computed(() => {
112
150
  return props.bundles.filter((bundle) => !isInternalBundle(bundle)).map((bundle) => {
@@ -139,11 +177,45 @@ const blocks = computed(() => {
139
177
  };
140
178
  });
141
179
  });
180
+ const fragments = computed(() => {
181
+ if (!props.field || !props.field.allowedFragments.length) {
182
+ return [];
183
+ }
184
+ if (!props.bundles.includes(fragmentBlockBundle)) {
185
+ return [];
186
+ }
187
+ if (!permissions.checkBlockBundlePermission(fragmentBlockBundle, "add")) {
188
+ return [];
189
+ }
190
+ return props.field.allowedFragments.map((name) => {
191
+ const definition = definitions.getFragmentDefinition(name);
192
+ if (!definition) {
193
+ return null;
194
+ }
195
+ return {
196
+ type: "fragment",
197
+ name,
198
+ label: definition.label,
199
+ description: definition.description ?? "",
200
+ props: {
201
+ id: "fragment:" + name,
202
+ label: definition.label,
203
+ color: "accent",
204
+ context: "selection-add-buttons",
205
+ icon: definition.editor?.icon ?? "bk_mdi_newspaper",
206
+ noContextMenu: true
207
+ }
208
+ };
209
+ }).filter((v) => v !== null);
210
+ });
142
211
  const actions = computed(() => {
143
212
  if (props.hideActions) {
144
213
  return [];
145
214
  }
146
215
  return plugins.get("addAction").filter((action) => {
216
+ if (action.id === "fragment" && fragments.value.length) {
217
+ return false;
218
+ }
147
219
  if (!action.itemBundle) {
148
220
  return true;
149
221
  }
@@ -165,20 +237,30 @@ const actions = computed(() => {
165
237
  };
166
238
  });
167
239
  });
168
- const items = computed(() => {
169
- return [...blocks.value, ...actions.value];
240
+ const allItems = computed(() => {
241
+ return [...blocks.value, ...fragments.value, ...actions.value];
170
242
  });
171
- const fzf = new Fzf(items.value, {
243
+ const fzf = new Fzf(allItems.value, {
172
244
  selector: (item) => item.label + " " + item.description
173
245
  });
174
- const filteredItems = computed(() => {
246
+ function filterBySearch(items) {
247
+ const text = searchText.value.trim();
248
+ if (!text) {
249
+ return items;
250
+ }
251
+ const textLower = text.toLowerCase();
252
+ return items.filter(
253
+ (item) => item.label.toLowerCase().includes(textLower) || item.description.toLowerCase().includes(textLower)
254
+ );
255
+ }
256
+ const filteredBlocks = computed(() => {
175
257
  const text = searchText.value.trim();
176
258
  if (!text) {
177
- return items.value;
259
+ return blocks.value;
178
260
  }
179
261
  const results = fzf.find(text);
180
262
  const textLower = text.toLowerCase();
181
- return results.map((r) => r.item).sort((a, b) => {
263
+ return results.map((r) => r.item).filter((item) => item.type === "block").sort((a, b) => {
182
264
  const aInLabel = a.label.toLowerCase().includes(textLower);
183
265
  const bInLabel = b.label.toLowerCase().includes(textLower);
184
266
  if (aInLabel && !bInLabel) return -1;
@@ -186,6 +268,8 @@ const filteredItems = computed(() => {
186
268
  return 0;
187
269
  });
188
270
  });
271
+ const filteredFragments = computed(() => filterBySearch(fragments.value));
272
+ const filteredActions = computed(() => filterBySearch(actions.value));
189
273
  const onWheel = (e) => {
190
274
  if (hasScrollbar === null) {
191
275
  const element = scrollEl.value;
@@ -202,10 +286,12 @@ function onClick(item) {
202
286
  emit("select", item.bundle);
203
287
  } else if (item.type === "action") {
204
288
  emit("action", item.action);
289
+ } else if (item.type === "fragment") {
290
+ emit("fragment", item.name);
205
291
  }
206
292
  }
207
293
  function onSubmitForm() {
208
- const firstResult = filteredItems.value[0];
294
+ const firstResult = filteredBlocks.value[0] ?? filteredFragments.value[0] ?? filteredActions.value[0];
209
295
  if (firstResult) {
210
296
  onClick(firstResult);
211
297
  }
@@ -214,5 +300,17 @@ onMounted(() => {
214
300
  if (inputEl.value) {
215
301
  inputEl.value.focus();
216
302
  }
303
+ if (!ui.isMobile.value) {
304
+ requestAnimationFrame(() => {
305
+ if (!scrollEl.value) {
306
+ return;
307
+ }
308
+ const rect = scrollEl.value.getBoundingClientRect();
309
+ const available = window.innerHeight - rect.top - 30;
310
+ if (available > 0) {
311
+ scrollEl.value.style.maxHeight = Math.max(available, 200) + "px";
312
+ }
313
+ });
314
+ }
217
315
  });
218
316
  </script>
@@ -1,19 +1,23 @@
1
1
  import type { Coord } from '#blokkli/editor/types/geometry';
2
+ import type { BlokkliFieldElement } from '#blokkli/editor/types/field';
2
3
  type __VLS_Props = {
3
4
  bundles: string[];
4
5
  anchorEl?: HTMLElement;
5
6
  anchorCoordinates?: Coord;
6
7
  label: string;
7
8
  hideActions?: boolean;
9
+ field?: BlokkliFieldElement;
8
10
  };
9
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- select: (id: string) => any;
11
- close: () => any;
12
- action: (action: AddAction) => any;
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ select: (id: string) => void;
13
+ fragment: (id: string) => void;
14
+ action: (action: AddAction) => void;
15
+ close: () => void;
13
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
17
  onSelect?: ((id: string) => any) | undefined;
15
18
  onClose?: (() => any) | undefined;
16
19
  onAction?: ((action: AddAction) => any) | undefined;
20
+ onFragment?: ((id: string) => any) | undefined;
17
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
22
  declare const _default: typeof __VLS_export;
19
23
  export default _default;
@@ -203,7 +203,8 @@ const ui = uiProvider(
203
203
  const dom = domProvider(ui, debug, state, element);
204
204
  const theme = themeProvider(element);
205
205
  const blocks = blocksProvider(state, dom, context);
206
- const selection = selectionProvider(blocks);
206
+ const permissionsInstance = await permissionsProvider(adapter, blocks);
207
+ const selection = selectionProvider(blocks, permissionsInstance);
207
208
  const keyboard = keyboardProvider(eventBus);
208
209
  const animation = animationProvider(
209
210
  eventBus,
@@ -217,7 +218,6 @@ const types = await typesProvider(adapter, selection, context);
217
218
  const indicators = indicatorsProvider();
218
219
  const directive = directiveProvider(debug, ui);
219
220
  const fields = fieldsProvider(dom, types, state);
220
- const permissionsInstance = await permissionsProvider(adapter);
221
221
  const fieldValue = fieldValueProviderFn(
222
222
  adapters,
223
223
  directive,