@harbour-enterprises/superdoc 0.12.17 → 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-C5seifML.es.js → super-editor.es-C_GbwRpZ.es.js} +116 -54
- package/dist/chunks/{super-editor.es-bzN38eJ6.cjs → super-editor.es-DmWvNj76.cjs} +116 -54
- package/dist/core/SuperDoc.d.ts +15 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/style.css +28 -28
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-DOKQJqK4.js → converter-DhgEAlTO.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CeXxI7BH.js → docx-zipper-BSaSIAeQ.js} +1 -1
- package/dist/super-editor/chunks/{editor-BDrgQZvS.js → editor-BfaGq_P9.js} +7 -5
- package/dist/super-editor/chunks/{toolbar-Syznaamh.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/core/Editor.d.ts +10 -4
- package/dist/super-editor/core/Editor.d.ts.map +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 +7 -4
- package/dist/superdoc.es.js +8 -5
- package/dist/superdoc.umd.js +122 -57
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -4306,48 +4306,48 @@ img[data-v-7dd69850] {
|
|
|
4306
4306
|
box-shadow:0 0 5px hsla( 0,0%,0%,.05);
|
|
4307
4307
|
}
|
|
4308
4308
|
|
|
4309
|
-
.superdoc[data-v-
|
|
4309
|
+
.superdoc[data-v-e620aa2b] {
|
|
4310
4310
|
display: flex;
|
|
4311
4311
|
}
|
|
4312
|
-
.right-sidebar[data-v-
|
|
4312
|
+
.right-sidebar[data-v-e620aa2b] {
|
|
4313
4313
|
min-width: 320px;
|
|
4314
4314
|
}
|
|
4315
|
-
.floating-comments[data-v-
|
|
4315
|
+
.floating-comments[data-v-e620aa2b] {
|
|
4316
4316
|
min-width: 300px;
|
|
4317
4317
|
width: 300px;
|
|
4318
4318
|
}
|
|
4319
|
-
.superdoc--with-sidebar[data-v-
|
|
4319
|
+
.superdoc--with-sidebar[data-v-e620aa2b] { /* */
|
|
4320
4320
|
}
|
|
4321
|
-
.superdoc__layers[data-v-
|
|
4321
|
+
.superdoc__layers[data-v-e620aa2b] {
|
|
4322
4322
|
height: 100%;
|
|
4323
4323
|
position: relative;
|
|
4324
4324
|
box-sizing: border-box;
|
|
4325
4325
|
}
|
|
4326
|
-
.superdoc__document[data-v-
|
|
4326
|
+
.superdoc__document[data-v-e620aa2b] {
|
|
4327
4327
|
width: 100%;
|
|
4328
4328
|
position: relative;
|
|
4329
4329
|
}
|
|
4330
|
-
.superdoc__sub-document[data-v-
|
|
4330
|
+
.superdoc__sub-document[data-v-e620aa2b] {
|
|
4331
4331
|
width: 100%;
|
|
4332
4332
|
position: relative;
|
|
4333
4333
|
}
|
|
4334
|
-
.superdoc__selection-layer[data-v-
|
|
4334
|
+
.superdoc__selection-layer[data-v-e620aa2b] {
|
|
4335
4335
|
position: absolute;
|
|
4336
4336
|
min-width: 100%;
|
|
4337
4337
|
min-height: 100%;
|
|
4338
4338
|
z-index: 10;
|
|
4339
4339
|
pointer-events: none;
|
|
4340
4340
|
}
|
|
4341
|
-
.superdoc__temp-selection[data-v-
|
|
4341
|
+
.superdoc__temp-selection[data-v-e620aa2b] {
|
|
4342
4342
|
position: absolute;
|
|
4343
4343
|
}
|
|
4344
|
-
.superdoc__comments-layer[data-v-
|
|
4344
|
+
.superdoc__comments-layer[data-v-e620aa2b] {
|
|
4345
4345
|
/* position: absolute; */
|
|
4346
4346
|
top: 0;
|
|
4347
4347
|
height: 100%;
|
|
4348
4348
|
position: relative;
|
|
4349
4349
|
}
|
|
4350
|
-
.superdoc__right-sidebar[data-v-
|
|
4350
|
+
.superdoc__right-sidebar[data-v-e620aa2b] {
|
|
4351
4351
|
width: 320px;
|
|
4352
4352
|
min-width: 320px;
|
|
4353
4353
|
padding: 0 10px;
|
|
@@ -4357,14 +4357,14 @@ img[data-v-7dd69850] {
|
|
|
4357
4357
|
}
|
|
4358
4358
|
|
|
4359
4359
|
/* Tools styles */
|
|
4360
|
-
.tools[data-v-
|
|
4360
|
+
.tools[data-v-e620aa2b] {
|
|
4361
4361
|
position: absolute;
|
|
4362
4362
|
z-index: 3;
|
|
4363
4363
|
display: flex;
|
|
4364
4364
|
flex-direction: column;
|
|
4365
4365
|
gap: 6px;
|
|
4366
4366
|
}
|
|
4367
|
-
.tools .tool-icon[data-v-
|
|
4367
|
+
.tools .tool-icon[data-v-e620aa2b] {
|
|
4368
4368
|
font-size: 20px;
|
|
4369
4369
|
border-radius: 12px;
|
|
4370
4370
|
border: none;
|
|
@@ -4372,7 +4372,7 @@ img[data-v-7dd69850] {
|
|
|
4372
4372
|
background-color: #dbdbdb;
|
|
4373
4373
|
cursor: pointer;
|
|
4374
4374
|
}
|
|
4375
|
-
.tools-item[data-v-
|
|
4375
|
+
.tools-item[data-v-e620aa2b] {
|
|
4376
4376
|
display: flex;
|
|
4377
4377
|
align-items: center;
|
|
4378
4378
|
justify-content: center;
|
|
@@ -4382,10 +4382,10 @@ img[data-v-7dd69850] {
|
|
|
4382
4382
|
border-radius: 12px;
|
|
4383
4383
|
cursor: pointer;
|
|
4384
4384
|
}
|
|
4385
|
-
.tools-item i[data-v-
|
|
4385
|
+
.tools-item i[data-v-e620aa2b] {
|
|
4386
4386
|
cursor: pointer;
|
|
4387
4387
|
}
|
|
4388
|
-
.superdoc__tools-icon[data-v-
|
|
4388
|
+
.superdoc__tools-icon[data-v-e620aa2b] {
|
|
4389
4389
|
width: 20px;
|
|
4390
4390
|
height: 20px;
|
|
4391
4391
|
flex-shrink: 0;
|
|
@@ -4399,15 +4399,15 @@ img[data-v-7dd69850] {
|
|
|
4399
4399
|
|
|
4400
4400
|
/* 834px is iPad screen size in portrait orientation */
|
|
4401
4401
|
@media (max-width: 834px) {
|
|
4402
|
-
.superdoc .superdoc__layers[data-v-
|
|
4402
|
+
.superdoc .superdoc__layers[data-v-e620aa2b] {
|
|
4403
4403
|
margin: 0;
|
|
4404
4404
|
border: 0 !important;
|
|
4405
4405
|
box-shadow: none;
|
|
4406
4406
|
}
|
|
4407
|
-
.superdoc__sub-document[data-v-
|
|
4407
|
+
.superdoc__sub-document[data-v-e620aa2b] {
|
|
4408
4408
|
max-width: 100%;
|
|
4409
4409
|
}
|
|
4410
|
-
.superdoc__right-sidebar[data-v-
|
|
4410
|
+
.superdoc__right-sidebar[data-v-e620aa2b] {
|
|
4411
4411
|
padding: 10px;
|
|
4412
4412
|
width: 55px;
|
|
4413
4413
|
position: relative;
|
|
@@ -4415,7 +4415,7 @@ img[data-v-7dd69850] {
|
|
|
4415
4415
|
}
|
|
4416
4416
|
|
|
4417
4417
|
/* AI Writer styles */
|
|
4418
|
-
.ai-writer-container[data-v-
|
|
4418
|
+
.ai-writer-container[data-v-e620aa2b] {
|
|
4419
4419
|
position: fixed;
|
|
4420
4420
|
z-index: 1000;
|
|
4421
4421
|
background: white;
|
|
@@ -4433,13 +4433,13 @@ img[data-v-7dd69850] {
|
|
|
4433
4433
|
} */
|
|
4434
4434
|
|
|
4435
4435
|
/* Tools styles */
|
|
4436
|
-
.tools[data-v-
|
|
4436
|
+
.tools[data-v-e620aa2b] {
|
|
4437
4437
|
position: absolute;
|
|
4438
4438
|
z-index: 3;
|
|
4439
4439
|
display: flex;
|
|
4440
4440
|
gap: 6px;
|
|
4441
4441
|
}
|
|
4442
|
-
.tools .tool-icon[data-v-
|
|
4442
|
+
.tools .tool-icon[data-v-e620aa2b] {
|
|
4443
4443
|
font-size: 20px;
|
|
4444
4444
|
border-radius: 12px;
|
|
4445
4445
|
border: none;
|
|
@@ -4447,7 +4447,7 @@ img[data-v-7dd69850] {
|
|
|
4447
4447
|
background-color: #dbdbdb;
|
|
4448
4448
|
cursor: pointer;
|
|
4449
4449
|
}
|
|
4450
|
-
.tools-item[data-v-
|
|
4450
|
+
.tools-item[data-v-e620aa2b] {
|
|
4451
4451
|
display: flex;
|
|
4452
4452
|
align-items: center;
|
|
4453
4453
|
justify-content: center;
|
|
@@ -4458,18 +4458,18 @@ img[data-v-7dd69850] {
|
|
|
4458
4458
|
border-radius: 12px;
|
|
4459
4459
|
cursor: pointer;
|
|
4460
4460
|
}
|
|
4461
|
-
.tools-item i[data-v-
|
|
4461
|
+
.tools-item i[data-v-e620aa2b] {
|
|
4462
4462
|
cursor: pointer;
|
|
4463
4463
|
}
|
|
4464
|
-
.superdoc__tools-icon[data-v-
|
|
4464
|
+
.superdoc__tools-icon[data-v-e620aa2b] {
|
|
4465
4465
|
width: 20px;
|
|
4466
4466
|
height: 20px;
|
|
4467
4467
|
flex-shrink: 0;
|
|
4468
4468
|
}
|
|
4469
|
-
.ai-tool > svg[data-v-
|
|
4469
|
+
.ai-tool > svg[data-v-e620aa2b] {
|
|
4470
4470
|
fill: transparent;
|
|
4471
4471
|
}
|
|
4472
|
-
.ai-tool[data-v-
|
|
4472
|
+
.ai-tool[data-v-e620aa2b]::before {
|
|
4473
4473
|
content: "";
|
|
4474
4474
|
position: absolute;
|
|
4475
4475
|
width: 20px;
|
|
@@ -4488,7 +4488,7 @@ img[data-v-7dd69850] {
|
|
|
4488
4488
|
filter: brightness(1.2);
|
|
4489
4489
|
transition: filter 0.2s ease;
|
|
4490
4490
|
}
|
|
4491
|
-
.ai-tool[data-v-
|
|
4491
|
+
.ai-tool[data-v-e620aa2b]:hover::before {
|
|
4492
4492
|
filter: brightness(1.3);
|
|
4493
4493
|
}
|
|
4494
4494
|
/* Tools styles - end */
|
|
@@ -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 = [];
|
|
@@ -14090,7 +14090,8 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14090
14090
|
numbering: {},
|
|
14091
14091
|
isHeaderOrFooter: false,
|
|
14092
14092
|
lastSelection: null,
|
|
14093
|
-
|
|
14093
|
+
suppressDefaultDocxStyles: false,
|
|
14094
|
+
jsonOverride: false,
|
|
14094
14095
|
onBeforeCreate: () => null,
|
|
14095
14096
|
onCreate: () => null,
|
|
14096
14097
|
onUpdate: () => null,
|
|
@@ -14419,7 +14420,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14419
14420
|
* @returns {void}
|
|
14420
14421
|
*/
|
|
14421
14422
|
initDefaultStyles(element = this.element) {
|
|
14422
|
-
if (this.options.isHeadless || this.options.
|
|
14423
|
+
if (this.options.isHeadless || this.options.suppressDefaultDocxStyles) return;
|
|
14423
14424
|
const proseMirror = element?.querySelector(".ProseMirror");
|
|
14424
14425
|
const { pageSize, pageMargins } = this.converter.pageStyles ?? {};
|
|
14425
14426
|
if (!proseMirror || !pageSize || !pageMargins) {
|
|
@@ -14676,7 +14677,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
14676
14677
|
* @returns {Object | void} Migration results
|
|
14677
14678
|
*/
|
|
14678
14679
|
processCollaborationMigrations() {
|
|
14679
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
14680
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.19");
|
|
14680
14681
|
if (!this.options.ydoc) return;
|
|
14681
14682
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
14682
14683
|
let docVersion = metaMap.get("version");
|
|
@@ -15078,6 +15079,7 @@ generatePmData_fn = function() {
|
|
|
15078
15079
|
doc2 = createDocument(this.converter, this.schema, this);
|
|
15079
15080
|
doc2 = __privateMethod(this, _Editor_instances, prepareDocumentForImport_fn).call(this, doc2);
|
|
15080
15081
|
if (this.options.html) doc2 = __privateMethod(this, _Editor_instances, createDocFromHTML_fn).call(this, this.options.html);
|
|
15082
|
+
else if (this.options.jsonOverride) doc2 = this.schema.nodeFromJSON(this.options.jsonOverride);
|
|
15081
15083
|
if (fragment) doc2 = yXmlFragmentToProseMirrorRootNode(fragment, this.schema);
|
|
15082
15084
|
}
|
|
15083
15085
|
} else if (mode === "text" || mode === "html") {
|
|
@@ -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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;UAWW,WAAW;;;;eACX,GAAC;;6BArHc,eAAe"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export namespace toolbarTexts {
|
|
2
|
+
let bold: string;
|
|
3
|
+
let fontFamily: string;
|
|
4
|
+
let ai: string;
|
|
5
|
+
let fontSize: string;
|
|
6
|
+
let italic: string;
|
|
7
|
+
let underline: string;
|
|
8
|
+
let highlight: string;
|
|
9
|
+
let color: string;
|
|
10
|
+
let search: string;
|
|
11
|
+
let link: string;
|
|
12
|
+
let image: string;
|
|
13
|
+
let table: string;
|
|
14
|
+
let addRowBefore: string;
|
|
15
|
+
let addRowAfter: string;
|
|
16
|
+
let addColumnBefore: string;
|
|
17
|
+
let addColumnAfter: string;
|
|
18
|
+
let deleteRow: string;
|
|
19
|
+
let deleteColumn: string;
|
|
20
|
+
let deleteTable: string;
|
|
21
|
+
let transparentBorders: string;
|
|
22
|
+
let mergeCells: string;
|
|
23
|
+
let splitCell: string;
|
|
24
|
+
let fixTables: string;
|
|
25
|
+
let textAlign: string;
|
|
26
|
+
let bulletList: string;
|
|
27
|
+
let numberedList: string;
|
|
28
|
+
let indentLeft: string;
|
|
29
|
+
let indentRight: string;
|
|
30
|
+
let zoom: string;
|
|
31
|
+
let undo: string;
|
|
32
|
+
let redo: string;
|
|
33
|
+
let trackChanges: string;
|
|
34
|
+
let trackChangesAccept: string;
|
|
35
|
+
let trackChangesReject: string;
|
|
36
|
+
let trackChangesOriginal: string;
|
|
37
|
+
let trackChangesFinal: string;
|
|
38
|
+
let clearFormatting: string;
|
|
39
|
+
let copyFormat: string;
|
|
40
|
+
let lineHeight: string;
|
|
41
|
+
let formatText: string;
|
|
42
|
+
let ruler: string;
|
|
43
|
+
let pageBreak: string;
|
|
44
|
+
let documentEditingMode: string;
|
|
45
|
+
let documentSuggestingMode: string;
|
|
46
|
+
let documentViewingMode: string;
|
|
47
|
+
let documentEditingModeDescription: string;
|
|
48
|
+
let documentSuggestingModeDescription: string;
|
|
49
|
+
let documentViewingModeDescription: string;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=toolbarTexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbarTexts.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/toolbarTexts.js"],"names":[],"mappings":""}
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
* @property {Function} [onException] - Called when an exception occurs
|
|
72
72
|
* @property {Function} [handleImageUpload] - Handler for image uploads
|
|
73
73
|
* @property {Object} [telemetry] - Telemetry configuration
|
|
74
|
-
* @property {boolean} [
|
|
74
|
+
* @property {boolean} [suppressDefaultDocxStyles] - Prevent default styles from being applied in docx mode
|
|
75
|
+
* @property {boolean} [jsonOverride] - Whether to override content with provided json
|
|
75
76
|
* @property {string} [html] - HTML content to initialize the editor with
|
|
76
77
|
*/
|
|
77
78
|
/**
|
|
@@ -182,7 +183,8 @@ export class Editor extends EventEmitter {
|
|
|
182
183
|
numbering: {};
|
|
183
184
|
isHeaderOrFooter: boolean;
|
|
184
185
|
lastSelection: any;
|
|
185
|
-
|
|
186
|
+
suppressDefaultDocxStyles: boolean;
|
|
187
|
+
jsonOverride: boolean;
|
|
186
188
|
onBeforeCreate: () => any;
|
|
187
189
|
onCreate: () => any;
|
|
188
190
|
onUpdate: () => any;
|
|
@@ -723,9 +725,13 @@ export type EditorOptions = {
|
|
|
723
725
|
*/
|
|
724
726
|
telemetry?: any;
|
|
725
727
|
/**
|
|
726
|
-
* -
|
|
728
|
+
* - Prevent default styles from being applied in docx mode
|
|
727
729
|
*/
|
|
728
|
-
|
|
730
|
+
suppressDefaultDocxStyles?: boolean;
|
|
731
|
+
/**
|
|
732
|
+
* - Whether to override content with provided json
|
|
733
|
+
*/
|
|
734
|
+
jsonOverride?: boolean;
|
|
729
735
|
/**
|
|
730
736
|
* - HTML content to initialize the editor with
|
|
731
737
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/core/Editor.js"],"names":[],"mappings":"AA6BA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;;;EAKE;AACF
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/core/Editor.js"],"names":[],"mappings":"AA6BA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH;;;;GAIG;AACH;IAqqBE;;;;;;;;;;;;OAYG;IACH,+BARW,IAAI,GAAC,IAAI,GAAC,MAAM,WAChB,OAAO,GACL,OAAO,OAAO,CAc1B;IAED;;;;;OAKG;IACH,qCAFa,MAAM,CAKlB;IAED;;;;;;OAMG;IACH,gDAHW,MAAM,OAMhB;IAwpBD;;;;;OAKG;IACH,2CAFa,OAAO,CAOnB;IAxwCD;;;;OAIG;IACH,qBAHW,aAAa,EAsBvB;IA7HD;;;OAGG;IACH,sBAAiB;IAEjB;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,YAAO;IAEP;;;OAGG;IACH,UAAK;IAEL;;;OAGG;IACH,WAFU,OAAO,CAEC;IAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+DE;IAkKF;;;;OAIG;IACH,0BAFa,IAAI,CAIhB;IADC,aAAsB;IAsBxB;;;OAGG;IACH,SAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,iBAEC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,kBAFa,OAAO,CAInB;IAED;;;OAGG;IACH,mBAFa,OAAO,CAInB;IAED;;;OAGG;IACH,eAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,aAFa,KAAK,CAAE,IAAI,CAAC,CAIxB;IAED;;;OAGG;IACH,aAEC;IAED;;;OA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W,MAAM,SAMhB;IAED;;;;;OAKG;IACH,2CAHW,MAAM,GACJ,IAAI,CAYhB;IAED;;;;;;;;OAQG;IACH,yCAHW,UAAU,EAAE,GACV,IAAI,CAShB;IAED;;;;;;OAMG;IACH,4BAJW,UAAU,EAAE,cACZ,QAAQ,GACN,IAAI,CAiBhB;IAED;;;;;;;OAOG;IACH,sCAJW,KAAQ,cACR,MAAM,EAAE,GACN,IAAI,CAKhB;IAFC,mBAAoC;IAItC;;;;OAIG;IACH,gBAFa,IAAI,CAKhB;;CAEF;;;;;cA3mDa,MAAM;;;;iBACN,MAAM;;;;;;;;;UAWP,MAAM;;;;WACN,MAAM;;;;WACN,MAAM,GAAG,IAAI;;;;;;cAIZ,WAAW;;;;eACX,MAAM;;;;iBACN,OAAO;;;;mBACP,QAAQ;;;;iBACR,MAAM;;;;cACN,MAAM;;;;WACN,IAAI;;;;YACJ,KAAK,CAAE,IAAI,CAAC;;;;;;;;;;;;;;;;mBAIZ,MAAM;;;;WACN,MAAM;;;;WACN,MAAM;;;;;;;;;;;;;;;;;;;;iBAKN,MAAM;;;;;;;;eAEN,OAAO;;;;;;;;;;;;;;;;uBAIP,OAAO;;;;wBACP,OAAO;;;;gBACP,OAAO;;;;YACP,MAAM;;;;kBACN,OAAO;;;;iBACP,OAAO;;;;;;;;;;;;uBAGP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAsBP,OAAO;;;;mBACP,OAAO;;;;WACP,MAAM;;6BApGS,mBAAmB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-BfaGq_P9.js";
|
|
2
|
+
import "./chunks/converter-DhgEAlTO.js";
|
|
3
|
+
import "./chunks/docx-zipper-BSaSIAeQ.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|