@harbour-enterprises/superdoc 0.12.34-next.3 → 0.12.35

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 (27) hide show
  1. package/dist/chunks/{super-editor.es-BbaXC2pT.cjs → super-editor.es-B4SPMXXo.cjs} +151 -55
  2. package/dist/chunks/{super-editor.es-B9igwxv-.es.js → super-editor.es-D8BL6ojY.es.js} +151 -55
  3. package/dist/style.css +42 -35
  4. package/dist/super-editor/ai-writer.es.js +2 -2
  5. package/dist/super-editor/chunks/{converter-DzsjYmnd.js → converter-DQPyKWs_.js} +22 -19
  6. package/dist/super-editor/chunks/{docx-zipper-DQONSIAh.js → docx-zipper-cJ42om_0.js} +1 -1
  7. package/dist/super-editor/chunks/{editor-CO-n6iZ8.js → editor-B5TyAe8v.js} +3 -3
  8. package/dist/super-editor/chunks/{toolbar-CNeu8BVd.js → toolbar-CDeO5r_T.js} +119 -35
  9. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +1 -1
  10. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/super-converter/SuperConverter.d.ts +3 -0
  13. package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
  14. package/dist/super-editor/core/super-converter/exporter.d.ts.map +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 +42 -35
  19. package/dist/super-editor/super-editor.es.js +18 -9
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +3 -3
  25. package/dist/superdoc.umd.js +152 -56
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -64,13 +64,20 @@
64
64
  width: 16px;
65
65
  }
66
66
 
67
- .toolbar-item[data-v-6eb57404] {
67
+ .toolbar-item[data-v-2518a3d1] {
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-6eb57404] {
73
+ .visually-hidden[data-v-2518a3d1] {
74
+ position: absolute;
75
+ left: -9999px;
76
+ height: 1px;
77
+ width: 1px;
78
+ overflow: hidden;
79
+ }
80
+ .toolbar-button[data-v-2518a3d1] {
74
81
  padding: 5px;
75
82
  height: 32px;
76
83
  max-height: 32px;
@@ -86,21 +93,21 @@
86
93
  position: relative;
87
94
  box-sizing: border-box;
88
95
  }
89
- .toolbar-button[data-v-6eb57404]:hover {
96
+ .toolbar-button[data-v-2518a3d1]:hover {
90
97
  background-color: #dbdbdb;
91
98
  }
92
- .toolbar-button:hover .toolbar-icon.high-contrast[data-v-6eb57404] {
99
+ .toolbar-button:hover .toolbar-icon.high-contrast[data-v-2518a3d1] {
93
100
  color: #fff;
94
101
  }
95
- .toolbar-button:hover.high-contrast[data-v-6eb57404] {
102
+ .toolbar-button:hover.high-contrast[data-v-2518a3d1] {
96
103
  background-color: #000;
97
104
  color: #fff;
98
105
  }
99
- .toolbar-button[data-v-6eb57404]:active,
100
- .active[data-v-6eb57404] {
106
+ .toolbar-button[data-v-2518a3d1]:active,
107
+ .active[data-v-2518a3d1] {
101
108
  background-color: #c8d0d8;
102
109
  }
103
- .button-label[data-v-6eb57404] {
110
+ .button-label[data-v-2518a3d1] {
104
111
  overflow: hidden;
105
112
  width: 100%;
106
113
  text-align: center;
@@ -110,37 +117,37 @@
110
117
  font-size: 15px;
111
118
  margin: 5px;
112
119
  }
113
- .toolbar-icon+.dropdown-caret[data-v-6eb57404] {
120
+ .toolbar-icon+.dropdown-caret[data-v-2518a3d1] {
114
121
  margin-left: 4px;
115
122
  }
116
- .left[data-v-6eb57404],
117
- .right[data-v-6eb57404] {
123
+ .left[data-v-2518a3d1],
124
+ .right[data-v-2518a3d1] {
118
125
  width: 50%;
119
126
  height: 100%;
120
127
  background-color: #dbdbdb;
121
128
  border-radius: 60%;
122
129
  }
123
- .has-inline-text-input[data-v-6eb57404]:hover {
130
+ .has-inline-text-input[data-v-2518a3d1]:hover {
124
131
  cursor: text;
125
132
  }
126
- .disabled[data-v-6eb57404] {
133
+ .disabled[data-v-2518a3d1] {
127
134
  cursor: default;
128
135
  }
129
- .disabled[data-v-6eb57404]:hover {
136
+ .disabled[data-v-2518a3d1]:hover {
130
137
  cursor: default;
131
138
  background-color: initial;
132
139
  }
133
- .disabled .toolbar-icon[data-v-6eb57404],
134
- .disabled .caret[data-v-6eb57404],
135
- .disabled .button-label[data-v-6eb57404] {
140
+ .disabled .toolbar-icon[data-v-2518a3d1],
141
+ .disabled .caret[data-v-2518a3d1],
142
+ .disabled .button-label[data-v-2518a3d1] {
136
143
  opacity: 0.35;
137
144
  }
138
- .caret[data-v-6eb57404] {
145
+ .caret[data-v-2518a3d1] {
139
146
  font-size: 1em;
140
147
  padding-left: 2px;
141
148
  padding-right: 2px;
142
149
  }
143
- .button-text-input[data-v-6eb57404] {
150
+ .button-text-input[data-v-2518a3d1] {
144
151
  color: #47484a;
145
152
  border-radius: 4px;
146
153
  text-align: center;
@@ -154,13 +161,13 @@
154
161
  border: 1px solid #d8dee5;
155
162
  box-sizing: border-box;
156
163
  }
157
- .button-text-input.high-contrast[data-v-6eb57404] {
164
+ .button-text-input.high-contrast[data-v-2518a3d1] {
158
165
  background-color: #fff;
159
166
  }
160
- .button-text-input[data-v-6eb57404]::placeholder {
167
+ .button-text-input[data-v-2518a3d1]::placeholder {
161
168
  color: #47484a;
162
169
  }
163
- .dropdown-caret[data-v-6eb57404] {
170
+ .dropdown-caret[data-v-2518a3d1] {
164
171
  display: inline-flex;
165
172
  align-items: center;
166
173
  justify-content: center;
@@ -170,16 +177,16 @@
170
177
  height: 10px;
171
178
  }
172
179
  @media (max-width: 1280px) {
173
- .toolbar-item--doc-mode .button-label[data-v-6eb57404] {
180
+ .toolbar-item--doc-mode .button-label[data-v-2518a3d1] {
174
181
  display: none;
175
182
  }
176
- .toolbar-item--doc-mode .toolbar-icon[data-v-6eb57404] {
183
+ .toolbar-item--doc-mode .toolbar-icon[data-v-2518a3d1] {
177
184
  margin-right: 5px;
178
185
  }
179
- .toolbar-item--linked-styles[data-v-6eb57404] {
186
+ .toolbar-item--linked-styles[data-v-2518a3d1] {
180
187
  width: auto !important;
181
188
  }
182
- .toolbar-item--linked-styles .button-label[data-v-6eb57404] {
189
+ .toolbar-item--linked-styles .button-label[data-v-2518a3d1] {
183
190
  display: none;
184
191
  }
185
192
  }
@@ -260,11 +267,11 @@
260
267
  border-radius: 8px !important;
261
268
  }
262
269
 
263
- .button-group[data-v-b09e5a20] {
270
+ .button-group[data-v-53a792b0] {
264
271
  display: flex;
265
272
  }
266
273
 
267
- .superdoc-toolbar[data-v-2a400574] {
274
+ .superdoc-toolbar[data-v-b182f42b] {
268
275
  display: flex;
269
276
  width: 100%;
270
277
  justify-content: space-between;
@@ -272,12 +279,12 @@
272
279
  box-sizing: border-box;
273
280
  }
274
281
  @media (max-width: 1280px) {
275
- .superdoc-toolbar-group-side[data-v-2a400574] {
282
+ .superdoc-toolbar-group-side[data-v-b182f42b] {
276
283
  min-width: auto !important;
277
284
  }
278
285
  }
279
286
  @media (max-width: 768px) {
280
- .superdoc-toolbar[data-v-2a400574] {
287
+ .superdoc-toolbar[data-v-b182f42b] {
281
288
  padding: 4px 10px;
282
289
  justify-content: inherit;
283
290
  }
@@ -1475,7 +1482,7 @@ on the right if it is inside shape textbox.
1475
1482
  user-select: none;
1476
1483
  }
1477
1484
 
1478
- .super-editor-container[data-v-f27b7c30] {
1485
+ .super-editor-container[data-v-199a4ecf] {
1479
1486
  width: auto;
1480
1487
  height: auto;
1481
1488
  min-width: 8in;
@@ -1484,13 +1491,13 @@ on the right if it is inside shape textbox.
1484
1491
  display: flex;
1485
1492
  flex-direction: column;
1486
1493
  }
1487
- .ruler[data-v-f27b7c30] {
1494
+ .ruler[data-v-199a4ecf] {
1488
1495
  margin-bottom: 2px;
1489
1496
  }
1490
- .super-editor[data-v-f27b7c30] {
1497
+ .super-editor[data-v-199a4ecf] {
1491
1498
  color: initial;
1492
1499
  }
1493
- .placeholder-editor[data-v-f27b7c30] {
1500
+ .placeholder-editor[data-v-199a4ecf] {
1494
1501
  position: absolute;
1495
1502
  top: 0;
1496
1503
  left: 0;
@@ -1502,7 +1509,7 @@ on the right if it is inside shape textbox.
1502
1509
  background-color: white;
1503
1510
  box-sizing: border-box;
1504
1511
  }
1505
- .placeholder-title[data-v-f27b7c30] {
1512
+ .placeholder-title[data-v-199a4ecf] {
1506
1513
  display: flex;
1507
1514
  justify-content: center;
1508
1515
  margin-bottom: 40px;
@@ -9,14 +9,14 @@ 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 _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-CO-n6iZ8.js";
13
- import { o, C, T, m, p, l, n } from "./chunks/editor-CO-n6iZ8.js";
14
- import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-DzsjYmnd.js";
15
- import { O } from "./chunks/converter-DzsjYmnd.js";
12
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-B5TyAe8v.js";
13
+ import { o, C, T, m, p, l, n } from "./chunks/editor-B5TyAe8v.js";
14
+ import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-DQPyKWs_.js";
15
+ import { O } from "./chunks/converter-DQPyKWs_.js";
16
16
  import { ref, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, 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-CNeu8BVd.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-CDeO5r_T.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-DQONSIAh.js";
19
+ import { D } from "./chunks/docx-zipper-cJ42om_0.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  (function(module) {
@@ -2737,8 +2737,8 @@ class SuperToolbar extends EventEmitter {
2737
2737
  * @param {*} [params.argument] - The argument passed to the command
2738
2738
  * @returns {*} The result of the executed command, undefined if no result is returned
2739
2739
  */
2740
- emitCommand({ item, argument, option }) {
2741
- if (this.activeEditor && !this.activeEditor.options.isHeaderOrFooter) {
2740
+ emitCommand({ item, argument, option, switchFocusToEditor = true }) {
2741
+ if (this.activeEditor && !this.activeEditor.options.isHeaderOrFooter && switchFocusToEditor) {
2742
2742
  this.activeEditor.focus();
2743
2743
  }
2744
2744
  const { command } = item;
@@ -3280,6 +3280,15 @@ const _sfc_main$2 = {
3280
3280
  });
3281
3281
  };
3282
3282
  const handleSuperEditorKeydown = (event) => {
3283
+ if ((event.metaKey || event.ctrlKey) && event.altKey && event.shiftKey) {
3284
+ if (event.code === "KeyM") {
3285
+ const toolbar = document.querySelector(".superdoc-toolbar");
3286
+ if (toolbar) {
3287
+ toolbar.setAttribute("tabindex", "0");
3288
+ toolbar.focus();
3289
+ }
3290
+ }
3291
+ }
3283
3292
  emit("editor-keydown", { editor: editor.value });
3284
3293
  };
3285
3294
  const handleSuperEditorClick = (event) => {
@@ -3385,7 +3394,7 @@ const _sfc_main$2 = {
3385
3394
  };
3386
3395
  }
3387
3396
  };
3388
- const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f27b7c30"]]);
3397
+ const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-199a4ecf"]]);
3389
3398
  const _sfc_main$1 = {
3390
3399
  __name: "BasicUpload",
3391
3400
  emits: ["file-change"],
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-CNeu8BVd.js";
3
- import "./chunks/editor-CO-n6iZ8.js";
2
+ import { T } from "./chunks/toolbar-CDeO5r_T.js";
3
+ import "./chunks/editor-B5TyAe8v.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BbaXC2pT.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-B4SPMXXo.cjs");
4
4
  require("./chunks/vue-DPZkajuO.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-B9igwxv-.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-D8BL6ojY.es.js";
2
2
  import "./chunks/vue-IIIZMHTg.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BbaXC2pT.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-B4SPMXXo.cjs");
4
4
  const vue = require("./chunks/vue-DPZkajuO.cjs");
5
5
  const jszip = require("./chunks/jszip-Bwu_om3F.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -46571,7 +46571,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
46571
46571
  this.config.colors = shuffleArray(this.config.colors);
46572
46572
  this.userColorMap = /* @__PURE__ */ new Map();
46573
46573
  this.colorIndex = 0;
46574
- this.version = "0.12.34-next.3";
46574
+ this.version = "0.12.35";
46575
46575
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46576
46576
  this.superdocId = config.superdocId || uuid.v4();
46577
46577
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-B9igwxv-.es.js";
2
- import { a, S, i, n } from "./chunks/super-editor.es-B9igwxv-.es.js";
1
+ import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-D8BL6ojY.es.js";
2
+ import { a, S, i, n } from "./chunks/super-editor.es-D8BL6ojY.es.js";
3
3
  import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -46570,7 +46570,7 @@ class SuperDoc extends EventEmitter {
46570
46570
  this.config.colors = shuffleArray(this.config.colors);
46571
46571
  this.userColorMap = /* @__PURE__ */ new Map();
46572
46572
  this.colorIndex = 0;
46573
- this.version = "0.12.34-next.3";
46573
+ this.version = "0.12.35";
46574
46574
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46575
46575
  this.superdocId = config.superdocId || v4();
46576
46576
  this.colors = this.config.colors;