@harbour-enterprises/superdoc 0.12.18 → 0.12.19
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-DIiFOcde.es.js → super-editor.es-C_GbwRpZ.es.js} +112 -52
- package/dist/chunks/{super-editor.es-DK2NC1Gl.cjs → super-editor.es-DmWvNj76.cjs} +112 -52
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BbPgOxa0.js → converter-DhgEAlTO.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Ce0B_FTd.js → docx-zipper-BSaSIAeQ.js} +1 -1
- package/dist/super-editor/chunks/{editor-CU4NcQRP.js → editor-BfaGq_P9.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-BhjcMYDy.js → toolbar-DSWq6Fuv.js} +2 -2
- package/dist/super-editor/components/toolbar/defaultItems.d.ts +1 -1
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts +5 -0
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/toolbarTexts.d.ts +51 -0
- package/dist/super-editor/components/toolbar/toolbarTexts.d.ts.map +1 -0
- 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/super-editor.es.js +116 -55
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +4 -2
- package/dist/superdoc.es.js +5 -3
- package/dist/superdoc.umd.js +115 -53
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
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-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DmWvNj76.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");
|
|
@@ -46521,6 +46521,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
46521
46521
|
// Optional DOM element to render the toolbar in
|
|
46522
46522
|
toolbarGroups: ["left", "center", "right"],
|
|
46523
46523
|
toolbarIcons: {},
|
|
46524
|
+
toolbarTexts: {},
|
|
46524
46525
|
isDev: false,
|
|
46525
46526
|
// telemetry config
|
|
46526
46527
|
telemetry: null,
|
|
@@ -46559,7 +46560,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
46559
46560
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46560
46561
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46561
46562
|
this.colorIndex = 0;
|
|
46562
|
-
this.version = "0.12.
|
|
46563
|
+
this.version = "0.12.19";
|
|
46563
46564
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46564
46565
|
this.superdocId = config.superdocId || uuid.v4();
|
|
46565
46566
|
this.colors = this.config.colors;
|
|
@@ -46790,6 +46791,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
46790
46791
|
role: this.config.role,
|
|
46791
46792
|
pagination: this.config.pagination,
|
|
46792
46793
|
icons: this.config.modules?.toolbar?.icons || this.config.toolbarIcons,
|
|
46794
|
+
texts: this.config.modules?.toolbar?.texts || this.config.toolbarTexts,
|
|
46793
46795
|
fonts: this.config.modules?.toolbar?.fonts || null,
|
|
46794
46796
|
hideButtons: this.config.modules?.toolbar?.hideButtons ?? true,
|
|
46795
46797
|
responsiveToContainer: this.config.modules?.toolbar?.responsiveToContainer ?? false,
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as index$1, C as CommentsPluginKey, e as TrackChangesBasePluginKey, E as Editor, k as getRichTextExtensions, c as SuperInput, A as AIWriter, b as SuperEditor, d as SuperToolbar, f as createZip } from "./chunks/super-editor.es-
|
|
2
|
-
import { S, i, m } from "./chunks/super-editor.es-
|
|
1
|
+
import { n as index$1, C as CommentsPluginKey, e as TrackChangesBasePluginKey, E as Editor, k as getRichTextExtensions, c as SuperInput, A as AIWriter, b as SuperEditor, d as SuperToolbar, f as createZip } from "./chunks/super-editor.es-C_GbwRpZ.es.js";
|
|
2
|
+
import { S, i, m } from "./chunks/super-editor.es-C_GbwRpZ.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";
|
|
@@ -46520,6 +46520,7 @@ class SuperDoc extends EventEmitter {
|
|
|
46520
46520
|
// Optional DOM element to render the toolbar in
|
|
46521
46521
|
toolbarGroups: ["left", "center", "right"],
|
|
46522
46522
|
toolbarIcons: {},
|
|
46523
|
+
toolbarTexts: {},
|
|
46523
46524
|
isDev: false,
|
|
46524
46525
|
// telemetry config
|
|
46525
46526
|
telemetry: null,
|
|
@@ -46558,7 +46559,7 @@ class SuperDoc extends EventEmitter {
|
|
|
46558
46559
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46559
46560
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46560
46561
|
this.colorIndex = 0;
|
|
46561
|
-
this.version = "0.12.
|
|
46562
|
+
this.version = "0.12.19";
|
|
46562
46563
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46563
46564
|
this.superdocId = config.superdocId || v4();
|
|
46564
46565
|
this.colors = this.config.colors;
|
|
@@ -46789,6 +46790,7 @@ class SuperDoc extends EventEmitter {
|
|
|
46789
46790
|
role: this.config.role,
|
|
46790
46791
|
pagination: this.config.pagination,
|
|
46791
46792
|
icons: this.config.modules?.toolbar?.icons || this.config.toolbarIcons,
|
|
46793
|
+
texts: this.config.modules?.toolbar?.texts || this.config.toolbarTexts,
|
|
46792
46794
|
fonts: this.config.modules?.toolbar?.fonts || null,
|
|
46793
46795
|
hideButtons: this.config.modules?.toolbar?.hideButtons ?? true,
|
|
46794
46796
|
responsiveToContainer: this.config.modules?.toolbar?.responsiveToContainer ?? false,
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -30664,7 +30664,7 @@
|
|
|
30664
30664
|
return;
|
|
30665
30665
|
}
|
|
30666
30666
|
}
|
|
30667
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
30667
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.19") {
|
|
30668
30668
|
const customLocation = "docProps/custom.xml";
|
|
30669
30669
|
if (!docx[customLocation]) {
|
|
30670
30670
|
docx[customLocation] = generateCustomXml();
|
|
@@ -31130,7 +31130,7 @@
|
|
|
31130
31130
|
function generateCustomXml() {
|
|
31131
31131
|
return DEFAULT_CUSTOM_XML;
|
|
31132
31132
|
}
|
|
31133
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
31133
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.19") {
|
|
31134
31134
|
return {
|
|
31135
31135
|
type: "element",
|
|
31136
31136
|
name: "property",
|
|
@@ -48285,7 +48285,7 @@
|
|
|
48285
48285
|
* @returns {Object | void} Migration results
|
|
48286
48286
|
*/
|
|
48287
48287
|
processCollaborationMigrations() {
|
|
48288
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
48288
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
48289
48289
|
if (!this.options.ydoc) return;
|
|
48290
48290
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
48291
48291
|
let docVersion = metaMap.get("version");
|
|
@@ -72254,6 +72254,7 @@ ${style2}
|
|
|
72254
72254
|
const makeDefaultItems = ({
|
|
72255
72255
|
superToolbar,
|
|
72256
72256
|
toolbarIcons: toolbarIcons2,
|
|
72257
|
+
toolbarTexts: toolbarTexts2,
|
|
72257
72258
|
toolbarFonts,
|
|
72258
72259
|
hideButtons,
|
|
72259
72260
|
availableWidth,
|
|
@@ -72265,12 +72266,12 @@ ${style2}
|
|
|
72265
72266
|
name: "bold",
|
|
72266
72267
|
command: "toggleBold",
|
|
72267
72268
|
icon: toolbarIcons2.bold,
|
|
72268
|
-
tooltip:
|
|
72269
|
+
tooltip: toolbarTexts2.bold
|
|
72269
72270
|
});
|
|
72270
72271
|
const fontButton = useToolbarItem({
|
|
72271
72272
|
type: "dropdown",
|
|
72272
72273
|
name: "fontFamily",
|
|
72273
|
-
tooltip:
|
|
72274
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
72274
72275
|
command: "setFontFamily",
|
|
72275
72276
|
defaultLabel: "Arial",
|
|
72276
72277
|
label: "Arial",
|
|
@@ -72294,7 +72295,7 @@ ${style2}
|
|
|
72294
72295
|
outline: "none"
|
|
72295
72296
|
},
|
|
72296
72297
|
name: "ai",
|
|
72297
|
-
tooltip:
|
|
72298
|
+
tooltip: toolbarTexts2.ai,
|
|
72298
72299
|
icon: toolbarIcons2.ai,
|
|
72299
72300
|
hideLabel: true,
|
|
72300
72301
|
hasCaret: false,
|
|
@@ -72340,7 +72341,7 @@ ${style2}
|
|
|
72340
72341
|
minWidth: "50px",
|
|
72341
72342
|
markName: "textStyle",
|
|
72342
72343
|
labelAttr: "fontSize",
|
|
72343
|
-
tooltip:
|
|
72344
|
+
tooltip: toolbarTexts2.fontSize,
|
|
72344
72345
|
hasCaret: true,
|
|
72345
72346
|
hasInlineTextInput: false,
|
|
72346
72347
|
inlineTextInputVisible: true,
|
|
@@ -72382,14 +72383,14 @@ ${style2}
|
|
|
72382
72383
|
name: "italic",
|
|
72383
72384
|
command: "toggleItalic",
|
|
72384
72385
|
icon: toolbarIcons2.italic,
|
|
72385
|
-
tooltip:
|
|
72386
|
+
tooltip: toolbarTexts2.italic
|
|
72386
72387
|
});
|
|
72387
72388
|
const underline = useToolbarItem({
|
|
72388
72389
|
type: "button",
|
|
72389
72390
|
name: "underline",
|
|
72390
72391
|
command: "toggleUnderline",
|
|
72391
72392
|
icon: toolbarIcons2.underline,
|
|
72392
|
-
tooltip:
|
|
72393
|
+
tooltip: toolbarTexts2.underline
|
|
72393
72394
|
});
|
|
72394
72395
|
const highlight = useToolbarItem({
|
|
72395
72396
|
type: "dropdown",
|
|
@@ -72398,7 +72399,7 @@ ${style2}
|
|
|
72398
72399
|
hideLabel: true,
|
|
72399
72400
|
markName: "highlight",
|
|
72400
72401
|
labelAttr: "color",
|
|
72401
|
-
tooltip:
|
|
72402
|
+
tooltip: toolbarTexts2.highlight,
|
|
72402
72403
|
command: "setHighlight",
|
|
72403
72404
|
noArgumentCommand: "unsetHighlight",
|
|
72404
72405
|
suppressActiveHighlight: true,
|
|
@@ -72421,7 +72422,7 @@ ${style2}
|
|
|
72421
72422
|
hideLabel: true,
|
|
72422
72423
|
markName: "textStyle",
|
|
72423
72424
|
labelAttr: "color",
|
|
72424
|
-
tooltip:
|
|
72425
|
+
tooltip: toolbarTexts2.color,
|
|
72425
72426
|
command: "setColor",
|
|
72426
72427
|
suppressActiveHighlight: true,
|
|
72427
72428
|
options: [
|
|
@@ -72441,7 +72442,7 @@ ${style2}
|
|
|
72441
72442
|
type: "dropdown",
|
|
72442
72443
|
name: "search",
|
|
72443
72444
|
icon: toolbarIcons2.search,
|
|
72444
|
-
tooltip:
|
|
72445
|
+
tooltip: toolbarTexts2.search,
|
|
72445
72446
|
group: "right",
|
|
72446
72447
|
inputRef: searchRef,
|
|
72447
72448
|
options: [
|
|
@@ -72468,7 +72469,7 @@ ${style2}
|
|
|
72468
72469
|
name: "link",
|
|
72469
72470
|
markName: "link",
|
|
72470
72471
|
icon: toolbarIcons2.link,
|
|
72471
|
-
tooltip:
|
|
72472
|
+
tooltip: toolbarTexts2.link,
|
|
72472
72473
|
options: [
|
|
72473
72474
|
{
|
|
72474
72475
|
type: "render",
|
|
@@ -72521,7 +72522,7 @@ ${style2}
|
|
|
72521
72522
|
name: "image",
|
|
72522
72523
|
command: "startImageUpload",
|
|
72523
72524
|
icon: toolbarIcons2.image,
|
|
72524
|
-
tooltip:
|
|
72525
|
+
tooltip: toolbarTexts2.image,
|
|
72525
72526
|
disabled: false
|
|
72526
72527
|
});
|
|
72527
72528
|
const tableItem = useToolbarItem({
|
|
@@ -72530,7 +72531,7 @@ ${style2}
|
|
|
72530
72531
|
icon: toolbarIcons2.table,
|
|
72531
72532
|
hideLabel: true,
|
|
72532
72533
|
labelAttr: "table",
|
|
72533
|
-
tooltip:
|
|
72534
|
+
tooltip: toolbarTexts2.table,
|
|
72534
72535
|
command: "insertTable",
|
|
72535
72536
|
suppressActiveHighlight: true,
|
|
72536
72537
|
options: [
|
|
@@ -72568,69 +72569,69 @@ ${style2}
|
|
|
72568
72569
|
});
|
|
72569
72570
|
const tableActionsOptions = [
|
|
72570
72571
|
{
|
|
72571
|
-
label:
|
|
72572
|
+
label: toolbarTexts2.addRowBefore,
|
|
72572
72573
|
command: "addRowBefore",
|
|
72573
72574
|
icon: toolbarIcons2.addRowBefore,
|
|
72574
72575
|
props: { "data-item": "btn-tableActions-option" }
|
|
72575
72576
|
},
|
|
72576
72577
|
{
|
|
72577
|
-
label:
|
|
72578
|
+
label: toolbarTexts2.addRowAfter,
|
|
72578
72579
|
command: "addRowAfter",
|
|
72579
72580
|
icon: toolbarIcons2.addRowAfter,
|
|
72580
72581
|
props: { "data-item": "btn-tableActions-option" }
|
|
72581
72582
|
},
|
|
72582
72583
|
{
|
|
72583
|
-
label:
|
|
72584
|
+
label: toolbarTexts2.addColumnBefore,
|
|
72584
72585
|
command: "addColumnBefore",
|
|
72585
72586
|
icon: toolbarIcons2.addColumnBefore,
|
|
72586
72587
|
props: { "data-item": "btn-tableActions-option" }
|
|
72587
72588
|
},
|
|
72588
72589
|
{
|
|
72589
|
-
label:
|
|
72590
|
+
label: toolbarTexts2.addColumnAfter,
|
|
72590
72591
|
command: "addColumnAfter",
|
|
72591
72592
|
icon: toolbarIcons2.addColumnAfter,
|
|
72592
72593
|
bottomBorder: true,
|
|
72593
72594
|
props: { "data-item": "btn-tableActions-option" }
|
|
72594
72595
|
},
|
|
72595
72596
|
{
|
|
72596
|
-
label:
|
|
72597
|
+
label: toolbarTexts2.deleteRow,
|
|
72597
72598
|
command: "deleteRow",
|
|
72598
72599
|
icon: toolbarIcons2.deleteRow,
|
|
72599
72600
|
props: { "data-item": "btn-tableActions-option" }
|
|
72600
72601
|
},
|
|
72601
72602
|
{
|
|
72602
|
-
label:
|
|
72603
|
+
label: toolbarTexts2.deleteColumn,
|
|
72603
72604
|
command: "deleteColumn",
|
|
72604
72605
|
icon: toolbarIcons2.deleteColumn,
|
|
72605
72606
|
props: { "data-item": "btn-tableActions-option" }
|
|
72606
72607
|
},
|
|
72607
72608
|
{
|
|
72608
|
-
label:
|
|
72609
|
+
label: toolbarTexts2.deleteTable,
|
|
72609
72610
|
command: "deleteTable",
|
|
72610
72611
|
icon: toolbarIcons2.deleteTable,
|
|
72611
72612
|
props: { "data-item": "btn-tableActions-option" }
|
|
72612
72613
|
},
|
|
72613
72614
|
{
|
|
72614
|
-
label:
|
|
72615
|
+
label: toolbarTexts2.transparentBorders,
|
|
72615
72616
|
command: "deleteCellAndTableBorders",
|
|
72616
72617
|
icon: toolbarIcons2.deleteBorders,
|
|
72617
72618
|
bottomBorder: true,
|
|
72618
72619
|
props: { "data-item": "btn-tableActions-option" }
|
|
72619
72620
|
},
|
|
72620
72621
|
{
|
|
72621
|
-
label:
|
|
72622
|
+
label: toolbarTexts2.mergeCells,
|
|
72622
72623
|
command: "mergeCells",
|
|
72623
72624
|
icon: toolbarIcons2.mergeCells,
|
|
72624
72625
|
props: { "data-item": "btn-tableActions-option" }
|
|
72625
72626
|
},
|
|
72626
72627
|
{
|
|
72627
|
-
label:
|
|
72628
|
+
label: toolbarTexts2.splitCell,
|
|
72628
72629
|
command: "splitCell",
|
|
72629
72630
|
icon: toolbarIcons2.splitCell,
|
|
72630
72631
|
props: { "data-item": "btn-tableActions-option" }
|
|
72631
72632
|
},
|
|
72632
72633
|
{
|
|
72633
|
-
label:
|
|
72634
|
+
label: toolbarTexts2.fixTables,
|
|
72634
72635
|
command: "fixTables",
|
|
72635
72636
|
icon: toolbarIcons2.fixTables,
|
|
72636
72637
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -72649,7 +72650,7 @@ ${style2}
|
|
|
72649
72650
|
const alignment2 = useToolbarItem({
|
|
72650
72651
|
type: "dropdown",
|
|
72651
72652
|
name: "textAlign",
|
|
72652
|
-
tooltip:
|
|
72653
|
+
tooltip: toolbarTexts2.textAlign,
|
|
72653
72654
|
icon: toolbarIcons2.alignLeft,
|
|
72654
72655
|
command: "setTextAlign",
|
|
72655
72656
|
hasCaret: true,
|
|
@@ -72699,21 +72700,21 @@ ${style2}
|
|
|
72699
72700
|
name: "list",
|
|
72700
72701
|
command: "toggleBulletList",
|
|
72701
72702
|
icon: toolbarIcons2.bulletList,
|
|
72702
|
-
tooltip:
|
|
72703
|
+
tooltip: toolbarTexts2.bulletList
|
|
72703
72704
|
});
|
|
72704
72705
|
const numberedList = useToolbarItem({
|
|
72705
72706
|
type: "button",
|
|
72706
72707
|
name: "numberedlist",
|
|
72707
72708
|
command: "toggleOrderedList",
|
|
72708
72709
|
icon: toolbarIcons2.numberedList,
|
|
72709
|
-
tooltip:
|
|
72710
|
+
tooltip: toolbarTexts2.numberedList
|
|
72710
72711
|
});
|
|
72711
72712
|
const indentLeft = useToolbarItem({
|
|
72712
72713
|
type: "button",
|
|
72713
72714
|
name: "indentleft",
|
|
72714
72715
|
command: "decreaseTextIndent",
|
|
72715
72716
|
icon: toolbarIcons2.indentLeft,
|
|
72716
|
-
tooltip:
|
|
72717
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
72717
72718
|
disabled: false
|
|
72718
72719
|
});
|
|
72719
72720
|
const indentRight = useToolbarItem({
|
|
@@ -72721,7 +72722,7 @@ ${style2}
|
|
|
72721
72722
|
name: "indentright",
|
|
72722
72723
|
command: "increaseTextIndent",
|
|
72723
72724
|
icon: toolbarIcons2.indentRight,
|
|
72724
|
-
tooltip:
|
|
72725
|
+
tooltip: toolbarTexts2.indentRight,
|
|
72725
72726
|
disabled: false
|
|
72726
72727
|
});
|
|
72727
72728
|
const overflow = useToolbarItem({
|
|
@@ -72735,7 +72736,7 @@ ${style2}
|
|
|
72735
72736
|
type: "dropdown",
|
|
72736
72737
|
name: "zoom",
|
|
72737
72738
|
allowWithoutEditor: true,
|
|
72738
|
-
tooltip:
|
|
72739
|
+
tooltip: toolbarTexts2.zoom,
|
|
72739
72740
|
defaultLabel: "100%",
|
|
72740
72741
|
label: "100%",
|
|
72741
72742
|
hasCaret: true,
|
|
@@ -72761,7 +72762,7 @@ ${style2}
|
|
|
72761
72762
|
type: "button",
|
|
72762
72763
|
name: "undo",
|
|
72763
72764
|
disabled: true,
|
|
72764
|
-
tooltip:
|
|
72765
|
+
tooltip: toolbarTexts2.undo,
|
|
72765
72766
|
command: "undo",
|
|
72766
72767
|
icon: toolbarIcons2.undo,
|
|
72767
72768
|
group: "left",
|
|
@@ -72773,7 +72774,7 @@ ${style2}
|
|
|
72773
72774
|
type: "button",
|
|
72774
72775
|
disabled: true,
|
|
72775
72776
|
name: "redo",
|
|
72776
|
-
tooltip:
|
|
72777
|
+
tooltip: toolbarTexts2.redo,
|
|
72777
72778
|
command: "redo",
|
|
72778
72779
|
icon: toolbarIcons2.redo,
|
|
72779
72780
|
group: "left",
|
|
@@ -72785,7 +72786,7 @@ ${style2}
|
|
|
72785
72786
|
type: "button",
|
|
72786
72787
|
disabled: false,
|
|
72787
72788
|
name: "toggleTrackChanges",
|
|
72788
|
-
tooltip:
|
|
72789
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
72789
72790
|
command: "toggleTrackChanges",
|
|
72790
72791
|
icon: toolbarIcons2.trackChanges,
|
|
72791
72792
|
group: "left"
|
|
@@ -72794,7 +72795,7 @@ ${style2}
|
|
|
72794
72795
|
type: "button",
|
|
72795
72796
|
disabled: false,
|
|
72796
72797
|
name: "acceptTrackedChangeBySelection",
|
|
72797
|
-
tooltip:
|
|
72798
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
72798
72799
|
command: "acceptTrackedChangeBySelection",
|
|
72799
72800
|
icon: toolbarIcons2.trackChangesAccept,
|
|
72800
72801
|
group: "left"
|
|
@@ -72803,7 +72804,7 @@ ${style2}
|
|
|
72803
72804
|
type: "button",
|
|
72804
72805
|
disabled: false,
|
|
72805
72806
|
name: "rejectTrackedChangeOnSelection",
|
|
72806
|
-
tooltip:
|
|
72807
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
72807
72808
|
command: "rejectTrackedChangeOnSelection",
|
|
72808
72809
|
icon: toolbarIcons2.trackChangesReject,
|
|
72809
72810
|
group: "left"
|
|
@@ -72812,7 +72813,7 @@ ${style2}
|
|
|
72812
72813
|
type: "button",
|
|
72813
72814
|
disabled: false,
|
|
72814
72815
|
name: "toggleTrackChangesShowOriginal",
|
|
72815
|
-
tooltip:
|
|
72816
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
72816
72817
|
command: "toggleTrackChangesShowOriginal",
|
|
72817
72818
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
72818
72819
|
group: "left"
|
|
@@ -72821,7 +72822,7 @@ ${style2}
|
|
|
72821
72822
|
type: "button",
|
|
72822
72823
|
disabled: false,
|
|
72823
72824
|
name: "toggleTrackChangesShowFinal",
|
|
72824
|
-
tooltip:
|
|
72825
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
72825
72826
|
command: "toggleTrackChangesShowFinal",
|
|
72826
72827
|
icon: toolbarIcons2.trackChangesFinal,
|
|
72827
72828
|
group: "left"
|
|
@@ -72830,7 +72831,7 @@ ${style2}
|
|
|
72830
72831
|
type: "button",
|
|
72831
72832
|
name: "clearFormatting",
|
|
72832
72833
|
command: "clearFormat",
|
|
72833
|
-
tooltip:
|
|
72834
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
72834
72835
|
icon: toolbarIcons2.clearFormatting
|
|
72835
72836
|
});
|
|
72836
72837
|
[
|
|
@@ -72845,7 +72846,7 @@ ${style2}
|
|
|
72845
72846
|
const copyFormat = useToolbarItem({
|
|
72846
72847
|
type: "button",
|
|
72847
72848
|
name: "copyFormat",
|
|
72848
|
-
tooltip:
|
|
72849
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
72849
72850
|
icon: toolbarIcons2.copyFormat,
|
|
72850
72851
|
command: "copyFormat"
|
|
72851
72852
|
});
|
|
@@ -72887,22 +72888,22 @@ ${style2}
|
|
|
72887
72888
|
});
|
|
72888
72889
|
const documentOptions = [
|
|
72889
72890
|
{
|
|
72890
|
-
label:
|
|
72891
|
+
label: toolbarTexts2.documentEditingMode,
|
|
72891
72892
|
value: "editing",
|
|
72892
72893
|
icon: toolbarIcons2.documentEditingMode,
|
|
72893
|
-
description:
|
|
72894
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
72894
72895
|
},
|
|
72895
72896
|
{
|
|
72896
|
-
label:
|
|
72897
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
72897
72898
|
value: "suggesting",
|
|
72898
72899
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
72899
|
-
description:
|
|
72900
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
72900
72901
|
},
|
|
72901
72902
|
{
|
|
72902
|
-
label:
|
|
72903
|
+
label: toolbarTexts2.documentViewingMode,
|
|
72903
72904
|
value: "viewing",
|
|
72904
72905
|
icon: toolbarIcons2.documentViewingMode,
|
|
72905
|
-
description:
|
|
72906
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
72906
72907
|
}
|
|
72907
72908
|
];
|
|
72908
72909
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -72923,7 +72924,7 @@ ${style2}
|
|
|
72923
72924
|
name: "pageBreakTool",
|
|
72924
72925
|
command: "insertPageBreak",
|
|
72925
72926
|
icon: toolbarIcons2.pageBreak,
|
|
72926
|
-
tooltip:
|
|
72927
|
+
tooltip: toolbarTexts2.pageBreak
|
|
72927
72928
|
});
|
|
72928
72929
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
72929
72930
|
["separator", 20],
|
|
@@ -72941,7 +72942,7 @@ ${style2}
|
|
|
72941
72942
|
name: "ruler",
|
|
72942
72943
|
command: "toggleRuler",
|
|
72943
72944
|
icon: toolbarIcons2.ruler,
|
|
72944
|
-
tooltip:
|
|
72945
|
+
tooltip: toolbarTexts2.ruler
|
|
72945
72946
|
});
|
|
72946
72947
|
const selectedLinkedStyle = ref$1(null);
|
|
72947
72948
|
const linkedStyles = useToolbarItem({
|
|
@@ -72949,8 +72950,8 @@ ${style2}
|
|
|
72949
72950
|
name: "linkedStyles",
|
|
72950
72951
|
command: "setLinkedStyle",
|
|
72951
72952
|
icon: toolbarIcons2.paintbrush,
|
|
72952
|
-
defaultLabel:
|
|
72953
|
-
label:
|
|
72953
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
72954
|
+
label: toolbarTexts2.formatText,
|
|
72954
72955
|
hasCaret: true,
|
|
72955
72956
|
isWide: true,
|
|
72956
72957
|
style: { width: "140px" },
|
|
@@ -72994,7 +72995,7 @@ ${style2}
|
|
|
72994
72995
|
const lineHeight2 = useToolbarItem({
|
|
72995
72996
|
type: "dropdown",
|
|
72996
72997
|
name: "lineHeight",
|
|
72997
|
-
tooltip:
|
|
72998
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
72998
72999
|
icon: toolbarIcons2.lineHeight,
|
|
72999
73000
|
hasCaret: false,
|
|
73000
73001
|
hasInlineTextInput: false,
|
|
@@ -73256,6 +73257,56 @@ ${style2}
|
|
|
73256
73257
|
}
|
|
73257
73258
|
);
|
|
73258
73259
|
};
|
|
73260
|
+
const toolbarTexts = {
|
|
73261
|
+
bold: "Bold",
|
|
73262
|
+
fontFamily: "Font",
|
|
73263
|
+
ai: "AI text generation",
|
|
73264
|
+
fontSize: "Font size",
|
|
73265
|
+
italic: "Italic",
|
|
73266
|
+
underline: "Underline",
|
|
73267
|
+
highlight: "Highlight color",
|
|
73268
|
+
color: "Text color",
|
|
73269
|
+
search: "Search",
|
|
73270
|
+
link: "Link",
|
|
73271
|
+
image: "Image",
|
|
73272
|
+
table: "Insert table",
|
|
73273
|
+
addRowBefore: "Insert row above",
|
|
73274
|
+
addRowAfter: "Insert row below",
|
|
73275
|
+
addColumnBefore: "Insert column left",
|
|
73276
|
+
addColumnAfter: "Insert column right",
|
|
73277
|
+
deleteRow: "Delete row",
|
|
73278
|
+
deleteColumn: "Delete column",
|
|
73279
|
+
deleteTable: "Delete table",
|
|
73280
|
+
transparentBorders: "Transparent borders",
|
|
73281
|
+
mergeCells: "Merge cells",
|
|
73282
|
+
splitCell: "Split cell",
|
|
73283
|
+
fixTables: "Fix tables",
|
|
73284
|
+
textAlign: "Alignment",
|
|
73285
|
+
bulletList: "Bullet list",
|
|
73286
|
+
numberedList: "Numbered list",
|
|
73287
|
+
indentLeft: "Left indent",
|
|
73288
|
+
indentRight: "Right indent",
|
|
73289
|
+
zoom: "Zoom",
|
|
73290
|
+
undo: "Undo",
|
|
73291
|
+
redo: "Redo",
|
|
73292
|
+
trackChanges: "Track Changes",
|
|
73293
|
+
trackChangesAccept: "Accept changes under selection",
|
|
73294
|
+
trackChangesReject: "Reject changes under selection",
|
|
73295
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
73296
|
+
trackChangesFinal: "Toggle Show Final",
|
|
73297
|
+
clearFormatting: "Clear formatting",
|
|
73298
|
+
copyFormat: "Format painter",
|
|
73299
|
+
lineHeight: "Line height",
|
|
73300
|
+
formatText: "Format text",
|
|
73301
|
+
ruler: "Show or hide ruler",
|
|
73302
|
+
pageBreak: "Insert page break",
|
|
73303
|
+
documentEditingMode: "Editing",
|
|
73304
|
+
documentSuggestingMode: "Suggesting",
|
|
73305
|
+
documentViewingMode: "Viewing",
|
|
73306
|
+
documentEditingModeDescription: "Edit document directly",
|
|
73307
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
73308
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
73309
|
+
};
|
|
73259
73310
|
class SuperToolbar extends EventEmitter$1 {
|
|
73260
73311
|
/**
|
|
73261
73312
|
* Creates a new SuperToolbar instance
|
|
@@ -73271,6 +73322,7 @@ ${style2}
|
|
|
73271
73322
|
role: "editor",
|
|
73272
73323
|
pagination: false,
|
|
73273
73324
|
icons: { ...toolbarIcons },
|
|
73325
|
+
texts: { ...toolbarTexts },
|
|
73274
73326
|
fonts: null,
|
|
73275
73327
|
hideButtons: true,
|
|
73276
73328
|
responsiveToContainer: false,
|
|
@@ -73534,6 +73586,7 @@ ${style2}
|
|
|
73534
73586
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73535
73587
|
superToolbar: this,
|
|
73536
73588
|
icons: this.config.icons,
|
|
73589
|
+
texts: this.config.texts,
|
|
73537
73590
|
fonts: this.config.fonts,
|
|
73538
73591
|
hideButtons: this.config.hideButtons,
|
|
73539
73592
|
isDev: this.isDev
|
|
@@ -73557,6 +73610,10 @@ ${style2}
|
|
|
73557
73610
|
...toolbarIcons,
|
|
73558
73611
|
...config.icons
|
|
73559
73612
|
};
|
|
73613
|
+
this.config.texts = {
|
|
73614
|
+
...toolbarTexts,
|
|
73615
|
+
...config.texts
|
|
73616
|
+
};
|
|
73560
73617
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
73561
73618
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
73562
73619
|
if (!this.config.selector && this.config.element) {
|
|
@@ -73570,6 +73627,7 @@ ${style2}
|
|
|
73570
73627
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73571
73628
|
superToolbar: this,
|
|
73572
73629
|
icons: this.config.icons,
|
|
73630
|
+
texts: this.config.texts,
|
|
73573
73631
|
fonts: this.config.fonts,
|
|
73574
73632
|
hideButtons: this.config.hideButtons,
|
|
73575
73633
|
isDev: config.isDev
|
|
@@ -73746,6 +73804,7 @@ ${style2}
|
|
|
73746
73804
|
makeToolbarItems_fn = function({
|
|
73747
73805
|
superToolbar,
|
|
73748
73806
|
icons: icons2,
|
|
73807
|
+
texts,
|
|
73749
73808
|
fonts,
|
|
73750
73809
|
hideButtons,
|
|
73751
73810
|
isDev = false
|
|
@@ -73756,6 +73815,7 @@ ${style2}
|
|
|
73756
73815
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
73757
73816
|
superToolbar,
|
|
73758
73817
|
toolbarIcons: icons2,
|
|
73818
|
+
toolbarTexts: texts,
|
|
73759
73819
|
toolbarFonts: fonts,
|
|
73760
73820
|
hideButtons,
|
|
73761
73821
|
availableWidth,
|
|
@@ -89358,6 +89418,7 @@ ${style2}
|
|
|
89358
89418
|
// Optional DOM element to render the toolbar in
|
|
89359
89419
|
toolbarGroups: ["left", "center", "right"],
|
|
89360
89420
|
toolbarIcons: {},
|
|
89421
|
+
toolbarTexts: {},
|
|
89361
89422
|
isDev: false,
|
|
89362
89423
|
// telemetry config
|
|
89363
89424
|
telemetry: null,
|
|
@@ -89396,7 +89457,7 @@ ${style2}
|
|
|
89396
89457
|
this.config.colors = shuffleArray(this.config.colors);
|
|
89397
89458
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
89398
89459
|
this.colorIndex = 0;
|
|
89399
|
-
this.version = "0.12.
|
|
89460
|
+
this.version = "0.12.19";
|
|
89400
89461
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
89401
89462
|
this.superdocId = config.superdocId || v4();
|
|
89402
89463
|
this.colors = this.config.colors;
|
|
@@ -89627,6 +89688,7 @@ ${style2}
|
|
|
89627
89688
|
role: this.config.role,
|
|
89628
89689
|
pagination: this.config.pagination,
|
|
89629
89690
|
icons: this.config.modules?.toolbar?.icons || this.config.toolbarIcons,
|
|
89691
|
+
texts: this.config.modules?.toolbar?.texts || this.config.toolbarTexts,
|
|
89630
89692
|
fonts: this.config.modules?.toolbar?.fonts || null,
|
|
89631
89693
|
hideButtons: this.config.modules?.toolbar?.hideButtons ?? true,
|
|
89632
89694
|
responsiveToContainer: this.config.modules?.toolbar?.responsiveToContainer ?? false,
|