@teselagen/ove 0.7.3 → 0.7.5

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/index.cjs.js CHANGED
@@ -17963,25 +17963,16 @@ var getIntrinsic = /* @__PURE__ */ __name(function GetIntrinsic(name2, allowMiss
17963
17963
  return value;
17964
17964
  }, "GetIntrinsic");
17965
17965
  var callBind$3 = { exports: {} };
17966
- var esDefineProperty;
17967
- var hasRequiredEsDefineProperty;
17968
- function requireEsDefineProperty() {
17969
- if (hasRequiredEsDefineProperty)
17970
- return esDefineProperty;
17971
- hasRequiredEsDefineProperty = 1;
17972
- var GetIntrinsic3 = getIntrinsic;
17973
- var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
17974
- if ($defineProperty2) {
17975
- try {
17976
- $defineProperty2({}, "a", { value: 1 });
17977
- } catch (e) {
17978
- $defineProperty2 = false;
17979
- }
17966
+ var GetIntrinsic$4 = getIntrinsic;
17967
+ var $defineProperty$2 = GetIntrinsic$4("%Object.defineProperty%", true) || false;
17968
+ if ($defineProperty$2) {
17969
+ try {
17970
+ $defineProperty$2({}, "a", { value: 1 });
17971
+ } catch (e) {
17972
+ $defineProperty$2 = false;
17980
17973
  }
17981
- esDefineProperty = $defineProperty2;
17982
- return esDefineProperty;
17983
17974
  }
17984
- __name(requireEsDefineProperty, "requireEsDefineProperty");
17975
+ var esDefineProperty = $defineProperty$2;
17985
17976
  var GetIntrinsic$3 = getIntrinsic;
17986
17977
  var $gOPD$1 = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
17987
17978
  if ($gOPD$1) {
@@ -17992,7 +17983,7 @@ if ($gOPD$1) {
17992
17983
  }
17993
17984
  }
17994
17985
  var gopd$1 = $gOPD$1;
17995
- var $defineProperty$1 = requireEsDefineProperty();
17986
+ var $defineProperty$1 = esDefineProperty;
17996
17987
  var $SyntaxError = syntax;
17997
17988
  var $TypeError$4 = type$1;
17998
17989
  var gopd = gopd$1;
@@ -18033,7 +18024,7 @@ var defineDataProperty$1 = /* @__PURE__ */ __name(function defineDataProperty(ob
18033
18024
  throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
18034
18025
  }
18035
18026
  }, "defineDataProperty");
18036
- var $defineProperty = requireEsDefineProperty();
18027
+ var $defineProperty = esDefineProperty;
18037
18028
  var hasPropertyDescriptors = /* @__PURE__ */ __name(function hasPropertyDescriptors2() {
18038
18029
  return !!$defineProperty;
18039
18030
  }, "hasPropertyDescriptors");
@@ -18102,7 +18093,7 @@ var setFunctionLength = /* @__PURE__ */ __name(function setFunctionLength2(fn4,
18102
18093
  var $apply = GetIntrinsic3("%Function.prototype.apply%");
18103
18094
  var $call = GetIntrinsic3("%Function.prototype.call%");
18104
18095
  var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
18105
- var $defineProperty2 = requireEsDefineProperty();
18096
+ var $defineProperty2 = esDefineProperty;
18106
18097
  var $max = GetIntrinsic3("%Math.max%");
18107
18098
  module2.exports = /* @__PURE__ */ __name(function callBind2(originalFunction) {
18108
18099
  if (typeof originalFunction !== "function") {
@@ -73522,7 +73513,7 @@ let FillWindow$1 = (_F = class extends React$2.Component {
73522
73513
  this.props.children && isFunction$7(this.props.children) ? this.props.children(windowDimensions) : this.props.children
73523
73514
  );
73524
73515
  if (asPortal)
73525
- return ReactDOM$1(inner2, window.document.body);
73516
+ return React$2.createPortal(inner2, window.document.body);
73526
73517
  return inner2;
73527
73518
  }
73528
73519
  }, __name(_F, "FillWindow"), _F);
@@ -116436,6 +116427,684 @@ const ConnectedDroppable = reactRedux.connect(
116436
116427
  )(Droppable$1);
116437
116428
  ConnectedDroppable.defaultProps = defaultProps;
116438
116429
  var ConnectedDroppable$1 = ConnectedDroppable;
116430
+ var clipboard = { exports: {} };
116431
+ /*!
116432
+ * clipboard.js v2.0.11
116433
+ * https://clipboardjs.com/
116434
+ *
116435
+ * Licensed MIT © Zeno Rocha
116436
+ */
116437
+ (function(module2, exports2) {
116438
+ (/* @__PURE__ */ __name(function webpackUniversalModuleDefinition(root2, factory) {
116439
+ module2.exports = factory();
116440
+ }, "webpackUniversalModuleDefinition"))(commonjsGlobal, function() {
116441
+ return (
116442
+ /******/
116443
+ function() {
116444
+ var __webpack_modules__ = {
116445
+ /***/
116446
+ 686: (
116447
+ /***/
116448
+ function(__unused_webpack_module, __webpack_exports__, __webpack_require__2) {
116449
+ __webpack_require__2.d(__webpack_exports__, {
116450
+ "default": function() {
116451
+ return (
116452
+ /* binding */
116453
+ clipboard2
116454
+ );
116455
+ }
116456
+ });
116457
+ var tiny_emitter = __webpack_require__2(279);
116458
+ var tiny_emitter_default = /* @__PURE__ */ __webpack_require__2.n(tiny_emitter);
116459
+ var listen = __webpack_require__2(370);
116460
+ var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen);
116461
+ var src_select = __webpack_require__2(817);
116462
+ var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select);
116463
+ function command(type2) {
116464
+ try {
116465
+ return document.execCommand(type2);
116466
+ } catch (err2) {
116467
+ return false;
116468
+ }
116469
+ }
116470
+ __name(command, "command");
116471
+ var ClipboardActionCut = /* @__PURE__ */ __name(function ClipboardActionCut2(target) {
116472
+ var selectedText = select_default()(target);
116473
+ command("cut");
116474
+ return selectedText;
116475
+ }, "ClipboardActionCut");
116476
+ var actions_cut = ClipboardActionCut;
116477
+ function createFakeElement(value) {
116478
+ var isRTL = document.documentElement.getAttribute("dir") === "rtl";
116479
+ var fakeElement = document.createElement("textarea");
116480
+ fakeElement.style.fontSize = "12pt";
116481
+ fakeElement.style.border = "0";
116482
+ fakeElement.style.padding = "0";
116483
+ fakeElement.style.margin = "0";
116484
+ fakeElement.style.position = "absolute";
116485
+ fakeElement.style[isRTL ? "right" : "left"] = "-9999px";
116486
+ var yPosition = window.pageYOffset || document.documentElement.scrollTop;
116487
+ fakeElement.style.top = "".concat(yPosition, "px");
116488
+ fakeElement.setAttribute("readonly", "");
116489
+ fakeElement.value = value;
116490
+ return fakeElement;
116491
+ }
116492
+ __name(createFakeElement, "createFakeElement");
116493
+ var fakeCopyAction = /* @__PURE__ */ __name(function fakeCopyAction2(value, options) {
116494
+ var fakeElement = createFakeElement(value);
116495
+ options.container.appendChild(fakeElement);
116496
+ var selectedText = select_default()(fakeElement);
116497
+ command("copy");
116498
+ fakeElement.remove();
116499
+ return selectedText;
116500
+ }, "fakeCopyAction");
116501
+ var ClipboardActionCopy = /* @__PURE__ */ __name(function ClipboardActionCopy2(target) {
116502
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
116503
+ container: document.body
116504
+ };
116505
+ var selectedText = "";
116506
+ if (typeof target === "string") {
116507
+ selectedText = fakeCopyAction(target, options);
116508
+ } else if (target instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(target === null || target === void 0 ? void 0 : target.type)) {
116509
+ selectedText = fakeCopyAction(target.value, options);
116510
+ } else {
116511
+ selectedText = select_default()(target);
116512
+ command("copy");
116513
+ }
116514
+ return selectedText;
116515
+ }, "ClipboardActionCopy");
116516
+ var actions_copy = ClipboardActionCopy;
116517
+ function _typeof2(obj) {
116518
+ "@babel/helpers - typeof";
116519
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
116520
+ _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
116521
+ return typeof obj2;
116522
+ }, "_typeof");
116523
+ } else {
116524
+ _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
116525
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
116526
+ }, "_typeof");
116527
+ }
116528
+ return _typeof2(obj);
116529
+ }
116530
+ __name(_typeof2, "_typeof");
116531
+ var ClipboardActionDefault = /* @__PURE__ */ __name(function ClipboardActionDefault2() {
116532
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
116533
+ var _options$action = options.action, action2 = _options$action === void 0 ? "copy" : _options$action, container = options.container, target = options.target, text2 = options.text;
116534
+ if (action2 !== "copy" && action2 !== "cut") {
116535
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
116536
+ }
116537
+ if (target !== void 0) {
116538
+ if (target && _typeof2(target) === "object" && target.nodeType === 1) {
116539
+ if (action2 === "copy" && target.hasAttribute("disabled")) {
116540
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
116541
+ }
116542
+ if (action2 === "cut" && (target.hasAttribute("readonly") || target.hasAttribute("disabled"))) {
116543
+ throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
116544
+ }
116545
+ } else {
116546
+ throw new Error('Invalid "target" value, use a valid Element');
116547
+ }
116548
+ }
116549
+ if (text2) {
116550
+ return actions_copy(text2, {
116551
+ container
116552
+ });
116553
+ }
116554
+ if (target) {
116555
+ return action2 === "cut" ? actions_cut(target) : actions_copy(target, {
116556
+ container
116557
+ });
116558
+ }
116559
+ }, "ClipboardActionDefault");
116560
+ var actions_default = ClipboardActionDefault;
116561
+ function clipboard_typeof(obj) {
116562
+ "@babel/helpers - typeof";
116563
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
116564
+ clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
116565
+ return typeof obj2;
116566
+ }, "_typeof");
116567
+ } else {
116568
+ clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
116569
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
116570
+ }, "_typeof");
116571
+ }
116572
+ return clipboard_typeof(obj);
116573
+ }
116574
+ __name(clipboard_typeof, "clipboard_typeof");
116575
+ function _classCallCheck2(instance, Constructor) {
116576
+ if (!(instance instanceof Constructor)) {
116577
+ throw new TypeError("Cannot call a class as a function");
116578
+ }
116579
+ }
116580
+ __name(_classCallCheck2, "_classCallCheck");
116581
+ function _defineProperties2(target, props) {
116582
+ for (var i = 0; i < props.length; i++) {
116583
+ var descriptor = props[i];
116584
+ descriptor.enumerable = descriptor.enumerable || false;
116585
+ descriptor.configurable = true;
116586
+ if ("value" in descriptor)
116587
+ descriptor.writable = true;
116588
+ Object.defineProperty(target, descriptor.key, descriptor);
116589
+ }
116590
+ }
116591
+ __name(_defineProperties2, "_defineProperties");
116592
+ function _createClass2(Constructor, protoProps, staticProps) {
116593
+ if (protoProps)
116594
+ _defineProperties2(Constructor.prototype, protoProps);
116595
+ if (staticProps)
116596
+ _defineProperties2(Constructor, staticProps);
116597
+ return Constructor;
116598
+ }
116599
+ __name(_createClass2, "_createClass");
116600
+ function _inherits2(subClass, superClass) {
116601
+ if (typeof superClass !== "function" && superClass !== null) {
116602
+ throw new TypeError("Super expression must either be null or a function");
116603
+ }
116604
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
116605
+ if (superClass)
116606
+ _setPrototypeOf2(subClass, superClass);
116607
+ }
116608
+ __name(_inherits2, "_inherits");
116609
+ function _setPrototypeOf2(o2, p2) {
116610
+ _setPrototypeOf2 = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf3(o3, p3) {
116611
+ o3.__proto__ = p3;
116612
+ return o3;
116613
+ }, "_setPrototypeOf");
116614
+ return _setPrototypeOf2(o2, p2);
116615
+ }
116616
+ __name(_setPrototypeOf2, "_setPrototypeOf");
116617
+ function _createSuper2(Derived) {
116618
+ var hasNativeReflectConstruct = _isNativeReflectConstruct2();
116619
+ return /* @__PURE__ */ __name(function _createSuperInternal() {
116620
+ var Super = _getPrototypeOf2(Derived), result;
116621
+ if (hasNativeReflectConstruct) {
116622
+ var NewTarget = _getPrototypeOf2(this).constructor;
116623
+ result = Reflect.construct(Super, arguments, NewTarget);
116624
+ } else {
116625
+ result = Super.apply(this, arguments);
116626
+ }
116627
+ return _possibleConstructorReturn2(this, result);
116628
+ }, "_createSuperInternal");
116629
+ }
116630
+ __name(_createSuper2, "_createSuper");
116631
+ function _possibleConstructorReturn2(self2, call2) {
116632
+ if (call2 && (clipboard_typeof(call2) === "object" || typeof call2 === "function")) {
116633
+ return call2;
116634
+ }
116635
+ return _assertThisInitialized2(self2);
116636
+ }
116637
+ __name(_possibleConstructorReturn2, "_possibleConstructorReturn");
116638
+ function _assertThisInitialized2(self2) {
116639
+ if (self2 === void 0) {
116640
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
116641
+ }
116642
+ return self2;
116643
+ }
116644
+ __name(_assertThisInitialized2, "_assertThisInitialized");
116645
+ function _isNativeReflectConstruct2() {
116646
+ if (typeof Reflect === "undefined" || !Reflect.construct)
116647
+ return false;
116648
+ if (Reflect.construct.sham)
116649
+ return false;
116650
+ if (typeof Proxy === "function")
116651
+ return true;
116652
+ try {
116653
+ Date.prototype.toString.call(Reflect.construct(Date, [], function() {
116654
+ }));
116655
+ return true;
116656
+ } catch (e) {
116657
+ return false;
116658
+ }
116659
+ }
116660
+ __name(_isNativeReflectConstruct2, "_isNativeReflectConstruct");
116661
+ function _getPrototypeOf2(o2) {
116662
+ _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf : /* @__PURE__ */ __name(function _getPrototypeOf3(o3) {
116663
+ return o3.__proto__ || Object.getPrototypeOf(o3);
116664
+ }, "_getPrototypeOf");
116665
+ return _getPrototypeOf2(o2);
116666
+ }
116667
+ __name(_getPrototypeOf2, "_getPrototypeOf");
116668
+ function getAttributeValue(suffix, element2) {
116669
+ var attribute = "data-clipboard-".concat(suffix);
116670
+ if (!element2.hasAttribute(attribute)) {
116671
+ return;
116672
+ }
116673
+ return element2.getAttribute(attribute);
116674
+ }
116675
+ __name(getAttributeValue, "getAttributeValue");
116676
+ var Clipboard2 = /* @__PURE__ */ function(_Emitter) {
116677
+ _inherits2(Clipboard3, _Emitter);
116678
+ var _super = _createSuper2(Clipboard3);
116679
+ function Clipboard3(trigger2, options) {
116680
+ var _this;
116681
+ _classCallCheck2(this, Clipboard3);
116682
+ _this = _super.call(this);
116683
+ _this.resolveOptions(options);
116684
+ _this.listenClick(trigger2);
116685
+ return _this;
116686
+ }
116687
+ __name(Clipboard3, "Clipboard");
116688
+ _createClass2(Clipboard3, [{
116689
+ key: "resolveOptions",
116690
+ value: /* @__PURE__ */ __name(function resolveOptions() {
116691
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
116692
+ this.action = typeof options.action === "function" ? options.action : this.defaultAction;
116693
+ this.target = typeof options.target === "function" ? options.target : this.defaultTarget;
116694
+ this.text = typeof options.text === "function" ? options.text : this.defaultText;
116695
+ this.container = clipboard_typeof(options.container) === "object" ? options.container : document.body;
116696
+ }, "resolveOptions")
116697
+ /**
116698
+ * Adds a click event listener to the passed trigger.
116699
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
116700
+ */
116701
+ }, {
116702
+ key: "listenClick",
116703
+ value: /* @__PURE__ */ __name(function listenClick(trigger2) {
116704
+ var _this2 = this;
116705
+ this.listener = listen_default()(trigger2, "click", function(e) {
116706
+ return _this2.onClick(e);
116707
+ });
116708
+ }, "listenClick")
116709
+ /**
116710
+ * Defines a new `ClipboardAction` on each click event.
116711
+ * @param {Event} e
116712
+ */
116713
+ }, {
116714
+ key: "onClick",
116715
+ value: /* @__PURE__ */ __name(function onClick(e) {
116716
+ var trigger2 = e.delegateTarget || e.currentTarget;
116717
+ var action2 = this.action(trigger2) || "copy";
116718
+ var text2 = actions_default({
116719
+ action: action2,
116720
+ container: this.container,
116721
+ target: this.target(trigger2),
116722
+ text: this.text(trigger2)
116723
+ });
116724
+ this.emit(text2 ? "success" : "error", {
116725
+ action: action2,
116726
+ text: text2,
116727
+ trigger: trigger2,
116728
+ clearSelection: /* @__PURE__ */ __name(function clearSelection() {
116729
+ if (trigger2) {
116730
+ trigger2.focus();
116731
+ }
116732
+ window.getSelection().removeAllRanges();
116733
+ }, "clearSelection")
116734
+ });
116735
+ }, "onClick")
116736
+ /**
116737
+ * Default `action` lookup function.
116738
+ * @param {Element} trigger
116739
+ */
116740
+ }, {
116741
+ key: "defaultAction",
116742
+ value: /* @__PURE__ */ __name(function defaultAction(trigger2) {
116743
+ return getAttributeValue("action", trigger2);
116744
+ }, "defaultAction")
116745
+ /**
116746
+ * Default `target` lookup function.
116747
+ * @param {Element} trigger
116748
+ */
116749
+ }, {
116750
+ key: "defaultTarget",
116751
+ value: /* @__PURE__ */ __name(function defaultTarget(trigger2) {
116752
+ var selector = getAttributeValue("target", trigger2);
116753
+ if (selector) {
116754
+ return document.querySelector(selector);
116755
+ }
116756
+ }, "defaultTarget")
116757
+ /**
116758
+ * Allow fire programmatically a copy action
116759
+ * @param {String|HTMLElement} target
116760
+ * @param {Object} options
116761
+ * @returns Text copied.
116762
+ */
116763
+ }, {
116764
+ key: "defaultText",
116765
+ /**
116766
+ * Default `text` lookup function.
116767
+ * @param {Element} trigger
116768
+ */
116769
+ value: /* @__PURE__ */ __name(function defaultText(trigger2) {
116770
+ return getAttributeValue("text", trigger2);
116771
+ }, "defaultText")
116772
+ /**
116773
+ * Destroy lifecycle.
116774
+ */
116775
+ }, {
116776
+ key: "destroy",
116777
+ value: /* @__PURE__ */ __name(function destroy2() {
116778
+ this.listener.destroy();
116779
+ }, "destroy")
116780
+ }], [{
116781
+ key: "copy",
116782
+ value: /* @__PURE__ */ __name(function copy2(target) {
116783
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
116784
+ container: document.body
116785
+ };
116786
+ return actions_copy(target, options);
116787
+ }, "copy")
116788
+ /**
116789
+ * Allow fire programmatically a cut action
116790
+ * @param {String|HTMLElement} target
116791
+ * @returns Text cutted.
116792
+ */
116793
+ }, {
116794
+ key: "cut",
116795
+ value: /* @__PURE__ */ __name(function cut(target) {
116796
+ return actions_cut(target);
116797
+ }, "cut")
116798
+ /**
116799
+ * Returns the support of the given action, or all actions if no action is
116800
+ * given.
116801
+ * @param {String} [action]
116802
+ */
116803
+ }, {
116804
+ key: "isSupported",
116805
+ value: /* @__PURE__ */ __name(function isSupported() {
116806
+ var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"];
116807
+ var actions2 = typeof action2 === "string" ? [action2] : action2;
116808
+ var support = !!document.queryCommandSupported;
116809
+ actions2.forEach(function(action3) {
116810
+ support = support && !!document.queryCommandSupported(action3);
116811
+ });
116812
+ return support;
116813
+ }, "isSupported")
116814
+ }]);
116815
+ return Clipboard3;
116816
+ }(tiny_emitter_default());
116817
+ var clipboard2 = Clipboard2;
116818
+ }
116819
+ ),
116820
+ /***/
116821
+ 828: (
116822
+ /***/
116823
+ function(module3) {
116824
+ var DOCUMENT_NODE_TYPE = 9;
116825
+ if (typeof Element !== "undefined" && !Element.prototype.matches) {
116826
+ var proto = Element.prototype;
116827
+ proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
116828
+ }
116829
+ function closest2(element2, selector) {
116830
+ while (element2 && element2.nodeType !== DOCUMENT_NODE_TYPE) {
116831
+ if (typeof element2.matches === "function" && element2.matches(selector)) {
116832
+ return element2;
116833
+ }
116834
+ element2 = element2.parentNode;
116835
+ }
116836
+ }
116837
+ __name(closest2, "closest");
116838
+ module3.exports = closest2;
116839
+ }
116840
+ ),
116841
+ /***/
116842
+ 438: (
116843
+ /***/
116844
+ function(module3, __unused_webpack_exports, __webpack_require__2) {
116845
+ var closest2 = __webpack_require__2(828);
116846
+ function _delegate(element2, selector, type2, callback2, useCapture) {
116847
+ var listenerFn = listener.apply(this, arguments);
116848
+ element2.addEventListener(type2, listenerFn, useCapture);
116849
+ return {
116850
+ destroy: function() {
116851
+ element2.removeEventListener(type2, listenerFn, useCapture);
116852
+ }
116853
+ };
116854
+ }
116855
+ __name(_delegate, "_delegate");
116856
+ function delegate(elements, selector, type2, callback2, useCapture) {
116857
+ if (typeof elements.addEventListener === "function") {
116858
+ return _delegate.apply(null, arguments);
116859
+ }
116860
+ if (typeof type2 === "function") {
116861
+ return _delegate.bind(null, document).apply(null, arguments);
116862
+ }
116863
+ if (typeof elements === "string") {
116864
+ elements = document.querySelectorAll(elements);
116865
+ }
116866
+ return Array.prototype.map.call(elements, function(element2) {
116867
+ return _delegate(element2, selector, type2, callback2, useCapture);
116868
+ });
116869
+ }
116870
+ __name(delegate, "delegate");
116871
+ function listener(element2, selector, type2, callback2) {
116872
+ return function(e) {
116873
+ e.delegateTarget = closest2(e.target, selector);
116874
+ if (e.delegateTarget) {
116875
+ callback2.call(element2, e);
116876
+ }
116877
+ };
116878
+ }
116879
+ __name(listener, "listener");
116880
+ module3.exports = delegate;
116881
+ }
116882
+ ),
116883
+ /***/
116884
+ 879: (
116885
+ /***/
116886
+ function(__unused_webpack_module, exports3) {
116887
+ exports3.node = function(value) {
116888
+ return value !== void 0 && value instanceof HTMLElement && value.nodeType === 1;
116889
+ };
116890
+ exports3.nodeList = function(value) {
116891
+ var type2 = Object.prototype.toString.call(value);
116892
+ return value !== void 0 && (type2 === "[object NodeList]" || type2 === "[object HTMLCollection]") && "length" in value && (value.length === 0 || exports3.node(value[0]));
116893
+ };
116894
+ exports3.string = function(value) {
116895
+ return typeof value === "string" || value instanceof String;
116896
+ };
116897
+ exports3.fn = function(value) {
116898
+ var type2 = Object.prototype.toString.call(value);
116899
+ return type2 === "[object Function]";
116900
+ };
116901
+ }
116902
+ ),
116903
+ /***/
116904
+ 370: (
116905
+ /***/
116906
+ function(module3, __unused_webpack_exports, __webpack_require__2) {
116907
+ var is3 = __webpack_require__2(879);
116908
+ var delegate = __webpack_require__2(438);
116909
+ function listen(target, type2, callback2) {
116910
+ if (!target && !type2 && !callback2) {
116911
+ throw new Error("Missing required arguments");
116912
+ }
116913
+ if (!is3.string(type2)) {
116914
+ throw new TypeError("Second argument must be a String");
116915
+ }
116916
+ if (!is3.fn(callback2)) {
116917
+ throw new TypeError("Third argument must be a Function");
116918
+ }
116919
+ if (is3.node(target)) {
116920
+ return listenNode(target, type2, callback2);
116921
+ } else if (is3.nodeList(target)) {
116922
+ return listenNodeList(target, type2, callback2);
116923
+ } else if (is3.string(target)) {
116924
+ return listenSelector(target, type2, callback2);
116925
+ } else {
116926
+ throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
116927
+ }
116928
+ }
116929
+ __name(listen, "listen");
116930
+ function listenNode(node2, type2, callback2) {
116931
+ node2.addEventListener(type2, callback2);
116932
+ return {
116933
+ destroy: function() {
116934
+ node2.removeEventListener(type2, callback2);
116935
+ }
116936
+ };
116937
+ }
116938
+ __name(listenNode, "listenNode");
116939
+ function listenNodeList(nodeList, type2, callback2) {
116940
+ Array.prototype.forEach.call(nodeList, function(node2) {
116941
+ node2.addEventListener(type2, callback2);
116942
+ });
116943
+ return {
116944
+ destroy: function() {
116945
+ Array.prototype.forEach.call(nodeList, function(node2) {
116946
+ node2.removeEventListener(type2, callback2);
116947
+ });
116948
+ }
116949
+ };
116950
+ }
116951
+ __name(listenNodeList, "listenNodeList");
116952
+ function listenSelector(selector, type2, callback2) {
116953
+ return delegate(document.body, selector, type2, callback2);
116954
+ }
116955
+ __name(listenSelector, "listenSelector");
116956
+ module3.exports = listen;
116957
+ }
116958
+ ),
116959
+ /***/
116960
+ 817: (
116961
+ /***/
116962
+ function(module3) {
116963
+ function select2(element2) {
116964
+ var selectedText;
116965
+ if (element2.nodeName === "SELECT") {
116966
+ element2.focus();
116967
+ selectedText = element2.value;
116968
+ } else if (element2.nodeName === "INPUT" || element2.nodeName === "TEXTAREA") {
116969
+ var isReadOnly = element2.hasAttribute("readonly");
116970
+ if (!isReadOnly) {
116971
+ element2.setAttribute("readonly", "");
116972
+ }
116973
+ element2.select();
116974
+ element2.setSelectionRange(0, element2.value.length);
116975
+ if (!isReadOnly) {
116976
+ element2.removeAttribute("readonly");
116977
+ }
116978
+ selectedText = element2.value;
116979
+ } else {
116980
+ if (element2.hasAttribute("contenteditable")) {
116981
+ element2.focus();
116982
+ }
116983
+ var selection = window.getSelection();
116984
+ var range2 = document.createRange();
116985
+ range2.selectNodeContents(element2);
116986
+ selection.removeAllRanges();
116987
+ selection.addRange(range2);
116988
+ selectedText = selection.toString();
116989
+ }
116990
+ return selectedText;
116991
+ }
116992
+ __name(select2, "select");
116993
+ module3.exports = select2;
116994
+ }
116995
+ ),
116996
+ /***/
116997
+ 279: (
116998
+ /***/
116999
+ function(module3) {
117000
+ function E2() {
117001
+ }
117002
+ __name(E2, "E");
117003
+ E2.prototype = {
117004
+ on: function(name2, callback2, ctx) {
117005
+ var e = this.e || (this.e = {});
117006
+ (e[name2] || (e[name2] = [])).push({
117007
+ fn: callback2,
117008
+ ctx
117009
+ });
117010
+ return this;
117011
+ },
117012
+ once: function(name2, callback2, ctx) {
117013
+ var self2 = this;
117014
+ function listener() {
117015
+ self2.off(name2, listener);
117016
+ callback2.apply(ctx, arguments);
117017
+ }
117018
+ __name(listener, "listener");
117019
+ listener._ = callback2;
117020
+ return this.on(name2, listener, ctx);
117021
+ },
117022
+ emit: function(name2) {
117023
+ var data = [].slice.call(arguments, 1);
117024
+ var evtArr = ((this.e || (this.e = {}))[name2] || []).slice();
117025
+ var i = 0;
117026
+ var len = evtArr.length;
117027
+ for (i; i < len; i++) {
117028
+ evtArr[i].fn.apply(evtArr[i].ctx, data);
117029
+ }
117030
+ return this;
117031
+ },
117032
+ off: function(name2, callback2) {
117033
+ var e = this.e || (this.e = {});
117034
+ var evts = e[name2];
117035
+ var liveEvents = [];
117036
+ if (evts && callback2) {
117037
+ for (var i = 0, len = evts.length; i < len; i++) {
117038
+ if (evts[i].fn !== callback2 && evts[i].fn._ !== callback2)
117039
+ liveEvents.push(evts[i]);
117040
+ }
117041
+ }
117042
+ liveEvents.length ? e[name2] = liveEvents : delete e[name2];
117043
+ return this;
117044
+ }
117045
+ };
117046
+ module3.exports = E2;
117047
+ module3.exports.TinyEmitter = E2;
117048
+ }
117049
+ )
117050
+ /******/
117051
+ };
117052
+ var __webpack_module_cache__ = {};
117053
+ function __webpack_require__(moduleId) {
117054
+ if (__webpack_module_cache__[moduleId]) {
117055
+ return __webpack_module_cache__[moduleId].exports;
117056
+ }
117057
+ var module3 = __webpack_module_cache__[moduleId] = {
117058
+ /******/
117059
+ // no module.id needed
117060
+ /******/
117061
+ // no module.loaded needed
117062
+ /******/
117063
+ exports: {}
117064
+ /******/
117065
+ };
117066
+ __webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
117067
+ return module3.exports;
117068
+ }
117069
+ __name(__webpack_require__, "__webpack_require__");
117070
+ !function() {
117071
+ __webpack_require__.n = function(module3) {
117072
+ var getter = module3 && module3.__esModule ? (
117073
+ /******/
117074
+ function() {
117075
+ return module3["default"];
117076
+ }
117077
+ ) : (
117078
+ /******/
117079
+ function() {
117080
+ return module3;
117081
+ }
117082
+ );
117083
+ __webpack_require__.d(getter, { a: getter });
117084
+ return getter;
117085
+ };
117086
+ }();
117087
+ !function() {
117088
+ __webpack_require__.d = function(exports3, definition2) {
117089
+ for (var key in definition2) {
117090
+ if (__webpack_require__.o(definition2, key) && !__webpack_require__.o(exports3, key)) {
117091
+ Object.defineProperty(exports3, key, { enumerable: true, get: definition2[key] });
117092
+ }
117093
+ }
117094
+ };
117095
+ }();
117096
+ !function() {
117097
+ __webpack_require__.o = function(obj, prop2) {
117098
+ return Object.prototype.hasOwnProperty.call(obj, prop2);
117099
+ };
117100
+ }();
117101
+ return __webpack_require__(686);
117102
+ }().default
117103
+ );
117104
+ });
117105
+ })(clipboard);
117106
+ var clipboardExports = clipboard.exports;
117107
+ const Clipboard$1 = /* @__PURE__ */ getDefaultExportFromCjs(clipboardExports);
116439
117108
  var connectionStore = /* @__PURE__ */ new WeakMap();
116440
117109
  var ITERATION_KEY = Symbol("iteration key");
116441
117110
  function storeObservable(obj) {
@@ -122410,7 +123079,7 @@ function showFileDialog({ multiple = false, onSelect }) {
122410
123079
  }
122411
123080
  __name(showFileDialog, "showFileDialog");
122412
123081
  const name = "@teselagen/ove";
122413
- const version = "0.7.2";
123082
+ const version = "0.7.4";
122414
123083
  const main = "./src/index.js";
122415
123084
  const type = "module";
122416
123085
  const exports$1 = {
@@ -126318,7 +126987,7 @@ function isElementInViewport(el) {
126318
126987
  return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
126319
126988
  }
126320
126989
  __name(isElementInViewport, "isElementInViewport");
126321
- const _Keyboard = class _Keyboard extends React$2.Component {
126990
+ const _Clipboard = class _Clipboard extends React$2.Component {
126322
126991
  constructor() {
126323
126992
  super(...arguments);
126324
126993
  __publicField(this, "handleKeyDown", /* @__PURE__ */ __name((e) => {
@@ -126387,14 +127056,14 @@ const _Keyboard = class _Keyboard extends React$2.Component {
126387
127056
  );
126388
127057
  }
126389
127058
  };
126390
- __name(_Keyboard, "Keyboard");
127059
+ __name(_Clipboard, "Clipboard");
126391
127060
  // static propTypes = {
126392
127061
  // value: PropTypes.string.isRequired
126393
127062
  // };
126394
- __publicField(_Keyboard, "defaultProps", {
127063
+ __publicField(_Clipboard, "defaultProps", {
126395
127064
  className: "clipboard"
126396
127065
  });
126397
- let Keyboard = _Keyboard;
127066
+ let Clipboard = _Clipboard;
126398
127067
  let dragInProgress = false;
126399
127068
  let selectionStartOrEndGrabbed;
126400
127069
  let caretPositionOnDragStart;
@@ -127410,8 +128079,14 @@ function VectorInteractionHOC(Component) {
127410
128079
  const { sequenceData: sequenceData2, readOnly: readOnly2, disableBpEditing, selectionLayer: selectionLayer2 } = this.props;
127411
128080
  const { isProtein: isProtein2 } = sequenceData2;
127412
128081
  const makeTextCopyable = /* @__PURE__ */ __name((transformFunc, className, action2 = "copy") => {
127413
- document.querySelectorAll(`.${className}`).forEach((element2) => {
127414
- element2.addEventListener("click", () => __async(this, null, function* () {
128082
+ return new Clipboard$1(`.${className}`, {
128083
+ action: () => action2,
128084
+ text: () => {
128085
+ if (action2 === "copy") {
128086
+ document.body.addEventListener("copy", this.handleCopy);
128087
+ } else {
128088
+ document.body.addEventListener("cut", this.handleCut);
128089
+ }
127415
128090
  const { editorName, store: store2 } = this.props;
127416
128091
  const { sequenceData: sequenceData22, copyOptions: copyOptions2, selectionLayer: selectionLayer22 } = store2.getState().VectorEditor[editorName];
127417
128092
  const selectedSeqData = getSequenceDataBetweenRange(
@@ -127436,22 +128111,12 @@ function VectorInteractionHOC(Component) {
127436
128111
  sequenceData22
127437
128112
  );
127438
128113
  this.sequenceDataToCopy = sequenceDataToCopy;
127439
- const textToCopy = sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
127440
- try {
127441
- yield navigator.clipboard.writeText(textToCopy);
127442
- } catch (err2) {
127443
- console.error("Failed to copy text:", err2);
127444
- }
127445
- if (action2 === "copy") {
127446
- document.body.addEventListener("copy", this.handleCopy);
127447
- } else {
127448
- document.body.addEventListener("cut", this.handleCut);
127449
- }
127450
128114
  if (window.Cypress) {
127451
128115
  window.Cypress.textToCopy = sequenceDataToCopy.textToCopy;
127452
128116
  window.Cypress.seqDataToCopy = sequenceDataToCopy;
127453
128117
  }
127454
- }));
128118
+ return sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
128119
+ }
127455
128120
  });
127456
128121
  }, "makeTextCopyable");
127457
128122
  const aaCopy = {
@@ -128089,7 +128754,7 @@ function VectorInteractionHOC(Component) {
128089
128754
  },
128090
128755
  closePanelButton,
128091
128756
  /* @__PURE__ */ React$2.createElement(
128092
- Keyboard,
128757
+ Clipboard,
128093
128758
  {
128094
128759
  value: selectedBps,
128095
128760
  onCopy: this.handleCopy,
@@ -146262,27 +146927,15 @@ ${seqDataToCopy}\r
146262
146927
  this.copyAllAlignmentsFastaClipboardHelper && this.copyAllAlignmentsFastaClipboardHelper.destroy();
146263
146928
  },
146264
146929
  didMount: () => {
146265
- const elements = document.querySelectorAll(
146266
- `.copyAllAlignmentsFastaClipboardHelper`
146930
+ this.copyAllAlignmentsFastaClipboardHelper = new Clipboard$1(
146931
+ `.copyAllAlignmentsFastaClipboardHelper`,
146932
+ {
146933
+ action: "copyAllAlignmentsFasta",
146934
+ text: () => {
146935
+ return this.getAllAlignmentsFastaText();
146936
+ }
146937
+ }
146267
146938
  );
146268
- elements.forEach((element2) => {
146269
- element2.addEventListener(
146270
- "click",
146271
- () => __async(this, null, function* () {
146272
- const textToCopy = this.getAllAlignmentsFastaText();
146273
- try {
146274
- yield navigator.clipboard.writeText(
146275
- textToCopy
146276
- );
146277
- } catch (err2) {
146278
- console.error(
146279
- "Failed to copy text:",
146280
- err2
146281
- );
146282
- }
146283
- })
146284
- );
146285
- });
146286
146939
  },
146287
146940
  onClick: () => {
146288
146941
  window.toastr.success("Selection Copied");
@@ -146295,13 +146948,11 @@ ${seqDataToCopy}\r
146295
146948
  this.copySpecificAlignmentFastaClipboardHelper && this.copySpecificAlignmentFastaClipboardHelper.destroy();
146296
146949
  },
146297
146950
  didMount: () => {
146298
- const elements = document.querySelectorAll(
146299
- `.copySpecificAlignmentFastaClipboardHelper`
146300
- );
146301
- elements.forEach((element2) => {
146302
- element2.addEventListener(
146303
- "click",
146304
- () => __async(this, null, function* () {
146951
+ this.copySpecificAlignmentFastaClipboardHelper = new Clipboard$1(
146952
+ `.copySpecificAlignmentFastaClipboardHelper`,
146953
+ {
146954
+ action: "copySpecificAlignmentFasta",
146955
+ text: () => {
146305
146956
  const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
146306
146957
  const seqDataToCopy = getSequenceDataBetweenRange(
146307
146958
  alignmentData,
@@ -146310,19 +146961,10 @@ ${seqDataToCopy}\r
146310
146961
  const seqDataToCopyAsFasta = `>${name2}\r
146311
146962
  ${seqDataToCopy}\r
146312
146963
  `;
146313
- try {
146314
- yield navigator.clipboard.writeText(
146315
- seqDataToCopyAsFasta
146316
- );
146317
- } catch (err2) {
146318
- console.error(
146319
- "Failed to copy text:",
146320
- err2
146321
- );
146322
- }
146323
- })
146324
- );
146325
- });
146964
+ return seqDataToCopyAsFasta;
146965
+ }
146966
+ }
146967
+ );
146326
146968
  },
146327
146969
  onClick: () => {
146328
146970
  window.toastr.success(
@@ -146337,31 +146979,20 @@ ${seqDataToCopy}\r
146337
146979
  this.copySpecificAlignmentAsPlainClipboardHelper && this.copySpecificAlignmentAsPlainClipboardHelper.destroy();
146338
146980
  },
146339
146981
  didMount: () => {
146340
- const elements = document.querySelectorAll(
146341
- `.copySpecificAlignmentAsPlainClipboardHelper`
146342
- );
146343
- elements.forEach((element2) => {
146344
- element2.addEventListener(
146345
- "click",
146346
- () => __async(this, null, function* () {
146982
+ this.copySpecificAlignmentAsPlainClipboardHelper = new Clipboard$1(
146983
+ `.copySpecificAlignmentAsPlainClipboardHelper`,
146984
+ {
146985
+ action: "copySpecificAlignmentFasta",
146986
+ text: () => {
146347
146987
  const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
146348
146988
  const seqDataToCopy = getSequenceDataBetweenRange(
146349
146989
  alignmentData,
146350
146990
  selectionLayer2
146351
146991
  ).sequence;
146352
- try {
146353
- yield navigator.clipboard.writeText(
146354
- seqDataToCopy
146355
- );
146356
- } catch (err2) {
146357
- console.error(
146358
- "Failed to copy text:",
146359
- err2
146360
- );
146361
- }
146362
- })
146363
- );
146364
- });
146992
+ return seqDataToCopy;
146993
+ }
146994
+ }
146995
+ );
146365
146996
  },
146366
146997
  onClick: () => {
146367
146998
  window.toastr.success("Selection Copied");