@coco-vexel/coco-office-editor 1.0.1 → 1.0.2
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/README.md +33 -1
- package/dist/index.cjs +352 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +353 -101
- package/dist/index.js.map +1 -1
- package/dist/{model-DB6aN6uJ.d.cts → model-DNNBhhCB.d.cts} +4 -3
- package/dist/{model-DB6aN6uJ.d.ts → model-DNNBhhCB.d.ts} +4 -3
- package/dist/{native-B6B649CC.d.ts → native-OrEUvS8p.d.ts} +5 -1
- package/dist/native-TMv552dv.d.cts +317 -0
- package/dist/native-TMv552dv.d.ts +317 -0
- package/dist/{native-Ct9nN06K.d.cts → native-f2y3N8N5.d.cts} +5 -1
- package/dist/ppt-native.cjs +129 -59
- package/dist/ppt-native.cjs.map +1 -1
- package/dist/ppt-native.d.cts +1 -1
- package/dist/ppt-native.d.ts +1 -1
- package/dist/ppt-native.js +130 -60
- package/dist/ppt-native.js.map +1 -1
- package/dist/ppt.cjs +129 -58
- package/dist/ppt.cjs.map +1 -1
- package/dist/ppt.d.cts +3 -306
- package/dist/ppt.d.ts +3 -306
- package/dist/ppt.js +130 -60
- package/dist/ppt.js.map +1 -1
- package/dist/read-only-1_LQCO1d.d.cts +7 -0
- package/dist/read-only-1_LQCO1d.d.ts +7 -0
- package/dist/spreadsheet.cjs +114 -17
- package/dist/spreadsheet.cjs.map +1 -1
- package/dist/spreadsheet.d.cts +15 -3
- package/dist/spreadsheet.d.ts +15 -3
- package/dist/spreadsheet.js +114 -18
- package/dist/spreadsheet.js.map +1 -1
- package/dist/word-editing.d.cts +1 -1
- package/dist/word-editing.d.ts +1 -1
- package/dist/word-native.cjs +132 -23
- package/dist/word-native.cjs.map +1 -1
- package/dist/word-native.d.cts +2 -2
- package/dist/word-native.d.ts +2 -2
- package/dist/word-native.js +132 -23
- package/dist/word-native.js.map +1 -1
- package/dist/word-prosemirror.d.cts +1 -1
- package/dist/word-prosemirror.d.ts +1 -1
- package/dist/word.cjs +145 -23
- package/dist/word.cjs.map +1 -1
- package/dist/word.d.cts +5 -4
- package/dist/word.d.ts +5 -4
- package/dist/word.js +145 -24
- package/dist/word.js.map +1 -1
- package/package.json +3 -3
- package/src/styles/editor.css +1 -0
package/dist/word-native.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './model-
|
|
2
|
-
export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, x as NativeWordBlockNode, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, B as NativeWordDocument, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, J as NativeWordListType, K as NativeWordPageBreakNode, L as NativeWordParagraphNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeListIndent, b4 as nativeListType, b5 as nativeMergeTableCells, b6 as nativeNumberingAtLevel, b7 as nativePageBreakAt, b8 as nativeParagraphText, b9 as nativeRangeContainsPageBreak, ba as nativeReplaceBlockRangeAcrossParagraphs, bb as nativeReplaceRange, bc as nativeReplaceRangeWithBlocks, bd as nativeReplaceTableCellRangeContent, be as nativeReplaceTableCellRangeText, bf as nativeReplaceTextRangeAcrossParagraphs, bg as nativeReplaceTextRangeWithParagraphs, bh as nativeResolveFormatRevision, bi as nativeResolveImageFormatRevision, bj as nativeResolveImageRevision, bk as nativeResolveRevision, bl as nativeSelection, bm as nativeSelectionFromCursor, bn as nativeSetHyperlink, bo as nativeSetImageSize, bp as nativeSetParagraphFormat, bq as nativeSetParagraphList, br as nativeSetRunFormat, bs as nativeSetTableCellFormat, bt as nativeSetTableCellRangeFormat, bu as nativeSplitParagraph, bv as nativeSplitTableCell, bw as nativeSyncParagraphText, bx as nativeTableCellsInRange, by as nativeTableSupportsStructuralEditing, bz as nativeTextRangeIsBold, bA as nativeUpdateComment, bB as paginateNativeDocument, bC as parentNativeParagraph, bD as planWordOoxmlPatch, bE as planWordOoxmlPatches, bF as previousNativeParagraphId, bG as rebuildNativeTableFragmentsFromParagraph, bH as reflowNativeDocumentFromParagraph, bI as refreshNativeNumberingLabels, bJ as refreshNativePageCommentBubbles, bK as renderNativeBlock, bL as renderNativeDocument, bM as renderNativeImage, bN as renderNativeParagraph, bO as renderNativeTable, bP as renderNativeWordEditor, bQ as resolveNativeSectionPageNumberStarts, bR as resolveNativeTableCellBorders, bS as resolveWordOoxmlPatchTargets, bT as restoreNativeCursor, bU as restoreNativeElementSelection, bV as restoreNativeTextSelection, bW as searchNativeWordDocument, bX as selectNativeImage, bY as splitNativeTableRowAtBlockBoundary, bZ as splitNativeTableRowAtTextOffset, b_ as summarizeNativeTablePagination } from './native-
|
|
1
|
+
import './model-DNNBhhCB.cjs';
|
|
2
|
+
export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, x as NativeWordBlockNode, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, B as NativeWordDocument, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, J as NativeWordListType, K as NativeWordPageBreakNode, L as NativeWordParagraphNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeListIndent, b4 as nativeListType, b5 as nativeMergeTableCells, b6 as nativeNumberingAtLevel, b7 as nativePageBreakAt, b8 as nativeParagraphText, b9 as nativeRangeContainsPageBreak, ba as nativeReplaceBlockRangeAcrossParagraphs, bb as nativeReplaceRange, bc as nativeReplaceRangeWithBlocks, bd as nativeReplaceTableCellRangeContent, be as nativeReplaceTableCellRangeText, bf as nativeReplaceTextRangeAcrossParagraphs, bg as nativeReplaceTextRangeWithParagraphs, bh as nativeResolveFormatRevision, bi as nativeResolveImageFormatRevision, bj as nativeResolveImageRevision, bk as nativeResolveRevision, bl as nativeSelection, bm as nativeSelectionFromCursor, bn as nativeSetHyperlink, bo as nativeSetImageSize, bp as nativeSetParagraphFormat, bq as nativeSetParagraphList, br as nativeSetRunFormat, bs as nativeSetTableCellFormat, bt as nativeSetTableCellRangeFormat, bu as nativeSplitParagraph, bv as nativeSplitTableCell, bw as nativeSyncParagraphText, bx as nativeTableCellsInRange, by as nativeTableSupportsStructuralEditing, bz as nativeTextRangeIsBold, bA as nativeUpdateComment, bB as paginateNativeDocument, bC as parentNativeParagraph, bD as planWordOoxmlPatch, bE as planWordOoxmlPatches, bF as previousNativeParagraphId, bG as rebuildNativeTableFragmentsFromParagraph, bH as reflowNativeDocumentFromParagraph, bI as refreshNativeNumberingLabels, bJ as refreshNativePageCommentBubbles, bK as renderNativeBlock, bL as renderNativeDocument, bM as renderNativeImage, bN as renderNativeParagraph, bO as renderNativeTable, bP as renderNativeWordEditor, bQ as resolveNativeSectionPageNumberStarts, bR as resolveNativeTableCellBorders, bS as resolveWordOoxmlPatchTargets, bT as restoreNativeCursor, bU as restoreNativeElementSelection, bV as restoreNativeTextSelection, bW as searchNativeWordDocument, bX as selectNativeImage, bY as splitNativeTableRowAtBlockBoundary, bZ as splitNativeTableRowAtTextOffset, b_ as summarizeNativeTablePagination } from './native-f2y3N8N5.cjs';
|
|
3
3
|
import '@coco-vexel/coco-office/word-view';
|
|
4
4
|
import '@coco-vexel/coco-office/pack';
|
package/dist/word-native.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './model-
|
|
2
|
-
export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, x as NativeWordBlockNode, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, B as NativeWordDocument, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, J as NativeWordListType, K as NativeWordPageBreakNode, L as NativeWordParagraphNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeListIndent, b4 as nativeListType, b5 as nativeMergeTableCells, b6 as nativeNumberingAtLevel, b7 as nativePageBreakAt, b8 as nativeParagraphText, b9 as nativeRangeContainsPageBreak, ba as nativeReplaceBlockRangeAcrossParagraphs, bb as nativeReplaceRange, bc as nativeReplaceRangeWithBlocks, bd as nativeReplaceTableCellRangeContent, be as nativeReplaceTableCellRangeText, bf as nativeReplaceTextRangeAcrossParagraphs, bg as nativeReplaceTextRangeWithParagraphs, bh as nativeResolveFormatRevision, bi as nativeResolveImageFormatRevision, bj as nativeResolveImageRevision, bk as nativeResolveRevision, bl as nativeSelection, bm as nativeSelectionFromCursor, bn as nativeSetHyperlink, bo as nativeSetImageSize, bp as nativeSetParagraphFormat, bq as nativeSetParagraphList, br as nativeSetRunFormat, bs as nativeSetTableCellFormat, bt as nativeSetTableCellRangeFormat, bu as nativeSplitParagraph, bv as nativeSplitTableCell, bw as nativeSyncParagraphText, bx as nativeTableCellsInRange, by as nativeTableSupportsStructuralEditing, bz as nativeTextRangeIsBold, bA as nativeUpdateComment, bB as paginateNativeDocument, bC as parentNativeParagraph, bD as planWordOoxmlPatch, bE as planWordOoxmlPatches, bF as previousNativeParagraphId, bG as rebuildNativeTableFragmentsFromParagraph, bH as reflowNativeDocumentFromParagraph, bI as refreshNativeNumberingLabels, bJ as refreshNativePageCommentBubbles, bK as renderNativeBlock, bL as renderNativeDocument, bM as renderNativeImage, bN as renderNativeParagraph, bO as renderNativeTable, bP as renderNativeWordEditor, bQ as resolveNativeSectionPageNumberStarts, bR as resolveNativeTableCellBorders, bS as resolveWordOoxmlPatchTargets, bT as restoreNativeCursor, bU as restoreNativeElementSelection, bV as restoreNativeTextSelection, bW as searchNativeWordDocument, bX as selectNativeImage, bY as splitNativeTableRowAtBlockBoundary, bZ as splitNativeTableRowAtTextOffset, b_ as summarizeNativeTablePagination } from './native-
|
|
1
|
+
import './model-DNNBhhCB.js';
|
|
2
|
+
export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, x as NativeWordBlockNode, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, B as NativeWordDocument, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, J as NativeWordListType, K as NativeWordPageBreakNode, L as NativeWordParagraphNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeListIndent, b4 as nativeListType, b5 as nativeMergeTableCells, b6 as nativeNumberingAtLevel, b7 as nativePageBreakAt, b8 as nativeParagraphText, b9 as nativeRangeContainsPageBreak, ba as nativeReplaceBlockRangeAcrossParagraphs, bb as nativeReplaceRange, bc as nativeReplaceRangeWithBlocks, bd as nativeReplaceTableCellRangeContent, be as nativeReplaceTableCellRangeText, bf as nativeReplaceTextRangeAcrossParagraphs, bg as nativeReplaceTextRangeWithParagraphs, bh as nativeResolveFormatRevision, bi as nativeResolveImageFormatRevision, bj as nativeResolveImageRevision, bk as nativeResolveRevision, bl as nativeSelection, bm as nativeSelectionFromCursor, bn as nativeSetHyperlink, bo as nativeSetImageSize, bp as nativeSetParagraphFormat, bq as nativeSetParagraphList, br as nativeSetRunFormat, bs as nativeSetTableCellFormat, bt as nativeSetTableCellRangeFormat, bu as nativeSplitParagraph, bv as nativeSplitTableCell, bw as nativeSyncParagraphText, bx as nativeTableCellsInRange, by as nativeTableSupportsStructuralEditing, bz as nativeTextRangeIsBold, bA as nativeUpdateComment, bB as paginateNativeDocument, bC as parentNativeParagraph, bD as planWordOoxmlPatch, bE as planWordOoxmlPatches, bF as previousNativeParagraphId, bG as rebuildNativeTableFragmentsFromParagraph, bH as reflowNativeDocumentFromParagraph, bI as refreshNativeNumberingLabels, bJ as refreshNativePageCommentBubbles, bK as renderNativeBlock, bL as renderNativeDocument, bM as renderNativeImage, bN as renderNativeParagraph, bO as renderNativeTable, bP as renderNativeWordEditor, bQ as resolveNativeSectionPageNumberStarts, bR as resolveNativeTableCellBorders, bS as resolveWordOoxmlPatchTargets, bT as restoreNativeCursor, bU as restoreNativeElementSelection, bV as restoreNativeTextSelection, bW as searchNativeWordDocument, bX as selectNativeImage, bY as splitNativeTableRowAtBlockBoundary, bZ as splitNativeTableRowAtTextOffset, b_ as summarizeNativeTablePagination } from './native-OrEUvS8p.js';
|
|
3
3
|
import '@coco-vexel/coco-office/word-view';
|
|
4
4
|
import '@coco-vexel/coco-office/pack';
|
package/dist/word-native.js
CHANGED
|
@@ -35,7 +35,7 @@ var __objRest = (source, exclude) => {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// src/generated/editor-styles.ts
|
|
38
|
-
var editor_styles_default = '.coco-word-editor {\n background: #f4f5f7;\n color: #202124;\n font-family:\n Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.coco-word-shell {\n display: grid;\n grid-template-columns: minmax(0, 1fr) 280px;\n gap: 16px;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n padding: 16px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.coco-word-document-scroll {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n scrollbar-gutter: stable;\n}\n\n.coco-word-devbar {\n position: sticky;\n top: 0;\n z-index: 2;\n display: flex;\n gap: 10px;\n align-items: center;\n width: min(100%, 860px);\n margin: 0 auto 12px;\n padding: 8px 0;\n background: #f4f5f7;\n color: #52525b;\n font-size: 12px;\n}\n\n.coco-word-devbar select {\n min-width: 280px;\n max-width: 520px;\n height: 30px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n}\n\n.coco-word-toolbar {\n position: sticky;\n top: 46px;\n z-index: 2;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n width: min(100%, 860px);\n margin: 0 auto 12px;\n padding: 8px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n color: #202124;\n font-size: 12px;\n}\n\n.coco-word-toolbar button,\n.coco-word-toolbar select,\n.coco-word-toolbar input {\n height: 30px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n}\n\n.coco-word-toolbar button {\n min-width: 32px;\n padding: 0 9px;\n cursor: pointer;\n}\n\n.coco-word-toolbar button:hover {\n background: #edf2ff;\n border-color: #8aa6e8;\n}\n\n.coco-word-toolbar button.is-active {\n background: #dbe7ff;\n border-color: #5b7fc7;\n}\n\n.coco-word-toolbar button.is-mixed,\n.coco-word-toolbar input.is-mixed {\n border-style: dashed;\n border-color: #5b7fc7;\n}\n\n.coco-word-toolbar button:disabled,\n.coco-word-toolbar select:disabled,\n.coco-word-toolbar input:disabled {\n cursor: default;\n opacity: 0.45;\n}\n\n.coco-word-toolbar label {\n display: inline-flex;\n gap: 6px;\n align-items: center;\n}\n\n.coco-word-toolbar input[type="color"] {\n width: 36px;\n padding: 2px;\n}\n\n.coco-word-image-size-input {\n width: 58px;\n padding: 0 4px;\n}\n\n.coco-word-table-size-input {\n width: 42px;\n}\n\n.coco-word-hyperlink {\n color: #0563c1;\n cursor: text;\n text-decoration: underline;\n}\n\n.coco-word-native-editor-host.is-hyperlink-navigation-mode .coco-word-hyperlink {\n cursor: pointer;\n}\n\n.coco-word-hyperlink-input {\n min-width: 160px;\n width: 190px;\n}\n\n.coco-word-highlight-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 15px;\n height: 21px;\n box-sizing: border-box;\n border-bottom: 4px solid var(--coco-highlight-color, #ffff00);\n font-weight: 700;\n}\n\n.coco-word-toolbar-divider {\n width: 1px;\n height: 22px;\n margin: 0 4px;\n background: #d8dbe2;\n}\n\n.coco-word-searchbar {\n position: sticky;\n top: 46px;\n z-index: 3;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n width: min(100%, 860px);\n margin: -6px auto 12px;\n padding: 8px;\n box-sizing: border-box;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n box-shadow: 0 4px 12px rgb(15 23 42 / 10%);\n font-size: 12px;\n}\n\n.coco-word-searchbar[hidden] {\n display: none;\n}\n\n.coco-word-searchbar input[type="search"],\n.coco-word-searchbar input[type="text"] {\n width: 180px;\n height: 30px;\n padding: 0 8px;\n border: 1px solid #c7cbd4;\n}\n\n.coco-word-searchbar button {\n min-width: 32px;\n height: 30px;\n padding: 0 8px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n}\n\n.coco-word-searchbar label {\n display: inline-flex;\n gap: 4px;\n align-items: center;\n height: 30px;\n}\n\n#wordSearchCount {\n min-width: 52px;\n color: #52525b;\n text-align: center;\n}\n\n.coco-word-page {\n width: min(100%, 794px);\n min-height: calc(100% - 32px);\n margin: 0 auto;\n padding: 96px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);\n}\n\n.coco-word-page .ProseMirror {\n outline: none;\n font-size: 16px;\n line-height: 1.75;\n}\n\n.coco-word-pages {\n width: 100%;\n min-height: calc(100% - 32px);\n}\n\ncoco-word-native-document {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n box-sizing: border-box;\n outline: none;\n color: #000000;\n font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;\n font-size: 10.5pt;\n line-height: normal;\n}\n\ncoco-word-native-document.has-annotation-rail {\n padding-right: 260px;\n}\n\ncoco-word-native-document.is-paginated {\n display: grid;\n justify-items: center;\n gap: 18px;\n}\n\ncoco-word-native-page {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n max-width: 100%;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);\n}\n\ncoco-word-native-page-body {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 1 1 auto;\n min-height: 0;\n}\n\ncoco-word-native-page-body > * {\n flex-shrink: 0;\n}\n\ncoco-word-native-document.uses-natural-paragraph-flow coco-word-native-page-body {\n display: flow-root;\n}\n\ncoco-word-native-document.uses-natural-paragraph-flow coco-word-native-page-body > * {\n display: block;\n}\n\n.coco-word-native-page-behind-layer,\n.coco-word-native-page-overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.coco-word-native-page-behind-layer {\n z-index: 0;\n}\n\n.coco-word-native-page-overlay {\n z-index: 3;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor,\n.coco-word-native-page-overlay > .is-page-layer-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor {\n pointer-events: none;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor[data-position-horizontal-relative-from="page"],\n.coco-word-native-page-overlay > .is-page-layer-anchor[data-position-horizontal-relative-from="page"] {\n left: calc(var(--coco-word-anchor-left, 0) - var(--coco-word-page-margin-left, 0));\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor[data-position-vertical-relative-from="page"],\n.coco-word-native-page-overlay > .is-page-layer-anchor[data-position-vertical-relative-from="page"] {\n top: calc(var(--coco-word-anchor-top, 0) - var(--coco-word-page-margin-top, 0));\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor.is-anchor-right,\n.coco-word-native-page-overlay > .is-page-layer-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor.is-anchor-center,\n.coco-word-native-page-overlay > .is-page-layer-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\n.coco-word-native-comment-layer {\n position: absolute;\n top: 0;\n right: -240px;\n z-index: 2;\n width: 220px;\n pointer-events: none;\n}\n\n.coco-word-native-comment-bubble {\n position: absolute;\n top: var(--coco-word-comment-top, 0px);\n box-sizing: border-box;\n width: 220px;\n min-height: 0;\n padding: 6px 8px;\n border: 1px solid #e6d7a1;\n border-left: 3px solid #d6a72c;\n border-radius: 4px;\n background: #fffdf2;\n box-shadow: 0 5px 16px rgba(72, 55, 8, 0.1);\n color: #332d1b;\n font-family: Calibri, Arial, sans-serif;\n pointer-events: auto;\n}\n\n.coco-word-native-comment-bubble.coco-word-native-comment-reply {\n border-left-color: #6b7fd7;\n background: #f5f7ff;\n color: #26345f;\n}\n\n.coco-word-native-comment-bubble.is-selected {\n outline: 2px solid #b7791f;\n outline-offset: 1px;\n}\n\n.coco-word-native-comment-meta {\n margin: 0 24px 3px 0;\n overflow: hidden;\n color: #76601f;\n font-size: 9px;\n font-weight: 700;\n line-height: 1.3;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-comment-reply {\n box-shadow: inset 0 -2px 0 #7184df;\n}\n\n.coco-word-native-comment-body {\n display: -webkit-box;\n overflow: hidden;\n font-size: 11px;\n line-height: 1.2;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.coco-word-native-comment-actions {\n position: absolute;\n top: 6px;\n right: 8px;\n}\n\n.coco-word-native-comment-menu-button {\n width: 22px;\n height: 20px;\n padding: 0 0 4px;\n border: 0;\n border-radius: 3px;\n background: transparent;\n color: #76601f;\n cursor: pointer;\n font: 700 16px/16px Arial, sans-serif;\n}\n\n.coco-word-native-comment-menu-button:hover,\n.coco-word-native-comment-menu-button:focus-visible {\n background: #f3e8bd;\n outline: none;\n}\n\n.coco-word-native-comment-menu {\n position: absolute;\n top: 27px;\n right: 0;\n z-index: 4;\n min-width: 76px;\n padding: 4px;\n border: 1px solid #e0d2a2;\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 5px 14px rgba(72, 55, 8, 0.16);\n}\n\n.coco-word-native-comment-menu-item {\n display: block;\n width: 100%;\n padding: 5px 9px;\n border: 0;\n background: transparent;\n color: #51451f;\n cursor: pointer;\n font: 12px/1.3 Calibri, Arial, sans-serif;\n text-align: left;\n}\n\n.coco-word-native-comment-menu-item:hover,\n.coco-word-native-comment-menu-item:focus-visible {\n border-radius: 2px;\n background: #f7f0d6;\n outline: none;\n}\n\n.coco-word-native-revision-layer {\n position: absolute;\n top: 0;\n right: -240px;\n z-index: 3;\n width: 220px;\n pointer-events: none;\n}\n\n.coco-word-native-revision-bubble {\n position: absolute;\n top: var(--coco-word-revision-top, 0px);\n box-sizing: border-box;\n width: 220px;\n min-height: 0;\n padding: 6px 8px;\n border: 1px solid #86b7fe;\n border-left: 3px solid #2563eb;\n background: #eff6ff;\n box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);\n color: #1e3a8a;\n font-family: Calibri, Arial, sans-serif;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-group {\n position: absolute;\n top: var(--coco-word-revision-top, 0px);\n z-index: 0;\n width: 220px;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-group.is-expanded {\n z-index: 6;\n}\n\n.coco-word-native-revision-group-toggle {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 2px 8px;\n align-items: center;\n width: 220px;\n min-height: 44px;\n padding: 6px 8px;\n border: 1px solid #93b7eb;\n border-left: 3px solid #2563eb;\n border-radius: 4px;\n background: #eff6ff;\n box-shadow: 0 4px 12px rgb(37 99 235 / 12%);\n color: #334155;\n cursor: pointer;\n font: 10px/1.25 Calibri, Arial, sans-serif;\n text-align: left;\n}\n\n.coco-word-native-revision-group-toggle strong {\n overflow: hidden;\n color: #1e3a8a;\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-native-revision-group-affordance {\n grid-row: 1 / span 2;\n grid-column: 2;\n color: #2563eb;\n}\n\n.coco-word-native-revision-group-list {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n display: grid;\n gap: 6px;\n width: 228px;\n max-height: min(360px, 60vh);\n padding: 4px;\n overflow-y: auto;\n box-sizing: border-box;\n border: 1px solid #93b7eb;\n border-radius: 4px;\n background: #f8fbff;\n box-shadow: 0 10px 24px rgb(30 64 175 / 20%);\n}\n\n.coco-word-native-revision-group-list[hidden] {\n display: none;\n}\n\n.coco-word-native-revision-group-list > .coco-word-native-revision-bubble {\n position: relative;\n top: auto;\n width: 100%;\n}\n\n.coco-word-native-revision-bubble.is-delete {\n border-color: #fca5a5;\n border-left-color: #dc2626;\n background: #fff1f2;\n color: #991b1b;\n}\n\n.coco-word-native-revision-bubble.is-selected {\n z-index: 1;\n outline: 2px solid #1d4ed8;\n outline-offset: 2px;\n box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.16), 0 6px 16px rgba(30, 64, 175, 0.2);\n}\n\n.coco-word-native-revision-bubble.is-delete.is-selected {\n outline-color: #b91c1c;\n box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.14), 0 6px 16px rgba(127, 29, 29, 0.18);\n}\n\n.coco-word-native-revision-header {\n display: flex;\n justify-content: flex-start;\n min-height: 13px;\n padding-right: 52px;\n margin-bottom: 3px;\n}\n\n.coco-word-native-revision-meta {\n overflow: hidden;\n color: #64748b;\n font-size: 9px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-native-revision-content {\n display: -webkit-box;\n overflow: hidden;\n margin-bottom: 4px;\n color: #334155;\n font-size: 11px;\n line-height: 1.2;\n word-break: break-all;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.coco-word-native-revision-actions {\n display: none;\n position: absolute;\n top: 6px;\n right: 8px;\n z-index: 2;\n pointer-events: auto;\n gap: 4px;\n}\n\n.coco-word-native-revision-bubble.is-selected .coco-word-native-revision-actions {\n display: flex;\n}\n\n.coco-word-native-revision-bubble button {\n position: relative;\n z-index: 1;\n display: inline-grid;\n width: 22px;\n height: 20px;\n padding: 0;\n border: 1px solid #94a3b8;\n border-radius: 2px;\n background: #fff;\n color: inherit;\n cursor: pointer;\n font-size: 14px;\n line-height: 1;\n place-items: center;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-bubble button:hover {\n filter: brightness(0.96);\n}\n\n.coco-word-native-revision-bubble button.is-accept {\n color: #15803d;\n}\n\n.coco-word-native-revision-bubble button.is-reject {\n color: #b91c1c;\n}\n\ncoco-word-native-story {\n display: block;\n margin: 0 0 18pt;\n padding: 0 0 8pt;\n border-bottom: 1px solid #d6d9df;\n color: #42464d;\n}\n\ncoco-word-native-page > coco-word-native-story {\n position: absolute;\n z-index: 1;\n right: var(--coco-word-page-margin-right, 0);\n left: var(--coco-word-page-margin-left, 0);\n margin: 0;\n padding: 0;\n border: 0;\n color: inherit;\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="header"] {\n top: var(--coco-word-header-distance, 0);\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="footer"] {\n bottom: var(--coco-word-footer-distance, 0);\n}\n\ncoco-word-native-story.is-empty {\n display: none;\n}\n\ncoco-word-native-story[data-story-kind="footer"] {\n margin: 18pt 0 0;\n padding: 8pt 0 0;\n border-top: 1px solid #d6d9df;\n border-bottom: 0;\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="footer"] {\n margin: 0;\n padding: 0;\n border: 0;\n}\n\ncoco-word-native-story coco-word-native-p {\n margin-bottom: 4pt;\n}\n\ncoco-word-native-page > coco-word-native-story coco-word-native-p {\n margin-bottom: 0;\n}\n\ncoco-word-native-p {\n position: relative;\n display: block;\n min-height: 1.4em;\n margin: 0;\n outline: none;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n word-break: break-word;\n box-sizing: border-box;\n}\n\ncoco-word-native-p.is-flow-empty {\n min-height: 0;\n height: 0;\n line-height: 0;\n margin: 0;\n padding: 0;\n}\n\ncoco-word-native-p:focus {\n background: #fffdf2;\n}\n\ncoco-word-native-p.has-tab-stops {\n text-align: initial;\n}\n\n.coco-word-tab-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: baseline;\n width: 100%;\n column-gap: 12pt;\n}\n\n.coco-word-tab-row.has-leader-dot,\n.coco-word-tab-row.has-leader-hyphen,\n.coco-word-tab-row.has-leader-underscore,\n.coco-word-tab-row.has-leader-heavy,\n.coco-word-tab-row.has-leader-middleDot {\n column-gap: 4pt;\n line-height: 2;\n}\n\n.coco-word-tab-row.is-three-part-tab {\n grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);\n}\n\n.coco-word-tab-segment {\n min-width: 0;\n}\n\n.coco-word-tab-segment.is-segment-0 {\n text-align: left;\n}\n\n.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0 {\n display: flex;\n align-items: baseline;\n white-space: nowrap;\n}\n\n.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0::after {\n content: "";\n flex: 1 1 auto;\n min-width: 12pt;\n margin: 0 3pt;\n border-bottom: 1px dotted currentColor;\n transform: translateY(-0.25em);\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-hyphen .coco-word-tab-segment.is-segment-0::after {\n border-bottom-style: dashed;\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-underscore .coco-word-tab-segment.is-segment-0::after,\n.coco-word-tab-row.is-right-tab.has-leader-heavy .coco-word-tab-segment.is-segment-0::after {\n border-bottom-style: solid;\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-heavy .coco-word-tab-segment.is-segment-0::after {\n border-bottom-width: 2px;\n}\n\n.coco-word-tab-segment.is-segment-1 {\n text-align: center;\n}\n\n.coco-word-tab-row.is-right-tab .coco-word-tab-segment.is-segment-1,\n.coco-word-tab-segment.is-segment-2 {\n text-align: right;\n white-space: nowrap;\n}\n\n.coco-word-tab-marker {\n display: none;\n}\n\ncoco-word-native-p[data-numbering="true"] {\n margin-left: 2.8em;\n padding-right: 0.5em;\n text-indent: -2.8em;\n}\n\ncoco-word-native-p[data-numbering="true"]::before {\n content: attr(data-numbering-label) " ";\n display: inline-block;\n width: 2.4em;\n text-indent: 0;\n white-space: nowrap;\n}\n\ncoco-word-native-p[data-keep-lines="true"] {\n break-inside: avoid;\n}\n\ncoco-word-native-p[data-keep-next="true"] {\n break-after: avoid;\n}\n\ncoco-word-native-table {\n display: block;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n margin: 0;\n max-width: 100%;\n overflow: auto;\n scrollbar-gutter: stable;\n --coco-word-doc-grid-line-height: 1em;\n white-space: pre-wrap;\n}\n\ncoco-word-native-table table {\n box-sizing: border-box;\n min-width: 100%;\n max-width: none;\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\ncoco-word-native-table tbody {\n display: table-row-group;\n}\n\ncoco-word-native-table tr[data-height-rule="exact"] {\n height: var(--coco-word-row-height);\n}\n\ncoco-word-native-table tr[data-height-rule="atLeast"] {\n height: var(--coco-word-row-height);\n}\n\ncoco-word-native-table td {\n min-width: 48px;\n padding: 0 5.4pt;\n border: var(--coco-word-table-border, 0);\n box-sizing: border-box;\n line-height: normal;\n vertical-align: top;\n}\n\ncoco-word-native-table td coco-word-native-p {\n min-height: 1.2em;\n margin: 0;\n}\n\ncoco-word-native-table td coco-word-native-p:last-child {\n margin-bottom: 0;\n}\n\ncoco-word-native-document.uses-compact-latin-tables coco-word-native-table td coco-word-native-p {\n font-size: 13px !important;\n line-height: 1.08 !important;\n}\n\ncoco-word-native-table td coco-word-native-table {\n margin: 0;\n}\n\ncoco-word-native-p img {\n display: inline-block;\n max-width: 100%;\n height: auto;\n vertical-align: baseline;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-float-right {\n float: right;\n max-width: 55%;\n margin: 0 0 10pt 14pt;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-float-left {\n float: left;\n max-width: 55%;\n margin: 0 14pt 10pt 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-top-bottom {\n display: block;\n clear: both;\n margin: 10pt auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-overlay-like {\n position: relative;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n display: block;\n margin: 8pt 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-paragraph-relative-anchor,\ncoco-word-native-drawing.coco-word-anchor-drawing.is-paragraph-relative-anchor {\n max-width: 100%;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-column-relative-anchor,\ncoco-word-native-drawing.coco-word-anchor-drawing.is-column-relative-anchor {\n max-width: min(100%, var(--coco-word-column-width, 100%));\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-centered {\n display: block;\n clear: both;\n margin-right: auto;\n margin-left: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-behind-text {\n z-index: 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-in-front-of-text {\n z-index: 2;\n}\n\ncoco-word-native-drawing {\n display: inline-flex;\n box-sizing: border-box;\n max-width: calc(100% - 4pt);\n min-width: 1px;\n min-height: 1px;\n margin: 0 2pt;\n padding: 2pt 4pt;\n vertical-align: baseline;\n white-space: pre-wrap;\n}\n\ncoco-word-native-drawing.has-border {\n border: 1px solid #d4d4d8;\n}\n\ncoco-word-native-drawing.is-empty {\n display: none !important;\n}\n\ncoco-word-native-drawing.has-fill {\n background: #ffffff;\n}\n\ncoco-word-native-drawing.is-line-or-connector {\n display: block;\n max-width: 100%;\n min-height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n}\n\ncoco-word-native-drawing.is-line-or-connector.is-horizontal-line {\n height: 0;\n border-top: 1px solid #111827;\n}\n\ncoco-word-native-drawing.is-line-or-connector.is-vertical-line {\n width: 0;\n border-left: 1px solid #111827;\n}\n\ncoco-word-native-drawing .coco-word-native-drawing-text {\n display: block;\n width: 100%;\n}\n\ncoco-word-native-drawing .coco-word-native-drawing-paragraph {\n display: block;\n min-height: 1.2em;\n margin: 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-float-right {\n float: right;\n max-width: 55%;\n margin: 0 0 10pt 14pt;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-float-left {\n float: left;\n max-width: 55%;\n margin: 0 14pt 10pt 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-top-bottom {\n display: flex;\n clear: both;\n margin: 10pt auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-overlay-like {\n position: relative;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n display: flex;\n margin: 8pt 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-paragraph-relative-anchor {\n max-width: 100%;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-column-relative-anchor {\n max-width: min(100%, var(--coco-word-column-width, 100%));\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-centered {\n display: flex;\n clear: both;\n margin-right: auto;\n margin-left: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-behind-text {\n z-index: 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-in-front-of-text {\n z-index: 2;\n}\n\ncoco-word-native-p img.is-selected {\n outline: 2px solid #2563eb;\n outline-offset: 2px;\n}\n\ncoco-word-native-table td.is-cell-range-selected {\n position: relative;\n box-shadow: inset 0 0 0 9999px rgb(37 99 235 / 14%);\n}\n\ncoco-word-native-table td.is-cell-range-selected::after {\n position: absolute;\n z-index: 3;\n inset: -1px;\n border: 1px solid #2563eb;\n pointer-events: none;\n content: "";\n}\n\ncoco-word-native-table td.is-cell-range-anchor::after,\ncoco-word-native-table td.is-cell-range-focus::after {\n border-width: 2px;\n}\n\n.coco-word-native-editor-host {\n position: relative;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.coco-word-native-editor-host coco-word-native-document,\n.coco-word-native-editor-host coco-word-native-page,\n.coco-word-native-editor-host coco-word-native-page-body,\n.coco-word-native-editor-host coco-word-native-story,\n.coco-word-native-editor-host coco-word-native-p {\n user-select: text;\n -webkit-user-select: text;\n}\n\n.coco-word-image-resize-handle {\n position: absolute;\n z-index: 20;\n box-sizing: border-box;\n width: 12px;\n height: 12px;\n min-width: 12px;\n min-height: 12px;\n padding: 0;\n border: 2px solid #ffffff;\n border-radius: 2px;\n background: #2563eb;\n box-shadow: 0 0 0 1px #1d4ed8;\n cursor: nwse-resize;\n touch-action: none;\n}\n\n.coco-word-page-break {\n display: block;\n position: relative;\n height: 28px;\n margin: 8px 0;\n border-top: 1px dashed #b8bdc7;\n}\n\n.coco-word-page-break::after {\n content: "Page break";\n position: absolute;\n top: -9px;\n left: 50%;\n padding: 0 6px;\n background: #ffffff;\n color: #777d88;\n font-size: 10px;\n line-height: 16px;\n transform: translateX(-50%);\n}\n\ncoco-word-native-document.is-paginated .coco-word-page-break {\n display: none;\n}\n\n.coco-word-page p {\n margin: 0 0 12px;\n}\n\n.coco-word-page p[data-style-id="Title"] {\n margin: 0 0 24px;\n padding-bottom: 10px;\n border-bottom: 2px solid #4472c4;\n color: #17365d;\n font-size: 30pt;\n line-height: 1.18;\n}\n\n.coco-word-page p[data-style-id="Heading1"] {\n margin-top: 26px;\n margin-bottom: 10px;\n color: #365f91;\n font-size: 16pt;\n font-weight: 700;\n line-height: 1.25;\n}\n\n.coco-word-page p[data-style-id="Heading2"] {\n margin-top: 20px;\n margin-bottom: 8px;\n color: #4f81bd;\n font-size: 14pt;\n font-weight: 700;\n line-height: 1.3;\n}\n\n.coco-word-page img {\n display: inline-block;\n max-width: 100%;\n height: auto;\n vertical-align: baseline;\n}\n\n.coco-word-table-scroll {\n overflow-x: auto;\n max-width: 100%;\n margin: 12px 0;\n}\n\n.coco-word-page table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.coco-word-page tbody {\n display: table-row-group;\n}\n\n.coco-word-page td {\n min-width: 48px;\n padding: 0 5.4pt;\n border: var(--coco-word-table-border, 1px solid #d4d4d8);\n box-sizing: border-box;\n line-height: normal;\n}\n\n.coco-word-page td p {\n margin: 0 0 6px;\n}\n\n.coco-word-page td p:last-child {\n margin-bottom: 0;\n}\n\n.coco-word-comment {\n background: #fff1a8;\n border-bottom: 2px solid #e4b100;\n}\n\n.coco-word-revision-insert {\n background: #dcfce7;\n color: #166534;\n text-decoration: underline;\n}\n\n.coco-word-revision-delete {\n background: #fee2e2;\n color: #991b1b;\n text-decoration: line-through;\n}\n\nimg.coco-word-revision-delete {\n outline: 2px solid #dc2626;\n opacity: 0.72;\n}\n\nimg.coco-word-revision-insert {\n outline: 2px solid #16a34a;\n}\n\nimg.coco-word-revision-format {\n outline: 2px dashed #7c3aed;\n outline-offset: 2px;\n}\n\ncoco-word-native-table.coco-word-revision-insert {\n outline: 2px solid #2563eb;\n outline-offset: 2px;\n}\n\ncoco-word-native-table.coco-word-revision-delete {\n outline: 2px solid #dc2626;\n outline-offset: 2px;\n opacity: 0.78;\n}\n\n.coco-word-inspector {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n padding: 14px;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n}\n\n@media (max-width: 1399px) {\n .coco-word-shell {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .coco-word-inspector {\n display: none;\n }\n}\n\n.coco-word-inspector h2 {\n margin: 0 0 12px;\n font-size: 15px;\n}\n\n.coco-word-inspector h2:not(:first-child) {\n margin-top: 18px;\n}\n\n.coco-word-acceptance {\n display: grid;\n gap: 10px;\n margin-bottom: 14px;\n font-size: 12px;\n}\n\n.coco-word-acceptance-status {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n height: 24px;\n padding: 0 8px;\n border: 1px solid #b7c7af;\n background: #eff8ea;\n color: #245917;\n font-weight: 700;\n}\n\n.coco-word-acceptance-status.is-warn {\n border-color: #e3c66d;\n background: #fff8df;\n color: #775400;\n}\n\n.coco-word-acceptance-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n}\n\n.coco-word-acceptance-metric {\n min-width: 0;\n padding: 7px;\n border: 1px solid #e1e4ea;\n background: #fafafa;\n}\n\n.coco-word-acceptance-metric span {\n display: block;\n color: #5f6368;\n font-size: 11px;\n}\n\n.coco-word-acceptance-metric strong {\n display: block;\n margin-top: 3px;\n color: #202124;\n font-size: 12px;\n font-weight: 700;\n overflow-wrap: anywhere;\n}\n\n.coco-word-acceptance-metric.is-good {\n border-color: #c8dac2;\n background: #f5fbf2;\n}\n\n.coco-word-acceptance-metric.is-warn {\n border-color: #efd77f;\n background: #fff9e8;\n}\n\n.coco-word-acceptance-section {\n color: #3f4247;\n font-size: 12px;\n font-weight: 700;\n}\n\n.coco-word-acceptance ul {\n margin: 0;\n padding-left: 18px;\n color: #775400;\n}\n\n.coco-word-acceptance-empty {\n color: #5f6368;\n}\n\n.coco-word-inspector pre {\n margin: 0;\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.coco-word-context-menu {\n position: fixed;\n z-index: 10000;\n display: flex;\n min-width: 188px;\n max-height: calc(100vh - 8px);\n padding: 4px;\n overflow-y: auto;\n flex-direction: column;\n background: #ffffff;\n border: 1px solid #c8c8c8;\n border-radius: 4px;\n box-shadow: 0 8px 24px rgb(0 0 0 / 16%);\n color: #202124;\n font: 13px/1.35 Arial, "Microsoft YaHei", sans-serif;\n}\n\n.coco-word-context-menu-item {\n min-height: 30px;\n padding: 5px 10px;\n border: 0;\n border-radius: 3px;\n background: transparent;\n color: inherit;\n font: inherit;\n letter-spacing: 0;\n text-align: left;\n white-space: nowrap;\n cursor: default;\n}\n\n.coco-word-context-menu-item:hover:not(:disabled),\n.coco-word-context-menu-item:focus-visible:not(:disabled) {\n background: #e8f0fe;\n outline: none;\n}\n\n.coco-word-context-menu-item:disabled {\n color: #9aa0a6;\n}\n\n.coco-word-context-menu-separator {\n height: 1px;\n margin: 4px 6px;\n background: #dadce0;\n}\n\n.coco-word-dialog-backdrop {\n position: fixed;\n inset: 0;\n z-index: 11000;\n display: grid;\n place-items: center;\n padding: 20px;\n box-sizing: border-box;\n background: rgb(15 23 42 / 28%);\n}\n\n.coco-word-dialog {\n width: min(420px, 100%);\n padding: 20px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #c7cbd4;\n box-shadow: 0 12px 32px rgb(15 23 42 / 22%);\n}\n\n.coco-word-dialog h2 {\n margin: 0 0 14px;\n color: #202124;\n font-size: 17px;\n font-weight: 600;\n}\n\n.coco-word-dialog-input {\n display: block;\n width: 100%;\n min-height: 96px;\n padding: 9px 10px;\n box-sizing: border-box;\n border: 1px solid #c7cbd4;\n color: #202124;\n font: 14px/1.5 Arial, "Microsoft YaHei", sans-serif;\n resize: vertical;\n}\n\n.coco-word-dialog-input:focus {\n outline: 2px solid rgb(59 91 219 / 22%);\n border-color: #3b5bdb;\n}\n\n.coco-word-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 16px;\n}\n\n.coco-word-dialog-button {\n min-width: 72px;\n min-height: 34px;\n padding: 6px 14px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n font: 14px Arial, "Microsoft YaHei", sans-serif;\n cursor: pointer;\n}\n\n.coco-word-dialog-button.is-primary {\n border-color: #3158c9;\n background: #3158c9;\n color: #ffffff;\n}\n\n.coco-word-dialog-button:hover {\n filter: brightness(0.96);\n}\n';
|
|
38
|
+
var editor_styles_default = '.coco-word-editor {\n background: #f4f5f7;\n color: #202124;\n font-family:\n Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.coco-word-shell {\n display: grid;\n grid-template-columns: minmax(0, 1fr) 280px;\n gap: 16px;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n padding: 16px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.coco-word-document-scroll {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n scrollbar-gutter: stable;\n}\n\n.coco-word-devbar {\n position: sticky;\n top: 0;\n z-index: 2;\n display: flex;\n gap: 10px;\n align-items: center;\n width: min(100%, 860px);\n margin: 0 auto 12px;\n padding: 8px 0;\n background: #f4f5f7;\n color: #52525b;\n font-size: 12px;\n}\n\n.coco-word-devbar select {\n min-width: 280px;\n max-width: 520px;\n height: 30px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n}\n\n.coco-word-toolbar {\n position: sticky;\n top: 46px;\n z-index: 2;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n width: min(100%, 860px);\n margin: 0 auto 12px;\n padding: 8px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n color: #202124;\n font-size: 12px;\n}\n\n.coco-word-toolbar button,\n.coco-word-toolbar select,\n.coco-word-toolbar input {\n height: 30px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n}\n\n.coco-word-toolbar button {\n min-width: 32px;\n padding: 0 9px;\n cursor: pointer;\n}\n\n.coco-word-toolbar button:hover {\n background: #edf2ff;\n border-color: #8aa6e8;\n}\n\n.coco-word-toolbar button.is-active {\n background: #dbe7ff;\n border-color: #5b7fc7;\n}\n\n.coco-word-toolbar button.is-mixed,\n.coco-word-toolbar input.is-mixed {\n border-style: dashed;\n border-color: #5b7fc7;\n}\n\n.coco-word-toolbar button:disabled,\n.coco-word-toolbar select:disabled,\n.coco-word-toolbar input:disabled {\n cursor: default;\n opacity: 0.45;\n}\n\n.coco-word-toolbar label {\n display: inline-flex;\n gap: 6px;\n align-items: center;\n}\n\n.coco-word-toolbar input[type="color"] {\n width: 36px;\n padding: 2px;\n}\n\n.coco-word-image-size-input {\n width: 58px;\n padding: 0 4px;\n}\n\n.coco-word-table-size-input {\n width: 42px;\n}\n\n.coco-word-hyperlink {\n color: #0563c1;\n cursor: text;\n text-decoration: underline;\n}\n\n.coco-word-native-editor-host.is-hyperlink-navigation-mode .coco-word-hyperlink {\n cursor: pointer;\n}\n\n.coco-word-hyperlink-input {\n min-width: 160px;\n width: 190px;\n}\n\n.coco-word-highlight-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 15px;\n height: 21px;\n box-sizing: border-box;\n border-bottom: 4px solid var(--coco-highlight-color, #ffff00);\n font-weight: 700;\n}\n\n.coco-word-toolbar-divider {\n width: 1px;\n height: 22px;\n margin: 0 4px;\n background: #d8dbe2;\n}\n\n.coco-word-searchbar {\n position: sticky;\n top: 46px;\n z-index: 3;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n width: min(100%, 860px);\n margin: -6px auto 12px;\n padding: 8px;\n box-sizing: border-box;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n box-shadow: 0 4px 12px rgb(15 23 42 / 10%);\n font-size: 12px;\n}\n\n.coco-word-searchbar[hidden] {\n display: none;\n}\n\n.coco-word-searchbar input[type="search"],\n.coco-word-searchbar input[type="text"] {\n width: 180px;\n height: 30px;\n padding: 0 8px;\n border: 1px solid #c7cbd4;\n}\n\n.coco-word-searchbar button {\n min-width: 32px;\n height: 30px;\n padding: 0 8px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n}\n\n.coco-word-searchbar label {\n display: inline-flex;\n gap: 4px;\n align-items: center;\n height: 30px;\n}\n\n#wordSearchCount {\n min-width: 52px;\n color: #52525b;\n text-align: center;\n}\n\n.coco-word-page {\n width: min(100%, 794px);\n min-height: calc(100% - 32px);\n margin: 0 auto;\n padding: 96px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);\n}\n\n.coco-word-page .ProseMirror {\n outline: none;\n font-size: 16px;\n line-height: 1.75;\n}\n\n.coco-word-pages {\n width: 100%;\n min-height: calc(100% - 32px);\n}\n\ncoco-word-native-document {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n box-sizing: border-box;\n outline: none;\n color: #000000;\n font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;\n font-size: 10.5pt;\n line-height: normal;\n}\n\ncoco-word-native-document.has-annotation-rail {\n padding-right: 260px;\n}\n\ncoco-word-native-document.is-paginated {\n display: grid;\n justify-items: center;\n gap: 18px;\n}\n\ncoco-word-native-page {\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n max-width: 100%;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);\n}\n\ncoco-word-native-page-body {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n flex: 1 1 auto;\n min-height: 0;\n}\n\ncoco-word-native-page-body > * {\n flex-shrink: 0;\n}\n\ncoco-word-native-document.uses-natural-paragraph-flow coco-word-native-page-body {\n display: flow-root;\n}\n\ncoco-word-native-document.uses-natural-paragraph-flow coco-word-native-page-body > * {\n display: block;\n}\n\n.coco-word-native-page-behind-layer,\n.coco-word-native-page-overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.coco-word-native-page-behind-layer {\n z-index: 0;\n}\n\n.coco-word-native-page-overlay {\n z-index: 3;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor,\n.coco-word-native-page-overlay > .is-page-layer-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor {\n pointer-events: none;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor[data-position-horizontal-relative-from="page"],\n.coco-word-native-page-overlay > .is-page-layer-anchor[data-position-horizontal-relative-from="page"] {\n left: calc(var(--coco-word-anchor-left, 0) - var(--coco-word-page-margin-left, 0));\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor[data-position-vertical-relative-from="page"],\n.coco-word-native-page-overlay > .is-page-layer-anchor[data-position-vertical-relative-from="page"] {\n top: calc(var(--coco-word-anchor-top, 0) - var(--coco-word-page-margin-top, 0));\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor.is-anchor-right,\n.coco-word-native-page-overlay > .is-page-layer-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\n.coco-word-native-page-behind-layer > .is-page-layer-anchor.is-anchor-center,\n.coco-word-native-page-overlay > .is-page-layer-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\n.coco-word-native-comment-layer {\n position: absolute;\n top: 0;\n right: -240px;\n z-index: 2;\n width: 220px;\n pointer-events: none;\n}\n\n.coco-word-native-comment-bubble {\n position: absolute;\n top: var(--coco-word-comment-top, 0px);\n box-sizing: border-box;\n width: 220px;\n min-height: 0;\n padding: 6px 8px;\n border: 1px solid #e6d7a1;\n border-left: 3px solid #d6a72c;\n border-radius: 4px;\n background: #fffdf2;\n box-shadow: 0 5px 16px rgba(72, 55, 8, 0.1);\n color: #332d1b;\n font-family: Calibri, Arial, sans-serif;\n pointer-events: auto;\n}\n\n.coco-word-native-comment-bubble.coco-word-native-comment-reply {\n border-left-color: #6b7fd7;\n background: #f5f7ff;\n color: #26345f;\n}\n\n.coco-word-native-comment-bubble.is-selected {\n outline: 2px solid #b7791f;\n outline-offset: 1px;\n}\n\n.coco-word-native-comment-meta {\n margin: 0 24px 3px 0;\n overflow: hidden;\n color: #76601f;\n font-size: 9px;\n font-weight: 700;\n line-height: 1.3;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-comment-reply {\n box-shadow: inset 0 -2px 0 #7184df;\n}\n\n.coco-word-native-comment-body {\n display: -webkit-box;\n overflow: hidden;\n font-size: 11px;\n line-height: 1.2;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.coco-word-native-comment-actions {\n position: absolute;\n top: 6px;\n right: 8px;\n}\n\n.coco-word-native-comment-menu-button {\n width: 22px;\n height: 20px;\n padding: 0 0 4px;\n border: 0;\n border-radius: 3px;\n background: transparent;\n color: #76601f;\n cursor: pointer;\n font: 700 16px/16px Arial, sans-serif;\n}\n\n.coco-word-native-comment-menu-button:hover,\n.coco-word-native-comment-menu-button:focus-visible {\n background: #f3e8bd;\n outline: none;\n}\n\n.coco-word-native-comment-menu {\n position: absolute;\n top: 27px;\n right: 0;\n z-index: 4;\n min-width: 76px;\n padding: 4px;\n border: 1px solid #e0d2a2;\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 5px 14px rgba(72, 55, 8, 0.16);\n}\n\n.coco-word-native-comment-menu-item {\n display: block;\n width: 100%;\n padding: 5px 9px;\n border: 0;\n background: transparent;\n color: #51451f;\n cursor: pointer;\n font: 12px/1.3 Calibri, Arial, sans-serif;\n text-align: left;\n}\n\n.coco-word-native-comment-menu-item:hover,\n.coco-word-native-comment-menu-item:focus-visible {\n border-radius: 2px;\n background: #f7f0d6;\n outline: none;\n}\n\n.coco-word-native-revision-layer {\n position: absolute;\n top: 0;\n right: -240px;\n z-index: 3;\n width: 220px;\n pointer-events: none;\n}\n\n.coco-word-native-revision-bubble {\n position: absolute;\n top: var(--coco-word-revision-top, 0px);\n box-sizing: border-box;\n width: 220px;\n min-height: 0;\n padding: 6px 8px;\n border: 1px solid #86b7fe;\n border-left: 3px solid #2563eb;\n background: #eff6ff;\n box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);\n color: #1e3a8a;\n font-family: Calibri, Arial, sans-serif;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-group {\n position: absolute;\n top: var(--coco-word-revision-top, 0px);\n z-index: 0;\n width: 220px;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-group.is-expanded {\n z-index: 6;\n}\n\n.coco-word-native-revision-group-toggle {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 2px 8px;\n align-items: center;\n width: 220px;\n min-height: 44px;\n padding: 6px 8px;\n border: 1px solid #93b7eb;\n border-left: 3px solid #2563eb;\n border-radius: 4px;\n background: #eff6ff;\n box-shadow: 0 4px 12px rgb(37 99 235 / 12%);\n color: #334155;\n cursor: pointer;\n font: 10px/1.25 Calibri, Arial, sans-serif;\n text-align: left;\n}\n\n.coco-word-native-revision-group-toggle strong {\n overflow: hidden;\n color: #1e3a8a;\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-native-revision-group-affordance {\n grid-row: 1 / span 2;\n grid-column: 2;\n color: #2563eb;\n}\n\n.coco-word-native-revision-group-list {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n display: grid;\n gap: 6px;\n width: 228px;\n max-height: min(360px, 60vh);\n padding: 4px;\n overflow-y: auto;\n box-sizing: border-box;\n border: 1px solid #93b7eb;\n border-radius: 4px;\n background: #f8fbff;\n box-shadow: 0 10px 24px rgb(30 64 175 / 20%);\n}\n\n.coco-word-native-revision-group-list[hidden] {\n display: none;\n}\n\n.coco-word-native-revision-group-list > .coco-word-native-revision-bubble {\n position: relative;\n top: auto;\n width: 100%;\n}\n\n.coco-word-native-revision-bubble.is-delete {\n border-color: #fca5a5;\n border-left-color: #dc2626;\n background: #fff1f2;\n color: #991b1b;\n}\n\n.coco-word-native-revision-bubble.is-selected {\n z-index: 1;\n outline: 2px solid #1d4ed8;\n outline-offset: 2px;\n box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.16), 0 6px 16px rgba(30, 64, 175, 0.2);\n}\n\n.coco-word-native-revision-bubble.is-delete.is-selected {\n outline-color: #b91c1c;\n box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.14), 0 6px 16px rgba(127, 29, 29, 0.18);\n}\n\n.coco-word-native-revision-header {\n display: flex;\n justify-content: flex-start;\n min-height: 13px;\n padding-right: 52px;\n margin-bottom: 3px;\n}\n\n.coco-word-native-revision-meta {\n overflow: hidden;\n color: #64748b;\n font-size: 9px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.coco-word-native-revision-content {\n display: -webkit-box;\n overflow: hidden;\n margin-bottom: 4px;\n color: #334155;\n font-size: 11px;\n line-height: 1.2;\n word-break: break-all;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.coco-word-native-revision-actions {\n display: none;\n position: absolute;\n top: 6px;\n right: 8px;\n z-index: 2;\n pointer-events: auto;\n gap: 4px;\n}\n\n.coco-word-native-revision-bubble.is-selected .coco-word-native-revision-actions {\n display: flex;\n}\n\n.coco-word-native-revision-bubble button {\n position: relative;\n z-index: 1;\n display: inline-grid;\n width: 22px;\n height: 20px;\n padding: 0;\n border: 1px solid #94a3b8;\n border-radius: 2px;\n background: #fff;\n color: inherit;\n cursor: pointer;\n font-size: 14px;\n line-height: 1;\n place-items: center;\n pointer-events: auto;\n}\n\n.coco-word-native-revision-bubble button:hover {\n filter: brightness(0.96);\n}\n\n.coco-word-native-revision-bubble button.is-accept {\n color: #15803d;\n}\n\n.coco-word-native-revision-bubble button.is-reject {\n color: #b91c1c;\n}\n\ncoco-word-native-story {\n display: block;\n margin: 0 0 18pt;\n padding: 0 0 8pt;\n border-bottom: 1px solid #d6d9df;\n color: #42464d;\n}\n\ncoco-word-native-page > coco-word-native-story {\n position: absolute;\n z-index: 1;\n right: var(--coco-word-page-margin-right, 0);\n left: var(--coco-word-page-margin-left, 0);\n margin: 0;\n padding: 0;\n border: 0;\n color: inherit;\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="header"] {\n top: var(--coco-word-header-distance, 0);\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="footer"] {\n bottom: var(--coco-word-footer-distance, 0);\n}\n\ncoco-word-native-story.is-empty {\n display: none;\n}\n\ncoco-word-native-story[data-story-kind="footer"] {\n margin: 18pt 0 0;\n padding: 8pt 0 0;\n border-top: 1px solid #d6d9df;\n border-bottom: 0;\n}\n\ncoco-word-native-page > coco-word-native-story[data-story-kind="footer"] {\n margin: 0;\n padding: 0;\n border: 0;\n}\n\ncoco-word-native-story coco-word-native-p {\n margin-bottom: 4pt;\n}\n\ncoco-word-native-page > coco-word-native-story coco-word-native-p {\n margin-bottom: 0;\n}\n\ncoco-word-native-p {\n position: relative;\n display: block;\n min-height: 1.4em;\n margin: 0;\n outline: none;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n word-break: break-word;\n box-sizing: border-box;\n}\n\ncoco-word-native-p.is-flow-empty {\n min-height: 0;\n height: 0;\n line-height: 0;\n margin: 0;\n padding: 0;\n}\n\ncoco-word-native-p:focus {\n background: #fffdf2;\n}\n\ncoco-word-native-p.has-tab-stops {\n text-align: initial;\n}\n\n.coco-word-tab-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: baseline;\n width: 100%;\n column-gap: 12pt;\n}\n\n.coco-word-tab-row.has-leader-dot,\n.coco-word-tab-row.has-leader-hyphen,\n.coco-word-tab-row.has-leader-underscore,\n.coco-word-tab-row.has-leader-heavy,\n.coco-word-tab-row.has-leader-middleDot {\n column-gap: 4pt;\n line-height: 2;\n}\n\n.coco-word-tab-row.is-three-part-tab {\n grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);\n}\n\n.coco-word-tab-segment {\n min-width: 0;\n}\n\n.coco-word-tab-segment.is-segment-0 {\n text-align: left;\n}\n\n.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0 {\n display: flex;\n align-items: baseline;\n white-space: nowrap;\n}\n\n.coco-word-tab-row.is-right-tab[class*="has-leader-"] .coco-word-tab-segment.is-segment-0::after {\n content: "";\n flex: 1 1 auto;\n min-width: 12pt;\n margin: 0 3pt;\n border-bottom: 1px dotted currentColor;\n transform: translateY(-0.25em);\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-hyphen .coco-word-tab-segment.is-segment-0::after {\n border-bottom-style: dashed;\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-underscore .coco-word-tab-segment.is-segment-0::after,\n.coco-word-tab-row.is-right-tab.has-leader-heavy .coco-word-tab-segment.is-segment-0::after {\n border-bottom-style: solid;\n}\n\n.coco-word-tab-row.is-right-tab.has-leader-heavy .coco-word-tab-segment.is-segment-0::after {\n border-bottom-width: 2px;\n}\n\n.coco-word-tab-segment.is-segment-1 {\n text-align: center;\n}\n\n.coco-word-tab-row.is-right-tab .coco-word-tab-segment.is-segment-1,\n.coco-word-tab-segment.is-segment-2 {\n text-align: right;\n white-space: nowrap;\n}\n\n.coco-word-tab-marker {\n display: none;\n}\n\ncoco-word-native-p[data-numbering="true"] {\n margin-left: 2.8em;\n padding-right: 0.5em;\n text-indent: -2.8em;\n}\n\ncoco-word-native-p[data-numbering="true"]::before {\n content: attr(data-numbering-label) " ";\n display: inline-block;\n width: 2.4em;\n text-indent: 0;\n white-space: nowrap;\n}\n\ncoco-word-native-p[data-keep-lines="true"] {\n break-inside: avoid;\n}\n\ncoco-word-native-p[data-keep-next="true"] {\n break-after: avoid;\n}\n\ncoco-word-native-table {\n display: block;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n margin: 0;\n max-width: 100%;\n overflow: auto;\n scrollbar-gutter: stable;\n --coco-word-doc-grid-line-height: 1em;\n white-space: pre-wrap;\n}\n\ncoco-word-native-table table {\n box-sizing: border-box;\n min-width: 100%;\n max-width: none;\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\ncoco-word-native-table tbody {\n display: table-row-group;\n}\n\ncoco-word-native-table tr[data-height-rule="exact"] {\n height: var(--coco-word-row-height);\n}\n\ncoco-word-native-table tr[data-height-rule="atLeast"] {\n height: var(--coco-word-row-height);\n}\n\ncoco-word-native-table td {\n min-width: 48px;\n padding: 0 5.4pt;\n border: var(--coco-word-table-border, 0);\n box-sizing: border-box;\n line-height: normal;\n vertical-align: top;\n}\n\ncoco-word-native-table td coco-word-native-p {\n min-height: 1.2em;\n margin: 0;\n}\n\ncoco-word-native-table td coco-word-native-p:last-child {\n margin-bottom: 0;\n}\n\ncoco-word-native-document.uses-compact-latin-tables coco-word-native-table td coco-word-native-p {\n font-size: 13px !important;\n line-height: 1.08 !important;\n}\n\ncoco-word-native-table td coco-word-native-table {\n margin: 0;\n}\n\ncoco-word-native-p img {\n display: inline-block;\n max-width: 100%;\n height: auto;\n vertical-align: baseline;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-float-right {\n float: right;\n max-width: 55%;\n margin: 0 0 10pt 14pt;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-float-left {\n float: left;\n max-width: 55%;\n margin: 0 14pt 10pt 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-top-bottom {\n display: block;\n clear: both;\n margin: 10pt auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-overlay-like {\n position: relative;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n display: block;\n margin: 8pt 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-paragraph-relative-anchor,\ncoco-word-native-drawing.coco-word-anchor-drawing.is-paragraph-relative-anchor {\n max-width: 100%;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-column-relative-anchor,\ncoco-word-native-drawing.coco-word-anchor-drawing.is-column-relative-anchor {\n max-width: min(100%, var(--coco-word-column-width, 100%));\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-absolute-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-centered {\n display: block;\n clear: both;\n margin-right: auto;\n margin-left: auto;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-behind-text {\n z-index: 0;\n}\n\ncoco-word-native-p img.coco-word-anchor-image.is-in-front-of-text {\n z-index: 2;\n}\n\ncoco-word-native-drawing {\n display: inline-flex;\n box-sizing: border-box;\n max-width: calc(100% - 4pt);\n min-width: 1px;\n min-height: 1px;\n margin: 0 2pt;\n padding: 2pt 4pt;\n vertical-align: baseline;\n white-space: pre-wrap;\n}\n\ncoco-word-native-drawing.has-border {\n border: 1px solid #d4d4d8;\n}\n\ncoco-word-native-drawing.is-empty {\n display: none !important;\n}\n\ncoco-word-native-drawing.has-fill {\n background: #ffffff;\n}\n\ncoco-word-native-drawing.is-line-or-connector {\n display: block;\n max-width: 100%;\n min-height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n}\n\ncoco-word-native-drawing.is-line-or-connector.is-horizontal-line {\n height: 0;\n border-top: 1px solid #111827;\n}\n\ncoco-word-native-drawing.is-line-or-connector.is-vertical-line {\n width: 0;\n border-left: 1px solid #111827;\n}\n\ncoco-word-native-drawing .coco-word-native-drawing-text {\n display: block;\n width: 100%;\n}\n\ncoco-word-native-drawing .coco-word-native-drawing-paragraph {\n display: block;\n min-height: 1.2em;\n margin: 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-float-right {\n float: right;\n max-width: 55%;\n margin: 0 0 10pt 14pt;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-float-left {\n float: left;\n max-width: 55%;\n margin: 0 14pt 10pt 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-top-bottom {\n display: flex;\n clear: both;\n margin: 10pt auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-overlay-like {\n position: relative;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n display: flex;\n margin: 8pt 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor {\n position: absolute;\n left: var(--coco-word-anchor-left, 0);\n top: var(--coco-word-anchor-top, 0);\n max-width: none;\n margin: 0;\n pointer-events: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-paragraph-relative-anchor {\n max-width: 100%;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-column-relative-anchor {\n max-width: min(100%, var(--coco-word-column-width, 100%));\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor.is-anchor-right {\n right: 0;\n left: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-absolute-anchor.is-anchor-center {\n left: 50%;\n transform: translateX(-50%);\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-centered {\n display: flex;\n clear: both;\n margin-right: auto;\n margin-left: auto;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-behind-text {\n z-index: 0;\n}\n\ncoco-word-native-drawing.coco-word-anchor-drawing.is-in-front-of-text {\n z-index: 2;\n}\n\ncoco-word-native-p img.is-selected {\n outline: 2px solid #2563eb;\n outline-offset: 2px;\n}\n\ncoco-word-native-table td.is-cell-range-selected {\n position: relative;\n box-shadow: inset 0 0 0 9999px rgb(37 99 235 / 14%);\n}\n\ncoco-word-native-table td.is-cell-range-selected::after {\n position: absolute;\n z-index: 3;\n inset: -1px;\n border: 1px solid #2563eb;\n pointer-events: none;\n content: "";\n}\n\ncoco-word-native-table td.is-cell-range-anchor::after,\ncoco-word-native-table td.is-cell-range-focus::after {\n border-width: 2px;\n}\n\n.coco-word-native-editor-host {\n position: relative;\n overflow: auto;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.coco-word-native-editor-host coco-word-native-document,\n.coco-word-native-editor-host coco-word-native-page,\n.coco-word-native-editor-host coco-word-native-page-body,\n.coco-word-native-editor-host coco-word-native-story,\n.coco-word-native-editor-host coco-word-native-p {\n user-select: text;\n -webkit-user-select: text;\n}\n\n.coco-word-image-resize-handle {\n position: absolute;\n z-index: 20;\n box-sizing: border-box;\n width: 12px;\n height: 12px;\n min-width: 12px;\n min-height: 12px;\n padding: 0;\n border: 2px solid #ffffff;\n border-radius: 2px;\n background: #2563eb;\n box-shadow: 0 0 0 1px #1d4ed8;\n cursor: nwse-resize;\n touch-action: none;\n}\n\n.coco-word-page-break {\n display: block;\n position: relative;\n height: 28px;\n margin: 8px 0;\n border-top: 1px dashed #b8bdc7;\n}\n\n.coco-word-page-break::after {\n content: "Page break";\n position: absolute;\n top: -9px;\n left: 50%;\n padding: 0 6px;\n background: #ffffff;\n color: #777d88;\n font-size: 10px;\n line-height: 16px;\n transform: translateX(-50%);\n}\n\ncoco-word-native-document.is-paginated .coco-word-page-break {\n display: none;\n}\n\n.coco-word-page p {\n margin: 0 0 12px;\n}\n\n.coco-word-page p[data-style-id="Title"] {\n margin: 0 0 24px;\n padding-bottom: 10px;\n border-bottom: 2px solid #4472c4;\n color: #17365d;\n font-size: 30pt;\n line-height: 1.18;\n}\n\n.coco-word-page p[data-style-id="Heading1"] {\n margin-top: 26px;\n margin-bottom: 10px;\n color: #365f91;\n font-size: 16pt;\n font-weight: 700;\n line-height: 1.25;\n}\n\n.coco-word-page p[data-style-id="Heading2"] {\n margin-top: 20px;\n margin-bottom: 8px;\n color: #4f81bd;\n font-size: 14pt;\n font-weight: 700;\n line-height: 1.3;\n}\n\n.coco-word-page img {\n display: inline-block;\n max-width: 100%;\n height: auto;\n vertical-align: baseline;\n}\n\n.coco-word-table-scroll {\n overflow-x: auto;\n max-width: 100%;\n margin: 12px 0;\n}\n\n.coco-word-page table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.coco-word-page tbody {\n display: table-row-group;\n}\n\n.coco-word-page td {\n min-width: 48px;\n padding: 0 5.4pt;\n border: var(--coco-word-table-border, 1px solid #d4d4d8);\n box-sizing: border-box;\n line-height: normal;\n}\n\n.coco-word-page td p {\n margin: 0 0 6px;\n}\n\n.coco-word-page td p:last-child {\n margin-bottom: 0;\n}\n\n.coco-word-comment {\n background: #fff1a8;\n border-bottom: 2px solid #e4b100;\n}\n\n.coco-word-revision-insert {\n background: #dcfce7;\n color: #166534;\n text-decoration: underline;\n}\n\n.coco-word-revision-delete {\n background: #fee2e2;\n color: #991b1b;\n text-decoration: line-through;\n}\n\nimg.coco-word-revision-delete {\n outline: 2px solid #dc2626;\n opacity: 0.72;\n}\n\nimg.coco-word-revision-insert {\n outline: 2px solid #16a34a;\n}\n\nimg.coco-word-revision-format {\n outline: 2px dashed #7c3aed;\n outline-offset: 2px;\n}\n\ncoco-word-native-table.coco-word-revision-insert {\n outline: 2px solid #2563eb;\n outline-offset: 2px;\n}\n\ncoco-word-native-table.coco-word-revision-delete {\n outline: 2px solid #dc2626;\n outline-offset: 2px;\n opacity: 0.78;\n}\n\n.coco-word-inspector {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n padding: 14px;\n background: #ffffff;\n border: 1px solid #d8dbe2;\n}\n\n@media (max-width: 1399px) {\n .coco-word-shell {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .coco-word-inspector {\n display: none;\n }\n}\n\n.coco-word-inspector h2 {\n margin: 0 0 12px;\n font-size: 15px;\n}\n\n.coco-word-inspector h2:not(:first-child) {\n margin-top: 18px;\n}\n\n.coco-word-acceptance {\n display: grid;\n gap: 10px;\n margin-bottom: 14px;\n font-size: 12px;\n}\n\n.coco-word-acceptance-status {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n height: 24px;\n padding: 0 8px;\n border: 1px solid #b7c7af;\n background: #eff8ea;\n color: #245917;\n font-weight: 700;\n}\n\n.coco-word-acceptance-status.is-warn {\n border-color: #e3c66d;\n background: #fff8df;\n color: #775400;\n}\n\n.coco-word-acceptance-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n}\n\n.coco-word-acceptance-metric {\n min-width: 0;\n padding: 7px;\n border: 1px solid #e1e4ea;\n background: #fafafa;\n}\n\n.coco-word-acceptance-metric span {\n display: block;\n color: #5f6368;\n font-size: 11px;\n}\n\n.coco-word-acceptance-metric strong {\n display: block;\n margin-top: 3px;\n color: #202124;\n font-size: 12px;\n font-weight: 700;\n overflow-wrap: anywhere;\n}\n\n.coco-word-acceptance-metric.is-good {\n border-color: #c8dac2;\n background: #f5fbf2;\n}\n\n.coco-word-acceptance-metric.is-warn {\n border-color: #efd77f;\n background: #fff9e8;\n}\n\n.coco-word-acceptance-section {\n color: #3f4247;\n font-size: 12px;\n font-weight: 700;\n}\n\n.coco-word-acceptance ul {\n margin: 0;\n padding-left: 18px;\n color: #775400;\n}\n\n.coco-word-acceptance-empty {\n color: #5f6368;\n}\n\n.coco-word-inspector pre {\n margin: 0;\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.coco-word-context-menu {\n position: fixed;\n z-index: 10000;\n display: flex;\n min-width: 188px;\n max-height: calc(100vh - 8px);\n padding: 4px;\n overflow-y: auto;\n flex-direction: column;\n background: #ffffff;\n border: 1px solid #c8c8c8;\n border-radius: 4px;\n box-shadow: 0 8px 24px rgb(0 0 0 / 16%);\n color: #202124;\n font: 13px/1.35 Arial, "Microsoft YaHei", sans-serif;\n}\n\n.coco-word-context-menu-item {\n min-height: 30px;\n padding: 5px 10px;\n border: 0;\n border-radius: 3px;\n background: transparent;\n color: inherit;\n font: inherit;\n letter-spacing: 0;\n text-align: left;\n white-space: nowrap;\n cursor: default;\n}\n\n.coco-word-context-menu-item:hover:not(:disabled),\n.coco-word-context-menu-item:focus-visible:not(:disabled) {\n background: #e8f0fe;\n outline: none;\n}\n\n.coco-word-context-menu-item:disabled {\n color: #9aa0a6;\n}\n\n.coco-word-context-menu-separator {\n height: 1px;\n margin: 4px 6px;\n background: #dadce0;\n}\n\n.coco-word-dialog-backdrop {\n position: fixed;\n inset: 0;\n z-index: 11000;\n display: grid;\n place-items: center;\n padding: 20px;\n box-sizing: border-box;\n background: rgb(15 23 42 / 28%);\n}\n\n.coco-word-dialog {\n width: min(420px, 100%);\n padding: 20px;\n box-sizing: border-box;\n background: #ffffff;\n border: 1px solid #c7cbd4;\n box-shadow: 0 12px 32px rgb(15 23 42 / 22%);\n}\n\n.coco-word-dialog h2 {\n margin: 0 0 14px;\n color: #202124;\n font-size: 17px;\n font-weight: 600;\n}\n\n.coco-word-dialog-input {\n display: block;\n width: 100%;\n min-height: 96px;\n padding: 9px 10px;\n box-sizing: border-box;\n border: 1px solid #c7cbd4;\n color: #202124;\n font: 14px/1.5 Arial, "Microsoft YaHei", sans-serif;\n resize: vertical;\n}\n\n.coco-word-dialog-input:focus {\n outline: 2px solid rgb(59 91 219 / 22%);\n border-color: #3b5bdb;\n}\n\n.coco-word-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 16px;\n}\n\n.coco-word-dialog-button {\n min-width: 72px;\n min-height: 34px;\n padding: 6px 14px;\n border: 1px solid #c7cbd4;\n background: #ffffff;\n color: #202124;\n font: 14px Arial, "Microsoft YaHei", sans-serif;\n cursor: pointer;\n}\n\n.coco-word-dialog-button.is-primary {\n border-color: #3158c9;\n background: #3158c9;\n color: #ffffff;\n}\n\n.coco-word-dialog-button:hover {\n filter: brightness(0.96);\n}\n';
|
|
39
39
|
|
|
40
40
|
// src/word/native-model.ts
|
|
41
41
|
function createNativeWordDocument(view) {
|
|
@@ -2615,11 +2615,44 @@ function twipsToPt(twips) {
|
|
|
2615
2615
|
__name(twipsToPt, "twipsToPt");
|
|
2616
2616
|
function fontFamilyToCss(fontFamily) {
|
|
2617
2617
|
const families = fontFamily.split(",").map((family) => family.trim()).filter((family) => family.length > 0);
|
|
2618
|
-
const quotedFamilies = families.map(
|
|
2618
|
+
const quotedFamilies = families.map(
|
|
2619
|
+
(family) => `"${family.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/[\r\n\f]/g, " ")}"`
|
|
2620
|
+
);
|
|
2619
2621
|
return [...quotedFamilies, "SimSun", '"Songti SC"', '"Noto Serif CJK SC"', "serif"].join(", ");
|
|
2620
2622
|
}
|
|
2621
2623
|
__name(fontFamilyToCss, "fontFamilyToCss");
|
|
2622
2624
|
|
|
2625
|
+
// src/word/native-url-safety.ts
|
|
2626
|
+
var RASTER_IMAGE_DATA_URL = /^data:(image\/(?:png|jpeg|gif|webp));base64,([a-z0-9+/]*={0,2})$/i;
|
|
2627
|
+
var SAFE_HYPERLINK_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]);
|
|
2628
|
+
function safeEmbeddedRasterImageUrl(value) {
|
|
2629
|
+
const trimmed = value.trim();
|
|
2630
|
+
return RASTER_IMAGE_DATA_URL.test(trimmed) ? trimmed : null;
|
|
2631
|
+
}
|
|
2632
|
+
__name(safeEmbeddedRasterImageUrl, "safeEmbeddedRasterImageUrl");
|
|
2633
|
+
function embeddedRasterImageBlob(value) {
|
|
2634
|
+
const safeUrl = safeEmbeddedRasterImageUrl(value);
|
|
2635
|
+
const match = safeUrl ? RASTER_IMAGE_DATA_URL.exec(safeUrl) : null;
|
|
2636
|
+
if (!match) throw new Error("Only embedded PNG, JPEG, GIF, or WebP images are supported");
|
|
2637
|
+
const binary = atob(match[2]);
|
|
2638
|
+
const bytes = new Uint8Array(binary.length);
|
|
2639
|
+
for (let index = 0; index < binary.length; index++) bytes[index] = binary.charCodeAt(index);
|
|
2640
|
+
return new Blob([bytes], { type: match[1].toLowerCase() });
|
|
2641
|
+
}
|
|
2642
|
+
__name(embeddedRasterImageBlob, "embeddedRasterImageBlob");
|
|
2643
|
+
function safeRenderedHyperlinkHref(target, anchor) {
|
|
2644
|
+
if (target) {
|
|
2645
|
+
try {
|
|
2646
|
+
const parsed = new URL(target.trim());
|
|
2647
|
+
if (SAFE_HYPERLINK_PROTOCOLS.has(parsed.protocol)) return parsed.href;
|
|
2648
|
+
} catch (e) {
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
if (anchor) return `#${encodeURIComponent(anchor)}`;
|
|
2652
|
+
return "#";
|
|
2653
|
+
}
|
|
2654
|
+
__name(safeRenderedHyperlinkHref, "safeRenderedHyperlinkHref");
|
|
2655
|
+
|
|
2623
2656
|
// src/word/native-renderer.ts
|
|
2624
2657
|
var NATIVE_ANNOTATION_RAIL_WIDTH_PX = 260;
|
|
2625
2658
|
function defineNativeWordElements() {
|
|
@@ -2657,6 +2690,10 @@ function renderNativeDocument(doc) {
|
|
|
2657
2690
|
root.classList.add("has-annotation-rail");
|
|
2658
2691
|
if (((_b = doc.pageLayout) == null ? void 0 : _b.width) !== void 0) {
|
|
2659
2692
|
root.style.minWidth = `${twipsToPxNumber(doc.pageLayout.width) + NATIVE_ANNOTATION_RAIL_WIDTH_PX}px`;
|
|
2693
|
+
} else {
|
|
2694
|
+
const scrollableWidth = `calc(100% + ${NATIVE_ANNOTATION_RAIL_WIDTH_PX}px)`;
|
|
2695
|
+
root.style.width = scrollableWidth;
|
|
2696
|
+
root.style.minWidth = scrollableWidth;
|
|
2660
2697
|
}
|
|
2661
2698
|
}
|
|
2662
2699
|
return root;
|
|
@@ -4561,7 +4598,8 @@ __name(renderNativeParagraph, "renderNativeParagraph");
|
|
|
4561
4598
|
function renderNativeImage(child) {
|
|
4562
4599
|
var _a, _b, _c, _d;
|
|
4563
4600
|
const img = document.createElement("img");
|
|
4564
|
-
|
|
4601
|
+
const safeSrc = safeEmbeddedRasterImageUrl(child.src);
|
|
4602
|
+
if (safeSrc) img.src = safeSrc;
|
|
4565
4603
|
img.alt = child.drawingId;
|
|
4566
4604
|
img.dataset.drawingId = child.drawingId;
|
|
4567
4605
|
if (child.revision) {
|
|
@@ -4816,12 +4854,6 @@ function renderNativeText(child) {
|
|
|
4816
4854
|
return span;
|
|
4817
4855
|
}
|
|
4818
4856
|
__name(renderNativeText, "renderNativeText");
|
|
4819
|
-
function safeRenderedHyperlinkHref(target, anchor) {
|
|
4820
|
-
if (target && /^(https?:|mailto:|tel:)/i.test(target.trim())) return target.trim();
|
|
4821
|
-
if (anchor) return `#${anchor}`;
|
|
4822
|
-
return "#";
|
|
4823
|
-
}
|
|
4824
|
-
__name(safeRenderedHyperlinkHref, "safeRenderedHyperlinkHref");
|
|
4825
4857
|
function renderNativeField(child) {
|
|
4826
4858
|
var _a;
|
|
4827
4859
|
const span = document.createElement("span");
|
|
@@ -5922,7 +5954,6 @@ function isRecord(value) {
|
|
|
5922
5954
|
}
|
|
5923
5955
|
__name(isRecord, "isRecord");
|
|
5924
5956
|
function serializeClipboardParagraphContent(paragraph) {
|
|
5925
|
-
var _a, _b;
|
|
5926
5957
|
let html = "";
|
|
5927
5958
|
let offset = 0;
|
|
5928
5959
|
const runs = [...paragraph.runs].map((run) => __spreadProps(__spreadValues({}, run), { from: Math.max(0, run.from), to: Math.min(paragraph.text.length, run.to) })).filter((run) => run.to > run.from).sort((left, right) => left.from - right.from || left.to - right.to);
|
|
@@ -5933,7 +5964,7 @@ function serializeClipboardParagraphContent(paragraph) {
|
|
|
5933
5964
|
const style = clipboardRunStyle(run.format);
|
|
5934
5965
|
let content = style ? `<span style="${escapeHtmlAttribute(style)}">${text}</span>` : text;
|
|
5935
5966
|
if (run.hyperlink) {
|
|
5936
|
-
const href = (
|
|
5967
|
+
const href = safeRenderedHyperlinkHref(run.hyperlink.target, run.hyperlink.anchor);
|
|
5937
5968
|
const title = run.hyperlink.tooltip ? ` title="${escapeHtmlAttribute(run.hyperlink.tooltip)}"` : "";
|
|
5938
5969
|
content = `<a href="${escapeHtmlAttribute(href)}"${title}>${content}</a>`;
|
|
5939
5970
|
}
|
|
@@ -6012,10 +6043,16 @@ function clipboardElementHyperlink(element) {
|
|
|
6012
6043
|
if (!href) return void 0;
|
|
6013
6044
|
const tooltip = (_b = element.getAttribute("title")) == null ? void 0 : _b.trim();
|
|
6014
6045
|
if (href.startsWith("#")) {
|
|
6015
|
-
|
|
6046
|
+
let anchor = href.slice(1);
|
|
6047
|
+
try {
|
|
6048
|
+
anchor = decodeURIComponent(anchor);
|
|
6049
|
+
} catch (e) {
|
|
6050
|
+
return void 0;
|
|
6051
|
+
}
|
|
6016
6052
|
return anchor ? __spreadValues({ anchor }, tooltip ? { tooltip } : {}) : void 0;
|
|
6017
6053
|
}
|
|
6018
|
-
|
|
6054
|
+
const safeHref = safeRenderedHyperlinkHref(href, void 0);
|
|
6055
|
+
return safeHref === "#" ? void 0 : __spreadValues({ target: safeHref }, tooltip ? { tooltip } : {});
|
|
6019
6056
|
}
|
|
6020
6057
|
__name(clipboardElementHyperlink, "clipboardElementHyperlink");
|
|
6021
6058
|
function clipboardElementFormat(element) {
|
|
@@ -8713,6 +8750,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
8713
8750
|
let sourceView = initialView;
|
|
8714
8751
|
let doc = createNativeWordDocument(sourceView);
|
|
8715
8752
|
let destroyed = false;
|
|
8753
|
+
let readOnly = options.readOnly === true;
|
|
8716
8754
|
const changes = [];
|
|
8717
8755
|
let emittedChanges = [];
|
|
8718
8756
|
let revision = 0;
|
|
@@ -8910,6 +8948,10 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
8910
8948
|
imageResizeHandle.style.top = `${imageRect.bottom - hostRect.top + host.scrollTop - 6}px`;
|
|
8911
8949
|
}, "positionImageResizeHandle");
|
|
8912
8950
|
const showImageResizeHandle = /* @__PURE__ */ __name(() => {
|
|
8951
|
+
if (readOnly) {
|
|
8952
|
+
removeImageResizeHandle();
|
|
8953
|
+
return;
|
|
8954
|
+
}
|
|
8913
8955
|
if (!selectedImage2) {
|
|
8914
8956
|
removeImageResizeHandle();
|
|
8915
8957
|
return;
|
|
@@ -8993,6 +9035,15 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
8993
9035
|
const repositionSelectedImageHandle = /* @__PURE__ */ __name(() => positionImageResizeHandle(), "repositionSelectedImageHandle");
|
|
8994
9036
|
window.addEventListener("resize", repositionSelectedImageHandle);
|
|
8995
9037
|
document.addEventListener("scroll", repositionSelectedImageHandle, true);
|
|
9038
|
+
const applyReadOnlyDom = /* @__PURE__ */ __name(() => {
|
|
9039
|
+
outerHost.setAttribute("aria-readonly", String(readOnly));
|
|
9040
|
+
host.dataset.readOnly = String(readOnly);
|
|
9041
|
+
if (!readOnly) return;
|
|
9042
|
+
for (const element of Array.from(host.querySelectorAll('[contenteditable="true"]'))) {
|
|
9043
|
+
element.contentEditable = "false";
|
|
9044
|
+
}
|
|
9045
|
+
removeImageResizeHandle();
|
|
9046
|
+
}, "applyReadOnlyDom");
|
|
8996
9047
|
const render = /* @__PURE__ */ __name((cursor, preservedSelection) => {
|
|
8997
9048
|
if (deferredRenderTimer !== null) {
|
|
8998
9049
|
window.clearTimeout(deferredRenderTimer);
|
|
@@ -9006,6 +9057,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
9006
9057
|
const rendered = renderNativeDocument(doc);
|
|
9007
9058
|
host.replaceChildren(rendered);
|
|
9008
9059
|
paginateNativeDocument(rendered, doc);
|
|
9060
|
+
applyReadOnlyDom();
|
|
9009
9061
|
observeNativeTableSizes(rendered);
|
|
9010
9062
|
const tableSelection = (preservedSelection == null ? void 0 : preservedSelection.kind) === "table-cell-range" ? preservedSelection : (selection == null ? void 0 : selection.kind) === "table-cell-range" ? selection : null;
|
|
9011
9063
|
renderTableCellRangeSelection(tableSelection);
|
|
@@ -9033,6 +9085,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
9033
9085
|
for (const current of replacements) {
|
|
9034
9086
|
current.replaceWith(renderNativeParagraph(paragraph));
|
|
9035
9087
|
}
|
|
9088
|
+
applyReadOnlyDom();
|
|
9036
9089
|
const root = (_a2 = host.querySelector(":scope > coco-word-native-document")) != null ? _a2 : host.querySelector("coco-word-native-document");
|
|
9037
9090
|
if (root) refreshNativePageCommentBubbles(root);
|
|
9038
9091
|
if (selectedImage2) showImageResizeHandle();
|
|
@@ -9315,6 +9368,10 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
9315
9368
|
activeLocalTypingTransaction = transaction;
|
|
9316
9369
|
}, "beginTableBrowserTypingTransaction");
|
|
9317
9370
|
const compositionStart = /* @__PURE__ */ __name((event) => {
|
|
9371
|
+
if (readOnly) {
|
|
9372
|
+
event.preventDefault();
|
|
9373
|
+
return;
|
|
9374
|
+
}
|
|
9318
9375
|
compositionActive = true;
|
|
9319
9376
|
if (compositionFinalizeTimer !== null) {
|
|
9320
9377
|
window.clearTimeout(compositionFinalizeTimer);
|
|
@@ -10163,12 +10220,12 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
10163
10220
|
return true;
|
|
10164
10221
|
}, "applyBrowserRedoFallback");
|
|
10165
10222
|
const undo = /* @__PURE__ */ __name(() => {
|
|
10166
|
-
if (destroyed || browserUndoStack.length === 0) return false;
|
|
10223
|
+
if (destroyed || readOnly || browserUndoStack.length === 0) return false;
|
|
10167
10224
|
activate();
|
|
10168
10225
|
return applyBrowserUndoFallback();
|
|
10169
10226
|
}, "undo");
|
|
10170
10227
|
const redo = /* @__PURE__ */ __name(() => {
|
|
10171
|
-
if (destroyed || browserRedoStack.length === 0) return false;
|
|
10228
|
+
if (destroyed || readOnly || browserRedoStack.length === 0) return false;
|
|
10172
10229
|
activate();
|
|
10173
10230
|
return applyBrowserRedoFallback();
|
|
10174
10231
|
}, "redo");
|
|
@@ -10790,15 +10847,17 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
10790
10847
|
return searchMatches.length;
|
|
10791
10848
|
}, "applySearchReplacement");
|
|
10792
10849
|
const replaceCurrent = /* @__PURE__ */ __name((replacement) => {
|
|
10850
|
+
if (readOnly) return false;
|
|
10793
10851
|
const match = searchState && searchState.activeIndex >= 0 ? searchState.matches[searchState.activeIndex] : null;
|
|
10794
10852
|
return match ? applySearchReplacement([match], replacement) > 0 : false;
|
|
10795
10853
|
}, "replaceCurrent");
|
|
10796
10854
|
const replaceAll = /* @__PURE__ */ __name((replacement) => {
|
|
10855
|
+
if (readOnly) return 0;
|
|
10797
10856
|
return searchState ? applySearchReplacement(searchState.matches, replacement) : 0;
|
|
10798
10857
|
}, "replaceAll");
|
|
10799
10858
|
const dispatch = /* @__PURE__ */ __name((command) => {
|
|
10800
10859
|
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
10801
|
-
if (destroyed) return false;
|
|
10860
|
+
if (destroyed || readOnly) return false;
|
|
10802
10861
|
activate();
|
|
10803
10862
|
const current = (_a2 = selection != null ? selection : currentNativeSelection(host)) != null ? _a2 : nativeSelectionFromCursor(host);
|
|
10804
10863
|
if (command.kind === "toggle-track-revisions") {
|
|
@@ -11586,6 +11645,10 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
11586
11645
|
}, "copySelectedImageToSystemClipboard");
|
|
11587
11646
|
const cut = /* @__PURE__ */ __name((event) => {
|
|
11588
11647
|
var _a2, _b2, _c2;
|
|
11648
|
+
if (readOnly) {
|
|
11649
|
+
copy(event);
|
|
11650
|
+
return;
|
|
11651
|
+
}
|
|
11589
11652
|
if (selectedImage2 && event.clipboardData) {
|
|
11590
11653
|
const imageSelection = selectedImage2;
|
|
11591
11654
|
const image = (_a2 = findNativeParagraph(doc, imageSelection.paraId)) == null ? void 0 : _a2.content.find(
|
|
@@ -11652,6 +11715,10 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
11652
11715
|
}, "cut");
|
|
11653
11716
|
const paste = /* @__PURE__ */ __name((event) => {
|
|
11654
11717
|
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
11718
|
+
if (readOnly) {
|
|
11719
|
+
event.preventDefault();
|
|
11720
|
+
return;
|
|
11721
|
+
}
|
|
11655
11722
|
const tableSelection = (selection == null ? void 0 : selection.kind) === "table-cell-range" ? selection : null;
|
|
11656
11723
|
if (tableSelection) {
|
|
11657
11724
|
const rich = parseRichTableClipboard(event);
|
|
@@ -12004,6 +12071,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12004
12071
|
}, "selectContextTarget");
|
|
12005
12072
|
const contextMenu = /* @__PURE__ */ __name((event) => {
|
|
12006
12073
|
var _a2;
|
|
12074
|
+
if (readOnly) return;
|
|
12007
12075
|
if (options.contextMenu === false) return;
|
|
12008
12076
|
event.preventDefault();
|
|
12009
12077
|
event.stopPropagation();
|
|
@@ -12051,6 +12119,10 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12051
12119
|
}, "closeContextMenuFromKey");
|
|
12052
12120
|
const beforeInput = /* @__PURE__ */ __name((event) => {
|
|
12053
12121
|
var _a2;
|
|
12122
|
+
if (readOnly) {
|
|
12123
|
+
event.preventDefault();
|
|
12124
|
+
return;
|
|
12125
|
+
}
|
|
12054
12126
|
if (event.inputType === suppressedBrowserHistoryInput) {
|
|
12055
12127
|
event.preventDefault();
|
|
12056
12128
|
suppressedBrowserHistoryInput = null;
|
|
@@ -12261,6 +12333,14 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12261
12333
|
});
|
|
12262
12334
|
return;
|
|
12263
12335
|
}
|
|
12336
|
+
if (readOnly) {
|
|
12337
|
+
const isHistory = (event.ctrlKey || event.metaKey) && (event.key.toLowerCase() === "z" || event.key.toLowerCase() === "y");
|
|
12338
|
+
if (isHistory) {
|
|
12339
|
+
event.preventDefault();
|
|
12340
|
+
event.stopPropagation();
|
|
12341
|
+
}
|
|
12342
|
+
return;
|
|
12343
|
+
}
|
|
12264
12344
|
const isUndo = (event.ctrlKey || event.metaKey) && !event.shiftKey && event.key.toLowerCase() === "z";
|
|
12265
12345
|
const isRedo = (event.ctrlKey || event.metaKey) && event.shiftKey && event.key.toLowerCase() === "z" || (event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "y";
|
|
12266
12346
|
if ((isUndo || isRedo) && suppressedBrowserHistoryInput) {
|
|
@@ -12387,6 +12467,11 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12387
12467
|
if (destroyed || event.composedPath().includes(host) || activeNativeWordHostByDocument.get(document) !== host) {
|
|
12388
12468
|
return;
|
|
12389
12469
|
}
|
|
12470
|
+
if (readOnly) {
|
|
12471
|
+
event.preventDefault();
|
|
12472
|
+
event.stopPropagation();
|
|
12473
|
+
return;
|
|
12474
|
+
}
|
|
12390
12475
|
if (event.inputType === "historyUndo" && undo()) {
|
|
12391
12476
|
event.preventDefault();
|
|
12392
12477
|
event.stopPropagation();
|
|
@@ -12559,6 +12644,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12559
12644
|
}
|
|
12560
12645
|
const hyperlink = target instanceof Element ? target.closest("a.coco-word-hyperlink") : null;
|
|
12561
12646
|
if (hyperlink) {
|
|
12647
|
+
if (readOnly) return;
|
|
12562
12648
|
event.preventDefault();
|
|
12563
12649
|
if ((event.ctrlKey || event.metaKey) && safeExternalHyperlink(hyperlink.dataset.hyperlinkTarget)) {
|
|
12564
12650
|
window.open(hyperlink.dataset.hyperlinkTarget, "_blank", "noopener,noreferrer");
|
|
@@ -12755,6 +12841,9 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12755
12841
|
preserveSelectionFromExternalPointer(event);
|
|
12756
12842
|
window.setTimeout(() => renderPreservedSelectionHighlight(true), 0);
|
|
12757
12843
|
}, "preserveSelectionAfterExternalClick");
|
|
12844
|
+
const drop = /* @__PURE__ */ __name((event) => {
|
|
12845
|
+
if (readOnly) event.preventDefault();
|
|
12846
|
+
}, "drop");
|
|
12758
12847
|
const updateHyperlinkNavigationMode = /* @__PURE__ */ __name((event) => {
|
|
12759
12848
|
host.classList.toggle("is-hyperlink-navigation-mode", event.ctrlKey || event.metaKey);
|
|
12760
12849
|
}, "updateHyperlinkNavigationMode");
|
|
@@ -12763,6 +12852,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12763
12852
|
}, "clearHyperlinkNavigationMode");
|
|
12764
12853
|
const input = /* @__PURE__ */ __name((event) => {
|
|
12765
12854
|
var _a2, _b2, _c2, _d;
|
|
12855
|
+
if (readOnly) return;
|
|
12766
12856
|
const inputEvent = event;
|
|
12767
12857
|
if (inputEvent.inputType === suppressedBrowserHistoryInput) {
|
|
12768
12858
|
suppressedBrowserHistoryInput = null;
|
|
@@ -12881,6 +12971,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12881
12971
|
host.addEventListener("copy", copy);
|
|
12882
12972
|
host.addEventListener("cut", cut);
|
|
12883
12973
|
host.addEventListener("paste", paste);
|
|
12974
|
+
host.addEventListener("drop", drop);
|
|
12884
12975
|
host.addEventListener("keydown", keyDown);
|
|
12885
12976
|
host.addEventListener("mousedown", mouseDown);
|
|
12886
12977
|
host.addEventListener("click", click);
|
|
@@ -12909,6 +13000,23 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12909
13000
|
get destroyed() {
|
|
12910
13001
|
return destroyed;
|
|
12911
13002
|
},
|
|
13003
|
+
isReadOnly() {
|
|
13004
|
+
return readOnly;
|
|
13005
|
+
},
|
|
13006
|
+
setReadOnly(next) {
|
|
13007
|
+
if (destroyed || readOnly === next) return;
|
|
13008
|
+
readOnly = next;
|
|
13009
|
+
closeContextMenu();
|
|
13010
|
+
if (readOnly) {
|
|
13011
|
+
cancelImageResizeDrag == null ? void 0 : cancelImageResizeDrag();
|
|
13012
|
+
cancelImageResizeDrag = null;
|
|
13013
|
+
pendingBrowserRangeDelete = null;
|
|
13014
|
+
pendingCompositionTransaction = null;
|
|
13015
|
+
activeLocalTypingTransaction = null;
|
|
13016
|
+
compositionActive = false;
|
|
13017
|
+
}
|
|
13018
|
+
render(void 0, selection != null ? selection : void 0);
|
|
13019
|
+
},
|
|
12912
13020
|
destroy() {
|
|
12913
13021
|
if (destroyed) return;
|
|
12914
13022
|
destroyed = true;
|
|
@@ -12918,6 +13026,7 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
12918
13026
|
host.removeEventListener("copy", copy);
|
|
12919
13027
|
host.removeEventListener("cut", cut);
|
|
12920
13028
|
host.removeEventListener("paste", paste);
|
|
13029
|
+
host.removeEventListener("drop", drop);
|
|
12921
13030
|
host.removeEventListener("keydown", keyDown);
|
|
12922
13031
|
host.removeEventListener("mousedown", mouseDown);
|
|
12923
13032
|
host.removeEventListener("click", click);
|
|
@@ -13029,16 +13138,16 @@ function renderNativeWordEditor(host, initialView, options = {}) {
|
|
|
13029
13138
|
return changes.slice();
|
|
13030
13139
|
},
|
|
13031
13140
|
canUndo() {
|
|
13032
|
-
return !destroyed && browserUndoStack.length > 0;
|
|
13141
|
+
return !destroyed && !readOnly && browserUndoStack.length > 0;
|
|
13033
13142
|
},
|
|
13034
13143
|
canRedo() {
|
|
13035
|
-
return !destroyed && browserRedoStack.length > 0;
|
|
13144
|
+
return !destroyed && !readOnly && browserRedoStack.length > 0;
|
|
13036
13145
|
},
|
|
13037
13146
|
undo,
|
|
13038
13147
|
redo,
|
|
13039
13148
|
canDispatch(command) {
|
|
13040
13149
|
var _a2;
|
|
13041
|
-
if (destroyed) return false;
|
|
13150
|
+
if (destroyed || readOnly) return false;
|
|
13042
13151
|
const current = (_a2 = selection != null ? selection : currentNativeSelection(host)) != null ? _a2 : nativeSelectionFromCursor(host);
|
|
13043
13152
|
return canDispatchNativeWordCommand(doc, current, command);
|
|
13044
13153
|
},
|
|
@@ -13205,9 +13314,11 @@ function blobToDataUrl(file) {
|
|
|
13205
13314
|
}
|
|
13206
13315
|
__name(blobToDataUrl, "blobToDataUrl");
|
|
13207
13316
|
function storeNativeImageClipboardSource(src) {
|
|
13317
|
+
const safeSrc = safeEmbeddedRasterImageUrl(src);
|
|
13318
|
+
if (!safeSrc) return "";
|
|
13208
13319
|
nextNativeImageClipboardId = nextNativeImageClipboardId + 1 >>> 0;
|
|
13209
13320
|
const token = `${NATIVE_IMAGE_CLIPBOARD_PREFIX}${Date.now().toString(36)}-${nextNativeImageClipboardId.toString(36)}`;
|
|
13210
|
-
nativeImageClipboardSources.set(token,
|
|
13321
|
+
nativeImageClipboardSources.set(token, safeSrc);
|
|
13211
13322
|
while (nativeImageClipboardSources.size > 8) {
|
|
13212
13323
|
const oldest = nativeImageClipboardSources.keys().next().value;
|
|
13213
13324
|
if (!oldest) break;
|
|
@@ -13231,9 +13342,7 @@ function nativeClipboardInlineText(child) {
|
|
|
13231
13342
|
}
|
|
13232
13343
|
__name(nativeClipboardInlineText, "nativeClipboardInlineText");
|
|
13233
13344
|
async function clipboardPngBlob(src) {
|
|
13234
|
-
const
|
|
13235
|
-
if (!response.ok) throw new Error(`Unable to load clipboard image: ${response.status}`);
|
|
13236
|
-
const source = await response.blob();
|
|
13345
|
+
const source = embeddedRasterImageBlob(src);
|
|
13237
13346
|
if (source.type === "image/png") return source;
|
|
13238
13347
|
const bitmap = await createImageBitmap(source);
|
|
13239
13348
|
try {
|