@blokkli/editor 2.0.0-alpha.16 → 2.0.0-alpha.18
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 +640 -137
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -1
- package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +3 -1
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
- package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
- package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
- package/dist/modules/drupal/index.mjs +33 -0
- package/dist/modules/drupal/runtime/adapter/index.js +12 -4
- package/dist/runtime/adapter/index.d.ts +21 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -15
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +20 -44
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
- package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
- package/dist/runtime/components/BlokkliEditable.vue +32 -14
- package/dist/runtime/components/BlokkliField.vue +3 -0
- package/dist/runtime/components/BlokkliField.vue.d.ts +3 -3
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
- package/dist/runtime/components/BlokkliProvider.vue +41 -28
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +2 -1
- package/dist/runtime/components/Edit/Actions/index.vue +36 -20
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +436 -25
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +83 -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 +6 -4
- package/dist/runtime/components/Edit/DraggableList.vue +15 -7
- package/dist/runtime/components/Edit/DraggableList.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
- package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/EditProvider.vue +101 -31
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/AddList/index.vue +9 -11
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +28 -26
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +1 -1
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -11
- package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +19 -102
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +3 -0
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +29 -53
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
- package/dist/runtime/components/Edit/Features/{Selection/AddButtons/AddButtonsField.vue.d.ts → BlockScheduler/Dialog/index.vue.d.ts} +6 -9
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +15 -16
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/{Group → Item}/index.vue.d.ts +9 -13
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +46 -66
- package/dist/runtime/components/Edit/Features/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/{Publish/Dialog/ScheduleDate.vue.d.ts → Comments/CommentInput/index.vue.d.ts} +2 -2
- 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 +21 -9
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +4 -7
- 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 +7 -165
- package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +14 -6
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +55 -48
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +30 -18
- package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
- package/dist/runtime/components/Edit/Features/Edit/index.vue +16 -22
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +7 -6
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +69 -4
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +45 -87
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +41 -43
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/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 +261 -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/Hover/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +32 -28
- package/dist/runtime/components/Edit/Features/Library/index.vue +28 -23
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +6 -3
- package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +36 -29
- 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 +8 -6
- package/dist/runtime/components/Edit/Features/Options/index.vue +6 -6
- 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/index.vue +68 -15
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
- package/dist/runtime/components/Edit/Features/Search/index.vue +4 -1
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +39 -74
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +7 -5
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +440 -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 +53 -125
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +88 -29
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +11 -2
- package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Selection/index.vue +66 -39
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
- package/dist/runtime/components/Edit/Features/Transform/index.vue +2 -27
- package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
- package/dist/runtime/components/Edit/Features/Translations/index.vue +20 -23
- package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/index.vue +17 -7
- package/dist/runtime/components/Edit/Form/Text/index.vue +2 -1
- package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
- package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
- package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/Konami/Game/index.vue +5 -5
- package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue → ScheduleDate/index.vue} +6 -58
- package/dist/runtime/components/Edit/ScheduleDate/index.vue.d.ts +23 -0
- package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +3 -0
- package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
- package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
- package/dist/runtime/components/Edit/index.d.ts +7 -3
- package/dist/runtime/components/Edit/index.js +12 -4
- package/dist/runtime/composables/defineBlokkli.js +4 -2
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.d.ts +35 -1
- package/dist/runtime/helpers/animationProvider.js +179 -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/useStateBasedCache.d.ts +4 -0
- package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +4 -1
- package/dist/runtime/helpers/composables/useStickyToolbar.js +53 -35
- package/dist/runtime/helpers/definitionProvider.d.ts +1 -1
- package/dist/runtime/helpers/dom/index.d.ts +1 -0
- package/dist/runtime/helpers/domProvider.d.ts +54 -14
- package/dist/runtime/helpers/domProvider.js +168 -134
- package/dist/runtime/helpers/index.d.ts +1 -8
- package/dist/runtime/helpers/index.js +1 -84
- package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
- package/dist/runtime/helpers/providers/blocks.js +91 -0
- package/dist/runtime/helpers/providers/directive.d.ts +24 -0
- package/dist/runtime/helpers/providers/directive.js +205 -0
- package/dist/runtime/helpers/providers/element.d.ts +6 -0
- package/dist/runtime/helpers/providers/element.js +35 -0
- package/dist/runtime/helpers/providers/fields.d.ts +8 -0
- package/dist/runtime/helpers/providers/fields.js +47 -0
- package/dist/runtime/helpers/selectionProvider.d.ts +11 -11
- package/dist/runtime/helpers/selectionProvider.js +38 -45
- package/dist/runtime/helpers/stateProvider.d.ts +7 -2
- package/dist/runtime/helpers/stateProvider.js +83 -14
- 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/themeProvider.d.ts +2 -1
- package/dist/runtime/helpers/themeProvider.js +24 -14
- package/dist/runtime/helpers/typesProvider.js +10 -26
- package/dist/runtime/helpers/uiProvider.d.ts +11 -3
- package/dist/runtime/helpers/uiProvider.js +45 -17
- package/dist/runtime/icons/calendar.svg +1 -0
- package/dist/runtime/icons/clock.svg +1 -0
- package/dist/runtime/icons/comment_add.svg +1 -5
- package/dist/runtime/icons/delete.svg +1 -8
- package/dist/runtime/icons/duplicate.svg +1 -12
- package/dist/runtime/icons/edit.svg +1 -8
- package/dist/runtime/icons/reusable.svg +1 -5
- package/dist/runtime/plugins/blokkliDirectives.js +96 -0
- package/dist/runtime/types/index.d.ts +66 -35
- package/package.json +1 -1
- package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -401
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -63
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +0 -54
- package/dist/runtime/plugins/blokkliEditable.js +0 -31
- /package/dist/runtime/components/Edit/{DragInteractions → Features/BlockScheduler}/index.vue.d.ts +0 -0
- /package/dist/runtime/plugins/{blokkliEditable.d.ts → blokkliDirectives.d.ts} +0 -0
|
@@ -12,6 +12,7 @@ import { falsy, getFieldKey } from "#blokkli/helpers";
|
|
|
12
12
|
import { eventBus, emitMessage } from "#blokkli/helpers/eventBus";
|
|
13
13
|
import { nextTick } from "#imports";
|
|
14
14
|
import { addElementClasses } from "./addElementClasses.js";
|
|
15
|
+
import { BUNDLE_FROM_LIBRARY } from "#blokkli/constants";
|
|
15
16
|
const HOST_OPTION_KEY = "HOST";
|
|
16
17
|
function mapPublishOptions(context) {
|
|
17
18
|
return {
|
|
@@ -24,7 +25,7 @@ function mapPublishOptions(context) {
|
|
|
24
25
|
revisionLogMessage: context?.publishOptions?.revisionLogMessage ?? null
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
export default async function(adapter, context, $t, providerKey) {
|
|
28
|
+
export default async function(adapter, context, $t, providerKey, permissions) {
|
|
28
29
|
let _mappedState = null;
|
|
29
30
|
const overrideHostOptions = useState("options:" + providerKey);
|
|
30
31
|
const stateLoaded = ref(false);
|
|
@@ -56,10 +57,12 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
56
57
|
});
|
|
57
58
|
let fieldBlockCount = {};
|
|
58
59
|
const blockBundleCount = ref({});
|
|
59
|
-
const fieldListItemMap =
|
|
60
|
+
const fieldListItemMap = ref({});
|
|
60
61
|
let bundleToUuids = {};
|
|
62
|
+
const fromLibraryUuids = ref([]);
|
|
63
|
+
const nestingLevelMap = /* @__PURE__ */ new Map();
|
|
61
64
|
function getFieldListItem(uuid) {
|
|
62
|
-
const fieldKey = fieldListItemMap.
|
|
65
|
+
const fieldKey = fieldListItemMap.value[uuid];
|
|
63
66
|
if (!fieldKey) {
|
|
64
67
|
return;
|
|
65
68
|
}
|
|
@@ -69,8 +72,11 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
69
72
|
}
|
|
70
73
|
return field.list.find((v) => v.uuid === uuid);
|
|
71
74
|
}
|
|
75
|
+
function getFieldKeyForUuid(uuid) {
|
|
76
|
+
return fieldListItemMap.value[uuid] ?? null;
|
|
77
|
+
}
|
|
72
78
|
function getFieldListForBlock(uuid) {
|
|
73
|
-
const fieldKey = fieldListItemMap.
|
|
79
|
+
const fieldKey = fieldListItemMap.value[uuid];
|
|
74
80
|
if (!fieldKey) {
|
|
75
81
|
return;
|
|
76
82
|
}
|
|
@@ -140,9 +146,11 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
140
146
|
mutatedEntity.value = context2?.mutatedEntity;
|
|
141
147
|
const visitedFieldKeys = [];
|
|
142
148
|
const newBlockBundleCount = {};
|
|
143
|
-
fieldListItemMap.
|
|
149
|
+
fieldListItemMap.value = {};
|
|
150
|
+
nestingLevelMap.clear();
|
|
144
151
|
fieldBlockCount = {};
|
|
145
152
|
bundleToUuids = {};
|
|
153
|
+
const fromLibrary = [];
|
|
146
154
|
for (let i = 0; i < newMutatedFields.length; i++) {
|
|
147
155
|
const field = newMutatedFields[i];
|
|
148
156
|
const key = getFieldKey(field.entityUuid, field.name);
|
|
@@ -157,11 +165,21 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
157
165
|
newBlockBundleCount[item.bundle] = 0;
|
|
158
166
|
}
|
|
159
167
|
newBlockBundleCount[item.bundle]++;
|
|
160
|
-
fieldListItemMap.
|
|
168
|
+
fieldListItemMap.value[item.uuid] = key;
|
|
161
169
|
if (!bundleToUuids[item.bundle]) {
|
|
162
170
|
bundleToUuids[item.bundle] = [];
|
|
163
171
|
}
|
|
164
172
|
bundleToUuids[item.bundle].push(item.uuid);
|
|
173
|
+
if (item.bundle === BUNDLE_FROM_LIBRARY) {
|
|
174
|
+
fromLibrary.push(item.uuid);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
for (let i = 0; i < newMutatedFields.length; i++) {
|
|
179
|
+
const field = newMutatedFields[i];
|
|
180
|
+
for (let j = 0; j < field.list.length; j++) {
|
|
181
|
+
const item = field.list[j];
|
|
182
|
+
calculateNestingLevel(item.uuid);
|
|
165
183
|
}
|
|
166
184
|
}
|
|
167
185
|
blockBundleCount.value = newBlockBundleCount;
|
|
@@ -172,6 +190,7 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
172
190
|
mutatedFieldsMap[key] = void 0;
|
|
173
191
|
}
|
|
174
192
|
}
|
|
193
|
+
fromLibraryUuids.value = fromLibrary;
|
|
175
194
|
eventBus.emit("updateMutatedFields", { fields: newMutatedFields });
|
|
176
195
|
nextTick(() => {
|
|
177
196
|
refreshKey.value = Date.now().toString();
|
|
@@ -201,10 +220,53 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
201
220
|
}
|
|
202
221
|
function getAllUuids(bundle) {
|
|
203
222
|
if (!bundle) {
|
|
204
|
-
return [...
|
|
223
|
+
return [...Object.keys(fieldListItemMap.value)];
|
|
205
224
|
}
|
|
206
225
|
return bundleToUuids[bundle] ?? [];
|
|
207
226
|
}
|
|
227
|
+
function calculateNestingLevel(uuid) {
|
|
228
|
+
const cached = nestingLevelMap.get(uuid);
|
|
229
|
+
if (cached !== void 0) {
|
|
230
|
+
return cached;
|
|
231
|
+
}
|
|
232
|
+
const fieldKey = fieldListItemMap.value[uuid];
|
|
233
|
+
if (!fieldKey) {
|
|
234
|
+
nestingLevelMap.set(uuid, 0);
|
|
235
|
+
return 0;
|
|
236
|
+
}
|
|
237
|
+
const field = mutatedFieldsMap[fieldKey];
|
|
238
|
+
if (!field) {
|
|
239
|
+
nestingLevelMap.set(uuid, 0);
|
|
240
|
+
return 0;
|
|
241
|
+
}
|
|
242
|
+
const parentEntityUuid = field.entityUuid;
|
|
243
|
+
const parentFieldKey = fieldListItemMap.value[parentEntityUuid];
|
|
244
|
+
if (!parentFieldKey) {
|
|
245
|
+
nestingLevelMap.set(uuid, 0);
|
|
246
|
+
return 0;
|
|
247
|
+
}
|
|
248
|
+
const parentLevel = calculateNestingLevel(parentEntityUuid);
|
|
249
|
+
const level = parentLevel + 1;
|
|
250
|
+
nestingLevelMap.set(uuid, level);
|
|
251
|
+
return level;
|
|
252
|
+
}
|
|
253
|
+
function getNestingLevel(uuid) {
|
|
254
|
+
return nestingLevelMap.get(uuid) ?? 0;
|
|
255
|
+
}
|
|
256
|
+
function isChildOf(childUuid, parentUuid) {
|
|
257
|
+
const fieldKey = fieldListItemMap.value[childUuid];
|
|
258
|
+
if (!fieldKey) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
const field = mutatedFieldsMap[fieldKey];
|
|
262
|
+
if (!field) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
if (field.entityUuid === parentUuid) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
return isChildOf(field.entityUuid, parentUuid);
|
|
269
|
+
}
|
|
208
270
|
addElementClasses(document.body, "bk-body-loading", isLoading);
|
|
209
271
|
const mutateWithLoadingState = async (callback, errorMessage, successMessage) => {
|
|
210
272
|
if (!callback) {
|
|
@@ -230,11 +292,13 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
230
292
|
}
|
|
231
293
|
return true;
|
|
232
294
|
} catch (e) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
295
|
+
if (errorMessage !== false) {
|
|
296
|
+
emitMessage(
|
|
297
|
+
errorMessage || $t("unexpectedMutationError", "An unexpected error happened."),
|
|
298
|
+
"error",
|
|
299
|
+
e
|
|
300
|
+
);
|
|
301
|
+
}
|
|
238
302
|
}
|
|
239
303
|
unlockBody();
|
|
240
304
|
return false;
|
|
@@ -254,7 +318,7 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
254
318
|
}
|
|
255
319
|
}
|
|
256
320
|
const canEdit = computed(
|
|
257
|
-
() => stateLoaded.value && !!owner.value?.currentUserIsOwner && !stateLoadError.value
|
|
321
|
+
() => stateLoaded.value && !!owner.value?.currentUserIsOwner && !stateLoadError.value && permissions.includes("edit")
|
|
258
322
|
);
|
|
259
323
|
const isTranslation = computed(
|
|
260
324
|
() => context.value.language !== translation.value.sourceLanguage && translation.value.isTranslatable
|
|
@@ -322,7 +386,12 @@ export default async function(adapter, context, $t, providerKey) {
|
|
|
322
386
|
getMutatedField,
|
|
323
387
|
getFieldListForBlock,
|
|
324
388
|
getAllUuids,
|
|
389
|
+
getNestingLevel,
|
|
390
|
+
isChildOf,
|
|
325
391
|
setOverrideState,
|
|
326
|
-
clearOverrideState
|
|
392
|
+
clearOverrideState,
|
|
393
|
+
fromLibraryUuids: readonly(fromLibraryUuids),
|
|
394
|
+
permissions: computed(() => permissions),
|
|
395
|
+
getFieldKeyForUuid
|
|
327
396
|
};
|
|
328
397
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ComputedRef, type WritableComputedRef } from '#imports';
|
|
2
|
-
import type { BlokkliAdapter } from '#blokkli/adapter';
|
|
2
|
+
import type { AdapterContext, BlokkliAdapter } from '#blokkli/adapter';
|
|
3
3
|
export type StorageProvider = {
|
|
4
4
|
use: <T>(key: string | ComputedRef<string>, defaultValue: T, persist?: boolean) => WritableComputedRef<T>;
|
|
5
|
+
useWithContextPrefix: <T>(key: string, defaultValue: T, persist?: boolean) => WritableComputedRef<T>;
|
|
5
6
|
clearAll: () => void;
|
|
6
7
|
clear: (key: string) => void;
|
|
7
8
|
};
|
|
@@ -13,4 +14,4 @@ export type StorageProvider = {
|
|
|
13
14
|
* This composable can be used to keep state across page navigations and
|
|
14
15
|
* even after a refresh.
|
|
15
16
|
*/
|
|
16
|
-
export default function (adapter: BlokkliAdapter<any>): Promise<StorageProvider>;
|
|
17
|
+
export default function (adapter: BlokkliAdapter<any>, context: ComputedRef<AdapterContext>): Promise<StorageProvider>;
|
|
@@ -15,7 +15,7 @@ const getExisting = (key) => {
|
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
export default async function(adapter) {
|
|
18
|
+
export default async function(adapter, context) {
|
|
19
19
|
const values = ref({});
|
|
20
20
|
const defaults = ref({});
|
|
21
21
|
let timeout = null;
|
|
@@ -97,6 +97,10 @@ export default async function(adapter) {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
+
const useWithContextPrefix = (key, providedDefaultValue, persist) => {
|
|
101
|
+
const fullKey = key + ":" + context.value.entityType + ":" + context.value.entityUuid;
|
|
102
|
+
return use(fullKey, providedDefaultValue, persist);
|
|
103
|
+
};
|
|
100
104
|
const clearAll = () => {
|
|
101
105
|
values.value = {};
|
|
102
106
|
Object.keys(window.localStorage).forEach((key) => {
|
|
@@ -110,5 +114,5 @@ export default async function(adapter) {
|
|
|
110
114
|
values.value[storageKey] = void 0;
|
|
111
115
|
window.localStorage.removeItem(storageKey);
|
|
112
116
|
};
|
|
113
|
-
return { use, clearAll, clear };
|
|
117
|
+
return { use, useWithContextPrefix, clearAll, clear };
|
|
114
118
|
}
|
|
@@ -6,6 +6,7 @@ export declare const INJECT_NESTING_LEVEL: unique symbol;
|
|
|
6
6
|
export declare const INJECT_IS_PREVIEW: unique symbol;
|
|
7
7
|
export declare const INJECT_IS_IN_REUSABLE: unique symbol;
|
|
8
8
|
export declare const INJECT_REUSABLE_OPTIONS: unique symbol;
|
|
9
|
+
export declare const INJECT_REUSABLE_UUID: unique symbol;
|
|
9
10
|
export declare const INJECT_FIELD_LIST_TYPE: unique symbol;
|
|
10
11
|
export declare const INJECT_FIELD_LIST_BLOCKS: unique symbol;
|
|
11
12
|
export declare const INJECT_FIELD_PROXY_MODE: unique symbol;
|
|
@@ -6,6 +6,7 @@ export const INJECT_NESTING_LEVEL = Symbol("blokkli_nesting_level");
|
|
|
6
6
|
export const INJECT_IS_PREVIEW = Symbol("blokkli_is_preview");
|
|
7
7
|
export const INJECT_IS_IN_REUSABLE = Symbol("blokkli_is_in_reusable");
|
|
8
8
|
export const INJECT_REUSABLE_OPTIONS = Symbol("blokkli_from_library_options");
|
|
9
|
+
export const INJECT_REUSABLE_UUID = Symbol("blokkli_from_library_uuid");
|
|
9
10
|
export const INJECT_FIELD_LIST_TYPE = Symbol("blokkli_field_list_type");
|
|
10
11
|
export const INJECT_FIELD_LIST_BLOCKS = Symbol("blokkli_field_list_blocks");
|
|
11
12
|
export const INJECT_FIELD_PROXY_MODE = Symbol("blokkli_field_proxy_mode");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DraggableStyle } from '#blokkli/types';
|
|
2
2
|
import type { RGB, ThemeColorGroup, ThemeColorShade, ThemeColors, ThemeContextColorGroup, ThemeContextColorShade, ThemeContextColors, ThemeName } from '#blokkli/types/theme';
|
|
3
3
|
import { type Ref } from '#imports';
|
|
4
|
+
import type { ElementProvider } from './providers/element.js';
|
|
4
5
|
type ThemeMap = {
|
|
5
6
|
accent: Ref<ThemeColors>;
|
|
6
7
|
mono: Ref<ThemeColors>;
|
|
@@ -25,5 +26,5 @@ export type ThemeProvider = {
|
|
|
25
26
|
getColor<K extends keyof ThemeMap, T extends ThemeMap[K]['value']>(color: K, key: keyof T): RGB;
|
|
26
27
|
getColorString<K extends keyof ThemeMap, T extends ThemeMap[K]['value']>(color: K, key: keyof T, alpha?: number): string;
|
|
27
28
|
};
|
|
28
|
-
export default function (): ThemeProvider;
|
|
29
|
+
export default function (element: ElementProvider): ThemeProvider;
|
|
29
30
|
export {};
|
|
@@ -3,7 +3,15 @@ import { ref, onMounted, onBeforeUnmount } from "#imports";
|
|
|
3
3
|
import { rgbaToString } from "./index.js";
|
|
4
4
|
import { DragStyle } from "./DragStyle/index.js";
|
|
5
5
|
import onBlokkliEvent from "./composables/onBlokkliEvent.js";
|
|
6
|
-
export default function() {
|
|
6
|
+
export default function(element) {
|
|
7
|
+
const rootElement = element.query(
|
|
8
|
+
document,
|
|
9
|
+
":root",
|
|
10
|
+
"Get document root element for setting theme color."
|
|
11
|
+
);
|
|
12
|
+
if (!rootElement) {
|
|
13
|
+
throw new Error("Failed to query :root - is this even possible?");
|
|
14
|
+
}
|
|
7
15
|
const originalBrowserThemeColor = ref("");
|
|
8
16
|
const THEME_COLOR = "black";
|
|
9
17
|
const accent = ref(theme.accent);
|
|
@@ -44,13 +52,10 @@ export default function() {
|
|
|
44
52
|
} else if (group === "lime") {
|
|
45
53
|
lime.value[shade] = value;
|
|
46
54
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`${value[0]} ${value[1]} ${value[2]}`
|
|
52
|
-
);
|
|
53
|
-
}
|
|
55
|
+
rootElement.style.setProperty(
|
|
56
|
+
`--bk-theme-${group}-${shade}`,
|
|
57
|
+
`${value[0]} ${value[1]} ${value[2]}`
|
|
58
|
+
);
|
|
54
59
|
};
|
|
55
60
|
const setColorsFromTheme = (v) => {
|
|
56
61
|
Object.entries(v).forEach(([group, colors]) => {
|
|
@@ -79,7 +84,11 @@ export default function() {
|
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
86
|
onMounted(() => {
|
|
82
|
-
const el =
|
|
87
|
+
const el = element.query(
|
|
88
|
+
document.head,
|
|
89
|
+
'[name="theme-color"]',
|
|
90
|
+
"Theme: theme-color"
|
|
91
|
+
);
|
|
83
92
|
if (el instanceof HTMLMetaElement) {
|
|
84
93
|
originalBrowserThemeColor.value = el.content;
|
|
85
94
|
el.content = THEME_COLOR;
|
|
@@ -87,14 +96,15 @@ export default function() {
|
|
|
87
96
|
const meta = document.createElement("meta");
|
|
88
97
|
meta.name = "theme-color";
|
|
89
98
|
meta.content = THEME_COLOR;
|
|
90
|
-
|
|
91
|
-
if (head) {
|
|
92
|
-
head.appendChild(meta);
|
|
93
|
-
}
|
|
99
|
+
document.head.appendChild(meta);
|
|
94
100
|
}
|
|
95
101
|
});
|
|
96
102
|
onBeforeUnmount(() => {
|
|
97
|
-
const el =
|
|
103
|
+
const el = element.query(
|
|
104
|
+
document.head,
|
|
105
|
+
'[name="theme-color"]',
|
|
106
|
+
"Theme: theme-color"
|
|
107
|
+
);
|
|
98
108
|
if (el instanceof HTMLMetaElement) {
|
|
99
109
|
if (originalBrowserThemeColor.value) {
|
|
100
110
|
el.content = originalBrowserThemeColor.value;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRuntimeConfig, computed, watch } from "#imports";
|
|
1
|
+
import { useRuntimeConfig, computed } from "#imports";
|
|
3
2
|
import { onlyUnique } from "./index.js";
|
|
4
3
|
class ConfigMap {
|
|
5
4
|
configs = [];
|
|
@@ -52,38 +51,23 @@ export default async function(adapter, selection, context) {
|
|
|
52
51
|
const droppableFieldConfigData = adapter.getDroppableFieldConfig ? await adapter.getDroppableFieldConfig() : [];
|
|
53
52
|
const droppableFieldConfig = new ConfigMap(droppableFieldConfigData);
|
|
54
53
|
const allowedTypesInList = computed(() => {
|
|
55
|
-
if (!selection.
|
|
54
|
+
if (!selection.items.value.length) {
|
|
56
55
|
return [];
|
|
57
56
|
}
|
|
58
57
|
let hostType = "";
|
|
59
58
|
let hostBundle = "";
|
|
60
59
|
let fieldName = "";
|
|
61
|
-
for (let i = 0; i < selection.
|
|
62
|
-
const block = selection.
|
|
63
|
-
if (i !== 0 && (hostType !== block.
|
|
60
|
+
for (let i = 0; i < selection.items.value.length; i++) {
|
|
61
|
+
const block = selection.items.value[i];
|
|
62
|
+
if (i !== 0 && (hostType !== block.host.type || hostBundle !== block.host.bundle || fieldName !== block.host.fieldName)) {
|
|
64
63
|
return [];
|
|
65
64
|
}
|
|
66
|
-
hostType = block.
|
|
67
|
-
hostBundle = block.
|
|
68
|
-
fieldName = block.
|
|
65
|
+
hostType = block.host.type;
|
|
66
|
+
hostBundle = block.host.bundle;
|
|
67
|
+
fieldName = block.host.fieldName;
|
|
69
68
|
}
|
|
70
69
|
return fieldConfig.forName(hostType, hostBundle, fieldName)?.allowedBundles || [];
|
|
71
70
|
});
|
|
72
|
-
watch(selection.blocks, () => {
|
|
73
|
-
if (selection.blocks.value.length !== 1) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const item = selection.blocks.value[0];
|
|
77
|
-
const hasNested = itemBundlesWithNested.includes(item.itemBundle);
|
|
78
|
-
if (hasNested) {
|
|
79
|
-
const nestedFields = fieldConfig.forEntityTypeAndBundle(itemEntityType, item.itemBundle).map((v) => v.name) || [];
|
|
80
|
-
if (nestedFields.length === 1) {
|
|
81
|
-
eventBus.emit("setActiveFieldKey", `${item.uuid}:${nestedFields[0]}`);
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
eventBus.emit("setActiveFieldKey", `${item.hostUuid}:${item.hostFieldName}`);
|
|
86
|
-
});
|
|
87
71
|
const itemBundlesWithNested = fieldConfig.forEntityType(itemEntityType).map((v) => v.entityBundle) || [];
|
|
88
72
|
const typeMap = bundleDefinitions.reduce((acc, type) => {
|
|
89
73
|
acc[type.id] = type;
|
|
@@ -96,8 +80,8 @@ export default async function(adapter, selection, context) {
|
|
|
96
80
|
return fieldConfig.forName(entityType, entityBundle, fieldName);
|
|
97
81
|
}
|
|
98
82
|
function getDroppableFieldConfig(fieldName, host) {
|
|
99
|
-
const entityType = "
|
|
100
|
-
const entityBundle = "
|
|
83
|
+
const entityType = "itemType" in host ? host.block.host.type : host.type;
|
|
84
|
+
const entityBundle = "itemType" in host ? host.block.host.bundle : host.bundle;
|
|
101
85
|
const config = droppableFieldConfig.forName(
|
|
102
86
|
entityType,
|
|
103
87
|
entityBundle,
|
|
@@ -4,10 +4,12 @@ import type { AddListOrientation, Coord, Rectangle, Size } from '#blokkli/types'
|
|
|
4
4
|
import type { Viewport } from '#blokkli/constants';
|
|
5
5
|
import type { StateProvider } from './stateProvider.js';
|
|
6
6
|
import type { AdapterContext } from '#blokkli/adapter';
|
|
7
|
+
import type { ThemeColorName } from '#blokkli/types/theme';
|
|
8
|
+
import type { ElementProvider } from './providers/element.js';
|
|
7
9
|
export type UiProvider = {
|
|
8
10
|
rootElement: () => HTMLElement;
|
|
9
11
|
artboardElement: () => HTMLElement;
|
|
10
|
-
providerElement:
|
|
12
|
+
providerElement: HTMLElement;
|
|
11
13
|
menu: {
|
|
12
14
|
isOpen: Readonly<Ref<boolean>>;
|
|
13
15
|
close: () => void;
|
|
@@ -19,7 +21,11 @@ export type UiProvider = {
|
|
|
19
21
|
isAnalyzing: Ref<boolean>;
|
|
20
22
|
isProxyMode: Ref<boolean>;
|
|
21
23
|
hasDialogOpen: Ref<boolean>;
|
|
22
|
-
|
|
24
|
+
hasTooltipOpen: ComputedRef<boolean>;
|
|
25
|
+
openTooltip: Ref<string>;
|
|
26
|
+
selectionColor: ComputedRef<ThemeColorName | null>;
|
|
27
|
+
setSelectionColor: (id: string, color: ThemeColorName) => void;
|
|
28
|
+
removeSelectionColor: (id: string) => void;
|
|
23
29
|
hasTransformOverlayOpen: Ref<boolean>;
|
|
24
30
|
isTransforming: ComputedRef<boolean>;
|
|
25
31
|
setTransform: (label?: string | null | undefined) => void;
|
|
@@ -44,5 +50,7 @@ export type UiProvider = {
|
|
|
44
50
|
formatDate: (date: string | Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
45
51
|
getAbsoluteElementRect: (v: HTMLElement | Rectangle, scale?: number, offset?: Coord) => Rectangle;
|
|
46
52
|
getViewportRelativeRect: (rect: Rectangle, scale?: number, offset?: Coord) => Rectangle;
|
|
53
|
+
setBannerHeight: (id: string, height: number) => void;
|
|
54
|
+
removeBanner: (id: string) => void;
|
|
47
55
|
};
|
|
48
|
-
export default function (storage: StorageProvider, state: StateProvider, context: ComputedRef<AdapterContext
|
|
56
|
+
export default function (providerElement: HTMLElement, storage: StorageProvider, state: StateProvider, context: ComputedRef<AdapterContext>, element: ElementProvider): UiProvider;
|
|
@@ -15,10 +15,9 @@ const localeMap = {
|
|
|
15
15
|
it: "it-CH",
|
|
16
16
|
en: "en-GB"
|
|
17
17
|
};
|
|
18
|
-
export default function(storage, state, context) {
|
|
18
|
+
export default function(providerElement, storage, state, context, element) {
|
|
19
19
|
let cachedRootElement = null;
|
|
20
20
|
let cachedArtboardElement = null;
|
|
21
|
-
let cachedProviderElement = null;
|
|
22
21
|
const interfaceLanguage = computed(() => {
|
|
23
22
|
return forceDefaultLanguage ? defaultLanguage : context.value.language;
|
|
24
23
|
});
|
|
@@ -29,12 +28,19 @@ export default function(storage, state, context) {
|
|
|
29
28
|
const isProxyMode = ref(false);
|
|
30
29
|
const menuIsOpen = ref(false);
|
|
31
30
|
const hasDialogOpen = ref(false);
|
|
32
|
-
const
|
|
31
|
+
const openTooltip = ref("");
|
|
33
32
|
const hasTransformOverlayOpen = ref(false);
|
|
34
33
|
const isAnimating = ref(false);
|
|
35
34
|
const isAnalyzing = ref(false);
|
|
36
35
|
const transformLabel = ref("");
|
|
37
36
|
const openContextMenu = ref("");
|
|
37
|
+
const banners = ref({});
|
|
38
|
+
function setBannerHeight(id, height) {
|
|
39
|
+
banners.value[id] = height;
|
|
40
|
+
}
|
|
41
|
+
function removeBanner(id) {
|
|
42
|
+
banners.value[id] = 0;
|
|
43
|
+
}
|
|
38
44
|
const selectionTopLeft = ref({ x: 0, y: 0 });
|
|
39
45
|
const baseSettings = storage.use("feature:settings:settings", {});
|
|
40
46
|
const lowPerformanceMode = computed(
|
|
@@ -79,7 +85,11 @@ export default function(storage, state, context) {
|
|
|
79
85
|
if (cachedArtboardElement) {
|
|
80
86
|
return cachedArtboardElement;
|
|
81
87
|
}
|
|
82
|
-
const el =
|
|
88
|
+
const el = element.query(
|
|
89
|
+
document.documentElement,
|
|
90
|
+
".bk-main-canvas",
|
|
91
|
+
"Get main canvas."
|
|
92
|
+
);
|
|
83
93
|
if (!el || !(el instanceof HTMLElement)) {
|
|
84
94
|
throw new Error("Failed to locate artboard element.");
|
|
85
95
|
}
|
|
@@ -90,24 +100,17 @@ export default function(storage, state, context) {
|
|
|
90
100
|
if (cachedRootElement) {
|
|
91
101
|
return cachedRootElement;
|
|
92
102
|
}
|
|
93
|
-
const el =
|
|
103
|
+
const el = element.query(
|
|
104
|
+
document.documentElement,
|
|
105
|
+
"#nuxt-root",
|
|
106
|
+
"Get Nuxt root element."
|
|
107
|
+
);
|
|
94
108
|
if (!el || !(el instanceof HTMLElement)) {
|
|
95
109
|
throw new Error("Failed to locate root Nuxt element.");
|
|
96
110
|
}
|
|
97
111
|
cachedRootElement = el;
|
|
98
112
|
return el;
|
|
99
113
|
};
|
|
100
|
-
const providerElement = () => {
|
|
101
|
-
if (cachedProviderElement) {
|
|
102
|
-
return cachedProviderElement;
|
|
103
|
-
}
|
|
104
|
-
const el = document.querySelector('[data-blokkli-provider-active="true"]');
|
|
105
|
-
if (!el || !(el instanceof HTMLElement)) {
|
|
106
|
-
throw new Error("Failed to locate provider element.");
|
|
107
|
-
}
|
|
108
|
-
cachedProviderElement = el;
|
|
109
|
-
return el;
|
|
110
|
-
};
|
|
111
114
|
const appViewport = computed(() => {
|
|
112
115
|
if (viewportWidth.value < 1024) {
|
|
113
116
|
return "mobile";
|
|
@@ -175,6 +178,11 @@ export default function(storage, state, context) {
|
|
|
175
178
|
height -= 70;
|
|
176
179
|
}
|
|
177
180
|
}
|
|
181
|
+
const bannerHeights = Object.values(banners.value).filter(Boolean);
|
|
182
|
+
bannerHeights.forEach((bannerHeight) => {
|
|
183
|
+
height -= bannerHeight;
|
|
184
|
+
});
|
|
185
|
+
height -= bannerHeights.length * 10;
|
|
178
186
|
return height;
|
|
179
187
|
});
|
|
180
188
|
const blockingPaddingX = computed(() => 15);
|
|
@@ -279,6 +287,20 @@ export default function(storage, state, context) {
|
|
|
279
287
|
resizeObserver.unobserve(artboard);
|
|
280
288
|
resizeObserver.disconnect();
|
|
281
289
|
});
|
|
290
|
+
const hasTooltipOpen = computed(() => !!openTooltip.value);
|
|
291
|
+
const selectionColors = ref([]);
|
|
292
|
+
function setSelectionColor(id, color) {
|
|
293
|
+
selectionColors.value = [
|
|
294
|
+
...selectionColors.value.filter((v) => v.id !== id),
|
|
295
|
+
{ id, color }
|
|
296
|
+
];
|
|
297
|
+
}
|
|
298
|
+
function removeSelectionColor(id) {
|
|
299
|
+
selectionColors.value = selectionColors.value.filter((v) => v.id !== id);
|
|
300
|
+
}
|
|
301
|
+
const selectionColor = computed(() => {
|
|
302
|
+
return selectionColors.value[selectionColors.value.length - 1]?.color ?? null;
|
|
303
|
+
});
|
|
282
304
|
return {
|
|
283
305
|
menu: {
|
|
284
306
|
isOpen: menuIsOpen,
|
|
@@ -318,6 +340,12 @@ export default function(storage, state, context) {
|
|
|
318
340
|
formatDate,
|
|
319
341
|
hasDialogOpen,
|
|
320
342
|
hasTransformOverlayOpen,
|
|
321
|
-
|
|
343
|
+
hasTooltipOpen,
|
|
344
|
+
openTooltip,
|
|
345
|
+
selectionColor,
|
|
346
|
+
setSelectionColor,
|
|
347
|
+
removeSelectionColor,
|
|
348
|
+
setBannerHeight,
|
|
349
|
+
removeBanner
|
|
322
350
|
};
|
|
323
351
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 11H9V13H7V11M21 5V19C21 20.11 20.11 21 19 21H5C3.89 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H6V1H8V3H16V1H18V3H19C20.11 3 21 3.9 21 5M5 7H19V5H5V7M19 19V9H5V19H19M15 13V11H17V13H15M11 13V11H13V13H11M7 15H9V17H7V15M15 17V15H17V17H15M11 17V15H13V17H11Z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z" /></svg>
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
<path
|
|
3
|
-
d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M11,6H13V9H16V11H13V14H11V11H8V9H11V6Z"
|
|
4
|
-
/>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M11,6H13V9H16V11H13V14H11V11H8V9H11V6Z" /></svg>
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
viewBox="0 0 32 32"
|
|
4
|
-
>
|
|
5
|
-
<path
|
|
6
|
-
d="M 15 4 C 14.476563 4 13.941406 4.183594 13.5625 4.5625 C 13.183594 4.941406 13 5.476563 13 6 L 13 7 L 7 7 L 7 9 L 8 9 L 8 25 C 8 26.644531 9.355469 28 11 28 L 23 28 C 24.644531 28 26 26.644531 26 25 L 26 9 L 27 9 L 27 7 L 21 7 L 21 6 C 21 5.476563 20.816406 4.941406 20.4375 4.5625 C 20.058594 4.183594 19.523438 4 19 4 Z M 15 6 L 19 6 L 19 7 L 15 7 Z M 10 9 L 24 9 L 24 25 C 24 25.554688 23.554688 26 23 26 L 11 26 C 10.445313 26 10 25.554688 10 25 Z M 12 12 L 12 23 L 14 23 L 14 12 Z M 16 12 L 16 23 L 18 23 L 18 12 Z M 20 12 L 20 23 L 22 23 L 22 12 Z"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" /></svg>
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
x="0px"
|
|
4
|
-
y="0px"
|
|
5
|
-
width="100"
|
|
6
|
-
height="100"
|
|
7
|
-
viewBox="0 0 32 32"
|
|
8
|
-
>
|
|
9
|
-
<path
|
|
10
|
-
d="M 8 4 L 8 8 L 4 8 L 4 28 L 24 28 L 24 27 L 24 24 L 28 24 L 28 4 L 8 4 z M 10 6 L 26 6 L 26 22 L 24 22 L 24 8 L 10 8 L 10 6 z M 6 10 L 22 10 L 22 26 L 6 26 L 6 10 z M 13 14 L 13 17 L 10 17 L 10 19 L 13 19 L 13 22 L 15 22 L 15 19 L 18 19 L 18 17 L 15 17 L 15 14 L 13 14 z"
|
|
11
|
-
></path>
|
|
12
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 11H15V14H13V11H10V9H13V6H15V9H18M20 4V16H8V4H20M20 2H8C6.9 2 6 2.9 6 4V16C6 17.11 6.9 18 8 18H20C21.11 18 22 17.11 22 16V4C22 2.9 21.11 2 20 2M4 6H2V20C2 21.11 2.9 22 4 22H18V20H4V6Z" /></svg>
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
viewBox="0 0 32 32"
|
|
4
|
-
>
|
|
5
|
-
<path
|
|
6
|
-
d="M 23.90625 3.96875 C 22.859375 3.96875 21.8125 4.375 21 5.1875 L 5.1875 21 L 5.125 21.3125 L 4.03125 26.8125 L 3.71875 28.28125 L 5.1875 27.96875 L 10.6875 26.875 L 11 26.8125 L 26.8125 11 C 28.4375 9.375 28.4375 6.8125 26.8125 5.1875 C 26 4.375 24.953125 3.96875 23.90625 3.96875 Z M 23.90625 5.875 C 24.410156 5.875 24.917969 6.105469 25.40625 6.59375 C 26.378906 7.566406 26.378906 8.621094 25.40625 9.59375 L 24.6875 10.28125 L 21.71875 7.3125 L 22.40625 6.59375 C 22.894531 6.105469 23.402344 5.875 23.90625 5.875 Z M 20.3125 8.71875 L 23.28125 11.6875 L 11.1875 23.78125 C 10.53125 22.5 9.5 21.46875 8.21875 20.8125 Z M 6.9375 22.4375 C 8.136719 22.921875 9.078125 23.863281 9.5625 25.0625 L 6.28125 25.71875 Z"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /></svg>
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
<path
|
|
3
|
-
d="M7.17 7.91L8.9 8.91L12.08 3.42L14.33 7.31L11.73 8.81L17.19 10.27L18.66 4.81L16.06 6.31L13.81 2.41C13.26 1.45 12.03 1.12 11.08 1.68C10.81 1.83 10.58 2.05 10.41 2.31M10 20V18L3.66 18L5.9 14.1L8.5 15.6L7.04 10.14L1.57 11.6L4.17 13.1L1.92 17C1.37 17.96 1.7 19.18 2.65 19.73C2.92 19.89 3.22 19.97 3.54 20M19.06 11.5L17.32 12.5L20.5 18H16V15L12 19L16 23V20H20.5C21.61 20 22.5 19.11 22.5 18C22.5 17.69 22.42 17.38 22.28 17.11Z"
|
|
4
|
-
/>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.17 7.91L8.9 8.91L12.08 3.42L14.33 7.31L11.73 8.81L17.19 10.27L18.66 4.81L16.06 6.31L13.81 2.41C13.26 1.45 12.03 1.12 11.08 1.68C10.81 1.83 10.58 2.05 10.41 2.31M10 20V18L3.66 18L5.9 14.1L8.5 15.6L7.04 10.14L1.57 11.6L4.17 13.1L1.92 17C1.37 17.96 1.7 19.18 2.65 19.73C2.92 19.89 3.22 19.97 3.54 20M19.06 11.5L17.32 12.5L20.5 18H16V15L12 19L16 23V20H20.5C21.61 20 22.5 19.11 22.5 18C22.5 17.69 22.42 17.38 22.28 17.11Z" /></svg>
|