@harbour-enterprises/superdoc 0.6.33 → 0.6.34

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.
Files changed (25) hide show
  1. package/dist/chunks/{super-editor.es-CPI97mhk.js → super-editor.es-Clae0piR.js} +42 -24
  2. package/dist/chunks/{super-editor.es-CPI97mhk.js.map → super-editor.es-Clae0piR.js.map} +1 -1
  3. package/dist/style.css +35 -29
  4. package/dist/super-editor/chunks/{converter-By1eH3DG.js → converter-D8ypyLVy.js} +3 -3
  5. package/dist/super-editor/chunks/{converter-By1eH3DG.js.map → converter-D8ypyLVy.js.map} +1 -1
  6. package/dist/super-editor/chunks/{docx-zipper-lMZAQDHY.js → docx-zipper-JxK5j_VH.js} +2 -2
  7. package/dist/super-editor/chunks/{docx-zipper-lMZAQDHY.js.map → docx-zipper-JxK5j_VH.js.map} +1 -1
  8. package/dist/super-editor/chunks/{editor-D23LMnhw.js → editor-FYK4p1Sx.js} +4 -4
  9. package/dist/super-editor/chunks/{editor-D23LMnhw.js.map → editor-FYK4p1Sx.js.map} +1 -1
  10. package/dist/super-editor/chunks/{toolbar-BUKIGyoE.js → toolbar-CjTZ7qxx.js} +8 -8
  11. package/dist/super-editor/chunks/toolbar-CjTZ7qxx.js.map +1 -0
  12. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  13. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  14. package/dist/super-editor/converter.es.js +1 -1
  15. package/dist/super-editor/docx-zipper.es.js +2 -2
  16. package/dist/super-editor/editor.es.js +3 -3
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/style.css +35 -29
  19. package/dist/super-editor/super-editor.es.js +39 -21
  20. package/dist/super-editor/super-editor.es.js.map +1 -1
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.es.js +3 -3
  24. package/package.json +1 -1
  25. package/dist/super-editor/chunks/toolbar-BUKIGyoE.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"defaultItems.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/defaultItems.js"],"names":[],"mappings":"AAkBO;;;EA83BN;AAEM;;;WAWJ"}
1
+ {"version":3,"file":"defaultItems.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/defaultItems.js"],"names":[],"mappings":"AAkBO;;;EAk5BN;AAEM;;;WAWJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAeA;IAmLE,yBAiCC;IAnND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOE;IA+KA,oBAAsB;IACtB,qBAAuB;IACvB,qBAA6B;IAC7B,WAAkC;IAClC,cAA+B;IAC/B,UAAmC;IAkBnC,gCAA6B;IAGrB,uQAAiC;IACzC,kBAAyC;IAI3C,0BAEC;IAED,gCAIC;IAED;;;OAGG;IACH,wBAFW,GAAC,QAKX;IAED,6CAEC;IA+CD;;;OAGG;IACH,2BAyCC;IAED,4BAEE;IAaA,eAAmD;IACnD,eAAmD;IAGrD;;OAEG;IACH;;;aAGC;IAED;;;;;OAKG;IACH,0CAoBC;;CAYF;yBAzZwB,eAAe"}
1
+ {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAeA;IAmLE,yBAiCC;IAnND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOE;IA+KA,oBAAsB;IACtB,qBAAuB;IACvB,qBAA6B;IAC7B,WAAkC;IAClC,cAA+B;IAC/B,UAAmC;IAkBnC,gCAA6B;IAGrB,uQAAiC;IACzC,kBAAyC;IAI3C,0BAEC;IAED,gCAIC;IAED;;;OAGG;IACH,wBAFW,GAAC,QAKX;IAED,6CAEC;IAgDD;;;OAGG;IACH,2BAyCC;IAED,4BAEE;IAaA,eAAmD;IACnD,eAAmD;IAGrD;;OAEG;IACH;;;aAGC;IAED;;;;;OAKG;IACH,0CAoBC;;CAYF;yBA1ZwB,eAAe"}
@@ -1,4 +1,4 @@
1
- import { B } from "./chunks/converter-By1eH3DG.js";
1
+ import { B } from "./chunks/converter-D8ypyLVy.js";
2
2
  export {
3
3
  B as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-By1eH3DG.js";
2
- import { D } from "./chunks/docx-zipper-lMZAQDHY.js";
1
+ import "./chunks/converter-D8ypyLVy.js";
2
+ import { D } from "./chunks/docx-zipper-JxK5j_VH.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-D23LMnhw.js";
2
- import "./chunks/converter-By1eH3DG.js";
3
- import "./chunks/docx-zipper-lMZAQDHY.js";
1
+ import { E } from "./chunks/editor-FYK4p1Sx.js";
2
+ import "./chunks/converter-D8ypyLVy.js";
3
+ import "./chunks/docx-zipper-JxK5j_VH.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-lMZAQDHY.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-JxK5j_VH.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -64,13 +64,13 @@
64
64
  width: 16px;
65
65
  }
66
66
 
67
- .toolbar-item[data-v-41fff057] {
67
+ .toolbar-item[data-v-33900b15] {
68
68
  position: relative;
69
69
  z-index: 1;
70
70
  min-width: 30px;
71
71
  margin: 0 1px;
72
72
  }
73
- .toolbar-button[data-v-41fff057] {
73
+ .toolbar-button[data-v-33900b15] {
74
74
  padding: 5px;
75
75
  height: 32px;
76
76
  max-height: 32px;
@@ -86,14 +86,14 @@
86
86
  position: relative;
87
87
  box-sizing: border-box;
88
88
  }
89
- .toolbar-button[data-v-41fff057]:hover {
89
+ .toolbar-button[data-v-33900b15]:hover {
90
90
  background-color: #dbdbdb;
91
91
  }
92
- .toolbar-button[data-v-41fff057]:active,
93
- .active[data-v-41fff057] {
92
+ .toolbar-button[data-v-33900b15]:active,
93
+ .active[data-v-33900b15] {
94
94
  background-color: #c8d0d8;
95
95
  }
96
- .button-label[data-v-41fff057] {
96
+ .button-label[data-v-33900b15] {
97
97
  overflow: hidden;
98
98
  width: 100%;
99
99
  text-align: center;
@@ -103,37 +103,37 @@
103
103
  font-size: 15px;
104
104
  margin: 5px;
105
105
  }
106
- .toolbar-icon + .dropdown-caret[data-v-41fff057] {
106
+ .toolbar-icon + .dropdown-caret[data-v-33900b15] {
107
107
  margin-left: 4px;
108
108
  }
109
- .left[data-v-41fff057],
110
- .right[data-v-41fff057] {
109
+ .left[data-v-33900b15],
110
+ .right[data-v-33900b15] {
111
111
  width: 50%;
112
112
  height: 100%;
113
113
  background-color: #dbdbdb;
114
114
  border-radius: 60%;
115
115
  }
116
- .has-inline-text-input[data-v-41fff057]:hover {
116
+ .has-inline-text-input[data-v-33900b15]:hover {
117
117
  cursor: text;
118
118
  }
119
- .disabled[data-v-41fff057] {
119
+ .disabled[data-v-33900b15] {
120
120
  cursor: default;
121
121
  }
122
- .disabled[data-v-41fff057]:hover {
122
+ .disabled[data-v-33900b15]:hover {
123
123
  cursor: default;
124
124
  background-color: initial;
125
125
  }
126
- .disabled .toolbar-icon[data-v-41fff057],
127
- .disabled .caret[data-v-41fff057],
128
- .disabled .button-label[data-v-41fff057] {
126
+ .disabled .toolbar-icon[data-v-33900b15],
127
+ .disabled .caret[data-v-33900b15],
128
+ .disabled .button-label[data-v-33900b15] {
129
129
  opacity: 0.35;
130
130
  }
131
- .caret[data-v-41fff057] {
131
+ .caret[data-v-33900b15] {
132
132
  font-size: 1em;
133
133
  padding-left: 2px;
134
134
  padding-right: 2px;
135
135
  }
136
- .button-text-input[data-v-41fff057] {
136
+ .button-text-input[data-v-33900b15] {
137
137
  color: #47484a;
138
138
  border-radius: 4px;
139
139
  text-align: center;
@@ -147,10 +147,10 @@
147
147
  border: 1px solid #d8dee5;
148
148
  box-sizing: border-box;
149
149
  }
150
- .button-text-input[data-v-41fff057]::placeholder {
150
+ .button-text-input[data-v-33900b15]::placeholder {
151
151
  color: #47484a;
152
152
  }
153
- .dropdown-caret[data-v-41fff057] {
153
+ .dropdown-caret[data-v-33900b15] {
154
154
  display: inline-flex;
155
155
  align-items: center;
156
156
  justify-content: center;
@@ -159,12 +159,18 @@
159
159
  width: 10px;
160
160
  height: 10px;
161
161
  }
162
- @media (max-width: 1120px) {
163
- .doc-mode .button-label[data-v-41fff057] {
164
- display: none;
162
+ @media (max-width: 1280px) {
163
+ .toolbar-item--doc-mode .button-label[data-v-33900b15] {
164
+ display: none;
165
165
  }
166
- .doc-mode .toolbar-icon[data-v-41fff057] {
167
- margin-right: 5px;
166
+ .toolbar-item--doc-mode .toolbar-icon[data-v-33900b15] {
167
+ margin-right: 5px;
168
+ }
169
+ .toolbar-item--linked-styles[data-v-33900b15] {
170
+ width: auto !important;
171
+ }
172
+ .toolbar-item--linked-styles .button-label[data-v-33900b15] {
173
+ display: none;
168
174
  }
169
175
  }
170
176
 
@@ -240,24 +246,24 @@
240
246
  cursor: pointer;
241
247
  }
242
248
 
243
- .button-group[data-v-2fd1a367] {
249
+ .button-group[data-v-4b88ec39] {
244
250
  display: flex;
245
251
  }
246
252
 
247
- .superdoc-toolbar[data-v-5c1cafc5] {
253
+ .superdoc-toolbar[data-v-4b88e275] {
248
254
  display: flex;
249
255
  width: 100%;
250
256
  justify-content: space-between;
251
257
  padding: 4px 16px;
252
258
  box-sizing: border-box;
253
259
  }
254
- @media (max-width: 1120px) {
255
- .superdoc-toolbar-group-side[data-v-5c1cafc5] {
260
+ @media (max-width: 1280px) {
261
+ .superdoc-toolbar-group-side[data-v-4b88e275] {
256
262
  min-width: auto !important;
257
263
  }
258
264
  }
259
265
  @media (max-width: 768px) {
260
- .superdoc-toolbar[data-v-5c1cafc5] {
266
+ .superdoc-toolbar[data-v-4b88e275] {
261
267
  padding: 4px 10px;
262
268
  justify-content: inherit;
263
269
  }
@@ -9,13 +9,13 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _interceptedCommands, _SuperToolbar_instances, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-D23LMnhw.js";
13
- import { k, m, j, l } from "./chunks/editor-D23LMnhw.js";
14
- import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-By1eH3DG.js";
15
- import { B } from "./chunks/converter-By1eH3DG.js";
12
+ import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-FYK4p1Sx.js";
13
+ import { k, m, j, l } from "./chunks/editor-FYK4p1Sx.js";
14
+ import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-D8ypyLVy.js";
15
+ import { B } from "./chunks/converter-D8ypyLVy.js";
16
16
  import { ref, createElementBlock, openBlock, createElementVNode, unref, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, normalizeClass, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-BUKIGyoE.js";
18
- import { D } from "./chunks/docx-zipper-lMZAQDHY.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-CjTZ7qxx.js";
18
+ import { D } from "./chunks/docx-zipper-JxK5j_VH.js";
19
19
  import { createZip } from "./file-zipper.es.js";
20
20
  var eventemitter3 = { exports: {} };
21
21
  (function(module) {
@@ -936,7 +936,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
936
936
  labelAttr: "fontFamily",
937
937
  hasCaret: true,
938
938
  isWide: true,
939
- style: { width: "150px" },
939
+ style: { width: "116px" },
940
940
  suppressActiveHighlight: true,
941
941
  options: [
942
942
  {
@@ -1480,7 +1480,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1480
1480
  group: "right",
1481
1481
  attributes: {
1482
1482
  dropdownPosition: "right",
1483
- className: "doc-mode"
1483
+ className: "toolbar-item--doc-mode"
1484
1484
  },
1485
1485
  options: [
1486
1486
  {
@@ -1531,11 +1531,12 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1531
1531
  });
1532
1532
  const controlSizes = /* @__PURE__ */ new Map([
1533
1533
  ["separator", 20],
1534
- ["textAlign", 37],
1535
- ["documentMode", 45],
1536
- ["zoom", 70],
1537
- ["fontSize", 56],
1538
- ["fontFamily", 72],
1534
+ ["zoom", 71],
1535
+ ["fontFamily", 118],
1536
+ ["fontSize", 57],
1537
+ ["textAlign", 40],
1538
+ ["linkedStyles", 142],
1539
+ ["documentMode", 47],
1539
1540
  ["default", 32]
1540
1541
  ]);
1541
1542
  const ruler = useToolbarItem({
@@ -1554,9 +1555,12 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1554
1555
  label: "Format text",
1555
1556
  hasCaret: true,
1556
1557
  isWide: true,
1557
- style: { width: "150px" },
1558
+ style: { width: "140px" },
1558
1559
  suppressActiveHighlight: true,
1559
1560
  disabled: false,
1561
+ attributes: {
1562
+ className: "toolbar-item--linked-styles"
1563
+ },
1560
1564
  options: [
1561
1565
  {
1562
1566
  type: "render",
@@ -1583,10 +1587,15 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1583
1587
  linkedStyles.disabled.value = true;
1584
1588
  }
1585
1589
  });
1586
- const itemsToHide = ["zoom", "fontFamily", "fontSize", "redo"];
1587
- const hideWideItemsEndpoint = 600;
1588
- const toolbarPadding = 32;
1590
+ const breakpoints = {
1591
+ sm: 768,
1592
+ md: 1024,
1593
+ xl: 1410
1594
+ };
1589
1595
  const stickyItemsWidth = 120;
1596
+ const toolbarPadding = 32;
1597
+ const itemsToHideXL = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"];
1598
+ const itemsToHideSM = ["zoom", "fontFamily", "fontSize", "redo"];
1590
1599
  let toolbarItems = [
1591
1600
  undo,
1592
1601
  redo,
@@ -1629,7 +1638,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1629
1638
  documentMode
1630
1639
  // search,
1631
1640
  ];
1632
- if (windowWidth <= hideWideItemsEndpoint) {
1641
+ if (windowWidth <= breakpoints.md) {
1633
1642
  toolbarItems = toolbarItems.filter((item) => item.type !== "separator");
1634
1643
  }
1635
1644
  if (!superToolbar.config.pagination) {
@@ -1654,7 +1663,15 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
1654
1663
  let totalWidth = toolbarPadding + stickyItemsWidth;
1655
1664
  toolbarItems.forEach((item) => {
1656
1665
  const itemWidth = controlSizes.get(item.name.value) || controlSizes.get("default");
1657
- if (windowWidth < hideWideItemsEndpoint && itemsToHide.includes(item.name.value)) {
1666
+ if (windowWidth < breakpoints.xl && itemsToHideXL.includes(item.name.value)) {
1667
+ overflowItems.push(item);
1668
+ if (item.name.value === "linkedStyles") {
1669
+ const linkedStylesIdx = toolbarItems.findIndex((item2) => item2.name.value === "linkedStyles");
1670
+ toolbarItems.splice(linkedStylesIdx + 1, 1);
1671
+ }
1672
+ return;
1673
+ }
1674
+ if (windowWidth < breakpoints.sm && itemsToHideSM.includes(item.name.value)) {
1658
1675
  overflowItems.push(item);
1659
1676
  return;
1660
1677
  }
@@ -1856,7 +1873,7 @@ class SuperToolbar extends EventEmitter {
1856
1873
  __privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument });
1857
1874
  },
1858
1875
  setHighlight: ({ item, argument }) => {
1859
- __privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument: argument || "#D6D6D6" });
1876
+ __privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument });
1860
1877
  },
1861
1878
  toggleRuler: ({ item, argument }) => {
1862
1879
  this.superdoc.toggleRuler();
@@ -2064,7 +2081,8 @@ class SuperToolbar extends EventEmitter {
2064
2081
  _interceptedCommands = new WeakMap();
2065
2082
  _SuperToolbar_instances = new WeakSet();
2066
2083
  makeToolbarItems_fn = function(superToolbar, icons2, isDev = false) {
2067
- const { defaultItems, overflowItems } = makeDefaultItems(superToolbar, isDev, window.innerWidth, this.role, icons2);
2084
+ const documentWidth = document.documentElement.clientWidth;
2085
+ const { defaultItems, overflowItems } = makeDefaultItems(superToolbar, isDev, documentWidth, this.role, icons2);
2068
2086
  this.toolbarItems = defaultItems;
2069
2087
  this.overflowItems = overflowItems;
2070
2088
  };