@blokkli/editor 2.0.0-alpha.17 → 2.0.0-alpha.19

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 (138) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +380 -59
  3. package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +3 -1
  4. package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
  5. package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
  6. package/dist/modules/drupal/index.mjs +33 -0
  7. package/dist/modules/drupal/runtime/adapter/index.js +10 -2
  8. package/dist/runtime/adapter/index.d.ts +21 -0
  9. package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
  10. package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -13
  11. package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +20 -44
  12. package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
  13. package/dist/runtime/components/BlokkliEditable.vue +13 -13
  14. package/dist/runtime/components/BlokkliField.vue.d.ts +3 -3
  15. package/dist/runtime/components/BlokkliItem.vue +1 -1
  16. package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
  17. package/dist/runtime/components/BlokkliProvider.vue +12 -8
  18. package/dist/runtime/components/Edit/Actions/index.vue +27 -16
  19. package/dist/runtime/components/Edit/AnimationCanvas/index.vue +26 -10
  20. package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +3 -0
  21. package/dist/runtime/components/Edit/Dialog/index.vue +6 -4
  22. package/dist/runtime/components/Edit/DraggableList.vue +15 -7
  23. package/dist/runtime/components/Edit/DraggableList.vue.d.ts +5 -5
  24. package/dist/runtime/components/Edit/EditProvider.vue +29 -16
  25. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +1 -0
  26. package/dist/runtime/components/Edit/Features/AddList/index.vue +9 -11
  27. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +9 -6
  28. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +1 -1
  29. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -11
  30. package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +19 -102
  31. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +3 -0
  32. package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +28 -52
  33. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
  34. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
  35. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
  36. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue.d.ts +11 -0
  37. package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
  38. package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue.d.ts +2 -0
  39. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +15 -16
  40. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
  41. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/{Group → Item}/index.vue.d.ts +9 -13
  42. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +46 -66
  43. package/dist/runtime/components/Edit/Features/Comments/index.vue +1 -1
  44. package/dist/runtime/components/Edit/Features/Conversions/index.vue +4 -7
  45. package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +2 -2
  46. package/dist/runtime/components/Edit/Features/Debug/index.vue +4 -1
  47. package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
  48. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +13 -5
  49. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +14 -11
  50. package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +30 -18
  51. package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
  52. package/dist/runtime/components/Edit/Features/Edit/index.vue +15 -21
  53. package/dist/runtime/components/Edit/Features/EditForm/index.vue +7 -6
  54. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +8 -3
  55. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
  56. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +29 -12
  57. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
  58. package/dist/runtime/components/Edit/Features/EditableField/index.vue +40 -42
  59. package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
  60. package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -3
  61. package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +16 -25
  62. package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
  63. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +5 -5
  64. package/dist/runtime/components/Edit/Features/Library/index.vue +27 -23
  65. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +6 -3
  66. package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
  67. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +2 -2
  68. package/dist/runtime/components/Edit/Features/Options/Form/index.vue +7 -6
  69. package/dist/runtime/components/Edit/Features/Options/index.vue +6 -6
  70. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +68 -15
  71. package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
  72. package/dist/runtime/components/Edit/Features/Search/index.vue +4 -1
  73. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +3 -3
  74. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +34 -11
  75. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +21 -20
  76. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +2 -2
  77. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +3 -3
  78. package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
  79. package/dist/runtime/components/Edit/Features/Selection/index.vue +61 -27
  80. package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
  81. package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
  82. package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
  83. package/dist/runtime/components/Edit/Features/Transform/index.vue +2 -27
  84. package/dist/runtime/components/Edit/Features/Translations/index.vue +7 -7
  85. package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
  86. package/dist/runtime/components/Edit/Features/index.vue +17 -7
  87. package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
  88. package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
  89. package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
  90. package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
  91. package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue → ScheduleDate/index.vue} +6 -58
  92. package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue.d.ts → ScheduleDate/index.vue.d.ts} +11 -1
  93. package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +3 -0
  94. package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
  95. package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
  96. package/dist/runtime/components/Edit/index.d.ts +3 -1
  97. package/dist/runtime/components/Edit/index.js +5 -1
  98. package/dist/runtime/css/output.css +1 -1
  99. package/dist/runtime/helpers/animationProvider.d.ts +2 -1
  100. package/dist/runtime/helpers/animationProvider.js +6 -2
  101. package/dist/runtime/helpers/composables/useStateBasedCache.d.ts +4 -0
  102. package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
  103. package/dist/runtime/helpers/definitionProvider.d.ts +1 -1
  104. package/dist/runtime/helpers/dom/index.d.ts +1 -1
  105. package/dist/runtime/helpers/domProvider.d.ts +10 -16
  106. package/dist/runtime/helpers/domProvider.js +80 -135
  107. package/dist/runtime/helpers/index.d.ts +1 -8
  108. package/dist/runtime/helpers/index.js +1 -84
  109. package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
  110. package/dist/runtime/helpers/providers/blocks.js +91 -0
  111. package/dist/runtime/helpers/providers/directive.d.ts +24 -0
  112. package/dist/runtime/helpers/{editableProvider.js → providers/directive.js} +90 -29
  113. package/dist/runtime/helpers/providers/element.d.ts +6 -0
  114. package/dist/runtime/helpers/providers/element.js +35 -0
  115. package/dist/runtime/helpers/providers/fields.d.ts +8 -0
  116. package/dist/runtime/helpers/providers/fields.js +47 -0
  117. package/dist/runtime/helpers/selectionProvider.d.ts +11 -11
  118. package/dist/runtime/helpers/selectionProvider.js +38 -45
  119. package/dist/runtime/helpers/stateProvider.d.ts +1 -0
  120. package/dist/runtime/helpers/stateProvider.js +21 -15
  121. package/dist/runtime/helpers/themeProvider.d.ts +2 -1
  122. package/dist/runtime/helpers/themeProvider.js +24 -14
  123. package/dist/runtime/helpers/typesProvider.js +10 -26
  124. package/dist/runtime/helpers/uiProvider.d.ts +3 -2
  125. package/dist/runtime/helpers/uiProvider.js +11 -15
  126. package/dist/runtime/icons/calendar.svg +1 -0
  127. package/dist/runtime/icons/clock.svg +1 -0
  128. package/dist/runtime/icons/comment_add.svg +1 -5
  129. package/dist/runtime/icons/delete.svg +1 -8
  130. package/dist/runtime/icons/duplicate.svg +1 -12
  131. package/dist/runtime/icons/edit.svg +1 -8
  132. package/dist/runtime/icons/reusable.svg +1 -5
  133. package/dist/runtime/plugins/{blokkliEditable.js → blokkliDirectives.js} +14 -20
  134. package/dist/runtime/types/index.d.ts +55 -36
  135. package/package.json +1 -1
  136. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -63
  137. package/dist/runtime/helpers/editableProvider.d.ts +0 -14
  138. /package/dist/runtime/plugins/{blokkliEditable.d.ts → blokkliDirectives.d.ts} +0 -0
@@ -1,63 +0,0 @@
1
- <template>
2
- <div v-if="shouldRender" class="bk-command-palette-results-list">
3
- <div>
4
- <button
5
- v-for="item in mapped"
6
- v-show="item.visible"
7
- :key="item.id"
8
- :data-command-id="item.id"
9
- :data-command-visible="item.visible"
10
- class="bk-command"
11
- :class="{ 'bk-is-focused': focusedId === item.id }"
12
- @mouseenter="$emit('focus', item.id)"
13
- @click.prevent="$emit('select', item.id)"
14
- >
15
- <div class="bk-command-icon">
16
- <Icon v-if="item.icon" :name="item.icon" />
17
- <ItemIcon v-else :bundle="item.bundle" />
18
- </div>
19
- <Highlight :text="item.label" tag="span" :positions="item.positions" />
20
- <div class="bk-command-group">{{ getGroupLabel(item.group) }}</div>
21
- </button>
22
- </div>
23
- </div>
24
- </template>
25
-
26
- <script setup>
27
- import { computed, useBlokkli } from "#imports";
28
- import { Icon, ItemIcon, Highlight } from "#blokkli/components";
29
- const props = defineProps({
30
- commands: { type: Array, required: true },
31
- visibleIds: { type: null, required: true },
32
- focusedId: { type: String, required: true }
33
- });
34
- defineEmits(["close", "focus", "select"]);
35
- const { $t } = useBlokkli();
36
- const mapped = computed(() => {
37
- return props.commands.map((v) => {
38
- const found = props.visibleIds?.find((w) => w.id === v._id);
39
- return {
40
- ...v,
41
- visible: props.visibleIds === void 0 || !!found,
42
- positions: found?.positions
43
- };
44
- }).sort((a, b) => {
45
- const indexA = props.visibleIds?.findIndex((w) => w.id === a._id) || -1;
46
- const indexB = props.visibleIds?.findIndex((w) => w.id === b._id) || -1;
47
- return indexA - indexB;
48
- });
49
- });
50
- const getGroupLabel = (id) => {
51
- if (id === "ui") {
52
- return $t("commandGroup.ui", "Interface");
53
- } else if (id === "add") {
54
- return $t("commandGroup.add", "Add new");
55
- } else if (id === "action") {
56
- return $t("commandGroup.action", "Actions");
57
- } else if (id === "selection") {
58
- return $t("commandGroup.selection", "Selection");
59
- }
60
- return $t("commandGroup.misc", "Miscellaneous");
61
- };
62
- const shouldRender = computed(() => mapped.value.some((v) => v.visible));
63
- </script>
@@ -1,14 +0,0 @@
1
- import type { EntityContext, Rectangle } from '#blokkli/types';
2
- import type { UiProvider } from './uiProvider.js';
3
- type EditableFieldData = EntityContext & {
4
- fieldName: string;
5
- };
6
- export type EditableProvider = {
7
- init: () => void;
8
- registerEditableField: (el: HTMLElement, fieldName: string, entity: EntityContext) => void;
9
- unregisterEditableField: (el: HTMLElement, fieldName: string, entity: EntityContext) => void;
10
- getVisible: () => Rectangle[];
11
- getEditableAtPoint: (x: number, y: number) => EditableFieldData | undefined;
12
- };
13
- export default function (ui: UiProvider): EditableProvider;
14
- export {};