@blokkli/editor 2.0.0-alpha.15 → 2.0.0-alpha.17
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 +330 -93
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -1
- package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
- package/dist/modules/drupal/runtime/adapter/index.js +2 -2
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue +1 -3
- package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
- package/dist/runtime/components/BlokkliEditable.vue +22 -4
- package/dist/runtime/components/BlokkliProvider.vue +29 -20
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +2 -1
- package/dist/runtime/components/Edit/Actions/index.vue +9 -4
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +420 -25
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +80 -0
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Banner/index.vue +51 -0
- package/dist/runtime/components/Edit/Banner/index.vue.d.ts +18 -0
- package/dist/runtime/components/Edit/Dialog/index.vue +3 -0
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
- package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/EditProvider.vue +79 -22
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +19 -20
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +2 -0
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +35 -20
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue +29 -0
- package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue.d.ts +13 -0
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +22 -16
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Features/Comments/Overlay/index.vue +15 -6
- package/dist/runtime/components/Edit/Features/Comments/index.vue +20 -8
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +26 -35
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +240 -0
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Debug/index.vue +4 -165
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +7 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +62 -39
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/vertex.glsl +1 -0
- package/dist/runtime/components/Edit/Features/Edit/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +63 -3
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +17 -76
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/History/index.vue +5 -2
- package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +139 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +270 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/vertex.glsl +117 -0
- package/dist/runtime/components/Edit/Features/Hover/index.vue +25 -0
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +27 -23
- package/dist/runtime/components/Edit/Features/Library/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +34 -27
- package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +2 -4
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +6 -1
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue +35 -0
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Ownership/index.vue +7 -25
- package/dist/runtime/components/Edit/Features/ProxyView/index.vue +5 -1
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue +2 -2
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +17 -7
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +39 -74
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +4 -2
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +417 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +102 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +33 -106
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +88 -29
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +11 -2
- package/dist/runtime/components/Edit/Features/Selection/index.vue +26 -19
- package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
- package/dist/runtime/components/Edit/Features/Translations/index.vue +13 -16
- package/dist/runtime/components/Edit/Form/Text/index.vue +2 -1
- package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
- package/dist/runtime/components/Edit/Konami/Game/index.vue +5 -5
- package/dist/runtime/components/Edit/index.d.ts +5 -3
- package/dist/runtime/components/Edit/index.js +8 -4
- package/dist/runtime/composables/defineBlokkli.js +5 -3
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.d.ts +34 -1
- package/dist/runtime/helpers/animationProvider.js +175 -48
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +8 -0
- package/dist/runtime/helpers/composables/defineRenderer.js +8 -0
- package/dist/runtime/helpers/composables/useDelayedIntersectionObserver.d.ts +1 -1
- package/dist/runtime/helpers/composables/useDelayedIntersectionObserver.js +3 -2
- package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +4 -1
- package/dist/runtime/helpers/composables/useStickyToolbar.js +53 -35
- package/dist/runtime/helpers/dom/index.d.ts +1 -0
- package/dist/runtime/helpers/domProvider.d.ts +46 -0
- package/dist/runtime/helpers/domProvider.js +101 -7
- package/dist/runtime/helpers/editableProvider.d.ts +14 -0
- package/dist/runtime/helpers/editableProvider.js +144 -0
- package/dist/runtime/helpers/stateProvider.d.ts +6 -2
- package/dist/runtime/helpers/stateProvider.js +66 -3
- package/dist/runtime/helpers/storageProvider.d.ts +3 -2
- package/dist/runtime/helpers/storageProvider.js +6 -2
- package/dist/runtime/helpers/symbols.d.ts +1 -0
- package/dist/runtime/helpers/symbols.js +1 -0
- package/dist/runtime/helpers/uiProvider.d.ts +8 -1
- package/dist/runtime/helpers/uiProvider.js +34 -2
- package/dist/runtime/helpers/webgl/index.d.ts +11 -2
- package/dist/runtime/helpers/webgl/index.js +162 -7
- package/dist/runtime/plugins/blokkliEditable.js +74 -3
- package/dist/runtime/types/index.d.ts +13 -1
- package/package.json +1 -1
- package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -401
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +0 -54
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue.d.ts +0 -14
- /package/dist/runtime/components/Edit/{DragInteractions → Features/Hover}/index.vue.d.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<Banner
|
|
3
|
+
id="translate"
|
|
4
|
+
icon="translate"
|
|
5
|
+
:text
|
|
6
|
+
:button="$t('translationsBannerButton', 'Edit source language instead')"
|
|
7
|
+
scheme="yellow"
|
|
8
|
+
@click="onClick"
|
|
9
|
+
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup>
|
|
13
|
-
import { computed, useBlokkli } from "#imports";
|
|
14
|
-
import {
|
|
13
|
+
import { computed, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
|
|
14
|
+
import { Banner } from "#blokkli/components";
|
|
15
15
|
const props = defineProps({
|
|
16
16
|
activeLanguage: { type: Object, required: true }
|
|
17
17
|
});
|
|
18
|
-
const { $t, adapter, state } = useBlokkli();
|
|
18
|
+
const { $t, adapter, state, ui } = useBlokkli();
|
|
19
19
|
const onClick = () => {
|
|
20
20
|
const sourceLanguage = state.translation.value.sourceLanguage;
|
|
21
21
|
if (!sourceLanguage) {
|
|
@@ -39,4 +39,10 @@ const text = computed(() => {
|
|
|
39
39
|
"You are currently editing the <strong>@language</strong> translation. Some features like adding, moving or deleting blocks are not available."
|
|
40
40
|
).replace("@language", props.activeLanguage.name);
|
|
41
41
|
});
|
|
42
|
+
onMounted(() => {
|
|
43
|
+
ui.setSelectionColor("translating", "mono");
|
|
44
|
+
});
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
ui.removeSelectionColor("translating");
|
|
47
|
+
});
|
|
42
48
|
</script>
|
|
@@ -48,11 +48,8 @@
|
|
|
48
48
|
</PluginTourItem>
|
|
49
49
|
</Teleport>
|
|
50
50
|
|
|
51
|
-
<Teleport to="#bk-banner-
|
|
52
|
-
<Banner
|
|
53
|
-
v-if="state.editMode.value === 'translating'"
|
|
54
|
-
:active-language="activeLanguage"
|
|
55
|
-
/>
|
|
51
|
+
<Teleport to="#bk-banner-list">
|
|
52
|
+
<Banner v-if="isTranslating" :active-language />
|
|
56
53
|
</Teleport>
|
|
57
54
|
|
|
58
55
|
<PluginMenuButton
|
|
@@ -61,14 +58,14 @@
|
|
|
61
58
|
:description="
|
|
62
59
|
$t('translationsBatchTranslateMenuDescription', 'Translate all blocks')
|
|
63
60
|
"
|
|
64
|
-
:disabled="
|
|
61
|
+
:disabled="!isTranslating"
|
|
65
62
|
:weight="60"
|
|
66
63
|
icon="translate"
|
|
67
64
|
@click="eventBus.emit('batchTranslate')"
|
|
68
65
|
/>
|
|
69
66
|
|
|
70
67
|
<PluginItemAction
|
|
71
|
-
v-if="
|
|
68
|
+
v-if="isTranslating"
|
|
72
69
|
id="translate"
|
|
73
70
|
:disabled="!canTranslateBlock"
|
|
74
71
|
:title="$t('translationsItemAction', 'Translate')"
|
|
@@ -102,7 +99,7 @@ const { adapter } = defineBlokkliFeature({
|
|
|
102
99
|
description: "Adds support for block translations."
|
|
103
100
|
});
|
|
104
101
|
const { eventBus, state, context, $t, ui, selection, types, definitions } = useBlokkli();
|
|
105
|
-
const
|
|
102
|
+
const isTranslating = computed(() => state.editMode.value === "translating");
|
|
106
103
|
const isOpen = ref(false);
|
|
107
104
|
const isDropdown = computed(() => {
|
|
108
105
|
if (ui.isMobile.value) {
|
|
@@ -113,7 +110,7 @@ const isDropdown = computed(() => {
|
|
|
113
110
|
});
|
|
114
111
|
const activeLangcode = computed(() => context.value.language);
|
|
115
112
|
const activeLanguage = computed(() => {
|
|
116
|
-
return translation.value.availableLanguages?.find(
|
|
113
|
+
return state.translation.value.availableLanguages?.find(
|
|
117
114
|
(v) => v.id === activeLangcode.value
|
|
118
115
|
) || {
|
|
119
116
|
id: activeLangcode.value,
|
|
@@ -121,14 +118,14 @@ const activeLanguage = computed(() => {
|
|
|
121
118
|
};
|
|
122
119
|
});
|
|
123
120
|
const items = computed(() => {
|
|
124
|
-
return (translation.value.availableLanguages || []).map((language) => {
|
|
121
|
+
return (state.translation.value.availableLanguages || []).map((language) => {
|
|
125
122
|
if (language && language.id) {
|
|
126
123
|
return {
|
|
127
124
|
id: language.id,
|
|
128
125
|
code: language.id.toUpperCase(),
|
|
129
126
|
label: language.name,
|
|
130
127
|
checked: context.value.language === language.id,
|
|
131
|
-
translation: (translation.value.translations || []).find(
|
|
128
|
+
translation: (state.translation.value.translations || []).find(
|
|
132
129
|
(v) => v.id === language.id
|
|
133
130
|
)
|
|
134
131
|
};
|
|
@@ -180,12 +177,12 @@ function onTranslate(items2) {
|
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
179
|
onBlokkliEvent("item:doubleClick", function(block) {
|
|
183
|
-
if (
|
|
180
|
+
if (isTranslating.value && canTranslateBlock.value) {
|
|
184
181
|
onTranslate([block]);
|
|
185
182
|
}
|
|
186
183
|
});
|
|
187
184
|
onBlokkliEvent("entity:translated", (langcode) => {
|
|
188
|
-
const targetTranslation = translation.value.translations?.find(
|
|
185
|
+
const targetTranslation = state.translation.value.translations?.find(
|
|
189
186
|
(v) => v.id === langcode
|
|
190
187
|
);
|
|
191
188
|
if (targetTranslation) {
|
|
@@ -193,12 +190,12 @@ onBlokkliEvent("entity:translated", (langcode) => {
|
|
|
193
190
|
}
|
|
194
191
|
});
|
|
195
192
|
onMounted(() => {
|
|
196
|
-
const translationExists = !!translation.value.translations?.find(
|
|
193
|
+
const translationExists = !!state.translation.value.translations?.find(
|
|
197
194
|
(v) => v.id === context.value.language
|
|
198
195
|
);
|
|
199
196
|
if (!translationExists) {
|
|
200
|
-
const sourceTranslation = translation.value.translations?.find(
|
|
201
|
-
(v) => v.id === translation.value.sourceLanguage
|
|
197
|
+
const sourceTranslation = state.translation.value.translations?.find(
|
|
198
|
+
(v) => v.id === state.translation.value.sourceLanguage
|
|
202
199
|
);
|
|
203
200
|
if (sourceTranslation) {
|
|
204
201
|
return adapter.changeLanguage(sourceTranslation);
|
|
@@ -27,7 +27,8 @@ defineProps({
|
|
|
27
27
|
required: { type: Boolean, required: false },
|
|
28
28
|
disabled: { type: Boolean, required: false },
|
|
29
29
|
minlength: { type: [String, Number], required: false },
|
|
30
|
-
maxlength: { type: [String, Number], required: false }
|
|
30
|
+
maxlength: { type: [String, Number], required: false },
|
|
31
|
+
type: { type: String, required: false }
|
|
31
32
|
});
|
|
32
33
|
const value = defineModel({ type: String });
|
|
33
34
|
</script>
|
|
@@ -125,7 +125,7 @@ let snakeCanvas = null;
|
|
|
125
125
|
let logoCanvas = null;
|
|
126
126
|
let lastScore = -1;
|
|
127
127
|
let lastBlocksEaten = -1;
|
|
128
|
-
const
|
|
128
|
+
const MOVE_DURATION = 200;
|
|
129
129
|
function generateFood() {
|
|
130
130
|
let newFood;
|
|
131
131
|
do {
|
|
@@ -227,7 +227,7 @@ function update(currentTime) {
|
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
const timeSinceLastUpdate = currentTime - lastCellUpdate;
|
|
230
|
-
if (timeSinceLastUpdate >=
|
|
230
|
+
if (timeSinceLastUpdate >= MOVE_DURATION) {
|
|
231
231
|
if (DEBUG_GAME) {
|
|
232
232
|
nextDirection.value = getAIDirection();
|
|
233
233
|
}
|
|
@@ -250,14 +250,14 @@ function update(currentTime) {
|
|
|
250
250
|
}
|
|
251
251
|
if (newHead.x < 0 || newHead.x >= worldWidth || newHead.y < 0 || newHead.y >= worldHeight) {
|
|
252
252
|
gameOver.value = true;
|
|
253
|
-
gameOverTime = lastCellUpdate +
|
|
253
|
+
gameOverTime = lastCellUpdate + MOVE_DURATION;
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
256
|
if (snake.value.some(
|
|
257
257
|
(segment) => segment.x === newHead.x && segment.y === newHead.y
|
|
258
258
|
)) {
|
|
259
259
|
gameOver.value = true;
|
|
260
|
-
gameOverTime = lastCellUpdate +
|
|
260
|
+
gameOverTime = lastCellUpdate + MOVE_DURATION;
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
263
|
lastCellUpdate = currentTime;
|
|
@@ -421,7 +421,7 @@ function draw(currentTime) {
|
|
|
421
421
|
if (lastCellUpdate > 0) {
|
|
422
422
|
const timeToUse = gameOver.value && gameOverTime > 0 ? gameOverTime : currentTime;
|
|
423
423
|
const timeSinceLastUpdate = timeToUse - lastCellUpdate;
|
|
424
|
-
movementProgress = Math.min(timeSinceLastUpdate /
|
|
424
|
+
movementProgress = Math.min(timeSinceLastUpdate / MOVE_DURATION, 1);
|
|
425
425
|
}
|
|
426
426
|
if (score.value !== lastScore || blocksEaten.value !== lastBlocksEaten) {
|
|
427
427
|
drawScoreArea();
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import AddListItem from './AddListItem/index.vue.js';
|
|
2
|
+
import AddListItemIcon from './AddListItemIcon/index.vue.js';
|
|
3
|
+
import ArtboardTooltip from './ArtboardTooltip/index.vue.js';
|
|
4
|
+
import BlokkliTransition from './Transition/index.vue.js';
|
|
2
5
|
import ConfigForm from './PluginConfigForm/index.vue.js';
|
|
3
6
|
import DialogModal from './Dialog/index.vue.js';
|
|
4
7
|
import DiffViewerState from './DiffViewer/State.vue.js';
|
|
@@ -23,8 +26,7 @@ import Resizable from './Resizable/index.vue.js';
|
|
|
23
26
|
import ScaleToFit from './ScaleToFit/index.vue.js';
|
|
24
27
|
import ScrollBoundary from './ScrollBoundary/index.vue.js';
|
|
25
28
|
import ShortcutIndicator from './ShortcutIndicator/index.vue.js';
|
|
26
|
-
import BlokkliTransition from './Transition/index.vue.js';
|
|
27
29
|
import Sortli from './Sortli/index.vue.js';
|
|
30
|
+
import Banner from './Banner/index.vue.js';
|
|
28
31
|
import ViewportBlockingRect from './ViewportBlockingRect/index.vue.js';
|
|
29
|
-
|
|
30
|
-
export { AddListItem, AddListItemIcon, ConfigForm, DialogModal, DiffViewerState, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormSelect, FormText, FormTextarea, FormToggle, FormRadioTabs, Highlight, Icon, InfoBox, ItemIcon, Loading, Pagination, RelativeTime, Resizable, ScaleToFit, ScrollBoundary, ShortcutIndicator, Sortli, ViewportBlockingRect, BlokkliTransition, };
|
|
32
|
+
export { AddListItem, AddListItemIcon, ArtboardTooltip, BlokkliTransition, ConfigForm, DialogModal, DiffViewerState, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, Loading, Pagination, RelativeTime, Resizable, ScaleToFit, ScrollBoundary, ShortcutIndicator, Sortli, ViewportBlockingRect, Banner, };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import AddListItem from "./AddListItem/index.vue";
|
|
2
|
+
import AddListItemIcon from "./AddListItemIcon/index.vue";
|
|
3
|
+
import ArtboardTooltip from "./ArtboardTooltip/index.vue";
|
|
4
|
+
import BlokkliTransition from "./Transition/index.vue";
|
|
2
5
|
import ConfigForm from "./PluginConfigForm/index.vue";
|
|
3
6
|
import DialogModal from "./Dialog/index.vue";
|
|
4
7
|
import DiffViewerState from "./DiffViewer/State.vue";
|
|
@@ -23,13 +26,14 @@ import Resizable from "./Resizable/index.vue";
|
|
|
23
26
|
import ScaleToFit from "./ScaleToFit/index.vue";
|
|
24
27
|
import ScrollBoundary from "./ScrollBoundary/index.vue";
|
|
25
28
|
import ShortcutIndicator from "./ShortcutIndicator/index.vue";
|
|
26
|
-
import BlokkliTransition from "./Transition/index.vue";
|
|
27
29
|
import Sortli from "./Sortli/index.vue";
|
|
30
|
+
import Banner from "./Banner/index.vue";
|
|
28
31
|
import ViewportBlockingRect from "./ViewportBlockingRect/index.vue";
|
|
29
|
-
import AddListItemIcon from "./AddListItemIcon/index.vue";
|
|
30
32
|
export {
|
|
31
33
|
AddListItem,
|
|
32
34
|
AddListItemIcon,
|
|
35
|
+
ArtboardTooltip,
|
|
36
|
+
BlokkliTransition,
|
|
33
37
|
ConfigForm,
|
|
34
38
|
DialogModal,
|
|
35
39
|
DiffViewerState,
|
|
@@ -38,11 +42,11 @@ export {
|
|
|
38
42
|
FormItem,
|
|
39
43
|
FormOverlay,
|
|
40
44
|
FormRadio,
|
|
45
|
+
FormRadioTabs,
|
|
41
46
|
FormSelect,
|
|
42
47
|
FormText,
|
|
43
48
|
FormTextarea,
|
|
44
49
|
FormToggle,
|
|
45
|
-
FormRadioTabs,
|
|
46
50
|
Highlight,
|
|
47
51
|
Icon,
|
|
48
52
|
InfoBox,
|
|
@@ -56,5 +60,5 @@ export {
|
|
|
56
60
|
ShortcutIndicator,
|
|
57
61
|
Sortli,
|
|
58
62
|
ViewportBlockingRect,
|
|
59
|
-
|
|
63
|
+
Banner
|
|
60
64
|
};
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
INJECT_REUSABLE_OPTIONS,
|
|
7
7
|
INJECT_PROVIDER_BLOCKS,
|
|
8
8
|
INJECT_PROVIDER_CONTEXT,
|
|
9
|
-
INJECT_FIELD_USES_PROXY
|
|
9
|
+
INJECT_FIELD_USES_PROXY,
|
|
10
|
+
INJECT_REUSABLE_UUID
|
|
10
11
|
} from "../helpers/symbols.js";
|
|
11
12
|
import { computed, inject } from "#imports";
|
|
12
13
|
import { getRuntimeOptionValue } from "#blokkli/helpers/runtimeHelpers";
|
|
@@ -45,6 +46,7 @@ export function defineBlokkli(arg) {
|
|
|
45
46
|
INJECT_REUSABLE_OPTIONS,
|
|
46
47
|
null
|
|
47
48
|
);
|
|
49
|
+
const reusableUuid = inject(INJECT_REUSABLE_UUID, null);
|
|
48
50
|
const editContext = inject(INJECT_EDIT_CONTEXT, null);
|
|
49
51
|
const provider = inject(
|
|
50
52
|
INJECT_PROVIDER_CONTEXT,
|
|
@@ -59,7 +61,7 @@ export function defineBlokkli(arg) {
|
|
|
59
61
|
...editContext?.mutatedOptions[uuid] || {}
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
|
-
const optionKey = bundle === BUNDLE_BLOKKLI_FRAGMENT ? "fragment:" + item?.value.fragmentName
|
|
64
|
+
const optionKey = bundle === BUNDLE_BLOKKLI_FRAGMENT ? "fragment:" + item?.value.fragmentName : identifier;
|
|
63
65
|
const runtimeOptionDefinitions = (editContext?.definitions.runtimeOptions.value || OPTIONS)[optionKey] || {};
|
|
64
66
|
const result = Object.entries(runtimeOptionDefinitions).reduce((acc, [key, v]) => {
|
|
65
67
|
const definition = v;
|
|
@@ -95,7 +97,7 @@ export function defineBlokkli(arg) {
|
|
|
95
97
|
if (editContext?.useBlockRegistration && editContext.dom && bundle !== BUNDLE_FROM_LIBRARY && bundle !== BUNDLE_BLOKKLI_FRAGMENT) {
|
|
96
98
|
const isProxyMode = inject(INJECT_FIELD_USES_PROXY, false);
|
|
97
99
|
if (!isProxyMode) {
|
|
98
|
-
editContext.useBlockRegistration(editContext.dom, uuid);
|
|
100
|
+
editContext.useBlockRegistration(editContext.dom, reusableUuid ?? uuid);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
return {
|