@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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +380 -59
- package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +3 -1
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
- package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
- package/dist/modules/drupal/index.mjs +33 -0
- package/dist/modules/drupal/runtime/adapter/index.js +10 -2
- package/dist/runtime/adapter/index.d.ts +21 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -13
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +20 -44
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
- package/dist/runtime/components/BlokkliEditable.vue +13 -13
- package/dist/runtime/components/BlokkliField.vue.d.ts +3 -3
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
- package/dist/runtime/components/BlokkliProvider.vue +12 -8
- package/dist/runtime/components/Edit/Actions/index.vue +27 -16
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +26 -10
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +3 -0
- package/dist/runtime/components/Edit/Dialog/index.vue +6 -4
- package/dist/runtime/components/Edit/DraggableList.vue +15 -7
- package/dist/runtime/components/Edit/DraggableList.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/EditProvider.vue +29 -16
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Features/AddList/index.vue +9 -11
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +9 -6
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +1 -1
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -11
- package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +19 -102
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +3 -0
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +28 -52
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +15 -16
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/{Group → Item}/index.vue.d.ts +9 -13
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +46 -66
- package/dist/runtime/components/Edit/Features/Comments/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +4 -7
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Debug/index.vue +4 -1
- package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +13 -5
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +14 -11
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +30 -18
- package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
- package/dist/runtime/components/Edit/Features/Edit/index.vue +15 -21
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +7 -6
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +8 -3
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +29 -12
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +40 -42
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +16 -25
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/Library/index.vue +27 -23
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +6 -3
- package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue +7 -6
- package/dist/runtime/components/Edit/Features/Options/index.vue +6 -6
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +68 -15
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
- package/dist/runtime/components/Edit/Features/Search/index.vue +4 -1
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +3 -3
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +34 -11
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +21 -20
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +3 -3
- package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Selection/index.vue +61 -27
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
- package/dist/runtime/components/Edit/Features/Transform/index.vue +2 -27
- package/dist/runtime/components/Edit/Features/Translations/index.vue +7 -7
- package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/index.vue +17 -7
- package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
- package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue → ScheduleDate/index.vue} +6 -58
- package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue.d.ts → ScheduleDate/index.vue.d.ts} +11 -1
- package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +3 -0
- package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
- package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
- package/dist/runtime/components/Edit/index.d.ts +3 -1
- package/dist/runtime/components/Edit/index.js +5 -1
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.d.ts +2 -1
- package/dist/runtime/helpers/animationProvider.js +6 -2
- package/dist/runtime/helpers/composables/useStateBasedCache.d.ts +4 -0
- package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
- package/dist/runtime/helpers/definitionProvider.d.ts +1 -1
- package/dist/runtime/helpers/dom/index.d.ts +1 -1
- package/dist/runtime/helpers/domProvider.d.ts +10 -16
- package/dist/runtime/helpers/domProvider.js +80 -135
- package/dist/runtime/helpers/index.d.ts +1 -8
- package/dist/runtime/helpers/index.js +1 -84
- package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
- package/dist/runtime/helpers/providers/blocks.js +91 -0
- package/dist/runtime/helpers/providers/directive.d.ts +24 -0
- package/dist/runtime/helpers/{editableProvider.js → providers/directive.js} +90 -29
- package/dist/runtime/helpers/providers/element.d.ts +6 -0
- package/dist/runtime/helpers/providers/element.js +35 -0
- package/dist/runtime/helpers/providers/fields.d.ts +8 -0
- package/dist/runtime/helpers/providers/fields.js +47 -0
- package/dist/runtime/helpers/selectionProvider.d.ts +11 -11
- package/dist/runtime/helpers/selectionProvider.js +38 -45
- package/dist/runtime/helpers/stateProvider.d.ts +1 -0
- package/dist/runtime/helpers/stateProvider.js +21 -15
- package/dist/runtime/helpers/themeProvider.d.ts +2 -1
- package/dist/runtime/helpers/themeProvider.js +24 -14
- package/dist/runtime/helpers/typesProvider.js +10 -26
- package/dist/runtime/helpers/uiProvider.d.ts +3 -2
- package/dist/runtime/helpers/uiProvider.js +11 -15
- package/dist/runtime/icons/calendar.svg +1 -0
- package/dist/runtime/icons/clock.svg +1 -0
- package/dist/runtime/icons/comment_add.svg +1 -5
- package/dist/runtime/icons/delete.svg +1 -8
- package/dist/runtime/icons/duplicate.svg +1 -12
- package/dist/runtime/icons/edit.svg +1 -8
- package/dist/runtime/icons/reusable.svg +1 -5
- package/dist/runtime/plugins/{blokkliEditable.js → blokkliDirectives.js} +14 -20
- package/dist/runtime/types/index.d.ts +55 -36
- package/package.json +1 -1
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -63
- package/dist/runtime/helpers/editableProvider.d.ts +0 -14
- /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 {};
|
|
File without changes
|