@blokkli/editor 2.0.0-alpha.23 → 2.0.0-alpha.25
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 +252 -92
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +38 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +1 -1
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +15 -0
- package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +6 -0
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +28 -3
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -4
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue +11 -3
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +138 -3
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue +5 -1
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +116 -0
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +22 -13
- package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +22 -0
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +98 -0
- package/dist/runtime/blokkliPlugins/index.d.ts +1 -3
- package/dist/runtime/blokkliPlugins/index.js +0 -4
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +24 -0
- package/dist/runtime/components/Blocks/NotImplemented/index.vue.d.ts +6 -0
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +11 -0
- package/dist/runtime/components/BlokkliItem.vue +16 -3
- package/dist/runtime/components/BlokkliItem.vue.d.ts +2 -0
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Actions/ItemDropdown.vue +1 -1
- package/dist/runtime/components/Edit/Actions/index.vue +78 -73
- package/dist/runtime/components/Edit/AddListItem/index.vue +9 -35
- package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +6 -15
- package/dist/runtime/components/Edit/AppMenu/MenuButton.vue +39 -0
- package/dist/runtime/{blokkliPlugins/MenuButton/index.vue.d.ts → components/Edit/AppMenu/MenuButton.vue.d.ts} +0 -4
- package/dist/runtime/components/Edit/AppMenu/index.vue +62 -40
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +6 -0
- package/dist/runtime/components/Edit/BlockProxy/index.vue +2 -2
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +3 -0
- package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue +4 -1
- package/dist/runtime/components/Edit/Dialog/index.vue +33 -47
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/DraggableList.vue +12 -9
- package/dist/runtime/components/Edit/EditIndicator.vue +11 -4
- package/dist/runtime/components/Edit/EditProvider.vue +75 -55
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue +53 -0
- package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/AddList/Actions/index.vue +41 -0
- package/dist/runtime/components/Edit/Features/AddList/Actions/index.vue.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/AddList/Blocks/index.vue +13 -50
- package/dist/runtime/components/Edit/Features/AddList/Blocks/index.vue.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/AddList/index.vue +76 -119
- package/dist/runtime/components/Edit/Features/Analyze/Icon.vue +85 -0
- package/dist/runtime/components/Edit/Features/Analyze/Icon.vue.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/Main.vue +288 -59
- package/dist/runtime/components/Edit/Features/Analyze/Main.vue.d.ts +8 -1
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/fragment.glsl +25 -13
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/index.vue +114 -52
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/index.vue.d.ts +16 -2
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/vertex.glsl +31 -11
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +8 -1
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +4 -4
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +20 -2
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +11 -18
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +10 -3
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +46 -40
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +10 -4
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +8 -4
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +1 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +4 -3
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +2 -1
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +61 -20
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +15 -1
- package/dist/runtime/components/Edit/Features/Analyze/index.vue +23 -2
- package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +22 -8
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +42 -21
- package/dist/runtime/components/Edit/Features/Artboard/Scrollbar/index.vue +10 -4
- package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +2 -28
- package/dist/runtime/components/Edit/Features/Assistant/index.vue +18 -14
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +11 -1
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Clipboard/List/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +52 -18
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +0 -2
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue.d.ts +6 -4
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +77 -27
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +7 -4
- package/dist/runtime/components/Edit/Features/Comments/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Debug/Main.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue +113 -0
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue.d.ts +25 -0
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +8 -97
- package/dist/runtime/components/Edit/Features/DraggingOverlay/Renderer/fragment.glsl +2 -5
- package/dist/runtime/components/Edit/Features/DraggingOverlay/Renderer/index.vue +38 -5
- package/dist/runtime/components/Edit/Features/DraggingOverlay/Renderer/vertex.glsl +10 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +1 -2
- package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +8 -2
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +3 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +4 -3
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/EditableMask/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/EntityTitle/index.vue +7 -2
- package/dist/runtime/components/Edit/Features/Exit/index.vue +12 -9
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +27 -31
- package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +25 -24
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +9 -2
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +13 -3
- package/dist/runtime/components/Edit/Features/Library/index.vue +26 -24
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/MultiSelect/Renderer/index.vue +1 -3
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +3 -1
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +10 -0
- package/dist/runtime/components/Edit/Features/Publish/index.vue +17 -15
- package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/ResponsivePreview/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Revert/index.vue +24 -18
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +8 -2
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +12 -2
- package/dist/runtime/components/Edit/Features/Search/Overlay/index.vue +11 -3
- package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +128 -31
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +6 -6
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +3 -6
- package/dist/runtime/components/Edit/Features/Selection/Renderer/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Settings/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Settings/index.vue +26 -18
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Tour/index.vue +12 -10
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +7 -1
- package/dist/runtime/components/Edit/Features/Transform/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Translations/index.vue +18 -17
- package/dist/runtime/components/Edit/Form/Textarea/index.vue +1 -1
- package/dist/runtime/components/Edit/FormOverlay/index.vue +13 -4
- package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
- package/dist/runtime/components/Edit/InfoBox/index.vue +3 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +6 -1
- package/dist/runtime/components/Edit/ItemIconBox/index.vue +41 -0
- package/dist/runtime/components/Edit/{AddListItemIcon → ItemIconBox}/index.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/Konami/Game/index.vue +0 -1
- package/dist/runtime/components/Edit/Konami/index.vue +3 -5
- package/dist/runtime/components/Edit/Messages/Item/index.vue +11 -2
- package/dist/runtime/components/Edit/Messages/index.vue +6 -1
- package/dist/runtime/components/Edit/Overlay/index.vue +70 -0
- package/dist/runtime/components/Edit/Overlay/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue +3 -3
- package/dist/runtime/components/Edit/ScaleToFit/index.vue +4 -4
- package/dist/runtime/components/Edit/SystemRequirements/index.vue +36 -36
- package/dist/runtime/components/Edit/Toolbar/index.vue +47 -48
- package/dist/runtime/components/Edit/index.d.ts +2 -2
- package/dist/runtime/components/Edit/index.js +2 -2
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +1 -1
- package/dist/runtime/composables/useBlokkli.d.ts +6 -1
- package/dist/runtime/composables/useBlokkli.js +4 -1
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/composables/defineAddAction.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineAddAction.js +10 -0
- package/dist/runtime/helpers/composables/defineElementStyle.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineElementStyle.js +33 -0
- package/dist/runtime/helpers/composables/defineItemDropdownAction.d.ts +1 -1
- package/dist/runtime/helpers/composables/defineItemDropdownAction.js +2 -2
- package/dist/runtime/helpers/composables/defineMenuButton.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineMenuButton.js +10 -0
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +1 -1
- package/dist/runtime/helpers/composables/onBroadcastEvent.d.ts +1 -1
- package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +1 -1
- package/dist/runtime/helpers/composables/useBlockRegistration.js +12 -1
- package/dist/runtime/helpers/composables/useDebugLogger.d.ts +1 -1
- package/dist/runtime/helpers/composables/useDialog.d.ts +3 -0
- package/dist/runtime/helpers/composables/useDialog.js +16 -0
- package/dist/runtime/helpers/composables/useFocusTrap.d.ts +52 -0
- package/dist/runtime/helpers/composables/useFocusTrap.js +59 -0
- package/dist/runtime/helpers/composables/useGlobalBlokkliObject.d.ts +1 -1
- package/dist/runtime/helpers/{useTransitionedValue.js → composables/useTransitionedValue.js} +1 -1
- package/dist/runtime/helpers/dropTargets/index.d.ts +1 -1
- package/dist/runtime/helpers/dropTargets/index.js +17 -3
- package/dist/runtime/helpers/imports/index.d.ts +2 -1
- package/dist/runtime/helpers/imports/index.js +10 -1
- package/dist/runtime/helpers/{animationProvider.d.ts → providers/animation.d.ts} +100 -7
- package/dist/runtime/helpers/{animationProvider.js → providers/animation.js} +21 -11
- package/dist/runtime/helpers/providers/blocks.d.ts +25 -3
- package/dist/runtime/helpers/providers/blocks.js +19 -0
- package/dist/runtime/helpers/providers/commands.d.ts +41 -0
- package/dist/runtime/helpers/{commandsProvider.js → providers/commands.js} +1 -1
- package/dist/runtime/helpers/providers/debug.d.ts +125 -0
- package/dist/runtime/helpers/{debugProvider.js → providers/debug.js} +2 -2
- package/dist/runtime/helpers/providers/definition.d.ts +87 -0
- package/dist/runtime/helpers/providers/directive.d.ts +88 -2
- package/dist/runtime/helpers/providers/directive.js +18 -2
- package/dist/runtime/helpers/providers/dom.d.ts +225 -0
- package/dist/runtime/helpers/{domProvider.js → providers/dom.js} +34 -76
- package/dist/runtime/helpers/providers/dropArea.d.ts +47 -0
- package/dist/runtime/helpers/{dropAreaProvider.js → providers/dropArea.js} +1 -1
- package/dist/runtime/helpers/providers/element.d.ts +58 -1
- package/dist/runtime/helpers/providers/features.d.ts +56 -0
- package/dist/runtime/helpers/{featuresProvider.js → providers/features.js} +1 -1
- package/dist/runtime/helpers/providers/fields.d.ts +19 -4
- package/dist/runtime/helpers/providers/fields.js +1 -1
- package/dist/runtime/helpers/providers/indicators.d.ts +44 -0
- package/dist/runtime/helpers/providers/keyboard.d.ts +76 -0
- package/dist/runtime/helpers/{keyboardProvider.js → providers/keyboard.js} +1 -8
- package/dist/runtime/helpers/providers/plugin.d.ts +81 -0
- package/dist/runtime/helpers/providers/plugin.js +64 -0
- package/dist/runtime/helpers/{selectionProvider.d.ts → providers/selection.d.ts} +4 -1
- package/dist/runtime/helpers/{selectionProvider.js → providers/selection.js} +1 -1
- package/dist/runtime/helpers/providers/state.d.ts +227 -0
- package/dist/runtime/helpers/{stateProvider.js → providers/state.js} +3 -3
- package/dist/runtime/helpers/providers/storage.d.ts +64 -0
- package/dist/runtime/helpers/{textProvider.d.ts → providers/texts.d.ts} +1 -1
- package/dist/runtime/helpers/providers/theme.d.ts +119 -0
- package/dist/runtime/helpers/{themeProvider.js → providers/theme.js} +3 -3
- package/dist/runtime/helpers/providers/tour.d.ts +49 -0
- package/dist/runtime/helpers/{tourProvider.js → providers/tour.js} +1 -1
- package/dist/runtime/helpers/providers/types.d.ts +170 -0
- package/dist/runtime/helpers/{typesProvider.js → providers/types.js} +45 -1
- package/dist/runtime/helpers/providers/ui.d.ts +339 -0
- package/dist/runtime/helpers/{uiProvider.js → providers/ui.js} +94 -86
- package/dist/runtime/helpers/runtimeHelpers/index.d.ts +1 -1
- package/dist/runtime/helpers/symbols.d.ts +1 -0
- package/dist/runtime/helpers/symbols.js +3 -0
- package/dist/runtime/icons/click.svg +1 -0
- package/dist/runtime/types/blockOptions.d.ts +349 -0
- package/dist/runtime/types/index.d.ts +34 -31
- package/package.json +2 -2
- package/dist/runtime/blokkliPlugins/AddAction/index.vue +0 -96
- package/dist/runtime/blokkliPlugins/AddAction/index.vue.d.ts +0 -26
- package/dist/runtime/blokkliPlugins/MenuButton/index.vue +0 -68
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue +0 -19
- package/dist/runtime/helpers/commandsProvider.d.ts +0 -9
- package/dist/runtime/helpers/debugProvider.d.ts +0 -33
- package/dist/runtime/helpers/definitionProvider.d.ts +0 -19
- package/dist/runtime/helpers/domProvider.d.ts +0 -90
- package/dist/runtime/helpers/dropAreaProvider.d.ts +0 -9
- package/dist/runtime/helpers/featuresProvider.d.ts +0 -17
- package/dist/runtime/helpers/indicatorsProvider.d.ts +0 -10
- package/dist/runtime/helpers/keyboardProvider.d.ts +0 -20
- package/dist/runtime/helpers/pluginProvider.d.ts +0 -26
- package/dist/runtime/helpers/pluginProvider.js +0 -62
- package/dist/runtime/helpers/stateProvider.d.ts +0 -47
- package/dist/runtime/helpers/storageProvider.d.ts +0 -17
- package/dist/runtime/helpers/themeProvider.d.ts +0 -30
- package/dist/runtime/helpers/tourProvider.d.ts +0 -11
- package/dist/runtime/helpers/typesProvider.d.ts +0 -36
- package/dist/runtime/helpers/uiProvider.d.ts +0 -60
- package/dist/runtime/types/blokkOptions.d.ts +0 -100
- /package/dist/runtime/helpers/{addElementClasses.d.ts → composables/addElementClasses.d.ts} +0 -0
- /package/dist/runtime/helpers/{addElementClasses.js → composables/addElementClasses.js} +0 -0
- /package/dist/runtime/helpers/{useTransitionedValue.d.ts → composables/useTransitionedValue.d.ts} +0 -0
- /package/dist/runtime/helpers/{broadcastProvider.d.ts → providers/broadcast.d.ts} +0 -0
- /package/dist/runtime/helpers/{broadcastProvider.js → providers/broadcast.js} +0 -0
- /package/dist/runtime/helpers/{definitionProvider.js → providers/definition.js} +0 -0
- /package/dist/runtime/helpers/{indicatorsProvider.js → providers/indicators.js} +0 -0
- /package/dist/runtime/helpers/{storageProvider.js → providers/storage.js} +0 -0
- /package/dist/runtime/helpers/{textProvider.js → providers/texts.js} +0 -0
- /package/dist/runtime/types/{blokkOptions.js → blockOptions.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:id="'bk-menu-list-button-' + id"
|
|
4
|
+
class="bk-menu-list-button"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:class="type ? 'bk-is-' + type : ''"
|
|
7
|
+
@click.prevent.stop="onClick"
|
|
8
|
+
>
|
|
9
|
+
<div class="bk-menu-list-icon">
|
|
10
|
+
<slot>
|
|
11
|
+
<Icon v-if="icon" :name="icon" />
|
|
12
|
+
</slot>
|
|
13
|
+
</div>
|
|
14
|
+
<strong>{{ title }}</strong>
|
|
15
|
+
<span>{{ description }}</span>
|
|
16
|
+
</button>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { Icon } from "#blokkli/components";
|
|
21
|
+
defineProps({
|
|
22
|
+
id: { type: String, required: true },
|
|
23
|
+
title: { type: String, required: true },
|
|
24
|
+
description: { type: String, required: true },
|
|
25
|
+
disabled: { type: Boolean, required: false },
|
|
26
|
+
icon: { type: null, required: false },
|
|
27
|
+
type: { type: String, required: false }
|
|
28
|
+
});
|
|
29
|
+
const emit = defineEmits(["click"]);
|
|
30
|
+
function onClick() {
|
|
31
|
+
emit("click");
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
name: "MenuButton"
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
@@ -6,8 +6,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
icon?: BlokkliIcon;
|
|
8
8
|
type?: "success" | "danger" | "yellow";
|
|
9
|
-
weight?: number;
|
|
10
|
-
secondary?: boolean;
|
|
11
9
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
10
|
click: (...args: any[]) => void;
|
|
13
11
|
}, string, import("vue").PublicProps, Readonly<{
|
|
@@ -17,8 +15,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
17
15
|
disabled?: boolean;
|
|
18
16
|
icon?: BlokkliIcon;
|
|
19
17
|
type?: "success" | "danger" | "yellow";
|
|
20
|
-
weight?: number;
|
|
21
|
-
secondary?: boolean;
|
|
22
18
|
}> & Readonly<{
|
|
23
19
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
24
20
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -1,53 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div class="bk-
|
|
4
|
-
<button class="bk-
|
|
5
|
-
<Icon name="
|
|
2
|
+
<BlokkliTransition name="menu">
|
|
3
|
+
<div v-if="menuOpen" class="bk bk-menu-list">
|
|
4
|
+
<button :class="{ 'bk-is-active': menuOpen }" @click="closeMenu">
|
|
5
|
+
<Icon name="close" />
|
|
6
6
|
</button>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</aside>
|
|
7
|
+
<div class="bk-menu-list-inner">
|
|
8
|
+
<div id="bk-menu-primary">
|
|
9
|
+
<MenuButton
|
|
10
|
+
v-for="button in primaryButtons"
|
|
11
|
+
:id="button.id"
|
|
12
|
+
:key="button.id"
|
|
13
|
+
:title="button.title"
|
|
14
|
+
:description="button.description"
|
|
15
|
+
:icon="button.icon"
|
|
16
|
+
:type="button.type"
|
|
17
|
+
:disabled="button.disabled"
|
|
18
|
+
@click="onClick(button)"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<div id="bk-menu-secondary">
|
|
22
|
+
<MenuButton
|
|
23
|
+
v-for="button in secondaryButtons"
|
|
24
|
+
:id="button.id"
|
|
25
|
+
:key="button.id"
|
|
26
|
+
:title="button.title"
|
|
27
|
+
:description="button.description"
|
|
28
|
+
:icon="button.icon"
|
|
29
|
+
:type="button.type"
|
|
30
|
+
:disabled="button.disabled"
|
|
31
|
+
@click="onClick(button)"
|
|
32
|
+
/>
|
|
35
33
|
</div>
|
|
34
|
+
<aside class="bk-menu-meta">
|
|
35
|
+
<div class="bk-menu-meta-logo">
|
|
36
|
+
<Icon name="logo" />
|
|
37
|
+
<div><strong>@blokkli/editor</strong> {{ blokkliVersion }}</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div>
|
|
41
|
+
<a href="https://www.blokk.li" target="_blank">blokk.li</a>
|
|
42
|
+
</div>
|
|
43
|
+
</aside>
|
|
36
44
|
</div>
|
|
37
|
-
</
|
|
38
|
-
</
|
|
45
|
+
</div>
|
|
46
|
+
</BlokkliTransition>
|
|
39
47
|
</template>
|
|
40
48
|
|
|
41
49
|
<script setup>
|
|
42
50
|
import { computed, useBlokkli } from "#imports";
|
|
43
51
|
import { Icon, BlokkliTransition } from "#blokkli/components";
|
|
44
52
|
import { blokkliVersion } from "#blokkli-build/config";
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
import MenuButton from "./MenuButton.vue";
|
|
54
|
+
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
55
|
+
const DIALOG_MENU = "menu";
|
|
56
|
+
const { ui, plugins } = useBlokkli();
|
|
57
|
+
const menuOpen = computed(() => ui.currentDialog.value?.id === DIALOG_MENU);
|
|
58
|
+
function closeMenu() {
|
|
59
|
+
ui.closeDialog(DIALOG_MENU);
|
|
60
|
+
}
|
|
61
|
+
onBlokkliEvent("overlay:close", closeMenu);
|
|
62
|
+
const allButtons = computed(() => plugins.get("menuButton"));
|
|
63
|
+
const primaryButtons = computed(() => {
|
|
64
|
+
return allButtons.value.filter((button) => !button.secondary).sort((a, b) => (a.weight || 0) - (b.weight || 0));
|
|
65
|
+
});
|
|
66
|
+
const secondaryButtons = computed(() => {
|
|
67
|
+
return allButtons.value.filter((button) => button.secondary).sort((a, b) => (a.weight || 0) - (b.weight || 0));
|
|
68
|
+
});
|
|
69
|
+
function onClick(button) {
|
|
70
|
+
button.callback();
|
|
71
|
+
closeMenu();
|
|
72
|
+
}
|
|
51
73
|
</script>
|
|
52
74
|
|
|
53
75
|
<script>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:style="{
|
|
7
7
|
'--bk-caret-x': caretX
|
|
8
8
|
}"
|
|
9
|
+
@keydown="onKeyDown"
|
|
9
10
|
>
|
|
10
11
|
<div class="bk bk-artboard-tooltip-inner bk-caret-tooltip-inner">
|
|
11
12
|
<div class="bk-artboard-tooltip-header">
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
} from "#imports";
|
|
32
33
|
import { Icon } from "#blokkli/components";
|
|
33
34
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
35
|
+
import useFocusTrap from "#blokkli/helpers/composables/useFocusTrap";
|
|
34
36
|
const props = defineProps({
|
|
35
37
|
id: { type: String, required: true },
|
|
36
38
|
title: { type: String, required: true },
|
|
@@ -41,6 +43,10 @@ const props = defineProps({
|
|
|
41
43
|
});
|
|
42
44
|
const emit = defineEmits(["close"]);
|
|
43
45
|
const el = useTemplateRef("el");
|
|
46
|
+
const { onKeyDown } = useFocusTrap({
|
|
47
|
+
container: el,
|
|
48
|
+
debugLabel: "ArtboardTooltip: " + props.id
|
|
49
|
+
});
|
|
44
50
|
const { ui } = useBlokkli();
|
|
45
51
|
const { placementY, caretX } = useStickyToolbar(el, {
|
|
46
52
|
getAnchorElement() {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
|
-
import { computed, useBlokkli,
|
|
33
|
+
import { computed, useBlokkli, useTemplateRef } from "#imports";
|
|
34
34
|
import { getBlokkliItemProxyComponent } from "#blokkli/helpers/editComponents";
|
|
35
35
|
import { ItemIcon } from "#blokkli/components";
|
|
36
36
|
import { falsy } from "#blokkli/helpers";
|
|
@@ -59,7 +59,7 @@ const proxyBundle = computed(
|
|
|
59
59
|
() => libraryItemProps.value?.block?.bundle || props.bundle
|
|
60
60
|
);
|
|
61
61
|
const { types, runtimeConfig, definitions, dom } = useBlokkli();
|
|
62
|
-
const root =
|
|
62
|
+
const root = useTemplateRef("root");
|
|
63
63
|
const type = computed(() => types.getBlockBundleDefinition(proxyBundle.value));
|
|
64
64
|
const proxyComponent = getBlokkliItemProxyComponent(proxyBundle.value);
|
|
65
65
|
const definition = definitions.getBlockDefinition(
|
|
@@ -16,6 +16,9 @@ const isLocked = defineModel({ type: Boolean, ...{ default: false } });
|
|
|
16
16
|
const emit = defineEmits(["error"]);
|
|
17
17
|
onErrorCaptured((err) => {
|
|
18
18
|
errors.value.push(err);
|
|
19
|
+
if (import.meta.dev) {
|
|
20
|
+
console.error(err);
|
|
21
|
+
}
|
|
19
22
|
emit("error", err);
|
|
20
23
|
globalBlokkli.pushMessage({
|
|
21
24
|
type: "error",
|
|
@@ -45,13 +45,16 @@
|
|
|
45
45
|
<script setup>
|
|
46
46
|
import { computed, ref, onErrorCaptured } from "#imports";
|
|
47
47
|
import { Icon } from "#blokkli/components";
|
|
48
|
-
import textProvider from "#blokkli/helpers/
|
|
48
|
+
import textProvider from "#blokkli/helpers/providers/texts";
|
|
49
49
|
import { useGlobalBlokkliObject } from "#blokkli/helpers/composables/useGlobalBlokkliObject";
|
|
50
50
|
const errors = ref([]);
|
|
51
51
|
const $t = textProvider();
|
|
52
52
|
const globalBlokkli = useGlobalBlokkliObject();
|
|
53
53
|
onErrorCaptured((err) => {
|
|
54
54
|
errors.value.push(err);
|
|
55
|
+
if (import.meta.dev) {
|
|
56
|
+
console.error(err);
|
|
57
|
+
}
|
|
55
58
|
globalBlokkli.pushMessage({
|
|
56
59
|
type: "error",
|
|
57
60
|
name: "RootErrorBoundary",
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
ref="rootEl"
|
|
4
4
|
class="bk bk-dialog bk-control"
|
|
5
5
|
@wheel.passive.stop
|
|
6
|
-
@keydown.stop="
|
|
6
|
+
@keydown.stop="handleKeyDown"
|
|
7
7
|
@keyup.stop
|
|
8
8
|
@touchstart.passive.stop
|
|
9
9
|
@touchmove.stop
|
|
10
10
|
@touchend.stop
|
|
11
11
|
>
|
|
12
|
-
<div class="bk-dialog-
|
|
13
|
-
<div class="bk-dialog-inner" :style="style">
|
|
12
|
+
<div class="bk-dialog-inner" :style>
|
|
14
13
|
<div class="bk bk-overlay-header">
|
|
15
14
|
<Icon v-if="icon" :name="icon" />
|
|
16
15
|
<h3>{{ title }}</h3>
|
|
@@ -53,13 +52,21 @@
|
|
|
53
52
|
</template>
|
|
54
53
|
|
|
55
54
|
<script setup>
|
|
56
|
-
import {
|
|
55
|
+
import {
|
|
56
|
+
useBlokkli,
|
|
57
|
+
computed,
|
|
58
|
+
useTemplateRef,
|
|
59
|
+
onBeforeUnmount,
|
|
60
|
+
watch
|
|
61
|
+
} from "#imports";
|
|
57
62
|
import { Icon } from "#blokkli/components";
|
|
58
|
-
import
|
|
59
|
-
|
|
63
|
+
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
64
|
+
import useFocusTrap from "#blokkli/helpers/composables/useFocusTrap";
|
|
65
|
+
const { ui } = useBlokkli();
|
|
60
66
|
const emit = defineEmits(["submit", "cancel"]);
|
|
61
|
-
const rootEl =
|
|
67
|
+
const rootEl = useTemplateRef("rootEl");
|
|
62
68
|
const props = defineProps({
|
|
69
|
+
id: { type: String, required: true },
|
|
63
70
|
title: { type: String, required: true },
|
|
64
71
|
lead: { type: String, required: false, default: "" },
|
|
65
72
|
width: { type: [Number, String], required: false, default: 600 },
|
|
@@ -71,6 +78,11 @@ const props = defineProps({
|
|
|
71
78
|
icon: { type: null, required: false, default: void 0 },
|
|
72
79
|
fullScreen: { type: Boolean, required: false }
|
|
73
80
|
});
|
|
81
|
+
watch(ui.currentDialog, (dialog) => {
|
|
82
|
+
if (dialog?.id !== props.id) {
|
|
83
|
+
emit("cancel");
|
|
84
|
+
}
|
|
85
|
+
});
|
|
74
86
|
const style = computed(() => {
|
|
75
87
|
if (ui.isMobile.value) {
|
|
76
88
|
return {};
|
|
@@ -90,55 +102,29 @@ const style = computed(() => {
|
|
|
90
102
|
width: props.width
|
|
91
103
|
};
|
|
92
104
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
rootEl.value,
|
|
99
|
-
"input,select,button,textarea",
|
|
100
|
-
`Dialog "${props.title}" getFocusableElements`
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
const onKeyDown = (e) => {
|
|
105
|
+
const { onKeyDown } = useFocusTrap({
|
|
106
|
+
container: rootEl,
|
|
107
|
+
debugLabel: `Dialog "${props.title}"`
|
|
108
|
+
});
|
|
109
|
+
const handleKeyDown = (e) => {
|
|
104
110
|
if (e.code === "Escape") {
|
|
105
111
|
e.preventDefault();
|
|
106
112
|
emit("cancel");
|
|
107
113
|
return;
|
|
108
114
|
}
|
|
109
|
-
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const prev = e.shiftKey;
|
|
113
|
-
const focusableElements = getFocusableElements().filter((el) => {
|
|
114
|
-
const style2 = window.getComputedStyle(el);
|
|
115
|
-
if (style2.pointerEvents === "none") {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
return !el.disabled;
|
|
119
|
-
});
|
|
120
|
-
const activeIndex = Math.max(
|
|
121
|
-
focusableElements.findIndex((el) => document.activeElement === el),
|
|
122
|
-
0
|
|
123
|
-
);
|
|
124
|
-
const delta = prev ? -1 : 1;
|
|
125
|
-
const indexToFocus = modulo(activeIndex + delta, focusableElements.length);
|
|
126
|
-
const elementToFocus = focusableElements[indexToFocus];
|
|
127
|
-
if (elementToFocus) {
|
|
128
|
-
elementToFocus.focus();
|
|
129
|
-
e.preventDefault();
|
|
130
|
-
}
|
|
115
|
+
onKeyDown(e);
|
|
131
116
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const bestMatch = focusableElements.find((el) => !(el instanceof HTMLButtonElement)) || focusableElements[0];
|
|
136
|
-
if (bestMatch) {
|
|
137
|
-
bestMatch.focus();
|
|
117
|
+
onBlokkliEvent("keyPressed", (e) => {
|
|
118
|
+
if (e.code === "Escape") {
|
|
119
|
+
emit("cancel");
|
|
138
120
|
}
|
|
139
121
|
});
|
|
122
|
+
onBlokkliEvent("overlay:close", () => {
|
|
123
|
+
emit("cancel");
|
|
124
|
+
});
|
|
125
|
+
ui.openDialog({ id: props.id, alignment: "center" });
|
|
140
126
|
onBeforeUnmount(() => {
|
|
141
|
-
ui.
|
|
127
|
+
ui.closeDialog(props.id);
|
|
142
128
|
});
|
|
143
129
|
</script>
|
|
144
130
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
2
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
3
|
+
id: string;
|
|
3
4
|
title: string;
|
|
4
5
|
lead?: string;
|
|
5
6
|
width?: number | string;
|
|
@@ -14,6 +15,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
14
15
|
cancel: (...args: any[]) => void;
|
|
15
16
|
submit: (...args: any[]) => void;
|
|
16
17
|
}, string, import("vue").PublicProps, Readonly<{
|
|
18
|
+
id: string;
|
|
17
19
|
title: string;
|
|
18
20
|
lead?: string;
|
|
19
21
|
width?: number | string;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
>
|
|
16
16
|
<BlokkliItem
|
|
17
17
|
v-for="(item, i) in list"
|
|
18
|
-
:key="item.uuid + fieldListType + definitions.renderKey.value"
|
|
18
|
+
:key="item.uuid + fieldListType + definitions.renderKey.value + i"
|
|
19
19
|
class="bk-field-list-item"
|
|
20
20
|
:uuid="item.uuid"
|
|
21
21
|
:bundle="item.bundle"
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
import {
|
|
57
57
|
computed,
|
|
58
58
|
useBlokkli,
|
|
59
|
-
ref,
|
|
60
59
|
onMounted,
|
|
61
60
|
onBeforeUnmount,
|
|
62
61
|
useAttrs,
|
|
63
62
|
provide,
|
|
64
|
-
watch
|
|
63
|
+
watch,
|
|
64
|
+
useTemplateRef
|
|
65
65
|
} from "#imports";
|
|
66
66
|
import BlokkliItem from "./../BlokkliItem.vue";
|
|
67
67
|
import { isVisibleByOptions } from "#blokkli/helpers/runtimeHelpers";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
INJECT_IS_EDITING
|
|
71
71
|
} from "#blokkli/helpers/symbols";
|
|
72
72
|
const { dom, selection, definitions } = useBlokkli();
|
|
73
|
-
const root =
|
|
73
|
+
const root = useTemplateRef("root");
|
|
74
74
|
const props = defineProps({
|
|
75
75
|
name: { type: String, required: true },
|
|
76
76
|
fieldKey: { type: String, required: true },
|
|
@@ -116,13 +116,16 @@ const data = computed(() => {
|
|
|
116
116
|
dropAlignment: props.dropAlignment ?? null
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
|
-
watch(
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
watch(
|
|
120
|
+
() => root.value,
|
|
121
|
+
function(newRoot) {
|
|
122
|
+
if (newRoot instanceof HTMLElement) {
|
|
123
|
+
dom.updateFieldElement(props.entity, props.name, newRoot, data.value);
|
|
124
|
+
}
|
|
122
125
|
}
|
|
123
|
-
|
|
126
|
+
);
|
|
124
127
|
onMounted(() => {
|
|
125
|
-
if (root.value) {
|
|
128
|
+
if (root.value instanceof HTMLElement) {
|
|
126
129
|
dom.registerField(props.entity, props.name, root.value, data.value);
|
|
127
130
|
}
|
|
128
131
|
});
|
|
@@ -21,8 +21,15 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script setup>
|
|
24
|
-
import textProvider from "#blokkli/helpers/
|
|
25
|
-
import {
|
|
24
|
+
import textProvider from "#blokkli/helpers/providers/texts";
|
|
25
|
+
import {
|
|
26
|
+
ref,
|
|
27
|
+
onMounted,
|
|
28
|
+
onBeforeUnmount,
|
|
29
|
+
useState,
|
|
30
|
+
computed,
|
|
31
|
+
useTemplateRef
|
|
32
|
+
} from "#imports";
|
|
26
33
|
import "#blokkli-build/styles.css";
|
|
27
34
|
import useAnimationFrame from "#blokkli/helpers/composables/useAnimationFrame";
|
|
28
35
|
const props = defineProps({
|
|
@@ -47,8 +54,8 @@ const label = computed(() => {
|
|
|
47
54
|
});
|
|
48
55
|
defineEmits(["edit"]);
|
|
49
56
|
const isHovering = ref(false);
|
|
50
|
-
const button =
|
|
51
|
-
const overlay =
|
|
57
|
+
const button = useTemplateRef("button");
|
|
58
|
+
const overlay = useTemplateRef("overlay");
|
|
52
59
|
const targetElement = ref(null);
|
|
53
60
|
const indicatorRegistry = useState(
|
|
54
61
|
"blokkliEditIndicators",
|