@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 CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "blokkli",
2
+ "name": "@blokkli/editor",
3
3
  "configKey": "blokkli",
4
- "version": "2.0.0-alpha.12",
4
+ "version": "2.0.0-alpha.13",
5
5
  "compatibility": {
6
- "nuxt": "^3.15.0"
6
+ "nuxt": ">=3.15.0"
7
7
  },
8
8
  "builder": {
9
- "@nuxt/module-builder": "1.0.1",
10
- "unbuild": "3.5.0"
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 version = "2.0.0-alpha.12";
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: "blokkli",
8069
+ name,
8069
8070
  configKey: "blokkli",
8070
8071
  version,
8071
8072
  compatibility: {
8072
- nuxt: "^3.15.0"
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: number;
71
- height: number;
70
+ width: any;
71
+ height: any;
72
72
  toggleSidebar: () => void;
73
- isResizing: boolean;
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 !== 2) {
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();
@@ -15,7 +15,7 @@ uniform float u_time;
15
15
  uniform float u_is_transforming;
16
16
  uniform vec2 u_resolution;
17
17
 
18
- #define PI (3.141592653589793)
18
+ #define PI 3.141592653589793
19
19
 
20
20
  int pseudoQuadrant(vec2 p) {
21
21
  return int(floor(step(0.0, p.x) + 2.0 * step(0.0, -p.y)));