@lvce-editor/about-view 5.10.0 → 5.11.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.
@@ -1006,22 +1006,47 @@ const getCommandIds = () => {
1006
1006
 
1007
1007
  const Tab = 2;
1008
1008
  const Escape = 8;
1009
-
1009
+ const KeyCode = {
1010
+ __proto__: null,
1011
+ Escape,
1012
+ Tab};
1010
1013
  const Shift = 1 << 10 >>> 0;
1014
+ const KeyModifier = {
1015
+ __proto__: null,
1016
+ Shift};
1017
+ const mergeClassNames = (...classNames) => {
1018
+ return classNames.filter(Boolean).join(' ');
1019
+ };
1020
+ const Button$2 = 1;
1021
+ const Div = 4;
1022
+ const Text = 12;
1023
+ const Br = 55;
1024
+ const VirtualDomElements = {
1025
+ __proto__: null,
1026
+ Br,
1027
+ Button: Button$2,
1028
+ Div};
1029
+ const text = data => {
1030
+ return {
1031
+ type: Text,
1032
+ text: data,
1033
+ childCount: 0
1034
+ };
1035
+ };
1011
1036
 
1012
1037
  const FocusAbout = 4;
1013
1038
 
1014
1039
  const getKeyBindings = () => {
1015
1040
  return [{
1016
- key: Escape,
1041
+ key: KeyCode.Escape,
1017
1042
  command: 'About.handleClickClose',
1018
1043
  when: FocusAbout
1019
1044
  }, {
1020
- key: Tab,
1045
+ key: KeyCode.Tab,
1021
1046
  command: 'About.focusNext',
1022
1047
  when: FocusAbout
1023
1048
  }, {
1024
- key: Tab | Shift,
1049
+ key: KeyCode.Tab | KeyModifier.Shift,
1025
1050
  command: 'About.focusPrevious',
1026
1051
  when: FocusAbout
1027
1052
  }];
@@ -1079,8 +1104,8 @@ const getV8Version$2 = async () => {
1079
1104
  const setFocus$1 = key => {
1080
1105
  return invoke$4('Focus.setFocus', key);
1081
1106
  };
1082
- const closeWidget$2 = async widgetName => {
1083
- return invoke$4('Viewlet.closeWidget', widgetName);
1107
+ const closeWidget$2 = async widgetId => {
1108
+ return invoke$4('Viewlet.closeWidget', widgetId);
1084
1109
  };
1085
1110
  const writeClipBoardText$1 = async text => {
1086
1111
  await invoke$4('ClipBoard.writeText', /* text */text);
@@ -1110,6 +1135,7 @@ const RendererWorker$2 = {
1110
1135
  };
1111
1136
 
1112
1137
  const {
1138
+ closeWidget: closeWidget$1,
1113
1139
  getChromeVersion: getChromeVersion$1,
1114
1140
  getElectronVersion: getElectronVersion$1,
1115
1141
  getNodeVersion: getNodeVersion$1,
@@ -1119,8 +1145,7 @@ const {
1119
1145
  set,
1120
1146
  setFocus,
1121
1147
  showMessageBox: showMessageBox$1,
1122
- writeClipBoardText,
1123
- closeWidget: closeWidget$1
1148
+ writeClipBoardText
1124
1149
  } = RendererWorker$2;
1125
1150
 
1126
1151
  const RendererWorker = {
@@ -1142,8 +1167,10 @@ const {
1142
1167
  closeWidget
1143
1168
  } = RendererWorker;
1144
1169
 
1170
+ const About$1 = 'About';
1171
+
1145
1172
  const close = async () => {
1146
- await closeWidget('About');
1173
+ await closeWidget(About$1);
1147
1174
  };
1148
1175
 
1149
1176
  const handleClickClose = async state => {
@@ -1603,7 +1630,7 @@ const createViewModel = state => {
1603
1630
  };
1604
1631
  };
1605
1632
 
1606
- const Button$2 = 'Button';
1633
+ const Button$1 = 'Button';
1607
1634
  const ButtonPrimary = 'ButtonPrimary';
1608
1635
  const ButtonSecondary = 'ButtonSecondary';
1609
1636
  const DialogButtonsRow = 'DialogButtonsRow';
@@ -1613,7 +1640,7 @@ const DialogContentRight = 'DialogContentRight';
1613
1640
  const DialogHeading$1 = 'DialogHeading';
1614
1641
  const DialogMessage = 'DialogMessage';
1615
1642
  const DialogMessageRow = 'DialogMessageRow';
1616
- const About$1 = 'About';
1643
+ const About = 'About';
1617
1644
  const Viewlet = 'Viewlet';
1618
1645
  const DialogToolBarRow = 'DialogToolBarRow';
1619
1646
  const MaskIcon = 'MaskIcon';
@@ -1627,24 +1654,8 @@ const HandleClickButton = 4;
1627
1654
  const HandleContextMenu = 5;
1628
1655
  const HandleFocusIn = 6;
1629
1656
 
1630
- const Button$1 = 1;
1631
- const Div = 4;
1632
- const Br = 55;
1633
-
1634
- const mergeClassNames = (...classNames) => {
1635
- return classNames.filter(Boolean).join(' ');
1636
- };
1637
- const Text = 12;
1638
- const text = data => {
1639
- return {
1640
- type: Text,
1641
- text: data,
1642
- childCount: 0
1643
- };
1644
- };
1645
-
1646
1657
  const br = {
1647
- type: Br,
1658
+ type: VirtualDomElements.Br,
1648
1659
  childCount: 0
1649
1660
  };
1650
1661
  const renderLine = (line, index) => {
@@ -1656,7 +1667,7 @@ const renderLine = (line, index) => {
1656
1667
 
1657
1668
  const getAboutContentVirtualDom = lines => {
1658
1669
  const dom = [{
1659
- type: Div,
1670
+ type: VirtualDomElements.Div,
1660
1671
  className: DialogMessage,
1661
1672
  childCount: lines.length * 2 - 1
1662
1673
  }, ...lines.flatMap(renderLine)];
@@ -1670,8 +1681,8 @@ const Dialog = 'dialog';
1670
1681
 
1671
1682
  const getPrimaryButtonVirtualDom = (message, name) => {
1672
1683
  return [{
1673
- type: Button$1,
1674
- className: mergeClassNames(Button$2, ButtonPrimary),
1684
+ type: VirtualDomElements.Button,
1685
+ className: mergeClassNames(Button$1, ButtonPrimary),
1675
1686
  onClick: HandleClickButton,
1676
1687
  childCount: 1,
1677
1688
  name
@@ -1680,8 +1691,8 @@ const getPrimaryButtonVirtualDom = (message, name) => {
1680
1691
 
1681
1692
  const getSecondaryButtonVirtualDom = (message, name) => {
1682
1693
  return [{
1683
- type: Button$1,
1684
- className: mergeClassNames(Button$2, ButtonSecondary),
1694
+ type: VirtualDomElements.Button,
1695
+ className: mergeClassNames(Button$1, ButtonSecondary),
1685
1696
  onClick: HandleClickButton,
1686
1697
  childCount: 1,
1687
1698
  name
@@ -1699,7 +1710,7 @@ const Focusable = -1;
1699
1710
 
1700
1711
  const getDialogVirtualDom = (content, closeMessage, infoMessage, okMessage, copyMessage, productName) => {
1701
1712
  const dom = [{
1702
- type: Div,
1713
+ type: VirtualDomElements.Div,
1703
1714
  className: DialogContent,
1704
1715
  tabIndex: Focusable,
1705
1716
  role: Dialog,
@@ -1708,41 +1719,41 @@ const getDialogVirtualDom = (content, closeMessage, infoMessage, okMessage, copy
1708
1719
  onFocusIn: HandleFocusIn,
1709
1720
  childCount: 3
1710
1721
  }, {
1711
- type: Div,
1722
+ type: VirtualDomElements.Div,
1712
1723
  className: DialogToolBarRow,
1713
1724
  childCount: 1
1714
1725
  }, {
1715
- type: Div,
1726
+ type: VirtualDomElements.Div,
1716
1727
  className: DialogClose,
1717
1728
  ariaLabel: closeMessage,
1718
1729
  role: Button,
1719
1730
  onClick: HandleClickClose,
1720
1731
  childCount: 1
1721
1732
  }, {
1722
- type: Div,
1733
+ type: VirtualDomElements.Div,
1723
1734
  className: mergeClassNames(MaskIcon, MaskIconClose),
1724
1735
  childCount: 0
1725
1736
  }, {
1726
- type: Div,
1737
+ type: VirtualDomElements.Div,
1727
1738
  className: DialogMessageRow,
1728
1739
  childCount: 2
1729
1740
  }, {
1730
- type: Div,
1741
+ type: VirtualDomElements.Div,
1731
1742
  className: mergeClassNames(DialogIcon$1, DialogInfoIcon, MaskIcon, MaskIconInfo),
1732
1743
  id: DialogIcon,
1733
1744
  ariaLabel: infoMessage,
1734
1745
  childCount: 0
1735
1746
  }, {
1736
- type: Div,
1747
+ type: VirtualDomElements.Div,
1737
1748
  className: DialogContentRight,
1738
1749
  childCount: 2
1739
1750
  }, {
1740
- type: Div,
1751
+ type: VirtualDomElements.Div,
1741
1752
  id: DialogHeading,
1742
1753
  className: DialogHeading$1,
1743
1754
  childCount: 1
1744
1755
  }, text(productName), ...content, {
1745
- type: Div,
1756
+ type: VirtualDomElements.Div,
1746
1757
  className: DialogButtonsRow,
1747
1758
  childCount: 2
1748
1759
  }, ...getSecondaryButtonVirtualDom(okMessage, Ok$1), ...getPrimaryButtonVirtualDom(copyMessage, Copy$1)];
@@ -1752,8 +1763,8 @@ const getDialogVirtualDom = (content, closeMessage, infoMessage, okMessage, copy
1752
1763
  const getAboutVirtualDom = (productName, lines, closeMessage, okMessage, copyMessage, infoMessage) => {
1753
1764
  const content = getAboutContentVirtualDom(lines);
1754
1765
  return [{
1755
- type: Div,
1756
- className: mergeClassNames(Viewlet, About$1),
1766
+ type: VirtualDomElements.Div,
1767
+ className: mergeClassNames(Viewlet, About),
1757
1768
  onContextMenu: HandleContextMenu,
1758
1769
  childCount: 1
1759
1770
  }, ...getDialogVirtualDom(content, closeMessage, infoMessage, okMessage, copyMessage, productName)];
@@ -1836,10 +1847,8 @@ const renderEventListeners = () => {
1836
1847
 
1837
1848
  const Electron = 2;
1838
1849
 
1839
- const About = 'About';
1840
-
1841
1850
  const showAboutDefault = async () => {
1842
- await openWidget(About);
1851
+ await openWidget(About$1);
1843
1852
  };
1844
1853
 
1845
1854
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/about-view",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "About View Worker",
5
5
  "keywords": [
6
6
  "about-view"