@interopio/groups-ui-react 2.7.1 → 3.0.0

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/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect, useLayoutEffect, useState, useContext } from 'react';
1
+ import React, { useRef, useEffect as useEffect$1, useLayoutEffect as useLayoutEffect$1, useState as useState$1, useContext } from 'react';
2
2
  import ReactDOM from 'react-dom';
3
3
  import { IOConnectContext } from '@interopio/react-hooks';
4
4
 
@@ -61,6 +61,11 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
61
61
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
62
62
  };
63
63
 
64
+ var StandardButtonTarget;
65
+ (function (StandardButtonTarget) {
66
+ StandardButtonTarget["Default"] = "default";
67
+ StandardButtonTarget["Frame"] = "frame";
68
+ })(StandardButtonTarget || (StandardButtonTarget = {}));
64
69
  var TargetType;
65
70
  (function (TargetType) {
66
71
  TargetType["Group"] = "group";
@@ -299,6 +304,20 @@ var WebGroupsManagerDecorator = /** @class */ (function () {
299
304
  }
300
305
  window.webGroupsManager.externalLibraryFactory.onCaptionTextBoundsChanged(targetType, targetId, bounds);
301
306
  };
307
+ WebGroupsManagerDecorator.prototype.startDragMove = function () {
308
+ if (typeof window.webGroupsManager.externalLibraryFactory.startDragMove !== "function") {
309
+ // Handling the case when a new library is used with an older version of io.Connect Desktop
310
+ return;
311
+ }
312
+ window.webGroupsManager.externalLibraryFactory.startDragMove();
313
+ };
314
+ WebGroupsManagerDecorator.prototype.showCaptionEditor = function (targetType, targetId, text) {
315
+ if (typeof window.webGroupsManager.externalLibraryFactory.showCaptionEditor !== "function") {
316
+ // Handling the case when a new library is used with an older version of io.Connect Desktop
317
+ return;
318
+ }
319
+ window.webGroupsManager.externalLibraryFactory.showCaptionEditor(targetType, targetId, text);
320
+ };
302
321
  WebGroupsManagerDecorator.prototype.onCaptionEditorVisibleChanged = function (targetType, targetId, visible) {
303
322
  if (typeof window.webGroupsManager.externalLibraryFactory.onCaptionEditorVisibleChanged !== "function") {
304
323
  // Handling the case when a new library is used with an older version of io.Connect Desktop
@@ -369,9 +388,31 @@ var BaseButton = function (_a) {
369
388
  React.createElement("div", __assign({}, innerElement)));
370
389
  };
371
390
 
372
- var CloseButton = function (_a) {
373
- var onClick = _a.onClick, tooltip = _a.tooltip;
374
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-close" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-close", title: tooltip, onClick: onClick } });
391
+ function getStandardButtonInnerClassName(buttonId, target) {
392
+ var classNames = "t42-standard-button t42-standard-button-" + buttonId;
393
+ if (target && target !== StandardButtonTarget.Default) {
394
+ classNames = classNames.concat(" t42-standard-button-" + target + "-" + buttonId);
395
+ }
396
+ return classNames;
397
+ }
398
+ function getStandardButtonOuterClassName(buttonId, target, isPressed) {
399
+ var classNames = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-" + buttonId;
400
+ if (isPressed === true) {
401
+ classNames = classNames.concat(" active");
402
+ }
403
+ if (target && target !== StandardButtonTarget.Default) {
404
+ classNames = classNames.concat(" t42-caption-bar-button-" + target + "-" + buttonId);
405
+ }
406
+ return classNames;
407
+ }
408
+
409
+ var StandardButton = function (_a) {
410
+ var buttonId = _a.buttonId, target = _a.target, isPressed = _a.isPressed, tooltip = _a.tooltip, onClick = _a.onClick;
411
+ return React.createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(buttonId, target) }, outerElement: { className: getStandardButtonOuterClassName(buttonId, target, isPressed), title: tooltip, onClick: onClick } });
412
+ };
413
+
414
+ var CloseButton = function (props) {
415
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Close }, props));
375
416
  };
376
417
 
377
418
  /**
@@ -405,7 +446,7 @@ function parseToRgba(color) {
405
446
  const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
406
447
  if (reducedHexMatch) {
407
448
  const arr = Array.from(reducedHexMatch).slice(1);
408
- return [...arr.slice(0, 3).map(x => parseInt(r$1(x, 2), 16)), parseInt(r$1(arr[3] || 'f', 2), 16) / 255];
449
+ return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];
409
450
  }
410
451
  const hexMatch = hexRegex.exec(normalizedColor);
411
452
  if (hexMatch) {
@@ -462,10 +503,10 @@ function nameToHex(color) {
462
503
  if (!result) throw new ColorError$1(color);
463
504
  return `#${result}`;
464
505
  }
465
- const r$1 = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
466
- const reducedHexRegex = new RegExp(`^#${r$1('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
467
- const hexRegex = new RegExp(`^#${r$1('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
468
- const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r$1(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
506
+ const r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
507
+ const reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
508
+ const hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
509
+ const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
469
510
  const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
470
511
  const namedColorRegex = /^[a-z]+$/i;
471
512
  const roundColor = color => {
@@ -542,11 +583,8 @@ function IsBlackReadable(color) {
542
583
  var r = rgba[0];
543
584
  var g = rgba[1];
544
585
  var b = rgba[2];
545
- var displayGamma = 2.2;
546
- var backgroundWeight = 0.2126 * Math.pow(r / 255.0, displayGamma) +
547
- 0.7152 * Math.pow(g / 255.0, displayGamma) +
548
- 0.0722 * Math.pow(b / 255.0, displayGamma);
549
- return backgroundWeight > Math.pow(0.5, displayGamma);
586
+ var backgroundWeight = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
587
+ return backgroundWeight > 0.5;
550
588
  }
551
589
  catch (_a) {
552
590
  // Fallback to other implementation
@@ -596,7 +634,7 @@ var BaseChannelSelector = function (_a) {
596
634
  height: bounds.height,
597
635
  });
598
636
  };
599
- useEffect(function () {
637
+ useEffect$1(function () {
600
638
  var handler = function (e) {
601
639
  e.stopPropagation();
602
640
  };
@@ -624,50 +662,40 @@ var FlatChannelSelector = function (_a) {
624
662
  return React.createElement(BaseChannelSelector, { outsideClass: channelLabel ? "t42-frame-caption-bar-element t42-frame-channel-selector t42-channel-selector-direction" : "t42-frame-caption-bar-element t42-frame-channel-selector", contentClass: !channelLabel ? "t42-frame-channel-selector-content" : "", showSelector: showSelector, selectedChannel: selectedChannel, selectedChannelColor: selectedChannelColor, direction: getChannelDirection(channelRestrictions), channelLabel: channelLabel });
625
663
  };
626
664
 
627
- var ExtractButton = function (_a) {
628
- var onClick = _a.onClick, tooltip = _a.tooltip;
629
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-extract" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-extract", title: tooltip, onClick: onClick } });
665
+ var ExtractButton = function (props) {
666
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Extract }, props));
630
667
  };
631
668
 
632
- var FeedbackButton = function (_a) {
633
- var onClick = _a.onClick, tooltip = _a.tooltip;
634
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-feedback" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-feedback", title: tooltip, onClick: onClick } });
669
+ var FeedbackButton = function (props) {
670
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Feedback }, props));
635
671
  };
636
672
 
637
- var CloneButton = function (_a) {
638
- var onClick = _a.onClick, tooltip = _a.tooltip;
639
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-clone" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-clone", title: tooltip, onClick: onClick } });
673
+ var CloneButton = function (props) {
674
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Clone }, props));
640
675
  };
641
676
 
642
- var StickyButton = function (_a) {
643
- var onClick = _a.onClick, tooltip = _a.tooltip, isPressed = _a.isPressed;
644
- var outerElementClassName = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-sticky";
645
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-sticky" }, outerElement: { className: isPressed ? outerElementClassName + " active" : outerElementClassName, title: tooltip, onClick: onClick } });
677
+ var StickyButton = function (props) {
678
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Sticky }, props));
646
679
  };
647
680
 
648
- var LockButton = function (_a) {
649
- var tooltip = _a.tooltip, onClick = _a.onClick;
650
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-lock" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-lock", title: tooltip, onClick: onClick } });
681
+ var LockButton = function (props) {
682
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Lock }, props));
651
683
  };
652
684
 
653
- var MaximizeButton = function (_a) {
654
- var tooltip = _a.tooltip, onClick = _a.onClick;
655
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-maximize" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-maximize", title: tooltip, onClick: onClick } });
685
+ var MaximizeButton = function (props) {
686
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Maximize }, props));
656
687
  };
657
688
 
658
- var MinimizeButton = function (_a) {
659
- var onClick = _a.onClick, tooltip = _a.tooltip;
660
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-minimize" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-minimize", title: tooltip, onClick: onClick } });
689
+ var MinimizeButton = function (props) {
690
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Minimize }, props));
661
691
  };
662
692
 
663
- var RestoreButton = function (_a) {
664
- var tooltip = _a.tooltip, onClick = _a.onClick;
665
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-restore" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-restore", title: tooltip, onClick: onClick } });
693
+ var RestoreButton = function (props) {
694
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Restore }, props));
666
695
  };
667
696
 
668
- var UnlockButton = function (_a) {
669
- var tooltip = _a.tooltip, onClick = _a.onClick;
670
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-unlock" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-unlock", title: tooltip, onClick: onClick } });
697
+ var UnlockButton = function (props) {
698
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Unlock }, props));
671
699
  };
672
700
 
673
701
  var CustomButton = function (_a) {
@@ -1647,7 +1675,7 @@ var index = (function () {
1647
1675
  })();
1648
1676
 
1649
1677
  function useEditableCaption(ref, options) {
1650
- useLayoutEffect(function () {
1678
+ useLayoutEffect$1(function () {
1651
1679
  if (!ref.current) {
1652
1680
  return;
1653
1681
  }
@@ -1666,15 +1694,80 @@ function useEditableCaption(ref, options) {
1666
1694
  }, [ref]);
1667
1695
  }
1668
1696
 
1697
+ function useDragMove(option) {
1698
+ var _a = (option || {}).threshold, threshold = _a === void 0 ? 3 : _a;
1699
+ var initialPos = useRef(null);
1700
+ var onMoveRef = useRef();
1701
+ var onUpRef = useRef();
1702
+ var cleanup = function () {
1703
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1704
+ document.removeEventListener("mouseup", onUpRef.current, true);
1705
+ initialPos.current = null;
1706
+ document.body.style.pointerEvents = "auto";
1707
+ };
1708
+ if (!onMoveRef.current) {
1709
+ onMoveRef.current = function (ev) {
1710
+ if (!initialPos.current)
1711
+ return;
1712
+ var dx = ev.pageX - initialPos.current.x;
1713
+ var dy = ev.pageY - initialPos.current.y;
1714
+ if (Math.abs(dx) >= threshold || Math.abs(dy) >= threshold) {
1715
+ document.body.style.pointerEvents = "none";
1716
+ cleanup();
1717
+ webGroupsManager.startDragMove();
1718
+ }
1719
+ ev.stopPropagation();
1720
+ ev.preventDefault();
1721
+ };
1722
+ }
1723
+ if (!onUpRef.current) {
1724
+ onUpRef.current = function (ev) {
1725
+ cleanup();
1726
+ ev.stopPropagation();
1727
+ ev.preventDefault();
1728
+ };
1729
+ }
1730
+ var startDrag = function (ev) {
1731
+ if (ev.button !== 0)
1732
+ return;
1733
+ initialPos.current = { x: ev.pageX, y: ev.pageY };
1734
+ document.addEventListener("mousemove", onMoveRef.current, true);
1735
+ document.addEventListener("mouseup", onUpRef.current, true);
1736
+ ev.stopPropagation();
1737
+ ev.preventDefault();
1738
+ };
1739
+ useEffect$1(function () {
1740
+ return function () {
1741
+ if (onMoveRef.current)
1742
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1743
+ if (onUpRef.current)
1744
+ document.removeEventListener("mouseup", onUpRef.current, true);
1745
+ document.body.style.pointerEvents = "auto";
1746
+ initialPos.current = null;
1747
+ };
1748
+ }, []);
1749
+ return { startDrag: startDrag };
1750
+ }
1751
+
1669
1752
  var FlatCaption = function (_a) {
1670
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1753
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1671
1754
  var ref = useRef(null);
1672
1755
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1673
- return React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element" }, caption);
1756
+ var startDrag = useDragMove().startDrag;
1757
+ var handleMouseDown = function (e) {
1758
+ if (e.button !== 0)
1759
+ return;
1760
+ startDrag(e);
1761
+ };
1762
+ var handleDoubleClick = function (e) {
1763
+ showCaptionEditor(caption);
1764
+ e.stopPropagation();
1765
+ };
1766
+ return (React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element", onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick }, caption));
1674
1767
  };
1675
1768
 
1676
1769
  function useCaptionEditor(ref, options) {
1677
- useEffect(function () {
1770
+ useEffect$1(function () {
1678
1771
  if (!(ref === null || ref === void 0 ? void 0 : ref.current)) {
1679
1772
  return;
1680
1773
  }
@@ -1696,7 +1789,7 @@ function useCaptionEditor(ref, options) {
1696
1789
  }
1697
1790
 
1698
1791
  function useCommitEditingRequested(targetType, targetId, text) {
1699
- useEffect(function () {
1792
+ useEffect$1(function () {
1700
1793
  var unsub = webGroupsManager.onCommitCaptionEditingRequested(targetType, targetId, function () {
1701
1794
  webGroupsManager.commitCaptionEditing(targetType, targetId, text);
1702
1795
  });
@@ -1708,8 +1801,8 @@ function useCommitEditingRequested(targetType, targetId, text) {
1708
1801
 
1709
1802
  var CaptionEditor = function (_a) {
1710
1803
  var className = _a.className, commitChanges = _a.commitChanges, hideEditor = _a.hideEditor, notifyBoundsChanged = _a.notifyBoundsChanged, caption = _a.caption, notifyEditorVisibilityChanged = _a.notifyEditorVisibilityChanged, targetType = _a.targetType, targetId = _a.targetId;
1711
- var _b = useState(caption), captionInEditor = _b[0], setCaptionInEditor = _b[1];
1712
- var _c = useState(0), inputWidth = _c[0], setInputWidth = _c[1];
1804
+ var _b = useState$1(caption), captionInEditor = _b[0], setCaptionInEditor = _b[1];
1805
+ var _c = useState$1(0), inputWidth = _c[0], setInputWidth = _c[1];
1713
1806
  var ref = useRef(null);
1714
1807
  var measurementRef = useRef(null);
1715
1808
  var onBlur = function () {
@@ -1734,7 +1827,7 @@ var CaptionEditor = function (_a) {
1734
1827
  };
1735
1828
  useCaptionEditor(ref, { notifyBoundsChanged: notifyBoundsChanged, notifyEditorVisibilityChanged: notifyEditorVisibilityChanged });
1736
1829
  useCommitEditingRequested(targetType, targetId, captionInEditor);
1737
- useEffect(function () {
1830
+ useEffect$1(function () {
1738
1831
  if (!ref.current) {
1739
1832
  return;
1740
1833
  }
@@ -1754,7 +1847,7 @@ var CaptionEditor = function (_a) {
1754
1847
  element === null || element === void 0 ? void 0 : element.removeEventListener("mousedown", onMouseDown);
1755
1848
  };
1756
1849
  }, [ref]);
1757
- useEffect(function () {
1850
+ useEffect$1(function () {
1758
1851
  if (!measurementRef.current) {
1759
1852
  return;
1760
1853
  }
@@ -1794,7 +1887,7 @@ var BaseMultiChannelSelector = function (_a) {
1794
1887
  height: bounds.height,
1795
1888
  });
1796
1889
  };
1797
- useEffect(function () {
1890
+ useEffect$1(function () {
1798
1891
  var _a;
1799
1892
  if (showBaseChannelSelector) {
1800
1893
  return;
@@ -1830,11 +1923,11 @@ var FlatMultiChannelSelector = function (_a) {
1830
1923
  };
1831
1924
 
1832
1925
  var FlatCaptionBar = function (_a) {
1833
- var moveAreaId = _a.moveAreaId, caption = _a.caption, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "caption", "channels", "captionEditor", "notifyCaptionBoundsChanged"]);
1926
+ var moveAreaId = _a.moveAreaId, caption = _a.caption, showCaptionEditor = _a.showCaptionEditor, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "caption", "showCaptionEditor", "channels", "captionEditor", "notifyCaptionBoundsChanged"]);
1834
1927
  return (React.createElement("div", { className: "t42-react-caption-bar" },
1835
1928
  (channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode !== "multi" && React.createElement(FlatChannelSelector, { showSelector: channels === null || channels === void 0 ? void 0 : channels.showSelector, selectedChannel: channels === null || channels === void 0 ? void 0 : channels.selectedChannel, selectedChannelColor: channels === null || channels === void 0 ? void 0 : channels.selectedChannelColor, channelRestrictions: channels === null || channels === void 0 ? void 0 : channels.channelRestrictions, channelLabel: channels === null || channels === void 0 ? void 0 : channels.channelLabel }),
1836
1929
  (channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode === "multi" && React.createElement(FlatMultiChannelSelector, { showSelector: channels === null || channels === void 0 ? void 0 : channels.showSelector, selectedChannels: channels === null || channels === void 0 ? void 0 : channels.selectedChannels, channelRestrictions: channels === null || channels === void 0 ? void 0 : channels.channelRestrictions, channelLabel: channels === null || channels === void 0 ? void 0 : channels.channelLabel }),
1837
- React.createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React.createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React.createElement(FlatCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1930
+ React.createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React.createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React.createElement(FlatCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1838
1931
  React.createElement(FlatButtons, __assign({}, rest))));
1839
1932
  };
1840
1933
 
@@ -1854,10 +1947,20 @@ var GroupButtons = function (_a) {
1854
1947
  };
1855
1948
 
1856
1949
  var GroupCaption = function (_a) {
1857
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1950
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1858
1951
  var ref = useRef(null);
1859
1952
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1860
- return React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption);
1953
+ var startDrag = useDragMove().startDrag;
1954
+ var handleMouseDown = function (e) {
1955
+ if (e.button !== 0)
1956
+ return;
1957
+ startDrag(e);
1958
+ };
1959
+ var handleDoubleClick = function (e) {
1960
+ showCaptionEditor(caption);
1961
+ e.stopPropagation();
1962
+ };
1963
+ return (React.createElement("div", { ref: ref, onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption));
1861
1964
  };
1862
1965
 
1863
1966
  var GroupCaptionEditor = function (props) {
@@ -1865,11 +1968,11 @@ var GroupCaptionEditor = function (props) {
1865
1968
  };
1866
1969
 
1867
1970
  var GroupCaptionBar = function (_a) {
1868
- var moveAreaId = _a.moveAreaId; _a.targetType; var targetId = _a.targetId, caption = _a.caption, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "targetType", "targetId", "caption", "captionEditor", "notifyCaptionBoundsChanged"]);
1971
+ var moveAreaId = _a.moveAreaId, showCaptionEditor = _a.showCaptionEditor; _a.targetType; var targetId = _a.targetId, caption = _a.caption, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "showCaptionEditor", "targetType", "targetId", "caption", "captionEditor", "notifyCaptionBoundsChanged"]);
1869
1972
  return React.createElement("div", { className: "t42-react-caption-bar" },
1870
1973
  React.createElement(GroupMoveArea, { moveAreaId: moveAreaId }, (captionEditor === null || captionEditor === void 0 ? void 0 : captionEditor.show) ?
1871
1974
  React.createElement(GroupCaptionEditor, __assign({}, captionEditor, { groupId: targetId, caption: captionEditor.text })) :
1872
- React.createElement(GroupCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1975
+ React.createElement(GroupCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1873
1976
  React.createElement(GroupButtons, __assign({}, rest)));
1874
1977
  };
1875
1978
 
@@ -1905,7 +2008,7 @@ var TabCloseButton = function (_a) {
1905
2008
  var normalContentClassName = "t42-tab-close-button-content";
1906
2009
  var selectedContentClassName = "t42-tab-close-button-content t42-selected-tab-close-button-content";
1907
2010
  var ref = useRef(null);
1908
- useEffect(function () {
2011
+ useEffect$1(function () {
1909
2012
  var _a;
1910
2013
  (_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener("mousedown", function (e) {
1911
2014
  e.stopPropagation();
@@ -1928,10 +2031,10 @@ var Tab = function (_a) {
1928
2031
 
1929
2032
  var OverflowButton = function (_a) {
1930
2033
  var onClick = _a.onClick, tooltip = _a.tooltip;
1931
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-overflow" }, outerElement: {
2034
+ return React.createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(StandardButtons.Overflow) }, outerElement: {
1932
2035
  onMouseDown: function (e) { return e.stopPropagation(); },
1933
2036
  onPointerDown: function (e) { return e.stopPropagation(); },
1934
- className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-overflow", title: tooltip,
2037
+ className: getStandardButtonOuterClassName(StandardButtons.Overflow), title: tooltip,
1935
2038
  onClick: onClick
1936
2039
  } });
1937
2040
  };
@@ -1970,246 +2073,156 @@ function commonjsRequire () {
1970
2073
  throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
1971
2074
  }
1972
2075
 
1973
- function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=React.useState,m=React.useEffect,n=React.useLayoutEffect,p=React.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c});},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c});})},[a]);p(d);return d}
1974
- function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return !k(a,d)}catch(f){return !0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;var useSyncExternalStore=void 0!==React.useSyncExternalStore?React.useSyncExternalStore:u;
1975
-
1976
- var useSyncExternalStoreShim_production_min = {
1977
- useSyncExternalStore: useSyncExternalStore
1978
- };
1979
-
1980
- var useSyncExternalStoreShim_development = createCommonjsModule(function (module, exports) {
1981
-
1982
- if (process.env.NODE_ENV !== "production") {
1983
- (function() {
1984
-
1985
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1986
- if (
1987
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
1988
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
1989
- 'function'
1990
- ) {
1991
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
1992
- }
1993
- var React$1 = React;
1994
-
1995
- var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1996
-
1997
- function error(format) {
1998
- {
1999
- {
2000
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2001
- args[_key2 - 1] = arguments[_key2];
2002
- }
2003
-
2004
- printWarning('error', format, args);
2005
- }
2006
- }
2007
- }
2008
-
2009
- function printWarning(level, format, args) {
2010
- // When changing this logic, you might want to also
2011
- // update consoleWithStackDev.www.js as well.
2012
- {
2013
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2014
- var stack = ReactDebugCurrentFrame.getStackAddendum();
2015
-
2016
- if (stack !== '') {
2017
- format += '%s';
2018
- args = args.concat([stack]);
2019
- } // eslint-disable-next-line react-internal/safe-string-coercion
2020
-
2021
-
2022
- var argsWithFormat = args.map(function (item) {
2023
- return String(item);
2024
- }); // Careful: RN currently depends on this prefix
2025
-
2026
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
2027
- // breaks IE9: https://github.com/facebook/react/issues/13610
2028
- // eslint-disable-next-line react-internal/no-production-logging
2029
-
2030
- Function.prototype.apply.call(console[level], console, argsWithFormat);
2031
- }
2032
- }
2033
-
2034
- /**
2035
- * inlined Object.is polyfill to avoid requiring consumers ship their own
2036
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2037
- */
2038
2076
  function is(x, y) {
2039
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
2040
- ;
2077
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
2041
2078
  }
2042
-
2043
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
2044
-
2045
- // dispatch for CommonJS interop named imports.
2046
-
2047
- var useState = React$1.useState,
2048
- useEffect = React$1.useEffect,
2049
- useLayoutEffect = React$1.useLayoutEffect,
2050
- useDebugValue = React$1.useDebugValue;
2051
- var didWarnOld18Alpha = false;
2052
- var didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works
2053
- // because of a very particular set of implementation details and assumptions
2054
- // -- change any one of them and it will break. The most important assumption
2055
- // is that updates are always synchronous, because concurrent rendering is
2056
- // only available in versions of React that also have a built-in
2057
- // useSyncExternalStore API. And we only use this shim when the built-in API
2058
- // does not exist.
2059
- //
2060
- // Do not assume that the clever hacks used by this hook also work in general.
2061
- // The point of this shim is to replace the need for hacks by other libraries.
2062
-
2063
- function useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of
2064
- // React do not expose a way to check if we're hydrating. So users of the shim
2065
- // will need to track that themselves and return the correct value
2066
- // from `getSnapshot`.
2067
- getServerSnapshot) {
2068
- {
2069
- if (!didWarnOld18Alpha) {
2070
- if (React$1.startTransition !== undefined) {
2071
- didWarnOld18Alpha = true;
2072
-
2073
- error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.');
2074
- }
2075
- }
2076
- } // Read the current snapshot from the store on every render. Again, this
2077
- // breaks the rules of React, and only works here because of specific
2078
- // implementation details, most importantly that updates are
2079
- // always synchronous.
2080
-
2081
-
2082
- var value = getSnapshot();
2083
-
2084
- {
2085
- if (!didWarnUncachedGetSnapshot) {
2086
- var cachedValue = getSnapshot();
2087
-
2088
- if (!objectIs(value, cachedValue)) {
2089
- error('The result of getSnapshot should be cached to avoid an infinite loop');
2090
-
2091
- didWarnUncachedGetSnapshot = true;
2092
- }
2093
- }
2094
- } // Because updates are synchronous, we don't queue them. Instead we force a
2095
- // re-render whenever the subscribed state changes by updating an some
2096
- // arbitrary useState hook. Then, during render, we call getSnapshot to read
2097
- // the current value.
2098
- //
2099
- // Because we don't actually use the state returned by the useState hook, we
2100
- // can save a bit of memory by storing other stuff in that slot.
2101
- //
2102
- // To implement the early bailout, we need to track some things on a mutable
2103
- // object. Usually, we would put that in a useRef hook, but we can stash it in
2104
- // our useState hook instead.
2105
- //
2106
- // To force a re-render, we call forceUpdate({inst}). That works because the
2107
- // new object always fails an equality check.
2108
-
2109
-
2110
- var _useState = useState({
2111
- inst: {
2112
- value: value,
2113
- getSnapshot: getSnapshot
2114
- }
2115
- }),
2116
- inst = _useState[0].inst,
2117
- forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated
2118
- // in the layout phase so we can access it during the tearing check that
2119
- // happens on subscribe.
2120
-
2121
-
2122
- useLayoutEffect(function () {
2123
- inst.value = value;
2124
- inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the
2125
- // commit phase if there was an interleaved mutation. In concurrent mode
2126
- // this can happen all the time, but even in synchronous mode, an earlier
2127
- // effect may have mutated the store.
2128
-
2129
- if (checkIfSnapshotChanged(inst)) {
2130
- // Force a re-render.
2131
- forceUpdate({
2132
- inst: inst
2079
+ var objectIs = "function" === typeof Object.is ? Object.is : is,
2080
+ useState = React.useState,
2081
+ useEffect = React.useEffect,
2082
+ useLayoutEffect = React.useLayoutEffect,
2083
+ useDebugValue = React.useDebugValue;
2084
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
2085
+ var value = getSnapshot(),
2086
+ _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
2087
+ inst = _useState[0].inst,
2088
+ forceUpdate = _useState[1];
2089
+ useLayoutEffect(
2090
+ function () {
2091
+ inst.value = value;
2092
+ inst.getSnapshot = getSnapshot;
2093
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2094
+ },
2095
+ [subscribe, value, getSnapshot]
2096
+ );
2097
+ useEffect(
2098
+ function () {
2099
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2100
+ return subscribe(function () {
2101
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2133
2102
  });
2134
- }
2135
- }, [subscribe, value, getSnapshot]);
2136
- useEffect(function () {
2137
- // Check for changes right before subscribing. Subsequent changes will be
2138
- // detected in the subscription handler.
2139
- if (checkIfSnapshotChanged(inst)) {
2140
- // Force a re-render.
2141
- forceUpdate({
2142
- inst: inst
2143
- });
2144
- }
2145
-
2146
- var handleStoreChange = function () {
2147
- // TODO: Because there is no cross-renderer API for batching updates, it's
2148
- // up to the consumer of this library to wrap their subscription event
2149
- // with unstable_batchedUpdates. Should we try to detect when this isn't
2150
- // the case and print a warning in development?
2151
- // The store changed. Check if the snapshot changed since the last time we
2152
- // read from the store.
2153
- if (checkIfSnapshotChanged(inst)) {
2154
- // Force a re-render.
2155
- forceUpdate({
2156
- inst: inst
2157
- });
2158
- }
2159
- }; // Subscribe to the store and return a clean-up function.
2160
-
2161
-
2162
- return subscribe(handleStoreChange);
2163
- }, [subscribe]);
2103
+ },
2104
+ [subscribe]
2105
+ );
2164
2106
  useDebugValue(value);
2165
2107
  return value;
2166
2108
  }
2167
-
2168
2109
  function checkIfSnapshotChanged(inst) {
2169
2110
  var latestGetSnapshot = inst.getSnapshot;
2170
- var prevValue = inst.value;
2171
-
2111
+ inst = inst.value;
2172
2112
  try {
2173
2113
  var nextValue = latestGetSnapshot();
2174
- return !objectIs(prevValue, nextValue);
2114
+ return !objectIs(inst, nextValue);
2175
2115
  } catch (error) {
2176
- return true;
2116
+ return !0;
2177
2117
  }
2178
2118
  }
2179
-
2180
- function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
2181
- // Note: The shim does not use getServerSnapshot, because pre-18 versions of
2182
- // React do not expose a way to check if we're hydrating. So users of the shim
2183
- // will need to track that themselves and return the correct value
2184
- // from `getSnapshot`.
2119
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
2185
2120
  return getSnapshot();
2186
2121
  }
2122
+ var shim$1 =
2123
+ "undefined" === typeof window ||
2124
+ "undefined" === typeof window.document ||
2125
+ "undefined" === typeof window.document.createElement
2126
+ ? useSyncExternalStore$1
2127
+ : useSyncExternalStore$2;
2128
+ var useSyncExternalStore =
2129
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim$1;
2130
+
2131
+ var useSyncExternalStoreShim_production = {
2132
+ useSyncExternalStore: useSyncExternalStore
2133
+ };
2187
2134
 
2188
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
2189
-
2190
- var isServerEnvironment = !canUseDOM;
2191
-
2192
- var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
2193
- var useSyncExternalStore$2 = React$1.useSyncExternalStore !== undefined ? React$1.useSyncExternalStore : shim;
2194
-
2195
- exports.useSyncExternalStore = useSyncExternalStore$2;
2196
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
2197
- if (
2198
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
2199
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
2200
- 'function'
2201
- ) {
2202
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2203
- }
2204
-
2135
+ var useSyncExternalStoreShim_development = createCommonjsModule(function (module, exports) {
2136
+ "production" !== process.env.NODE_ENV &&
2137
+ (function () {
2138
+ function is(x, y) {
2139
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
2140
+ }
2141
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
2142
+ didWarnOld18Alpha ||
2143
+ void 0 === React$1.startTransition ||
2144
+ ((didWarnOld18Alpha = !0),
2145
+ console.error(
2146
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
2147
+ ));
2148
+ var value = getSnapshot();
2149
+ if (!didWarnUncachedGetSnapshot) {
2150
+ var cachedValue = getSnapshot();
2151
+ objectIs(value, cachedValue) ||
2152
+ (console.error(
2153
+ "The result of getSnapshot should be cached to avoid an infinite loop"
2154
+ ),
2155
+ (didWarnUncachedGetSnapshot = !0));
2156
+ }
2157
+ cachedValue = useState({
2158
+ inst: { value: value, getSnapshot: getSnapshot }
2159
+ });
2160
+ var inst = cachedValue[0].inst,
2161
+ forceUpdate = cachedValue[1];
2162
+ useLayoutEffect(
2163
+ function () {
2164
+ inst.value = value;
2165
+ inst.getSnapshot = getSnapshot;
2166
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2167
+ },
2168
+ [subscribe, value, getSnapshot]
2169
+ );
2170
+ useEffect(
2171
+ function () {
2172
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2173
+ return subscribe(function () {
2174
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
2175
+ });
2176
+ },
2177
+ [subscribe]
2178
+ );
2179
+ useDebugValue(value);
2180
+ return value;
2181
+ }
2182
+ function checkIfSnapshotChanged(inst) {
2183
+ var latestGetSnapshot = inst.getSnapshot;
2184
+ inst = inst.value;
2185
+ try {
2186
+ var nextValue = latestGetSnapshot();
2187
+ return !objectIs(inst, nextValue);
2188
+ } catch (error) {
2189
+ return !0;
2190
+ }
2191
+ }
2192
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
2193
+ return getSnapshot();
2194
+ }
2195
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2196
+ "function" ===
2197
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
2198
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2199
+ var React$1 = React,
2200
+ objectIs = "function" === typeof Object.is ? Object.is : is,
2201
+ useState = React$1.useState,
2202
+ useEffect = React$1.useEffect,
2203
+ useLayoutEffect = React$1.useLayoutEffect,
2204
+ useDebugValue = React$1.useDebugValue,
2205
+ didWarnOld18Alpha = !1,
2206
+ didWarnUncachedGetSnapshot = !1,
2207
+ shim =
2208
+ "undefined" === typeof window ||
2209
+ "undefined" === typeof window.document ||
2210
+ "undefined" === typeof window.document.createElement
2211
+ ? useSyncExternalStore$1
2212
+ : useSyncExternalStore$2;
2213
+ exports.useSyncExternalStore =
2214
+ void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
2215
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2216
+ "function" ===
2217
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
2218
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2205
2219
  })();
2206
- }
2207
2220
  });
2208
2221
 
2209
2222
  var shim = createCommonjsModule(function (module) {
2210
2223
 
2211
2224
  if (process.env.NODE_ENV === 'production') {
2212
- module.exports = useSyncExternalStoreShim_production_min;
2225
+ module.exports = useSyncExternalStoreShim_production;
2213
2226
  } else {
2214
2227
  module.exports = useSyncExternalStoreShim_development;
2215
2228
  }
@@ -3013,6 +3026,9 @@ var GroupElementCreationWrapper = function (_a) {
3013
3026
  return;
3014
3027
  }
3015
3028
  var _b = state.groupCaptionBar, parentElement = _b.parentElement, options = __rest(_b, ["parentElement"]);
3029
+ var showCaptionEditor = function (text) {
3030
+ webGroupsManager.showCaptionEditor(TargetType.Group, options.targetId, text);
3031
+ };
3016
3032
  var minimize = __assign({ onClick: function () {
3017
3033
  webGroupsManager.onMinimizeButtonClick(TargetType.Group, options.targetId);
3018
3034
  } }, options.minimize);
@@ -3036,7 +3052,7 @@ var GroupElementCreationWrapper = function (_a) {
3036
3052
  } });
3037
3053
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Group, options.targetId, bounds); };
3038
3054
  return (React.createElement(Portal, { parentElement: parentElement },
3039
- React.createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
3055
+ React.createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, showCaptionEditor: showCaptionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
3040
3056
  };
3041
3057
  var renderGroupOverlay = function () {
3042
3058
  var _a;
@@ -3057,6 +3073,9 @@ var GroupElementCreationWrapper = function (_a) {
3057
3073
  return;
3058
3074
  }
3059
3075
  var parentElement = fcb.parentElement, options = __rest(fcb, ["parentElement"]);
3076
+ var showCaptionEditor = function (text) {
3077
+ webGroupsManager.showCaptionEditor(TargetType.Frame, options.targetId, text);
3078
+ };
3060
3079
  var feedback = __assign({ onClick: function () {
3061
3080
  webGroupsManager.onFeedbackButtonClick(TargetType.Frame, options.targetId);
3062
3081
  } }, options.feedback);
@@ -3125,7 +3144,7 @@ var GroupElementCreationWrapper = function (_a) {
3125
3144
  } });
3126
3145
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Frame, options.targetId, bounds); };
3127
3146
  return React.createElement(Portal, { key: options.targetId, parentElement: parentElement },
3128
- React.createElement(FrameCaptionBarCustomElement, __assign({}, options, { feedback: feedback, clone: clone, sticky: sticky, extract: extract, lock: lock, unlock: unlock, minimize: minimize, maximize: maximize, restore: restore, close: close, channels: channels, customButtons: customButtonsProps, frameId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
3147
+ React.createElement(FrameCaptionBarCustomElement, __assign({}, options, { feedback: feedback, clone: clone, sticky: sticky, extract: extract, lock: lock, unlock: unlock, minimize: minimize, maximize: maximize, restore: restore, close: close, channels: channels, customButtons: customButtonsProps, frameId: options.targetId, captionEditor: captionEditor, showCaptionEditor: showCaptionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
3129
3148
  });
3130
3149
  };
3131
3150
  var renderFrameWindowOverlay = function () {
@@ -3437,9 +3456,9 @@ var GroupElementCreationWrapper = function (_a) {
3437
3456
  };
3438
3457
 
3439
3458
  function useIOConnectWindow(windowId) {
3440
- var _a = useState(undefined), IOConnectWindow = _a[0], setIOConnectWindow = _a[1];
3459
+ var _a = useState$1(undefined), IOConnectWindow = _a[0], setIOConnectWindow = _a[1];
3441
3460
  var io = window.io || useContext(IOConnectContext);
3442
- useEffect(function () {
3461
+ useEffect$1(function () {
3443
3462
  var unsub = io.windows.onWindowAdded(function (w) {
3444
3463
  if (w.id === windowId) {
3445
3464
  setIOConnectWindow(w);
@@ -3531,5 +3550,5 @@ var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webG
3531
3550
  var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
3532
3551
  var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
3533
3552
 
3534
- export { CloneButton, CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FlatMultiChannelSelector, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, OverflowButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, TabMultiChannelSelector, TabOverflowPopup, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, openTabOverflowPopup, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
3553
+ export { CloneButton, CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FlatMultiChannelSelector, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, OverflowButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, TabMultiChannelSelector, TabOverflowPopup, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, openTabOverflowPopup, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useDragMove, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
3535
3554
  //# sourceMappingURL=index.js.map