@threadlabs/looma 0.2.19 → 0.2.20

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.
@@ -2360,6 +2360,7 @@ if (typeof HTMLElement !== "undefined") {
2360
2360
  this.#rows = this.#readBoundedNumber("rows", DEFAULT_ROWS);
2361
2361
  this.#cols = this.#readBoundedNumber("cols", DEFAULT_COLS);
2362
2362
  this.render();
2363
+ this.addEventListener("mousedown", this.onMouseDown);
2363
2364
  this.addEventListener("click", this.onClick);
2364
2365
  this.addEventListener("pointerover", this.onPointerOver);
2365
2366
  this.addEventListener("pointerout", this.onPointerOut);
@@ -2371,6 +2372,7 @@ if (typeof HTMLElement !== "undefined") {
2371
2372
  });
2372
2373
  }
2373
2374
  disconnectedCallback() {
2375
+ this.removeEventListener("mousedown", this.onMouseDown);
2374
2376
  this.removeEventListener("click", this.onClick);
2375
2377
  this.removeEventListener("pointerover", this.onPointerOver);
2376
2378
  this.removeEventListener("pointerout", this.onPointerOut);
@@ -2427,6 +2429,10 @@ if (typeof HTMLElement !== "undefined") {
2427
2429
  { detail, bubbles: true, composed: true }
2428
2430
  ));
2429
2431
  }
2432
+ onMouseDown = (event) => {
2433
+ const target = event.target instanceof Element ? event.target.closest("button[data-action]") : null;
2434
+ if (target) event.preventDefault();
2435
+ };
2430
2436
  onClick = (event) => {
2431
2437
  const target = event.target.closest("button[data-action]");
2432
2438
  if (!target) return;
package/editor/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  measureTableOverlayGeometry,
3
3
  resolveTableCellAt
4
- } from "./chunk-WI7ZA44X.js";
4
+ } from "./chunk-VAXI7Q6T.js";
5
5
  import {
6
6
  DEFAULT_MENTION_RESULT_LIMIT,
7
7
  LOOMA_CALLOUT_TONES,
package/editor/ui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  measureTableOverlayGeometry,
3
3
  resolveTableCellAt
4
- } from "./chunk-WI7ZA44X.js";
4
+ } from "./chunk-VAXI7Q6T.js";
5
5
  import {
6
6
  TABLE_CELL_BACKGROUND_OPTIONS,
7
7
  TABLE_CELL_BACKGROUND_PRESETS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",
@@ -910,6 +910,10 @@ var LoomaEditor = defineComponent2({
910
910
  hoveredTableCell = null;
911
911
  nextTick(updateTableUi);
912
912
  };
913
+ const onTableOverlayMouseDown = (event) => {
914
+ const action = event.target instanceof Element ? event.target.closest("button[data-action]") : null;
915
+ if (action) event.preventDefault();
916
+ };
913
917
  const commandButton = (label, icon, active, disabled, run) => {
914
918
  const syncNativeDisabled = (vnode) => {
915
919
  if (!(vnode.el instanceof Element)) return;
@@ -1131,6 +1135,7 @@ var LoomaEditor = defineComponent2({
1131
1135
  ref: tableOverlayShell,
1132
1136
  class: "looma-editor__table-overlay-shell",
1133
1137
  style: tableUi.overlayStyle,
1138
+ onMousedown: onTableOverlayMouseDown,
1134
1139
  onPointerleave: onTableOverlayPointerLeave
1135
1140
  }, [h2(EditorTableOverlay, {
1136
1141
  open: true,