@blokkli/editor 2.0.0-alpha.1 → 2.0.0-alpha.10
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 +25 -9
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +8 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +6 -0
- package/dist/modules/drupal/index.mjs +33 -7
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -0
- package/dist/modules/drupal/{adapter/index.mjs → runtime/adapter/index.js} +13 -10
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +2 -19
- package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +2 -7
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +1 -1
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +2 -19
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +4 -3
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +1 -1
- package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +1 -1
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +2 -51
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +11 -5
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +1 -1
- package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +2 -4
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +4 -3
- package/dist/runtime/components/BlokkliEditable.vue +1 -0
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +4 -18
- package/dist/runtime/components/BlokkliField.vue +4 -2
- package/dist/runtime/components/BlokkliField.vue.d.ts +8 -92
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/components/BlokkliProvider.vue +2 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +5 -22
- package/dist/runtime/components/Edit/Actions/index.vue +4 -1
- package/dist/runtime/components/Edit/BlockProxy/index.vue +3 -1
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +4 -4
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +2 -13
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/DragInteractions/index.vue +1 -1
- package/dist/runtime/components/Edit/EditProvider.vue +7 -4
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -3
- package/dist/runtime/components/Edit/Features/Artboard/index.vue +29 -1
- package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/Assistant/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Comments/Comment/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +7 -7
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue.d.ts +3 -132
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/Help/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/History/List/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Library/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Options/Form/Group.vue.d.ts +2 -11
- package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Ownership/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/PreviewGrant/QrCode/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Publish/index.vue +20 -2
- package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue.d.ts +2 -13
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Validations/index.vue +1 -1
- package/dist/runtime/components/Edit/Form/Group/index.vue.d.ts +2 -4
- package/dist/runtime/components/Edit/Form/Item/index.vue.d.ts +2 -4
- package/dist/runtime/components/Edit/FormOverlay/index.vue.d.ts +3 -2
- package/dist/runtime/components/Edit/PreviewProvider.vue +1 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue.d.ts +3 -3
- package/dist/runtime/components/Edit/RelativeTime/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Resizable/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/ScaleToFit/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/ScrollBoundary/index.vue.d.ts +2 -7
- package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/SystemRequirements/index.vue +2 -2
- package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +2 -7
- package/dist/runtime/composables/defineBlokkli.js +8 -1
- package/dist/runtime/composables/defineBlokkliFragment.js +8 -1
- package/dist/runtime/composables/useBlokkliHelper.d.ts +19 -0
- package/dist/runtime/composables/useBlokkliHelper.js +82 -0
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.js +1 -1
- package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +5 -0
- package/dist/runtime/helpers/composables/useBlockRegistration.js +23 -0
- package/dist/runtime/helpers/domProvider.d.ts +2 -0
- package/dist/runtime/helpers/domProvider.js +50 -65
- package/dist/runtime/helpers/runtimeHelpers/index.js +1 -1
- package/dist/runtime/types/index.d.ts +38 -1
- package/package.json +8 -11
- package/dist/modules/drupal/adapter/index.d.mts +0 -6
|
@@ -1,56 +1,14 @@
|
|
|
1
|
-
import { type ComputedRef } from '#imports';
|
|
2
1
|
import type { BlokkliFragmentName } from '#blokkli-build/definitions';
|
|
3
|
-
import
|
|
4
|
-
import type { FieldListItem, EntityContext, BlokkliProviderEntityContext } from '#blokkli/types';
|
|
2
|
+
import type { FieldListItem } from '#blokkli/types';
|
|
5
3
|
import type { ValidFieldListTypes, FieldListItemTyped } from '#blokkli-build/generated-types';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isNested: boolean;
|
|
14
|
-
fieldListType: string;
|
|
15
|
-
allowedFragments?: BlokkliFragmentName[];
|
|
16
|
-
dropAlignment?: "vertical" | "horizontal";
|
|
17
|
-
proxyMode?: boolean;
|
|
18
|
-
globalProxyMode?: boolean;
|
|
19
|
-
nestingLevel: number;
|
|
20
|
-
shouldRenderItem?: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
21
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
22
|
-
name: string;
|
|
23
|
-
fieldKey: string;
|
|
24
|
-
list: FieldListItem[];
|
|
25
|
-
entity: EntityContext;
|
|
26
|
-
language?: string;
|
|
27
|
-
tag?: string;
|
|
28
|
-
isNested: boolean;
|
|
29
|
-
fieldListType: string;
|
|
30
|
-
allowedFragments?: BlokkliFragmentName[];
|
|
31
|
-
dropAlignment?: "vertical" | "horizontal";
|
|
32
|
-
proxyMode?: boolean;
|
|
33
|
-
globalProxyMode?: boolean;
|
|
34
|
-
nestingLevel: number;
|
|
35
|
-
shouldRenderItem?: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
36
|
-
}> & Readonly<{}>, {
|
|
37
|
-
allowedFragments: BlokkliFragmentName[];
|
|
38
|
-
tag: string;
|
|
39
|
-
language: string;
|
|
40
|
-
dropAlignment: "vertical" | "horizontal";
|
|
41
|
-
shouldRenderItem: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
42
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any> | null;
|
|
43
|
-
declare const attrs: {
|
|
44
|
-
[x: string]: unknown;
|
|
4
|
+
type __VLS_Slots = {
|
|
5
|
+
default(props: {
|
|
6
|
+
items: FieldListItemTyped[];
|
|
7
|
+
}): any;
|
|
8
|
+
after(props: {
|
|
9
|
+
items: FieldListItemTyped[];
|
|
10
|
+
}): any;
|
|
45
11
|
};
|
|
46
|
-
declare const isEditing = false;
|
|
47
|
-
declare const isGlobalProxyMode: ComputedRef<boolean> | null;
|
|
48
|
-
declare const isInReusable = false;
|
|
49
|
-
declare const isPreview: ComputedRef<boolean> | null;
|
|
50
|
-
declare const isNested = false;
|
|
51
|
-
declare const nestingLevel: number;
|
|
52
|
-
declare const entity: EntityContext | undefined;
|
|
53
|
-
declare const providerEntity: ComputedRef<BlokkliProviderEntityContext>;
|
|
54
12
|
type __VLS_Props = {
|
|
55
13
|
name: string;
|
|
56
14
|
list?: Array<FieldListItem | null | undefined> | FieldListItem | null;
|
|
@@ -71,48 +29,6 @@ type __VLS_Props = {
|
|
|
71
29
|
*/
|
|
72
30
|
shouldRenderItem?: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
73
31
|
};
|
|
74
|
-
declare const canEdit: import("vue").Ref<boolean, boolean>;
|
|
75
|
-
declare const fieldKey: ComputedRef<string | undefined>;
|
|
76
|
-
declare const fieldListType: ComputedRef<"default">;
|
|
77
|
-
declare const filteredList: ComputedRef<FieldListItemTyped[]>;
|
|
78
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
79
|
-
declare var __VLS_1: {
|
|
80
|
-
items: FieldListItemTyped[];
|
|
81
|
-
}, __VLS_14: {
|
|
82
|
-
items: FieldListItemTyped[];
|
|
83
|
-
};
|
|
84
|
-
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
85
|
-
default?: (props: typeof __VLS_1) => any;
|
|
86
|
-
} & {
|
|
87
|
-
after?: (props: typeof __VLS_14) => any;
|
|
88
|
-
}>;
|
|
89
|
-
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
90
|
-
BlokkliItem: typeof BlokkliItem;
|
|
91
|
-
DraggableList: typeof DraggableList;
|
|
92
|
-
attrs: typeof attrs;
|
|
93
|
-
isEditing: typeof isEditing;
|
|
94
|
-
isGlobalProxyMode: typeof isGlobalProxyMode;
|
|
95
|
-
isInReusable: typeof isInReusable;
|
|
96
|
-
isPreview: typeof isPreview;
|
|
97
|
-
isNested: typeof isNested;
|
|
98
|
-
nestingLevel: typeof nestingLevel;
|
|
99
|
-
entity: typeof entity;
|
|
100
|
-
providerEntity: typeof providerEntity;
|
|
101
|
-
canEdit: typeof canEdit;
|
|
102
|
-
fieldKey: typeof fieldKey;
|
|
103
|
-
fieldListType: typeof fieldListType;
|
|
104
|
-
filteredList: typeof filteredList;
|
|
105
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
106
|
-
list: Array<FieldListItem | null | undefined> | FieldListItem | null;
|
|
107
|
-
fieldListType: ValidFieldListTypes;
|
|
108
|
-
allowedFragments: BlokkliFragmentName[];
|
|
109
|
-
tag: string;
|
|
110
|
-
dropAlignment: "vertical" | "horizontal";
|
|
111
|
-
shouldRenderItem: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
112
|
-
listClass: string;
|
|
113
|
-
editClass: string;
|
|
114
|
-
nonEmptyClass: string;
|
|
115
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
116
32
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
117
33
|
list: Array<FieldListItem | null | undefined> | FieldListItem | null;
|
|
118
34
|
fieldListType: ValidFieldListTypes;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:is="component"
|
|
13
13
|
v-else-if="component"
|
|
14
14
|
v-bind="props"
|
|
15
|
-
:data-bk-in-proxy="fieldUsesProxy || void 0"
|
|
15
|
+
:data-bk-in-proxy="fieldUsesProxy || (isEditing ? 'false' : void 0)"
|
|
16
16
|
/>
|
|
17
17
|
<div v-else-if="isEditing">Block not implemented</div>
|
|
18
18
|
</template>
|
|
@@ -72,6 +72,7 @@ import {
|
|
|
72
72
|
INJECT_ENTITY_CONTEXT,
|
|
73
73
|
INJECT_PROVIDER_CONTEXT
|
|
74
74
|
} from "../helpers/symbols";
|
|
75
|
+
defineSlots();
|
|
75
76
|
const PreviewProvider = defineAsyncComponent(
|
|
76
77
|
() => import("./Edit/PreviewProvider.vue")
|
|
77
78
|
);
|
|
@@ -106,7 +107,7 @@ const isEditing = computed(
|
|
|
106
107
|
() => props.canEdit && !!props.entityUuid && route.query.blokkliEditing === props.entityUuid
|
|
107
108
|
);
|
|
108
109
|
const isPreviewing = computed(
|
|
109
|
-
() => props.entityUuid && route.query.blokkliPreview === props.entityUuid
|
|
110
|
+
() => !!props.entityUuid && route.query.blokkliPreview === props.entityUuid
|
|
110
111
|
);
|
|
111
112
|
const showIndicator = computed(
|
|
112
113
|
() => props.canEdit && !route.query.blokkliEditing && !route.query.blokkliPreview
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
1
|
+
declare const _default: <T extends object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
2
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
3
3
|
entity?: T;
|
|
4
4
|
entityType: string;
|
|
@@ -17,28 +17,12 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
17
17
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
18
18
|
attrs: any;
|
|
19
19
|
slots: {
|
|
20
|
-
default
|
|
21
|
-
entity: any;
|
|
20
|
+
default(props: {
|
|
22
21
|
isEditing: boolean;
|
|
23
22
|
canEdit: boolean;
|
|
24
|
-
isPreview:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
canEdit: boolean;
|
|
28
|
-
isPreview: false | "";
|
|
29
|
-
entity: any;
|
|
30
|
-
}) => any) & ((props: {
|
|
31
|
-
isEditing: boolean;
|
|
32
|
-
canEdit: boolean;
|
|
33
|
-
isPreview: boolean | "";
|
|
34
|
-
entity: [{
|
|
35
|
-
type: import("vue").PropType<__VLS_NonUndefinedable<T>>;
|
|
36
|
-
default: undefined;
|
|
37
|
-
}] extends [import("vue").Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import("@vue/shared").IfAny<V, V, D> : V : V : {
|
|
38
|
-
type: import("vue").PropType<__VLS_NonUndefinedable<T>>;
|
|
39
|
-
default: undefined;
|
|
40
|
-
};
|
|
41
|
-
}) => any)) | undefined;
|
|
23
|
+
isPreview: boolean;
|
|
24
|
+
entity?: T | undefined;
|
|
25
|
+
}): any;
|
|
42
26
|
};
|
|
43
27
|
emit: {};
|
|
44
28
|
}>) => import("vue").VNode & {
|
|
@@ -48,4 +32,3 @@ export default _default;
|
|
|
48
32
|
type __VLS_PrettifyLocal<T> = {
|
|
49
33
|
[K in keyof T]: T[K];
|
|
50
34
|
} & {};
|
|
51
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import { onlyUnique, findIdealRectPosition, falsy } from "#blokkli/helpers";
|
|
76
76
|
import { ItemIcon, Icon } from "#blokkli/components";
|
|
77
77
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
78
|
-
const { selection, $t, types, state, ui, dom, definitions } = useBlokkli();
|
|
78
|
+
const { selection, $t, types, state, ui, dom, definitions, debug } = useBlokkli();
|
|
79
79
|
const editingEnabled = computed(
|
|
80
80
|
() => state.editMode.value === "editing" || state.editMode.value === "translating"
|
|
81
81
|
);
|
|
@@ -100,6 +100,9 @@ const title = computed(() => {
|
|
|
100
100
|
if (ui.transformLabel.value) {
|
|
101
101
|
return ui.transformLabel.value;
|
|
102
102
|
}
|
|
103
|
+
if (debug.isEnabled.value && selection.uuids.value.length === 1) {
|
|
104
|
+
return selection.uuids.value[0];
|
|
105
|
+
}
|
|
103
106
|
if (itemBundle.value) {
|
|
104
107
|
if (itemBundle.value.id === "blokkli_fragment") {
|
|
105
108
|
const fragments = selection.uuids.value.map((uuid) => {
|
|
@@ -34,6 +34,7 @@ import { computed, useBlokkli, ref } from "#imports";
|
|
|
34
34
|
import { getBlokkliItemProxyComponent } from "#blokkli/helpers/editComponents";
|
|
35
35
|
import { ItemIcon } from "#blokkli/components";
|
|
36
36
|
import { buildAttributesForLibraryItem, falsy } from "#blokkli/helpers";
|
|
37
|
+
import { useBlockRegistration } from "#blokkli/helpers/composables/useBlockRegistration";
|
|
37
38
|
const props = defineProps({
|
|
38
39
|
uuid: { type: String, required: true },
|
|
39
40
|
bundle: { type: String, required: true },
|
|
@@ -63,7 +64,7 @@ const rootProps = computed(() => {
|
|
|
63
64
|
const proxyBundle = computed(
|
|
64
65
|
() => libraryItemProps.value?.block?.bundle || props.bundle
|
|
65
66
|
);
|
|
66
|
-
const { types, runtimeConfig, definitions } = useBlokkli();
|
|
67
|
+
const { types, runtimeConfig, definitions, dom } = useBlokkli();
|
|
67
68
|
const root = ref(null);
|
|
68
69
|
const type = computed(() => types.getBlockBundleDefinition(proxyBundle.value));
|
|
69
70
|
const proxyComponent = getBlokkliItemProxyComponent(proxyBundle.value);
|
|
@@ -89,4 +90,5 @@ const fieldLayout = computed(() => {
|
|
|
89
90
|
}
|
|
90
91
|
return types.fieldConfig.forEntityTypeAndBundle(runtimeConfig.itemEntityType, proxyBundle.value).map((config) => [config]);
|
|
91
92
|
});
|
|
93
|
+
useBlockRegistration(dom, props.uuid);
|
|
92
94
|
</script>
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
<div class="bk-fatal-error-overlay-info">
|
|
16
16
|
<Icon name="sad" />
|
|
17
17
|
<div>
|
|
18
|
-
<h2>{{ $t(
|
|
18
|
+
<h2>{{ $t("fatalErrorTitle", "bl\xF6kkli has stopped working") }}</h2>
|
|
19
19
|
<p>
|
|
20
20
|
{{
|
|
21
21
|
$t(
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
"fatalErrorText",
|
|
23
|
+
"Unfortunately bl\xF6kkli has encountered a fatal error which prevents it from working normally. You may be able to continue using it, but things may not work as expected."
|
|
24
24
|
)
|
|
25
25
|
}}
|
|
26
26
|
</p>
|
|
27
27
|
<button class="bk-button bk-is-danger" @click="errors = []">
|
|
28
|
-
{{ $t(
|
|
28
|
+
{{ $t("fatalErrorButton", "Continue anyway...") }}
|
|
29
29
|
</button>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { Icon } from '#blokkli/components';
|
|
2
|
-
declare const errors: import("vue").Ref<Error[], Error[]>;
|
|
3
|
-
declare const $t: import("#blokkli/helpers/textProvider").TextProvider;
|
|
4
|
-
declare const unique: import("vue").ComputedRef<Error[]>;
|
|
5
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
6
1
|
declare var __VLS_1: {};
|
|
7
|
-
type __VLS_Slots =
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
8
3
|
default?: (props: typeof __VLS_1) => any;
|
|
9
|
-
}
|
|
10
|
-
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
11
|
-
Icon: typeof Icon;
|
|
12
|
-
errors: typeof errors;
|
|
13
|
-
$t: typeof $t;
|
|
14
|
-
unique: typeof unique;
|
|
15
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
};
|
|
16
5
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
7
|
export default _default;
|
|
@@ -34,7 +34,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
34
34
|
submitLabel: string;
|
|
35
35
|
canSubmit: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
37
|
-
default?: (
|
|
37
|
+
default?: (props: {}) => any;
|
|
38
38
|
}>;
|
|
39
39
|
export default _default;
|
|
40
40
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -38,7 +38,7 @@ function getInteractedElement(e) {
|
|
|
38
38
|
if (!(el instanceof HTMLElement)) {
|
|
39
39
|
continue;
|
|
40
40
|
}
|
|
41
|
-
if (el.dataset.blokkliEditableField) {
|
|
41
|
+
if (el.dataset.blokkliEditableField && !el.closest('[data-bk-in-proxy="true"]')) {
|
|
42
42
|
editableFieldName = el.dataset.blokkliEditableField;
|
|
43
43
|
}
|
|
44
44
|
if (el instanceof HTMLTableCellElement) {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<div v-if="!state.stateAvailable.value" class="bk-state-unavailable">
|
|
13
13
|
<h2>
|
|
14
14
|
{{
|
|
15
|
-
$t(
|
|
15
|
+
$t("stateUnavailableTitle", "The edit state could not be loaded.")
|
|
16
16
|
}}
|
|
17
17
|
</h2>
|
|
18
18
|
<p>
|
|
19
19
|
{{
|
|
20
20
|
$t(
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
"stateUnavailableText",
|
|
22
|
+
"This could be due to missing permissions or a temporary problem. Please try again later."
|
|
23
23
|
)
|
|
24
24
|
}}
|
|
25
25
|
</p>
|
|
@@ -94,6 +94,7 @@ import {
|
|
|
94
94
|
INJECT_GLOBAL_PROXY_MODE,
|
|
95
95
|
INJECT_IS_EDITING
|
|
96
96
|
} from "#blokkli/helpers/symbols";
|
|
97
|
+
import { useBlockRegistration } from "#blokkli/helpers/composables/useBlockRegistration";
|
|
97
98
|
const props = defineProps({
|
|
98
99
|
entity: { type: null, required: false, default: void 0 },
|
|
99
100
|
entityType: { type: String, required: true },
|
|
@@ -102,6 +103,7 @@ const props = defineProps({
|
|
|
102
103
|
language: { type: String, required: false, default: "en" },
|
|
103
104
|
isolate: { type: Boolean, required: false }
|
|
104
105
|
});
|
|
106
|
+
defineSlots();
|
|
105
107
|
const context = computed(() => {
|
|
106
108
|
return {
|
|
107
109
|
entityType: props.entityType,
|
|
@@ -183,7 +185,8 @@ provide(INJECT_EDIT_CONTEXT, {
|
|
|
183
185
|
eventBus,
|
|
184
186
|
mutatedOptions: state.mutatedOptions,
|
|
185
187
|
dom,
|
|
186
|
-
definitions
|
|
188
|
+
definitions,
|
|
189
|
+
useBlockRegistration
|
|
187
190
|
});
|
|
188
191
|
provide(INJECT_APP, {
|
|
189
192
|
adapter,
|
|
@@ -11,10 +11,10 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {
|
|
14
|
-
default
|
|
14
|
+
default(props: {
|
|
15
|
+
mutatedEntity: T;
|
|
15
16
|
key: string;
|
|
16
|
-
|
|
17
|
-
}) => any) | undefined;
|
|
17
|
+
}): any;
|
|
18
18
|
};
|
|
19
19
|
emit: {};
|
|
20
20
|
}>) => import("vue").VNode & {
|
|
@@ -180,7 +180,35 @@ const artboard = getArtboard();
|
|
|
180
180
|
watch(options, function(newOptions) {
|
|
181
181
|
artboard.setOptions(newOptions);
|
|
182
182
|
});
|
|
183
|
-
|
|
183
|
+
const AUTOSCROLL_EDGE_ZONE = 130;
|
|
184
|
+
const AUTOSCROLL_SPEED = 12;
|
|
185
|
+
let autoScrollSpeed = 1;
|
|
186
|
+
function edgeStep(distance) {
|
|
187
|
+
const ratio = distance / AUTOSCROLL_EDGE_ZONE;
|
|
188
|
+
return Math.pow(ratio, 3) * AUTOSCROLL_SPEED;
|
|
189
|
+
}
|
|
190
|
+
onBlokkliEvent("animationFrame:before", ({ time, mouseY }) => {
|
|
191
|
+
if (selection.isDragging.value) {
|
|
192
|
+
const viewportHeight = ui.viewport.value.height;
|
|
193
|
+
const currentOffset = artboard.getOffset();
|
|
194
|
+
const y = Math.min(Math.max(mouseY, 0), viewportHeight);
|
|
195
|
+
let dy = 0;
|
|
196
|
+
if (y < AUTOSCROLL_EDGE_ZONE) {
|
|
197
|
+
const dist = AUTOSCROLL_EDGE_ZONE - y;
|
|
198
|
+
dy = edgeStep(dist);
|
|
199
|
+
} else if (y > viewportHeight - AUTOSCROLL_EDGE_ZONE) {
|
|
200
|
+
const dist = y - (viewportHeight - AUTOSCROLL_EDGE_ZONE);
|
|
201
|
+
dy = -edgeStep(dist);
|
|
202
|
+
} else {
|
|
203
|
+
autoScrollSpeed = 1;
|
|
204
|
+
}
|
|
205
|
+
if (dy !== 0) {
|
|
206
|
+
artboard.setOffset(null, currentOffset.y + dy * autoScrollSpeed);
|
|
207
|
+
autoScrollSpeed = Math.min(autoScrollSpeed * 1.01, 2.25);
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
autoScrollSpeed = 1;
|
|
211
|
+
}
|
|
184
212
|
artboard.loop(time);
|
|
185
213
|
const artboardSize = artboard.getArtboardSize();
|
|
186
214
|
if (artboardSize) {
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
<p class="bk-lead">
|
|
11
11
|
{{
|
|
12
12
|
$t(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
"assistantDialogLead",
|
|
14
|
+
"Please enter what you'd like the assistant to generate."
|
|
15
15
|
)
|
|
16
16
|
}}
|
|
17
17
|
</p>
|
|
18
18
|
<label class="bk-form-label" for="assistant_prompt">
|
|
19
|
-
{{ $t(
|
|
19
|
+
{{ $t("assistantPromptLabel", "Prompt") }}
|
|
20
20
|
</label>
|
|
21
21
|
<div class="bk-assistant-form-textarea">
|
|
22
22
|
<textarea
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
<template #footer>
|
|
58
58
|
<button class="bk-button bk-is-primary" @click="onSubmit">
|
|
59
|
-
{{ $t(
|
|
59
|
+
{{ $t("assistantDialogSubmit", "Create blocks") }}
|
|
60
60
|
</button>
|
|
61
61
|
</template>
|
|
62
62
|
</FormOverlay>
|
|
@@ -30,7 +30,8 @@ const { adapter } = defineBlokkliFeature({
|
|
|
30
30
|
"assistantGetResults",
|
|
31
31
|
"assistantAddBlockFromResult"
|
|
32
32
|
],
|
|
33
|
-
screenshot: "feature-assistant.jpg"
|
|
33
|
+
screenshot: "feature-assistant.jpg",
|
|
34
|
+
dependencies: ["add-list"]
|
|
34
35
|
});
|
|
35
36
|
const { state, $t } = useBlokkli();
|
|
36
37
|
const placedAction = ref(null);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
v-if="!pastedItems.length"
|
|
20
20
|
class="bk bk-clipboard-info bk-sidebar-padding"
|
|
21
21
|
>
|
|
22
|
-
<h4>{{ $t(
|
|
22
|
+
<h4>{{ $t("clipboardEmpty", "No items in the clipboard") }}</h4>
|
|
23
23
|
<div
|
|
24
24
|
v-if="!ui.isMobile.value"
|
|
25
25
|
v-html="
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bk-blokkli-item-actions-comment-dropdown" @keydown.capture.stop>
|
|
3
3
|
<label for="comment_body" class="bk-form-label">{{
|
|
4
|
-
$t(
|
|
4
|
+
$t("commentBody", "Comment")
|
|
5
5
|
}}</label>
|
|
6
6
|
<textarea
|
|
7
7
|
id="comment_body"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
required
|
|
13
13
|
/>
|
|
14
14
|
<button class="bk-button bk-is-primary" @click="$emit('add', comment)">
|
|
15
|
-
{{ $t(
|
|
15
|
+
{{ $t("commentSave", "Submit comment") }}
|
|
16
16
|
</button>
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<span
|
|
29
29
|
>{{ comments.length }}
|
|
30
30
|
{{
|
|
31
|
-
comments.length === 1 ? $t(
|
|
31
|
+
comments.length === 1 ? $t("singleComment", "comment") : $t("comments", "Comments")
|
|
32
32
|
}}</span
|
|
33
33
|
>
|
|
34
34
|
</div>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
class="bk-button bk-is-primary bk-is-small"
|
|
50
50
|
@click="addComment"
|
|
51
51
|
>
|
|
52
|
-
{{ $t(
|
|
52
|
+
{{ $t("commentAdd", "Add comment") }}
|
|
53
53
|
</button>
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<table class="bk-diff-table">
|
|
4
4
|
<thead>
|
|
5
5
|
<tr>
|
|
6
|
-
<th>{{ $t(
|
|
7
|
-
<th>{{ $t(
|
|
8
|
-
<th>{{ $t(
|
|
9
|
-
<th>{{ $t(
|
|
6
|
+
<th>{{ $t("diffTableChange", "Change") }}</th>
|
|
7
|
+
<th>{{ $t("diffTableBundle", "Type") }}</th>
|
|
8
|
+
<th>{{ $t("diffTableProperty", "Property") }}</th>
|
|
9
|
+
<th>{{ $t("diffTableDiff", "Diff") }}</th>
|
|
10
10
|
</tr>
|
|
11
11
|
</thead>
|
|
12
12
|
<tbody>
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
v-if="item.status === 'added'"
|
|
21
21
|
class="bk-diff-status-label bk-is-added"
|
|
22
22
|
>
|
|
23
|
-
{{ $t(
|
|
23
|
+
{{ $t("diffStatusAdded", "Added") }}
|
|
24
24
|
</div>
|
|
25
25
|
<div
|
|
26
26
|
v-else-if="item.status === 'removed'"
|
|
27
27
|
class="bk-diff-status-label bk-is-removed"
|
|
28
28
|
>
|
|
29
|
-
{{ $t(
|
|
29
|
+
{{ $t("diffStatusDeleted", "Deleted") }}
|
|
30
30
|
</div>
|
|
31
31
|
<div v-else class="bk-diff-status-label">
|
|
32
|
-
{{ $t(
|
|
32
|
+
{{ $t("diffStatusEdited", "Edited") }}
|
|
33
33
|
</div>
|
|
34
34
|
</td>
|
|
35
35
|
<td
|