@stll/folio-core 0.63.0 → 0.63.1
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/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/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,8 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/PageBreakExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Page Break Extension — block node representing a DOCX page break
|
|
5
|
-
*/
|
|
6
3
|
/**
|
|
7
4
|
* LEGACY_PAGE_BREAK_NODE_REMOVAL_CONDITION: delete the block node after persisted editor
|
|
8
5
|
* snapshots created before `pageBreakRun` have been normalized and telemetry
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts
|
|
3
|
-
/** Inline owner for an authored `<w:br w:type="page"/>` run child. */
|
|
4
3
|
export declare const PageBreakRunExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
5
4
|
//#endregion
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* A zero-width block for markup folio keeps opaquely between two blocks.
|
|
5
|
-
*
|
|
6
|
-
* The block-level twin of the `preservedXml` inline atom. A `w:permStart`
|
|
7
|
-
* between two paragraphs, an `m:oMathPara`, a `w:altChunk`, a comment or move
|
|
8
|
-
* range that opens between blocks: the editor has no model for any of it and
|
|
9
|
-
* does not need one, because it only has to not lose it. So the node renders
|
|
10
|
-
* nothing, takes no selection and holds no text.
|
|
11
|
-
*
|
|
12
|
-
* **Position is structure, not an attribute.** The node sits between the same
|
|
13
|
-
* two blocks it sat between in the source, and ProseMirror's own mapping keeps
|
|
14
|
-
* it there: inserting, splitting or deleting a neighbour moves the markup the
|
|
15
|
-
* way a reader would expect, and nothing has to keep an index honest. The
|
|
16
|
-
* alternative — an index into the container recorded on the node — drifts the
|
|
17
|
-
* first time anything around it changes, and a drifting index is how markup
|
|
18
|
-
* ends up in the wrong place rather than merely lost.
|
|
19
|
-
*
|
|
20
|
-
* Deleting a *neighbour* therefore leaves the markup attached to whatever now
|
|
21
|
-
* follows it; only a selection that covers the node itself removes it, which
|
|
22
|
-
* is the same rule the editor applies to every other block.
|
|
23
|
-
*
|
|
24
|
-
* The integrity plugin removes a node that can never write markup back: bad
|
|
25
|
-
* attributes, or an empty payload left by a paste through the DOM. Keeping one
|
|
26
|
-
* would leave a zero-width block in the document that serializes to nothing.
|
|
27
|
-
*/
|
|
28
3
|
/** The node name, for callers asking what a container holds. */
|
|
29
4
|
export declare const PRESERVED_BLOCK_NODE_NAME = "preservedBlock";
|
|
30
5
|
export declare const PreservedBlockExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* An opaque inline atom for a run child folio does not model.
|
|
5
|
-
*
|
|
6
|
-
* The editor cannot edit markup it has no model for, and it does not have to:
|
|
7
|
-
* it only has to not lose it. The node carries the captured bytes untouched
|
|
8
|
-
* and shows the visible text the markup puts on the line (`w:ruby` renders its
|
|
9
|
-
* `w:rubyBase` there), so the round trip keeps both the document's text and
|
|
10
|
-
* the document's markup.
|
|
11
|
-
*/
|
|
12
3
|
/** The node name, for callers asking what a paragraph holds. */
|
|
13
4
|
export declare const PRESERVED_XML_NODE_NAME = "preservedXml";
|
|
14
5
|
export declare const PreservedXmlExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts
|
|
3
|
-
/** Zero-width cached pagination boundary preserved from DOCX. */
|
|
4
3
|
/**
|
|
5
4
|
* The node name, for callers that have to ask whether anything is LEFT in a
|
|
6
5
|
* paragraph. This node is zero-width and carries no revision of its own, so a
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/SdtExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* SDT Extension — inline content control node (Structured Document Tag)
|
|
5
|
-
*
|
|
6
|
-
* Represents OOXML inline SDTs as an inline node wrapping text content.
|
|
7
|
-
* Supports: richText, plainText, date, dropdown, comboBox, checkbox.
|
|
8
|
-
*/
|
|
9
3
|
/** The editor's node for an inline `w:sdt`. */
|
|
10
4
|
export declare const INLINE_CONTENT_CONTROL_NODE_NAME = "sdt";
|
|
11
5
|
export declare const SdtExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/TabExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Tab Extension — inline tab character node
|
|
5
|
-
*/
|
|
6
3
|
export declare const TabExtension: (options?: Partial<Record<string, unknown>> | undefined) => NodeExtension;
|
|
7
4
|
//#endregion
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { NodeExtension } from "../types.js";
|
|
2
2
|
//#region src/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Zero-width inline anchor for a text box extracted to a sibling PM block.
|
|
5
|
-
*
|
|
6
|
-
* Keeping the anchor in the paragraph lets ordinary ProseMirror transactions
|
|
7
|
-
* map its position as surrounding text is edited. The save conversion consumes
|
|
8
|
-
* it when the sibling text box is restored to the DOCX run stream.
|
|
9
|
-
*/
|
|
10
3
|
type TextBoxAnchorOptions = {
|
|
11
4
|
getInternalClipboardToken?: () => string;
|
|
12
5
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
2
|
import { EditorState, Transaction } from "prosemirror-state";
|
|
3
|
+
import { TaggedErrorClass } from "better-result";
|
|
3
4
|
//#region src/prosemirror/hyperlinkRemoval.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
export declare class HyperlinkRemovalRefusal extends
|
|
5
|
+
declare const HyperlinkRemovalRefusalBase: TaggedErrorClass<"HyperlinkRemovalRefusal">;
|
|
6
|
+
export declare class HyperlinkRemovalRefusal extends HyperlinkRemovalRefusalBase<{
|
|
6
7
|
message: string;
|
|
7
8
|
}> {}
|
|
8
9
|
type HyperlinkRemovalRangeOptions = {
|
|
@@ -17,7 +17,8 @@ import { TaggedError } from "better-result";
|
|
|
17
17
|
* text never did. Rejecting brings the link back as it was; accepting leaves
|
|
18
18
|
* the plain text an untracked removal leaves.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
const HyperlinkRemovalRefusalBase = TaggedError("HyperlinkRemovalRefusal");
|
|
21
|
+
var HyperlinkRemovalRefusal = class extends HyperlinkRemovalRefusalBase {};
|
|
21
22
|
const partialInlineRefusal = () => new HyperlinkRemovalRefusal({ message: "Hyperlink removal cannot split an indivisible inline element." });
|
|
22
23
|
/** Canonical inline elements have no addressable interior gaps. */
|
|
23
24
|
const assertHyperlinkRemovalRange = ({ doc, from, to }) => {
|
|
@@ -5,14 +5,14 @@ import { indexedPositionMap } from "../internal/indexedPositionMap.js";
|
|
|
5
5
|
import { RevisionResolutionMode } from "../internal/revisionResolutionInline.js";
|
|
6
6
|
import { Node } from "prosemirror-model";
|
|
7
7
|
import { EditorState } from "prosemirror-state";
|
|
8
|
-
import { StepMap } from "prosemirror-transform";
|
|
8
|
+
import { Mapping, Step, StepMap } from "prosemirror-transform";
|
|
9
9
|
//#region src/prosemirror/markupViewProjection.d.ts
|
|
10
10
|
/** Resolve every revision in the state's story with the state's own styles and numbering. */
|
|
11
11
|
export declare const resolveStateStory: (state: EditorState, mode: RevisionResolutionMode) => {
|
|
12
12
|
resolved: Node;
|
|
13
|
-
mapping:
|
|
13
|
+
mapping: Mapping;
|
|
14
14
|
positionMap: StepMap;
|
|
15
|
-
steps:
|
|
15
|
+
steps: Step[];
|
|
16
16
|
changedRanges: {
|
|
17
17
|
from: number;
|
|
18
18
|
to: number;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
2
|
import { Plugin, Transaction } from "prosemirror-state";
|
|
3
|
+
import { TaggedErrorClass } from "better-result";
|
|
3
4
|
//#region src/prosemirror/noteReferenceOccurrences.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
export declare class NoteReferenceEditRefusal extends
|
|
5
|
+
declare const NoteReferenceEditRefusalBase: TaggedErrorClass<"NoteReferenceEditRefusal">;
|
|
6
|
+
export declare class NoteReferenceEditRefusal extends NoteReferenceEditRefusalBase<{
|
|
6
7
|
message: string;
|
|
7
8
|
}> {}
|
|
8
|
-
declare const
|
|
9
|
-
export declare class NoteReferenceReplayDefect extends
|
|
9
|
+
declare const NoteReferenceReplayDefectBase: TaggedErrorClass<"NoteReferenceReplayDefect">;
|
|
10
|
+
export declare class NoteReferenceReplayDefect extends NoteReferenceReplayDefectBase<{
|
|
10
11
|
message: string;
|
|
11
12
|
}> {}
|
|
12
13
|
export declare const markNoteReferenceReplay: (transaction: Transaction) => void;
|
|
@@ -16,6 +17,6 @@ export declare const mintNoteReferenceOccurrenceId: () => string;
|
|
|
16
17
|
export declare const coalesceNoteReferenceOccurrences: (paragraph: Node) => Node;
|
|
17
18
|
export declare const assertNoteReferenceOccurrences: (doc: Node) => void;
|
|
18
19
|
/** Production edit boundary: refuse before committing an unsaveable occurrence. */
|
|
19
|
-
export declare const noteReferenceOccurrencePlugin: () => Plugin
|
|
20
|
+
export declare const noteReferenceOccurrencePlugin: () => Plugin;
|
|
20
21
|
//#endregion
|
|
21
22
|
export {};
|
|
@@ -4,8 +4,10 @@ import { Fragment, Mark, Slice } from "prosemirror-model";
|
|
|
4
4
|
import { Plugin } from "prosemirror-state";
|
|
5
5
|
import { isHistoryTransaction } from "prosemirror-history";
|
|
6
6
|
//#region src/prosemirror/noteReferenceOccurrences.ts
|
|
7
|
-
|
|
8
|
-
var
|
|
7
|
+
const NoteReferenceEditRefusalBase = TaggedError("NoteReferenceEditRefusal");
|
|
8
|
+
var NoteReferenceEditRefusal = class extends NoteReferenceEditRefusalBase {};
|
|
9
|
+
const NoteReferenceReplayDefectBase = TaggedError("NoteReferenceReplayDefect");
|
|
10
|
+
var NoteReferenceReplayDefect = class extends NoteReferenceReplayDefectBase {};
|
|
9
11
|
const NOTE_OCCURRENCE_REPLAY_META = "noteReferenceOccurrenceReplay";
|
|
10
12
|
const markNoteReferenceReplay = (transaction) => {
|
|
11
13
|
transaction.setMeta(NOTE_OCCURRENCE_REPLAY_META, true);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParagraphNumberingOverride } from "@stll/docx-core/model";
|
|
1
|
+
import { ParagraphNumberingOverride, ResolvedParagraphNumbering } from "@stll/docx-core/model";
|
|
2
2
|
//#region src/prosemirror/numberingAttr.d.ts
|
|
3
3
|
export type ParagraphNumberingSources = {
|
|
4
4
|
numPr: ParagraphNumberingOverride | undefined;
|
|
@@ -11,13 +11,13 @@ export type ParagraphNumberingBoundarySources = {
|
|
|
11
11
|
/** Normalize attr absence at the boundary, while requiring both source tiers. */
|
|
12
12
|
export declare const paragraphNumberingSourcesFromBoundary: ({ numPr, numPrFromStyle }: ParagraphNumberingBoundarySources) => ParagraphNumberingSources;
|
|
13
13
|
/** Effective membership is derived; neither source slot becomes an authored override. */
|
|
14
|
-
export declare const effectiveParagraphNumbering: ({ numPr, numPrFromStyle }: ParagraphNumberingSources) =>
|
|
14
|
+
export declare const effectiveParagraphNumbering: ({ numPr, numPrFromStyle }: ParagraphNumberingSources) => ResolvedParagraphNumbering;
|
|
15
15
|
/** A list reference for membership consumers; cancellation and absence are not lists.
|
|
16
16
|
* OOXML defaults an omitted ilvl to zero only within an existing numbering reference.
|
|
17
17
|
*/
|
|
18
|
-
export declare const effectiveParagraphNumberingReference: (sources: ParagraphNumberingSources) =>
|
|
19
|
-
readonly
|
|
20
|
-
}
|
|
18
|
+
export declare const effectiveParagraphNumberingReference: (sources: ParagraphNumberingSources) => Exclude<ResolvedParagraphNumbering, {
|
|
19
|
+
readonly kind: "none";
|
|
20
|
+
}> | undefined;
|
|
21
21
|
declare const PARAGRAPH_NUMBERING_ATTR: unique symbol;
|
|
22
22
|
/**
|
|
23
23
|
* The only value a persisted `numPr` attr slot may hold.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PluginKeyOwner } from "../pluginKeyOwner.js";
|
|
2
|
-
import { Plugin } from "prosemirror-state";
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
3
3
|
import { DecorationSet } from "prosemirror-view";
|
|
4
4
|
//#region src/prosemirror/plugins/aiCitationDecorations.d.ts
|
|
5
5
|
export declare const aiCitationDecorationsKey: Readonly<{
|
|
6
6
|
key: string;
|
|
7
|
-
createKey: () =>
|
|
7
|
+
createKey: () => PluginKey<AICitationDecorationState>;
|
|
8
8
|
owns: (plugin: Plugin<AICitationDecorationState>) => boolean;
|
|
9
|
-
get: (state:
|
|
10
|
-
getState: (state:
|
|
9
|
+
get: (state: EditorState) => Plugin<AICitationDecorationState> | undefined;
|
|
10
|
+
getState: (state: EditorState) => AICitationDecorationState | undefined;
|
|
11
11
|
}>;
|
|
12
12
|
declare const SET_META = "set";
|
|
13
13
|
declare const ACTIVE_META = "active";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AISuggestion, AISuggestionSeverity } from "../../ai-suggestions/types.js";
|
|
2
2
|
import { PluginKeyOwner } from "../pluginKeyOwner.js";
|
|
3
|
-
import { Plugin } from "prosemirror-state";
|
|
3
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
4
4
|
import { DecorationSet } from "prosemirror-view";
|
|
5
5
|
//#region src/prosemirror/plugins/aiSuggestionDecorations.d.ts
|
|
6
6
|
export declare const aiSuggestionDecorationsKey: Readonly<{
|
|
7
7
|
key: string;
|
|
8
|
-
createKey: () =>
|
|
8
|
+
createKey: () => PluginKey<AISuggestionDecorationState>;
|
|
9
9
|
owns: (plugin: Plugin<AISuggestionDecorationState>) => boolean;
|
|
10
|
-
get: (state:
|
|
11
|
-
getState: (state:
|
|
10
|
+
get: (state: EditorState) => Plugin<AISuggestionDecorationState> | undefined;
|
|
11
|
+
getState: (state: EditorState) => AISuggestionDecorationState | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
declare const SET_META = "set";
|
|
14
14
|
declare const FOCUS_META = "focus";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PluginKeyOwner } from "../pluginKeyOwner.js";
|
|
2
|
-
import { EditorState, Plugin } from "prosemirror-state";
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
3
3
|
//#region src/prosemirror/plugins/anonymizationDecorations.d.ts
|
|
4
4
|
export type AnonymizationTerm = {
|
|
5
5
|
/** Canonical surface form, displayed in tooltips. */
|
|
@@ -24,7 +24,7 @@ type AnonymizationDecorationState = {
|
|
|
24
24
|
};
|
|
25
25
|
export declare const anonymizationDecorationsKey: Readonly<{
|
|
26
26
|
key: string;
|
|
27
|
-
createKey: () =>
|
|
27
|
+
createKey: () => PluginKey<AnonymizationDecorationState>;
|
|
28
28
|
owns: (plugin: Plugin<AnonymizationDecorationState>) => boolean;
|
|
29
29
|
get: (state: EditorState) => Plugin<AnonymizationDecorationState> | undefined;
|
|
30
30
|
getState: (state: EditorState) => AnonymizationDecorationState | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
2
2
|
import { DecorationSet } from "prosemirror-view";
|
|
3
3
|
//#region src/prosemirror/plugins/autocompleteSuggestion.d.ts
|
|
4
4
|
export type AutocompleteSuggestionStatus = "idle" | "streaming" | "shown";
|
|
@@ -15,7 +15,7 @@ export type AutocompleteSuggestionState = {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const autocompleteSuggestionKey: Readonly<{
|
|
17
17
|
key: string;
|
|
18
|
-
createKey: () =>
|
|
18
|
+
createKey: () => PluginKey<AutocompleteSuggestionPluginState>;
|
|
19
19
|
owns: (plugin: Plugin<AutocompleteSuggestionPluginState>) => boolean;
|
|
20
20
|
get: (state: EditorState) => Plugin<AutocompleteSuggestionPluginState> | undefined;
|
|
21
21
|
getState: (state: EditorState) => AutocompleteSuggestionPluginState | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContentControlBoundError, ContentControlLockedError, ContentControlTypeError } from "../../content-controls/errors.js";
|
|
2
2
|
import "../../content-controls/index.js";
|
|
3
|
-
import { Plugin } from "prosemirror-state";
|
|
3
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
4
4
|
import { EditorView } from "prosemirror-view";
|
|
5
5
|
//#region src/prosemirror/plugins/contentControlWidgets.d.ts
|
|
6
6
|
export type ContentControlWidgetAnchor = {
|
|
@@ -49,10 +49,10 @@ type HandleContentControlWidgetClickOptions = {
|
|
|
49
49
|
};
|
|
50
50
|
export declare const contentControlWidgetsPluginKey: Readonly<{
|
|
51
51
|
key: string;
|
|
52
|
-
createKey: () =>
|
|
52
|
+
createKey: () => PluginKey<unknown>;
|
|
53
53
|
owns: (plugin: Plugin<unknown>) => boolean;
|
|
54
|
-
get: (state:
|
|
55
|
-
getState: (state:
|
|
54
|
+
get: (state: EditorState) => Plugin<unknown> | undefined;
|
|
55
|
+
getState: (state: EditorState) => unknown;
|
|
56
56
|
}>;
|
|
57
57
|
/**
|
|
58
58
|
* CustomEvent name dispatched on the editor view DOM whenever the plugin
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { BuiltInStyleIndex } from "../../docx/builtInStyles.js";
|
|
3
3
|
import { StyleResolver } from "../styles/styleResolver.js";
|
|
4
|
-
import { EditorState } from "prosemirror-state";
|
|
4
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
5
5
|
//#region src/prosemirror/plugins/documentStyleState.d.ts
|
|
6
6
|
export declare const documentStylesKey: Readonly<{
|
|
7
7
|
key: string;
|
|
8
|
-
createKey: () =>
|
|
9
|
-
owns: (plugin:
|
|
10
|
-
get: (state: EditorState) =>
|
|
8
|
+
createKey: () => PluginKey<StyleResolver | null>;
|
|
9
|
+
owns: (plugin: Plugin<StyleResolver | null>) => boolean;
|
|
10
|
+
get: (state: EditorState) => Plugin<StyleResolver | null> | undefined;
|
|
11
11
|
getState: (state: EditorState) => StyleResolver | null | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
/** Read the document's StyleResolver, or null when the plugin isn't installed. */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Node } from "prosemirror-model";
|
|
2
|
+
import { TaggedErrorClass } from "better-result";
|
|
2
3
|
//#region src/prosemirror/plugins/revisionIds.d.ts
|
|
3
|
-
declare const
|
|
4
|
-
export declare class RevisionIdAllocationError extends
|
|
4
|
+
declare const RevisionIdAllocationErrorBase: TaggedErrorClass<"RevisionIdAllocationError">;
|
|
5
|
+
export declare class RevisionIdAllocationError extends RevisionIdAllocationErrorBase<{
|
|
5
6
|
message: string;
|
|
6
7
|
first: number;
|
|
7
8
|
next: number;
|
|
@@ -22,7 +22,8 @@ import { MAX_REVISION_ID } from "@stll/docx-core/model";
|
|
|
22
22
|
*/
|
|
23
23
|
let counter = 1;
|
|
24
24
|
const occupiedIds = /* @__PURE__ */ new Set();
|
|
25
|
-
|
|
25
|
+
const RevisionIdAllocationErrorBase = TaggedError("RevisionIdAllocationError");
|
|
26
|
+
var RevisionIdAllocationError = class extends RevisionIdAllocationErrorBase {};
|
|
26
27
|
/** Batches use contiguous ids; on rollover prefer the largest unused interval. */
|
|
27
28
|
const largestFreeIntervalStart = (reservedIds) => {
|
|
28
29
|
let first = 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
import { ListState } from "../listState.js";
|
|
3
|
-
import { EditorState, Plugin } from "prosemirror-state";
|
|
3
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
4
4
|
//#region src/prosemirror/plugins/selectionTracker.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Selection context for toolbar state
|
|
@@ -32,7 +32,7 @@ export type SelectionContext = {
|
|
|
32
32
|
*/
|
|
33
33
|
export declare const selectionTrackerKey: Readonly<{
|
|
34
34
|
key: string;
|
|
35
|
-
createKey: () =>
|
|
35
|
+
createKey: () => PluginKey<SelectionContext>;
|
|
36
36
|
owns: (plugin: Plugin<SelectionContext>) => boolean;
|
|
37
37
|
get: (state: EditorState) => Plugin<SelectionContext> | undefined;
|
|
38
38
|
getState: (state: EditorState) => SelectionContext | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Slice } from "prosemirror-model";
|
|
2
|
-
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
2
|
+
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
4
|
//#region src/prosemirror/plugins/suggestionMode.d.ts
|
|
5
5
|
export declare const suggestionModeKey: Readonly<{
|
|
6
6
|
key: string;
|
|
7
|
-
createKey: () =>
|
|
7
|
+
createKey: () => PluginKey<SuggestionModeState>;
|
|
8
8
|
owns: (plugin: Plugin<SuggestionModeState>) => boolean;
|
|
9
9
|
get: (state: EditorState) => Plugin<SuggestionModeState> | undefined;
|
|
10
10
|
getState: (state: EditorState) => SuggestionModeState | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocScanState } from "./createDocScanPlugin.js";
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
|
-
import { EditorState } from "prosemirror-state";
|
|
3
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
4
4
|
import { DirectiveKind } from "@stll/template-conditions";
|
|
5
5
|
//#region src/prosemirror/plugins/templateDirectives.d.ts
|
|
6
6
|
export type DirectiveRange = {
|
|
@@ -52,15 +52,15 @@ export declare const computeBlockDepths: (ranges: readonly DirectiveRange[]) =>
|
|
|
52
52
|
export declare const scanDirectives: (doc: Node) => DirectiveRange[];
|
|
53
53
|
export declare const templateDirectivesKey: Readonly<{
|
|
54
54
|
key: string;
|
|
55
|
-
createKey: () =>
|
|
56
|
-
owns: (plugin:
|
|
57
|
-
get: (state: EditorState) =>
|
|
55
|
+
createKey: () => PluginKey<DocScanState<undefined, DirectiveRange>>;
|
|
56
|
+
owns: (plugin: Plugin<DocScanState<undefined, DirectiveRange>>) => boolean;
|
|
57
|
+
get: (state: EditorState) => Plugin<DocScanState<undefined, DirectiveRange>> | undefined;
|
|
58
58
|
getState: (state: EditorState) => DocScanState<undefined, DirectiveRange> | undefined;
|
|
59
59
|
}>;
|
|
60
60
|
export type TemplateDirectivesPluginOptions = {
|
|
61
61
|
onRangesChange?: (ranges: readonly DirectiveRange[]) => void;
|
|
62
62
|
};
|
|
63
|
-
export declare const createTemplateDirectivesPlugin: ({ onRangesChange }?: TemplateDirectivesPluginOptions) =>
|
|
63
|
+
export declare const createTemplateDirectivesPlugin: ({ onRangesChange }?: TemplateDirectivesPluginOptions) => Plugin<DocScanState<undefined, DirectiveRange>>;
|
|
64
64
|
export declare const getTemplateDirectives: (state: EditorState) => readonly DirectiveRange[];
|
|
65
65
|
//#endregion
|
|
66
66
|
export type { DirectiveKind };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import { DecorationSet, EditorView } from "prosemirror-view";
|
|
3
3
|
//#region src/prosemirror/plugins/templatePreviewValues.d.ts
|
|
4
4
|
/** One formatted span of a rich preview value. The flags layer over the
|
|
@@ -89,10 +89,10 @@ type TemplatePreviewState = {
|
|
|
89
89
|
};
|
|
90
90
|
export declare const templatePreviewValuesKey: Readonly<{
|
|
91
91
|
key: string;
|
|
92
|
-
createKey: () =>
|
|
92
|
+
createKey: () => PluginKey<TemplatePreviewState>;
|
|
93
93
|
owns: (plugin: Plugin<TemplatePreviewState>) => boolean;
|
|
94
|
-
get: (state:
|
|
95
|
-
getState: (state:
|
|
94
|
+
get: (state: EditorState) => Plugin<TemplatePreviewState> | undefined;
|
|
95
|
+
getState: (state: EditorState) => TemplatePreviewState | undefined;
|
|
96
96
|
}>;
|
|
97
97
|
export declare function createTemplatePreviewValuesPlugin(): Plugin<TemplatePreviewState>;
|
|
98
98
|
/** Push (or clear, with `null`) the live fill preview into the editor. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Plugin, PluginKey, Transaction } from "prosemirror-state";
|
|
2
2
|
//#region src/prosemirror/plugins/templateSlashMenu.d.ts
|
|
3
3
|
export type TemplateSlashMenuState = {
|
|
4
4
|
active: false;
|
|
@@ -36,7 +36,7 @@ export type TemplateSlashMenuPluginOptions = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare const templateSlashMenuKey: Readonly<{
|
|
38
38
|
key: string;
|
|
39
|
-
createKey: () =>
|
|
39
|
+
createKey: () => PluginKey<TemplateSlashMenuState>;
|
|
40
40
|
owns: (plugin: Plugin<TemplateSlashMenuState>) => boolean;
|
|
41
41
|
get: (state: EditorState) => Plugin<TemplateSlashMenuState> | undefined;
|
|
42
42
|
getState: (state: EditorState) => TemplateSlashMenuState | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Mark, Node } from "prosemirror-model";
|
|
1
|
+
import { Attrs, Mark, Node } from "prosemirror-model";
|
|
2
2
|
//#region src/prosemirror/preservedXmlReview.d.ts
|
|
3
3
|
/** A retained opaque deleted result becomes ordinary text when its last deletion resolves. */
|
|
4
|
-
export declare const resolvedPreservedXmlAttrs: (node: Node, marks: readonly Mark[]) =>
|
|
4
|
+
export declare const resolvedPreservedXmlAttrs: (node: Node, marks: readonly Mark[]) => Attrs;
|
|
5
5
|
//#endregion
|
|
@@ -52,8 +52,8 @@ export declare const resolveParagraphInheritedRunFormatting: (options: ResolvePa
|
|
|
52
52
|
italic?: boolean | undefined;
|
|
53
53
|
italicCs?: boolean | undefined;
|
|
54
54
|
underline?: {
|
|
55
|
-
style:
|
|
56
|
-
color?:
|
|
55
|
+
style: document_d_exports.UnderlineStyle;
|
|
56
|
+
color?: document_d_exports.ColorValue;
|
|
57
57
|
} | undefined;
|
|
58
58
|
strike?: boolean | undefined;
|
|
59
59
|
doubleStrike?: boolean | undefined;
|
|
@@ -62,9 +62,9 @@ export declare const resolveParagraphInheritedRunFormatting: (options: ResolvePa
|
|
|
62
62
|
allCaps?: boolean | undefined;
|
|
63
63
|
hidden?: boolean | undefined;
|
|
64
64
|
noProof?: boolean | undefined;
|
|
65
|
-
color?:
|
|
65
|
+
color?: document_d_exports.ColorValue | undefined;
|
|
66
66
|
highlight?: "black" | "blue" | "cyan" | "darkBlue" | "darkCyan" | "darkGray" | "darkGreen" | "darkMagenta" | "darkRed" | "darkYellow" | "green" | "lightGray" | "magenta" | "none" | "red" | "white" | "yellow" | undefined;
|
|
67
|
-
shading?:
|
|
67
|
+
shading?: document_d_exports.ShadingProperties | undefined;
|
|
68
68
|
fontSize?: number | undefined;
|
|
69
69
|
fontSizeCs?: number | undefined;
|
|
70
70
|
fontFamily?: {
|
|
@@ -87,8 +87,8 @@ export declare const resolveParagraphInheritedRunFormatting: (options: ResolvePa
|
|
|
87
87
|
position?: number | undefined;
|
|
88
88
|
scale?: number | undefined;
|
|
89
89
|
kerning?: number | undefined;
|
|
90
|
-
effect?:
|
|
91
|
-
emphasisMark?:
|
|
90
|
+
effect?: document_d_exports.TextEffect | undefined;
|
|
91
|
+
emphasisMark?: document_d_exports.EmphasisMark | undefined;
|
|
92
92
|
emboss?: boolean | undefined;
|
|
93
93
|
imprint?: boolean | undefined;
|
|
94
94
|
outline?: boolean | undefined;
|
|
@@ -96,7 +96,7 @@ export declare const resolveParagraphInheritedRunFormatting: (options: ResolvePa
|
|
|
96
96
|
rtl?: boolean | undefined;
|
|
97
97
|
cs?: boolean | undefined;
|
|
98
98
|
styleId?: string | undefined;
|
|
99
|
-
preserved?:
|
|
99
|
+
preserved?: document_d_exports.PreservedMarkup | undefined;
|
|
100
100
|
} | undefined;
|
|
101
101
|
inheritedToggleCascade: {
|
|
102
102
|
formatting: document_d_exports.TextFormatting | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, InlineWrapperAttrs, InlineWrapperKind, InlineWrapperLayer, LanguageAttrs, RunFormattingOverrideAttrs, RunIdentityMarkAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, TrackedRevisionAncestor, UnderlineAttrs } from "./marks.js";
|
|
2
2
|
import { BlockCustomXmlAttrs, BlockSdtAttrs, BookmarkBoundaryAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, PageBreakRunAttrs, ParagraphAttrs, ParagraphPropertyChangeAttrs, PreservedBlockAttrs, PreservedXmlAttrs, PreservedXmlLevel, SdtAttrs, ShapeAttrs, SymbolAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
|
|
3
3
|
import { ExtensionManager } from "../extensions/ExtensionManager.js";
|
|
4
|
+
import { Schema } from "prosemirror-model";
|
|
4
5
|
//#region src/prosemirror/schema/index.d.ts
|
|
5
6
|
export declare const singletonManager: ExtensionManager;
|
|
6
|
-
export declare const schema:
|
|
7
|
+
export declare const schema: Schema;
|
|
7
8
|
/**
|
|
8
9
|
* Export types for convenience
|
|
9
10
|
*/
|
|
@@ -2,13 +2,6 @@ import { ExtensionManager } from "../extensions/ExtensionManager.js";
|
|
|
2
2
|
import { createStarterKit } from "../extensions/StarterKit.js";
|
|
3
3
|
//#region src/prosemirror/schema/index.ts
|
|
4
4
|
/**
|
|
5
|
-
* ProseMirror Schema for DOCX Editor
|
|
6
|
-
*
|
|
7
|
-
* Singleton ExtensionManager that builds the schema and initializes runtime.
|
|
8
|
-
* Legacy code imports `schema` and commands from here; new code should use
|
|
9
|
-
* ExtensionManager directly.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
5
|
* Singleton ExtensionManager — builds schema + initializes runtime (plugins, commands, keymaps)
|
|
13
6
|
*/
|
|
14
7
|
const mgr = new ExtensionManager(createStarterKit());
|
|
@@ -140,5 +140,5 @@ export declare class StyleResolver {
|
|
|
140
140
|
*/
|
|
141
141
|
export declare function createStyleResolver(styleDefinitions: document_d_exports.StyleDefinitions | undefined): StyleResolver;
|
|
142
142
|
/** The same ordered paragraph tiers, without unrelated run or paragraph fields. */
|
|
143
|
-
export declare const resolveStyleParagraphNumbering: (resolver: StyleResolver, styleId: string | undefined | null) =>
|
|
143
|
+
export declare const resolveStyleParagraphNumbering: (resolver: StyleResolver, styleId: string | undefined | null) => document_d_exports.ParagraphNumberingOverride | undefined;
|
|
144
144
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Mark } from "prosemirror-model";
|
|
1
2
|
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
2
3
|
import { EditorView } from "prosemirror-view";
|
|
3
4
|
//#region src/prosemirror/textInput.d.ts
|
|
@@ -17,7 +18,7 @@ type FormattingMarksBesideLockedControlOptions = {
|
|
|
17
18
|
from: number;
|
|
18
19
|
to: number;
|
|
19
20
|
};
|
|
20
|
-
export declare const formattingMarksBesideLockedControl: ({ state, from, to }: FormattingMarksBesideLockedControlOptions) =>
|
|
21
|
+
export declare const formattingMarksBesideLockedControl: ({ state, from, to }: FormattingMarksBesideLockedControlOptions) => Mark[] | undefined;
|
|
21
22
|
export declare const dispatchEditorTextInput: <TView extends TextInputDispatchTarget<TView>>(view: TView, input: string | TextInput) => void;
|
|
22
23
|
export declare const getEditorInputTargetRange: (view: EditorView, event: InputEvent) => {
|
|
23
24
|
from: number;
|
|
@@ -31,6 +32,6 @@ export declare const handleEditorBeforeInput: (view: EditorView, event: InputEve
|
|
|
31
32
|
*/
|
|
32
33
|
export declare const afterNativeCompositionFlush: (callback: () => void) => void;
|
|
33
34
|
/** Route committed text through the model before the browser mutates mark spans. */
|
|
34
|
-
export declare const createTextInputPlugin: () => Plugin
|
|
35
|
+
export declare const createTextInputPlugin: () => Plugin;
|
|
35
36
|
//#endregion
|
|
36
37
|
export {};
|