@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.
- package/dist/chunks/{super-editor.es-CPI97mhk.js → super-editor.es-Clae0piR.js} +42 -24
- package/dist/chunks/{super-editor.es-CPI97mhk.js.map → super-editor.es-Clae0piR.js.map} +1 -1
- package/dist/style.css +35 -29
- package/dist/super-editor/chunks/{converter-By1eH3DG.js → converter-D8ypyLVy.js} +3 -3
- package/dist/super-editor/chunks/{converter-By1eH3DG.js.map → converter-D8ypyLVy.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-lMZAQDHY.js → docx-zipper-JxK5j_VH.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-lMZAQDHY.js.map → docx-zipper-JxK5j_VH.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-D23LMnhw.js → editor-FYK4p1Sx.js} +4 -4
- package/dist/super-editor/chunks/{editor-D23LMnhw.js.map → editor-FYK4p1Sx.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-BUKIGyoE.js → toolbar-CjTZ7qxx.js} +8 -8
- package/dist/super-editor/chunks/toolbar-CjTZ7qxx.js.map +1 -0
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +35 -29
- package/dist/super-editor/super-editor.es.js +39 -21
- package/dist/super-editor/super-editor.es.js.map +1 -1
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/package.json +1 -1
- package/dist/super-editor/chunks/toolbar-BUKIGyoE.js.map +0 -1
|
@@ -53710,7 +53710,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
53710
53710
|
return;
|
|
53711
53711
|
}
|
|
53712
53712
|
}
|
|
53713
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.
|
|
53713
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.34") {
|
|
53714
53714
|
const customLocation = "docProps/custom.xml";
|
|
53715
53715
|
if (!docx[customLocation]) {
|
|
53716
53716
|
docx[customLocation] = generateCustomXml();
|
|
@@ -53955,7 +53955,7 @@ function storeSuperdocVersion(docx) {
|
|
|
53955
53955
|
function generateCustomXml() {
|
|
53956
53956
|
return DEFAULT_CUSTOM_XML;
|
|
53957
53957
|
}
|
|
53958
|
-
function generateSuperdocVersion(version2 = "0.6.
|
|
53958
|
+
function generateSuperdocVersion(version2 = "0.6.34") {
|
|
53959
53959
|
return {
|
|
53960
53960
|
type: "element",
|
|
53961
53961
|
name: "property",
|
|
@@ -67926,7 +67926,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
67926
67926
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
67927
67927
|
*/
|
|
67928
67928
|
processCollaborationMigrations() {
|
|
67929
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
67929
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.34");
|
|
67930
67930
|
if (!this.options.ydoc) return;
|
|
67931
67931
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
67932
67932
|
let docVersion = metaMap.get("version");
|
|
@@ -79041,7 +79041,7 @@ const _sfc_main$4$1 = {
|
|
|
79041
79041
|
};
|
|
79042
79042
|
}
|
|
79043
79043
|
};
|
|
79044
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-
|
|
79044
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-33900b15"]]);
|
|
79045
79045
|
const _hoisted_1$2$1 = { class: "toolbar-separator" };
|
|
79046
79046
|
const _sfc_main$3$1 = {
|
|
79047
79047
|
__name: "ToolbarSeparator",
|
|
@@ -88464,11 +88464,11 @@ const _sfc_main$1$1 = {
|
|
|
88464
88464
|
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
88465
88465
|
const styleMap = {
|
|
88466
88466
|
left: {
|
|
88467
|
-
minWidth: "
|
|
88467
|
+
minWidth: "140px",
|
|
88468
88468
|
justifyContent: "flex-start"
|
|
88469
88469
|
},
|
|
88470
88470
|
right: {
|
|
88471
|
-
minWidth: "
|
|
88471
|
+
minWidth: "140px",
|
|
88472
88472
|
justifyContent: "flex-end"
|
|
88473
88473
|
},
|
|
88474
88474
|
default: {
|
|
@@ -88573,7 +88573,7 @@ const _sfc_main$1$1 = {
|
|
|
88573
88573
|
};
|
|
88574
88574
|
}
|
|
88575
88575
|
};
|
|
88576
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
88576
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-4b88ec39"]]);
|
|
88577
88577
|
const _sfc_main$c = {
|
|
88578
88578
|
__name: "Toolbar",
|
|
88579
88579
|
emits: ["command", "toggle", "select"],
|
|
@@ -88629,7 +88629,7 @@ const _sfc_main$c = {
|
|
|
88629
88629
|
};
|
|
88630
88630
|
}
|
|
88631
88631
|
};
|
|
88632
|
-
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
88632
|
+
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-4b88e275"]]);
|
|
88633
88633
|
async function createZip(blobs, fileNames) {
|
|
88634
88634
|
const zip = new JSZip();
|
|
88635
88635
|
blobs.forEach((blob, index2) => {
|
|
@@ -89568,7 +89568,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
89568
89568
|
labelAttr: "fontFamily",
|
|
89569
89569
|
hasCaret: true,
|
|
89570
89570
|
isWide: true,
|
|
89571
|
-
style: { width: "
|
|
89571
|
+
style: { width: "116px" },
|
|
89572
89572
|
suppressActiveHighlight: true,
|
|
89573
89573
|
options: [
|
|
89574
89574
|
{
|
|
@@ -90112,7 +90112,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90112
90112
|
group: "right",
|
|
90113
90113
|
attributes: {
|
|
90114
90114
|
dropdownPosition: "right",
|
|
90115
|
-
className: "doc-mode"
|
|
90115
|
+
className: "toolbar-item--doc-mode"
|
|
90116
90116
|
},
|
|
90117
90117
|
options: [
|
|
90118
90118
|
{
|
|
@@ -90163,11 +90163,12 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90163
90163
|
});
|
|
90164
90164
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
90165
90165
|
["separator", 20],
|
|
90166
|
-
["
|
|
90167
|
-
["
|
|
90168
|
-
["
|
|
90169
|
-
["
|
|
90170
|
-
["
|
|
90166
|
+
["zoom", 71],
|
|
90167
|
+
["fontFamily", 118],
|
|
90168
|
+
["fontSize", 57],
|
|
90169
|
+
["textAlign", 40],
|
|
90170
|
+
["linkedStyles", 142],
|
|
90171
|
+
["documentMode", 47],
|
|
90171
90172
|
["default", 32]
|
|
90172
90173
|
]);
|
|
90173
90174
|
const ruler = useToolbarItem({
|
|
@@ -90186,9 +90187,12 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90186
90187
|
label: "Format text",
|
|
90187
90188
|
hasCaret: true,
|
|
90188
90189
|
isWide: true,
|
|
90189
|
-
style: { width: "
|
|
90190
|
+
style: { width: "140px" },
|
|
90190
90191
|
suppressActiveHighlight: true,
|
|
90191
90192
|
disabled: false,
|
|
90193
|
+
attributes: {
|
|
90194
|
+
className: "toolbar-item--linked-styles"
|
|
90195
|
+
},
|
|
90192
90196
|
options: [
|
|
90193
90197
|
{
|
|
90194
90198
|
type: "render",
|
|
@@ -90215,10 +90219,15 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90215
90219
|
linkedStyles.disabled.value = true;
|
|
90216
90220
|
}
|
|
90217
90221
|
});
|
|
90218
|
-
const
|
|
90219
|
-
|
|
90220
|
-
|
|
90222
|
+
const breakpoints = {
|
|
90223
|
+
sm: 768,
|
|
90224
|
+
md: 1024,
|
|
90225
|
+
xl: 1410
|
|
90226
|
+
};
|
|
90221
90227
|
const stickyItemsWidth = 120;
|
|
90228
|
+
const toolbarPadding = 32;
|
|
90229
|
+
const itemsToHideXL = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"];
|
|
90230
|
+
const itemsToHideSM = ["zoom", "fontFamily", "fontSize", "redo"];
|
|
90222
90231
|
let toolbarItems = [
|
|
90223
90232
|
undo2,
|
|
90224
90233
|
redo2,
|
|
@@ -90261,7 +90270,7 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90261
90270
|
documentMode
|
|
90262
90271
|
// search,
|
|
90263
90272
|
];
|
|
90264
|
-
if (windowWidth <=
|
|
90273
|
+
if (windowWidth <= breakpoints.md) {
|
|
90265
90274
|
toolbarItems = toolbarItems.filter((item) => item.type !== "separator");
|
|
90266
90275
|
}
|
|
90267
90276
|
if (!superToolbar.config.pagination) {
|
|
@@ -90286,7 +90295,15 @@ const makeDefaultItems = (superToolbar, isDev = false, windowWidth, role, toolba
|
|
|
90286
90295
|
let totalWidth = toolbarPadding + stickyItemsWidth;
|
|
90287
90296
|
toolbarItems.forEach((item) => {
|
|
90288
90297
|
const itemWidth = controlSizes.get(item.name.value) || controlSizes.get("default");
|
|
90289
|
-
if (windowWidth <
|
|
90298
|
+
if (windowWidth < breakpoints.xl && itemsToHideXL.includes(item.name.value)) {
|
|
90299
|
+
overflowItems.push(item);
|
|
90300
|
+
if (item.name.value === "linkedStyles") {
|
|
90301
|
+
const linkedStylesIdx = toolbarItems.findIndex((item2) => item2.name.value === "linkedStyles");
|
|
90302
|
+
toolbarItems.splice(linkedStylesIdx + 1, 1);
|
|
90303
|
+
}
|
|
90304
|
+
return;
|
|
90305
|
+
}
|
|
90306
|
+
if (windowWidth < breakpoints.sm && itemsToHideSM.includes(item.name.value)) {
|
|
90290
90307
|
overflowItems.push(item);
|
|
90291
90308
|
return;
|
|
90292
90309
|
}
|
|
@@ -90488,7 +90505,7 @@ class SuperToolbar extends EventEmitter {
|
|
|
90488
90505
|
__privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument });
|
|
90489
90506
|
},
|
|
90490
90507
|
setHighlight: ({ item, argument }) => {
|
|
90491
|
-
__privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument
|
|
90508
|
+
__privateMethod(this, _SuperToolbar_instances, runCommandWithArgumentOnly_fn).call(this, { item, argument });
|
|
90492
90509
|
},
|
|
90493
90510
|
toggleRuler: ({ item, argument }) => {
|
|
90494
90511
|
this.superdoc.toggleRuler();
|
|
@@ -90696,7 +90713,8 @@ class SuperToolbar extends EventEmitter {
|
|
|
90696
90713
|
_interceptedCommands = /* @__PURE__ */ new WeakMap();
|
|
90697
90714
|
_SuperToolbar_instances = /* @__PURE__ */ new WeakSet();
|
|
90698
90715
|
makeToolbarItems_fn = function(superToolbar, icons2, isDev = false) {
|
|
90699
|
-
const
|
|
90716
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
90717
|
+
const { defaultItems, overflowItems } = makeDefaultItems(superToolbar, isDev, documentWidth, this.role, icons2);
|
|
90700
90718
|
this.toolbarItems = defaultItems;
|
|
90701
90719
|
this.overflowItems = overflowItems;
|
|
90702
90720
|
};
|
|
@@ -91351,4 +91369,4 @@ export {
|
|
|
91351
91369
|
helpers as k,
|
|
91352
91370
|
index as l
|
|
91353
91371
|
};
|
|
91354
|
-
//# sourceMappingURL=super-editor.es-
|
|
91372
|
+
//# sourceMappingURL=super-editor.es-Clae0piR.js.map
|