@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,2 +1,2 @@
|
|
|
1
|
-
export * from "./formatting/editing";
|
|
2
|
-
export * from "./formatting/reading";
|
|
1
|
+
export * from "./formatting/editing.js";
|
|
2
|
+
export * from "./formatting/reading.js";
|
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
import type { Command } from "prosemirror-state";
|
|
10
10
|
export type EditorCommand = Command;
|
|
11
11
|
/** The paragraph styles the document defines, which the style picker offers */
|
|
12
|
-
export type { ParagraphStyleOption } from "../../docx/formatting";
|
|
13
|
-
export type { RunToggle } from "../../docx/runProps";
|
|
14
|
-
export type { LineSpacing, ParagraphAlign } from "../../model/format";
|
|
15
|
-
export type { ListKind } from "../../numbering/listTemplate";
|
|
12
|
+
export type { ParagraphStyleOption } from "../../docx/formatting.js";
|
|
13
|
+
export type { RunToggle } from "../../docx/runProps.js";
|
|
14
|
+
export type { LineSpacing, ParagraphAlign } from "../../model/format.js";
|
|
15
|
+
export type { ListKind } from "../../numbering/listTemplate.js";
|
|
16
16
|
/** The codes a problem below is reported under, which are the ones `DocxExportError` is thrown with */
|
|
17
|
-
export type { DocxExportErrorCode } from "../../ooxml/errors";
|
|
17
|
+
export type { DocxExportErrorCode } from "../../ooxml/errors.js";
|
|
18
18
|
/** The size an image is shown at, which the insert command asks for */
|
|
19
|
-
export type { ImageExtent } from "../../ooxml/image";
|
|
19
|
+
export type { ImageExtent } from "../../ooxml/image.js";
|
|
20
20
|
/**
|
|
21
21
|
* What the editor as a whole may receive - everything, comments alone, or nothing - which a control
|
|
22
22
|
* of your own reads before it offers an edit, the way the built-in ones do.
|
|
23
23
|
*/
|
|
24
|
-
export type { EditableComments, EditingProtection, } from "../../schema/protection";
|
|
25
|
-
export { editingProtection } from "../../schema/protectionState";
|
|
24
|
+
export type { EditableComments, EditingProtection, } from "../../schema/protection.js";
|
|
25
|
+
export { editingProtection } from "../../schema/protectionState.js";
|
|
26
26
|
/** The fonts to draw with where a document names one the machine does not have, which the font queries read */
|
|
27
|
-
export type { FontFallbacks } from "../../styles/fontStack";
|
|
27
|
+
export type { FontFallbacks } from "../../styles/fontStack.js";
|
|
28
28
|
/**
|
|
29
29
|
* The document's own default formatting, which `documentFontNames` needs, and the width of one
|
|
30
30
|
* line of body text on the paper the document names, which is what an image wider than the page
|
|
31
31
|
* is shrunk to
|
|
32
32
|
*/
|
|
33
|
-
export { documentBodyWidthPx, documentDefaults, documentParagraphStyles, } from "../documentStyles";
|
|
33
|
+
export { documentBodyWidthPx, documentDefaults, documentParagraphStyles, } from "../documentStyles.js";
|
|
34
34
|
/**
|
|
35
35
|
* The way an image file goes from outside into the document, which is what an image button of
|
|
36
36
|
* your own stands on. `insertImageFiles` is all of it in one call, and is what the built-in
|
|
@@ -39,45 +39,45 @@ export { documentBodyWidthPx, documentDefaults, documentParagraphStyles, } from
|
|
|
39
39
|
* Both take that width, which `documentBodyWidthPx` reads off the open document; left out, it is
|
|
40
40
|
* A4's.
|
|
41
41
|
*/
|
|
42
|
-
export { fittedExtent, IMAGE_FILE_ACCEPT, imageFilesIn, insertImageFiles, readImageFile, } from "../imageFiles";
|
|
43
|
-
export type { ImageToInsert } from "../insertImage";
|
|
44
|
-
export { canInsertImage, insertImage } from "../insertImage";
|
|
45
|
-
export type { TableSize } from "../insertTable";
|
|
46
|
-
export { canInsertTable, insertTable } from "../insertTable";
|
|
42
|
+
export { fittedExtent, IMAGE_FILE_ACCEPT, imageFilesIn, insertImageFiles, readImageFile, } from "../imageFiles.js";
|
|
43
|
+
export type { ImageToInsert } from "../insertImage.js";
|
|
44
|
+
export { canInsertImage, insertImage } from "../insertImage.js";
|
|
45
|
+
export type { TableSize } from "../insertTable.js";
|
|
46
|
+
export { canInsertTable, insertTable } from "../insertTable.js";
|
|
47
47
|
/**
|
|
48
48
|
* The two breaks, which are what the keymap binds to Shift+Enter and Mod+Enter
|
|
49
49
|
* (`editor/plugins/keymap`), so a control of your own can put in either.
|
|
50
50
|
*/
|
|
51
|
-
export { insertLineBreak, insertPageBreak } from "./breakCommands";
|
|
51
|
+
export { insertLineBreak, insertPageBreak } from "./breakCommands.js";
|
|
52
52
|
/**
|
|
53
53
|
* Whether a command this package does not own would go through right now, the lock guard included.
|
|
54
54
|
* The commands here need no such wrapper: each of them asks the guard before it answers. What does
|
|
55
55
|
* is a command of a consumer's own, or one out of `prosemirror-commands`, since the predicates the
|
|
56
56
|
* question takes are not exported anywhere.
|
|
57
57
|
*/
|
|
58
|
-
export { canRunCommand } from "./canRunCommand";
|
|
59
|
-
export type { CommentAuthor, CommentRange, DocumentComment, DocumentCommentReply, NewComment, } from "./commentCommands";
|
|
60
|
-
export { addComment, addCommentReply, canAddComment, canEditComment, documentComments, removeComment, removeCommentReply, selectComment, setCommentBody, setCommentResolved, updateComment, updateCommentReply, } from "./commentCommands";
|
|
58
|
+
export { canRunCommand } from "./canRunCommand.js";
|
|
59
|
+
export type { CommentAuthor, CommentRange, DocumentComment, DocumentCommentReply, NewComment, } from "./commentCommands.js";
|
|
60
|
+
export { addComment, addCommentReply, canAddComment, canEditComment, documentComments, removeComment, removeCommentReply, selectComment, setCommentBody, setCommentResolved, updateComment, updateCommentReply, } from "./commentCommands.js";
|
|
61
61
|
/**
|
|
62
62
|
* Whether the document as it stands can be written back, and every reason it could not, each
|
|
63
63
|
* with the code `exportDocx` would throw it under. `canExport` is what an export control is
|
|
64
64
|
* drawn from, and `downloadDocx` answers `blocked` with the same list.
|
|
65
65
|
*/
|
|
66
|
-
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./exportQueries";
|
|
67
|
-
export { canExport, documentExportProblems } from "./exportQueries";
|
|
68
|
-
export type { FidelityCode, FidelityNote, FidelitySeverity, } from "./fidelityQueries";
|
|
69
|
-
export { documentFidelity } from "./fidelityQueries";
|
|
70
|
-
export type { ActiveFontFamily, ActiveFontSize, } from "./formattingCommands";
|
|
71
|
-
export { activeFontFamily, activeFontSize, activeTextBackground, activeTextColor, canFormatText, documentFontNames, isBoldActive, isItalicActive, isStrikeActive, isUnderlineActive, setFontFamily, setFontSize, setTextBackground, setTextColor, toggleBold, toggleItalic, toggleStrike, toggleUnderline, } from "./formattingCommands";
|
|
66
|
+
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./exportQueries.js";
|
|
67
|
+
export { canExport, documentExportProblems } from "./exportQueries.js";
|
|
68
|
+
export type { FidelityCode, FidelityNote, FidelitySeverity, } from "./fidelityQueries.js";
|
|
69
|
+
export { documentFidelity } from "./fidelityQueries.js";
|
|
70
|
+
export type { ActiveFontFamily, ActiveFontSize, } from "./formattingCommands.js";
|
|
71
|
+
export { activeFontFamily, activeFontSize, activeTextBackground, activeTextColor, canFormatText, documentFontNames, isBoldActive, isItalicActive, isStrikeActive, isUnderlineActive, setFontFamily, setFontSize, setTextBackground, setTextColor, toggleBold, toggleItalic, toggleStrike, toggleUnderline, } from "./formattingCommands.js";
|
|
72
72
|
/**
|
|
73
73
|
* Undo and redo are the editor's own rather than prosemirror-history's, because a replayed lock
|
|
74
74
|
* only passes the lock guard with the pass these two carry (`./historyCommands`). They also find
|
|
75
75
|
* the history this editor keeps, which an import of the consumer's own copy of prosemirror-history
|
|
76
76
|
* would not.
|
|
77
77
|
*/
|
|
78
|
-
export { redo, undo } from "./historyCommands";
|
|
79
|
-
export { canDecreaseIndent, canIncreaseIndent, decreaseIndent, increaseIndent, } from "./indentCommands";
|
|
80
|
-
export type { ActiveLinkSpan } from "./linkCommands";
|
|
78
|
+
export { redo, undo } from "./historyCommands.js";
|
|
79
|
+
export { canDecreaseIndent, canIncreaseIndent, decreaseIndent, increaseIndent, } from "./indentCommands.js";
|
|
80
|
+
export type { ActiveLinkSpan } from "./linkCommands.js";
|
|
81
81
|
/**
|
|
82
82
|
* The link commands, which the Cmd+K panel and the toolbar button are drawn from
|
|
83
83
|
* (`ui/LinkPanel`). `activeLink` is the address to show, `canSetLink` whether a link may go on at
|
|
@@ -86,15 +86,15 @@ export type { ActiveLinkSpan } from "./linkCommands";
|
|
|
86
86
|
* `activeLinkSpan` is the one link the selection sits inside, stretch and address, which is what a
|
|
87
87
|
* card standing by a link is placed and drawn from (`ui/LinkCard`).
|
|
88
88
|
*/
|
|
89
|
-
export { activeLink, activeLinkSpan, canSetLink, removeLink, setLink, } from "./linkCommands";
|
|
90
|
-
export { activeListKind, decreaseListLevel, increaseListLevel, isInList, toggleBulletList, toggleNumberedList, } from "./listCommands";
|
|
91
|
-
export type { SelectionLock } from "./lockCommands";
|
|
92
|
-
export { documentHasLocked, lockSelection, selectionLock, selectionTouchesLocked, unlockSelection, } from "./lockCommands";
|
|
93
|
-
export { canInsertEndnote, canInsertFootnote, insertEndnote, insertFootnote, openEndnote, openFootnote, setEndnoteBody, setFootnoteBody, } from "./noteCommands";
|
|
94
|
-
export type { DocumentNote } from "./noteQueries";
|
|
95
|
-
export { documentNotes } from "./noteQueries";
|
|
96
|
-
export type { ActiveParagraphAlign, ActiveParagraphStyle, } from "./paragraphCommands";
|
|
97
|
-
export { activeParagraphAlign, activeParagraphStyle, canSetParagraphAlign, setParagraphAlign, setParagraphStyle, } from "./paragraphCommands";
|
|
98
|
-
export { activeLineSpacing, canSetLineSpacing, SINGLE_LINE_SPACING, setLineSpacing, } from "./spacingCommands";
|
|
89
|
+
export { activeLink, activeLinkSpan, canSetLink, removeLink, setLink, } from "./linkCommands.js";
|
|
90
|
+
export { activeListKind, decreaseListLevel, increaseListLevel, isInList, toggleBulletList, toggleNumberedList, } from "./listCommands.js";
|
|
91
|
+
export type { SelectionLock } from "./lockCommands.js";
|
|
92
|
+
export { documentHasLocked, lockSelection, selectionLock, selectionTouchesLocked, unlockSelection, } from "./lockCommands.js";
|
|
93
|
+
export { canInsertEndnote, canInsertFootnote, insertEndnote, insertFootnote, openEndnote, openFootnote, setEndnoteBody, setFootnoteBody, } from "./noteCommands.js";
|
|
94
|
+
export type { DocumentNote } from "./noteQueries.js";
|
|
95
|
+
export { documentNotes } from "./noteQueries.js";
|
|
96
|
+
export type { ActiveParagraphAlign, ActiveParagraphStyle, } from "./paragraphCommands.js";
|
|
97
|
+
export { activeParagraphAlign, activeParagraphStyle, canSetParagraphAlign, setParagraphAlign, setParagraphStyle, } from "./paragraphCommands.js";
|
|
98
|
+
export { activeLineSpacing, canSetLineSpacing, SINGLE_LINE_SPACING, setLineSpacing, } from "./spacingCommands.js";
|
|
99
99
|
/** Inserts the same editable DOCX tab as the built-in Tab binding. */
|
|
100
|
-
export { insertTab } from "./tabCommands";
|
|
100
|
+
export { insertTab } from "./tabCommands.js";
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
11
|
import type { Command, EditorState } from "prosemirror-state";
|
|
12
|
-
import { type ListChange } from "../../docx/paraProps";
|
|
13
|
-
import { type NumberingRef } from "../../model/format";
|
|
14
|
-
import { type ListKind } from "../../numbering/listTemplate";
|
|
15
|
-
import type { Numbering } from "../../numbering/parseNumbering";
|
|
12
|
+
import { type ListChange } from "../../docx/paraProps.js";
|
|
13
|
+
import { type NumberingRef } from "../../model/format.js";
|
|
14
|
+
import { type ListKind } from "../../numbering/listTemplate.js";
|
|
15
|
+
import type { Numbering } from "../../numbering/parseNumbering.js";
|
|
16
16
|
/** This paragraph's place in a list. Null when it is not a list */
|
|
17
17
|
export declare function listRefOf(node: PMNode): NumberingRef | null;
|
|
18
18
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Node as PMNode } from "prosemirror-model";
|
|
8
8
|
import type { Command, EditorState } from "prosemirror-state";
|
|
9
|
-
import type { NoteKind } from "../../schema/stories";
|
|
9
|
+
import type { NoteKind } from "../../schema/stories.js";
|
|
10
10
|
/** Writes what one note of this kind says; an editing view's edit reaches the document this way */
|
|
11
11
|
export declare function noteBodyCommand(kind: NoteKind, id: string, body: PMNode): Command;
|
|
12
12
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { Node as PMNode } from "prosemirror-model";
|
|
3
3
|
import type { EditorState } from "prosemirror-state";
|
|
4
4
|
import { DecorationSet } from "prosemirror-view";
|
|
5
|
-
import { type StoryKey } from "../../docx/story";
|
|
6
|
-
import type { NoteKind } from "../../schema/stories";
|
|
5
|
+
import { type StoryKey } from "../../docx/story.js";
|
|
6
|
+
import type { NoteKind } from "../../schema/stories.js";
|
|
7
7
|
export interface DocumentNote {
|
|
8
8
|
readonly kind: NoteKind;
|
|
9
9
|
readonly id: string;
|
|
@@ -42,7 +42,7 @@ interface NoteProjection {
|
|
|
42
42
|
* per edit (`editor/plugins/documentProjection`) rather than once per render of the notes drawn
|
|
43
43
|
* around the page.
|
|
44
44
|
*/
|
|
45
|
-
export declare const noteProjection: import("../plugins/documentProjection").DocumentProjection<NoteProjection>;
|
|
45
|
+
export declare const noteProjection: import("../plugins/documentProjection.js").DocumentProjection<NoteProjection>;
|
|
46
46
|
/** The distinct notes referenced by the main document story, in first-reference order. */
|
|
47
47
|
export declare function documentNotes(state: EditorState): readonly DocumentNote[];
|
|
48
48
|
export {};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* All XML handling belongs to `docx/paraProps`; this file only calls those functions.
|
|
10
10
|
*/
|
|
11
11
|
import type { Command, EditorState } from "prosemirror-state";
|
|
12
|
-
import { type ParagraphAlign } from "../../model/format";
|
|
12
|
+
import { type ParagraphAlign } from "../../model/format.js";
|
|
13
13
|
/**
|
|
14
14
|
* Sets the alignment of the selected paragraphs.
|
|
15
15
|
* Exactly one alignment is always on, so there is no command to clear it (the same as Word).
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* change and to what.
|
|
7
7
|
*/
|
|
8
8
|
import type { Command, EditorState } from "prosemirror-state";
|
|
9
|
-
import { type LineSpacing } from "../../model/format";
|
|
9
|
+
import { type LineSpacing } from "../../model/format.js";
|
|
10
10
|
/** One line of text, which is what a paragraph nobody gave a line spacing is drawn with */
|
|
11
11
|
export declare const SINGLE_LINE_SPACING: LineSpacing;
|
|
12
12
|
/**
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import type { Node as PMNode } from "prosemirror-model";
|
|
5
5
|
import { EditorState, type Plugin } from "prosemirror-state";
|
|
6
6
|
import { EditorView } from "prosemirror-view";
|
|
7
|
-
import type { SessionStore } from "../docx/session";
|
|
8
|
-
import type { EditableComments, EditingProtection } from "../schema/protection";
|
|
9
|
-
import { type FontFallbacks } from "../styles/fontStack";
|
|
10
|
-
import type { CommentAuthor } from "./commands/comments/model";
|
|
11
|
-
import { type EditorDocument } from "./editorDocument";
|
|
12
|
-
import { type EditRefusal } from "./editRefusal";
|
|
7
|
+
import type { SessionStore } from "../docx/session.js";
|
|
8
|
+
import type { EditableComments, EditingProtection } from "../schema/protection.js";
|
|
9
|
+
import { type FontFallbacks } from "../styles/fontStack.js";
|
|
10
|
+
import type { CommentAuthor } from "./commands/comments/model.js";
|
|
11
|
+
import { type EditorDocument } from "./editorDocument.js";
|
|
12
|
+
import { type EditRefusal } from "./editRefusal.js";
|
|
13
13
|
export interface EditorStateOptions {
|
|
14
14
|
/**
|
|
15
15
|
* What the opened document laid down: its styles, its list definitions, the paper it is
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* the body the paper leaves.
|
|
10
10
|
*/
|
|
11
11
|
import type { EditorState } from "prosemirror-state";
|
|
12
|
-
import type { FormattingContext, ParagraphStyleOption } from "../docx/formatting";
|
|
13
|
-
import { type PageGeometry } from "../docx/pageGeometry";
|
|
14
|
-
import type { DocumentDefaults } from "../model/format";
|
|
12
|
+
import type { FormattingContext, ParagraphStyleOption } from "../docx/formatting.js";
|
|
13
|
+
import { type PageGeometry } from "../docx/pageGeometry.js";
|
|
14
|
+
import type { DocumentDefaults } from "../model/format.js";
|
|
15
15
|
/** Everything a paragraph's or a run's display values are resolved against. Empty when the editor does not know the document */
|
|
16
16
|
export declare function documentFormatting(state: EditorState): FormattingContext;
|
|
17
17
|
/** The default formatting this document wrote down. When the editor does not know it, it is the same as nothing being specified */
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Node as PMNode } from "prosemirror-model";
|
|
11
11
|
import { type EditorState, Plugin } from "prosemirror-state";
|
|
12
|
-
import { type FormattingContext, type ParagraphStyleOption } from "../docx/formatting";
|
|
13
|
-
import { type NoteNumbering } from "../docx/notes/reading";
|
|
14
|
-
import { type PageGeometry } from "../docx/pageGeometry";
|
|
15
|
-
import type { SessionStore } from "../docx/session";
|
|
16
|
-
import type { DocumentDefaults } from "../model/format";
|
|
17
|
-
import { type StoryKey } from "../schema/stories";
|
|
12
|
+
import { type FormattingContext, type ParagraphStyleOption } from "../docx/formatting.js";
|
|
13
|
+
import { type NoteNumbering } from "../docx/notes/reading.js";
|
|
14
|
+
import { type PageGeometry } from "../docx/pageGeometry.js";
|
|
15
|
+
import type { SessionStore } from "../docx/session.js";
|
|
16
|
+
import type { DocumentDefaults } from "../model/format.js";
|
|
17
|
+
import { type StoryKey } from "../schema/stories.js";
|
|
18
18
|
/** The document-level values one editing state is built on */
|
|
19
19
|
export interface EditorDocument {
|
|
20
20
|
/** The document these values were read from. Null for a state built without one */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mark, type Node as PMNode } from "prosemirror-model";
|
|
2
|
-
import { type StepRange } from "../schema/locks";
|
|
2
|
+
import { type StepRange } from "../schema/locks.js";
|
|
3
3
|
export interface FormatSource {
|
|
4
4
|
/** The run mark what is written takes, null for none */
|
|
5
5
|
run: Mark | null;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Plugin } from "prosemirror-state";
|
|
12
12
|
import type { EditorView } from "prosemirror-view";
|
|
13
|
-
import { type ImageExtent } from "../ooxml/image";
|
|
14
|
-
import { type ImageToInsert } from "./insertImage";
|
|
13
|
+
import { type ImageExtent } from "../ooxml/image.js";
|
|
14
|
+
import { type ImageToInsert } from "./insertImage.js";
|
|
15
15
|
/** What a file picker is told to accept: the kinds we can both draw and write back */
|
|
16
16
|
export declare const IMAGE_FILE_ACCEPT: string;
|
|
17
17
|
/** Anything holding a list of files: a clipboard, a drag, a file input */
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* export writes a media part for its bytes and builds a drawing around them.
|
|
11
11
|
*/
|
|
12
12
|
import type { Command, EditorState } from "prosemirror-state";
|
|
13
|
-
import { type ImageExtent } from "../ooxml/image";
|
|
13
|
+
import { type ImageExtent } from "../ooxml/image.js";
|
|
14
14
|
/** What has to be known about an image before it can go into a document */
|
|
15
15
|
export interface ImageToInsert {
|
|
16
16
|
/** The image bytes as a data URL */
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* keeps through an edit, and what a paste into one may carry.
|
|
11
11
|
*/
|
|
12
12
|
import type { EditorView } from "prosemirror-view";
|
|
13
|
-
import { type StoryKey } from "../../schema/stories";
|
|
14
|
-
import { type SliceNormalizer } from "../clipboard/normalizers";
|
|
15
|
-
import type { StoryNodeSpecs } from "../stories/storyMarkup";
|
|
16
|
-
import { type StoryExtensions, type StoryHost } from "../stories/storyView";
|
|
13
|
+
import { type StoryKey } from "../../schema/stories.js";
|
|
14
|
+
import { type SliceNormalizer } from "../clipboard/normalizers.js";
|
|
15
|
+
import type { StoryNodeSpecs } from "../stories/storyMarkup.js";
|
|
16
|
+
import { type StoryExtensions, type StoryHost } from "../stories/storyView.js";
|
|
17
17
|
/** The node specs a note's story is drawn with, its own reference mark drawn as `labelOf` answers */
|
|
18
18
|
export declare function noteNodeSpecs(labelOf: () => string): StoryNodeSpecs;
|
|
19
19
|
/**
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { Node as PMNode } from "prosemirror-model";
|
|
10
10
|
import type { EditorState, Transaction } from "prosemirror-state";
|
|
11
|
-
import { type FormattingContext } from "../docx/formatting";
|
|
12
|
-
import type { ParagraphProps } from "../docx/paraProps";
|
|
11
|
+
import { type FormattingContext } from "../docx/formatting.js";
|
|
12
|
+
import type { ParagraphProps } from "../docx/paraProps.js";
|
|
13
13
|
export interface ParagraphSpot {
|
|
14
14
|
pos: number;
|
|
15
15
|
node: PMNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Finds the table-style conditions at an editor position for both reads and writes. */
|
|
2
2
|
import type { Node as PMNode } from "prosemirror-model";
|
|
3
|
-
import type { ParagraphPlacement } from "../docx/formatting";
|
|
3
|
+
import type { ParagraphPlacement } from "../docx/formatting.js";
|
|
4
4
|
/**
|
|
5
5
|
* The part of a table the paragraph stands in, which its table style dresses it by. null for a
|
|
6
6
|
* paragraph of the body, and for one in a cell of a table this editor did not build.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `./commands`.
|
|
14
14
|
*/
|
|
15
15
|
import type { Command, EditorState, Plugin } from "prosemirror-state";
|
|
16
|
-
import type { CommentRange } from "../commands/comments/model";
|
|
16
|
+
import type { CommentRange } from "../commands/comments/model.js";
|
|
17
17
|
/**
|
|
18
18
|
* Opens the composer over the selected text. False where a comment could not go there anyway, so
|
|
19
19
|
* the menu entry that runs it is drawn dead rather than opening a form nothing would come of. It
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Plugin } from "prosemirror-state";
|
|
12
12
|
import { DecorationSet } from "prosemirror-view";
|
|
13
|
-
import { type DocumentComment } from "../commands/comments/model";
|
|
13
|
+
import { type DocumentComment } from "../commands/comments/model.js";
|
|
14
14
|
export interface DocumentComments {
|
|
15
15
|
comments: readonly DocumentComment[];
|
|
16
16
|
/**
|
|
@@ -22,7 +22,7 @@ export interface DocumentComments {
|
|
|
22
22
|
/** The stretch each comment was written for, drawn as it stood when the edit landed */
|
|
23
23
|
decorations: DecorationSet;
|
|
24
24
|
}
|
|
25
|
-
export declare const commentProjection: import("./documentProjection").DocumentProjection<DocumentComments>;
|
|
25
|
+
export declare const commentProjection: import("./documentProjection.js").DocumentProjection<DocumentComments>;
|
|
26
26
|
/**
|
|
27
27
|
* What a state built by `createEditor` registers: the comments it goes on to answer, and the
|
|
28
28
|
* ranges drawn over the text identified by the Word comment markers holding them.
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import type { Node as PMNode } from "prosemirror-model";
|
|
19
19
|
import { Plugin } from "prosemirror-state";
|
|
20
|
-
import { type DisplayDeriver } from "../../schema/displayDerivation";
|
|
21
|
-
import { type EditorDocument } from "../editorDocument";
|
|
20
|
+
import { type DisplayDeriver } from "../../schema/displayDerivation.js";
|
|
21
|
+
import { type EditorDocument } from "../editorDocument.js";
|
|
22
22
|
/** What a deriver of this editor resolves against */
|
|
23
23
|
export interface DerivationContext {
|
|
24
24
|
readonly document: EditorDocument;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* guard `schema/guards` registers, the protection among them, in one pass.
|
|
5
5
|
*/
|
|
6
6
|
import { Plugin, type Transaction } from "prosemirror-state";
|
|
7
|
-
import type { EditableComments, EditingProtection, ProtectionState } from "../../schema/protection";
|
|
8
|
-
import type { CommentAuthor } from "../commands/comments/model";
|
|
7
|
+
import type { EditableComments, EditingProtection, ProtectionState } from "../../schema/protection.js";
|
|
8
|
+
import type { CommentAuthor } from "../commands/comments/model.js";
|
|
9
9
|
export interface DocumentProtectionOptions {
|
|
10
10
|
protection: EditingProtection;
|
|
11
11
|
/** Whose comments are being written. Null where none are, a reader above all */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Keys not handled here are taken by ProseMirror's base keymap.
|
|
3
3
|
*/
|
|
4
4
|
import { type Command, Plugin } from "prosemirror-state";
|
|
5
|
-
import type { NoteKind } from "../../schema/stories";
|
|
5
|
+
import type { NoteKind } from "../../schema/stories.js";
|
|
6
6
|
/**
|
|
7
7
|
* Keeps undo and redo on their keys where the keymap above cannot reach them.
|
|
8
8
|
*
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* note disappears only together with its last reference (`docx/storyParts`).
|
|
15
15
|
*/
|
|
16
16
|
import { Plugin } from "prosemirror-state";
|
|
17
|
-
import { type NoteKind } from "../../schema/stories";
|
|
17
|
+
import { type NoteKind } from "../../schema/stories.js";
|
|
18
18
|
export declare function noteLifecycle(kinds?: readonly NoteKind[]): Plugin;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Node as PMNode } from "prosemirror-model";
|
|
13
13
|
import { type Command, type EditorState, Plugin, type Transaction } from "prosemirror-state";
|
|
14
|
-
import { type NoteKind, type StoryKey } from "../../schema/stories";
|
|
14
|
+
import { type NoteKind, type StoryKey } from "../../schema/stories.js";
|
|
15
15
|
/** Which note the reader asked for, and which asking it was */
|
|
16
16
|
export interface RequestedNote {
|
|
17
17
|
readonly key: StoryKey;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from "prosemirror-state";
|
|
2
|
-
import { noteLabelsIn } from "../../docx/notes/numbering";
|
|
2
|
+
import { noteLabelsIn } from "../../docx/notes/numbering.js";
|
|
3
3
|
export type NoteLabeller = typeof noteLabelsIn;
|
|
4
4
|
/**
|
|
5
5
|
* Labels the note references again after a change that moves one, moves a section break, or
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import type { Node as PMNode } from "prosemirror-model";
|
|
7
7
|
import { type EditorState, Plugin } from "prosemirror-state";
|
|
8
8
|
import { DecorationSet } from "prosemirror-view";
|
|
9
|
-
import { type RunFormat } from "../../model/format";
|
|
10
|
-
import type { LevelAlign, LevelSuffix, Numbering } from "../../numbering/parseNumbering";
|
|
9
|
+
import { type RunFormat } from "../../model/format.js";
|
|
10
|
+
import type { LevelAlign, LevelSuffix, Numbering } from "../../numbering/parseNumbering.js";
|
|
11
11
|
/** A number to draw on screen and the paragraph position it attaches to */
|
|
12
12
|
export interface PlacedMarker {
|
|
13
13
|
from: number;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* import takes (`docx/formatting`), so that a paragraph an edit built, one it re-aligned and one
|
|
4
4
|
* the file arrived with all carry the same values for the same properties.
|
|
5
5
|
*/
|
|
6
|
-
import type { DocumentDeriver } from "./displayDerivation";
|
|
6
|
+
import type { DocumentDeriver } from "./displayDerivation.js";
|
|
7
7
|
export declare const paragraphDisplay: DocumentDeriver;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from "prosemirror-state";
|
|
2
|
-
import type { TabAlignment, TabStop } from "../../model/tabStops";
|
|
2
|
+
import type { TabAlignment, TabStop } from "../../model/tabStops.js";
|
|
3
3
|
type PositionedAlignment = Exclude<TabAlignment, "num">;
|
|
4
4
|
export interface TabTarget {
|
|
5
5
|
align: PositionedAlignment;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* The lines a table's cells draw because of where they sit in the grid (`table/gridBorders`),
|
|
3
3
|
* derived again once the grid or the border inputs of the table moved.
|
|
4
4
|
*/
|
|
5
|
-
import type { DocumentDeriver } from "./displayDerivation";
|
|
5
|
+
import type { DocumentDeriver } from "./displayDerivation.js";
|
|
6
6
|
export declare const tableDisplay: DocumentDeriver;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* (`schema/clipboard`).
|
|
15
15
|
*/
|
|
16
16
|
import { type DOMOutputSpec, type Node as PMNode } from "prosemirror-model";
|
|
17
|
-
import type { FontFallbacks } from "../../styles/fontStack";
|
|
17
|
+
import type { FontFallbacks } from "../../styles/fontStack.js";
|
|
18
18
|
/** How a node type is drawn in place of the way the schema draws it, by node type name */
|
|
19
19
|
export type StoryNodeSpecs = Readonly<Record<string, (node: PMNode) => DOMOutputSpec>>;
|
|
20
20
|
export interface StoryMarkupOptions {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Node as PMNode } from "prosemirror-model";
|
|
17
17
|
import { type Command, EditorState, type Plugin } from "prosemirror-state";
|
|
18
|
-
import type { EditingProtection } from "../../schema/protection";
|
|
19
|
-
import type { SliceNormalizer } from "../clipboard/normalizers";
|
|
20
|
-
import { type EditorDocument } from "../editorDocument";
|
|
21
|
-
import type { SurfaceCapabilities } from "./storyView";
|
|
18
|
+
import type { EditingProtection } from "../../schema/protection.js";
|
|
19
|
+
import type { SliceNormalizer } from "../clipboard/normalizers.js";
|
|
20
|
+
import { type EditorDocument } from "../editorDocument.js";
|
|
21
|
+
import type { SurfaceCapabilities } from "./storyView.js";
|
|
22
22
|
export interface StoryStateOptions {
|
|
23
23
|
/** The story as the main document holds it */
|
|
24
24
|
readonly story: PMNode;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
import type { Node as PMNode } from "prosemirror-model";
|
|
15
15
|
import { type EditorState, type Plugin } from "prosemirror-state";
|
|
16
16
|
import { EditorView, type NodeViewConstructor } from "prosemirror-view";
|
|
17
|
-
import { type StoryKey } from "../../schema/stories";
|
|
18
|
-
import type { FontFallbacks } from "../../styles/fontStack";
|
|
19
|
-
import type { SliceNormalizer } from "../clipboard/normalizers";
|
|
20
|
-
import type { EditorDocument } from "../editorDocument";
|
|
17
|
+
import { type StoryKey } from "../../schema/stories.js";
|
|
18
|
+
import type { FontFallbacks } from "../../styles/fontStack.js";
|
|
19
|
+
import type { SliceNormalizer } from "../clipboard/normalizers.js";
|
|
20
|
+
import type { EditorDocument } from "../editorDocument.js";
|
|
21
21
|
export type NodeViewMap = Record<string, NodeViewConstructor>;
|
|
22
22
|
/** What every surface is read and dispatched through, whichever of the two it is */
|
|
23
23
|
interface SurfaceContents {
|
|
@@ -54,14 +54,15 @@ function createStoryView({
|
|
|
54
54
|
}) {
|
|
55
55
|
const standing = () => host.shut(key) ? "readOnly" : editingProtection(host.state());
|
|
56
56
|
let protection = standing();
|
|
57
|
+
const leaveStory = () => {
|
|
58
|
+
host.leave(key);
|
|
59
|
+
return true;
|
|
60
|
+
};
|
|
57
61
|
const keys = {
|
|
58
62
|
"Mod-z": () => host.undo(),
|
|
59
63
|
"Mod-y": () => host.redo(),
|
|
60
64
|
"Shift-Mod-z": () => host.redo(),
|
|
61
|
-
Escape:
|
|
62
|
-
host.leave(key);
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
+
Escape: leaveStory
|
|
65
66
|
};
|
|
66
67
|
const built = (story) => storyEditorState({
|
|
67
68
|
story,
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* the import's reader, which the schema stands below.
|
|
15
15
|
*/
|
|
16
16
|
import type { MarkViewConstructor } from "prosemirror-view";
|
|
17
|
-
import type { FontFallbacks } from "../../styles/fontStack";
|
|
17
|
+
import type { FontFallbacks } from "../../styles/fontStack.js";
|
|
18
18
|
export declare function runMarkView(fontFallbacks: FontFallbacks): MarkViewConstructor;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,22 +12,22 @@
|
|
|
12
12
|
export type { Command } from "prosemirror-state";
|
|
13
13
|
export { EditorState, Plugin, PluginKey, TextSelection, } from "prosemirror-state";
|
|
14
14
|
export { EditorView } from "prosemirror-view";
|
|
15
|
-
export type { DocxEditorHandle, DocxEditorMode, DocxEditorProps, } from "./DocxEditor";
|
|
16
|
-
export { DocxEditor } from "./DocxEditor";
|
|
17
|
-
export type { DocxBytes, DocxSource } from "./docx/importDocx";
|
|
15
|
+
export type { DocxEditorHandle, DocxEditorMode, DocxEditorProps, } from "./DocxEditor.js";
|
|
16
|
+
export { DocxEditor } from "./DocxEditor.js";
|
|
17
|
+
export type { DocxBytes, DocxSource } from "./docx/importDocx.js";
|
|
18
18
|
/** What the handle and a `blocked` download report: each reason the document cannot be written, under the code `DocxExportError` would throw it with */
|
|
19
|
-
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./docx/invariants";
|
|
20
|
-
export type { DownloadDocxOptions, DownloadDocxResult, } from "./download";
|
|
21
|
-
export { downloadDocx } from "./download";
|
|
22
|
-
export type { CommentAuthor } from "./editor/commands/commentCommands";
|
|
19
|
+
export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./docx/invariants.js";
|
|
20
|
+
export type { DownloadDocxOptions, DownloadDocxResult, } from "./download.js";
|
|
21
|
+
export { downloadDocx } from "./download.js";
|
|
22
|
+
export type { CommentAuthor } from "./editor/commands/commentCommands.js";
|
|
23
23
|
/** What `onEditRefused` is handed when the editor turns an edit down */
|
|
24
|
-
export type { ControlLevel, ControlLock, EditRefusal, EditRefusalAction, EditRefusalReason, LockedControl, } from "./editor/editRefusal";
|
|
25
|
-
export type { CellFormat, CellVerticalAlign, DocumentDefaults, HighlightName, LineSpacing, NumberingRef, ParagraphAlign, ParagraphFormat, RowFormat, RowHeight, RunFormat, TableFormat, TableWidth, TableWidthType, UnderlineKind, VerticalAlign, } from "./model/format";
|
|
26
|
-
export type { DocxExportErrorCode, DocxExportErrorOptions, DocxImportErrorCode, } from "./ooxml/errors";
|
|
27
|
-
export { DocxExportError, DocxImportError } from "./ooxml/errors";
|
|
28
|
-
export { docxSchema } from "./schema";
|
|
24
|
+
export type { ControlLevel, ControlLock, EditRefusal, EditRefusalAction, EditRefusalReason, LockedControl, } from "./editor/editRefusal.js";
|
|
25
|
+
export type { CellFormat, CellVerticalAlign, DocumentDefaults, HighlightName, LineSpacing, NumberingRef, ParagraphAlign, ParagraphFormat, RowFormat, RowHeight, RunFormat, TableFormat, TableWidth, TableWidthType, UnderlineKind, VerticalAlign, } from "./model/format.js";
|
|
26
|
+
export type { DocxExportErrorCode, DocxExportErrorOptions, DocxImportErrorCode, } from "./ooxml/errors.js";
|
|
27
|
+
export { DocxExportError, DocxImportError } from "./ooxml/errors.js";
|
|
28
|
+
export { docxSchema } from "./schema/index.js";
|
|
29
29
|
/** Whose comments the panel offers to edit, which `DocxEditorMode` takes */
|
|
30
|
-
export type { EditableComments } from "./schema/protection";
|
|
30
|
+
export type { EditableComments } from "./schema/protection.js";
|
|
31
31
|
/**
|
|
32
32
|
* The lists the built-in pickers offer. They are exported so that a toolbar of your own can
|
|
33
33
|
* offer the same ones without writing them out again; the pickers themselves read these very
|
|
@@ -35,16 +35,16 @@ export type { EditableComments } from "./schema/protection";
|
|
|
35
35
|
* A list of your own goes back the other way through `presets` on `DocxEditor`, which the
|
|
36
36
|
* built-in pickers then offer in place of these.
|
|
37
37
|
*/
|
|
38
|
-
export type { ColorRow } from "./styles/colors";
|
|
39
|
-
export { DEFAULT_COLORS } from "./styles/colors";
|
|
40
|
-
export { DEFAULT_FONT_SIZES } from "./styles/fontSizes";
|
|
41
|
-
export type { FontFallbackGroup, FontFallbacks } from "./styles/fontStack";
|
|
42
|
-
export { DEFAULT_FONT_FALLBACKS } from "./styles/fontStack";
|
|
43
|
-
export { DEFAULT_FONTS } from "./styles/fonts";
|
|
44
|
-
export type { LineSpacingOption } from "./styles/lineSpacings";
|
|
45
|
-
export { DEFAULT_LINE_SPACINGS } from "./styles/lineSpacings";
|
|
46
|
-
export type { CellBorderOption } from "./table/cellBorders";
|
|
47
|
-
export { DEFAULT_CELL_BORDERS } from "./table/cellBorders";
|
|
48
|
-
export type { DocxEditorPresets } from "./ui/presets";
|
|
49
|
-
export type { DocxEditorZoom } from "./ui/zoom";
|
|
50
|
-
export { DEFAULT_ZOOM_LEVELS } from "./ui/zoom";
|
|
38
|
+
export type { ColorRow } from "./styles/colors.js";
|
|
39
|
+
export { DEFAULT_COLORS } from "./styles/colors.js";
|
|
40
|
+
export { DEFAULT_FONT_SIZES } from "./styles/fontSizes.js";
|
|
41
|
+
export type { FontFallbackGroup, FontFallbacks } from "./styles/fontStack.js";
|
|
42
|
+
export { DEFAULT_FONT_FALLBACKS } from "./styles/fontStack.js";
|
|
43
|
+
export { DEFAULT_FONTS } from "./styles/fonts.js";
|
|
44
|
+
export type { LineSpacingOption } from "./styles/lineSpacings.js";
|
|
45
|
+
export { DEFAULT_LINE_SPACINGS } from "./styles/lineSpacings.js";
|
|
46
|
+
export type { CellBorderOption } from "./table/cellBorders.js";
|
|
47
|
+
export { DEFAULT_CELL_BORDERS } from "./table/cellBorders.js";
|
|
48
|
+
export type { DocxEditorPresets } from "./ui/presets.js";
|
|
49
|
+
export type { DocxEditorZoom } from "./ui/zoom.js";
|
|
50
|
+
export { DEFAULT_ZOOM_LEVELS } from "./ui/zoom.js";
|
package/dist/model/format.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* declaration, the checks that let through only the shapes the read functions produce
|
|
12
12
|
* live here alongside them.
|
|
13
13
|
*/
|
|
14
|
-
import { type TabStop } from "./tabStops";
|
|
14
|
+
import { type TabStop } from "./tabStops.js";
|
|
15
15
|
declare const ALIGNS: readonly ["left", "center", "right", "justify"];
|
|
16
16
|
export type ParagraphAlign = (typeof ALIGNS)[number];
|
|
17
17
|
declare const VERTICAL_ALIGNS: readonly ["superscript", "subscript"];
|