@blokkli/editor 2.0.0-alpha.12 → 2.0.0-alpha.13
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 +5 -5
- package/dist/module.mjs +4 -3
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +3 -3
- package/dist/runtime/components/Edit/DragInteractions/index.vue +10 -2
- package/dist/runtime/components/Edit/Features/Selection/Overlay/fragment.glsl +1 -1
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/dom/index.d.ts +59 -0
- package/dist/runtime/helpers/dom/index.js +48 -0
- package/package.json +40 -38
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "blokkli",
|
|
2
|
+
"name": "@blokkli/editor",
|
|
3
3
|
"configKey": "blokkli",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.13",
|
|
5
5
|
"compatibility": {
|
|
6
|
-
"nuxt": "
|
|
6
|
+
"nuxt": ">=3.15.0"
|
|
7
7
|
},
|
|
8
8
|
"builder": {
|
|
9
|
-
"@nuxt/module-builder": "1.0.
|
|
10
|
-
"unbuild": "3.
|
|
9
|
+
"@nuxt/module-builder": "1.0.2",
|
|
10
|
+
"unbuild": "3.6.1"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -13,7 +13,8 @@ import { BK_VISIBLE_LANGUAGES, BK_HIDDEN_GLOBALLY } from '../dist/runtime/helper
|
|
|
13
13
|
import fs from 'node:fs';
|
|
14
14
|
import { defu, createDefu } from 'defu';
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const name = "@blokkli/editor";
|
|
17
|
+
const version = "2.0.0-alpha.13";
|
|
17
18
|
|
|
18
19
|
function sortObjectKeys(obj) {
|
|
19
20
|
if (Array.isArray(obj)) {
|
|
@@ -8065,11 +8066,11 @@ class ThemeData {
|
|
|
8065
8066
|
|
|
8066
8067
|
const module = defineNuxtModule({
|
|
8067
8068
|
meta: {
|
|
8068
|
-
name
|
|
8069
|
+
name,
|
|
8069
8070
|
configKey: "blokkli",
|
|
8070
8071
|
version,
|
|
8071
8072
|
compatibility: {
|
|
8072
|
-
nuxt: "
|
|
8073
|
+
nuxt: ">=3.15.0"
|
|
8073
8074
|
}
|
|
8074
8075
|
},
|
|
8075
8076
|
defaults: {
|
|
@@ -67,10 +67,10 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
67
67
|
key: string;
|
|
68
68
|
scrolledToEnd: boolean;
|
|
69
69
|
isDetached: true;
|
|
70
|
-
width:
|
|
71
|
-
height:
|
|
70
|
+
width: any;
|
|
71
|
+
height: any;
|
|
72
72
|
toggleSidebar: () => void;
|
|
73
|
-
isResizing:
|
|
73
|
+
isResizing: any;
|
|
74
74
|
}) => any;
|
|
75
75
|
} & {
|
|
76
76
|
default?: (props: {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
isInsideRect
|
|
11
11
|
} from "#blokkli/helpers";
|
|
12
12
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
13
|
+
import { MOUSE_BUTTON, MOUSE_BUTTONS } from "#blokkli/helpers/dom";
|
|
13
14
|
import { watch, ref, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
|
|
14
15
|
const { dom, eventBus, selection, keyboard, ui, state } = useBlokkli();
|
|
15
16
|
const rootEl = ui.rootElement();
|
|
@@ -85,7 +86,7 @@ function getInteractedElement(e) {
|
|
|
85
86
|
return null;
|
|
86
87
|
}
|
|
87
88
|
function onPointerMove(e) {
|
|
88
|
-
if (keyboard.isPressingSpace.value || state.editMode.value !== "editing") {
|
|
89
|
+
if (keyboard.isPressingSpace.value || state.editMode.value !== "editing" || e.buttons === MOUSE_BUTTONS.AUXILIARY) {
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
92
|
e.preventDefault();
|
|
@@ -128,6 +129,9 @@ function onPointerMove(e) {
|
|
|
128
129
|
let pointerDownTimestamp = 0;
|
|
129
130
|
let pointerUpTimestamp = 0;
|
|
130
131
|
function onPointerDown(e) {
|
|
132
|
+
if (e.buttons === MOUSE_BUTTONS.AUXILIARY) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
131
135
|
if (!keyboard.isPressingSpace.value) {
|
|
132
136
|
e.preventDefault();
|
|
133
137
|
e.stopPropagation();
|
|
@@ -146,7 +150,7 @@ function onPointerDown(e) {
|
|
|
146
150
|
return;
|
|
147
151
|
}
|
|
148
152
|
const coords = { x: e.clientX, y: e.clientY };
|
|
149
|
-
if (!e.shiftKey && e.buttons
|
|
153
|
+
if (!e.shiftKey && e.buttons === MOUSE_BUTTONS.PRIMARY) {
|
|
150
154
|
pointerDownTimestamp = Date.now();
|
|
151
155
|
mouseStartCoordinates = coords;
|
|
152
156
|
const interacted = getInteractedElement(e);
|
|
@@ -159,6 +163,10 @@ function onPointerDown(e) {
|
|
|
159
163
|
}
|
|
160
164
|
function onPointerUp(e) {
|
|
161
165
|
rootEl.removeEventListener("pointermove", onPointerMove);
|
|
166
|
+
if (e.button === MOUSE_BUTTON.AUXILIARY) {
|
|
167
|
+
e.preventDefault();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
162
170
|
e.preventDefault();
|
|
163
171
|
e.stopPropagation();
|
|
164
172
|
e.stopImmediatePropagation();
|