@blokkli/editor 2.0.0-alpha.25 → 2.0.0-alpha.27
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 +1 -1
- package/dist/runtime/components/BlokkliItem.vue +3 -3
- package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -4
- package/dist/runtime/components/Edit/Features/Analyze/Main.vue +2 -1
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +28 -11
- package/dist/runtime/helpers/providers/directive.js +9 -1
- package/dist/runtime/helpers/providers/dom.js +4 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -44,13 +44,13 @@ const itemEntityType = useRuntimeConfig().public.blokkli.itemEntityType;
|
|
|
44
44
|
const componentProps = defineProps({
|
|
45
45
|
uuid: { type: String, required: true },
|
|
46
46
|
bundle: { type: String, required: true },
|
|
47
|
+
isVisible: { type: Boolean, required: false },
|
|
47
48
|
options: { type: null, required: false, default: () => ({}) },
|
|
49
|
+
editContext: { type: Object, required: false, default: void 0 },
|
|
48
50
|
props: { type: null, required: false, default: () => ({}) },
|
|
49
51
|
index: { type: Number, required: false, default: 0 },
|
|
50
|
-
editContext: { type: Object, required: false, default: void 0 },
|
|
51
52
|
parentType: { type: String, required: false, default: "" },
|
|
52
|
-
isEditing: { type: Boolean, required: false, default: false }
|
|
53
|
-
isNew: { type: Boolean, required: false }
|
|
53
|
+
isEditing: { type: Boolean, required: false, default: false }
|
|
54
54
|
});
|
|
55
55
|
const isProxyMode = inject(INJECT_FIELD_PROXY_MODE, false);
|
|
56
56
|
const allComponentsChunk = inject(
|
|
@@ -2,23 +2,23 @@ import type { BlockEditContext } from '#blokkli/types';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
uuid: string;
|
|
4
4
|
bundle: string;
|
|
5
|
+
isVisible?: boolean;
|
|
5
6
|
options?: any;
|
|
7
|
+
editContext?: BlockEditContext;
|
|
6
8
|
props?: any;
|
|
7
9
|
index?: number;
|
|
8
|
-
editContext?: BlockEditContext;
|
|
9
10
|
parentType?: string;
|
|
10
11
|
isEditing?: boolean;
|
|
11
|
-
isNew?: boolean;
|
|
12
12
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
13
13
|
uuid: string;
|
|
14
14
|
bundle: string;
|
|
15
|
+
isVisible?: boolean;
|
|
15
16
|
options?: any;
|
|
17
|
+
editContext?: BlockEditContext;
|
|
16
18
|
props?: any;
|
|
17
19
|
index?: number;
|
|
18
|
-
editContext?: BlockEditContext;
|
|
19
20
|
parentType?: string;
|
|
20
21
|
isEditing?: boolean;
|
|
21
|
-
isNew?: boolean;
|
|
22
22
|
}> & Readonly<{}>, {
|
|
23
23
|
index: number;
|
|
24
24
|
options: any;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div class="bk bk-analyze">
|
|
3
3
|
<div class="bk-analyze-button">
|
|
4
4
|
<button
|
|
5
|
+
v-if="hasManualAnalyzers"
|
|
5
6
|
class="bk-button bk-is-primary"
|
|
6
7
|
:disabled="buttonDisabled"
|
|
7
8
|
@click.prevent="onClick"
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
</div>
|
|
40
41
|
|
|
41
42
|
<div v-if="results.length" class="bk-analyze-wrapper">
|
|
42
|
-
<div class="bk-analyze-form">
|
|
43
|
+
<div v-if="categoryOptions.length > 2" class="bk-analyze-form">
|
|
43
44
|
<FormSelect
|
|
44
45
|
id="category"
|
|
45
46
|
v-model="selectedCategory"
|
|
@@ -160,17 +160,34 @@ async function onClickPreview() {
|
|
|
160
160
|
isLocked.value = true;
|
|
161
161
|
isPreviewing.value = true;
|
|
162
162
|
ui.setTransform(title.value);
|
|
163
|
-
if (supportsPreview.value
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
163
|
+
if (supportsPreview.value) {
|
|
164
|
+
if ("bundles" in props.plugin) {
|
|
165
|
+
if (adapter.previewTransformPlugin && props.uuids) {
|
|
166
|
+
const config2 = mapValues(value.value);
|
|
167
|
+
try {
|
|
168
|
+
const result = await adapter.previewTransformPlugin({
|
|
169
|
+
pluginId: props.plugin.id,
|
|
170
|
+
uuids: props.uuids,
|
|
171
|
+
config: config2
|
|
172
|
+
});
|
|
173
|
+
stateAfter.value = clone(adapter.mapState(result.state));
|
|
174
|
+
state.setOverrideState(stateAfter.value);
|
|
175
|
+
} catch {
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
if (adapter.previewHostTransformPlugin) {
|
|
180
|
+
const config2 = mapValues(value.value);
|
|
181
|
+
try {
|
|
182
|
+
const result = await adapter.previewHostTransformPlugin({
|
|
183
|
+
pluginId: props.plugin.id,
|
|
184
|
+
config: config2
|
|
185
|
+
});
|
|
186
|
+
stateAfter.value = clone(adapter.mapState(result.state));
|
|
187
|
+
state.setOverrideState(stateAfter.value);
|
|
188
|
+
} catch {
|
|
189
|
+
}
|
|
190
|
+
}
|
|
174
191
|
}
|
|
175
192
|
}
|
|
176
193
|
isLocked.value = false;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { falsy } from "#blokkli/helpers";
|
|
2
2
|
import useDelayedIntersectionObserver from "./../composables/useDelayedIntersectionObserver.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
computed,
|
|
5
|
+
onBeforeUnmount,
|
|
6
|
+
onMounted,
|
|
7
|
+
ref
|
|
8
|
+
} from "#imports";
|
|
4
9
|
import onBlokkliEvent from "./../composables/onBlokkliEvent.js";
|
|
5
10
|
import { itemEntityType } from "#blokkli-build/config";
|
|
6
11
|
export default function(debug, ui) {
|
|
@@ -210,6 +215,9 @@ export default function(debug, ui) {
|
|
|
210
215
|
});
|
|
211
216
|
onBlokkliEvent("ui:resized", handleRefresh);
|
|
212
217
|
onBlokkliEvent("option:finish-change", handleRefresh);
|
|
218
|
+
onMounted(() => {
|
|
219
|
+
doInitTimeout();
|
|
220
|
+
});
|
|
213
221
|
onBeforeUnmount(() => {
|
|
214
222
|
if (stateReloadTimeout) {
|
|
215
223
|
window.clearTimeout(stateReloadTimeout);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, ref, computed } from "#imports";
|
|
1
|
+
import { reactive, ref, computed, onMounted } from "#imports";
|
|
2
2
|
import { falsy } from "#blokkli/helpers";
|
|
3
3
|
import { cloneElementWithStyles } from "../dom/index.js";
|
|
4
4
|
import onBlokkliEvent from "../composables/onBlokkliEvent.js";
|
|
@@ -483,6 +483,9 @@ export default function(ui, debug, state, element) {
|
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
+
onMounted(() => {
|
|
487
|
+
doInitTimeout();
|
|
488
|
+
});
|
|
486
489
|
return {
|
|
487
490
|
getDropElementMarkup,
|
|
488
491
|
getVisibleBlocks,
|