@social-mail/social-mail-client 1.2.418 → 1.2.420

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.
@@ -46414,9 +46414,6 @@ System.register([], function (_export, _context) {
46414
46414
  dropTarget.clear();
46415
46415
  setTimeout(() => document.body.contentEditable = "true", 0);
46416
46416
  });
46417
- setTimeout(() => {
46418
- document.body.querySelectorAll("*").forEach(e => e.draggable = true);
46419
- }, 100);
46420
46417
  }
46421
46418
  _export("InstallDragDropHelper", InstallDragDropHelper);
46422
46419
  return {
@@ -51175,7 +51172,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
51175
51172
  }
51176
51173
  }), XNode.create("i", {
51177
51174
  "event-click": () => {
51178
- this.selection.element.draggable = true;
51175
+ const current = this.selection.element;
51176
+ current.draggable = true;
51177
+ setTimeout(() => {
51178
+ if (current.draggable) {
51179
+ current.removeAttribute("draggable");
51180
+ }
51181
+ }, 5000);
51179
51182
  },
51180
51183
  class: "fa-solid fa-up-down-left-right",
51181
51184
  "data-click-event": "start-drag"
@@ -51393,8 +51396,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
51393
51396
  setSelection(element, commit = true) {
51394
51397
  var _a;
51395
51398
  const old = (_a = this.selection) === null || _a === void 0 ? void 0 : _a.element;
51396
- if (old) {
51397
- old.draggable = false;
51399
+ if (old === null || old === void 0 ? void 0 : old.draggable) {
51400
+ old.removeAttribute("draggable");
51398
51401
  }
51399
51402
  this.selection.update(element);
51400
51403
  if (commit) {
@@ -51514,7 +51517,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
51514
51517
  if (previous !== this.htmlDocument.body) {
51515
51518
  previous.removeAttribute("contentEditable");
51516
51519
  }
51517
- this.commit();
51520
+ this.queueCommit();
51518
51521
  }
51519
51522
  e.preventDefault();
51520
51523
  this.setSelection(target);
@@ -51575,6 +51578,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
51575
51578
  }
51576
51579
  }
51577
51580
  });
51581
+ this.htmlDocument.addEventListener("input", () => this.queueCommit());
51578
51582
  InstallDragDropHelper(this);
51579
51583
  this.htmlDocument.close();
51580
51584
  EditorCustomElements.register(this.htmlDocument);
@@ -51595,6 +51599,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
51595
51599
  }, 10);
51596
51600
  }));
51597
51601
  }
51602
+ queueCommit() {
51603
+ const id = this.lastCommitTimerID;
51604
+ if (id) {
51605
+ clearTimeout(id);
51606
+ }
51607
+ this.lastCommitTimerID = setTimeout(() => this.commit(), 1000);
51608
+ }
51598
51609
  setStylerSheet() {
51599
51610
  return __awaiter(this, void 0, void 0, function* () {
51600
51611
  const document = this.htmlDocument;