@blokkli/editor 1.3.3 → 1.3.4
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 +5 -2
- package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Artboard/Scrollbar/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Artboard/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Settings/Dialog/index.vue +1 -1
- package/dist/runtime/composables/useBlokkli.js +7 -1
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import MagicString from 'magic-string';
|
|
|
7
7
|
import { walk } from 'estree-walker-ts';
|
|
8
8
|
import { BK_VISIBLE_LANGUAGES, BK_HIDDEN_GLOBALLY } from '../dist/runtime/helpers/symbols.js';
|
|
9
9
|
|
|
10
|
-
const version = "1.3.
|
|
10
|
+
const version = "1.3.4";
|
|
11
11
|
|
|
12
12
|
function sortObjectKeys(obj) {
|
|
13
13
|
if (Array.isArray(obj)) {
|
|
@@ -6999,7 +6999,10 @@ const module = defineNuxtModule({
|
|
|
6999
6999
|
moduleOptions.alterFeatures(featuresContext)
|
|
7000
7000
|
);
|
|
7001
7001
|
}
|
|
7002
|
-
const allFeatureIds =
|
|
7002
|
+
const allFeatureIds = [
|
|
7003
|
+
...extractedFeatures.map((v) => v.id),
|
|
7004
|
+
...featuresContext.features.map((v) => v.id)
|
|
7005
|
+
].filter(onlyUnique);
|
|
7003
7006
|
const featureComponents = addTemplate({
|
|
7004
7007
|
write: true,
|
|
7005
7008
|
filename: "blokkli/features.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import { type Artboard, type
|
|
20
|
+
import { type Artboard, type PluginOverview, overview } from 'artboard-deluxe'
|
|
21
21
|
import { onBeforeUnmount, onMounted, ref, useBlokkli, computed } from '#imports'
|
|
22
22
|
import onBlokkliEvent from '#blokkli/helpers/composables/onBlokkliEvent'
|
|
23
23
|
|
|
@@ -40,7 +40,7 @@ const overviewArtboardEl = ref<HTMLDivElement>()
|
|
|
40
40
|
const overviewVisibleEl = ref<HTMLDivElement>()
|
|
41
41
|
const canvas = ref<HTMLCanvasElement>()
|
|
42
42
|
|
|
43
|
-
let pluginOverview:
|
|
43
|
+
let pluginOverview: PluginOverview | null = null
|
|
44
44
|
|
|
45
45
|
function updateCanvas() {
|
|
46
46
|
const ctx = canvas.value?.getContext('2d')
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script setup lang="ts">
|
|
15
|
-
import { type Artboard, type
|
|
15
|
+
import { type Artboard, type PluginScrollbar, scrollbar } from 'artboard-deluxe'
|
|
16
16
|
import { onBeforeUnmount, onMounted, ref } from '#imports'
|
|
17
17
|
|
|
18
18
|
const props = defineProps<{
|
|
@@ -22,7 +22,7 @@ const props = defineProps<{
|
|
|
22
22
|
|
|
23
23
|
const el = ref<HTMLDivElement>()
|
|
24
24
|
const thumb = ref<HTMLButtonElement>()
|
|
25
|
-
let scrollbarPlugin:
|
|
25
|
+
let scrollbarPlugin: PluginScrollbar | null = null
|
|
26
26
|
|
|
27
27
|
onMounted(() => {
|
|
28
28
|
if (el.value && thumb.value) {
|
|
@@ -65,11 +65,11 @@ import {
|
|
|
65
65
|
type ArtboardOptions,
|
|
66
66
|
type Artboard,
|
|
67
67
|
type PluginWheelOptions,
|
|
68
|
+
type PluginWheelFactory,
|
|
68
69
|
touch,
|
|
69
70
|
wheel,
|
|
70
71
|
mouse,
|
|
71
72
|
dom as domPlugin,
|
|
72
|
-
type PluginWheel,
|
|
73
73
|
} from 'artboard-deluxe'
|
|
74
74
|
const { settings } = defineBlokkliFeature({
|
|
75
75
|
id: 'artboard',
|
|
@@ -155,7 +155,7 @@ const saveState = () => {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
let pluginWheel:
|
|
158
|
+
let pluginWheel: PluginWheelFactory | null = null
|
|
159
159
|
|
|
160
160
|
const wheelOptions = computed<PluginWheelOptions>(() => {
|
|
161
161
|
return {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { INJECT_APP } from "../helpers/symbols.js";
|
|
2
2
|
import { inject } from "#imports";
|
|
3
3
|
export function useBlokkli() {
|
|
4
|
-
|
|
4
|
+
const app = inject(INJECT_APP);
|
|
5
|
+
if (!app) {
|
|
6
|
+
throw new Error(
|
|
7
|
+
"The useBlokkli composable was called while not in edit mode."
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
return app;
|
|
5
11
|
}
|