@stll/folio-core 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-edits/headless.d.ts +5 -4
- package/dist/ai-edits/headless.js +10 -67
- package/dist/compare/content.d.ts +7 -7
- package/dist/compare/content.js +6 -3
- package/dist/compare/types.d.ts +15 -14
- package/dist/compare/types.js +14 -7
- package/dist/content-controls/errors.d.ts +7 -6
- package/dist/content-controls/errors.js +6 -3
- package/dist/controller/canonicalComments.d.ts +4 -3
- package/dist/controller/canonicalComments.js +2 -1
- package/dist/controller/canonicalInlineProjection.d.ts +3 -3
- package/dist/controller/canonicalInlineProjection.js +2 -1
- package/dist/controller/canonicalListRendering.d.ts +5 -3
- package/dist/controller/canonicalPublicOperations.js +2 -1
- package/dist/controller/canonicalSession.d.ts +5 -5
- package/dist/controller/canonicalSession.js +2 -1
- package/dist/controller/hiddenEditorManager.d.ts +3 -2
- package/dist/controller/hiddenEditorManager.js +2 -1
- package/dist/document-operations.d.ts +5 -4
- package/dist/document-operations.js +4 -2
- package/dist/docx/appVersionNormalization.d.ts +3 -2
- package/dist/docx/appVersionNormalization.js +2 -1
- package/dist/docx/attributeRemainder.d.ts +3 -2
- package/dist/docx/attributeRemainder.js +2 -1
- package/dist/docx/canonicalResourceSave.d.ts +3 -2
- package/dist/docx/canonicalResourceSave.js +2 -1
- package/dist/docx/canonicalSave.d.ts +6 -4
- package/dist/docx/canonicalSave.js +2 -1
- package/dist/docx/canonicalSessionInput.d.ts +4 -3
- package/dist/docx/canonicalSessionInput.js +2 -1
- package/dist/docx/encryption/errors.d.ts +3 -2
- package/dist/docx/encryption/errors.js +2 -1
- package/dist/docx/ensureParaIds.d.ts +3 -2
- package/dist/docx/ensureParaIds.js +2 -1
- package/dist/docx/headerFooterVerbatim.d.ts +2 -2
- package/dist/docx/imageParser.d.ts +1 -1
- package/dist/docx/index.d.ts +1 -0
- package/dist/docx/linkedSdtPreservation.d.ts +5 -3
- package/dist/docx/linkedSdtPreservation.js +2 -1
- package/dist/docx/metadataPrivacy.d.ts +5 -4
- package/dist/docx/metadataPrivacy.js +4 -2
- package/dist/docx/numericIdAllocator.js +2 -1
- package/dist/docx/paragraphPropertySource.d.ts +3 -2
- package/dist/docx/paragraphPropertySource.js +2 -1
- package/dist/docx/parser.d.ts +3 -2
- package/dist/docx/parser.js +2 -1
- package/dist/docx/reviewResolutionProvenance.d.ts +3 -2
- package/dist/docx/reviewResolutionProvenance.js +2 -1
- package/dist/docx/revisionIdNormalization.d.ts +3 -2
- package/dist/docx/revisionIdNormalization.js +2 -1
- package/dist/docx/rezip.d.ts +5 -4
- package/dist/docx/rezip.js +4 -2
- package/dist/docx/sectionReferenceHistory.d.ts +3 -2
- package/dist/docx/sectionReferenceHistory.js +2 -1
- package/dist/docx/serializer/paragraphSerializer.js +6 -3
- package/dist/docx/serializer/partNamespaces.d.ts +3 -2
- package/dist/docx/serializer/partNamespaces.js +2 -1
- package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +5 -4
- package/dist/docx/server/applyDocxXmlPatchProposal.js +4 -2
- package/dist/docx/server/boundedArchive.d.ts +3 -2
- package/dist/docx/server/boundedArchive.js +2 -1
- package/dist/docx/server/build.d.ts +3 -2
- package/dist/docx/server/build.js +2 -1
- package/dist/docx/server/createBilingualDocument.d.ts +3 -2
- package/dist/docx/server/createBilingualDocument.js +4 -2
- package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +5 -4
- package/dist/docx/server/evaluateDocxXmlPatchProposal.js +4 -2
- package/dist/docx/server/inspectDocxPackage.d.ts +3 -2
- package/dist/docx/server/inspectDocxPackage.js +2 -1
- package/dist/docx/server/materializeYjsDocx.d.ts +3 -2
- package/dist/docx/server/materializeYjsDocx.js +2 -1
- package/dist/docx/server/migrateYjsAttrSchema.d.ts +3 -3
- package/dist/docx/server/migrateYjsAttrSchema.js +2 -1
- package/dist/docx/tableParser.d.ts +4 -4
- package/dist/docx/verbatimCapture.d.ts +3 -2
- package/dist/docx/verbatimCapture.js +2 -1
- package/dist/docx/xmlResourceLimits.d.ts +3 -2
- package/dist/docx/xmlResourceLimits.js +5 -2
- package/dist/export-pdf.d.ts +3 -3
- package/dist/export-pdf.js +2 -1
- package/dist/fonts/headlessMeasure.d.ts +3 -3
- package/dist/fonts/headlessMeasure.js +2 -1
- package/dist/fonts/sfnt/parse.d.ts +3 -3
- package/dist/fonts/sfnt/parse.js +2 -1
- package/dist/fonts/sfnt/subset.d.ts +3 -3
- package/dist/fonts/sfnt/subset.js +2 -1
- package/dist/fonts/sfnt/tables.d.ts +3 -3
- package/dist/fonts/sfnt/tables.js +2 -1
- package/dist/fonts/sfnt/woff.d.ts +3 -3
- package/dist/fonts/sfnt/woff.js +2 -1
- package/dist/headless-layout.d.ts +3 -3
- package/dist/headless-layout.js +2 -1
- package/dist/layout-engine/measure/font-metrics.worker.js +2 -1
- package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +3 -20
- package/dist/layout-engine/measure/hyphenationDictionaries.js +2 -1
- package/dist/layout-engine/section-breaks.d.ts +1 -1
- package/dist/layout-painter/renderPage.d.ts +6 -0
- package/dist/layout-painter/renderPage.js +83 -47
- package/dist/paged-layout/editorScrollRoot.d.ts +4 -0
- package/dist/paged-layout/editorScrollRoot.js +11 -3
- package/dist/paged-layout/scrollToPmPosition.js +41 -51
- package/dist/pdf/fonts.js +2 -1
- package/dist/pdf/images.d.ts +3 -3
- package/dist/pdf/images.js +2 -1
- package/dist/pdf/paint.d.ts +3 -3
- package/dist/pdf/paint.js +2 -1
- package/dist/pdf/writePdf.d.ts +3 -3
- package/dist/pdf/writePdf.js +2 -1
- package/dist/prosemirror/canonicalCommands.d.ts +9 -9
- package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +15 -14
- package/dist/prosemirror/commentIdAllocator.d.ts +3 -2
- package/dist/prosemirror/commentIdAllocator.js +2 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +4 -2
- package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +2 -2
- package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -10
- package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -10
- package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -6
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +4 -4
- package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -13
- package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -9
- package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -6
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +0 -14
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +3 -2
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +77 -46
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +2 -2
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -17
- package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -14
- package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -8
- package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -14
- package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -6
- package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -5
- package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -17
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +0 -12
- package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -6
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -7
- package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +8 -7
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +0 -22
- package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +0 -14
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -17
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -8
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -7
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +0 -25
- package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +0 -9
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -6
- package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -3
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -7
- package/dist/prosemirror/hyperlinkRemoval.d.ts +3 -2
- package/dist/prosemirror/hyperlinkRemoval.js +2 -1
- package/dist/prosemirror/markupViewProjection.d.ts +3 -3
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +6 -5
- package/dist/prosemirror/noteReferenceOccurrences.js +4 -2
- package/dist/prosemirror/numberingAttr.d.ts +5 -5
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +4 -4
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +4 -4
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +2 -2
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -4
- package/dist/prosemirror/plugins/documentStyleState.d.ts +4 -4
- package/dist/prosemirror/plugins/revisionIds.d.ts +3 -2
- package/dist/prosemirror/plugins/revisionIds.js +2 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +2 -2
- package/dist/prosemirror/plugins/suggestionMode.d.ts +2 -2
- package/dist/prosemirror/plugins/templateDirectives.d.ts +5 -5
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +4 -4
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
- package/dist/prosemirror/preservedXmlReview.d.ts +2 -2
- package/dist/prosemirror/runStyleFormatting.d.ts +7 -7
- package/dist/prosemirror/schema/index.d.ts +2 -1
- package/dist/prosemirror/schema/index.js +0 -7
- package/dist/prosemirror/styles/styleResolver.d.ts +1 -1
- package/dist/prosemirror/textInput.d.ts +3 -2
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +8 -8
- package/dist/prosemirror/yjsDocumentMetadata.js +6 -3
- package/dist/redline.d.ts +5 -4
- package/dist/redline.js +4 -2
- package/dist/redlineOperationLimit.d.ts +3 -2
- package/dist/redlineOperationLimit.js +2 -1
- package/dist/render-dom/commentAnchorAttributes.d.ts +1 -1
- package/dist/shaping/shaper.d.ts +3 -21
- package/dist/shaping/shaper.js +2 -1
- package/dist/utils/clipboard.d.ts +2 -2
- package/dist/utils/clipboard.js +2 -2
- package/dist/utils/formatToStyle.d.ts +1 -1
- package/dist/utils/headingCollector.d.ts +7 -0
- package/dist/utils/headingCollector.js +9 -1
- package/dist/utils/outlineHeadings.d.ts +20 -0
- package/dist/utils/outlineHeadings.js +43 -0
- package/dist/utils/units.d.ts +1 -1
- package/dist/version-comparison.d.ts +3 -2
- package/dist/version-comparison.js +2 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
|
+
import { CellMargins, ConditionalFormatStyle, PreservedMarkup, ShadingProperties, TableCellBorders, TableMeasurement, TextDirection } from "@stll/docx-core/model";
|
|
2
3
|
//#region src/prosemirror/commands/tableMergeFoldDecisions.d.ts
|
|
3
4
|
type TableMergeFoldDecisionsOptions = {
|
|
4
5
|
table: Node;
|
|
@@ -15,18 +16,18 @@ export declare const tableMergeFoldDecisions: ({ table, mode, revisionSet }: Tab
|
|
|
15
16
|
export declare const resolvedTableMergeOriginAttrs: (cell: Node) => {
|
|
16
17
|
_originalFormatting: {
|
|
17
18
|
vMerge: string;
|
|
18
|
-
width?:
|
|
19
|
-
borders?:
|
|
20
|
-
margins?:
|
|
21
|
-
shading?:
|
|
19
|
+
width?: TableMeasurement;
|
|
20
|
+
borders?: TableCellBorders;
|
|
21
|
+
margins?: CellMargins;
|
|
22
|
+
shading?: ShadingProperties;
|
|
22
23
|
verticalAlign?: "top" | "center" | "bottom";
|
|
23
|
-
textDirection?:
|
|
24
|
+
textDirection?: TextDirection;
|
|
24
25
|
gridSpan?: number;
|
|
25
26
|
fitText?: boolean;
|
|
26
27
|
noWrap?: boolean;
|
|
27
28
|
hideMark?: boolean;
|
|
28
|
-
conditionalFormat?:
|
|
29
|
-
preserved?:
|
|
29
|
+
conditionalFormat?: ConditionalFormatStyle;
|
|
30
|
+
preserved?: PreservedMarkup;
|
|
30
31
|
sourceXml?: string;
|
|
31
32
|
};
|
|
32
33
|
_preserveVMergeRestart: boolean;
|
|
@@ -40,19 +41,19 @@ type ResolvedVisibleTableCellMergeOptions = {
|
|
|
40
41
|
export declare const resolvedVisibleTableCellMergeAttrs: ({ cell, mode, origin }: ResolvedVisibleTableCellMergeOptions) => {
|
|
41
42
|
cellMarker: null;
|
|
42
43
|
_originalFormatting: {
|
|
43
|
-
width?:
|
|
44
|
-
borders?:
|
|
45
|
-
margins?:
|
|
46
|
-
shading?:
|
|
44
|
+
width?: TableMeasurement;
|
|
45
|
+
borders?: TableCellBorders;
|
|
46
|
+
margins?: CellMargins;
|
|
47
|
+
shading?: ShadingProperties;
|
|
47
48
|
verticalAlign?: "top" | "center" | "bottom";
|
|
48
|
-
textDirection?:
|
|
49
|
+
textDirection?: TextDirection;
|
|
49
50
|
gridSpan?: number;
|
|
50
51
|
vMerge?: "restart" | "continue";
|
|
51
52
|
fitText?: boolean;
|
|
52
53
|
noWrap?: boolean;
|
|
53
54
|
hideMark?: boolean;
|
|
54
|
-
conditionalFormat?:
|
|
55
|
-
preserved?:
|
|
55
|
+
conditionalFormat?: ConditionalFormatStyle;
|
|
56
|
+
preserved?: PreservedMarkup;
|
|
56
57
|
sourceXml?: string;
|
|
57
58
|
};
|
|
58
59
|
_preserveVMergeRestart: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Comment } from "../types/content.js";
|
|
2
|
+
import { TaggedErrorClass } from "better-result";
|
|
2
3
|
import { EditorView } from "prosemirror-view";
|
|
3
4
|
//#region src/prosemirror/commentIdAllocator.d.ts
|
|
4
5
|
/** Sentinel ID for a comment that hasn't been persisted yet (anchored to selection). */
|
|
5
6
|
export declare const PENDING_COMMENT_ID = -1;
|
|
6
|
-
declare const
|
|
7
|
-
export declare class CommentIdSpaceExhaustedError extends
|
|
7
|
+
declare const CommentIdSpaceExhaustedErrorBase: TaggedErrorClass<"CommentIdSpaceExhaustedError">;
|
|
8
|
+
export declare class CommentIdSpaceExhaustedError extends CommentIdSpaceExhaustedErrorBase<{
|
|
8
9
|
message: string;
|
|
9
10
|
}> {}
|
|
10
11
|
/** Allocate a valid, unused comment ID in this realm. */
|
|
@@ -10,7 +10,8 @@ import { MAX_REVISION_ID } from "@stll/docx-core/model";
|
|
|
10
10
|
*/
|
|
11
11
|
/** Sentinel ID for a comment that hasn't been persisted yet (anchored to selection). */
|
|
12
12
|
const PENDING_COMMENT_ID = -1;
|
|
13
|
-
|
|
13
|
+
const CommentIdSpaceExhaustedErrorBase = TaggedError("CommentIdSpaceExhaustedError");
|
|
14
|
+
var CommentIdSpaceExhaustedError = class extends CommentIdSpaceExhaustedErrorBase {};
|
|
14
15
|
let nextId = 1;
|
|
15
16
|
const reservedIds = /* @__PURE__ */ new Set();
|
|
16
17
|
/** Allocate a valid, unused comment ID in this realm. */
|
|
@@ -280,7 +280,8 @@ const restoreLinkedParagraphPropertySources = (content) => {
|
|
|
280
280
|
sources: new Set(targetsBySource.keys())
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
const SaveStylesheetSourceMismatchBase = TaggedError("SaveStylesheetSourceMismatch");
|
|
284
|
+
var SaveStylesheetSourceMismatch = class extends SaveStylesheetSourceMismatchBase {};
|
|
284
285
|
const parsedPackageStyles = (document, liveStyles) => {
|
|
285
286
|
const source = getDocumentSourceStyles(document, liveStyles);
|
|
286
287
|
switch (source.type) {
|
|
@@ -358,7 +359,8 @@ const saveStylesheet = (source, baseDocument) => {
|
|
|
358
359
|
default: return panic(`Unexpected stylesheet source: ${JSON.stringify(source)}`);
|
|
359
360
|
}
|
|
360
361
|
};
|
|
361
|
-
|
|
362
|
+
const MissingSaveStylesheetBase = TaggedError("MissingSaveStylesheet");
|
|
363
|
+
var MissingSaveStylesheet = class extends MissingSaveStylesheetBase {};
|
|
362
364
|
const assertSaveStylesheetAvailable = ({ pmDoc, styles, baseDocument, stylesheetSource }) => {
|
|
363
365
|
if (styles !== void 0) return;
|
|
364
366
|
if (stylesheetSource.type === "package" && baseDocument !== void 0) return;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/core/DocExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Doc Extension — top-level document node
|
|
5
|
-
*/
|
|
6
3
|
export declare const DocExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/core/HistoryExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* History Extension — undo/redo via prosemirror-history
|
|
5
|
-
*/
|
|
6
3
|
/**
|
|
7
4
|
* Who answers the undo and redo keys (Mod-z, Mod-y, Mod-Shift-z).
|
|
8
5
|
* - `"editor"`: the extension binds them. Default.
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/core/TextExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Text Extension — inline text node
|
|
5
|
-
*/
|
|
6
3
|
export declare const TextExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
|
-
import { EditorState, Plugin } from "prosemirror-state";
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
3
3
|
//#region src/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts
|
|
4
4
|
export declare const autoBidiDetectionKey: Readonly<{
|
|
5
5
|
key: string;
|
|
6
|
-
createKey: () =>
|
|
6
|
+
createKey: () => PluginKey<unknown>;
|
|
7
7
|
owns: (plugin: Plugin<unknown>) => boolean;
|
|
8
8
|
get: (state: EditorState) => Plugin<unknown> | undefined;
|
|
9
9
|
getState: (state: EditorState) => unknown;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/BidiShortcutExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Bidi Shortcut Extension — Ctrl/Cmd+Left Shift → LTR, Ctrl/Cmd+Right Shift → RTL
|
|
5
|
-
*
|
|
6
|
-
* Uses KeyboardEvent.code to distinguish ShiftLeft vs ShiftRight, matching the
|
|
7
|
-
* standard Google Docs shortcut behavior. The keydown/keyup state machine lives
|
|
8
|
-
* in {@link createBidiShortcutController}; this module only wires it to the
|
|
9
|
-
* editor view and dispatches the schema command on keyup.
|
|
10
|
-
*
|
|
11
|
-
* Priority: High (50) — should intercept before other keymaps
|
|
12
|
-
*/
|
|
13
3
|
export declare const BidiShortcutExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
14
4
|
//#endregion
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Content-Control Widgets Extension — wires the interactive widget plugin
|
|
5
|
-
* into the editor so clicking inside a typed content control invokes the
|
|
6
|
-
* appropriate transaction.
|
|
7
|
-
*
|
|
8
|
-
* The plugin owns checkbox toggling outright; dropdown / date picker chrome
|
|
9
|
-
* is delegated to the editor shell via the `onWidgetEvent` callback (the
|
|
10
|
-
* shell renders the menu / picker and dispatches via `dispatchDropdownPick`
|
|
11
|
-
* / `dispatchDatePick`).
|
|
12
|
-
*/
|
|
13
3
|
export declare const ContentControlWidgetsExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
14
4
|
//#endregion
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/DropCursorExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Drop Cursor Extension — shows a visual indicator when dragging content
|
|
5
|
-
*
|
|
6
|
-
* Uses prosemirror-dropcursor to display a cursor line at the drop position
|
|
7
|
-
* when dragging images or other content within the editor.
|
|
8
|
-
*/
|
|
9
3
|
export declare const DropCursorExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
10
4
|
//#endregion
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
|
-
import { Plugin } from "prosemirror-state";
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
3
3
|
//#region src/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts
|
|
4
4
|
export declare const emptyParagraphFormatKey: Readonly<{
|
|
5
5
|
key: string;
|
|
6
|
-
createKey: () =>
|
|
6
|
+
createKey: () => PluginKey<unknown>;
|
|
7
7
|
owns: (plugin: Plugin<unknown>) => boolean;
|
|
8
|
-
get: (state:
|
|
9
|
-
getState: (state:
|
|
8
|
+
get: (state: EditorState) => Plugin<unknown> | undefined;
|
|
9
|
+
getState: (state: EditorState) => unknown;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const EmptyParagraphFormatExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
12
12
|
//#endregion
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/GapCursorExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* GapCursor Extension — provides a caret slot before / between / after
|
|
5
|
-
* isolating block nodes (notably `blockSdt`).
|
|
6
|
-
*
|
|
7
|
-
* Without gapcursor, a user cannot place the caret before a doc-starting
|
|
8
|
-
* SDT, between two adjacent SDTs, or after a doc-final SDT — the
|
|
9
|
-
* `isolating` boundary makes regular text selections refuse those
|
|
10
|
-
* positions. The prosemirror-gapcursor plugin paints a thin "gap" caret
|
|
11
|
-
* at those slots so the document stays fully navigable.
|
|
12
|
-
*
|
|
13
|
-
* The plugin also exposes `Backspace` / `Delete` handlers that join the
|
|
14
|
-
* gap into the neighbour when sensible.
|
|
15
|
-
*/
|
|
16
3
|
export declare const GapCursorExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
17
4
|
//#endregion
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/ImageDragExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Image Drag Extension — handles drag-to-reposition for images
|
|
5
|
-
*
|
|
6
|
-
* Provides:
|
|
7
|
-
* - Ghost outline visual during drag
|
|
8
|
-
* - Drop indicator showing where image will land
|
|
9
|
-
* - Inline images: reorder within text flow via ProseMirror's default drag
|
|
10
|
-
* - Custom drag initiation from mousedown on selected images
|
|
11
|
-
*/
|
|
12
3
|
export declare const ImageDragExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
13
4
|
//#endregion
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/ImagePasteExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Image Paste Extension — handles image files pasted from the clipboard
|
|
5
|
-
*
|
|
6
|
-
* When an image file is present on the clipboard, this intercepts the paste,
|
|
7
|
-
* reads the image data, and inserts an image node instead of a file icon.
|
|
8
|
-
*/
|
|
9
3
|
export declare const ImagePasteExtension: (options?: Partial<Record<string, unknown>> | undefined) => Extension;
|
|
10
4
|
//#endregion
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Runs that a join moves into another paragraph take that paragraph's style.
|
|
5
|
-
*
|
|
6
|
-
* Deleting across a paragraph break (Backspace or Delete at the break, a
|
|
7
|
-
* deletion or typing over a selection that spans paragraphs) runs the later
|
|
8
|
-
* paragraph's remaining text on into the earlier one. A run's direct
|
|
9
|
-
* formatting is its own and stays; what the later paragraph's style lent it
|
|
10
|
-
* does not travel, and it reads in the style of the paragraph it now belongs
|
|
11
|
-
* to. The document styles plugin re-reads those runs after an ordinary edit.
|
|
12
|
-
*
|
|
13
|
-
* A transaction that re-reads the runs it moves itself (resolving a tracked
|
|
14
|
-
* change, an operation that merges paragraphs) says so with
|
|
15
|
-
* {@link JOINED_RUNS_RESTYLED_META}, and is left as it is.
|
|
16
|
-
*/
|
|
17
3
|
export declare const JOINED_RUNS_RESTYLED_META = "joinedRunsRestyled";
|
|
18
4
|
export declare const JoinedRunStyleExtension: (options?: Partial<{}> | undefined) => Extension;
|
|
19
5
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
3
|
+
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
4
4
|
//#region src/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts
|
|
5
5
|
type ParagraphPropertySourceSeed = {
|
|
6
6
|
contract: string | null;
|
|
@@ -8,7 +8,7 @@ type ParagraphPropertySourceSeed = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const paraIdAllocatorKey: Readonly<{
|
|
10
10
|
key: string;
|
|
11
|
-
createKey: () =>
|
|
11
|
+
createKey: () => PluginKey<ParagraphPropertySourceSeed>;
|
|
12
12
|
owns: (plugin: Plugin<ParagraphPropertySourceSeed>) => boolean;
|
|
13
13
|
get: (state: EditorState) => Plugin<ParagraphPropertySourceSeed> | undefined;
|
|
14
14
|
getState: (state: EditorState) => ParagraphPropertySourceSeed | undefined;
|
|
@@ -51,6 +51,7 @@ export declare const mapParagraphKeepers: (oldDoc: Node, transactions: readonly
|
|
|
51
51
|
* below so history, mappings, and duplicate ownership retain their semantics.
|
|
52
52
|
*/
|
|
53
53
|
export declare const ensureParaIdsInDoc: (doc: Node) => Node;
|
|
54
|
+
/** {@link ensureParaIdsInDoc} for a state that already exists. */
|
|
54
55
|
export declare const ensureParaIdsInState: (state: EditorState) => EditorState;
|
|
55
56
|
export declare const ParaIdAllocatorExtension: (options?: Partial<{}> | undefined) => Extension;
|
|
56
57
|
//#endregion
|
|
@@ -27,7 +27,10 @@ import { Plugin, Transaction } from "prosemirror-state";
|
|
|
27
27
|
* ids in an `appendTransaction` hook after every doc-changed step.
|
|
28
28
|
*
|
|
29
29
|
* Id lifecycle rules (locked by the co-located tests):
|
|
30
|
-
* -
|
|
30
|
+
* - Load: a missing/empty/reserved-zero or duplicate id gets one derived
|
|
31
|
+
* from the paragraph's text and ordinal (`ensureParaIdsInDoc`), the same
|
|
32
|
+
* id the headless reviewer derives for the same document.
|
|
33
|
+
* - Missing/empty/reserved-zero id after an edit: a fresh random id is minted.
|
|
31
34
|
* - Split: the half holding the paragraph's original start position
|
|
32
35
|
* keeps the id; the other half gets a fresh one. Anchors inside the
|
|
33
36
|
* content stay resolvable on the half that carries them.
|
|
@@ -207,7 +210,6 @@ const collectParaIdUpdatesFromCensus = (census, keeperPositions, deterministicSe
|
|
|
207
210
|
updates.sort((left, right) => left.pos - right.pos);
|
|
208
211
|
return updates;
|
|
209
212
|
};
|
|
210
|
-
const collectParaIdUpdates = (doc) => collectParaIdUpdatesFromCensus(collectParagraphCensus(doc));
|
|
211
213
|
const collectParagraphPropertySourceUpdates = (census, keeperPositions, transactions) => {
|
|
212
214
|
const updates = /* @__PURE__ */ new Map();
|
|
213
215
|
for (const { pos } of census.invalidSourceTokens) updates.set(pos, null);
|
|
@@ -237,49 +239,49 @@ const collectParagraphPropertySourceUpdates = (census, keeperPositions, transact
|
|
|
237
239
|
token
|
|
238
240
|
})).sort((left, right) => left.pos - right.pos);
|
|
239
241
|
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
/**
|
|
243
|
+
* The ids a loaded document's paragraphs take, in document order: `null`
|
|
244
|
+
* keeps the paragraph's own id, a string replaces it.
|
|
245
|
+
*
|
|
246
|
+
* This is the only load-time allocator. The live editor and the headless
|
|
247
|
+
* reviewer both seed through it, so the same document gives the same block ids
|
|
248
|
+
* on either side: an id read from the editor resolves when the edit is applied
|
|
249
|
+
* headlessly, and re-parsing the same bytes mints the same ids. An id is
|
|
250
|
+
* derived from the paragraph's text and its document ordinal, never drawn at
|
|
251
|
+
* random. Authored ids are reserved first, so a minted id never takes one a
|
|
252
|
+
* later paragraph owns; of a duplicated authored id, the first occurrence
|
|
253
|
+
* keeps it.
|
|
254
|
+
*/
|
|
255
|
+
const planLoadParaIds = (doc) => {
|
|
256
|
+
const paragraphs = [];
|
|
242
257
|
const taken = /* @__PURE__ */ new Set();
|
|
243
258
|
doc.descendants((node) => {
|
|
244
259
|
if (node.type.name !== "paragraph") return true;
|
|
260
|
+
paragraphs.push(node);
|
|
245
261
|
const id = node.attrs["paraId"];
|
|
246
|
-
if (
|
|
247
|
-
else taken.add(id);
|
|
262
|
+
if (isUsableParaId(id)) taken.add(id);
|
|
248
263
|
return false;
|
|
249
264
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
let changed = false;
|
|
257
|
-
const children = [];
|
|
258
|
-
parent.forEach((child) => {
|
|
259
|
-
let next = child;
|
|
260
|
-
if (child.type.name === "paragraph") {
|
|
261
|
-
const id = child.attrs["paraId"];
|
|
262
|
-
if (!isUsableParaId(id) || seen.has(id)) {
|
|
263
|
-
let newId = generateHexId();
|
|
264
|
-
while (taken.has(newId)) newId = generateHexId();
|
|
265
|
-
taken.add(newId);
|
|
266
|
-
seen.add(newId);
|
|
267
|
-
next = recreateProseNodeWithParagraphPropertySource(child, { attrs: {
|
|
268
|
-
...child.attrs,
|
|
269
|
-
paraId: newId
|
|
270
|
-
} });
|
|
271
|
-
} else seen.add(id);
|
|
272
|
-
const paraId = next.attrs["paraId"];
|
|
273
|
-
if (typeof paraId === "string") transferProseParagraphPropertySource(next, child, paraId);
|
|
274
|
-
} else if (child.childCount > 0) {
|
|
275
|
-
const content = rewriteInitialParaIds(child, taken, seen);
|
|
276
|
-
if (content !== child.content) next = recreateProseNodeWithParagraphPropertySource(child, { content });
|
|
265
|
+
const kept = /* @__PURE__ */ new Set();
|
|
266
|
+
return paragraphs.map((paragraph, index) => {
|
|
267
|
+
const id = paragraph.attrs["paraId"];
|
|
268
|
+
if (isUsableParaId(id) && !kept.has(id)) {
|
|
269
|
+
kept.add(id);
|
|
270
|
+
return null;
|
|
277
271
|
}
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
const seed = `${paragraph.textContent}:${String(index + 1)}`;
|
|
273
|
+
let minted = deterministicHexId(seed);
|
|
274
|
+
for (let salt = 1; taken.has(minted); salt++) minted = deterministicHexId(`${seed}:${String(salt)}`);
|
|
275
|
+
taken.add(minted);
|
|
276
|
+
return minted;
|
|
280
277
|
});
|
|
281
|
-
return changed ? Fragment.fromArray(children) : parent.content;
|
|
282
278
|
};
|
|
279
|
+
/** A paragraph's attrs once it holds an id folio minted rather than read. */
|
|
280
|
+
const mintedParagraphAttrs = (paragraph, paraId) => ({
|
|
281
|
+
...paragraph.attrs,
|
|
282
|
+
paraId,
|
|
283
|
+
...paragraph.type.spec.attrs?.["idStability"] !== void 0 && { idStability: "positional" }
|
|
284
|
+
});
|
|
283
285
|
/**
|
|
284
286
|
* Allocate initial paragraph IDs before constructing editor state.
|
|
285
287
|
*
|
|
@@ -288,19 +290,48 @@ const rewriteInitialParaIds = (parent, taken, seen) => {
|
|
|
288
290
|
* below so history, mappings, and duplicate ownership retain their semantics.
|
|
289
291
|
*/
|
|
290
292
|
const ensureParaIdsInDoc = (doc) => {
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
|
|
293
|
+
const plan = planLoadParaIds(doc);
|
|
294
|
+
if (plan.every((paraId) => paraId === null)) return doc;
|
|
295
|
+
let ordinal = 0;
|
|
296
|
+
const rewrite = (parent) => {
|
|
297
|
+
let changed = false;
|
|
298
|
+
const children = [];
|
|
299
|
+
parent.forEach((child) => {
|
|
300
|
+
let next = child;
|
|
301
|
+
if (child.type.name === "paragraph") {
|
|
302
|
+
const minted = plan[ordinal];
|
|
303
|
+
ordinal += 1;
|
|
304
|
+
if (minted !== null && minted !== void 0) next = recreateProseNodeWithParagraphPropertySource(child, { attrs: mintedParagraphAttrs(child, minted) });
|
|
305
|
+
const paraId = next.attrs["paraId"];
|
|
306
|
+
if (typeof paraId === "string") transferProseParagraphPropertySource(next, child, paraId);
|
|
307
|
+
} else if (child.childCount > 0) {
|
|
308
|
+
const content = rewrite(child);
|
|
309
|
+
if (content !== child.content) next = recreateProseNodeWithParagraphPropertySource(child, { content });
|
|
310
|
+
}
|
|
311
|
+
if (next !== child) changed = true;
|
|
312
|
+
children.push(next);
|
|
313
|
+
});
|
|
314
|
+
return changed ? Fragment.fromArray(children) : parent.content;
|
|
315
|
+
};
|
|
316
|
+
return recreateProseNodeWithParagraphPropertySource(doc, { content: rewrite(doc) });
|
|
294
317
|
};
|
|
318
|
+
/** {@link ensureParaIdsInDoc} for a state that already exists. */
|
|
295
319
|
const ensureParaIdsInState = (state) => {
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
320
|
+
const plan = planLoadParaIds(state.doc);
|
|
321
|
+
if (plan.every((paraId) => paraId === null)) return state;
|
|
298
322
|
const tr = state.tr;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
323
|
+
let ordinal = 0;
|
|
324
|
+
state.doc.descendants((node, pos) => {
|
|
325
|
+
if (node.type.name !== "paragraph") return true;
|
|
326
|
+
const minted = plan[ordinal];
|
|
327
|
+
ordinal += 1;
|
|
328
|
+
if (minted !== null && minted !== void 0) setProseParagraphMarkupWithPropertySource({
|
|
329
|
+
attrs: mintedParagraphAttrs(node, minted),
|
|
330
|
+
ownership: "transfer-allocated-id",
|
|
331
|
+
pos,
|
|
332
|
+
transaction: tr
|
|
333
|
+
});
|
|
334
|
+
return false;
|
|
304
335
|
});
|
|
305
336
|
ignoreTrackedChanges(tr);
|
|
306
337
|
tr.setMeta(paraIdAllocatorKey, "allocated");
|
|
@@ -2,11 +2,11 @@ import { document_d_exports } from "../../../types/document.js";
|
|
|
2
2
|
import { Extension } from "../types.js";
|
|
3
3
|
import { RemovedSectionReference, TrackedSectionEndpointRemoval } from "../../../internal/sectionEndpointResolution.js";
|
|
4
4
|
import { Node } from "prosemirror-model";
|
|
5
|
-
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
5
|
+
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
6
6
|
//#region src/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts
|
|
7
7
|
export declare const paragraphChangeTrackerKey: Readonly<{
|
|
8
8
|
key: string;
|
|
9
|
-
createKey: () =>
|
|
9
|
+
createKey: () => PluginKey<InternalParagraphChangeTrackerState>;
|
|
10
10
|
owns: (plugin: Plugin<InternalParagraphChangeTrackerState>) => boolean;
|
|
11
11
|
get: (state: EditorState) => Plugin<InternalParagraphChangeTrackerState> | undefined;
|
|
12
12
|
getState: (state: EditorState) => InternalParagraphChangeTrackerState | undefined;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/PasteCleanupExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Paste Cleanup Extension
|
|
5
|
-
*
|
|
6
|
-
* Wires two paste-handling behaviors into the editor:
|
|
7
|
-
*
|
|
8
|
-
* 1. `transformPastedHTML` — strips Office/web producer cruft from pasted HTML
|
|
9
|
-
* (see {@link cleanPastedHtml}) before the schema parser reads it. Runs at
|
|
10
|
-
* `Highest` priority so the cleanup happens before the style inliner and the
|
|
11
|
-
* default clipboard parser; ProseMirror chains every plugin's
|
|
12
|
-
* `transformPastedHTML`, so this cooperates with the inliner rather than
|
|
13
|
-
* replacing it, and `<style>` blocks are left intact for it to resolve.
|
|
14
|
-
* 2. `transformPasted` — drops unpaired bookmark and move-range boundaries,
|
|
15
|
-
* then points pasted headings at the open document's own heading style
|
|
16
|
-
* (see {@link retargetPastedHeadingStyles}).
|
|
17
|
-
* 3. `Mod-Alt-v` — "paste without formatting", inserting clipboard text with
|
|
18
|
-
* the source formatting stripped (see {@link pasteWithoutFormatting}).
|
|
19
|
-
*/
|
|
20
3
|
type PasteCleanupOptions = {
|
|
21
4
|
getInternalClipboardToken?: () => string;
|
|
22
5
|
};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { Extension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Paste Style Inliner Extension
|
|
5
|
-
*
|
|
6
|
-
* When pasting from apps like Google Docs that use class-based CSS
|
|
7
|
-
* (e.g. `<style>.c5 { margin-top: 12pt }</style>`) instead of inline styles,
|
|
8
|
-
* ProseMirror's parseDOM can't read the styles because elements aren't attached
|
|
9
|
-
* to the live document during parsing.
|
|
10
|
-
*
|
|
11
|
-
* This extension provides a `transformPastedHTML` hook that:
|
|
12
|
-
* 1. Parses the pasted HTML string
|
|
13
|
-
* 2. Extracts all `<style>` rules
|
|
14
|
-
* 3. Inlines them onto matching elements
|
|
15
|
-
* 4. Returns the modified HTML so parseDOM can read inline styles
|
|
16
|
-
*/
|
|
17
3
|
/**
|
|
18
4
|
* Transform pasted HTML by inlining class-based CSS and unwrapping Google Docs wrappers.
|
|
19
5
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/AllCapsExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* All Caps Mark Extension (w:caps)
|
|
5
|
-
*/
|
|
6
3
|
export declare const AllCapsExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/BoldExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Bold Mark Extension
|
|
5
|
-
*/
|
|
6
3
|
export declare const BoldExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Character Spacing Mark Extension
|
|
5
|
-
*
|
|
6
|
-
* Handles: character spacing (w:spacing), position/raise-lower (w:position),
|
|
7
|
-
* horizontal scale (w:w), and kerning (w:kern).
|
|
8
|
-
*
|
|
9
|
-
* Single mark with multiple attributes to avoid mark explosion.
|
|
10
|
-
*/
|
|
11
3
|
export declare const CharacterSpacingExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
12
4
|
//#endregion
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/CharacterStyleExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Character Style Mark Extension (w:rStyle)
|
|
5
|
-
*
|
|
6
|
-
* Carries a run's character style reference through ProseMirror so semantic
|
|
7
|
-
* styles (e.g. a house "DefinedTerm" style) survive the load → edit → save
|
|
8
|
-
* round-trip. The style's resolved formatting is flattened into the regular
|
|
9
|
-
* marks at load for rendering; this mark preserves only the reference. Style
|
|
10
|
-
* formatting resolves through the document's shared style engine so it does
|
|
11
|
-
* not become stale when a run moves between paragraph contexts.
|
|
12
|
-
*
|
|
13
|
-
* The mark renders as an unstyled span with a `data-character-style`
|
|
14
|
-
* attribute. parseDOM restores the styleId (so copy/paste inside the editor
|
|
15
|
-
* keeps the reference).
|
|
16
|
-
*/
|
|
17
3
|
export declare const CharacterStyleExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
18
4
|
//#endregion
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/CommentExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Comment Mark Extension — highlights text that has comments
|
|
5
|
-
*
|
|
6
|
-
* Applied to text ranges between commentRangeStart and commentRangeEnd.
|
|
7
|
-
* The comment ID links to the Comment object in the document model.
|
|
8
|
-
*/
|
|
9
3
|
export declare const CommentExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
10
4
|
//#endregion
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/FontFamilyExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Font Family Mark Extension
|
|
5
|
-
*/
|
|
6
3
|
export declare const FontFamilyExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/FontSizeExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Font Size Mark Extension
|
|
5
|
-
*/
|
|
6
3
|
export declare const FontSizeExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/FootnoteRefExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Footnote Reference Mark Extension
|
|
5
|
-
*
|
|
6
|
-
* Provides footnoteRef mark + insert/delete commands for footnotes and endnotes.
|
|
7
|
-
*/
|
|
8
3
|
export declare const FootnoteRefExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
9
4
|
//#endregion
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
import { MarkExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/marks/HiddenTextExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Hidden Text Mark Extension (w:vanish, OOXML §17.3.2.41)
|
|
5
|
-
*
|
|
6
|
-
* Word's editing view dims hidden text with a dotted underline so the
|
|
7
|
-
* author can navigate to and edit it; the print/normal view suppresses it
|
|
8
|
-
* entirely. The painter mirrors the editing-view treatment so PM cursor
|
|
9
|
-
* traversal stays correct across hidden ranges. The `docx-hidden` class
|
|
10
|
-
* hook lets host CSS opt into print-style suppression independently.
|
|
11
|
-
*
|
|
12
|
-
* The dotted-underline visual is delivered via `editor.css` (`.docx-hidden`
|
|
13
|
-
* rule), NOT inline `text-decoration`. Inline `text-decoration: underline`
|
|
14
|
-
* would be picked up by `UnderlineExtension`'s `style: "text-decoration"`
|
|
15
|
-
* parser on DOM/clipboard reparse and add a spurious `<w:u>` alongside
|
|
16
|
-
* `<w:vanish/>` on export.
|
|
17
|
-
*
|
|
18
|
-
* eigenpal #424 (w:vanish gap 9).
|
|
19
|
-
*/
|
|
20
3
|
export declare const HiddenTextExtension: (options?: Partial<Record<string, unknown>> | undefined) => MarkExtension;
|
|
21
4
|
//#endregion
|