@portone/docx-editor 0.6.7 → 0.6.9
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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +2 -2
- package/dist/DocxEditor.d.ts +9 -9
- package/dist/core.d.ts +27 -27
- package/dist/docx/commentOnlyChange.d.ts +3 -3
- package/dist/docx/comments/durable.d.ts +4 -4
- package/dist/docx/comments/grammar.d.ts +2 -2
- package/dist/docx/comments/model.d.ts +1 -1
- package/dist/docx/comments/parts.d.ts +6 -6
- package/dist/docx/comments/people.d.ts +4 -4
- package/dist/docx/comments/policy.d.ts +1 -1
- package/dist/docx/comments/reading.d.ts +1 -1
- package/dist/docx/comments/writing.d.ts +3 -3
- package/dist/docx/comments.d.ts +3 -3
- package/dist/docx/compareDocx.d.ts +3 -3
- package/dist/docx/exportDocx.d.ts +4 -4
- package/dist/docx/exportRefs.d.ts +4 -4
- package/dist/docx/formatting/attrs.d.ts +8 -8
- package/dist/docx/formatting/context.d.ts +6 -6
- package/dist/docx/formatting/direct.d.ts +3 -3
- package/dist/docx/formatting/resolve.d.ts +5 -5
- package/dist/docx/formatting/runProperties.d.ts +3 -3
- package/dist/docx/formatting/styles.d.ts +5 -5
- package/dist/docx/formatting/tabStops.d.ts +2 -2
- package/dist/docx/formatting.d.ts +7 -7
- package/dist/docx/headersFooters.d.ts +6 -6
- package/dist/docx/hyperlink.d.ts +1 -1
- package/dist/docx/identities.d.ts +1 -1
- package/dist/docx/importDocx.d.ts +3 -3
- package/dist/docx/importParagraph.d.ts +4 -4
- package/dist/docx/importPolicy.d.ts +1 -1
- package/dist/docx/importPreserved.d.ts +1 -1
- package/dist/docx/importTable.d.ts +2 -2
- package/dist/docx/invariants.d.ts +4 -4
- package/dist/docx/media.d.ts +2 -2
- package/dist/docx/newLists.d.ts +2 -2
- package/dist/docx/notes/newNote.d.ts +3 -3
- package/dist/docx/notes/numbering.d.ts +2 -2
- package/dist/docx/notes/reading.d.ts +3 -3
- package/dist/docx/notes/references.d.ts +1 -1
- package/dist/docx/notes/writing.d.ts +2 -2
- package/dist/docx/numberingPlanner.d.ts +2 -2
- package/dist/docx/paraProps.d.ts +2 -2
- package/dist/docx/partPlan.d.ts +4 -4
- package/dist/docx/partPlanners.d.ts +2 -2
- package/dist/docx/protectionPolicy.d.ts +5 -5
- package/dist/docx/runProps.d.ts +4 -4
- package/dist/docx/scan.d.ts +1 -1
- package/dist/docx/sdt.d.ts +1 -1
- package/dist/docx/sections.d.ts +2 -2
- package/dist/docx/serializeBlock.d.ts +1 -1
- package/dist/docx/serializeParagraph.d.ts +1 -1
- package/dist/docx/serializePreserved.d.ts +3 -3
- package/dist/docx/serializeSdtBlock.d.ts +1 -1
- package/dist/docx/serializeStory.d.ts +2 -2
- package/dist/docx/serializeTable.d.ts +2 -2
- package/dist/docx/session.d.ts +9 -9
- package/dist/docx/story.d.ts +6 -6
- package/dist/docx/storyParts.d.ts +7 -7
- package/dist/docx/storyProjection.d.ts +1 -1
- package/dist/docx/tableFormatting/conditions.d.ts +2 -2
- package/dist/docx/tableFormatting/editing.d.ts +2 -2
- package/dist/docx/tableFormatting/reading.d.ts +5 -5
- package/dist/docx/tableFormatting.d.ts +3 -3
- package/dist/docx/tableTemplate.d.ts +2 -2
- package/dist/docx/wrappers.d.ts +2 -2
- package/dist/download.d.ts +2 -2
- package/dist/editor/clipboard/blockReaders.d.ts +3 -3
- package/dist/editor/clipboard/htmlReader.d.ts +4 -4
- package/dist/editor/clipboard/images.d.ts +1 -1
- package/dist/editor/clipboard/internalChannel.d.ts +3 -3
- package/dist/editor/clipboard/normalizers.d.ts +4 -4
- package/dist/editor/clipboard/parser.d.ts +2 -2
- package/dist/editor/clipboard/plugin.d.ts +2 -2
- package/dist/editor/clipboard/readContext.d.ts +4 -4
- package/dist/editor/clipboard/readers.d.ts +2 -2
- package/dist/editor/commands/commentCommands.d.ts +3 -3
- package/dist/editor/commands/comments/editing.d.ts +1 -1
- package/dist/editor/commands/comments/model.d.ts +1 -1
- package/dist/editor/commands/comments/reading.d.ts +1 -1
- package/dist/editor/commands/exportQueries.d.ts +2 -2
- package/dist/editor/commands/fidelityQueries.d.ts +2 -2
- package/dist/editor/commands/formatting/propertyCommands.d.ts +1 -1
- package/dist/editor/commands/formatting/reading.d.ts +2 -2
- package/dist/editor/commands/formatting/shared.d.ts +1 -1
- package/dist/editor/commands/formattingCommands.d.ts +2 -2
- package/dist/editor/commands/index.d.ts +39 -39
- package/dist/editor/commands/listCommands.d.ts +4 -4
- package/dist/editor/commands/noteCommands.d.ts +1 -1
- package/dist/editor/commands/noteQueries.d.ts +3 -3
- package/dist/editor/commands/paragraphCommands.d.ts +1 -1
- package/dist/editor/commands/spacingCommands.d.ts +1 -1
- package/dist/editor/createEditor.d.ts +6 -6
- package/dist/editor/documentStyles.d.ts +3 -3
- package/dist/editor/editorDocument.d.ts +6 -6
- package/dist/editor/formatSource.d.ts +1 -1
- package/dist/editor/imageFiles.d.ts +2 -2
- package/dist/editor/insertImage.d.ts +1 -1
- package/dist/editor/notes/noteSurface.d.ts +4 -4
- package/dist/editor/paragraphEdits.d.ts +2 -2
- package/dist/editor/paragraphPlacement.d.ts +1 -1
- package/dist/editor/plugins/commentComposer.d.ts +1 -1
- package/dist/editor/plugins/commentDecorations.d.ts +2 -2
- package/dist/editor/plugins/displayDerivation.d.ts +2 -2
- package/dist/editor/plugins/documentProtection.d.ts +2 -2
- package/dist/editor/plugins/keymap.d.ts +1 -1
- package/dist/editor/plugins/noteLifecycle.d.ts +1 -1
- package/dist/editor/plugins/noteNavigation.d.ts +1 -1
- package/dist/editor/plugins/noteNumbering.d.ts +1 -1
- package/dist/editor/plugins/numberingDecorations.d.ts +2 -2
- package/dist/editor/plugins/paragraphDisplay.d.ts +1 -1
- package/dist/editor/plugins/tabLayout.d.ts +1 -1
- package/dist/editor/plugins/tableDisplay.d.ts +1 -1
- package/dist/editor/stories/storyMarkup.d.ts +1 -1
- package/dist/editor/stories/storyState.d.ts +4 -4
- package/dist/editor/stories/storyView.d.ts +4 -4
- package/dist/editor/stories/storyView.js +5 -4
- package/dist/editor/views/runMarkView.d.ts +1 -1
- package/dist/index.d.ts +26 -26
- package/dist/model/format.d.ts +1 -1
- package/dist/numbering/listRegistry.d.ts +1 -1
- package/dist/numbering/listTemplate.d.ts +1 -1
- package/dist/numbering/markers.d.ts +2 -2
- package/dist/numbering/parseNumbering.d.ts +5 -5
- package/dist/numbering/writeNumbering.d.ts +1 -1
- package/dist/ooxml/element.d.ts +1 -1
- package/dist/ooxml/partSplice.d.ts +2 -2
- package/dist/ooxml/precedence.d.ts +1 -1
- package/dist/ooxml/props.d.ts +1 -1
- package/dist/ooxml/simpleTypes.d.ts +1 -1
- package/dist/ooxml/tabStops.d.ts +1 -1
- package/dist/ooxml/tagScan.d.ts +1 -1
- package/dist/ooxml/units.d.ts +2 -2
- package/dist/ooxml/xml.d.ts +1 -1
- package/dist/page/PageGuides.d.ts +2 -2
- package/dist/page/blockKinds.d.ts +1 -1
- package/dist/page/demands/footnoteDemands.d.ts +1 -1
- package/dist/page/demands/index.d.ts +1 -1
- package/dist/page/kinds/index.d.ts +1 -1
- package/dist/page/kinds/paragraphKind.d.ts +1 -1
- package/dist/page/kinds/sdtBlockKind.d.ts +1 -1
- package/dist/page/kinds/tableKind.d.ts +1 -1
- package/dist/page/measureBlocks.d.ts +1 -1
- package/dist/page/pageDecorations.d.ts +3 -3
- package/dist/page/pageLayout.d.ts +4 -4
- package/dist/page/usePageLayout.d.ts +2 -2
- package/dist/schema/clipboard.d.ts +1 -1
- package/dist/schema/controlEdges.d.ts +1 -1
- package/dist/schema/displayDerivation.d.ts +1 -1
- package/dist/schema/docxSchema.d.ts +1 -1
- package/dist/schema/guards.d.ts +4 -4
- package/dist/schema/index.d.ts +5 -5
- package/dist/schema/locks.d.ts +1 -1
- package/dist/schema/preservedGuards.d.ts +1 -1
- package/dist/schema/protectionState.d.ts +1 -1
- package/dist/schema/rendering.d.ts +1 -1
- package/dist/styles/inlineStyle.d.ts +3 -3
- package/dist/styles/lineSpacings.d.ts +1 -1
- package/dist/styles.css +13 -0
- package/dist/table/cellBorders.d.ts +1 -1
- package/dist/table/cellFormatting.d.ts +3 -3
- package/dist/table/format.d.ts +1 -1
- package/dist/table/gridBorders.d.ts +2 -2
- package/dist/table/index.d.ts +5 -5
- package/dist/table/resize.d.ts +1 -1
- package/dist/table/widths.d.ts +1 -1
- package/dist/ui/AlignMenu.d.ts +2 -2
- package/dist/ui/CellStyleGroup.d.ts +3 -3
- package/dist/ui/ColorPicker.d.ts +1 -1
- package/dist/ui/CommentsPanel.d.ts +1 -1
- package/dist/ui/FontFamilySelect.d.ts +3 -3
- package/dist/ui/FontSizeSelect.d.ts +2 -2
- package/dist/ui/LinkCard.d.ts +1 -1
- package/dist/ui/ParagraphStyleSelect.d.ts +3 -3
- package/dist/ui/SpacingMenu.d.ts +2 -2
- package/dist/ui/TableMenu.d.ts +2 -2
- package/dist/ui/TableSizePicker.d.ts +1 -1
- package/dist/ui/TextMenu.d.ts +2 -2
- package/dist/ui/Toolbar.d.ts +4 -4
- package/dist/ui/ZoomSelect.d.ts +1 -1
- package/dist/ui/comments/CommentComposer.d.ts +1 -1
- package/dist/ui/comments/useCommentRailLayout.d.ts +1 -1
- package/dist/ui/noteItems.d.ts +1 -1
- package/dist/ui/notes/NoteAreas.d.ts +5 -5
- package/dist/ui/notes/NoteList.d.ts +3 -3
- package/dist/ui/notes/StoryRow.d.ts +5 -5
- package/dist/ui/notes/noteBands.d.ts +7 -7
- package/dist/ui/notes/noteHeights.d.ts +2 -2
- package/dist/ui/notes/useStorySurface.d.ts +5 -5
- package/dist/ui/presets.d.ts +3 -3
- package/package.json +7 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Node as PMNode } from "prosemirror-model";
|
|
2
|
-
import { type StoryKey } from "../../schema/stories";
|
|
3
|
-
import { type NoteNumbering } from "./reading";
|
|
2
|
+
import { type StoryKey } from "../../schema/stories.js";
|
|
3
|
+
import { type NoteNumbering } from "./reading.js";
|
|
4
4
|
/**
|
|
5
5
|
* The label each note reference of the body is drawn with, by position.
|
|
6
6
|
*
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* What a note says is a story of its own, read by `docx/story` out of the same part text.
|
|
6
6
|
*/
|
|
7
|
-
import { type NumberFormat } from "../../numbering/spellers";
|
|
8
|
-
import { type NoteKind, type StoryKey } from "../../schema/stories";
|
|
9
|
-
export type { NoteKind } from "../../schema/stories";
|
|
7
|
+
import { type NumberFormat } from "../../numbering/spellers.js";
|
|
8
|
+
import { type NoteKind, type StoryKey } from "../../schema/stories.js";
|
|
9
|
+
export type { NoteKind } from "../../schema/stories.js";
|
|
10
10
|
/**
|
|
11
11
|
* One entry of a notes part as it arrived. What the note says is a story of its own, held on the
|
|
12
12
|
* document node under `footnote:<id>` or `endnote:<id>` (`docx/story`).
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* order.
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
|
-
import { type NoteKey } from "../../schema/stories";
|
|
11
|
+
import { type NoteKey } from "../../schema/stories.js";
|
|
12
12
|
/** One reference the body makes to a note */
|
|
13
13
|
export interface PlacedNoteReference {
|
|
14
14
|
readonly node: PMNode;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* `w:footnote` and `w:endnote` references there are optional (`CT_FtnDocProps`, `CT_EdnDocProps`),
|
|
12
12
|
* and a Google Docs export writes none.
|
|
13
13
|
*/
|
|
14
|
-
import type { PartPlanner } from "../partPlan";
|
|
15
|
-
import { type StoryEntriesPart } from "../storyParts";
|
|
14
|
+
import type { PartPlanner } from "../partPlan.js";
|
|
15
|
+
import { type StoryEntriesPart } from "../storyParts.js";
|
|
16
16
|
export declare const FOOTNOTES_PART: StoryEntriesPart;
|
|
17
17
|
export declare const ENDNOTES_PART: StoryEntriesPart;
|
|
18
18
|
export declare const footnotesPlanner: PartPlanner;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* declaration of what it holds asked of the context, so the first list a document takes costs it
|
|
8
8
|
* nothing outside this planner. Nothing is written when no list was started.
|
|
9
9
|
*/
|
|
10
|
-
import { type RootDeclarations } from "../ooxml/partSplice";
|
|
11
|
-
import type { PartPlanner } from "./partPlan";
|
|
10
|
+
import { type RootDeclarations } from "../ooxml/partSplice.js";
|
|
11
|
+
import type { PartPlanner } from "./partPlan.js";
|
|
12
12
|
/** What a numbering part takes a definition: every list this writer splices in is spelled under `w` */
|
|
13
13
|
export declare const NUMBERING_MARKUP: RootDeclarations;
|
|
14
14
|
export declare const numberingPlanner: PartPlanner;
|
package/dist/docx/paraProps.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* resolver (`formatting/resolve`), the same one opening the document uses, so a changed paragraph's
|
|
10
10
|
* display values are the same as they would be after saving and reopening.
|
|
11
11
|
*/
|
|
12
|
-
import type { LineSpacing, NumberingRef, ParagraphAlign } from "../model/format";
|
|
13
|
-
import type { LevelIndent } from "../numbering/parseNumbering";
|
|
12
|
+
import type { LineSpacing, NumberingRef, ParagraphAlign } from "../model/format.js";
|
|
13
|
+
import type { LevelIndent } from "../numbering/parseNumbering.js";
|
|
14
14
|
/** What to do with the indents */
|
|
15
15
|
export type IndentChange =
|
|
16
16
|
/** Leaves the indents the paragraph wrote down as they are */
|
package/dist/docx/partPlan.d.ts
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* for, so no planner writes either of them itself and none can write over what another declared.
|
|
8
8
|
*/
|
|
9
9
|
import type { Node as PMNode } from "prosemirror-model";
|
|
10
|
-
import type { FidelityCollector } from "./fidelity";
|
|
11
|
-
import { type ContentTypeWriter } from "./packageParts";
|
|
12
|
-
import { type RelationshipWriter } from "./relationships";
|
|
13
|
-
import type { SessionStore } from "./session";
|
|
10
|
+
import type { FidelityCollector } from "./fidelity.js";
|
|
11
|
+
import { type ContentTypeWriter } from "./packageParts.js";
|
|
12
|
+
import { type RelationshipWriter } from "./relationships.js";
|
|
13
|
+
import type { SessionStore } from "./session.js";
|
|
14
14
|
export interface PartPlanContext {
|
|
15
15
|
readonly relationships: RelationshipWriter;
|
|
16
16
|
readonly contentTypes: ContentTypeWriter;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* `docx/exportDocx` runs these planners and `docx/invariants` reads what they write off the same
|
|
5
5
|
* list, so the two cannot disagree about which change has a writer.
|
|
6
6
|
*/
|
|
7
|
-
import type { PartPlanner } from "./partPlan";
|
|
8
|
-
import { type StoryEntriesPart, type StoryWriting } from "./storyParts";
|
|
7
|
+
import type { PartPlanner } from "./partPlan.js";
|
|
8
|
+
import { type StoryEntriesPart, type StoryWriting } from "./storyParts.js";
|
|
9
9
|
export declare const PART_PLANNERS: readonly PartPlanner[];
|
|
10
10
|
/** What every planner writes back of the side stories the document holds */
|
|
11
11
|
export declare const STORY_WRITINGS: readonly StoryWriting[];
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* A level with no policy registered is one no file is judged under: `protectionPolicyFor` answers
|
|
11
11
|
* undefined, and a caller holding the level alone has nothing to run.
|
|
12
12
|
*/
|
|
13
|
-
import { type XmlParser } from "../ooxml/xml";
|
|
14
|
-
import { type EditableComments, type EditingProtection } from "../schema/protection";
|
|
15
|
-
import { type DocxBytes } from "./importDocx";
|
|
16
|
-
import type { SessionStore } from "./session";
|
|
17
|
-
import { type Story } from "./storyProjection";
|
|
13
|
+
import { type XmlParser } from "../ooxml/xml.js";
|
|
14
|
+
import { type EditableComments, type EditingProtection } from "../schema/protection.js";
|
|
15
|
+
import { type DocxBytes } from "./importDocx.js";
|
|
16
|
+
import type { SessionStore } from "./session.js";
|
|
17
|
+
import { type Story } from "./storyProjection.js";
|
|
18
18
|
/** One entry of a story part: the element read out of it, and its text for the byte-for-byte case */
|
|
19
19
|
export interface StoryEntry {
|
|
20
20
|
el: Element;
|
package/dist/docx/runProps.d.ts
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* always the rPr string.
|
|
13
13
|
*/
|
|
14
14
|
import type { Mark } from "prosemirror-model";
|
|
15
|
-
import { type RunFormat } from "../model/format";
|
|
16
|
-
import { type EditableRunKey, type RunEdit } from "./formatting";
|
|
17
|
-
export type { RunEdit } from "./formatting";
|
|
18
|
-
export { matchesRunEdit } from "./formatting";
|
|
15
|
+
import { type RunFormat } from "../model/format.js";
|
|
16
|
+
import { type EditableRunKey, type RunEdit } from "./formatting.js";
|
|
17
|
+
export type { RunEdit } from "./formatting.js";
|
|
18
|
+
export { matchesRunEdit } from "./formatting.js";
|
|
19
19
|
/** The character formatting that is toggled on and off */
|
|
20
20
|
export type RunToggle = "bold" | "italic" | "underline" | "strike";
|
|
21
21
|
/** The formatting a run holds. The original XML and the display values derived from that XML form a pair */
|
package/dist/docx/scan.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* a comment and a footnote hold another (`docx/story`), and all of them are sliced here so that
|
|
7
7
|
* one story cannot end up compared or written by rules another does not follow.
|
|
8
8
|
*/
|
|
9
|
-
import { type Tag } from "../ooxml/tagScan";
|
|
9
|
+
import { type Tag } from "../ooxml/tagScan.js";
|
|
10
10
|
export interface BlockSlice {
|
|
11
11
|
/** The tag name exactly as written (e.g. "w:p", "w:tbl", "w:sectPr") */
|
|
12
12
|
name: string;
|
package/dist/docx/sdt.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* wrapper they put back on export is the same string in all of them.
|
|
14
14
|
*/
|
|
15
15
|
import type { Node as PMNode } from "prosemirror-model";
|
|
16
|
-
import type { ControlFacts, ControlFlags } from "../schema/controlAttrs";
|
|
16
|
+
import type { ControlFacts, ControlFlags } from "../schema/controlAttrs.js";
|
|
17
17
|
/**
|
|
18
18
|
* What a control's `w:sdtPr` states, which is all the editor reads off a control besides the XML
|
|
19
19
|
* it goes back out as. The carriers write it under names of their own (`schema/controlAttrs`).
|
package/dist/docx/sections.d.ts
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* arrived as, and a rewritten child is swapped into the spot `CT_SectPr` lays down.
|
|
12
12
|
*/
|
|
13
13
|
import type { Node as PMNode } from "prosemirror-model";
|
|
14
|
-
import { type NoteNumberingProps } from "./notes/reading";
|
|
15
|
-
import { type PageGeometry } from "./pageGeometry";
|
|
14
|
+
import { type NoteNumberingProps } from "./notes/reading.js";
|
|
15
|
+
import { type PageGeometry } from "./pageGeometry.js";
|
|
16
16
|
export type HeaderFooterVariant = "default" | "first" | "even";
|
|
17
17
|
/** The variants a `w:headerReference` or a `w:footerReference` may name. §17.6.12, §17.6.5 */
|
|
18
18
|
export declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node as PMNode } from "prosemirror-model";
|
|
2
|
-
import { type ExportRefs } from "./exportRefs";
|
|
2
|
+
import { type ExportRefs } from "./exportRefs.js";
|
|
3
3
|
export declare function serializeBlock(node: PMNode, refs?: ExportRefs): string;
|
|
4
4
|
/**
|
|
5
5
|
* An unchanged block is written back as its original XML; only a changed block is rebuilt.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* new kind is written here without this file knowing anything about it.
|
|
16
16
|
*/
|
|
17
17
|
import type { Node as PMNode } from "prosemirror-model";
|
|
18
|
-
import { type ExportRefs } from "./exportRefs";
|
|
18
|
+
import { type ExportRefs } from "./exportRefs.js";
|
|
19
19
|
/** The attribute text a node attr holds, which is either what the original wrote or nothing */
|
|
20
20
|
export declare function rawAttrsOf(value: unknown): string | null;
|
|
21
21
|
export declare function preservedXml(node: PMNode): string;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* the same way, from here.
|
|
8
8
|
*/
|
|
9
9
|
import type { Node as PMNode } from "prosemirror-model";
|
|
10
|
-
import { type ExportProblemReason, type ExportProblemStory } from "../ooxml/errors";
|
|
11
|
-
import type { ExportRefs } from "./exportRefs";
|
|
12
|
-
import { type SessionStore } from "./session";
|
|
10
|
+
import { type ExportProblemReason, type ExportProblemStory } from "../ooxml/errors.js";
|
|
11
|
+
import type { ExportRefs } from "./exportRefs.js";
|
|
12
|
+
import { type SessionStore } from "./session.js";
|
|
13
13
|
/** Why there is no original to write, which a block that came in from another document answers differently */
|
|
14
14
|
export declare function lostOriginal(node: PMNode, session: SessionStore | null, story: ExportProblemStory | null): {
|
|
15
15
|
readonly message: string;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* level rather than this module reaching for one.
|
|
11
11
|
*/
|
|
12
12
|
import type { Node as PMNode } from "prosemirror-model";
|
|
13
|
-
import type { ExportRefs } from "./exportRefs";
|
|
13
|
+
import type { ExportRefs } from "./exportRefs.js";
|
|
14
14
|
/** How the level around a control writes one block of it */
|
|
15
15
|
export type BlockWriter = (block: PMNode, refs: ExportRefs) => string;
|
|
16
16
|
export declare function serializeSdtBlock(node: PMNode, refs: ExportRefs, writeBlock: BlockWriter): string;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* an edit of the first, and what keeps an untouched Comments part byte-identical.
|
|
8
8
|
*/
|
|
9
9
|
import type { Node as PMNode } from "prosemirror-model";
|
|
10
|
-
import type { ExportRefs } from "./exportRefs";
|
|
11
|
-
import type { ImportedStory } from "./story";
|
|
10
|
+
import type { ExportRefs } from "./exportRefs.js";
|
|
11
|
+
import type { ImportedStory } from "./story.js";
|
|
12
12
|
/** The two ends of the element a story stands in, for a story the package did not arrive holding */
|
|
13
13
|
export interface StoryContainer {
|
|
14
14
|
open: string;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* That way, when a horizontal merge shrinks from two cells to one, the `w:gridSpan` goes away with it.
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
|
-
import type { ExportRefs } from "./exportRefs";
|
|
12
|
-
import type { BlockWriter } from "./serializeSdtBlock";
|
|
11
|
+
import type { ExportRefs } from "./exportRefs.js";
|
|
12
|
+
import type { BlockWriter } from "./serializeSdtBlock.js";
|
|
13
13
|
/**
|
|
14
14
|
* A cell takes exactly the blocks the body takes, so the caller hands over the writer for its own
|
|
15
15
|
* level: a table may stand inside a content control as a control may stand inside a table, and
|
package/dist/docx/session.d.ts
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
* needs is an accessor of its own here.
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
|
-
import type { DocumentDefaults } from "../model/format";
|
|
12
|
-
import { type Numbering, type NumberingOptions } from "../numbering/parseNumbering";
|
|
13
|
-
import { type StoryKey } from "../schema/stories";
|
|
14
|
-
import type { ImportedComments } from "./comments/reading";
|
|
15
|
-
import { type FormattingContext, type ParagraphStyleOption } from "./formatting";
|
|
16
|
-
import type { HeaderFooterStories } from "./headersFooters";
|
|
17
|
-
import type { NoteNumbering } from "./notes/reading";
|
|
18
|
-
import type { PageGeometry } from "./pageGeometry";
|
|
19
|
-
import type { ImportedStory } from "./story";
|
|
11
|
+
import type { DocumentDefaults } from "../model/format.js";
|
|
12
|
+
import { type Numbering, type NumberingOptions } from "../numbering/parseNumbering.js";
|
|
13
|
+
import { type StoryKey } from "../schema/stories.js";
|
|
14
|
+
import type { ImportedComments } from "./comments/reading.js";
|
|
15
|
+
import { type FormattingContext, type ParagraphStyleOption } from "./formatting.js";
|
|
16
|
+
import type { HeaderFooterStories } from "./headersFooters.js";
|
|
17
|
+
import type { NoteNumbering } from "./notes/reading.js";
|
|
18
|
+
import type { PageGeometry } from "./pageGeometry.js";
|
|
19
|
+
import type { ImportedStory } from "./story.js";
|
|
20
20
|
export interface ImportedBlock {
|
|
21
21
|
xml: string;
|
|
22
22
|
/** The node as it was the moment the document was opened. Compared against the current node to tell whether it was edited */
|
package/dist/docx/story.d.ts
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* lands in the history beside every other edit.
|
|
13
13
|
*/
|
|
14
14
|
import { type Node as PMNode } from "prosemirror-model";
|
|
15
|
-
import { type StoryKey, type StoryKind, storyNodeOf } from "../schema/stories";
|
|
16
|
-
import { type FormattingContext } from "./formatting";
|
|
17
|
-
import { type ImportSources } from "./importParagraph";
|
|
18
|
-
import { type ImportedBlock, type SessionIdentity } from "./session";
|
|
19
|
-
export type { StoryJson, StoryKey, StoryKind } from "../schema/stories";
|
|
20
|
-
export { asStoryKey, sameStory, storiesOf, storyKey, withoutCommentStories, } from "../schema/stories";
|
|
15
|
+
import { type StoryKey, type StoryKind, storyNodeOf } from "../schema/stories.js";
|
|
16
|
+
import { type FormattingContext } from "./formatting.js";
|
|
17
|
+
import { type ImportSources } from "./importParagraph.js";
|
|
18
|
+
import { type ImportedBlock, type SessionIdentity } from "./session.js";
|
|
19
|
+
export type { StoryJson, StoryKey, StoryKind } from "../schema/stories.js";
|
|
20
|
+
export { asStoryKey, sameStory, storiesOf, storyKey, withoutCommentStories, } from "../schema/stories.js";
|
|
21
21
|
/** The story this key names as a document node, and null where the document holds none */
|
|
22
22
|
export declare const storyOf: typeof storyNodeOf;
|
|
23
23
|
/** One story as the package arrived holding it: where it stands, and the blocks it was written in */
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* and the export invariants would have a third answer of their own.
|
|
7
7
|
*/
|
|
8
8
|
import type { Node as PMNode } from "prosemirror-model";
|
|
9
|
-
import type { DocxExportErrorCode, ExportPartName, ExportProblemReason } from "../ooxml/errors";
|
|
10
|
-
import { type RootDeclarations } from "../ooxml/partSplice";
|
|
11
|
-
import { type StoryKey, type StoryKind } from "../schema/stories";
|
|
12
|
-
import { type StoryToSettle } from "./identities";
|
|
13
|
-
import type { PartPlanner } from "./partPlan";
|
|
14
|
-
import type { SessionStore } from "./session";
|
|
15
|
-
import type { ImportedStory } from "./story";
|
|
9
|
+
import type { DocxExportErrorCode, ExportPartName, ExportProblemReason } from "../ooxml/errors.js";
|
|
10
|
+
import { type RootDeclarations } from "../ooxml/partSplice.js";
|
|
11
|
+
import { type StoryKey, type StoryKind } from "../schema/stories.js";
|
|
12
|
+
import { type StoryToSettle } from "./identities.js";
|
|
13
|
+
import type { PartPlanner } from "./partPlan.js";
|
|
14
|
+
import type { SessionStore } from "./session.js";
|
|
15
|
+
import type { ImportedStory } from "./story.js";
|
|
16
16
|
export type StoryChange = {
|
|
17
17
|
readonly change: "kept";
|
|
18
18
|
readonly imported: ImportedStory;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* case joining it is a preservation defect in the writer, not a detail of the comparison.
|
|
19
19
|
*/
|
|
20
20
|
import type { Node as PMNode } from "prosemirror-model";
|
|
21
|
-
import type { SessionStore } from "./session";
|
|
21
|
+
import type { SessionStore } from "./session.js";
|
|
22
22
|
/** A document and the package it was opened from, which is what writing it back out takes */
|
|
23
23
|
export interface Story {
|
|
24
24
|
readonly doc: PMNode;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* its four sides are drawn where a cell lies on the edge of that part and its inside lines between
|
|
12
12
|
* the cells within it, which is the same rule the table's own lines are drawn by.
|
|
13
13
|
*/
|
|
14
|
-
import type { BandSizes, CellMargins, InsideBorders, TableFormat, TableStyleConditions, TableStyleOverrideType } from "../../model/format";
|
|
15
|
-
import { type CellDefaults, type GridRect, type GridSize } from "./reading";
|
|
14
|
+
import type { BandSizes, CellMargins, InsideBorders, TableFormat, TableStyleConditions, TableStyleOverrideType } from "../../model/format.js";
|
|
15
|
+
import { type CellDefaults, type GridRect, type GridSize } from "./reading.js";
|
|
16
16
|
/** Which parts of its table style a table takes (`w:tblLook`, §17.4.55) */
|
|
17
17
|
export interface TableLook {
|
|
18
18
|
firstRow: boolean;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* only the child and attributes named by the edit are changed, and unsupported formatting stays
|
|
4
4
|
* untouched.
|
|
5
5
|
*/
|
|
6
|
-
import type { CellFormat, CellVerticalAlign, RowFormat } from "../../model/format";
|
|
7
|
-
import { type CellDefaults } from "./reading";
|
|
6
|
+
import type { CellFormat, CellVerticalAlign, RowFormat } from "../../model/format.js";
|
|
7
|
+
import { type CellDefaults } from "./reading.js";
|
|
8
8
|
export interface CellProps {
|
|
9
9
|
/** The whole `<w:tcPr>...</w:tcPr>` XML. null for a cell with no formatting */
|
|
10
10
|
tcPr: string | null;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Reads table formatting for display. Table borders and margins are folded into cell values so CSS
|
|
3
3
|
* collapsed-border resolution matches OOXML inheritance without changing exported XML.
|
|
4
4
|
*/
|
|
5
|
-
import { type BandSizes, type CellFormat, type CellMargins, type CellStyleFormat, type CellVerticalAlign, type InsideBorders, type RowFormat, type RunFormat, type TableFormat, type TableStyleConditions, type TableStyleOverrideType, type TableWidth } from "../../model/format";
|
|
6
|
-
import { type BorderLine } from "../../ooxml/units";
|
|
7
|
-
import type { ParagraphPlacement } from "../formatting/resolve";
|
|
8
|
-
import type { ParagraphFormatLayer } from "../formatting/tabStops";
|
|
9
|
-
export type { BandSizes, CellMargins, CellStyleFormat, InsideBorders, TableStyleConditions, TableStyleOverrideType, } from "../../model/format";
|
|
5
|
+
import { type BandSizes, type CellFormat, type CellMargins, type CellStyleFormat, type CellVerticalAlign, type InsideBorders, type RowFormat, type RunFormat, type TableFormat, type TableStyleConditions, type TableStyleOverrideType, type TableWidth } from "../../model/format.js";
|
|
6
|
+
import { type BorderLine } from "../../ooxml/units.js";
|
|
7
|
+
import type { ParagraphPlacement } from "../formatting/resolve.js";
|
|
8
|
+
import type { ParagraphFormatLayer } from "../formatting/tabStops.js";
|
|
9
|
+
export type { BandSizes, CellMargins, CellStyleFormat, InsideBorders, TableStyleConditions, TableStyleOverrideType, } from "../../model/format.js";
|
|
10
10
|
/**
|
|
11
11
|
* The width written down by `<w:tblW>` or `<w:tcW>`.
|
|
12
12
|
* If we cannot make out what it means it is null, and such a width goes back out unchanged on export.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./tableFormatting/conditions";
|
|
2
|
-
export * from "./tableFormatting/editing";
|
|
3
|
-
export * from "./tableFormatting/reading";
|
|
1
|
+
export * from "./tableFormatting/conditions.js";
|
|
2
|
+
export * from "./tableFormatting/editing.js";
|
|
3
|
+
export * from "./tableFormatting/reading.js";
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* That way a freshly inserted table looks on screen exactly as it does after saving and reopening.
|
|
8
8
|
*/
|
|
9
9
|
import type { Node as PMNode } from "prosemirror-model";
|
|
10
|
-
import { type PageGeometry } from "./pageGeometry";
|
|
11
|
-
import { type GridRect } from "./tableFormatting";
|
|
10
|
+
import { type PageGeometry } from "./pageGeometry.js";
|
|
11
|
+
import { type GridRect } from "./tableFormatting.js";
|
|
12
12
|
/**
|
|
13
13
|
* The limit on how many rows and cells one table can hold.
|
|
14
14
|
* The toolbar grid lets you pick from something smaller (6x6); this only blocks absurd values.
|
package/dist/docx/wrappers.d.ts
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* edited goes back out byte for byte; only the closing tag is written from scratch.
|
|
22
22
|
*/
|
|
23
23
|
import type { Mark, Node as PMNode } from "prosemirror-model";
|
|
24
|
-
import type { ExportRefs } from "./exportRefs";
|
|
25
|
-
import type { ImportSources } from "./importParagraph";
|
|
24
|
+
import type { ExportRefs } from "./exportRefs.js";
|
|
25
|
+
import type { ImportSources } from "./importParagraph.js";
|
|
26
26
|
/** A wrapper read off the file: the mark its content wears, and the element that content stands in */
|
|
27
27
|
export interface WrapperReading {
|
|
28
28
|
mark: Mark;
|
package/dist/download.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* `downloadDocx` is all a screen needs.
|
|
6
6
|
*/
|
|
7
7
|
import type { Node as PMNode } from "prosemirror-model";
|
|
8
|
-
import type { DocxEditorHandle } from "./DocxEditor";
|
|
9
|
-
import type { ExportProblem } from "./docx/invariants";
|
|
8
|
+
import type { DocxEditorHandle } from "./DocxEditor.js";
|
|
9
|
+
import type { ExportProblem } from "./docx/invariants.js";
|
|
10
10
|
export declare const DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
11
11
|
export interface DownloadDocxOptions {
|
|
12
12
|
/** The name to save under. The `.docx` suffix may be there or not */
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* one by one.
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
|
-
import { type ListKind } from "../../numbering/listTemplate";
|
|
12
|
-
import { type InlineContext } from "./inlineFormatting";
|
|
13
|
-
import type { HtmlReadContext } from "./readContext";
|
|
11
|
+
import { type ListKind } from "../../numbering/listTemplate.js";
|
|
12
|
+
import { type InlineContext } from "./inlineFormatting.js";
|
|
13
|
+
import type { HtmlReadContext } from "./readContext.js";
|
|
14
14
|
/** Where one paragraph being read stands in a list */
|
|
15
15
|
export interface ListPlacement {
|
|
16
16
|
kind: ListKind;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Slice } from "prosemirror-model";
|
|
2
2
|
import type { Transaction } from "prosemirror-state";
|
|
3
|
-
import { type NewLists } from "../../numbering/listRegistry";
|
|
4
|
-
import { type HtmlBlockReader } from "./blockReaders";
|
|
5
|
-
import { type ListKinds, type NoteStories } from "./internalChannel";
|
|
6
|
-
import type { HtmlReadContext } from "./readContext";
|
|
3
|
+
import { type NewLists } from "../../numbering/listRegistry.js";
|
|
4
|
+
import { type HtmlBlockReader } from "./blockReaders.js";
|
|
5
|
+
import { type ListKinds, type NoteStories } from "./internalChannel.js";
|
|
6
|
+
import type { HtmlReadContext } from "./readContext.js";
|
|
7
7
|
/** What a paste puts in: the content, the definitions of the lists it started, and its notes */
|
|
8
8
|
export interface PastedContent {
|
|
9
9
|
slice: Slice;
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* the paste happens the document no longer holds what the copy was pointing at.
|
|
23
23
|
*/
|
|
24
24
|
import type { Node as PMNode, Slice } from "prosemirror-model";
|
|
25
|
-
import type { ListKind } from "../../numbering/listTemplate";
|
|
26
|
-
import type { Numbering } from "../../numbering/parseNumbering";
|
|
27
|
-
import { type NoteKey, type StoryKey } from "../../schema/stories";
|
|
25
|
+
import type { ListKind } from "../../numbering/listTemplate.js";
|
|
26
|
+
import type { Numbering } from "../../numbering/parseNumbering.js";
|
|
27
|
+
import { type NoteKey, type StoryKey } from "../../schema/stories.js";
|
|
28
28
|
/** Where the copied HTML carries the name of the slice this editor kept */
|
|
29
29
|
export declare const INTERNAL_TOKEN_ATTRIBUTE = "data-docx-clip";
|
|
30
30
|
/** The kind of list each numbering id of a slice stood for where the slice was copied */
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { type Node as PMNode, Slice } from "prosemirror-model";
|
|
17
17
|
import type { EditorState } from "prosemirror-state";
|
|
18
|
-
import { type ListKind } from "../../numbering/listTemplate";
|
|
19
|
-
import { type NoteKind } from "../../schema/stories";
|
|
20
|
-
import type { PastedContent } from "./htmlReader";
|
|
21
|
-
import { type ListKinds, type NoteStories } from "./internalChannel";
|
|
18
|
+
import { type ListKind } from "../../numbering/listTemplate.js";
|
|
19
|
+
import { type NoteKind } from "../../schema/stories.js";
|
|
20
|
+
import type { PastedContent } from "./htmlReader.js";
|
|
21
|
+
import { type ListKinds, type NoteStories } from "./internalChannel.js";
|
|
22
22
|
/** What one normalizer answers about the document the slice is going into */
|
|
23
23
|
export interface NormalizeContext {
|
|
24
24
|
readonly state: EditorState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOMParser, Slice } from "prosemirror-model";
|
|
2
2
|
import type { EditorView } from "prosemirror-view";
|
|
3
|
-
import type { PastedContent } from "./htmlReader";
|
|
4
|
-
import type { ClipboardInput, ClipboardReader } from "./readers";
|
|
3
|
+
import type { PastedContent } from "./htmlReader.js";
|
|
4
|
+
import type { ClipboardInput, ClipboardReader } from "./readers.js";
|
|
5
5
|
/**
|
|
6
6
|
* The parser ProseMirror hands the clipboard to.
|
|
7
7
|
*
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* paste over a cell selection means (`prosemirror-tables`).
|
|
11
11
|
*/
|
|
12
12
|
import { Plugin } from "prosemirror-state";
|
|
13
|
-
import { type SliceNormalizer } from "./normalizers";
|
|
14
|
-
import { type ClipboardReader } from "./readers";
|
|
13
|
+
import { type SliceNormalizer } from "./normalizers.js";
|
|
14
|
+
import { type ClipboardReader } from "./readers.js";
|
|
15
15
|
export interface ClipboardOptions {
|
|
16
16
|
/** Tried from the front. The first reader to answer decides what a paste puts in */
|
|
17
17
|
readers?: readonly ClipboardReader[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { EditorState } from "prosemirror-state";
|
|
2
|
-
import type { FormattingContext, ParagraphStyleOption } from "../../docx/formatting";
|
|
3
|
-
import type { PageGeometry } from "../../docx/pageGeometry";
|
|
4
|
-
import type { ImageToInsert } from "../insertImage";
|
|
5
|
-
import type { HtmlSource } from "./source";
|
|
2
|
+
import type { FormattingContext, ParagraphStyleOption } from "../../docx/formatting.js";
|
|
3
|
+
import type { PageGeometry } from "../../docx/pageGeometry.js";
|
|
4
|
+
import type { ImageToInsert } from "../insertImage.js";
|
|
5
|
+
import type { HtmlSource } from "./source.js";
|
|
6
6
|
/**
|
|
7
7
|
* Everything a piece of HTML is read against.
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ResolvedPos, Slice } from "prosemirror-model";
|
|
2
|
-
import { type PastedContent } from "./htmlReader";
|
|
3
|
-
import type { HtmlReadContext } from "./readContext";
|
|
2
|
+
import { type PastedContent } from "./htmlReader.js";
|
|
3
|
+
import type { HtmlReadContext } from "./readContext.js";
|
|
4
4
|
/** What one reader is handed: the markup on the clipboard, and the document it is read into */
|
|
5
5
|
export interface ClipboardInput {
|
|
6
6
|
dom: Node;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./comments/editing";
|
|
2
|
-
export * from "./comments/model";
|
|
3
|
-
export * from "./comments/reading";
|
|
1
|
+
export * from "./comments/editing.js";
|
|
2
|
+
export * from "./comments/model.js";
|
|
3
|
+
export * from "./comments/reading.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Edits Word comments through their range markers and reference nodes. */
|
|
2
2
|
import type { Node as PMNode } from "prosemirror-model";
|
|
3
3
|
import { type Command, type EditorState } from "prosemirror-state";
|
|
4
|
-
import { type CommentRange, type NewComment } from "./model";
|
|
4
|
+
import { type CommentRange, type NewComment } from "./model.js";
|
|
5
5
|
/**
|
|
6
6
|
* Adds a plain-text comment to a stretch of text: the one given, or the current text selection.
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Public comment values and shared attribute readers. */
|
|
2
|
-
import type { CommentReplyData } from "../../../docx/comments";
|
|
2
|
+
import type { CommentReplyData } from "../../../docx/comments.js";
|
|
3
3
|
/** Who a comment is written by: the name it is shown under, and the identity behind it. */
|
|
4
4
|
export interface CommentAuthor {
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Reads comment threads and anchors from the editor document. */
|
|
2
2
|
import type { EditorState } from "prosemirror-state";
|
|
3
|
-
import type { DocumentComment } from "./model";
|
|
3
|
+
import type { DocumentComment } from "./model.js";
|
|
4
4
|
/** Comments in document order, including point comments that have no explicit range. */
|
|
5
5
|
export declare function documentComments(state: EditorState): readonly DocumentComment[];
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Document-level readers for whether the document as it stands can be written back. */
|
|
2
2
|
import type { EditorState } from "prosemirror-state";
|
|
3
|
-
import { type ExportProblem } from "../../docx/invariants";
|
|
4
|
-
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "../../docx/invariants";
|
|
3
|
+
import { type ExportProblem } from "../../docx/invariants.js";
|
|
4
|
+
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "../../docx/invariants.js";
|
|
5
5
|
/**
|
|
6
6
|
* Every reason writing the document back would be refused, in the order `exportDocx` would raise
|
|
7
7
|
* them, each with the code and message the refusal would carry, the `reason` naming what it is
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Document-level reader for what the open document holds that the editor cannot model. */
|
|
2
2
|
import type { EditorState } from "prosemirror-state";
|
|
3
|
-
import { type FidelityNote } from "../../docx/fidelity";
|
|
4
|
-
export type { FidelityCode, FidelityNote, FidelitySeverity, } from "../../docx/fidelity";
|
|
3
|
+
import { type FidelityNote } from "../../docx/fidelity.js";
|
|
4
|
+
export type { FidelityCode, FidelityNote, FidelitySeverity, } from "../../docx/fidelity.js";
|
|
5
5
|
/**
|
|
6
6
|
* What the document standing in the editor hides, stands a placeholder in front of, or approximates.
|
|
7
7
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* and the mark keeps every other attr it wore.
|
|
7
7
|
*/
|
|
8
8
|
import type { Command, EditorState } from "prosemirror-state";
|
|
9
|
-
import { type EditableRunKey, type RunSetting } from "../../../docx/formatting";
|
|
9
|
+
import { type EditableRunKey, type RunSetting } from "../../../docx/formatting.js";
|
|
10
10
|
export interface RunPropertyCommands<K extends EditableRunKey> {
|
|
11
11
|
/** Writes the value into the selection. Null withdraws the run's own setting, so the layers below decide again */
|
|
12
12
|
set(value: RunSetting<K> | null): Command;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Reads the active inline formatting shown by toolbar controls. */
|
|
2
2
|
import type { Node as PMNode } from "prosemirror-model";
|
|
3
3
|
import type { EditorState } from "prosemirror-state";
|
|
4
|
-
import { type DocumentDefaults } from "../../../model/format";
|
|
5
|
-
import { type FontFallbacks } from "../../../styles/fontStack";
|
|
4
|
+
import { type DocumentDefaults } from "../../../model/format.js";
|
|
5
|
+
import { type FontFallbacks } from "../../../styles/fontStack.js";
|
|
6
6
|
/**
|
|
7
7
|
* The font size at the selected position.
|
|
8
8
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Shared text-piece discovery for formatting reads and edits. */
|
|
2
2
|
import type { Mark } from "prosemirror-model";
|
|
3
3
|
import type { EditorState } from "prosemirror-state";
|
|
4
|
-
import { type RunFormat } from "../../../model/format";
|
|
4
|
+
import { type RunFormat } from "../../../model/format.js";
|
|
5
5
|
/** One piece of text whose formatting is to be edited */
|
|
6
6
|
export interface TextPiece {
|
|
7
7
|
from: number;
|