@harbour-enterprises/superdoc 0.12.31 → 0.12.33-next.5-rev2
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-CYH3KblY.es.js → super-editor.es-BQFhGW94.es.js} +674 -289
- package/dist/chunks/{super-editor.es-BxaiA9ut.cjs → super-editor.es-Cu3lX85n.cjs} +660 -275
- package/dist/composables/use-high-contrast-mode.d.ts +5 -0
- package/dist/composables/use-high-contrast-mode.d.ts.map +1 -0
- package/dist/core/SuperDoc.d.ts +7 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/create-app.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/style.css +299 -245
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-Dm2_Htrh.js → converter-DJ33LAXn.js} +3 -8
- package/dist/super-editor/chunks/{docx-zipper-CU11jH41.js → docx-zipper-DL3tXrb0.js} +7 -3
- package/dist/super-editor/chunks/{editor-CISWiQkg.js → editor-5LOHBPcW.js} +250 -67
- package/dist/super-editor/chunks/{toolbar-Dgo3wQvN.js → toolbar-DEMTAG4q.js} +80 -36
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/composables/use-high-contrast-mode.d.ts +5 -0
- package/dist/super-editor/composables/use-high-contrast-mode.d.ts.map +1 -0
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/DocxZipper.d.ts +1 -1
- package/dist/super-editor/core/DocxZipper.d.ts.map +1 -1
- package/dist/super-editor/core/Editor.d.ts +2 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/InputRule.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/annotator.d.ts +19 -3
- package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +3 -3
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.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/extensions/ai/ai-nodes.d.ts.map +1 -1
- package/dist/super-editor/extensions/bookmarks/bookmarks.d.ts.map +1 -1
- package/dist/super-editor/extensions/bullet-list/bullet-list.d.ts.map +1 -1
- package/dist/super-editor/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
- package/dist/super-editor/extensions/comment/comment.d.ts.map +1 -1
- package/dist/super-editor/extensions/document/document.d.ts.map +1 -1
- package/dist/super-editor/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +2 -0
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts.map +1 -0
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +1 -0
- package/dist/super-editor/extensions/heading/heading.d.ts.map +1 -1
- package/dist/super-editor/extensions/image/image.d.ts.map +1 -1
- package/dist/super-editor/extensions/line-break/line-break.d.ts.map +1 -1
- package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/mention/mention.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/ordered-list.d.ts.map +1 -1
- package/dist/super-editor/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/extensions/run-item/run-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/shape-container/shape-container.d.ts.map +1 -1
- package/dist/super-editor/extensions/shape-textbox/shape-textbox.d.ts.map +1 -1
- package/dist/super-editor/extensions/structured-content/structured-content.d.ts.map +1 -1
- package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
- package/dist/super-editor/extensions/table-cell/table-cell.d.ts.map +1 -1
- package/dist/super-editor/extensions/table-header/table-header.d.ts.map +1 -1
- package/dist/super-editor/extensions/table-row/table-row.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/index.d.ts +1 -1
- package/dist/super-editor/style.css +243 -196
- package/dist/super-editor/super-editor.es.js +335 -174
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
- package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -1
- package/dist/super-editor.es.js +15 -14
- package/dist/superdoc.cjs +35 -9
- package/dist/superdoc.es.js +233 -207
- package/dist/superdoc.umd.js +697 -287
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Y from "yjs";
|
|
2
2
|
import { UndoManager, Item as Item$2, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
3
|
-
import { g as global$2,
|
|
3
|
+
import { g as global$2, r as ref$1, c as createApp, a as computed, b as createElementBlock, o as openBlock, F as Fragment$1, d as renderList, n as normalizeClass, w as withModifiers, e as createCommentVNode, t as toDisplayString, f as createBaseVNode, i as inject, h as onBeforeMount, j as onMounted, k as onBeforeUnmount, l as watch, m as defineComponent, q as getCurrentInstance, s as onDeactivated, u as nextTick, v as createBlock, x as createVNode, y as unref, z as withCtx, A as createTextVNode, B as normalizeStyle, C as h, D as toRef, E as provide, G as mergeProps, H as cloneVNode, T as Text$2, I as withDirectives, J as watchEffect, K as shallowRef, L as vModelText, M as withKeys, N as reactive, O as readonly, P as Transition, Q as vShow, R as Comment, S as renderSlot, U as onActivated, V as Teleport, W as isVNode, X as onUnmounted } from "./vue-IIIZMHTg.es.js";
|
|
4
4
|
var __defProp$2 = Object.defineProperty;
|
|
5
5
|
var __typeError$2 = (msg2) => {
|
|
6
6
|
throw TypeError(msg2);
|
|
@@ -22036,12 +22036,7 @@ const getParagraphIndent = (node2, docx, styleId = "") => {
|
|
|
22036
22036
|
return indent;
|
|
22037
22037
|
};
|
|
22038
22038
|
const getParagraphSpacing = (node2, docx, styleId = "", marks = []) => {
|
|
22039
|
-
const spacing = {
|
|
22040
|
-
lineSpaceAfter: 0,
|
|
22041
|
-
lineSpaceBefore: 0,
|
|
22042
|
-
line: 0,
|
|
22043
|
-
lineRule: null
|
|
22044
|
-
};
|
|
22039
|
+
const spacing = {};
|
|
22045
22040
|
const { spacing: pDefaultSpacing = {} } = getDefaultParagraphStyle(docx, styleId);
|
|
22046
22041
|
let lineSpaceAfter, lineSpaceBefore, line, lineRuleStyle;
|
|
22047
22042
|
const pPr = node2.elements?.find((el) => el.name === "w:pPr");
|
|
@@ -23290,7 +23285,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23290
23285
|
return;
|
|
23291
23286
|
}
|
|
23292
23287
|
}
|
|
23293
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.
|
|
23288
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.33-next.5-rev2") {
|
|
23294
23289
|
const customLocation = "docProps/custom.xml";
|
|
23295
23290
|
if (!docx[customLocation]) {
|
|
23296
23291
|
docx[customLocation] = generateCustomXml();
|
|
@@ -23756,7 +23751,7 @@ function storeSuperdocVersion(docx) {
|
|
|
23756
23751
|
function generateCustomXml() {
|
|
23757
23752
|
return DEFAULT_CUSTOM_XML;
|
|
23758
23753
|
}
|
|
23759
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.12.
|
|
23754
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.12.33-next.5-rev2") {
|
|
23760
23755
|
return {
|
|
23761
23756
|
type: "element",
|
|
23762
23757
|
name: "property",
|
|
@@ -26156,12 +26151,15 @@ class DocxZipper {
|
|
|
26156
26151
|
/**
|
|
26157
26152
|
* Update [Content_Types].xml with extensions of new Image annotations
|
|
26158
26153
|
*/
|
|
26159
|
-
async updateContentTypes(docx, media) {
|
|
26154
|
+
async updateContentTypes(docx, media, fromJson) {
|
|
26160
26155
|
const newMediaTypes = Object.keys(media).map((name) => {
|
|
26161
26156
|
return this.getFileExtension(name);
|
|
26162
26157
|
});
|
|
26163
26158
|
const contentTypesPath = "[Content_Types].xml";
|
|
26164
|
-
|
|
26159
|
+
let contentTypesXml;
|
|
26160
|
+
if (fromJson) {
|
|
26161
|
+
contentTypesXml = docx.files.find((file) => file.name === contentTypesPath)?.content || "";
|
|
26162
|
+
} else contentTypesXml = await docx.file(contentTypesPath).async("string");
|
|
26165
26163
|
let typesString = "";
|
|
26166
26164
|
const defaultMediaTypes = getContentTypesFromXml(contentTypesXml);
|
|
26167
26165
|
const seenTypes = /* @__PURE__ */ new Set();
|
|
@@ -26205,6 +26203,7 @@ class DocxZipper {
|
|
|
26205
26203
|
});
|
|
26206
26204
|
const beginningString = '<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';
|
|
26207
26205
|
const updatedContentTypesXml = contentTypesXml.replace(beginningString, `${beginningString}${typesString}`);
|
|
26206
|
+
if (fromJson) return updatedContentTypesXml;
|
|
26208
26207
|
docx.file(contentTypesPath, updatedContentTypesXml);
|
|
26209
26208
|
}
|
|
26210
26209
|
async unzip(file) {
|
|
@@ -38204,6 +38203,10 @@ const inputRulesPlugin = ({ editor, rules }) => {
|
|
|
38204
38203
|
const clipboard = event.clipboardData;
|
|
38205
38204
|
const html = clipboard.getData("text/html");
|
|
38206
38205
|
clipboard.getData("text/plain");
|
|
38206
|
+
const fieldAnnotationContent = slice2.content.content.filter((item) => item.type.name === "fieldAnnotation");
|
|
38207
|
+
if (fieldAnnotationContent.length) {
|
|
38208
|
+
return false;
|
|
38209
|
+
}
|
|
38207
38210
|
let source;
|
|
38208
38211
|
if (!html) {
|
|
38209
38212
|
source = "plain-text";
|
|
@@ -38982,16 +38985,14 @@ const updateYdocDocxData = async (editor) => {
|
|
|
38982
38985
|
const docx = [...metaMap.get("docx")];
|
|
38983
38986
|
const newXml = await editor.exportDocx({ getUpdatedDocs: true });
|
|
38984
38987
|
Object.keys(newXml).forEach((key) => {
|
|
38985
|
-
|
|
38986
|
-
|
|
38987
|
-
|
|
38988
|
-
docx.splice(fileIndex, 1);
|
|
38989
|
-
}
|
|
38990
|
-
docx.push({
|
|
38991
|
-
name: key,
|
|
38992
|
-
content: newXml[key]
|
|
38993
|
-
});
|
|
38988
|
+
const fileIndex = docx.findIndex((item) => item.name === key);
|
|
38989
|
+
if (fileIndex > -1) {
|
|
38990
|
+
docx.splice(fileIndex, 1);
|
|
38994
38991
|
}
|
|
38992
|
+
docx.push({
|
|
38993
|
+
name: key,
|
|
38994
|
+
content: newXml[key]
|
|
38995
|
+
});
|
|
38995
38996
|
});
|
|
38996
38997
|
editor.options.ydoc.transact(() => {
|
|
38997
38998
|
metaMap.set("docx", docx);
|
|
@@ -39101,6 +39102,9 @@ const createHeaderFooterEditor = ({
|
|
|
39101
39102
|
pm.style.minHeight = "100%";
|
|
39102
39103
|
pm.style.outline = "none";
|
|
39103
39104
|
pm.style.border = "none";
|
|
39105
|
+
pm.setAttribute("role", "textbox");
|
|
39106
|
+
pm.setAttribute("aria-multiline", true);
|
|
39107
|
+
pm.setAttribute("aria-label", `${type2} content area. Double click to start typing.`);
|
|
39104
39108
|
return headerFooterEditor;
|
|
39105
39109
|
};
|
|
39106
39110
|
const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
@@ -39122,13 +39126,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
|
39122
39126
|
const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
|
|
39123
39127
|
editor.converter.headerEditors.forEach((item) => {
|
|
39124
39128
|
item.editor.setEditable(isEditMode, false);
|
|
39129
|
+
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39125
39130
|
});
|
|
39126
39131
|
editor.converter.footerEditors.forEach((item) => {
|
|
39127
39132
|
item.editor.setEditable(isEditMode, false);
|
|
39133
|
+
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39128
39134
|
});
|
|
39129
39135
|
if (isEditMode) {
|
|
39130
39136
|
const pm = document.querySelector(".ProseMirror");
|
|
39131
39137
|
pm.classList.add("header-footer-edit");
|
|
39138
|
+
pm.setAttribute("aria-readonly", true);
|
|
39132
39139
|
}
|
|
39133
39140
|
if (focusedSectionEditor) {
|
|
39134
39141
|
focusedSectionEditor.view.focus();
|
|
@@ -40047,11 +40054,12 @@ const generateTableIfNecessary = ({ tableNode, annotationValues, tr, state: stat
|
|
|
40047
40054
|
const getAnnotationValue = (id, annotationValues) => {
|
|
40048
40055
|
return annotationValues.find((value) => value.input_id === id)?.input_value || null;
|
|
40049
40056
|
};
|
|
40050
|
-
const
|
|
40057
|
+
const getAllHeaderFooterEditors = (editor) => {
|
|
40051
40058
|
const sections = {
|
|
40052
40059
|
header: editor.converter.headers || {},
|
|
40053
40060
|
footer: editor.converter.footers || {}
|
|
40054
40061
|
};
|
|
40062
|
+
const allEditors = [];
|
|
40055
40063
|
Object.entries(sections).forEach(([type2, items]) => {
|
|
40056
40064
|
const editorsKey = `${type2}Editors`;
|
|
40057
40065
|
Object.entries(items).forEach(([sectionId, data]) => {
|
|
@@ -40069,25 +40077,38 @@ const annotateHeadersAndFooters = ({ editor, annotationValues = [], hiddenFieldI
|
|
|
40069
40077
|
})
|
|
40070
40078
|
};
|
|
40071
40079
|
editor.converter[editorsKey].push(sectionEditor);
|
|
40080
|
+
allEditors.push({
|
|
40081
|
+
...sectionEditor,
|
|
40082
|
+
key: editorsKey,
|
|
40083
|
+
type: type2,
|
|
40084
|
+
sectionId
|
|
40085
|
+
});
|
|
40072
40086
|
}
|
|
40073
|
-
sectionEditor.editor.annotate(annotationValues, hiddenFieldIds);
|
|
40074
|
-
onHeaderFooterDataUpdate(
|
|
40075
|
-
{ editor: sectionEditor.editor },
|
|
40076
|
-
editor,
|
|
40077
|
-
sectionId,
|
|
40078
|
-
type2
|
|
40079
|
-
);
|
|
40080
40087
|
});
|
|
40081
40088
|
});
|
|
40089
|
+
return allEditors;
|
|
40090
|
+
};
|
|
40091
|
+
const annotateHeadersAndFooters = ({ editor, annotationValues = [], hiddenFieldIds = [], removeEmptyFields = false }) => {
|
|
40092
|
+
const allEditors = getAllHeaderFooterEditors(editor);
|
|
40093
|
+
allEditors.forEach(({ sectionId, editor: sectionEditor, type: type2 }) => {
|
|
40094
|
+
sectionEditor.annotate(annotationValues, hiddenFieldIds, removeEmptyFields);
|
|
40095
|
+
onHeaderFooterDataUpdate(
|
|
40096
|
+
{ editor: sectionEditor },
|
|
40097
|
+
editor,
|
|
40098
|
+
sectionId,
|
|
40099
|
+
type2
|
|
40100
|
+
);
|
|
40101
|
+
});
|
|
40082
40102
|
};
|
|
40083
40103
|
const annotateDocument = ({
|
|
40084
40104
|
annotationValues = [],
|
|
40085
40105
|
hiddenFieldIds = [],
|
|
40106
|
+
removeEmptyFields = false,
|
|
40086
40107
|
schema,
|
|
40087
40108
|
tr,
|
|
40088
40109
|
editor
|
|
40089
40110
|
}) => {
|
|
40090
|
-
annotateHeadersAndFooters({ editor, annotationValues, hiddenFieldIds });
|
|
40111
|
+
annotateHeadersAndFooters({ editor, annotationValues, hiddenFieldIds, removeEmptyFields });
|
|
40091
40112
|
const annotations = [];
|
|
40092
40113
|
const FieldType = schema.nodes.fieldAnnotation;
|
|
40093
40114
|
tr.doc.descendants((node2, pos) => {
|
|
@@ -40140,11 +40161,13 @@ const annotateDocument = ({
|
|
|
40140
40161
|
});
|
|
40141
40162
|
}
|
|
40142
40163
|
}
|
|
40143
|
-
|
|
40144
|
-
|
|
40145
|
-
|
|
40146
|
-
|
|
40147
|
-
|
|
40164
|
+
if (removeEmptyFields) {
|
|
40165
|
+
Array.from(toDelete).sort((a, b) => b - a).forEach((pos) => {
|
|
40166
|
+
const ann = annotations.find((a) => a.pos === pos);
|
|
40167
|
+
if (!ann) return;
|
|
40168
|
+
tr = tr.delete(pos, pos + ann.node.nodeSize);
|
|
40169
|
+
});
|
|
40170
|
+
}
|
|
40148
40171
|
return tr;
|
|
40149
40172
|
};
|
|
40150
40173
|
const getFormattedDate = (input = null, format = "") => {
|
|
@@ -40162,11 +40185,100 @@ const getFormattedDate = (input = null, format = "") => {
|
|
|
40162
40185
|
// e.g. “2025”
|
|
40163
40186
|
});
|
|
40164
40187
|
};
|
|
40165
|
-
const
|
|
40188
|
+
const updateHeaderFooterFieldAnnotations = ({ editor, fieldIdOrArray, attrs = {} }) => {
|
|
40189
|
+
if (!editor) return;
|
|
40190
|
+
const sectionEditors = getAllHeaderFooterEditors(editor);
|
|
40191
|
+
sectionEditors.forEach(({ editor: sectionEditor, sectionId, type: type2 }) => {
|
|
40192
|
+
sectionEditor.commands.updateFieldAnnotations(fieldIdOrArray, attrs);
|
|
40193
|
+
onHeaderFooterDataUpdate(
|
|
40194
|
+
{ editor: sectionEditor },
|
|
40195
|
+
editor,
|
|
40196
|
+
sectionId,
|
|
40197
|
+
type2
|
|
40198
|
+
);
|
|
40199
|
+
});
|
|
40200
|
+
};
|
|
40201
|
+
const deleteHeaderFooterFieldAnnotations = ({ editor, fieldIdOrArray }) => {
|
|
40202
|
+
if (!editor) return;
|
|
40203
|
+
const sectionEditors = getAllHeaderFooterEditors(editor);
|
|
40204
|
+
sectionEditors.forEach(({ editor: sectionEditor, sectionId, type: type2 }) => {
|
|
40205
|
+
sectionEditor.commands.deleteFieldAnnotations(fieldIdOrArray);
|
|
40206
|
+
onHeaderFooterDataUpdate(
|
|
40207
|
+
{ editor: sectionEditor },
|
|
40208
|
+
editor,
|
|
40209
|
+
sectionId,
|
|
40210
|
+
type2
|
|
40211
|
+
);
|
|
40212
|
+
});
|
|
40213
|
+
};
|
|
40214
|
+
const cleanUpListsWithAnnotations = (fieldsToDelete = [], editor) => {
|
|
40215
|
+
if (!Array.isArray(fieldsToDelete)) fieldsToDelete = [fieldsToDelete];
|
|
40216
|
+
const { doc: doc2 } = editor.state;
|
|
40217
|
+
const docxAnnotations = getAllFieldAnnotations(editor.state) || [];
|
|
40218
|
+
const nodesToDelete = [];
|
|
40219
|
+
fieldsToDelete.forEach((fieldId) => {
|
|
40220
|
+
const matched = docxAnnotations.find((a) => a.node.attrs.fieldId === fieldId);
|
|
40221
|
+
if (!matched) return;
|
|
40222
|
+
const listItem = findParentNodeClosestToPos(
|
|
40223
|
+
doc2.resolve(matched.pos),
|
|
40224
|
+
(node22) => node22.type.name === "listItem"
|
|
40225
|
+
);
|
|
40226
|
+
if (!listItem) return;
|
|
40227
|
+
if (listItem.node.childCount !== 1) {
|
|
40228
|
+
let remainingNodes = listItem.node.childCount;
|
|
40229
|
+
let matchingNodesFound = 0;
|
|
40230
|
+
let hasOtherNodes = false;
|
|
40231
|
+
listItem.node.children.forEach((child, index2) => {
|
|
40232
|
+
const { type: type2 } = child;
|
|
40233
|
+
if (type2.name !== "paragraph") return;
|
|
40234
|
+
child.children.forEach((inline) => {
|
|
40235
|
+
const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
|
|
40236
|
+
const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
|
|
40237
|
+
const isEmpty2 = inline.childCount === 0;
|
|
40238
|
+
if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
|
|
40239
|
+
if (isMatchingField) matchingNodesFound += 1;
|
|
40240
|
+
});
|
|
40241
|
+
});
|
|
40242
|
+
if (!hasOtherNodes && matchingNodesFound > 0) {
|
|
40243
|
+
remainingNodes -= matchingNodesFound;
|
|
40244
|
+
}
|
|
40245
|
+
if (remainingNodes > 0) {
|
|
40246
|
+
return;
|
|
40247
|
+
}
|
|
40248
|
+
}
|
|
40249
|
+
let { pos, node: node2, depth } = listItem;
|
|
40250
|
+
let $pos = doc2.resolve(pos);
|
|
40251
|
+
while (depth > 0) {
|
|
40252
|
+
const parent = $pos.node(depth - 1);
|
|
40253
|
+
if (parent.childCount === 1) {
|
|
40254
|
+
depth -= 1;
|
|
40255
|
+
pos = $pos.before(depth);
|
|
40256
|
+
node2 = parent;
|
|
40257
|
+
$pos = doc2.resolve(pos);
|
|
40258
|
+
} else {
|
|
40259
|
+
break;
|
|
40260
|
+
}
|
|
40261
|
+
}
|
|
40262
|
+
if (!nodesToDelete.some((n) => n.pos === pos)) {
|
|
40263
|
+
nodesToDelete.push({ pos, node: node2 });
|
|
40264
|
+
}
|
|
40265
|
+
});
|
|
40266
|
+
if (!nodesToDelete.length) return;
|
|
40267
|
+
const tr = editor.state.tr;
|
|
40268
|
+
nodesToDelete.sort((a, b) => b.pos - a.pos).forEach(({ pos, node: node2 }) => {
|
|
40269
|
+
tr.delete(pos, pos + node2.nodeSize);
|
|
40270
|
+
});
|
|
40271
|
+
editor.view.dispatch(tr);
|
|
40272
|
+
};
|
|
40273
|
+
const AnnotatorHelpers = {
|
|
40166
40274
|
getFieldAttrs,
|
|
40167
40275
|
processTables,
|
|
40168
40276
|
annotateDocument,
|
|
40169
|
-
annotateHeadersAndFooters
|
|
40277
|
+
annotateHeadersAndFooters,
|
|
40278
|
+
getAllHeaderFooterEditors,
|
|
40279
|
+
updateHeaderFooterFieldAnnotations,
|
|
40280
|
+
deleteHeaderFooterFieldAnnotations,
|
|
40281
|
+
cleanUpListsWithAnnotations
|
|
40170
40282
|
};
|
|
40171
40283
|
const CollaborationPluginKey = new PluginKey("collaboration");
|
|
40172
40284
|
const Collaboration = Extension.create({
|
|
@@ -40316,6 +40428,16 @@ const generateCollaborationData = (editor) => {
|
|
|
40316
40428
|
initializeMetaMap(ydoc, editor);
|
|
40317
40429
|
return encodeStateAsUpdate(ydoc);
|
|
40318
40430
|
};
|
|
40431
|
+
const isHighContrastMode = ref$1(false);
|
|
40432
|
+
function useHighContrastMode() {
|
|
40433
|
+
const setHighContrastMode = (value) => {
|
|
40434
|
+
isHighContrastMode.value = value;
|
|
40435
|
+
};
|
|
40436
|
+
return {
|
|
40437
|
+
isHighContrastMode,
|
|
40438
|
+
setHighContrastMode
|
|
40439
|
+
};
|
|
40440
|
+
}
|
|
40319
40441
|
const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
40320
40442
|
/**
|
|
40321
40443
|
* Create a new Editor instance
|
|
@@ -40408,6 +40530,8 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40408
40530
|
}
|
|
40409
40531
|
};
|
|
40410
40532
|
let initMode = modes[this.options.mode] ?? modes.default;
|
|
40533
|
+
const { setHighContrastMode } = useHighContrastMode();
|
|
40534
|
+
this.setHighContrastMode = setHighContrastMode;
|
|
40411
40535
|
initMode();
|
|
40412
40536
|
}
|
|
40413
40537
|
/**
|
|
@@ -40704,6 +40828,10 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40704
40828
|
if (!proseMirror || !pageSize || !pageMargins) {
|
|
40705
40829
|
return;
|
|
40706
40830
|
}
|
|
40831
|
+
proseMirror.setAttribute("role", "document");
|
|
40832
|
+
proseMirror.setAttribute("aria-multiline", true);
|
|
40833
|
+
proseMirror.setAttribute("aria-label", "Main content area, start typing to enter text.");
|
|
40834
|
+
proseMirror.setAttribute("aria-description", "");
|
|
40707
40835
|
element.style.width = pageSize.width + "in";
|
|
40708
40836
|
element.style.minWidth = pageSize.width + "in";
|
|
40709
40837
|
element.style.minHeight = pageSize.height + "in";
|
|
@@ -40912,8 +41040,13 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40912
41040
|
updatedDocs["word/commentsExtensible.xml"] = String(commentsExtensibleXml);
|
|
40913
41041
|
updatedDocs["word/commentsIds.xml"] = String(commentsIdsXml);
|
|
40914
41042
|
}
|
|
40915
|
-
if (getUpdatedDocs) return updatedDocs;
|
|
40916
41043
|
const zipper = new DocxZipper();
|
|
41044
|
+
if (getUpdatedDocs) {
|
|
41045
|
+
updatedDocs["[Content_Types].xml"] = await zipper.updateContentTypes({
|
|
41046
|
+
files: this.options.content
|
|
41047
|
+
}, media, true);
|
|
41048
|
+
return updatedDocs;
|
|
41049
|
+
}
|
|
40917
41050
|
const result = await zipper.updateZip({
|
|
40918
41051
|
docx: this.options.content,
|
|
40919
41052
|
updatedDocs,
|
|
@@ -40955,7 +41088,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40955
41088
|
* @returns {Object | void} Migration results
|
|
40956
41089
|
*/
|
|
40957
41090
|
processCollaborationMigrations() {
|
|
40958
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.12.
|
|
41091
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.12.33-next.5-rev2");
|
|
40959
41092
|
if (!this.options.ydoc) return;
|
|
40960
41093
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
40961
41094
|
let docVersion = metaMap.get("version");
|
|
@@ -41044,10 +41177,8 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41044
41177
|
*/
|
|
41045
41178
|
prepareForAnnotations(annotationValues = []) {
|
|
41046
41179
|
const { tr } = this.state;
|
|
41047
|
-
const
|
|
41048
|
-
const newTr = AnnotatorServices.processTables({ state: this.state, tr, annotationValues });
|
|
41180
|
+
const newTr = AnnotatorHelpers.processTables({ state: this.state, tr, annotationValues });
|
|
41049
41181
|
this.view.dispatch(newTr);
|
|
41050
|
-
AnnotatorServices.annotateHeadersAndFooters({ editor: this, annotationValues });
|
|
41051
41182
|
}
|
|
41052
41183
|
/**
|
|
41053
41184
|
* Annotate the document with the given annotation values.
|
|
@@ -41056,15 +41187,16 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41056
41187
|
* @param {String[]} hiddenIds List of field ids to remove from the document.
|
|
41057
41188
|
* @returns {void}
|
|
41058
41189
|
*/
|
|
41059
|
-
annotate(annotationValues = [], hiddenIds = []) {
|
|
41190
|
+
annotate(annotationValues = [], hiddenIds = [], removeEmptyFields = false) {
|
|
41060
41191
|
const { state: state2, view, schema } = this;
|
|
41061
41192
|
let tr = state2.tr;
|
|
41062
|
-
tr =
|
|
41063
|
-
tr =
|
|
41193
|
+
tr = AnnotatorHelpers.processTables({ state: this.state, tr, annotationValues });
|
|
41194
|
+
tr = AnnotatorHelpers.annotateDocument({
|
|
41064
41195
|
tr,
|
|
41065
41196
|
schema,
|
|
41066
41197
|
annotationValues,
|
|
41067
41198
|
hiddenFieldIds: hiddenIds,
|
|
41199
|
+
removeEmptyFields,
|
|
41068
41200
|
editor: this
|
|
41069
41201
|
});
|
|
41070
41202
|
if (tr.docChanged) view.dispatch(tr.scrollIntoView());
|
|
@@ -41319,6 +41451,7 @@ createView_fn = function() {
|
|
|
41319
41451
|
toggleHeaderFooterEditMode(this, null, false);
|
|
41320
41452
|
const pm = document.querySelector(".ProseMirror");
|
|
41321
41453
|
pm.classList.remove("header-footer-edit");
|
|
41454
|
+
pm.setAttribute("aria-readonly", false);
|
|
41322
41455
|
}
|
|
41323
41456
|
}
|
|
41324
41457
|
});
|
|
@@ -42291,7 +42424,8 @@ const AiLoaderNode = Node$1.create({
|
|
|
42291
42424
|
return {
|
|
42292
42425
|
htmlAttributes: {
|
|
42293
42426
|
class: "sd-ai-loader",
|
|
42294
|
-
contentEditable: "false"
|
|
42427
|
+
contentEditable: "false",
|
|
42428
|
+
"aria-label": "AI loader node"
|
|
42295
42429
|
}
|
|
42296
42430
|
};
|
|
42297
42431
|
},
|
|
@@ -42487,7 +42621,8 @@ const Document = Node$1.create({
|
|
|
42487
42621
|
addAttributes() {
|
|
42488
42622
|
return {
|
|
42489
42623
|
attributes: {
|
|
42490
|
-
rendered: false
|
|
42624
|
+
rendered: false,
|
|
42625
|
+
"aria-label": "Document node"
|
|
42491
42626
|
}
|
|
42492
42627
|
};
|
|
42493
42628
|
}
|
|
@@ -42511,7 +42646,8 @@ const RunItem = Node$1.create({
|
|
|
42511
42646
|
addAttributes() {
|
|
42512
42647
|
return {
|
|
42513
42648
|
attributes: {
|
|
42514
|
-
rendered: false
|
|
42649
|
+
rendered: false,
|
|
42650
|
+
"aria-label": "Run node"
|
|
42515
42651
|
}
|
|
42516
42652
|
};
|
|
42517
42653
|
}
|
|
@@ -42564,7 +42700,9 @@ const BulletList = Node$1.create({
|
|
|
42564
42700
|
addOptions() {
|
|
42565
42701
|
return {
|
|
42566
42702
|
itemTypeName: "listItem",
|
|
42567
|
-
htmlAttributes: {
|
|
42703
|
+
htmlAttributes: {
|
|
42704
|
+
"aria-label": "Bullet list node"
|
|
42705
|
+
},
|
|
42568
42706
|
keepMarks: true,
|
|
42569
42707
|
keepAttributes: false
|
|
42570
42708
|
};
|
|
@@ -42855,7 +42993,9 @@ const OrderedList = Node$1.create({
|
|
|
42855
42993
|
addOptions() {
|
|
42856
42994
|
return {
|
|
42857
42995
|
itemTypeName: "listItem",
|
|
42858
|
-
htmlAttributes: {
|
|
42996
|
+
htmlAttributes: {
|
|
42997
|
+
"aria-label": "Ordered list node"
|
|
42998
|
+
},
|
|
42859
42999
|
keepMarks: true,
|
|
42860
43000
|
keepAttributes: false,
|
|
42861
43001
|
listStyleTypes: ["decimal", "lowerAlpha", "lowerRoman"]
|
|
@@ -43255,7 +43395,9 @@ const ListItem = Node$1.create({
|
|
|
43255
43395
|
// to run listItem commands first
|
|
43256
43396
|
addOptions() {
|
|
43257
43397
|
return {
|
|
43258
|
-
htmlAttributes: {
|
|
43398
|
+
htmlAttributes: {
|
|
43399
|
+
"aria-label": "List item node"
|
|
43400
|
+
},
|
|
43259
43401
|
bulletListTypeName: "bulletList",
|
|
43260
43402
|
orderedListTypeName: "orderedList"
|
|
43261
43403
|
};
|
|
@@ -43777,7 +43919,9 @@ const Heading = Node$1.create({
|
|
|
43777
43919
|
addOptions() {
|
|
43778
43920
|
return {
|
|
43779
43921
|
levels: [1, 2, 3, 4, 5, 6],
|
|
43780
|
-
htmlAttributes: {
|
|
43922
|
+
htmlAttributes: {
|
|
43923
|
+
"aria-label": "Heading node"
|
|
43924
|
+
}
|
|
43781
43925
|
};
|
|
43782
43926
|
},
|
|
43783
43927
|
addAttributes() {
|
|
@@ -43838,7 +43982,8 @@ const CommentRangeStart = Node$1.create({
|
|
|
43838
43982
|
addOptions() {
|
|
43839
43983
|
return {
|
|
43840
43984
|
htmlAttributes: {
|
|
43841
|
-
contentEditable: "false"
|
|
43985
|
+
contentEditable: "false",
|
|
43986
|
+
"aria-label": "Comment range start node"
|
|
43842
43987
|
}
|
|
43843
43988
|
};
|
|
43844
43989
|
},
|
|
@@ -43867,7 +44012,8 @@ const CommentRangeEnd = Node$1.create({
|
|
|
43867
44012
|
addOptions() {
|
|
43868
44013
|
return {
|
|
43869
44014
|
htmlAttributes: {
|
|
43870
|
-
contentEditable: "false"
|
|
44015
|
+
contentEditable: "false",
|
|
44016
|
+
"aria-label": "Comment range end node"
|
|
43871
44017
|
}
|
|
43872
44018
|
};
|
|
43873
44019
|
},
|
|
@@ -43895,7 +44041,8 @@ const CommentReference = Node$1.create({
|
|
|
43895
44041
|
addOptions() {
|
|
43896
44042
|
return {
|
|
43897
44043
|
htmlAttributes: {
|
|
43898
|
-
contentEditable: "false"
|
|
44044
|
+
contentEditable: "false",
|
|
44045
|
+
"aria-label": "Comment reference node"
|
|
43899
44046
|
}
|
|
43900
44047
|
};
|
|
43901
44048
|
},
|
|
@@ -44070,7 +44217,9 @@ const HardBreak = Node$1.create({
|
|
|
44070
44217
|
return {
|
|
44071
44218
|
htmlAttributes: {
|
|
44072
44219
|
contentEditable: "false",
|
|
44073
|
-
lineBreakType: "page"
|
|
44220
|
+
lineBreakType: "page",
|
|
44221
|
+
"aria-hidden": "true",
|
|
44222
|
+
"aria-label": "Hard break node"
|
|
44074
44223
|
}
|
|
44075
44224
|
};
|
|
44076
44225
|
},
|
|
@@ -46428,7 +46577,9 @@ const Table = Node$1.create({
|
|
|
46428
46577
|
tableRole: "table",
|
|
46429
46578
|
addOptions() {
|
|
46430
46579
|
return {
|
|
46431
|
-
htmlAttributes: {
|
|
46580
|
+
htmlAttributes: {
|
|
46581
|
+
"aria-label": "Table node"
|
|
46582
|
+
},
|
|
46432
46583
|
resizable: true,
|
|
46433
46584
|
handleWidth: 5,
|
|
46434
46585
|
cellMinWidth: 25,
|
|
@@ -46678,7 +46829,9 @@ const TableHeader = Node$1.create({
|
|
|
46678
46829
|
isolating: true,
|
|
46679
46830
|
addOptions() {
|
|
46680
46831
|
return {
|
|
46681
|
-
htmlAttributes: {
|
|
46832
|
+
htmlAttributes: {
|
|
46833
|
+
"aria-label": "Table head node"
|
|
46834
|
+
}
|
|
46682
46835
|
};
|
|
46683
46836
|
},
|
|
46684
46837
|
addAttributes() {
|
|
@@ -46718,7 +46871,9 @@ const TableRow = Node$1.create({
|
|
|
46718
46871
|
tableRole: "row",
|
|
46719
46872
|
addOptions() {
|
|
46720
46873
|
return {
|
|
46721
|
-
htmlAttributes: {
|
|
46874
|
+
htmlAttributes: {
|
|
46875
|
+
"aria-label": "Table row node"
|
|
46876
|
+
}
|
|
46722
46877
|
};
|
|
46723
46878
|
},
|
|
46724
46879
|
addAttributes() {
|
|
@@ -46746,7 +46901,9 @@ const TableCell = Node$1.create({
|
|
|
46746
46901
|
isolating: true,
|
|
46747
46902
|
addOptions() {
|
|
46748
46903
|
return {
|
|
46749
|
-
htmlAttributes: {
|
|
46904
|
+
htmlAttributes: {
|
|
46905
|
+
"aria-label": "Table cell node"
|
|
46906
|
+
}
|
|
46750
46907
|
};
|
|
46751
46908
|
},
|
|
46752
46909
|
addAttributes() {
|
|
@@ -47288,6 +47445,15 @@ function findFieldAnnotationsBetween(from2, to, doc2) {
|
|
|
47288
47445
|
});
|
|
47289
47446
|
return fieldAnnotations;
|
|
47290
47447
|
}
|
|
47448
|
+
const getHeaderFooterAnnotations = (editor) => {
|
|
47449
|
+
const editors = getAllHeaderFooterEditors(editor);
|
|
47450
|
+
const allAnnotations = [];
|
|
47451
|
+
editors.forEach(({ id, editor: editor2 }) => {
|
|
47452
|
+
const annotations = getAllFieldAnnotations(editor2.state);
|
|
47453
|
+
allAnnotations.push(...annotations);
|
|
47454
|
+
});
|
|
47455
|
+
return allAnnotations;
|
|
47456
|
+
};
|
|
47291
47457
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
47292
47458
|
__proto__: null,
|
|
47293
47459
|
findFieldAnnotations,
|
|
@@ -47297,6 +47463,7 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
47297
47463
|
findRemovedFieldAnnotations,
|
|
47298
47464
|
getAllFieldAnnotations,
|
|
47299
47465
|
getAllFieldAnnotationsWithRect,
|
|
47466
|
+
getHeaderFooterAnnotations,
|
|
47300
47467
|
trackFieldAnnotationsDeletion
|
|
47301
47468
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
47302
47469
|
function guard(low, high, value) {
|
|
@@ -47427,7 +47594,8 @@ const FieldAnnotation = Node$1.create({
|
|
|
47427
47594
|
addOptions() {
|
|
47428
47595
|
return {
|
|
47429
47596
|
htmlAttributes: {
|
|
47430
|
-
class: annotationClass
|
|
47597
|
+
class: annotationClass,
|
|
47598
|
+
"aria-label": "Field annotation node"
|
|
47431
47599
|
},
|
|
47432
47600
|
annotationClass,
|
|
47433
47601
|
annotationContentClass,
|
|
@@ -48369,7 +48537,8 @@ const Image = Node$1.create({
|
|
|
48369
48537
|
return {
|
|
48370
48538
|
allowBase64: true,
|
|
48371
48539
|
htmlAttributes: {
|
|
48372
|
-
style: "display: inline-block;"
|
|
48540
|
+
style: "display: inline-block;",
|
|
48541
|
+
"aria-label": "Image node"
|
|
48373
48542
|
}
|
|
48374
48543
|
};
|
|
48375
48544
|
},
|
|
@@ -48485,7 +48654,11 @@ const BookmarkStart = Node$1.create({
|
|
|
48485
48654
|
inline: true,
|
|
48486
48655
|
addOptions() {
|
|
48487
48656
|
return {
|
|
48488
|
-
htmlAttributes: {
|
|
48657
|
+
htmlAttributes: {
|
|
48658
|
+
style: "height: 0; width: 0;",
|
|
48659
|
+
"aria-label": "Bookmark start node",
|
|
48660
|
+
role: "link"
|
|
48661
|
+
}
|
|
48489
48662
|
};
|
|
48490
48663
|
},
|
|
48491
48664
|
addAttributes() {
|
|
@@ -48519,7 +48692,8 @@ const Mention = Node$1.create({
|
|
|
48519
48692
|
addOptions() {
|
|
48520
48693
|
return {
|
|
48521
48694
|
htmlAttributes: {
|
|
48522
|
-
class: "sd-editor-mention"
|
|
48695
|
+
class: "sd-editor-mention",
|
|
48696
|
+
"aria-label": "Mention node"
|
|
48523
48697
|
}
|
|
48524
48698
|
};
|
|
48525
48699
|
},
|
|
@@ -48557,7 +48731,8 @@ const PageNumber = Node$1.create({
|
|
|
48557
48731
|
addOptions() {
|
|
48558
48732
|
return {
|
|
48559
48733
|
htmlAttributes: {
|
|
48560
|
-
"data-id": "auto-page-number"
|
|
48734
|
+
"data-id": "auto-page-number",
|
|
48735
|
+
"aria-label": "Page number node"
|
|
48561
48736
|
}
|
|
48562
48737
|
};
|
|
48563
48738
|
},
|
|
@@ -48576,7 +48751,8 @@ const TotalPageCount = Node$1.create({
|
|
|
48576
48751
|
addOptions() {
|
|
48577
48752
|
return {
|
|
48578
48753
|
htmlAttributes: {
|
|
48579
|
-
"data-id": "auto-total-pages"
|
|
48754
|
+
"data-id": "auto-total-pages",
|
|
48755
|
+
"aria-label": "Total page count node"
|
|
48580
48756
|
}
|
|
48581
48757
|
};
|
|
48582
48758
|
},
|
|
@@ -48595,7 +48771,8 @@ const ShapeContainer = Node$1.create({
|
|
|
48595
48771
|
addOptions() {
|
|
48596
48772
|
return {
|
|
48597
48773
|
htmlAttributes: {
|
|
48598
|
-
class: "sd-editor-shape-container"
|
|
48774
|
+
class: "sd-editor-shape-container",
|
|
48775
|
+
"aria-label": "Shape container node"
|
|
48599
48776
|
}
|
|
48600
48777
|
};
|
|
48601
48778
|
},
|
|
@@ -48648,7 +48825,8 @@ const ShapeTextbox = Node$1.create({
|
|
|
48648
48825
|
addOptions() {
|
|
48649
48826
|
return {
|
|
48650
48827
|
htmlAttributes: {
|
|
48651
|
-
class: "sd-editor-shape-textbox"
|
|
48828
|
+
class: "sd-editor-shape-textbox",
|
|
48829
|
+
"aria-label": "Shape textbox node"
|
|
48652
48830
|
}
|
|
48653
48831
|
};
|
|
48654
48832
|
},
|
|
@@ -48740,7 +48918,9 @@ const StructuredContent = Node$1.create({
|
|
|
48740
48918
|
addOptions() {
|
|
48741
48919
|
return {
|
|
48742
48920
|
annotationClass: "sd-structured-content-tag",
|
|
48743
|
-
htmlAttributes: {
|
|
48921
|
+
htmlAttributes: {
|
|
48922
|
+
"aria-label": "Structured content node"
|
|
48923
|
+
}
|
|
48744
48924
|
};
|
|
48745
48925
|
},
|
|
48746
48926
|
parseDOM() {
|
|
@@ -52200,9 +52380,9 @@ const _export_sfc = (sfc, props) => {
|
|
|
52200
52380
|
};
|
|
52201
52381
|
const _hoisted_1$e = ["onClick", "onMouseenter"];
|
|
52202
52382
|
const _hoisted_2$c = { key: 0 };
|
|
52203
|
-
const _hoisted_3$
|
|
52383
|
+
const _hoisted_3$a = { key: 0 };
|
|
52204
52384
|
const _hoisted_4$6 = { key: 1 };
|
|
52205
|
-
const _hoisted_5$
|
|
52385
|
+
const _hoisted_5$5 = { key: 1 };
|
|
52206
52386
|
const _sfc_main$f = {
|
|
52207
52387
|
__name: "Mentions",
|
|
52208
52388
|
props: {
|
|
@@ -52275,9 +52455,9 @@ const _sfc_main$f = {
|
|
|
52275
52455
|
class: normalizeClass(["user-row", { selected: activeUserIndex.value === index2 }])
|
|
52276
52456
|
}, [
|
|
52277
52457
|
user.name ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
|
|
52278
|
-
user.name ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
52458
|
+
user.name ? (openBlock(), createElementBlock("span", _hoisted_3$a, toDisplayString(user.name), 1)) : createCommentVNode("", true),
|
|
52279
52459
|
user.name && user.email ? (openBlock(), createElementBlock("span", _hoisted_4$6, " (" + toDisplayString(user.email) + ")", 1)) : createCommentVNode("", true)
|
|
52280
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
52460
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_5$5, [
|
|
52281
52461
|
createBaseVNode("span", null, toDisplayString(user.email), 1)
|
|
52282
52462
|
]))
|
|
52283
52463
|
], 42, _hoisted_1$e);
|
|
@@ -53588,15 +53768,16 @@ const _sfc_main$5$1 = {
|
|
|
53588
53768
|
}
|
|
53589
53769
|
};
|
|
53590
53770
|
const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5$1, [["__scopeId", "data-v-6d7523ab"]]);
|
|
53591
|
-
const _hoisted_1$3$1 = ["
|
|
53592
|
-
const _hoisted_2$2$1 =
|
|
53771
|
+
const _hoisted_1$3$1 = ["role"];
|
|
53772
|
+
const _hoisted_2$2$1 = ["data-item", "aria-label"];
|
|
53773
|
+
const _hoisted_3$2$1 = {
|
|
53593
53774
|
key: 1,
|
|
53594
53775
|
class: "button-label"
|
|
53595
53776
|
};
|
|
53596
|
-
const
|
|
53597
|
-
const
|
|
53598
|
-
const
|
|
53599
|
-
const
|
|
53777
|
+
const _hoisted_4$5 = { key: 2 };
|
|
53778
|
+
const _hoisted_5$4 = ["placeholder", "onKeydown", "id"];
|
|
53779
|
+
const _hoisted_6$2 = ["placeholder", "onKeydown", "id"];
|
|
53780
|
+
const _hoisted_7$1 = ["innerHTML"];
|
|
53600
53781
|
const _sfc_main$4$1 = {
|
|
53601
53782
|
__name: "ToolbarButton",
|
|
53602
53783
|
props: {
|
|
@@ -53623,6 +53804,10 @@ const _sfc_main$4$1 = {
|
|
|
53623
53804
|
defaultLabel: {
|
|
53624
53805
|
type: String,
|
|
53625
53806
|
default: null
|
|
53807
|
+
},
|
|
53808
|
+
isOverflowItem: {
|
|
53809
|
+
type: Boolean,
|
|
53810
|
+
default: false
|
|
53626
53811
|
}
|
|
53627
53812
|
},
|
|
53628
53813
|
emits: ["buttonClick", "textSubmit"],
|
|
@@ -53646,6 +53831,7 @@ const _sfc_main$4$1 = {
|
|
|
53646
53831
|
} = props.toolbarItem;
|
|
53647
53832
|
const inlineTextInput = ref$1(props.defaultLabel);
|
|
53648
53833
|
const inlineInput = ref$1(null);
|
|
53834
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
53649
53835
|
const handleClick2 = () => {
|
|
53650
53836
|
if (hasInlineTextInput) {
|
|
53651
53837
|
inlineInput.value?.focus();
|
|
@@ -53673,12 +53859,15 @@ const _sfc_main$4$1 = {
|
|
|
53673
53859
|
return (_ctx, _cache) => {
|
|
53674
53860
|
return openBlock(), createElementBlock("div", {
|
|
53675
53861
|
class: normalizeClass(["toolbar-item", unref(attributes).className]),
|
|
53676
|
-
style: normalizeStyle(getStyle.value)
|
|
53862
|
+
style: normalizeStyle(getStyle.value),
|
|
53863
|
+
role: __props.isOverflowItem ? "menuitem" : ""
|
|
53677
53864
|
}, [
|
|
53678
53865
|
createBaseVNode("div", {
|
|
53679
53866
|
onClick: handleClick2,
|
|
53680
|
-
class: normalizeClass(["toolbar-button", { active: unref(active), disabled: unref(disabled), narrow: __props.isNarrow, wide: __props.isWide, "has-inline-text-input": unref(hasInlineTextInput) }]),
|
|
53681
|
-
"data-item": `btn-${unref(name) || ""}
|
|
53867
|
+
class: normalizeClass(["toolbar-button", { active: unref(active), disabled: unref(disabled), narrow: __props.isNarrow, wide: __props.isWide, "has-inline-text-input": unref(hasInlineTextInput), "high-contrast": unref(isHighContrastMode2) }]),
|
|
53868
|
+
"data-item": `btn-${unref(name) || ""}`,
|
|
53869
|
+
"aria-label": unref(attributes).ariaLabel,
|
|
53870
|
+
role: "button"
|
|
53682
53871
|
}, [
|
|
53683
53872
|
unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
|
|
53684
53873
|
key: 0,
|
|
@@ -53687,8 +53876,8 @@ const _sfc_main$4$1 = {
|
|
|
53687
53876
|
icon: unref(icon),
|
|
53688
53877
|
name: unref(name)
|
|
53689
53878
|
}, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
|
|
53690
|
-
unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div",
|
|
53691
|
-
unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span",
|
|
53879
|
+
unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2$1, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
|
|
53880
|
+
unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
|
|
53692
53881
|
unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
53693
53882
|
key: 0,
|
|
53694
53883
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
@@ -53696,12 +53885,12 @@ const _sfc_main$4$1 = {
|
|
|
53696
53885
|
placeholder: unref(label),
|
|
53697
53886
|
onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
53698
53887
|
type: "text",
|
|
53699
|
-
class: "button-text-input",
|
|
53888
|
+
class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode2) }]),
|
|
53700
53889
|
id: "inlineTextInput-" + unref(name),
|
|
53701
53890
|
autoccomplete: "off",
|
|
53702
53891
|
ref_key: "inlineInput",
|
|
53703
53892
|
ref: inlineInput
|
|
53704
|
-
}, null,
|
|
53893
|
+
}, null, 42, _hoisted_5$4)), [
|
|
53705
53894
|
[vModelText, inlineTextInput.value]
|
|
53706
53895
|
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
53707
53896
|
key: 1,
|
|
@@ -53714,7 +53903,7 @@ const _sfc_main$4$1 = {
|
|
|
53714
53903
|
autoccomplete: "off",
|
|
53715
53904
|
ref_key: "inlineInput",
|
|
53716
53905
|
ref: inlineInput
|
|
53717
|
-
}, null, 40,
|
|
53906
|
+
}, null, 40, _hoisted_6$2)), [
|
|
53718
53907
|
[vModelText, inlineTextInput.value]
|
|
53719
53908
|
])
|
|
53720
53909
|
])) : createCommentVNode("", true),
|
|
@@ -53723,14 +53912,18 @@ const _sfc_main$4$1 = {
|
|
|
53723
53912
|
class: "dropdown-caret",
|
|
53724
53913
|
innerHTML: caretIcon.value,
|
|
53725
53914
|
style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
|
|
53726
|
-
}, null, 12,
|
|
53727
|
-
], 10,
|
|
53728
|
-
],
|
|
53915
|
+
}, null, 12, _hoisted_7$1)) : createCommentVNode("", true)
|
|
53916
|
+
], 10, _hoisted_2$2$1)
|
|
53917
|
+
], 14, _hoisted_1$3$1);
|
|
53729
53918
|
};
|
|
53730
53919
|
}
|
|
53731
53920
|
};
|
|
53732
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-
|
|
53733
|
-
const _hoisted_1$2$1 = {
|
|
53921
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-6eb57404"]]);
|
|
53922
|
+
const _hoisted_1$2$1 = {
|
|
53923
|
+
class: "toolbar-separator",
|
|
53924
|
+
role: "separator",
|
|
53925
|
+
"aria-label": "Toolbar separator"
|
|
53926
|
+
};
|
|
53734
53927
|
const _sfc_main$3$1 = {
|
|
53735
53928
|
__name: "ToolbarSeparator",
|
|
53736
53929
|
props: {
|
|
@@ -53741,19 +53934,30 @@ const _sfc_main$3$1 = {
|
|
|
53741
53934
|
},
|
|
53742
53935
|
emits: ["command"],
|
|
53743
53936
|
setup(__props, { emit: __emit }) {
|
|
53937
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
53938
|
+
const getSeparatorColor = () => {
|
|
53939
|
+
if (isHighContrastMode2.value) {
|
|
53940
|
+
return "#000";
|
|
53941
|
+
}
|
|
53942
|
+
return "#dbdbdb";
|
|
53943
|
+
};
|
|
53744
53944
|
return (_ctx, _cache) => {
|
|
53745
|
-
return openBlock(), createElementBlock("div", _hoisted_1$2$1,
|
|
53746
|
-
createBaseVNode("div", {
|
|
53747
|
-
|
|
53945
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2$1, [
|
|
53946
|
+
createBaseVNode("div", {
|
|
53947
|
+
class: "separator-inner",
|
|
53948
|
+
style: normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
53949
|
+
}, null, 4)
|
|
53950
|
+
]);
|
|
53748
53951
|
};
|
|
53749
53952
|
}
|
|
53750
53953
|
};
|
|
53751
|
-
const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3$1, [["__scopeId", "data-v-
|
|
53954
|
+
const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3$1, [["__scopeId", "data-v-b240fc3a"]]);
|
|
53752
53955
|
const _hoisted_1$1$1 = { class: "overflow-menu" };
|
|
53753
53956
|
const _hoisted_2$1$1 = { class: "overflow-menu-trigger" };
|
|
53754
53957
|
const _hoisted_3$1$1 = {
|
|
53755
53958
|
key: 0,
|
|
53756
|
-
class: "overflow-menu_items"
|
|
53959
|
+
class: "overflow-menu_items",
|
|
53960
|
+
role: "group"
|
|
53757
53961
|
};
|
|
53758
53962
|
const _sfc_main$2$1 = {
|
|
53759
53963
|
__name: "OverflowMenu",
|
|
@@ -53791,16 +53995,17 @@ const _sfc_main$2$1 = {
|
|
|
53791
53995
|
]),
|
|
53792
53996
|
isDropdownOpened.value ? (openBlock(), createElementBlock("div", _hoisted_3$1$1, [
|
|
53793
53997
|
createVNode(ButtonGroup, {
|
|
53998
|
+
class: "superdoc-toolbar-overflow",
|
|
53794
53999
|
"toolbar-items": __props.overflowItems,
|
|
53795
|
-
|
|
53796
|
-
|
|
54000
|
+
"from-overflow": "",
|
|
54001
|
+
onCommand: handleCommand
|
|
53797
54002
|
}, null, 8, ["toolbar-items"])
|
|
53798
54003
|
])) : createCommentVNode("", true)
|
|
53799
54004
|
]);
|
|
53800
54005
|
};
|
|
53801
54006
|
}
|
|
53802
54007
|
};
|
|
53803
|
-
const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2$1, [["__scopeId", "data-v-
|
|
54008
|
+
const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2$1, [["__scopeId", "data-v-c637209b"]]);
|
|
53804
54009
|
function plugin$1(options2) {
|
|
53805
54010
|
let _bPrefix = ".";
|
|
53806
54011
|
let _ePrefix = "__";
|
|
@@ -63133,7 +63338,7 @@ const NSkeleton = defineComponent({
|
|
|
63133
63338
|
});
|
|
63134
63339
|
const _hoisted_1$d = { key: 0 };
|
|
63135
63340
|
const _hoisted_2$b = { key: 0 };
|
|
63136
|
-
const _hoisted_3$
|
|
63341
|
+
const _hoisted_3$9 = { key: 0 };
|
|
63137
63342
|
const _sfc_main$1$1 = {
|
|
63138
63343
|
__name: "ButtonGroup",
|
|
63139
63344
|
props: {
|
|
@@ -63148,6 +63353,10 @@ const _sfc_main$1$1 = {
|
|
|
63148
63353
|
position: {
|
|
63149
63354
|
type: String,
|
|
63150
63355
|
default: "left"
|
|
63356
|
+
},
|
|
63357
|
+
fromOverflow: {
|
|
63358
|
+
type: Boolean,
|
|
63359
|
+
default: false
|
|
63151
63360
|
}
|
|
63152
63361
|
},
|
|
63153
63362
|
emits: ["command"],
|
|
@@ -63155,6 +63364,7 @@ const _sfc_main$1$1 = {
|
|
|
63155
63364
|
const emit = __emit;
|
|
63156
63365
|
const props = __props;
|
|
63157
63366
|
const currentItem = ref$1(null);
|
|
63367
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
63158
63368
|
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
63159
63369
|
const styleMap = {
|
|
63160
63370
|
left: {
|
|
@@ -63213,13 +63423,20 @@ const _sfc_main$1$1 = {
|
|
|
63213
63423
|
};
|
|
63214
63424
|
});
|
|
63215
63425
|
};
|
|
63426
|
+
const getDropdownAttributes = (option, item) => {
|
|
63427
|
+
return {
|
|
63428
|
+
role: "menuitem",
|
|
63429
|
+
ariaLabel: `${item.attributes.value.ariaLabel} - ${option.label}`
|
|
63430
|
+
};
|
|
63431
|
+
};
|
|
63216
63432
|
const handleClickOutside = (e) => {
|
|
63217
63433
|
closeDropdowns();
|
|
63218
63434
|
};
|
|
63219
63435
|
return (_ctx, _cache) => {
|
|
63220
63436
|
return openBlock(), createElementBlock("div", {
|
|
63221
63437
|
style: normalizeStyle(getPositionStyle.value),
|
|
63222
|
-
class: "button-group"
|
|
63438
|
+
class: "button-group",
|
|
63439
|
+
role: "group"
|
|
63223
63440
|
}, [
|
|
63224
63441
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.toolbarItems, (item) => {
|
|
63225
63442
|
return openBlock(), createElementBlock("div", {
|
|
@@ -63240,10 +63457,14 @@ const _sfc_main$1$1 = {
|
|
|
63240
63457
|
show: item.expand.value,
|
|
63241
63458
|
size: "medium",
|
|
63242
63459
|
placement: "bottom-start",
|
|
63243
|
-
class: "toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown",
|
|
63460
|
+
class: normalizeClass(["toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown", { "high-contrast": unref(isHighContrastMode2) }]),
|
|
63244
63461
|
onSelect: (key, option) => handleSelect(item, option),
|
|
63245
63462
|
onClickoutside: handleClickOutside,
|
|
63246
|
-
style: normalizeStyle(item.dropdownStyles.value)
|
|
63463
|
+
style: normalizeStyle(item.dropdownStyles.value),
|
|
63464
|
+
"menu-props": () => ({
|
|
63465
|
+
role: "menu"
|
|
63466
|
+
}),
|
|
63467
|
+
"node-props": (option) => getDropdownAttributes(option, item)
|
|
63247
63468
|
}, {
|
|
63248
63469
|
default: withCtx(() => [
|
|
63249
63470
|
createVNode(unref(NTooltip), {
|
|
@@ -63267,7 +63488,7 @@ const _sfc_main$1$1 = {
|
|
|
63267
63488
|
}, 1032, ["disabled"])
|
|
63268
63489
|
]),
|
|
63269
63490
|
_: 2
|
|
63270
|
-
}, 1032, ["options", "trigger", "show", "onSelect", "style"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
|
|
63491
|
+
}, 1032, ["options", "trigger", "show", "class", "onSelect", "style", "node-props"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
|
|
63271
63492
|
key: 2,
|
|
63272
63493
|
trigger: "hover",
|
|
63273
63494
|
class: "sd-editor-toolbar-tooltip"
|
|
@@ -63275,14 +63496,15 @@ const _sfc_main$1$1 = {
|
|
|
63275
63496
|
trigger: withCtx(() => [
|
|
63276
63497
|
createVNode(ToolbarButton, {
|
|
63277
63498
|
"toolbar-item": item,
|
|
63499
|
+
"is-overflow-item": __props.fromOverflow,
|
|
63278
63500
|
onTextSubmit: ($event) => handleToolbarButtonTextSubmit(item, $event),
|
|
63279
63501
|
onButtonClick: ($event) => handleToolbarButtonClick(item)
|
|
63280
|
-
}, null, 8, ["toolbar-item", "onTextSubmit", "onButtonClick"])
|
|
63502
|
+
}, null, 8, ["toolbar-item", "is-overflow-item", "onTextSubmit", "onButtonClick"])
|
|
63281
63503
|
]),
|
|
63282
63504
|
default: withCtx(() => [
|
|
63283
63505
|
item.tooltip ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
63284
63506
|
createTextVNode(toDisplayString(item.tooltip) + " ", 1),
|
|
63285
|
-
item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
63507
|
+
item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_3$9, "(disabled)")) : createCommentVNode("", true)
|
|
63286
63508
|
])) : createCommentVNode("", true)
|
|
63287
63509
|
]),
|
|
63288
63510
|
_: 2
|
|
@@ -63298,7 +63520,7 @@ const _sfc_main$1$1 = {
|
|
|
63298
63520
|
};
|
|
63299
63521
|
}
|
|
63300
63522
|
};
|
|
63301
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
63523
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-b09e5a20"]]);
|
|
63302
63524
|
const _sfc_main$e = {
|
|
63303
63525
|
__name: "Toolbar",
|
|
63304
63526
|
emits: ["command", "toggle", "select"],
|
|
@@ -63343,7 +63565,9 @@ const _sfc_main$e = {
|
|
|
63343
63565
|
return (_ctx, _cache) => {
|
|
63344
63566
|
return openBlock(), createElementBlock("div", {
|
|
63345
63567
|
class: "superdoc-toolbar",
|
|
63346
|
-
key: unref(toolbarKey)
|
|
63568
|
+
key: unref(toolbarKey),
|
|
63569
|
+
role: "toolbar",
|
|
63570
|
+
"aria-label": "Toolbar"
|
|
63347
63571
|
}, [
|
|
63348
63572
|
unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
|
|
63349
63573
|
key: 0,
|
|
@@ -63369,7 +63593,7 @@ const _sfc_main$e = {
|
|
|
63369
63593
|
};
|
|
63370
63594
|
}
|
|
63371
63595
|
};
|
|
63372
|
-
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
63596
|
+
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-2a400574"]]);
|
|
63373
63597
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
63374
63598
|
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: ";
|
|
63375
63599
|
async function baseInsightsFetch(payload, options2 = {}) {
|
|
@@ -63606,9 +63830,9 @@ const edit = '<!-- @note: includes color gradient for inline svg AI Writer -->\n
|
|
|
63606
63830
|
const paperPlane = '<!-- @note: includes color gradient for inline svg AI Writer -->\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->\n <defs>\n <linearGradient id="gradient" x1="125%" y1="50%" x2="-25%" y2="50%">\n <stop offset="-20%" stop-color="rgba(218, 215, 118, 0.5)" />\n <stop offset="30%" stop-color="rgb(191, 100, 100)" />\n <stop offset="60%" stop-color="rgb(77, 82, 217)" />\n <stop offset="150%" stop-color="rgb(255, 219, 102)" />\n </linearGradient>\n </defs>\n <path fill="url(#gradient)" d="M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"/>\n</svg>';
|
|
63607
63831
|
const _hoisted_1$c = { class: "ai-user-input-field" };
|
|
63608
63832
|
const _hoisted_2$a = ["innerHTML"];
|
|
63609
|
-
const _hoisted_3$
|
|
63833
|
+
const _hoisted_3$8 = ["placeholder"];
|
|
63610
63834
|
const _hoisted_4$4 = { class: "ai-loader" };
|
|
63611
|
-
const _hoisted_5$
|
|
63835
|
+
const _hoisted_5$3 = ["innerHTML"];
|
|
63612
63836
|
const _sfc_main$d = {
|
|
63613
63837
|
__name: "AIWriter",
|
|
63614
63838
|
props: {
|
|
@@ -63884,7 +64108,7 @@ const _sfc_main$d = {
|
|
|
63884
64108
|
onInput: handleInput,
|
|
63885
64109
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => promptText.value = $event),
|
|
63886
64110
|
rows: "4"
|
|
63887
|
-
}, null, 40, _hoisted_3$
|
|
64111
|
+
}, null, 40, _hoisted_3$8), [
|
|
63888
64112
|
[vModelText, promptText.value]
|
|
63889
64113
|
])
|
|
63890
64114
|
]),
|
|
@@ -63894,7 +64118,7 @@ const _sfc_main$d = {
|
|
|
63894
64118
|
class: "ai-textarea-icon ai-submit-button",
|
|
63895
64119
|
onClick: withModifiers(handleSubmit, ["stop"]),
|
|
63896
64120
|
innerHTML: unref(paperPlane)
|
|
63897
|
-
}, null, 8, _hoisted_5$
|
|
64121
|
+
}, null, 8, _hoisted_5$3)) : createCommentVNode("", true)
|
|
63898
64122
|
])
|
|
63899
64123
|
], 544);
|
|
63900
64124
|
};
|
|
@@ -64229,71 +64453,80 @@ const useToolbarItem = (options2) => {
|
|
|
64229
64453
|
onDeactivate
|
|
64230
64454
|
};
|
|
64231
64455
|
};
|
|
64232
|
-
const _hoisted_1$b =
|
|
64456
|
+
const _hoisted_1$b = ["innerHTML"];
|
|
64233
64457
|
const _hoisted_2$9 = ["innerHTML"];
|
|
64234
|
-
const _hoisted_3$
|
|
64458
|
+
const _hoisted_3$7 = ["innerHTML"];
|
|
64235
64459
|
const _hoisted_4$3 = ["innerHTML"];
|
|
64236
|
-
const _hoisted_5$3 = ["innerHTML"];
|
|
64237
64460
|
const _sfc_main$c = {
|
|
64238
64461
|
__name: "AlignmentButtons",
|
|
64239
64462
|
emits: ["select"],
|
|
64240
64463
|
setup(__props, { emit: __emit }) {
|
|
64464
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
64241
64465
|
const emit = __emit;
|
|
64242
64466
|
const select = (alignment2) => {
|
|
64243
64467
|
emit("select", alignment2);
|
|
64244
64468
|
};
|
|
64245
64469
|
return (_ctx, _cache) => {
|
|
64246
|
-
return openBlock(), createElementBlock("div",
|
|
64470
|
+
return openBlock(), createElementBlock("div", {
|
|
64471
|
+
class: normalizeClass(["alignment-buttons", { "high-contrast": unref(isHighContrastMode2) }])
|
|
64472
|
+
}, [
|
|
64247
64473
|
createBaseVNode("div", {
|
|
64248
64474
|
class: "button-icon",
|
|
64249
64475
|
onClick: _cache[0] || (_cache[0] = ($event) => select("left")),
|
|
64250
64476
|
innerHTML: unref(toolbarIcons).alignLeft,
|
|
64251
|
-
"data-item": "btn-textAlign-option"
|
|
64252
|
-
|
|
64477
|
+
"data-item": "btn-textAlign-option",
|
|
64478
|
+
role: "menuitem",
|
|
64479
|
+
"aria-label": "Align left"
|
|
64480
|
+
}, null, 8, _hoisted_1$b),
|
|
64253
64481
|
createBaseVNode("div", {
|
|
64254
64482
|
class: "button-icon",
|
|
64255
64483
|
onClick: _cache[1] || (_cache[1] = ($event) => select("center")),
|
|
64256
64484
|
innerHTML: unref(toolbarIcons).alignCenter,
|
|
64257
|
-
"data-item": "btn-textAlign-option"
|
|
64258
|
-
|
|
64485
|
+
"data-item": "btn-textAlign-option",
|
|
64486
|
+
role: "menuitem",
|
|
64487
|
+
"aria-label": "Align center"
|
|
64488
|
+
}, null, 8, _hoisted_2$9),
|
|
64259
64489
|
createBaseVNode("div", {
|
|
64260
64490
|
class: "button-icon",
|
|
64261
64491
|
onClick: _cache[2] || (_cache[2] = ($event) => select("right")),
|
|
64262
64492
|
innerHTML: unref(toolbarIcons).alignRight,
|
|
64263
|
-
"data-item": "btn-textAlign-option"
|
|
64264
|
-
|
|
64493
|
+
"data-item": "btn-textAlign-option",
|
|
64494
|
+
role: "menuitem",
|
|
64495
|
+
"aria-label": "Align right"
|
|
64496
|
+
}, null, 8, _hoisted_3$7),
|
|
64265
64497
|
createBaseVNode("div", {
|
|
64266
64498
|
class: "button-icon",
|
|
64267
64499
|
onClick: _cache[3] || (_cache[3] = ($event) => select("justify")),
|
|
64268
64500
|
innerHTML: unref(toolbarIcons).alignJustify,
|
|
64269
|
-
"data-item": "btn-textAlign-option"
|
|
64270
|
-
|
|
64271
|
-
|
|
64501
|
+
"data-item": "btn-textAlign-option",
|
|
64502
|
+
role: "menuitem",
|
|
64503
|
+
"aria-label": "Justify"
|
|
64504
|
+
}, null, 8, _hoisted_4$3)
|
|
64505
|
+
], 2);
|
|
64272
64506
|
};
|
|
64273
64507
|
}
|
|
64274
64508
|
};
|
|
64275
|
-
const AlignmentButtons = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
64276
|
-
const _hoisted_1$a = {
|
|
64277
|
-
const _hoisted_2$8 = {
|
|
64509
|
+
const AlignmentButtons = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-58d8a9bb"]]);
|
|
64510
|
+
const _hoisted_1$a = {
|
|
64278
64511
|
key: 0,
|
|
64279
64512
|
class: "link-title"
|
|
64280
64513
|
};
|
|
64281
|
-
const
|
|
64514
|
+
const _hoisted_2$8 = {
|
|
64282
64515
|
key: 1,
|
|
64283
64516
|
class: "link-title"
|
|
64284
64517
|
};
|
|
64285
|
-
const
|
|
64518
|
+
const _hoisted_3$6 = {
|
|
64286
64519
|
key: 2,
|
|
64287
64520
|
class: "link-title"
|
|
64288
64521
|
};
|
|
64289
|
-
const
|
|
64290
|
-
const
|
|
64291
|
-
const
|
|
64292
|
-
const
|
|
64293
|
-
const
|
|
64294
|
-
const
|
|
64295
|
-
const
|
|
64296
|
-
const
|
|
64522
|
+
const _hoisted_4$2 = { key: 3 };
|
|
64523
|
+
const _hoisted_5$2 = { class: "input-row" };
|
|
64524
|
+
const _hoisted_6$1 = ["innerHTML"];
|
|
64525
|
+
const _hoisted_7 = ["onKeydown"];
|
|
64526
|
+
const _hoisted_8 = ["innerHTML"];
|
|
64527
|
+
const _hoisted_9 = { class: "input-row link-buttons" };
|
|
64528
|
+
const _hoisted_10 = ["innerHTML"];
|
|
64529
|
+
const _hoisted_11 = {
|
|
64297
64530
|
key: 4,
|
|
64298
64531
|
class: "input-row go-to-anchor clickable"
|
|
64299
64532
|
};
|
|
@@ -64326,6 +64559,7 @@ const _sfc_main$b = {
|
|
|
64326
64559
|
setup(__props, { emit: __emit }) {
|
|
64327
64560
|
const emit = __emit;
|
|
64328
64561
|
const props = __props;
|
|
64562
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
64329
64563
|
const { proxy } = getCurrentInstance();
|
|
64330
64564
|
const handleSubmit = () => {
|
|
64331
64565
|
if (proxy?.$submit instanceof Function) proxy.$submit();
|
|
@@ -64376,16 +64610,19 @@ const _sfc_main$b = {
|
|
|
64376
64610
|
if (props.showInput) focusInput();
|
|
64377
64611
|
});
|
|
64378
64612
|
return (_ctx, _cache) => {
|
|
64379
|
-
return openBlock(), createElementBlock("div",
|
|
64380
|
-
|
|
64381
|
-
|
|
64382
|
-
|
|
64613
|
+
return openBlock(), createElementBlock("div", {
|
|
64614
|
+
class: normalizeClass(["link-input-ctn", { "high-contrast": unref(isHighContrastMode2) }])
|
|
64615
|
+
}, [
|
|
64616
|
+
!__props.href ? (openBlock(), createElementBlock("div", _hoisted_1$a, "Add link")) : isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_2$8, "Page anchor")) : (openBlock(), createElementBlock("div", _hoisted_3$6, "Edit link")),
|
|
64617
|
+
__props.showInput && !isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
64618
|
+
createBaseVNode("div", _hoisted_5$2, [
|
|
64383
64619
|
createBaseVNode("div", {
|
|
64384
64620
|
class: "input-icon",
|
|
64385
64621
|
innerHTML: unref(toolbarIcons).linkInput
|
|
64386
|
-
}, null, 8,
|
|
64622
|
+
}, null, 8, _hoisted_6$1),
|
|
64387
64623
|
withDirectives(createBaseVNode("input", {
|
|
64388
64624
|
type: "text",
|
|
64625
|
+
name: "link",
|
|
64389
64626
|
placeholder: "Type or paste a link",
|
|
64390
64627
|
class: normalizeClass({ error: urlError.value }),
|
|
64391
64628
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => rawUrl.value = $event),
|
|
@@ -64393,7 +64630,7 @@ const _sfc_main$b = {
|
|
|
64393
64630
|
withKeys(withModifiers(handleSubmit, ["stop", "prevent"]), ["enter"]),
|
|
64394
64631
|
_cache[1] || (_cache[1] = ($event) => urlError.value = false)
|
|
64395
64632
|
]
|
|
64396
|
-
}, null, 42,
|
|
64633
|
+
}, null, 42, _hoisted_7), [
|
|
64397
64634
|
[vModelText, rawUrl.value]
|
|
64398
64635
|
]),
|
|
64399
64636
|
createBaseVNode("div", {
|
|
@@ -64401,9 +64638,9 @@ const _sfc_main$b = {
|
|
|
64401
64638
|
innerHTML: unref(toolbarIcons).openLink,
|
|
64402
64639
|
onClick: openLink,
|
|
64403
64640
|
"data-item": "btn-link-open"
|
|
64404
|
-
}, null, 10,
|
|
64641
|
+
}, null, 10, _hoisted_8)
|
|
64405
64642
|
]),
|
|
64406
|
-
createBaseVNode("div",
|
|
64643
|
+
createBaseVNode("div", _hoisted_9, [
|
|
64407
64644
|
__props.href ? (openBlock(), createElementBlock("button", {
|
|
64408
64645
|
key: 0,
|
|
64409
64646
|
class: "remove-btn",
|
|
@@ -64413,7 +64650,7 @@ const _sfc_main$b = {
|
|
|
64413
64650
|
createBaseVNode("div", {
|
|
64414
64651
|
class: "remove-btn__icon",
|
|
64415
64652
|
innerHTML: unref(toolbarIcons).removeLink
|
|
64416
|
-
}, null, 8,
|
|
64653
|
+
}, null, 8, _hoisted_10),
|
|
64417
64654
|
_cache[3] || (_cache[3] = createTextVNode(" Remove "))
|
|
64418
64655
|
])) : createCommentVNode("", true),
|
|
64419
64656
|
showApply.value ? (openBlock(), createElementBlock("button", {
|
|
@@ -64423,23 +64660,22 @@ const _sfc_main$b = {
|
|
|
64423
64660
|
"data-item": "btn-link-apply"
|
|
64424
64661
|
}, toDisplayString(getApplyText.value), 3)) : createCommentVNode("", true)
|
|
64425
64662
|
])
|
|
64426
|
-
])) : isAnchor.value ? (openBlock(), createElementBlock("div",
|
|
64663
|
+
])) : isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
64427
64664
|
createBaseVNode("a", {
|
|
64428
64665
|
onClick: _cache[2] || (_cache[2] = withModifiers((...args) => __props.goToAnchor && __props.goToAnchor(...args), ["stop", "prevent"]))
|
|
64429
64666
|
}, "Go to " + toDisplayString(__props.href.startsWith("#_") ? __props.href.substring(2) : __props.href), 1)
|
|
64430
64667
|
])) : createCommentVNode("", true)
|
|
64431
|
-
]);
|
|
64668
|
+
], 2);
|
|
64432
64669
|
};
|
|
64433
64670
|
}
|
|
64434
64671
|
};
|
|
64435
|
-
const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
64436
|
-
const _hoisted_1$9 =
|
|
64437
|
-
const _hoisted_2$7 =
|
|
64438
|
-
const _hoisted_3$
|
|
64439
|
-
const _hoisted_4$1 =
|
|
64440
|
-
const _hoisted_5$1 = { class: "document-mode-
|
|
64441
|
-
const _hoisted_6 = { class: "document-mode-
|
|
64442
|
-
const _hoisted_7 = { class: "document-mode-description" };
|
|
64672
|
+
const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-64aa14bc"]]);
|
|
64673
|
+
const _hoisted_1$9 = ["onClick"];
|
|
64674
|
+
const _hoisted_2$7 = { class: "document-mode-column icon-column" };
|
|
64675
|
+
const _hoisted_3$5 = ["innerHTML"];
|
|
64676
|
+
const _hoisted_4$1 = { class: "document-mode-column text-column" };
|
|
64677
|
+
const _hoisted_5$1 = { class: "document-mode-type" };
|
|
64678
|
+
const _hoisted_6 = { class: "document-mode-description" };
|
|
64443
64679
|
const _sfc_main$a = {
|
|
64444
64680
|
__name: "DocumentMode",
|
|
64445
64681
|
props: {
|
|
@@ -64450,34 +64686,38 @@ const _sfc_main$a = {
|
|
|
64450
64686
|
emits: ["select"],
|
|
64451
64687
|
setup(__props, { emit: __emit }) {
|
|
64452
64688
|
const emit = __emit;
|
|
64689
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
64453
64690
|
const handleClick2 = (item) => {
|
|
64454
64691
|
emit("select", item);
|
|
64455
64692
|
};
|
|
64456
64693
|
return (_ctx, _cache) => {
|
|
64457
|
-
return openBlock(), createElementBlock("div",
|
|
64694
|
+
return openBlock(), createElementBlock("div", {
|
|
64695
|
+
class: normalizeClass(["document-mode", { "high-contrast": unref(isHighContrastMode2) }])
|
|
64696
|
+
}, [
|
|
64458
64697
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.options, (option) => {
|
|
64459
64698
|
return openBlock(), createElementBlock("div", {
|
|
64460
64699
|
class: normalizeClass(["option-item", { disabled: option.disabled }]),
|
|
64461
64700
|
onClick: ($event) => handleClick2(option),
|
|
64462
|
-
"data-item": "btn-documentMode-option"
|
|
64701
|
+
"data-item": "btn-documentMode-option",
|
|
64702
|
+
role: "menuitem"
|
|
64463
64703
|
}, [
|
|
64464
|
-
createBaseVNode("div",
|
|
64704
|
+
createBaseVNode("div", _hoisted_2$7, [
|
|
64465
64705
|
createBaseVNode("div", {
|
|
64466
64706
|
class: "icon-column__icon",
|
|
64467
64707
|
innerHTML: option.icon
|
|
64468
|
-
}, null, 8,
|
|
64708
|
+
}, null, 8, _hoisted_3$5)
|
|
64469
64709
|
]),
|
|
64470
|
-
createBaseVNode("div",
|
|
64471
|
-
createBaseVNode("div",
|
|
64472
|
-
createBaseVNode("div",
|
|
64710
|
+
createBaseVNode("div", _hoisted_4$1, [
|
|
64711
|
+
createBaseVNode("div", _hoisted_5$1, toDisplayString(option.label), 1),
|
|
64712
|
+
createBaseVNode("div", _hoisted_6, toDisplayString(option.description), 1)
|
|
64473
64713
|
])
|
|
64474
|
-
], 10,
|
|
64714
|
+
], 10, _hoisted_1$9);
|
|
64475
64715
|
}), 256))
|
|
64476
|
-
]);
|
|
64716
|
+
], 2);
|
|
64477
64717
|
};
|
|
64478
64718
|
}
|
|
64479
64719
|
};
|
|
64480
|
-
const DocumentMode = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
64720
|
+
const DocumentMode = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-050d9d49"]]);
|
|
64481
64721
|
const _hoisted_1$8 = {
|
|
64482
64722
|
key: 0,
|
|
64483
64723
|
class: "linked-style-buttons"
|
|
@@ -64520,9 +64760,9 @@ const _sfc_main$9 = {
|
|
|
64520
64760
|
}
|
|
64521
64761
|
};
|
|
64522
64762
|
const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-bf5a8c1e"]]);
|
|
64523
|
-
const _hoisted_1$7 = ["onClick"];
|
|
64763
|
+
const _hoisted_1$7 = ["aria-label", "onClick"];
|
|
64524
64764
|
const _hoisted_2$5 = ["innerHTML"];
|
|
64525
|
-
const _hoisted_3$
|
|
64765
|
+
const _hoisted_3$4 = ["innerHTML"];
|
|
64526
64766
|
const _sfc_main$8 = {
|
|
64527
64767
|
__name: "IconGridRow",
|
|
64528
64768
|
props: {
|
|
@@ -64559,12 +64799,15 @@ const _sfc_main$8 = {
|
|
|
64559
64799
|
return openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.icons, (row, rowIndex) => {
|
|
64560
64800
|
return openBlock(), createElementBlock("div", {
|
|
64561
64801
|
class: "option-row",
|
|
64562
|
-
key: rowIndex
|
|
64802
|
+
key: rowIndex,
|
|
64803
|
+
role: "group"
|
|
64563
64804
|
}, [
|
|
64564
64805
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(row, (option, optionIndex) => {
|
|
64565
64806
|
return openBlock(), createElementBlock("div", {
|
|
64566
64807
|
class: "option",
|
|
64567
64808
|
key: optionIndex,
|
|
64809
|
+
"aria-label": option.label,
|
|
64810
|
+
role: "menuitem",
|
|
64568
64811
|
onClick: withModifiers(($event) => handleClick2(option), ["stop", "prevent"])
|
|
64569
64812
|
}, [
|
|
64570
64813
|
createBaseVNode("div", {
|
|
@@ -64577,7 +64820,7 @@ const _sfc_main$8 = {
|
|
|
64577
64820
|
class: "option__check",
|
|
64578
64821
|
innerHTML: unref(toolbarIcons).colorOptionCheck,
|
|
64579
64822
|
style: normalizeStyle(getCheckStyle(option.value, optionIndex))
|
|
64580
|
-
}, null, 12, _hoisted_3$
|
|
64823
|
+
}, null, 12, _hoisted_3$4)) : createCommentVNode("", true)
|
|
64581
64824
|
], 8, _hoisted_1$7);
|
|
64582
64825
|
}), 128))
|
|
64583
64826
|
]);
|
|
@@ -64585,11 +64828,11 @@ const _sfc_main$8 = {
|
|
|
64585
64828
|
};
|
|
64586
64829
|
}
|
|
64587
64830
|
};
|
|
64588
|
-
const IconGridRow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
64831
|
+
const IconGridRow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d96a82fa"]]);
|
|
64589
64832
|
const DropIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z"/></svg>\n';
|
|
64590
64833
|
const _hoisted_1$6 = { class: "options-grid-wrap" };
|
|
64591
64834
|
const _hoisted_2$4 = ["innerHTML"];
|
|
64592
|
-
const _hoisted_3$
|
|
64835
|
+
const _hoisted_3$3 = { class: "option-grid-ctn" };
|
|
64593
64836
|
const _sfc_main$7 = {
|
|
64594
64837
|
__name: "IconGrid",
|
|
64595
64838
|
props: {
|
|
@@ -64621,6 +64864,8 @@ const _sfc_main$7 = {
|
|
|
64621
64864
|
__props.hasNoneIcon ? (openBlock(), createElementBlock("div", {
|
|
64622
64865
|
key: 0,
|
|
64623
64866
|
class: "none-option",
|
|
64867
|
+
role: "menuitem",
|
|
64868
|
+
"aria-label": "Clear color selection",
|
|
64624
64869
|
onClick: _cache[0] || (_cache[0] = ($event) => handleSelect("none"))
|
|
64625
64870
|
}, [
|
|
64626
64871
|
createBaseVNode("span", {
|
|
@@ -64629,7 +64874,7 @@ const _sfc_main$7 = {
|
|
|
64629
64874
|
}, null, 8, _hoisted_2$4),
|
|
64630
64875
|
_cache[1] || (_cache[1] = createTextVNode(" None "))
|
|
64631
64876
|
])) : createCommentVNode("", true),
|
|
64632
|
-
createBaseVNode("div", _hoisted_3$
|
|
64877
|
+
createBaseVNode("div", _hoisted_3$3, [
|
|
64633
64878
|
createVNode(IconGridRow, {
|
|
64634
64879
|
icons: __props.icons,
|
|
64635
64880
|
"active-color": __props.activeColor,
|
|
@@ -64648,7 +64893,7 @@ const _sfc_main$7 = {
|
|
|
64648
64893
|
};
|
|
64649
64894
|
}
|
|
64650
64895
|
};
|
|
64651
|
-
const IconGrid = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
64896
|
+
const IconGrid = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9246bdef"]]);
|
|
64652
64897
|
const closeDropdown$1 = (dropdown) => {
|
|
64653
64898
|
dropdown.expand.value = false;
|
|
64654
64899
|
};
|
|
@@ -64682,84 +64927,83 @@ const renderColorOptions = (superToolbar, button, customIcons = [], hasNoneIcon
|
|
|
64682
64927
|
};
|
|
64683
64928
|
const icons = [
|
|
64684
64929
|
[
|
|
64685
|
-
makeColorOption("#111111"),
|
|
64686
|
-
makeColorOption("#333333"),
|
|
64687
|
-
makeColorOption("#5C5C5C"),
|
|
64688
|
-
makeColorOption("#858585"),
|
|
64689
|
-
makeColorOption("#ADADAD"),
|
|
64690
|
-
makeColorOption("#D6D6D6"),
|
|
64691
|
-
makeColorOption("#FFFFFF")
|
|
64930
|
+
makeColorOption("#111111", "black"),
|
|
64931
|
+
makeColorOption("#333333", "dark gray"),
|
|
64932
|
+
makeColorOption("#5C5C5C", "medium gray"),
|
|
64933
|
+
makeColorOption("#858585", "light gray"),
|
|
64934
|
+
makeColorOption("#ADADAD", "very light gray"),
|
|
64935
|
+
makeColorOption("#D6D6D6", "transparent gray"),
|
|
64936
|
+
makeColorOption("#FFFFFF", "white")
|
|
64692
64937
|
],
|
|
64693
64938
|
[
|
|
64694
|
-
makeColorOption("#860028"),
|
|
64695
|
-
makeColorOption("#D2003F"),
|
|
64696
|
-
makeColorOption("#DB3365"),
|
|
64697
|
-
makeColorOption("#E4668C"),
|
|
64698
|
-
makeColorOption("#ED99B2"),
|
|
64699
|
-
makeColorOption("#F6CCD9"),
|
|
64700
|
-
makeColorOption("#FF004D")
|
|
64939
|
+
makeColorOption("#860028", "dark red"),
|
|
64940
|
+
makeColorOption("#D2003F", "red"),
|
|
64941
|
+
makeColorOption("#DB3365", "coral red"),
|
|
64942
|
+
makeColorOption("#E4668C", "light red"),
|
|
64943
|
+
makeColorOption("#ED99B2", "pale pink"),
|
|
64944
|
+
makeColorOption("#F6CCD9", "transparent pink"),
|
|
64945
|
+
makeColorOption("#FF004D", "bright pink")
|
|
64701
64946
|
],
|
|
64702
64947
|
[
|
|
64703
|
-
makeColorOption("#83015E"),
|
|
64704
|
-
makeColorOption("#CD0194"),
|
|
64705
|
-
makeColorOption("#D734A9"),
|
|
64706
|
-
makeColorOption("#E167BF"),
|
|
64707
|
-
makeColorOption("#EB99D4"),
|
|
64708
|
-
makeColorOption("#F5CCEA"),
|
|
64709
|
-
makeColorOption("#FF00A8")
|
|
64948
|
+
makeColorOption("#83015E", "dark purple"),
|
|
64949
|
+
makeColorOption("#CD0194", "purple"),
|
|
64950
|
+
makeColorOption("#D734A9", "orchid"),
|
|
64951
|
+
makeColorOption("#E167BF", "light purple"),
|
|
64952
|
+
makeColorOption("#EB99D4", "lavender"),
|
|
64953
|
+
makeColorOption("#F5CCEA", "transparent pink"),
|
|
64954
|
+
makeColorOption("#FF00A8", "neon pink")
|
|
64710
64955
|
],
|
|
64711
64956
|
[
|
|
64712
|
-
makeColorOption("#8E220A"),
|
|
64713
|
-
makeColorOption("#DD340F"),
|
|
64714
|
-
makeColorOption("#E45C3F"),
|
|
64715
|
-
makeColorOption("#EB856F"),
|
|
64716
|
-
makeColorOption("#F1AE9F"),
|
|
64717
|
-
makeColorOption("#F8D6CF"),
|
|
64718
|
-
makeColorOption("#FF7A00")
|
|
64957
|
+
makeColorOption("#8E220A", "maroon"),
|
|
64958
|
+
makeColorOption("#DD340F", "red-orange"),
|
|
64959
|
+
makeColorOption("#E45C3F", "burnt orange"),
|
|
64960
|
+
makeColorOption("#EB856F", "peach"),
|
|
64961
|
+
makeColorOption("#F1AE9F", "pale peach"),
|
|
64962
|
+
makeColorOption("#F8D6CF", "transparent peach"),
|
|
64963
|
+
makeColorOption("#FF7A00", "orange")
|
|
64719
64964
|
],
|
|
64720
64965
|
[
|
|
64721
|
-
makeColorOption("#947D02"),
|
|
64722
|
-
makeColorOption("#E7C302"),
|
|
64723
|
-
makeColorOption("#ECCF35"),
|
|
64724
|
-
makeColorOption("#F1DB67"),
|
|
64725
|
-
makeColorOption("#F5E79A"),
|
|
64726
|
-
makeColorOption("#FAF3CC"),
|
|
64727
|
-
makeColorOption("#FAFF09")
|
|
64966
|
+
makeColorOption("#947D02", "olive"),
|
|
64967
|
+
makeColorOption("#E7C302", "mustard yellow"),
|
|
64968
|
+
makeColorOption("#ECCF35", "yellow"),
|
|
64969
|
+
makeColorOption("#F1DB67", "light yellow"),
|
|
64970
|
+
makeColorOption("#F5E79A", "very pale yellow"),
|
|
64971
|
+
makeColorOption("#FAF3CC", "transparent yellow"),
|
|
64972
|
+
makeColorOption("#FAFF09", "neon yellow")
|
|
64728
64973
|
],
|
|
64729
64974
|
[
|
|
64730
|
-
makeColorOption("#055432"),
|
|
64731
|
-
makeColorOption("#07834F"),
|
|
64732
|
-
makeColorOption("#399C72"),
|
|
64733
|
-
makeColorOption("#6AB595"),
|
|
64734
|
-
makeColorOption("#9CCDB9"),
|
|
64735
|
-
makeColorOption("#CDE6DC"),
|
|
64736
|
-
makeColorOption("#05F38F")
|
|
64975
|
+
makeColorOption("#055432", "forest green"),
|
|
64976
|
+
makeColorOption("#07834F", "green"),
|
|
64977
|
+
makeColorOption("#399C72", "medium green"),
|
|
64978
|
+
makeColorOption("#6AB595", "light green"),
|
|
64979
|
+
makeColorOption("#9CCDB9", "mint"),
|
|
64980
|
+
makeColorOption("#CDE6DC", "transparent mint"),
|
|
64981
|
+
makeColorOption("#05F38F", "bright teal")
|
|
64737
64982
|
],
|
|
64738
64983
|
[
|
|
64739
|
-
makeColorOption("#063E7E"),
|
|
64740
|
-
makeColorOption("#0A60C5"),
|
|
64741
|
-
makeColorOption("#3B80D1"),
|
|
64742
|
-
makeColorOption("#6CA0DC"),
|
|
64743
|
-
makeColorOption("#9DBFE8"),
|
|
64744
|
-
makeColorOption("#CEDFF3"),
|
|
64745
|
-
makeColorOption("#21c8ce")
|
|
64984
|
+
makeColorOption("#063E7E", "navy blue"),
|
|
64985
|
+
makeColorOption("#0A60C5", "blue"),
|
|
64986
|
+
makeColorOption("#3B80D1", "sky blue"),
|
|
64987
|
+
makeColorOption("#6CA0DC", "cornflower blue"),
|
|
64988
|
+
makeColorOption("#9DBFE8", "light blue"),
|
|
64989
|
+
makeColorOption("#CEDFF3", "very light blue"),
|
|
64990
|
+
makeColorOption("#21c8ce", "cyan")
|
|
64746
64991
|
],
|
|
64747
64992
|
[
|
|
64748
|
-
makeColorOption("#3E027A"),
|
|
64749
|
-
makeColorOption("#6103BF"),
|
|
64750
|
-
makeColorOption("#8136CC"),
|
|
64751
|
-
makeColorOption("#A068D9"),
|
|
64752
|
-
makeColorOption("#C09AE6"),
|
|
64753
|
-
makeColorOption("#DFCDF2"),
|
|
64754
|
-
makeColorOption("#A91DFF")
|
|
64993
|
+
makeColorOption("#3E027A", "deep purple"),
|
|
64994
|
+
makeColorOption("#6103BF", "indigo"),
|
|
64995
|
+
makeColorOption("#8136CC", "violet"),
|
|
64996
|
+
makeColorOption("#A068D9", "lavender pink"),
|
|
64997
|
+
makeColorOption("#C09AE6", "light lilac"),
|
|
64998
|
+
makeColorOption("#DFCDF2", "transparent lilac"),
|
|
64999
|
+
makeColorOption("#A91DFF", "neon purple")
|
|
64755
65000
|
]
|
|
64756
65001
|
];
|
|
64757
65002
|
const getAvailableColorOptions = () => {
|
|
64758
65003
|
return icons.flat().map((item) => item.value);
|
|
64759
65004
|
};
|
|
64760
|
-
const _hoisted_1$5 =
|
|
64761
|
-
const _hoisted_2$3 = ["
|
|
64762
|
-
const _hoisted_3$3 = { class: "toolbar-table-grid-value" };
|
|
65005
|
+
const _hoisted_1$5 = ["data-cols", "data-rows", "onClick"];
|
|
65006
|
+
const _hoisted_2$3 = ["aria-valuetext"];
|
|
64763
65007
|
const _sfc_main$6 = {
|
|
64764
65008
|
__name: "TableGrid",
|
|
64765
65009
|
emits: ["select", "clickoutside"],
|
|
@@ -64767,6 +65011,7 @@ const _sfc_main$6 = {
|
|
|
64767
65011
|
const emit = __emit;
|
|
64768
65012
|
const selectedRows = ref$1(0);
|
|
64769
65013
|
const selectedCols = ref$1(0);
|
|
65014
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
64770
65015
|
const onTableGridMouseOver = (event) => {
|
|
64771
65016
|
let target = event.target;
|
|
64772
65017
|
let isGrid = !!target.dataset.grid;
|
|
@@ -64794,7 +65039,9 @@ const _sfc_main$6 = {
|
|
|
64794
65039
|
emit("select", { cols, rows });
|
|
64795
65040
|
};
|
|
64796
65041
|
return (_ctx, _cache) => {
|
|
64797
|
-
return openBlock(), createElementBlock("div",
|
|
65042
|
+
return openBlock(), createElementBlock("div", {
|
|
65043
|
+
class: normalizeClass(["toolbar-table-grid-wrapper", { "high-contrast": unref(isHighContrastMode2) }])
|
|
65044
|
+
}, [
|
|
64798
65045
|
createBaseVNode("div", {
|
|
64799
65046
|
class: "toolbar-table-grid",
|
|
64800
65047
|
onMouseover: onTableGridMouseOver,
|
|
@@ -64810,19 +65057,22 @@ const _sfc_main$6 = {
|
|
|
64810
65057
|
"data-rows": i,
|
|
64811
65058
|
"data-item": "true",
|
|
64812
65059
|
onClick: withModifiers(($event) => handleClick2({ cols: n2, rows: i }), ["stop", "prevent"])
|
|
64813
|
-
}, null, 8,
|
|
65060
|
+
}, null, 8, _hoisted_1$5);
|
|
64814
65061
|
}), 64))
|
|
64815
65062
|
], 64);
|
|
64816
65063
|
}), 64))
|
|
64817
65064
|
], 32),
|
|
64818
|
-
createBaseVNode("div",
|
|
64819
|
-
|
|
65065
|
+
createBaseVNode("div", {
|
|
65066
|
+
class: "toolbar-table-grid-value",
|
|
65067
|
+
"aria-valuetext": `${selectedRows.value} x ${selectedCols.value}`
|
|
65068
|
+
}, toDisplayString(selectedRows.value) + " x " + toDisplayString(selectedCols.value), 9, _hoisted_2$3)
|
|
65069
|
+
], 2);
|
|
64820
65070
|
};
|
|
64821
65071
|
}
|
|
64822
65072
|
};
|
|
64823
|
-
const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
65073
|
+
const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-617bf152"]]);
|
|
64824
65074
|
const _hoisted_1$4 = { class: "toolbar-table-actions" };
|
|
64825
|
-
const _hoisted_2$2 = ["onClick", "data-item"];
|
|
65075
|
+
const _hoisted_2$2 = ["onClick", "data-item", "ariaLabel"];
|
|
64826
65076
|
const _hoisted_3$2 = { class: "toolbar-table-actions__icon" };
|
|
64827
65077
|
const _hoisted_4 = ["innerHTML"];
|
|
64828
65078
|
const _hoisted_5 = { class: "toolbar-table-actions__label" };
|
|
@@ -64845,7 +65095,9 @@ const _sfc_main$5 = {
|
|
|
64845
65095
|
return openBlock(), createElementBlock("div", {
|
|
64846
65096
|
class: normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": option.bottomBorder }]),
|
|
64847
65097
|
onClick: ($event) => handleClick2(option),
|
|
64848
|
-
"data-item": option.props?.["data-item"] || ""
|
|
65098
|
+
"data-item": option.props?.["data-item"] || "",
|
|
65099
|
+
ariaLabel: option.props?.ariaLabel,
|
|
65100
|
+
role: "menuitem"
|
|
64849
65101
|
}, [
|
|
64850
65102
|
createBaseVNode("div", _hoisted_3$2, [
|
|
64851
65103
|
createBaseVNode("div", {
|
|
@@ -64860,7 +65112,7 @@ const _sfc_main$5 = {
|
|
|
64860
65112
|
};
|
|
64861
65113
|
}
|
|
64862
65114
|
};
|
|
64863
|
-
const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
65115
|
+
const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f82e859a"]]);
|
|
64864
65116
|
const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>\n';
|
|
64865
65117
|
const _hoisted_1$3 = { class: "search-input-ctn" };
|
|
64866
65118
|
const _hoisted_2$1 = { class: "row" };
|
|
@@ -64961,7 +65213,10 @@ const makeDefaultItems = ({
|
|
|
64961
65213
|
name: "bold",
|
|
64962
65214
|
command: "toggleBold",
|
|
64963
65215
|
icon: toolbarIcons2.bold,
|
|
64964
|
-
tooltip: toolbarTexts2.bold
|
|
65216
|
+
tooltip: toolbarTexts2.bold,
|
|
65217
|
+
attributes: {
|
|
65218
|
+
ariaLabel: "Bold"
|
|
65219
|
+
}
|
|
64965
65220
|
});
|
|
64966
65221
|
const fontButton = useToolbarItem({
|
|
64967
65222
|
type: "dropdown",
|
|
@@ -64976,6 +65231,9 @@ const makeDefaultItems = ({
|
|
|
64976
65231
|
isWide: true,
|
|
64977
65232
|
style: { width: "116px" },
|
|
64978
65233
|
suppressActiveHighlight: true,
|
|
65234
|
+
attributes: {
|
|
65235
|
+
ariaLabel: "Font family"
|
|
65236
|
+
},
|
|
64979
65237
|
options: [...toolbarFonts ? toolbarFonts : TOOLBAR_FONTS],
|
|
64980
65238
|
onActivate: ({ fontFamily: fontFamily2 }) => {
|
|
64981
65239
|
if (!fontFamily2) return;
|
|
@@ -64996,6 +65254,9 @@ const makeDefaultItems = ({
|
|
|
64996
65254
|
hasCaret: false,
|
|
64997
65255
|
isWide: true,
|
|
64998
65256
|
suppressActiveHighlight: true,
|
|
65257
|
+
attributes: {
|
|
65258
|
+
ariaLabel: "AI"
|
|
65259
|
+
},
|
|
64999
65260
|
options: [
|
|
65000
65261
|
{
|
|
65001
65262
|
type: "render",
|
|
@@ -65043,6 +65304,9 @@ const makeDefaultItems = ({
|
|
|
65043
65304
|
suppressActiveHighlight: true,
|
|
65044
65305
|
isWide: true,
|
|
65045
65306
|
command: "setFontSize",
|
|
65307
|
+
attributes: {
|
|
65308
|
+
ariaLabel: "Font size"
|
|
65309
|
+
},
|
|
65046
65310
|
options: [
|
|
65047
65311
|
{ label: "8", key: "8pt", props: { "data-item": "btn-fontSize-option" } },
|
|
65048
65312
|
{ label: "9", key: "9pt", props: { "data-item": "btn-fontSize-option" } },
|
|
@@ -65078,14 +65342,20 @@ const makeDefaultItems = ({
|
|
|
65078
65342
|
name: "italic",
|
|
65079
65343
|
command: "toggleItalic",
|
|
65080
65344
|
icon: toolbarIcons2.italic,
|
|
65081
|
-
tooltip: toolbarTexts2.italic
|
|
65345
|
+
tooltip: toolbarTexts2.italic,
|
|
65346
|
+
attributes: {
|
|
65347
|
+
ariaLabel: "Italic"
|
|
65348
|
+
}
|
|
65082
65349
|
});
|
|
65083
65350
|
const underline = useToolbarItem({
|
|
65084
65351
|
type: "button",
|
|
65085
65352
|
name: "underline",
|
|
65086
65353
|
command: "toggleUnderline",
|
|
65087
65354
|
icon: toolbarIcons2.underline,
|
|
65088
|
-
tooltip: toolbarTexts2.underline
|
|
65355
|
+
tooltip: toolbarTexts2.underline,
|
|
65356
|
+
attributes: {
|
|
65357
|
+
ariaLabel: "Underline"
|
|
65358
|
+
}
|
|
65089
65359
|
});
|
|
65090
65360
|
const highlight = useToolbarItem({
|
|
65091
65361
|
type: "dropdown",
|
|
@@ -65098,6 +65368,9 @@ const makeDefaultItems = ({
|
|
|
65098
65368
|
command: "setHighlight",
|
|
65099
65369
|
noArgumentCommand: "unsetHighlight",
|
|
65100
65370
|
suppressActiveHighlight: true,
|
|
65371
|
+
attributes: {
|
|
65372
|
+
ariaLabel: "Highlight"
|
|
65373
|
+
},
|
|
65101
65374
|
options: [
|
|
65102
65375
|
{
|
|
65103
65376
|
key: "color",
|
|
@@ -65120,6 +65393,9 @@ const makeDefaultItems = ({
|
|
|
65120
65393
|
tooltip: toolbarTexts2.color,
|
|
65121
65394
|
command: "setColor",
|
|
65122
65395
|
suppressActiveHighlight: true,
|
|
65396
|
+
attributes: {
|
|
65397
|
+
ariaLabel: "Color"
|
|
65398
|
+
},
|
|
65123
65399
|
options: [
|
|
65124
65400
|
{
|
|
65125
65401
|
key: "color",
|
|
@@ -65140,6 +65416,9 @@ const makeDefaultItems = ({
|
|
|
65140
65416
|
tooltip: toolbarTexts2.search,
|
|
65141
65417
|
group: "right",
|
|
65142
65418
|
inputRef: searchRef,
|
|
65419
|
+
attributes: {
|
|
65420
|
+
ariaLabel: "Search"
|
|
65421
|
+
},
|
|
65143
65422
|
options: [
|
|
65144
65423
|
{
|
|
65145
65424
|
type: "render",
|
|
@@ -65165,6 +65444,9 @@ const makeDefaultItems = ({
|
|
|
65165
65444
|
markName: "link",
|
|
65166
65445
|
icon: toolbarIcons2.link,
|
|
65167
65446
|
tooltip: toolbarTexts2.link,
|
|
65447
|
+
attributes: {
|
|
65448
|
+
ariaLabel: "Link dropdown"
|
|
65449
|
+
},
|
|
65168
65450
|
options: [
|
|
65169
65451
|
{
|
|
65170
65452
|
type: "render",
|
|
@@ -65218,7 +65500,10 @@ const makeDefaultItems = ({
|
|
|
65218
65500
|
command: "startImageUpload",
|
|
65219
65501
|
icon: toolbarIcons2.image,
|
|
65220
65502
|
tooltip: toolbarTexts2.image,
|
|
65221
|
-
disabled: false
|
|
65503
|
+
disabled: false,
|
|
65504
|
+
attributes: {
|
|
65505
|
+
ariaLabel: "Image"
|
|
65506
|
+
}
|
|
65222
65507
|
});
|
|
65223
65508
|
const tableItem = useToolbarItem({
|
|
65224
65509
|
type: "dropdown",
|
|
@@ -65229,6 +65514,9 @@ const makeDefaultItems = ({
|
|
|
65229
65514
|
tooltip: toolbarTexts2.table,
|
|
65230
65515
|
command: "insertTable",
|
|
65231
65516
|
suppressActiveHighlight: true,
|
|
65517
|
+
attributes: {
|
|
65518
|
+
ariaLabel: "Table"
|
|
65519
|
+
},
|
|
65232
65520
|
options: [
|
|
65233
65521
|
{
|
|
65234
65522
|
key: "table",
|
|
@@ -65255,6 +65543,9 @@ const makeDefaultItems = ({
|
|
|
65255
65543
|
icon: toolbarIcons2.tableActions,
|
|
65256
65544
|
hideLabel: true,
|
|
65257
65545
|
disabled: true,
|
|
65546
|
+
attributes: {
|
|
65547
|
+
ariaLabel: "Table actions"
|
|
65548
|
+
},
|
|
65258
65549
|
options: [
|
|
65259
65550
|
{
|
|
65260
65551
|
type: "render",
|
|
@@ -65267,69 +65558,102 @@ const makeDefaultItems = ({
|
|
|
65267
65558
|
label: toolbarTexts2.addRowBefore,
|
|
65268
65559
|
command: "addRowBefore",
|
|
65269
65560
|
icon: toolbarIcons2.addRowBefore,
|
|
65270
|
-
props: {
|
|
65561
|
+
props: {
|
|
65562
|
+
"data-item": "btn-tableActions-option",
|
|
65563
|
+
ariaLabel: "Add row before"
|
|
65564
|
+
}
|
|
65271
65565
|
},
|
|
65272
65566
|
{
|
|
65273
65567
|
label: toolbarTexts2.addRowAfter,
|
|
65274
65568
|
command: "addRowAfter",
|
|
65275
65569
|
icon: toolbarIcons2.addRowAfter,
|
|
65276
|
-
props: {
|
|
65570
|
+
props: {
|
|
65571
|
+
"data-item": "btn-tableActions-option",
|
|
65572
|
+
ariaLabel: "Add row after"
|
|
65573
|
+
}
|
|
65277
65574
|
},
|
|
65278
65575
|
{
|
|
65279
65576
|
label: toolbarTexts2.addColumnBefore,
|
|
65280
65577
|
command: "addColumnBefore",
|
|
65281
65578
|
icon: toolbarIcons2.addColumnBefore,
|
|
65282
|
-
props: {
|
|
65579
|
+
props: {
|
|
65580
|
+
"data-item": "btn-tableActions-option",
|
|
65581
|
+
ariaLabel: "Add column before"
|
|
65582
|
+
}
|
|
65283
65583
|
},
|
|
65284
65584
|
{
|
|
65285
65585
|
label: toolbarTexts2.addColumnAfter,
|
|
65286
65586
|
command: "addColumnAfter",
|
|
65287
65587
|
icon: toolbarIcons2.addColumnAfter,
|
|
65288
65588
|
bottomBorder: true,
|
|
65289
|
-
props: {
|
|
65589
|
+
props: {
|
|
65590
|
+
"data-item": "btn-tableActions-option",
|
|
65591
|
+
ariaLabel: "Add column after"
|
|
65592
|
+
}
|
|
65290
65593
|
},
|
|
65291
65594
|
{
|
|
65292
65595
|
label: toolbarTexts2.deleteRow,
|
|
65293
65596
|
command: "deleteRow",
|
|
65294
65597
|
icon: toolbarIcons2.deleteRow,
|
|
65295
|
-
props: {
|
|
65598
|
+
props: {
|
|
65599
|
+
"data-item": "btn-tableActions-option",
|
|
65600
|
+
ariaLabel: "Delete row"
|
|
65601
|
+
}
|
|
65296
65602
|
},
|
|
65297
65603
|
{
|
|
65298
65604
|
label: toolbarTexts2.deleteColumn,
|
|
65299
65605
|
command: "deleteColumn",
|
|
65300
65606
|
icon: toolbarIcons2.deleteColumn,
|
|
65301
|
-
props: {
|
|
65607
|
+
props: {
|
|
65608
|
+
"data-item": "btn-tableActions-option",
|
|
65609
|
+
ariaLabel: "Delete column"
|
|
65610
|
+
}
|
|
65302
65611
|
},
|
|
65303
65612
|
{
|
|
65304
65613
|
label: toolbarTexts2.deleteTable,
|
|
65305
65614
|
command: "deleteTable",
|
|
65306
65615
|
icon: toolbarIcons2.deleteTable,
|
|
65307
|
-
props: {
|
|
65616
|
+
props: {
|
|
65617
|
+
"data-item": "btn-tableActions-option",
|
|
65618
|
+
ariaLabel: "Delete table"
|
|
65619
|
+
}
|
|
65308
65620
|
},
|
|
65309
65621
|
{
|
|
65310
65622
|
label: toolbarTexts2.transparentBorders,
|
|
65311
65623
|
command: "deleteCellAndTableBorders",
|
|
65312
65624
|
icon: toolbarIcons2.deleteBorders,
|
|
65313
65625
|
bottomBorder: true,
|
|
65314
|
-
props: {
|
|
65626
|
+
props: {
|
|
65627
|
+
"data-item": "btn-tableActions-option",
|
|
65628
|
+
ariaLabel: "Delete cell and table borders"
|
|
65629
|
+
}
|
|
65315
65630
|
},
|
|
65316
65631
|
{
|
|
65317
65632
|
label: toolbarTexts2.mergeCells,
|
|
65318
65633
|
command: "mergeCells",
|
|
65319
65634
|
icon: toolbarIcons2.mergeCells,
|
|
65320
|
-
props: {
|
|
65635
|
+
props: {
|
|
65636
|
+
"data-item": "btn-tableActions-option",
|
|
65637
|
+
ariaLabel: "Merge cells"
|
|
65638
|
+
}
|
|
65321
65639
|
},
|
|
65322
65640
|
{
|
|
65323
65641
|
label: toolbarTexts2.splitCell,
|
|
65324
65642
|
command: "splitCell",
|
|
65325
65643
|
icon: toolbarIcons2.splitCell,
|
|
65326
|
-
props: {
|
|
65644
|
+
props: {
|
|
65645
|
+
"data-item": "btn-tableActions-option",
|
|
65646
|
+
ariaLabel: "Split cells"
|
|
65647
|
+
}
|
|
65327
65648
|
},
|
|
65328
65649
|
{
|
|
65329
65650
|
label: toolbarTexts2.fixTables,
|
|
65330
65651
|
command: "fixTables",
|
|
65331
65652
|
icon: toolbarIcons2.fixTables,
|
|
65332
|
-
props: {
|
|
65653
|
+
props: {
|
|
65654
|
+
"data-item": "btn-tableActions-option",
|
|
65655
|
+
ariaLabel: "Fix tables"
|
|
65656
|
+
}
|
|
65333
65657
|
}
|
|
65334
65658
|
];
|
|
65335
65659
|
function renderTableActions(tableActionsItem2) {
|
|
@@ -65352,6 +65676,9 @@ const makeDefaultItems = ({
|
|
|
65352
65676
|
markName: "textAlign",
|
|
65353
65677
|
labelAttr: "textAlign",
|
|
65354
65678
|
suppressActiveHighlight: true,
|
|
65679
|
+
attributes: {
|
|
65680
|
+
ariaLabel: "Text align"
|
|
65681
|
+
},
|
|
65355
65682
|
options: [
|
|
65356
65683
|
{
|
|
65357
65684
|
type: "render",
|
|
@@ -65395,14 +65722,20 @@ const makeDefaultItems = ({
|
|
|
65395
65722
|
name: "list",
|
|
65396
65723
|
command: "toggleBulletList",
|
|
65397
65724
|
icon: toolbarIcons2.bulletList,
|
|
65398
|
-
tooltip: toolbarTexts2.bulletList
|
|
65725
|
+
tooltip: toolbarTexts2.bulletList,
|
|
65726
|
+
attributes: {
|
|
65727
|
+
ariaLabel: "Bullet list"
|
|
65728
|
+
}
|
|
65399
65729
|
});
|
|
65400
65730
|
const numberedList = useToolbarItem({
|
|
65401
65731
|
type: "button",
|
|
65402
65732
|
name: "numberedlist",
|
|
65403
65733
|
command: "toggleOrderedList",
|
|
65404
65734
|
icon: toolbarIcons2.numberedList,
|
|
65405
|
-
tooltip: toolbarTexts2.numberedList
|
|
65735
|
+
tooltip: toolbarTexts2.numberedList,
|
|
65736
|
+
attributes: {
|
|
65737
|
+
ariaLabel: "Numbered list"
|
|
65738
|
+
}
|
|
65406
65739
|
});
|
|
65407
65740
|
const indentLeft = useToolbarItem({
|
|
65408
65741
|
type: "button",
|
|
@@ -65410,7 +65743,10 @@ const makeDefaultItems = ({
|
|
|
65410
65743
|
command: "decreaseTextIndent",
|
|
65411
65744
|
icon: toolbarIcons2.indentLeft,
|
|
65412
65745
|
tooltip: toolbarTexts2.indentLeft,
|
|
65413
|
-
disabled: false
|
|
65746
|
+
disabled: false,
|
|
65747
|
+
attributes: {
|
|
65748
|
+
ariaLabel: "Left indent"
|
|
65749
|
+
}
|
|
65414
65750
|
});
|
|
65415
65751
|
const indentRight = useToolbarItem({
|
|
65416
65752
|
type: "button",
|
|
@@ -65418,14 +65754,20 @@ const makeDefaultItems = ({
|
|
|
65418
65754
|
command: "increaseTextIndent",
|
|
65419
65755
|
icon: toolbarIcons2.indentRight,
|
|
65420
65756
|
tooltip: toolbarTexts2.indentRight,
|
|
65421
|
-
disabled: false
|
|
65757
|
+
disabled: false,
|
|
65758
|
+
attributes: {
|
|
65759
|
+
ariaLabel: "Right indent"
|
|
65760
|
+
}
|
|
65422
65761
|
});
|
|
65423
65762
|
const overflow = useToolbarItem({
|
|
65424
65763
|
type: "overflow",
|
|
65425
65764
|
name: "overflow",
|
|
65426
65765
|
command: "toggleOverflow",
|
|
65427
65766
|
icon: toolbarIcons2.overflow,
|
|
65428
|
-
disabled: false
|
|
65767
|
+
disabled: false,
|
|
65768
|
+
attributes: {
|
|
65769
|
+
ariaLabel: "Overflow items"
|
|
65770
|
+
}
|
|
65429
65771
|
});
|
|
65430
65772
|
const zoom = useToolbarItem({
|
|
65431
65773
|
type: "dropdown",
|
|
@@ -65439,6 +65781,9 @@ const makeDefaultItems = ({
|
|
|
65439
65781
|
isWide: true,
|
|
65440
65782
|
inlineTextInputVisible: false,
|
|
65441
65783
|
hasInlineTextInput: true,
|
|
65784
|
+
attributes: {
|
|
65785
|
+
ariaLabel: "Zoom"
|
|
65786
|
+
},
|
|
65442
65787
|
options: [
|
|
65443
65788
|
{ label: "50%", key: 0.5, props: { "data-item": "btn-zoom-option" } },
|
|
65444
65789
|
{ label: "75%", key: 0.75, props: { "data-item": "btn-zoom-option" } },
|
|
@@ -65461,6 +65806,9 @@ const makeDefaultItems = ({
|
|
|
65461
65806
|
command: "undo",
|
|
65462
65807
|
icon: toolbarIcons2.undo,
|
|
65463
65808
|
group: "left",
|
|
65809
|
+
attributes: {
|
|
65810
|
+
ariaLabel: "Undo"
|
|
65811
|
+
},
|
|
65464
65812
|
onDeactivate: () => {
|
|
65465
65813
|
undo2.disabled.value = !superToolbar.undoDepth;
|
|
65466
65814
|
}
|
|
@@ -65473,6 +65821,9 @@ const makeDefaultItems = ({
|
|
|
65473
65821
|
command: "redo",
|
|
65474
65822
|
icon: toolbarIcons2.redo,
|
|
65475
65823
|
group: "left",
|
|
65824
|
+
attributes: {
|
|
65825
|
+
ariaLabel: "Redo"
|
|
65826
|
+
},
|
|
65476
65827
|
onDeactivate: () => {
|
|
65477
65828
|
redo2.disabled.value = !superToolbar.redoDepth;
|
|
65478
65829
|
}
|
|
@@ -65484,7 +65835,10 @@ const makeDefaultItems = ({
|
|
|
65484
65835
|
tooltip: toolbarTexts2.trackChanges,
|
|
65485
65836
|
command: "toggleTrackChanges",
|
|
65486
65837
|
icon: toolbarIcons2.trackChanges,
|
|
65487
|
-
group: "left"
|
|
65838
|
+
group: "left",
|
|
65839
|
+
attributes: {
|
|
65840
|
+
ariaLabel: "Track changes"
|
|
65841
|
+
}
|
|
65488
65842
|
});
|
|
65489
65843
|
const acceptTrackedChangeBySelection = useToolbarItem({
|
|
65490
65844
|
type: "button",
|
|
@@ -65493,7 +65847,10 @@ const makeDefaultItems = ({
|
|
|
65493
65847
|
tooltip: toolbarTexts2.trackChangesAccept,
|
|
65494
65848
|
command: "acceptTrackedChangeBySelection",
|
|
65495
65849
|
icon: toolbarIcons2.trackChangesAccept,
|
|
65496
|
-
group: "left"
|
|
65850
|
+
group: "left",
|
|
65851
|
+
attributes: {
|
|
65852
|
+
ariaLabel: "Accept tracked changes"
|
|
65853
|
+
}
|
|
65497
65854
|
});
|
|
65498
65855
|
const rejectTrackedChangeOnSelection = useToolbarItem({
|
|
65499
65856
|
type: "button",
|
|
@@ -65502,7 +65859,10 @@ const makeDefaultItems = ({
|
|
|
65502
65859
|
tooltip: toolbarTexts2.trackChangesReject,
|
|
65503
65860
|
command: "rejectTrackedChangeOnSelection",
|
|
65504
65861
|
icon: toolbarIcons2.trackChangesReject,
|
|
65505
|
-
group: "left"
|
|
65862
|
+
group: "left",
|
|
65863
|
+
attributes: {
|
|
65864
|
+
ariaLabel: "Reject tracked changes"
|
|
65865
|
+
}
|
|
65506
65866
|
});
|
|
65507
65867
|
const toggleTrackChangesOriginal = useToolbarItem({
|
|
65508
65868
|
type: "button",
|
|
@@ -65511,7 +65871,10 @@ const makeDefaultItems = ({
|
|
|
65511
65871
|
tooltip: toolbarTexts2.trackChangesOriginal,
|
|
65512
65872
|
command: "toggleTrackChangesShowOriginal",
|
|
65513
65873
|
icon: toolbarIcons2.trackChangesOriginal,
|
|
65514
|
-
group: "left"
|
|
65874
|
+
group: "left",
|
|
65875
|
+
attributes: {
|
|
65876
|
+
ariaLabel: "Toggle tracked changes show original"
|
|
65877
|
+
}
|
|
65515
65878
|
});
|
|
65516
65879
|
const toggleTrackChangesFinal = useToolbarItem({
|
|
65517
65880
|
type: "button",
|
|
@@ -65520,14 +65883,20 @@ const makeDefaultItems = ({
|
|
|
65520
65883
|
tooltip: toolbarTexts2.trackChangesFinal,
|
|
65521
65884
|
command: "toggleTrackChangesShowFinal",
|
|
65522
65885
|
icon: toolbarIcons2.trackChangesFinal,
|
|
65523
|
-
group: "left"
|
|
65886
|
+
group: "left",
|
|
65887
|
+
attributes: {
|
|
65888
|
+
ariaLabel: "Toggle tracked changes show final"
|
|
65889
|
+
}
|
|
65524
65890
|
});
|
|
65525
65891
|
const clearFormatting = useToolbarItem({
|
|
65526
65892
|
type: "button",
|
|
65527
65893
|
name: "clearFormatting",
|
|
65528
65894
|
command: "clearFormat",
|
|
65529
65895
|
tooltip: toolbarTexts2.clearFormatting,
|
|
65530
|
-
icon: toolbarIcons2.clearFormatting
|
|
65896
|
+
icon: toolbarIcons2.clearFormatting,
|
|
65897
|
+
attributes: {
|
|
65898
|
+
ariaLabel: "Clear formatting"
|
|
65899
|
+
}
|
|
65531
65900
|
});
|
|
65532
65901
|
[
|
|
65533
65902
|
bold,
|
|
@@ -65543,7 +65912,10 @@ const makeDefaultItems = ({
|
|
|
65543
65912
|
name: "copyFormat",
|
|
65544
65913
|
tooltip: toolbarTexts2.copyFormat,
|
|
65545
65914
|
icon: toolbarIcons2.copyFormat,
|
|
65546
|
-
command: "copyFormat"
|
|
65915
|
+
command: "copyFormat",
|
|
65916
|
+
attributes: {
|
|
65917
|
+
ariaLabel: "Copy formatting"
|
|
65918
|
+
}
|
|
65547
65919
|
});
|
|
65548
65920
|
const getDocumentOptionsAfterRole = (role2, documentOptions2) => {
|
|
65549
65921
|
if (role2 === "editor") return documentOptions2;
|
|
@@ -65572,7 +65944,8 @@ const makeDefaultItems = ({
|
|
|
65572
65944
|
disabled: role !== "editor",
|
|
65573
65945
|
attributes: {
|
|
65574
65946
|
dropdownPosition: "right",
|
|
65575
|
-
className: "toolbar-item--doc-mode"
|
|
65947
|
+
className: "toolbar-item--doc-mode",
|
|
65948
|
+
ariaLabel: "Document mode"
|
|
65576
65949
|
},
|
|
65577
65950
|
options: [
|
|
65578
65951
|
{
|
|
@@ -65619,7 +65992,10 @@ const makeDefaultItems = ({
|
|
|
65619
65992
|
name: "pageBreakTool",
|
|
65620
65993
|
command: "insertPageBreak",
|
|
65621
65994
|
icon: toolbarIcons2.pageBreak,
|
|
65622
|
-
tooltip: toolbarTexts2.pageBreak
|
|
65995
|
+
tooltip: toolbarTexts2.pageBreak,
|
|
65996
|
+
attributes: {
|
|
65997
|
+
ariaLabel: "Page break"
|
|
65998
|
+
}
|
|
65623
65999
|
});
|
|
65624
66000
|
const controlSizes = /* @__PURE__ */ new Map([
|
|
65625
66001
|
["separator", 20],
|
|
@@ -65637,7 +66013,10 @@ const makeDefaultItems = ({
|
|
|
65637
66013
|
name: "ruler",
|
|
65638
66014
|
command: "toggleRuler",
|
|
65639
66015
|
icon: toolbarIcons2.ruler,
|
|
65640
|
-
tooltip: toolbarTexts2.ruler
|
|
66016
|
+
tooltip: toolbarTexts2.ruler,
|
|
66017
|
+
attributes: {
|
|
66018
|
+
ariaLabel: "Ruler"
|
|
66019
|
+
}
|
|
65641
66020
|
});
|
|
65642
66021
|
const selectedLinkedStyle = ref$1(null);
|
|
65643
66022
|
const linkedStyles = useToolbarItem({
|
|
@@ -65653,7 +66032,8 @@ const makeDefaultItems = ({
|
|
|
65653
66032
|
suppressActiveHighlight: true,
|
|
65654
66033
|
disabled: false,
|
|
65655
66034
|
attributes: {
|
|
65656
|
-
className: "toolbar-item--linked-styles"
|
|
66035
|
+
className: "toolbar-item--linked-styles",
|
|
66036
|
+
ariaLabel: "Linked styles"
|
|
65657
66037
|
},
|
|
65658
66038
|
options: [
|
|
65659
66039
|
{
|
|
@@ -65700,6 +66080,9 @@ const makeDefaultItems = ({
|
|
|
65700
66080
|
command: "setLineHeight",
|
|
65701
66081
|
dropdownValueKey: "key",
|
|
65702
66082
|
selectedValue: "1",
|
|
66083
|
+
attributes: {
|
|
66084
|
+
ariaLabel: "Line height"
|
|
66085
|
+
},
|
|
65703
66086
|
options: [
|
|
65704
66087
|
{ label: "1,0", key: "1", icon: () => renderIcon("1", lineHeight2.selectedValue), props: { "data-item": "btn-lineHeight-option" } },
|
|
65705
66088
|
{ label: "1,15", key: "1.15", icon: () => renderIcon("1.15", lineHeight2.selectedValue), props: { "data-item": "btn-lineHeight-option" } },
|
|
@@ -67017,7 +67400,8 @@ const _sfc_main$2 = {
|
|
|
67017
67400
|
createBaseVNode("div", {
|
|
67018
67401
|
ref_key: "editorElem",
|
|
67019
67402
|
ref: editorElem,
|
|
67020
|
-
class: "editor-element super-editor__element"
|
|
67403
|
+
class: "editor-element super-editor__element",
|
|
67404
|
+
role: "presentation"
|
|
67021
67405
|
}, null, 512)
|
|
67022
67406
|
], 544),
|
|
67023
67407
|
!editorReady.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
@@ -67069,7 +67453,7 @@ const _sfc_main$2 = {
|
|
|
67069
67453
|
};
|
|
67070
67454
|
}
|
|
67071
67455
|
};
|
|
67072
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
67456
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f27b7c30"]]);
|
|
67073
67457
|
const _sfc_main$1 = {
|
|
67074
67458
|
__name: "BasicUpload",
|
|
67075
67459
|
emits: ["file-change"],
|
|
@@ -67196,18 +67580,19 @@ export {
|
|
|
67196
67580
|
SuperConverter as S,
|
|
67197
67581
|
Toolbar as T,
|
|
67198
67582
|
_sfc_main$1 as _,
|
|
67199
|
-
|
|
67200
|
-
|
|
67201
|
-
|
|
67202
|
-
|
|
67203
|
-
|
|
67204
|
-
|
|
67205
|
-
|
|
67206
|
-
|
|
67583
|
+
AnnotatorHelpers as a,
|
|
67584
|
+
Extensions as b,
|
|
67585
|
+
SuperEditor as c,
|
|
67586
|
+
SuperInput as d,
|
|
67587
|
+
SuperToolbar as e,
|
|
67588
|
+
TrackChangesBasePluginKey as f,
|
|
67589
|
+
createZip as g,
|
|
67590
|
+
getActiveFormatting as h,
|
|
67207
67591
|
index$1 as i,
|
|
67208
|
-
|
|
67209
|
-
|
|
67210
|
-
|
|
67211
|
-
|
|
67212
|
-
|
|
67592
|
+
getAllowedImageDimensions as j,
|
|
67593
|
+
getMarksFromSelection as k,
|
|
67594
|
+
getRichTextExtensions as l,
|
|
67595
|
+
getStarterExtensions as m,
|
|
67596
|
+
helpers as n,
|
|
67597
|
+
index as o
|
|
67213
67598
|
};
|