@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
|
@@ -23304,7 +23304,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23304
23304
|
return;
|
|
23305
23305
|
}
|
|
23306
23306
|
}
|
|
23307
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
23307
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.19") {
|
|
23308
23308
|
const customLocation = "docProps/custom.xml";
|
|
23309
23309
|
if (!docx[customLocation]) {
|
|
23310
23310
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23770,7 +23770,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23770
23770
|
function generateCustomXml() {
|
|
23771
23771
|
return DEFAULT_CUSTOM_XML;
|
|
23772
23772
|
}
|
|
23773
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
23773
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.19") {
|
|
23774
23774
|
return {
|
|
23775
23775
|
type: "element",
|
|
23776
23776
|
name: "property",
|
|
@@ -40925,7 +40925,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40925
40925
|
* @returns {Object | void} Migration results
|
|
40926
40926
|
*/
|
|
40927
40927
|
processCollaborationMigrations() {
|
|
40928
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
40928
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
40929
40929
|
if (!this.options.ydoc) return;
|
|
40930
40930
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
40931
40931
|
let docVersion = metaMap.get("version");
|
|
@@ -64894,6 +64894,7 @@ const closeDropdown = (dropdown) => {
|
|
|
64894
64894
|
const makeDefaultItems = ({
|
|
64895
64895
|
superToolbar,
|
|
64896
64896
|
toolbarIcons: toolbarIcons2,
|
|
64897
|
+
toolbarTexts: toolbarTexts2,
|
|
64897
64898
|
toolbarFonts,
|
|
64898
64899
|
hideButtons,
|
|
64899
64900
|
availableWidth,
|
|
@@ -64905,12 +64906,12 @@ const makeDefaultItems = ({
|
|
|
64905
64906
|
name: "bold",
|
|
64906
64907
|
command: "toggleBold",
|
|
64907
64908
|
icon: toolbarIcons2.bold,
|
|
64908
|
-
tooltip:
|
|
64909
|
+
tooltip: toolbarTexts2.bold
|
|
64909
64910
|
});
|
|
64910
64911
|
const fontButton = useToolbarItem({
|
|
64911
64912
|
type: "dropdown",
|
|
64912
64913
|
name: "fontFamily",
|
|
64913
|
-
tooltip:
|
|
64914
|
+
tooltip: toolbarTexts2.fontFamily,
|
|
64914
64915
|
command: "setFontFamily",
|
|
64915
64916
|
defaultLabel: "Arial",
|
|
64916
64917
|
label: "Arial",
|
|
@@ -64934,7 +64935,7 @@ const makeDefaultItems = ({
|
|
|
64934
64935
|
outline: "none"
|
|
64935
64936
|
},
|
|
64936
64937
|
name: "ai",
|
|
64937
|
-
tooltip:
|
|
64938
|
+
tooltip: toolbarTexts2.ai,
|
|
64938
64939
|
icon: toolbarIcons2.ai,
|
|
64939
64940
|
hideLabel: true,
|
|
64940
64941
|
hasCaret: false,
|
|
@@ -64980,7 +64981,7 @@ const makeDefaultItems = ({
|
|
|
64980
64981
|
minWidth: "50px",
|
|
64981
64982
|
markName: "textStyle",
|
|
64982
64983
|
labelAttr: "fontSize",
|
|
64983
|
-
tooltip:
|
|
64984
|
+
tooltip: toolbarTexts2.fontSize,
|
|
64984
64985
|
hasCaret: true,
|
|
64985
64986
|
hasInlineTextInput: false,
|
|
64986
64987
|
inlineTextInputVisible: true,
|
|
@@ -65022,14 +65023,14 @@ const makeDefaultItems = ({
|
|
|
65022
65023
|
name: "italic",
|
|
65023
65024
|
command: "toggleItalic",
|
|
65024
65025
|
icon: toolbarIcons2.italic,
|
|
65025
|
-
tooltip:
|
|
65026
|
+
tooltip: toolbarTexts2.italic
|
|
65026
65027
|
});
|
|
65027
65028
|
const underline = useToolbarItem({
|
|
65028
65029
|
type: "button",
|
|
65029
65030
|
name: "underline",
|
|
65030
65031
|
command: "toggleUnderline",
|
|
65031
65032
|
icon: toolbarIcons2.underline,
|
|
65032
|
-
tooltip:
|
|
65033
|
+
tooltip: toolbarTexts2.underline
|
|
65033
65034
|
});
|
|
65034
65035
|
const highlight = useToolbarItem({
|
|
65035
65036
|
type: "dropdown",
|
|
@@ -65038,7 +65039,7 @@ const makeDefaultItems = ({
|
|
|
65038
65039
|
hideLabel: true,
|
|
65039
65040
|
markName: "highlight",
|
|
65040
65041
|
labelAttr: "color",
|
|
65041
|
-
tooltip:
|
|
65042
|
+
tooltip: toolbarTexts2.highlight,
|
|
65042
65043
|
command: "setHighlight",
|
|
65043
65044
|
noArgumentCommand: "unsetHighlight",
|
|
65044
65045
|
suppressActiveHighlight: true,
|
|
@@ -65061,7 +65062,7 @@ const makeDefaultItems = ({
|
|
|
65061
65062
|
hideLabel: true,
|
|
65062
65063
|
markName: "textStyle",
|
|
65063
65064
|
labelAttr: "color",
|
|
65064
|
-
tooltip:
|
|
65065
|
+
tooltip: toolbarTexts2.color,
|
|
65065
65066
|
command: "setColor",
|
|
65066
65067
|
suppressActiveHighlight: true,
|
|
65067
65068
|
options: [
|
|
@@ -65081,7 +65082,7 @@ const makeDefaultItems = ({
|
|
|
65081
65082
|
type: "dropdown",
|
|
65082
65083
|
name: "search",
|
|
65083
65084
|
icon: toolbarIcons2.search,
|
|
65084
|
-
tooltip:
|
|
65085
|
+
tooltip: toolbarTexts2.search,
|
|
65085
65086
|
group: "right",
|
|
65086
65087
|
inputRef: searchRef,
|
|
65087
65088
|
options: [
|
|
@@ -65108,7 +65109,7 @@ const makeDefaultItems = ({
|
|
|
65108
65109
|
name: "link",
|
|
65109
65110
|
markName: "link",
|
|
65110
65111
|
icon: toolbarIcons2.link,
|
|
65111
|
-
tooltip:
|
|
65112
|
+
tooltip: toolbarTexts2.link,
|
|
65112
65113
|
options: [
|
|
65113
65114
|
{
|
|
65114
65115
|
type: "render",
|
|
@@ -65161,7 +65162,7 @@ const makeDefaultItems = ({
|
|
|
65161
65162
|
name: "image",
|
|
65162
65163
|
command: "startImageUpload",
|
|
65163
65164
|
icon: toolbarIcons2.image,
|
|
65164
|
-
tooltip:
|
|
65165
|
+
tooltip: toolbarTexts2.image,
|
|
65165
65166
|
disabled: false
|
|
65166
65167
|
});
|
|
65167
65168
|
const tableItem = useToolbarItem({
|
|
@@ -65170,7 +65171,7 @@ const makeDefaultItems = ({
|
|
|
65170
65171
|
icon: toolbarIcons2.table,
|
|
65171
65172
|
hideLabel: true,
|
|
65172
65173
|
labelAttr: "table",
|
|
65173
|
-
tooltip:
|
|
65174
|
+
tooltip: toolbarTexts2.table,
|
|
65174
65175
|
command: "insertTable",
|
|
65175
65176
|
suppressActiveHighlight: true,
|
|
65176
65177
|
options: [
|
|
@@ -65208,69 +65209,69 @@ const makeDefaultItems = ({
|
|
|
65208
65209
|
});
|
|
65209
65210
|
const tableActionsOptions = [
|
|
65210
65211
|
{
|
|
65211
|
-
label:
|
|
65212
|
+
label: toolbarTexts2.addRowBefore,
|
|
65212
65213
|
command: "addRowBefore",
|
|
65213
65214
|
icon: toolbarIcons2.addRowBefore,
|
|
65214
65215
|
props: { "data-item": "btn-tableActions-option" }
|
|
65215
65216
|
},
|
|
65216
65217
|
{
|
|
65217
|
-
label:
|
|
65218
|
+
label: toolbarTexts2.addRowAfter,
|
|
65218
65219
|
command: "addRowAfter",
|
|
65219
65220
|
icon: toolbarIcons2.addRowAfter,
|
|
65220
65221
|
props: { "data-item": "btn-tableActions-option" }
|
|
65221
65222
|
},
|
|
65222
65223
|
{
|
|
65223
|
-
label:
|
|
65224
|
+
label: toolbarTexts2.addColumnBefore,
|
|
65224
65225
|
command: "addColumnBefore",
|
|
65225
65226
|
icon: toolbarIcons2.addColumnBefore,
|
|
65226
65227
|
props: { "data-item": "btn-tableActions-option" }
|
|
65227
65228
|
},
|
|
65228
65229
|
{
|
|
65229
|
-
label:
|
|
65230
|
+
label: toolbarTexts2.addColumnAfter,
|
|
65230
65231
|
command: "addColumnAfter",
|
|
65231
65232
|
icon: toolbarIcons2.addColumnAfter,
|
|
65232
65233
|
bottomBorder: true,
|
|
65233
65234
|
props: { "data-item": "btn-tableActions-option" }
|
|
65234
65235
|
},
|
|
65235
65236
|
{
|
|
65236
|
-
label:
|
|
65237
|
+
label: toolbarTexts2.deleteRow,
|
|
65237
65238
|
command: "deleteRow",
|
|
65238
65239
|
icon: toolbarIcons2.deleteRow,
|
|
65239
65240
|
props: { "data-item": "btn-tableActions-option" }
|
|
65240
65241
|
},
|
|
65241
65242
|
{
|
|
65242
|
-
label:
|
|
65243
|
+
label: toolbarTexts2.deleteColumn,
|
|
65243
65244
|
command: "deleteColumn",
|
|
65244
65245
|
icon: toolbarIcons2.deleteColumn,
|
|
65245
65246
|
props: { "data-item": "btn-tableActions-option" }
|
|
65246
65247
|
},
|
|
65247
65248
|
{
|
|
65248
|
-
label:
|
|
65249
|
+
label: toolbarTexts2.deleteTable,
|
|
65249
65250
|
command: "deleteTable",
|
|
65250
65251
|
icon: toolbarIcons2.deleteTable,
|
|
65251
65252
|
props: { "data-item": "btn-tableActions-option" }
|
|
65252
65253
|
},
|
|
65253
65254
|
{
|
|
65254
|
-
label:
|
|
65255
|
+
label: toolbarTexts2.transparentBorders,
|
|
65255
65256
|
command: "deleteCellAndTableBorders",
|
|
65256
65257
|
icon: toolbarIcons2.deleteBorders,
|
|
65257
65258
|
bottomBorder: true,
|
|
65258
65259
|
props: { "data-item": "btn-tableActions-option" }
|
|
65259
65260
|
},
|
|
65260
65261
|
{
|
|
65261
|
-
label:
|
|
65262
|
+
label: toolbarTexts2.mergeCells,
|
|
65262
65263
|
command: "mergeCells",
|
|
65263
65264
|
icon: toolbarIcons2.mergeCells,
|
|
65264
65265
|
props: { "data-item": "btn-tableActions-option" }
|
|
65265
65266
|
},
|
|
65266
65267
|
{
|
|
65267
|
-
label:
|
|
65268
|
+
label: toolbarTexts2.splitCell,
|
|
65268
65269
|
command: "splitCell",
|
|
65269
65270
|
icon: toolbarIcons2.splitCell,
|
|
65270
65271
|
props: { "data-item": "btn-tableActions-option" }
|
|
65271
65272
|
},
|
|
65272
65273
|
{
|
|
65273
|
-
label:
|
|
65274
|
+
label: toolbarTexts2.fixTables,
|
|
65274
65275
|
command: "fixTables",
|
|
65275
65276
|
icon: toolbarIcons2.fixTables,
|
|
65276
65277
|
props: { "data-item": "btn-tableActions-option" }
|
|
@@ -65289,7 +65290,7 @@ const makeDefaultItems = ({
|
|
|
65289
65290
|
const alignment2 = useToolbarItem({
|
|
65290
65291
|
type: "dropdown",
|
|
65291
65292
|
name: "textAlign",
|
|
65292
|
-
tooltip:
|
|
65293
|
+
tooltip: toolbarTexts2.textAlign,
|
|
65293
65294
|
icon: toolbarIcons2.alignLeft,
|
|
65294
65295
|
command: "setTextAlign",
|
|
65295
65296
|
hasCaret: true,
|
|
@@ -65339,21 +65340,21 @@ const makeDefaultItems = ({
|
|
|
65339
65340
|
name: "list",
|
|
65340
65341
|
command: "toggleBulletList",
|
|
65341
65342
|
icon: toolbarIcons2.bulletList,
|
|
65342
|
-
tooltip:
|
|
65343
|
+
tooltip: toolbarTexts2.bulletList
|
|
65343
65344
|
});
|
|
65344
65345
|
const numberedList = useToolbarItem({
|
|
65345
65346
|
type: "button",
|
|
65346
65347
|
name: "numberedlist",
|
|
65347
65348
|
command: "toggleOrderedList",
|
|
65348
65349
|
icon: toolbarIcons2.numberedList,
|
|
65349
|
-
tooltip:
|
|
65350
|
+
tooltip: toolbarTexts2.numberedList
|
|
65350
65351
|
});
|
|
65351
65352
|
const indentLeft = useToolbarItem({
|
|
65352
65353
|
type: "button",
|
|
65353
65354
|
name: "indentleft",
|
|
65354
65355
|
command: "decreaseTextIndent",
|
|
65355
65356
|
icon: toolbarIcons2.indentLeft,
|
|
65356
|
-
tooltip:
|
|
65357
|
+
tooltip: toolbarTexts2.indentLeft,
|
|
65357
65358
|
disabled: false
|
|
65358
65359
|
});
|
|
65359
65360
|
const indentRight = useToolbarItem({
|
|
@@ -65361,7 +65362,7 @@ const makeDefaultItems = ({
|
|
|
65361
65362
|
name: "indentright",
|
|
65362
65363
|
command: "increaseTextIndent",
|
|
65363
65364
|
icon: toolbarIcons2.indentRight,
|
|
65364
|
-
tooltip:
|
|
65365
|
+
tooltip: toolbarTexts2.indentRight,
|
|
65365
65366
|
disabled: false
|
|
65366
65367
|
});
|
|
65367
65368
|
const overflow = useToolbarItem({
|
|
@@ -65375,7 +65376,7 @@ const makeDefaultItems = ({
|
|
|
65375
65376
|
type: "dropdown",
|
|
65376
65377
|
name: "zoom",
|
|
65377
65378
|
allowWithoutEditor: true,
|
|
65378
|
-
tooltip:
|
|
65379
|
+
tooltip: toolbarTexts2.zoom,
|
|
65379
65380
|
defaultLabel: "100%",
|
|
65380
65381
|
label: "100%",
|
|
65381
65382
|
hasCaret: true,
|
|
@@ -65401,7 +65402,7 @@ const makeDefaultItems = ({
|
|
|
65401
65402
|
type: "button",
|
|
65402
65403
|
name: "undo",
|
|
65403
65404
|
disabled: true,
|
|
65404
|
-
tooltip:
|
|
65405
|
+
tooltip: toolbarTexts2.undo,
|
|
65405
65406
|
command: "undo",
|
|
65406
65407
|
icon: toolbarIcons2.undo,
|
|
65407
65408
|
group: "left",
|
|
@@ -65413,7 +65414,7 @@ const makeDefaultItems = ({
|
|
|
65413
65414
|
type: "button",
|
|
65414
65415
|
disabled: true,
|
|
65415
65416
|
name: "redo",
|
|
65416
|
-
tooltip:
|
|
65417
|
+
tooltip: toolbarTexts2.redo,
|
|
65417
65418
|
command: "redo",
|
|
65418
65419
|
icon: toolbarIcons2.redo,
|
|
65419
65420
|
group: "left",
|
|
@@ -65425,7 +65426,7 @@ const makeDefaultItems = ({
|
|
|
65425
65426
|
type: "button",
|
|
65426
65427
|
disabled: false,
|
|
65427
65428
|
name: "toggleTrackChanges",
|
|
65428
|
-
tooltip:
|
|
65429
|
+
tooltip: toolbarTexts2.trackChanges,
|
|
65429
65430
|
command: "toggleTrackChanges",
|
|
65430
65431
|
icon: toolbarIcons2.trackChanges,
|
|
65431
65432
|
group: "left"
|
|
@@ -65434,7 +65435,7 @@ const makeDefaultItems = ({
|
|
|
65434
65435
|
type: "button",
|
|
65435
65436
|
disabled: false,
|
|
65436
65437
|
name: "acceptTrackedChangeBySelection",
|
|
65437
|
-
tooltip:
|
|
65438
|
+
tooltip: toolbarTexts2.trackChangesAccept,
|
|
65438
65439
|
command: "acceptTrackedChangeBySelection",
|
|
65439
65440
|
icon: toolbarIcons2.trackChangesAccept,
|
|
65440
65441
|
group: "left"
|
|
@@ -65443,7 +65444,7 @@ const makeDefaultItems = ({
|
|
|
65443
65444
|
type: "button",
|
|
65444
65445
|
disabled: false,
|
|
65445
65446
|
name: "rejectTrackedChangeOnSelection",
|
|
65446
|
-
tooltip:
|
|
65447
|
+
tooltip: toolbarTexts2.trackChangesReject,
|
|
65447
65448
|
command: "rejectTrackedChangeOnSelection",
|
|
65448
65449
|
icon: toolbarIcons2.trackChangesReject,
|
|
65449
65450
|
group: "left"
|
|
@@ -65452,7 +65453,7 @@ const makeDefaultItems = ({
|
|
|
65452
65453
|
type: "button",
|
|
65453
65454
|
disabled: false,
|
|
65454
65455
|
name: "toggleTrackChangesShowOriginal",
|
|
65455
|
-
tooltip:
|
|
65456
|
+
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
65456
65457
|
command: "toggleTrackChangesShowOriginal",
|
|
65457
65458
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
65458
65459
|
group: "left"
|
|
@@ -65461,7 +65462,7 @@ const makeDefaultItems = ({
|
|
|
65461
65462
|
type: "button",
|
|
65462
65463
|
disabled: false,
|
|
65463
65464
|
name: "toggleTrackChangesShowFinal",
|
|
65464
|
-
tooltip:
|
|
65465
|
+
tooltip: toolbarTexts2.trackChangesFinal,
|
|
65465
65466
|
command: "toggleTrackChangesShowFinal",
|
|
65466
65467
|
icon: toolbarIcons2.trackChangesFinal,
|
|
65467
65468
|
group: "left"
|
|
@@ -65470,7 +65471,7 @@ const makeDefaultItems = ({
|
|
|
65470
65471
|
type: "button",
|
|
65471
65472
|
name: "clearFormatting",
|
|
65472
65473
|
command: "clearFormat",
|
|
65473
|
-
tooltip:
|
|
65474
|
+
tooltip: toolbarTexts2.clearFormatting,
|
|
65474
65475
|
icon: toolbarIcons2.clearFormatting
|
|
65475
65476
|
});
|
|
65476
65477
|
[
|
|
@@ -65485,7 +65486,7 @@ const makeDefaultItems = ({
|
|
|
65485
65486
|
const copyFormat = useToolbarItem({
|
|
65486
65487
|
type: "button",
|
|
65487
65488
|
name: "copyFormat",
|
|
65488
|
-
tooltip:
|
|
65489
|
+
tooltip: toolbarTexts2.copyFormat,
|
|
65489
65490
|
icon: toolbarIcons2.copyFormat,
|
|
65490
65491
|
command: "copyFormat"
|
|
65491
65492
|
});
|
|
@@ -65527,22 +65528,22 @@ const makeDefaultItems = ({
|
|
|
65527
65528
|
});
|
|
65528
65529
|
const documentOptions = [
|
|
65529
65530
|
{
|
|
65530
|
-
label:
|
|
65531
|
+
label: toolbarTexts2.documentEditingMode,
|
|
65531
65532
|
value: "editing",
|
|
65532
65533
|
icon: toolbarIcons2.documentEditingMode,
|
|
65533
|
-
description:
|
|
65534
|
+
description: toolbarTexts2.documentEditingModeDescription
|
|
65534
65535
|
},
|
|
65535
65536
|
{
|
|
65536
|
-
label:
|
|
65537
|
+
label: toolbarTexts2.documentSuggestingMode,
|
|
65537
65538
|
value: "suggesting",
|
|
65538
65539
|
icon: toolbarIcons2.documentSuggestingMode,
|
|
65539
|
-
description:
|
|
65540
|
+
description: toolbarTexts2.documentSuggestingModeDescription
|
|
65540
65541
|
},
|
|
65541
65542
|
{
|
|
65542
|
-
label:
|
|
65543
|
+
label: toolbarTexts2.documentViewingMode,
|
|
65543
65544
|
value: "viewing",
|
|
65544
65545
|
icon: toolbarIcons2.documentViewingMode,
|
|
65545
|
-
description:
|
|
65546
|
+
description: toolbarTexts2.documentViewingModeDescription
|
|
65546
65547
|
}
|
|
65547
65548
|
];
|
|
65548
65549
|
function renderDocumentMode(renderDocumentButton) {
|
|
@@ -65563,7 +65564,7 @@ const makeDefaultItems = ({
|
|
|
65563
65564
|
name: "pageBreakTool",
|
|
65564
65565
|
command: "insertPageBreak",
|
|
65565
65566
|
icon: toolbarIcons2.pageBreak,
|
|
65566
|
-
tooltip:
|
|
65567
|
+
tooltip: toolbarTexts2.pageBreak
|
|
65567
65568
|
});
|
|
65568
65569
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
65569
65570
|
["separator", 20],
|
|
@@ -65581,7 +65582,7 @@ const makeDefaultItems = ({
|
|
|
65581
65582
|
name: "ruler",
|
|
65582
65583
|
command: "toggleRuler",
|
|
65583
65584
|
icon: toolbarIcons2.ruler,
|
|
65584
|
-
tooltip:
|
|
65585
|
+
tooltip: toolbarTexts2.ruler
|
|
65585
65586
|
});
|
|
65586
65587
|
const selectedLinkedStyle = vue.ref(null);
|
|
65587
65588
|
const linkedStyles = useToolbarItem({
|
|
@@ -65589,8 +65590,8 @@ const makeDefaultItems = ({
|
|
|
65589
65590
|
name: "linkedStyles",
|
|
65590
65591
|
command: "setLinkedStyle",
|
|
65591
65592
|
icon: toolbarIcons2.paintbrush,
|
|
65592
|
-
defaultLabel:
|
|
65593
|
-
label:
|
|
65593
|
+
defaultLabel: toolbarTexts2.formatText,
|
|
65594
|
+
label: toolbarTexts2.formatText,
|
|
65594
65595
|
hasCaret: true,
|
|
65595
65596
|
isWide: true,
|
|
65596
65597
|
style: { width: "140px" },
|
|
@@ -65634,7 +65635,7 @@ const makeDefaultItems = ({
|
|
|
65634
65635
|
const lineHeight2 = useToolbarItem({
|
|
65635
65636
|
type: "dropdown",
|
|
65636
65637
|
name: "lineHeight",
|
|
65637
|
-
tooltip:
|
|
65638
|
+
tooltip: toolbarTexts2.lineHeight,
|
|
65638
65639
|
icon: toolbarIcons2.lineHeight,
|
|
65639
65640
|
hasCaret: false,
|
|
65640
65641
|
hasInlineTextInput: false,
|
|
@@ -65896,6 +65897,56 @@ const startImageUpload = async ({ editor, view, file }) => {
|
|
|
65896
65897
|
}
|
|
65897
65898
|
);
|
|
65898
65899
|
};
|
|
65900
|
+
const toolbarTexts = {
|
|
65901
|
+
bold: "Bold",
|
|
65902
|
+
fontFamily: "Font",
|
|
65903
|
+
ai: "AI text generation",
|
|
65904
|
+
fontSize: "Font size",
|
|
65905
|
+
italic: "Italic",
|
|
65906
|
+
underline: "Underline",
|
|
65907
|
+
highlight: "Highlight color",
|
|
65908
|
+
color: "Text color",
|
|
65909
|
+
search: "Search",
|
|
65910
|
+
link: "Link",
|
|
65911
|
+
image: "Image",
|
|
65912
|
+
table: "Insert table",
|
|
65913
|
+
addRowBefore: "Insert row above",
|
|
65914
|
+
addRowAfter: "Insert row below",
|
|
65915
|
+
addColumnBefore: "Insert column left",
|
|
65916
|
+
addColumnAfter: "Insert column right",
|
|
65917
|
+
deleteRow: "Delete row",
|
|
65918
|
+
deleteColumn: "Delete column",
|
|
65919
|
+
deleteTable: "Delete table",
|
|
65920
|
+
transparentBorders: "Transparent borders",
|
|
65921
|
+
mergeCells: "Merge cells",
|
|
65922
|
+
splitCell: "Split cell",
|
|
65923
|
+
fixTables: "Fix tables",
|
|
65924
|
+
textAlign: "Alignment",
|
|
65925
|
+
bulletList: "Bullet list",
|
|
65926
|
+
numberedList: "Numbered list",
|
|
65927
|
+
indentLeft: "Left indent",
|
|
65928
|
+
indentRight: "Right indent",
|
|
65929
|
+
zoom: "Zoom",
|
|
65930
|
+
undo: "Undo",
|
|
65931
|
+
redo: "Redo",
|
|
65932
|
+
trackChanges: "Track Changes",
|
|
65933
|
+
trackChangesAccept: "Accept changes under selection",
|
|
65934
|
+
trackChangesReject: "Reject changes under selection",
|
|
65935
|
+
trackChangesOriginal: "Toggle Show Original",
|
|
65936
|
+
trackChangesFinal: "Toggle Show Final",
|
|
65937
|
+
clearFormatting: "Clear formatting",
|
|
65938
|
+
copyFormat: "Format painter",
|
|
65939
|
+
lineHeight: "Line height",
|
|
65940
|
+
formatText: "Format text",
|
|
65941
|
+
ruler: "Show or hide ruler",
|
|
65942
|
+
pageBreak: "Insert page break",
|
|
65943
|
+
documentEditingMode: "Editing",
|
|
65944
|
+
documentSuggestingMode: "Suggesting",
|
|
65945
|
+
documentViewingMode: "Viewing",
|
|
65946
|
+
documentEditingModeDescription: "Edit document directly",
|
|
65947
|
+
documentSuggestingModeDescription: "Edits become suggestions",
|
|
65948
|
+
documentViewingModeDescription: "View clean version of document only"
|
|
65949
|
+
};
|
|
65899
65950
|
class SuperToolbar extends EventEmitter2 {
|
|
65900
65951
|
/**
|
|
65901
65952
|
* Creates a new SuperToolbar instance
|
|
@@ -65911,6 +65962,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
65911
65962
|
role: "editor",
|
|
65912
65963
|
pagination: false,
|
|
65913
65964
|
icons: { ...toolbarIcons },
|
|
65965
|
+
texts: { ...toolbarTexts },
|
|
65914
65966
|
fonts: null,
|
|
65915
65967
|
hideButtons: true,
|
|
65916
65968
|
responsiveToContainer: false,
|
|
@@ -66174,6 +66226,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66174
66226
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66175
66227
|
superToolbar: this,
|
|
66176
66228
|
icons: this.config.icons,
|
|
66229
|
+
texts: this.config.texts,
|
|
66177
66230
|
fonts: this.config.fonts,
|
|
66178
66231
|
hideButtons: this.config.hideButtons,
|
|
66179
66232
|
isDev: this.isDev
|
|
@@ -66197,6 +66250,10 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66197
66250
|
...toolbarIcons,
|
|
66198
66251
|
...config.icons
|
|
66199
66252
|
};
|
|
66253
|
+
this.config.texts = {
|
|
66254
|
+
...toolbarTexts,
|
|
66255
|
+
...config.texts
|
|
66256
|
+
};
|
|
66200
66257
|
this.config.hideButtons = config.hideButtons ?? true;
|
|
66201
66258
|
this.config.responsiveToContainer = config.responsiveToContainer ?? false;
|
|
66202
66259
|
if (!this.config.selector && this.config.element) {
|
|
@@ -66210,6 +66267,7 @@ class SuperToolbar extends EventEmitter2 {
|
|
|
66210
66267
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
66211
66268
|
superToolbar: this,
|
|
66212
66269
|
icons: this.config.icons,
|
|
66270
|
+
texts: this.config.texts,
|
|
66213
66271
|
fonts: this.config.fonts,
|
|
66214
66272
|
hideButtons: this.config.hideButtons,
|
|
66215
66273
|
isDev: config.isDev
|
|
@@ -66386,6 +66444,7 @@ _interceptedCommands = /* @__PURE__ */ new WeakMap();
|
|
|
66386
66444
|
makeToolbarItems_fn = function({
|
|
66387
66445
|
superToolbar,
|
|
66388
66446
|
icons: icons2,
|
|
66447
|
+
texts,
|
|
66389
66448
|
fonts,
|
|
66390
66449
|
hideButtons,
|
|
66391
66450
|
isDev = false
|
|
@@ -66396,6 +66455,7 @@ makeToolbarItems_fn = function({
|
|
|
66396
66455
|
const { defaultItems, overflowItems } = makeDefaultItems({
|
|
66397
66456
|
superToolbar,
|
|
66398
66457
|
toolbarIcons: icons2,
|
|
66458
|
+
toolbarTexts: texts,
|
|
66399
66459
|
toolbarFonts: fonts,
|
|
66400
66460
|
hideButtons,
|
|
66401
66461
|
availableWidth,
|
package/dist/core/SuperDoc.d.ts
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
* @property {string} [toolbar] Optional DOM element to render the toolbar in
|
|
55
55
|
* @property {Array<string>} [toolbarGroups] Toolbar groups to show
|
|
56
56
|
* @property {Object} [toolbarIcons] Icons to show in the toolbar
|
|
57
|
+
* @property {Object} [toolbarTexts] Texts to override in the toolbar
|
|
57
58
|
* @property {boolean} [isDev] Whether the SuperDoc is in development mode
|
|
58
59
|
* @property {TelemetryConfig} [telemetry] Telemetry configuration
|
|
59
60
|
* @property {(editor: Editor) => void} [onEditorBeforeCreate] Callback before an editor is created
|
|
@@ -461,6 +462,10 @@ export type Config = {
|
|
|
461
462
|
* Icons to show in the toolbar
|
|
462
463
|
*/
|
|
463
464
|
toolbarIcons?: any;
|
|
465
|
+
/**
|
|
466
|
+
* Texts to override in the toolbar
|
|
467
|
+
*/
|
|
468
|
+
toolbarTexts?: any;
|
|
464
469
|
/**
|
|
465
470
|
* Whether the SuperDoc is in development mode
|
|
466
471
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH
|
|
1
|
+
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,CAAC,CACgB;IAsExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IA1ED,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qBAAqB;IACrB,OADW,IAAI,EAAE,CACX;IAEN,4CAA4C;IAC5C,MADW,OAAO,KAAK,EAAE,GAAG,GAAG,SAAS,CACnC;IAEL,4EAA4E;IAC5E,UADW,OAAO,sBAAsB,EAAE,kBAAkB,GAAG,SAAS,CAC/D;IAET,qBAAqB;IACrB,QADW,MAAM,CAsDf;IAiBA,4BAA6B;IAC7B,mBAAmB;IAMnB,gBAA+C;IAC/C,iBAAgC;IAYhC,WAA4B;IAE5B,YAAkB;IAElB,eAAuC;IAEvC,iEAAwB;IACxB,gBAAkB;IAKlB,qBAAqB;IAErB,kBAA6C;IAC7C,eAA4C;IAM9C;;;OAGG;IACH,+BAFa,MAAM,CAIlB;IAED;;;MAKC;IAqCC,SAAc;IACd,WAAkB;IAK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;;;aAC3B,OAAO;;;;gCACP,OAAO;;;;mBACP,OAAO;;6BAxGQ,eAAe;0BASlB,0CAA0C;6BAJ5B,mCAAmC;8BAC7C,iEAAiE;4CAJnD,sBAAsB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-DhgEAlTO.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-BfaGq_P9.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -23306,7 +23306,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
23306
23306
|
return;
|
|
23307
23307
|
}
|
|
23308
23308
|
}
|
|
23309
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.
|
|
23309
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.12.19") {
|
|
23310
23310
|
const customLocation = "docProps/custom.xml";
|
|
23311
23311
|
if (!docx[customLocation]) {
|
|
23312
23312
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23775,7 +23775,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23775
23775
|
function generateCustomXml() {
|
|
23776
23776
|
return DEFAULT_CUSTOM_XML;
|
|
23777
23777
|
}
|
|
23778
|
-
function generateSuperdocVersion(pid = 2, version = "0.12.
|
|
23778
|
+
function generateSuperdocVersion(pid = 2, version = "0.12.19") {
|
|
23779
23779
|
return {
|
|
23780
23780
|
type: "element",
|
|
23781
23781
|
name: "property",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-
|
|
1
|
+
import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-DhgEAlTO.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-DhgEAlTO.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-BSaSIAeQ.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -14677,7 +14677,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14677
14677
|
* @returns {Object | void} Migration results
|
|
14678
14678
|
*/
|
|
14679
14679
|
processCollaborationMigrations() {
|
|
14680
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
14680
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
14681
14681
|
if (!this.options.ydoc) return;
|
|
14682
14682
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14683
14683
|
let docVersion = metaMap.get("version");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, unref, createBlock, toDisplayString, withDirectives, withKeys, withModifiers, vModelText, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { x as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, g as global$1 } from "./editor-
|
|
2
|
+
import { x as process$1 } from "./converter-DhgEAlTO.js";
|
|
3
|
+
import { _ as _export_sfc, g as global$1 } from "./editor-BfaGq_P9.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeDefaultItems({ superToolbar, toolbarIcons, toolbarFonts, hideButtons, availableWidth, role, isDev, }?: {
|
|
1
|
+
export function makeDefaultItems({ superToolbar, toolbarIcons, toolbarTexts, toolbarFonts, hideButtons, availableWidth, role, isDev, }?: {
|
|
2
2
|
isDev?: boolean;
|
|
3
3
|
}): {
|
|
4
4
|
defaultItems: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultItems.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/defaultItems.js"],"names":[],"mappings":"AAuBO;;;;;
|
|
1
|
+
{"version":3,"file":"defaultItems.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/defaultItems.js"],"names":[],"mappings":"AAuBO;;;;;EAq/BN;AAEM,sEAEJ;;;CAAuB,UASvB"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @property {string} [role='editor'] - Role of the toolbar ('editor' or 'viewer')
|
|
6
6
|
* @property {boolean} [pagination=false] - Whether pagination is enabled
|
|
7
7
|
* @property {Object} [icons] - Custom icons for toolbar items
|
|
8
|
+
* @property {Object} [texts] - Custom texts for toolbar items
|
|
8
9
|
* @property {string} [mode='docx'] - Editor mode
|
|
9
10
|
* @property {string[]} [excludeItems=[]] - Items to exclude from the toolbar
|
|
10
11
|
* @property {Object} [groups=null] - Custom groups configuration
|
|
@@ -210,6 +211,10 @@ export type ToolbarConfig = {
|
|
|
210
211
|
* - Custom icons for toolbar items
|
|
211
212
|
*/
|
|
212
213
|
icons?: any;
|
|
214
|
+
/**
|
|
215
|
+
* - Custom texts for toolbar items
|
|
216
|
+
*/
|
|
217
|
+
texts?: any;
|
|
213
218
|
/**
|
|
214
219
|
* - Editor mode
|
|
215
220
|
*/
|