@harbour-enterprises/superdoc 0.12.18 → 0.12.20
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-Bwk4Mypj.es.js} +119 -52
- package/dist/chunks/{super-editor.es-DK2NC1Gl.cjs → super-editor.es-Y854o0UB.cjs} +119 -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-B8bdBUgY.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Ce0B_FTd.js → docx-zipper-CQsKTRQj.js} +1 -1
- package/dist/super-editor/chunks/{editor-CU4NcQRP.js → editor-NAeVYoNG.js} +10 -3
- package/dist/super-editor/chunks/{toolbar-BhjcMYDy.js → toolbar-CMBy65X5.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/extensions/paragraph/helpers/getDefaultSpacing.d.ts +7 -0
- package/dist/super-editor/extensions/paragraph/helpers/getDefaultSpacing.d.ts.map +1 -0
- package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
- 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 +122 -53
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/super-editor.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-Y854o0UB.cjs");
|
|
4
4
|
require("./chunks/vue-DPZkajuO.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.BasicUpload = superEditor_es._sfc_main$1;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, _, C, D, E, a, S, b, c, d, T, e, f, i, g, h, j, k, l, m, n } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, _, C, D, E, a, S, b, c, d, T, e, f, i, g, h, j, k, l, m, n } from "./chunks/super-editor.es-Bwk4Mypj.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-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Y854o0UB.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.20";
|
|
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-Bwk4Mypj.es.js";
|
|
2
|
+
import { S, i, m } from "./chunks/super-editor.es-Bwk4Mypj.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.20";
|
|
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.20") {
|
|
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.20") {
|
|
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.20");
|
|
48289
48289
|
if (!this.options.ydoc) return;
|
|
48290
48290
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
48291
48291
|
let docVersion = metaMap.get("version");
|
|
@@ -50942,6 +50942,12 @@
|
|
|
50942
50942
|
return a.definition.attrs?.name.localeCompare(b.definition.attrs?.name);
|
|
50943
50943
|
});
|
|
50944
50944
|
};
|
|
50945
|
+
const getDefaultSpacing = () => ({
|
|
50946
|
+
lineSpaceAfter: 0,
|
|
50947
|
+
lineSpaceBefore: 0,
|
|
50948
|
+
line: 0,
|
|
50949
|
+
lineRule: null
|
|
50950
|
+
});
|
|
50945
50951
|
const Paragraph = Node$1.create({
|
|
50946
50952
|
name: "paragraph",
|
|
50947
50953
|
priority: 1e3,
|
|
@@ -50956,6 +50962,7 @@
|
|
|
50956
50962
|
addAttributes() {
|
|
50957
50963
|
return {
|
|
50958
50964
|
spacing: {
|
|
50965
|
+
default: getDefaultSpacing(),
|
|
50959
50966
|
renderDOM: (attrs) => {
|
|
50960
50967
|
const { spacing } = attrs;
|
|
50961
50968
|
if (!spacing) return {};
|
|
@@ -72254,6 +72261,7 @@ ${style2}
|
|
|
72254
72261
|
const makeDefaultItems = ({
|
|
72255
72262
|
superToolbar,
|
|
72256
72263
|
toolbarIcons: toolbarIcons2,
|
|
72264
|
+
toolbarTexts: toolbarTexts2,
|
|
72257
72265
|
toolbarFonts,
|
|
72258
72266
|
hideButtons,
|
|
72259
72267
|
availableWidth,
|
|
@@ -72265,12 +72273,12 @@ ${style2}
|
|
|
72265
72273
|
name: "bold",
|
|
72266
72274
|
command: "toggleBold",
|
|
72267
72275
|
icon: toolbarIcons2.bold,
|
|
72268
|
-
tooltip:
|
|
72276
|
+
tooltip: toolbarTexts2.bold
|
|
72269
72277
|
});
|
|
72270
72278
|
const fontButton = useToolbarItem({
|
|
72271
72279
|
type: "dropdown",
|
|
72272
72280
|
name: "fontFamily",
|
|
72273
|
-
tooltip:
|
|
72281
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
72274
72282
|
command: "setFontFamily",
|
|
72275
72283
|
defaultLabel: "Arial",
|
|
72276
72284
|
label: "Arial",
|
|
@@ -72294,7 +72302,7 @@ ${style2}
|
|
|
72294
72302
|
outline: "none"
|
|
72295
72303
|
},
|
|
72296
72304
|
name: "ai",
|
|
72297
|
-
tooltip:
|
|
72305
|
+
tooltip: toolbarTexts2.ai,
|
|
72298
72306
|
icon: toolbarIcons2.ai,
|
|
72299
72307
|
hideLabel: true,
|
|
72300
72308
|
hasCaret: false,
|
|
@@ -72340,7 +72348,7 @@ ${style2}
|
|
|
72340
72348
|
minWidth: "50px",
|
|
72341
72349
|
markName: "textStyle",
|
|
72342
72350
|
labelAttr: "fontSize",
|
|
72343
|
-
tooltip:
|
|
72351
|
+
tooltip: toolbarTexts2.fontSize,
|
|
72344
72352
|
hasCaret: true,
|
|
72345
72353
|
hasInlineTextInput: false,
|
|
72346
72354
|
inlineTextInputVisible: true,
|
|
@@ -72382,14 +72390,14 @@ ${style2}
|
|
|
72382
72390
|
name: "italic",
|
|
72383
72391
|
command: "toggleItalic",
|
|
72384
72392
|
icon: toolbarIcons2.italic,
|
|
72385
|
-
tooltip:
|
|
72393
|
+
tooltip: toolbarTexts2.italic
|
|
72386
72394
|
});
|
|
72387
72395
|
const underline = useToolbarItem({
|
|
72388
72396
|
type: "button",
|
|
72389
72397
|
name: "underline",
|
|
72390
72398
|
command: "toggleUnderline",
|
|
72391
72399
|
icon: toolbarIcons2.underline,
|
|
72392
|
-
tooltip:
|
|
72400
|
+
tooltip: toolbarTexts2.underline
|
|
72393
72401
|
});
|
|
72394
72402
|
const highlight = useToolbarItem({
|
|
72395
72403
|
type: "dropdown",
|
|
@@ -72398,7 +72406,7 @@ ${style2}
|
|
|
72398
72406
|
hideLabel: true,
|
|
72399
72407
|
markName: "highlight",
|
|
72400
72408
|
labelAttr: "color",
|
|
72401
|
-
tooltip:
|
|
72409
|
+
tooltip: toolbarTexts2.highlight,
|
|
72402
72410
|
command: "setHighlight",
|
|
72403
72411
|
noArgumentCommand: "unsetHighlight",
|
|
72404
72412
|
suppressActiveHighlight: true,
|
|
@@ -72421,7 +72429,7 @@ ${style2}
|
|
|
72421
72429
|
hideLabel: true,
|
|
72422
72430
|
markName: "textStyle",
|
|
72423
72431
|
labelAttr: "color",
|
|
72424
|
-
tooltip:
|
|
72432
|
+
tooltip: toolbarTexts2.color,
|
|
72425
72433
|
command: "setColor",
|
|
72426
72434
|
suppressActiveHighlight: true,
|
|
72427
72435
|
options: [
|
|
@@ -72441,7 +72449,7 @@ ${style2}
|
|
|
72441
72449
|
type: "dropdown",
|
|
72442
72450
|
name: "search",
|
|
72443
72451
|
icon: toolbarIcons2.search,
|
|
72444
|
-
tooltip:
|
|
72452
|
+
tooltip: toolbarTexts2.search,
|
|
72445
72453
|
group: "right",
|
|
72446
72454
|
inputRef: searchRef,
|
|
72447
72455
|
options: [
|
|
@@ -72468,7 +72476,7 @@ ${style2}
|
|
|
72468
72476
|
name: "link",
|
|
72469
72477
|
markName: "link",
|
|
72470
72478
|
icon: toolbarIcons2.link,
|
|
72471
|
-
tooltip:
|
|
72479
|
+
tooltip: toolbarTexts2.link,
|
|
72472
72480
|
options: [
|
|
72473
72481
|
{
|
|
72474
72482
|
type: "render",
|
|
@@ -72521,7 +72529,7 @@ ${style2}
|
|
|
72521
72529
|
name: "image",
|
|
72522
72530
|
command: "startImageUpload",
|
|
72523
72531
|
icon: toolbarIcons2.image,
|
|
72524
|
-
tooltip:
|
|
72532
|
+
tooltip: toolbarTexts2.image,
|
|
72525
72533
|
disabled: false
|
|
72526
72534
|
});
|
|
72527
72535
|
const tableItem = useToolbarItem({
|
|
@@ -72530,7 +72538,7 @@ ${style2}
|
|
|
72530
72538
|
icon: toolbarIcons2.table,
|
|
72531
72539
|
hideLabel: true,
|
|
72532
72540
|
labelAttr: "table",
|
|
72533
|
-
tooltip:
|
|
72541
|
+
tooltip: toolbarTexts2.table,
|
|
72534
72542
|
command: "insertTable",
|
|
72535
72543
|
suppressActiveHighlight: true,
|
|
72536
72544
|
options: [
|
|
@@ -72568,69 +72576,69 @@ ${style2}
|
|
|
72568
72576
|
});
|
|
72569
72577
|
const tableActionsOptions = [
|
|
72570
72578
|
{
|
|
72571
|
-
label:
|
|
72579
|
+
label: toolbarTexts2.addRowBefore,
|
|
72572
72580
|
command: "addRowBefore",
|
|
72573
72581
|
icon: toolbarIcons2.addRowBefore,
|
|
72574
72582
|
props: { "data-item": "btn-tableActions-option" }
|
|
72575
72583
|
},
|
|
72576
72584
|
{
|
|
72577
|
-
label:
|
|
72585
|
+
label: toolbarTexts2.addRowAfter,
|
|
72578
72586
|
command: "addRowAfter",
|
|
72579
72587
|
icon: toolbarIcons2.addRowAfter,
|
|
72580
72588
|
props: { "data-item": "btn-tableActions-option" }
|
|
72581
72589
|
},
|
|
72582
72590
|
{
|
|
72583
|
-
label:
|
|
72591
|
+
label: toolbarTexts2.addColumnBefore,
|
|
72584
72592
|
command: "addColumnBefore",
|
|
72585
72593
|
icon: toolbarIcons2.addColumnBefore,
|
|
72586
72594
|
props: { "data-item": "btn-tableActions-option" }
|
|
72587
72595
|
},
|
|
72588
72596
|
{
|
|
72589
|
-
label:
|
|
72597
|
+
label: toolbarTexts2.addColumnAfter,
|
|
72590
72598
|
command: "addColumnAfter",
|
|
72591
72599
|
icon: toolbarIcons2.addColumnAfter,
|
|
72592
72600
|
bottomBorder: true,
|
|
72593
72601
|
props: { "data-item": "btn-tableActions-option" }
|
|
72594
72602
|
},
|
|
72595
72603
|
{
|
|
72596
|
-
label:
|
|
72604
|
+
label: toolbarTexts2.deleteRow,
|
|
72597
72605
|
command: "deleteRow",
|
|
72598
72606
|
icon: toolbarIcons2.deleteRow,
|
|
72599
72607
|
props: { "data-item": "btn-tableActions-option" }
|
|
72600
72608
|
},
|
|
72601
72609
|
{
|
|
72602
|
-
label:
|
|
72610
|
+
label: toolbarTexts2.deleteColumn,
|
|
72603
72611
|
command: "deleteColumn",
|
|
72604
72612
|
icon: toolbarIcons2.deleteColumn,
|
|
72605
72613
|
props: { "data-item": "btn-tableActions-option" }
|
|
72606
72614
|
},
|
|
72607
72615
|
{
|
|
72608
|
-
label:
|
|
72616
|
+
label: toolbarTexts2.deleteTable,
|
|
72609
72617
|
command: "deleteTable",
|
|
72610
72618
|
icon: toolbarIcons2.deleteTable,
|
|
72611
72619
|
props: { "data-item": "btn-tableActions-option" }
|
|
72612
72620
|
},
|
|
72613
72621
|
{
|
|
72614
|
-
label:
|
|
72622
|
+
label: toolbarTexts2.transparentBorders,
|
|
72615
72623
|
command: "deleteCellAndTableBorders",
|
|
72616
72624
|
icon: toolbarIcons2.deleteBorders,
|
|
72617
72625
|
bottomBorder: true,
|
|
72618
72626
|
props: { "data-item": "btn-tableActions-option" }
|
|
72619
72627
|
},
|
|
72620
72628
|
{
|
|
72621
|
-
label:
|
|
72629
|
+
label: toolbarTexts2.mergeCells,
|
|
72622
72630
|
command: "mergeCells",
|
|
72623
72631
|
icon: toolbarIcons2.mergeCells,
|
|
72624
72632
|
props: { "data-item": "btn-tableActions-option" }
|
|
72625
72633
|
},
|
|
72626
72634
|
{
|
|
72627
|
-
label:
|
|
72635
|
+
label: toolbarTexts2.splitCell,
|
|
72628
72636
|
command: "splitCell",
|
|
72629
72637
|
icon: toolbarIcons2.splitCell,
|
|
72630
72638
|
props: { "data-item": "btn-tableActions-option" }
|
|
72631
72639
|
},
|
|
72632
72640
|
{
|
|
72633
|
-
label:
|
|
72641
|
+
label: toolbarTexts2.fixTables,
|
|
72634
72642
|
command: "fixTables",
|
|
72635
72643
|
icon: toolbarIcons2.fixTables,
|
|
72636
72644
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -72649,7 +72657,7 @@ ${style2}
|
|
|
72649
72657
|
const alignment2 = useToolbarItem({
|
|
72650
72658
|
type: "dropdown",
|
|
72651
72659
|
name: "textAlign",
|
|
72652
|
-
tooltip:
|
|
72660
|
+
tooltip: toolbarTexts2.textAlign,
|
|
72653
72661
|
icon: toolbarIcons2.alignLeft,
|
|
72654
72662
|
command: "setTextAlign",
|
|
72655
72663
|
hasCaret: true,
|
|
@@ -72699,21 +72707,21 @@ ${style2}
|
|
|
72699
72707
|
name: "list",
|
|
72700
72708
|
command: "toggleBulletList",
|
|
72701
72709
|
icon: toolbarIcons2.bulletList,
|
|
72702
|
-
tooltip:
|
|
72710
|
+
tooltip: toolbarTexts2.bulletList
|
|
72703
72711
|
});
|
|
72704
72712
|
const numberedList = useToolbarItem({
|
|
72705
72713
|
type: "button",
|
|
72706
72714
|
name: "numberedlist",
|
|
72707
72715
|
command: "toggleOrderedList",
|
|
72708
72716
|
icon: toolbarIcons2.numberedList,
|
|
72709
|
-
tooltip:
|
|
72717
|
+
tooltip: toolbarTexts2.numberedList
|
|
72710
72718
|
});
|
|
72711
72719
|
const indentLeft = useToolbarItem({
|
|
72712
72720
|
type: "button",
|
|
72713
72721
|
name: "indentleft",
|
|
72714
72722
|
command: "decreaseTextIndent",
|
|
72715
72723
|
icon: toolbarIcons2.indentLeft,
|
|
72716
|
-
tooltip:
|
|
72724
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
72717
72725
|
disabled: false
|
|
72718
72726
|
});
|
|
72719
72727
|
const indentRight = useToolbarItem({
|
|
@@ -72721,7 +72729,7 @@ ${style2}
|
|
|
72721
72729
|
name: "indentright",
|
|
72722
72730
|
command: "increaseTextIndent",
|
|
72723
72731
|
icon: toolbarIcons2.indentRight,
|
|
72724
|
-
tooltip:
|
|
72732
|
+
tooltip: toolbarTexts2.indentRight,
|
|
72725
72733
|
disabled: false
|
|
72726
72734
|
});
|
|
72727
72735
|
const overflow = useToolbarItem({
|
|
@@ -72735,7 +72743,7 @@ ${style2}
|
|
|
72735
72743
|
type: "dropdown",
|
|
72736
72744
|
name: "zoom",
|
|
72737
72745
|
allowWithoutEditor: true,
|
|
72738
|
-
tooltip:
|
|
72746
|
+
tooltip: toolbarTexts2.zoom,
|
|
72739
72747
|
defaultLabel: "100%",
|
|
72740
72748
|
label: "100%",
|
|
72741
72749
|
hasCaret: true,
|
|
@@ -72761,7 +72769,7 @@ ${style2}
|
|
|
72761
72769
|
type: "button",
|
|
72762
72770
|
name: "undo",
|
|
72763
72771
|
disabled: true,
|
|
72764
|
-
tooltip:
|
|
72772
|
+
tooltip: toolbarTexts2.undo,
|
|
72765
72773
|
command: "undo",
|
|
72766
72774
|
icon: toolbarIcons2.undo,
|
|
72767
72775
|
group: "left",
|
|
@@ -72773,7 +72781,7 @@ ${style2}
|
|
|
72773
72781
|
type: "button",
|
|
72774
72782
|
disabled: true,
|
|
72775
72783
|
name: "redo",
|
|
72776
|
-
tooltip:
|
|
72784
|
+
tooltip: toolbarTexts2.redo,
|
|
72777
72785
|
command: "redo",
|
|
72778
72786
|
icon: toolbarIcons2.redo,
|
|
72779
72787
|
group: "left",
|
|
@@ -72785,7 +72793,7 @@ ${style2}
|
|
|
72785
72793
|
type: "button",
|
|
72786
72794
|
disabled: false,
|
|
72787
72795
|
name: "toggleTrackChanges",
|
|
72788
|
-
tooltip:
|
|
72796
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
72789
72797
|
command: "toggleTrackChanges",
|
|
72790
72798
|
icon: toolbarIcons2.trackChanges,
|
|
72791
72799
|
group: "left"
|
|
@@ -72794,7 +72802,7 @@ ${style2}
|
|
|
72794
72802
|
type: "button",
|
|
72795
72803
|
disabled: false,
|
|
72796
72804
|
name: "acceptTrackedChangeBySelection",
|
|
72797
|
-
tooltip:
|
|
72805
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
72798
72806
|
command: "acceptTrackedChangeBySelection",
|
|
72799
72807
|
icon: toolbarIcons2.trackChangesAccept,
|
|
72800
72808
|
group: "left"
|
|
@@ -72803,7 +72811,7 @@ ${style2}
|
|
|
72803
72811
|
type: "button",
|
|
72804
72812
|
disabled: false,
|
|
72805
72813
|
name: "rejectTrackedChangeOnSelection",
|
|
72806
|
-
tooltip:
|
|
72814
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
72807
72815
|
command: "rejectTrackedChangeOnSelection",
|
|
72808
72816
|
icon: toolbarIcons2.trackChangesReject,
|
|
72809
72817
|
group: "left"
|
|
@@ -72812,7 +72820,7 @@ ${style2}
|
|
|
72812
72820
|
type: "button",
|
|
72813
72821
|
disabled: false,
|
|
72814
72822
|
name: "toggleTrackChangesShowOriginal",
|
|
72815
|
-
tooltip:
|
|
72823
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
72816
72824
|
command: "toggleTrackChangesShowOriginal",
|
|
72817
72825
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
72818
72826
|
group: "left"
|
|
@@ -72821,7 +72829,7 @@ ${style2}
|
|
|
72821
72829
|
type: "button",
|
|
72822
72830
|
disabled: false,
|
|
72823
72831
|
name: "toggleTrackChangesShowFinal",
|
|
72824
|
-
tooltip:
|
|
72832
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
72825
72833
|
command: "toggleTrackChangesShowFinal",
|
|
72826
72834
|
icon: toolbarIcons2.trackChangesFinal,
|
|
72827
72835
|
group: "left"
|
|
@@ -72830,7 +72838,7 @@ ${style2}
|
|
|
72830
72838
|
type: "button",
|
|
72831
72839
|
name: "clearFormatting",
|
|
72832
72840
|
command: "clearFormat",
|
|
72833
|
-
tooltip:
|
|
72841
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
72834
72842
|
icon: toolbarIcons2.clearFormatting
|
|
72835
72843
|
});
|
|
72836
72844
|
[
|
|
@@ -72845,7 +72853,7 @@ ${style2}
|
|
|
72845
72853
|
const copyFormat = useToolbarItem({
|
|
72846
72854
|
type: "button",
|
|
72847
72855
|
name: "copyFormat",
|
|
72848
|
-
tooltip:
|
|
72856
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
72849
72857
|
icon: toolbarIcons2.copyFormat,
|
|
72850
72858
|
command: "copyFormat"
|
|
72851
72859
|
});
|
|
@@ -72887,22 +72895,22 @@ ${style2}
|
|
|
72887
72895
|
});
|
|
72888
72896
|
const documentOptions = [
|
|
72889
72897
|
{
|
|
72890
|
-
label:
|
|
72898
|
+
label: toolbarTexts2.documentEditingMode,
|
|
72891
72899
|
value: "editing",
|
|
72892
72900
|
icon: toolbarIcons2.documentEditingMode,
|
|
72893
|
-
description:
|
|
72901
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
72894
72902
|
},
|
|
72895
72903
|
{
|
|
72896
|
-
label:
|
|
72904
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
72897
72905
|
value: "suggesting",
|
|
72898
72906
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
72899
|
-
description:
|
|
72907
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
72900
72908
|
},
|
|
72901
72909
|
{
|
|
72902
|
-
label:
|
|
72910
|
+
label: toolbarTexts2.documentViewingMode,
|
|
72903
72911
|
value: "viewing",
|
|
72904
72912
|
icon: toolbarIcons2.documentViewingMode,
|
|
72905
|
-
description:
|
|
72913
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
72906
72914
|
}
|
|
72907
72915
|
];
|
|
72908
72916
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -72923,7 +72931,7 @@ ${style2}
|
|
|
72923
72931
|
name: "pageBreakTool",
|
|
72924
72932
|
command: "insertPageBreak",
|
|
72925
72933
|
icon: toolbarIcons2.pageBreak,
|
|
72926
|
-
tooltip:
|
|
72934
|
+
tooltip: toolbarTexts2.pageBreak
|
|
72927
72935
|
});
|
|
72928
72936
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
72929
72937
|
["separator", 20],
|
|
@@ -72941,7 +72949,7 @@ ${style2}
|
|
|
72941
72949
|
name: "ruler",
|
|
72942
72950
|
command: "toggleRuler",
|
|
72943
72951
|
icon: toolbarIcons2.ruler,
|
|
72944
|
-
tooltip:
|
|
72952
|
+
tooltip: toolbarTexts2.ruler
|
|
72945
72953
|
});
|
|
72946
72954
|
const selectedLinkedStyle = ref$1(null);
|
|
72947
72955
|
const linkedStyles = useToolbarItem({
|
|
@@ -72949,8 +72957,8 @@ ${style2}
|
|
|
72949
72957
|
name: "linkedStyles",
|
|
72950
72958
|
command: "setLinkedStyle",
|
|
72951
72959
|
icon: toolbarIcons2.paintbrush,
|
|
72952
|
-
defaultLabel:
|
|
72953
|
-
label:
|
|
72960
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
72961
|
+
label: toolbarTexts2.formatText,
|
|
72954
72962
|
hasCaret: true,
|
|
72955
72963
|
isWide: true,
|
|
72956
72964
|
style: { width: "140px" },
|
|
@@ -72994,7 +73002,7 @@ ${style2}
|
|
|
72994
73002
|
const lineHeight2 = useToolbarItem({
|
|
72995
73003
|
type: "dropdown",
|
|
72996
73004
|
name: "lineHeight",
|
|
72997
|
-
tooltip:
|
|
73005
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
72998
73006
|
icon: toolbarIcons2.lineHeight,
|
|
72999
73007
|
hasCaret: false,
|
|
73000
73008
|
hasInlineTextInput: false,
|
|
@@ -73256,6 +73264,56 @@ ${style2}
|
|
|
73256
73264
|
}
|
|
73257
73265
|
);
|
|
73258
73266
|
};
|
|
73267
|
+
const toolbarTexts = {
|
|
73268
|
+
bold: "Bold",
|
|
73269
|
+
fontFamily: "Font",
|
|
73270
|
+
ai: "AI text generation",
|
|
73271
|
+
fontSize: "Font size",
|
|
73272
|
+
italic: "Italic",
|
|
73273
|
+
underline: "Underline",
|
|
73274
|
+
highlight: "Highlight color",
|
|
73275
|
+
color: "Text color",
|
|
73276
|
+
search: "Search",
|
|
73277
|
+
link: "Link",
|
|
73278
|
+
image: "Image",
|
|
73279
|
+
table: "Insert table",
|
|
73280
|
+
addRowBefore: "Insert row above",
|
|
73281
|
+
addRowAfter: "Insert row below",
|
|
73282
|
+
addColumnBefore: "Insert column left",
|
|
73283
|
+
addColumnAfter: "Insert column right",
|
|
73284
|
+
deleteRow: "Delete row",
|
|
73285
|
+
deleteColumn: "Delete column",
|
|
73286
|
+
deleteTable: "Delete table",
|
|
73287
|
+
transparentBorders: "Transparent borders",
|
|
73288
|
+
mergeCells: "Merge cells",
|
|
73289
|
+
splitCell: "Split cell",
|
|
73290
|
+
fixTables: "Fix tables",
|
|
73291
|
+
textAlign: "Alignment",
|
|
73292
|
+
bulletList: "Bullet list",
|
|
73293
|
+
numberedList: "Numbered list",
|
|
73294
|
+
indentLeft: "Left indent",
|
|
73295
|
+
indentRight: "Right indent",
|
|
73296
|
+
zoom: "Zoom",
|
|
73297
|
+
undo: "Undo",
|
|
73298
|
+
redo: "Redo",
|
|
73299
|
+
trackChanges: "Track Changes",
|
|
73300
|
+
trackChangesAccept: "Accept changes under selection",
|
|
73301
|
+
trackChangesReject: "Reject changes under selection",
|
|
73302
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
73303
|
+
trackChangesFinal: "Toggle Show Final",
|
|
73304
|
+
clearFormatting: "Clear formatting",
|
|
73305
|
+
copyFormat: "Format painter",
|
|
73306
|
+
lineHeight: "Line height",
|
|
73307
|
+
formatText: "Format text",
|
|
73308
|
+
ruler: "Show or hide ruler",
|
|
73309
|
+
pageBreak: "Insert page break",
|
|
73310
|
+
documentEditingMode: "Editing",
|
|
73311
|
+
documentSuggestingMode: "Suggesting",
|
|
73312
|
+
documentViewingMode: "Viewing",
|
|
73313
|
+
documentEditingModeDescription: "Edit document directly",
|
|
73314
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
73315
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
73316
|
+
};
|
|
73259
73317
|
class SuperToolbar extends EventEmitter$1 {
|
|
73260
73318
|
/**
|
|
73261
73319
|
* Creates a new SuperToolbar instance
|
|
@@ -73271,6 +73329,7 @@ ${style2}
|
|
|
73271
73329
|
role: "editor",
|
|
73272
73330
|
pagination: false,
|
|
73273
73331
|
icons: { ...toolbarIcons },
|
|
73332
|
+
texts: { ...toolbarTexts },
|
|
73274
73333
|
fonts: null,
|
|
73275
73334
|
hideButtons: true,
|
|
73276
73335
|
responsiveToContainer: false,
|
|
@@ -73534,6 +73593,7 @@ ${style2}
|
|
|
73534
73593
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73535
73594
|
superToolbar: this,
|
|
73536
73595
|
icons: this.config.icons,
|
|
73596
|
+
texts: this.config.texts,
|
|
73537
73597
|
fonts: this.config.fonts,
|
|
73538
73598
|
hideButtons: this.config.hideButtons,
|
|
73539
73599
|
isDev: this.isDev
|
|
@@ -73557,6 +73617,10 @@ ${style2}
|
|
|
73557
73617
|
...toolbarIcons,
|
|
73558
73618
|
...config.icons
|
|
73559
73619
|
};
|
|
73620
|
+
this.config.texts = {
|
|
73621
|
+
...toolbarTexts,
|
|
73622
|
+
...config.texts
|
|
73623
|
+
};
|
|
73560
73624
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
73561
73625
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
73562
73626
|
if (!this.config.selector && this.config.element) {
|
|
@@ -73570,6 +73634,7 @@ ${style2}
|
|
|
73570
73634
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
73571
73635
|
superToolbar: this,
|
|
73572
73636
|
icons: this.config.icons,
|
|
73637
|
+
texts: this.config.texts,
|
|
73573
73638
|
fonts: this.config.fonts,
|
|
73574
73639
|
hideButtons: this.config.hideButtons,
|
|
73575
73640
|
isDev: config.isDev
|
|
@@ -73746,6 +73811,7 @@ ${style2}
|
|
|
73746
73811
|
makeToolbarItems_fn = function({
|
|
73747
73812
|
superToolbar,
|
|
73748
73813
|
icons: icons2,
|
|
73814
|
+
texts,
|
|
73749
73815
|
fonts,
|
|
73750
73816
|
hideButtons,
|
|
73751
73817
|
isDev = false
|
|
@@ -73756,6 +73822,7 @@ ${style2}
|
|
|
73756
73822
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
73757
73823
|
superToolbar,
|
|
73758
73824
|
toolbarIcons: icons2,
|
|
73825
|
+
toolbarTexts: texts,
|
|
73759
73826
|
toolbarFonts: fonts,
|
|
73760
73827
|
hideButtons,
|
|
73761
73828
|
availableWidth,
|
|
@@ -89358,6 +89425,7 @@ ${style2}
|
|
|
89358
89425
|
// Optional DOM element to render the toolbar in
|
|
89359
89426
|
toolbarGroups: ["left", "center", "right"],
|
|
89360
89427
|
toolbarIcons: {},
|
|
89428
|
+
toolbarTexts: {},
|
|
89361
89429
|
isDev: false,
|
|
89362
89430
|
// telemetry config
|
|
89363
89431
|
telemetry: null,
|
|
@@ -89396,7 +89464,7 @@ ${style2}
|
|
|
89396
89464
|
this.config.colors = shuffleArray(this.config.colors);
|
|
89397
89465
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
89398
89466
|
this.colorIndex = 0;
|
|
89399
|
-
this.version = "0.12.
|
|
89467
|
+
this.version = "0.12.20";
|
|
89400
89468
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
89401
89469
|
this.superdocId = config.superdocId || v4();
|
|
89402
89470
|
this.colors = this.config.colors;
|
|
@@ -89627,6 +89695,7 @@ ${style2}
|
|
|
89627
89695
|
role: this.config.role,
|
|
89628
89696
|
pagination: this.config.pagination,
|
|
89629
89697
|
icons: this.config.modules?.toolbar?.icons || this.config.toolbarIcons,
|
|
89698
|
+
texts: this.config.modules?.toolbar?.texts || this.config.toolbarTexts,
|
|
89630
89699
|
fonts: this.config.modules?.toolbar?.fonts || null,
|
|
89631
89700
|
hideButtons: this.config.modules?.toolbar?.hideButtons ?? true,
|
|
89632
89701
|
responsiveToContainer: this.config.modules?.toolbar?.responsiveToContainer ?? false,
|