@portone/docx-editor 0.6.8 → 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.
Files changed (189) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/CONTRIBUTING.md +2 -2
  3. package/dist/DocxEditor.d.ts +9 -9
  4. package/dist/core.d.ts +27 -27
  5. package/dist/docx/commentOnlyChange.d.ts +3 -3
  6. package/dist/docx/comments/durable.d.ts +4 -4
  7. package/dist/docx/comments/grammar.d.ts +2 -2
  8. package/dist/docx/comments/model.d.ts +1 -1
  9. package/dist/docx/comments/parts.d.ts +6 -6
  10. package/dist/docx/comments/people.d.ts +4 -4
  11. package/dist/docx/comments/policy.d.ts +1 -1
  12. package/dist/docx/comments/reading.d.ts +1 -1
  13. package/dist/docx/comments/writing.d.ts +3 -3
  14. package/dist/docx/comments.d.ts +3 -3
  15. package/dist/docx/compareDocx.d.ts +3 -3
  16. package/dist/docx/exportDocx.d.ts +4 -4
  17. package/dist/docx/exportRefs.d.ts +4 -4
  18. package/dist/docx/formatting/attrs.d.ts +8 -8
  19. package/dist/docx/formatting/context.d.ts +6 -6
  20. package/dist/docx/formatting/direct.d.ts +3 -3
  21. package/dist/docx/formatting/resolve.d.ts +5 -5
  22. package/dist/docx/formatting/runProperties.d.ts +3 -3
  23. package/dist/docx/formatting/styles.d.ts +5 -5
  24. package/dist/docx/formatting/tabStops.d.ts +2 -2
  25. package/dist/docx/formatting.d.ts +7 -7
  26. package/dist/docx/headersFooters.d.ts +6 -6
  27. package/dist/docx/hyperlink.d.ts +1 -1
  28. package/dist/docx/identities.d.ts +1 -1
  29. package/dist/docx/importDocx.d.ts +3 -3
  30. package/dist/docx/importParagraph.d.ts +4 -4
  31. package/dist/docx/importPolicy.d.ts +1 -1
  32. package/dist/docx/importPreserved.d.ts +1 -1
  33. package/dist/docx/importTable.d.ts +2 -2
  34. package/dist/docx/invariants.d.ts +4 -4
  35. package/dist/docx/media.d.ts +2 -2
  36. package/dist/docx/newLists.d.ts +2 -2
  37. package/dist/docx/notes/newNote.d.ts +3 -3
  38. package/dist/docx/notes/numbering.d.ts +2 -2
  39. package/dist/docx/notes/reading.d.ts +3 -3
  40. package/dist/docx/notes/references.d.ts +1 -1
  41. package/dist/docx/notes/writing.d.ts +2 -2
  42. package/dist/docx/numberingPlanner.d.ts +2 -2
  43. package/dist/docx/paraProps.d.ts +2 -2
  44. package/dist/docx/partPlan.d.ts +4 -4
  45. package/dist/docx/partPlanners.d.ts +2 -2
  46. package/dist/docx/protectionPolicy.d.ts +5 -5
  47. package/dist/docx/runProps.d.ts +4 -4
  48. package/dist/docx/scan.d.ts +1 -1
  49. package/dist/docx/sdt.d.ts +1 -1
  50. package/dist/docx/sections.d.ts +2 -2
  51. package/dist/docx/serializeBlock.d.ts +1 -1
  52. package/dist/docx/serializeParagraph.d.ts +1 -1
  53. package/dist/docx/serializePreserved.d.ts +3 -3
  54. package/dist/docx/serializeSdtBlock.d.ts +1 -1
  55. package/dist/docx/serializeStory.d.ts +2 -2
  56. package/dist/docx/serializeTable.d.ts +2 -2
  57. package/dist/docx/session.d.ts +9 -9
  58. package/dist/docx/story.d.ts +6 -6
  59. package/dist/docx/storyParts.d.ts +7 -7
  60. package/dist/docx/storyProjection.d.ts +1 -1
  61. package/dist/docx/tableFormatting/conditions.d.ts +2 -2
  62. package/dist/docx/tableFormatting/editing.d.ts +2 -2
  63. package/dist/docx/tableFormatting/reading.d.ts +5 -5
  64. package/dist/docx/tableFormatting.d.ts +3 -3
  65. package/dist/docx/tableTemplate.d.ts +2 -2
  66. package/dist/docx/wrappers.d.ts +2 -2
  67. package/dist/download.d.ts +2 -2
  68. package/dist/editor/clipboard/blockReaders.d.ts +3 -3
  69. package/dist/editor/clipboard/htmlReader.d.ts +4 -4
  70. package/dist/editor/clipboard/images.d.ts +1 -1
  71. package/dist/editor/clipboard/internalChannel.d.ts +3 -3
  72. package/dist/editor/clipboard/normalizers.d.ts +4 -4
  73. package/dist/editor/clipboard/parser.d.ts +2 -2
  74. package/dist/editor/clipboard/plugin.d.ts +2 -2
  75. package/dist/editor/clipboard/readContext.d.ts +4 -4
  76. package/dist/editor/clipboard/readers.d.ts +2 -2
  77. package/dist/editor/commands/commentCommands.d.ts +3 -3
  78. package/dist/editor/commands/comments/editing.d.ts +1 -1
  79. package/dist/editor/commands/comments/model.d.ts +1 -1
  80. package/dist/editor/commands/comments/reading.d.ts +1 -1
  81. package/dist/editor/commands/exportQueries.d.ts +2 -2
  82. package/dist/editor/commands/fidelityQueries.d.ts +2 -2
  83. package/dist/editor/commands/formatting/propertyCommands.d.ts +1 -1
  84. package/dist/editor/commands/formatting/reading.d.ts +2 -2
  85. package/dist/editor/commands/formatting/shared.d.ts +1 -1
  86. package/dist/editor/commands/formattingCommands.d.ts +2 -2
  87. package/dist/editor/commands/index.d.ts +39 -39
  88. package/dist/editor/commands/listCommands.d.ts +4 -4
  89. package/dist/editor/commands/noteCommands.d.ts +1 -1
  90. package/dist/editor/commands/noteQueries.d.ts +3 -3
  91. package/dist/editor/commands/paragraphCommands.d.ts +1 -1
  92. package/dist/editor/commands/spacingCommands.d.ts +1 -1
  93. package/dist/editor/createEditor.d.ts +6 -6
  94. package/dist/editor/documentStyles.d.ts +3 -3
  95. package/dist/editor/editorDocument.d.ts +6 -6
  96. package/dist/editor/formatSource.d.ts +1 -1
  97. package/dist/editor/imageFiles.d.ts +2 -2
  98. package/dist/editor/insertImage.d.ts +1 -1
  99. package/dist/editor/notes/noteSurface.d.ts +4 -4
  100. package/dist/editor/paragraphEdits.d.ts +2 -2
  101. package/dist/editor/paragraphPlacement.d.ts +1 -1
  102. package/dist/editor/plugins/commentComposer.d.ts +1 -1
  103. package/dist/editor/plugins/commentDecorations.d.ts +2 -2
  104. package/dist/editor/plugins/displayDerivation.d.ts +2 -2
  105. package/dist/editor/plugins/documentProtection.d.ts +2 -2
  106. package/dist/editor/plugins/keymap.d.ts +1 -1
  107. package/dist/editor/plugins/noteLifecycle.d.ts +1 -1
  108. package/dist/editor/plugins/noteNavigation.d.ts +1 -1
  109. package/dist/editor/plugins/noteNumbering.d.ts +1 -1
  110. package/dist/editor/plugins/numberingDecorations.d.ts +2 -2
  111. package/dist/editor/plugins/paragraphDisplay.d.ts +1 -1
  112. package/dist/editor/plugins/tabLayout.d.ts +1 -1
  113. package/dist/editor/plugins/tableDisplay.d.ts +1 -1
  114. package/dist/editor/stories/storyMarkup.d.ts +1 -1
  115. package/dist/editor/stories/storyState.d.ts +4 -4
  116. package/dist/editor/stories/storyView.d.ts +4 -4
  117. package/dist/editor/views/runMarkView.d.ts +1 -1
  118. package/dist/index.d.ts +26 -26
  119. package/dist/model/format.d.ts +1 -1
  120. package/dist/numbering/listRegistry.d.ts +1 -1
  121. package/dist/numbering/listTemplate.d.ts +1 -1
  122. package/dist/numbering/markers.d.ts +2 -2
  123. package/dist/numbering/parseNumbering.d.ts +5 -5
  124. package/dist/numbering/writeNumbering.d.ts +1 -1
  125. package/dist/ooxml/element.d.ts +1 -1
  126. package/dist/ooxml/partSplice.d.ts +2 -2
  127. package/dist/ooxml/precedence.d.ts +1 -1
  128. package/dist/ooxml/props.d.ts +1 -1
  129. package/dist/ooxml/simpleTypes.d.ts +1 -1
  130. package/dist/ooxml/tabStops.d.ts +1 -1
  131. package/dist/ooxml/tagScan.d.ts +1 -1
  132. package/dist/ooxml/units.d.ts +2 -2
  133. package/dist/ooxml/xml.d.ts +1 -1
  134. package/dist/page/PageGuides.d.ts +2 -2
  135. package/dist/page/blockKinds.d.ts +1 -1
  136. package/dist/page/demands/footnoteDemands.d.ts +1 -1
  137. package/dist/page/demands/index.d.ts +1 -1
  138. package/dist/page/kinds/index.d.ts +1 -1
  139. package/dist/page/kinds/paragraphKind.d.ts +1 -1
  140. package/dist/page/kinds/sdtBlockKind.d.ts +1 -1
  141. package/dist/page/kinds/tableKind.d.ts +1 -1
  142. package/dist/page/measureBlocks.d.ts +1 -1
  143. package/dist/page/pageDecorations.d.ts +3 -3
  144. package/dist/page/pageLayout.d.ts +4 -4
  145. package/dist/page/usePageLayout.d.ts +2 -2
  146. package/dist/schema/clipboard.d.ts +1 -1
  147. package/dist/schema/controlEdges.d.ts +1 -1
  148. package/dist/schema/displayDerivation.d.ts +1 -1
  149. package/dist/schema/docxSchema.d.ts +1 -1
  150. package/dist/schema/guards.d.ts +4 -4
  151. package/dist/schema/index.d.ts +5 -5
  152. package/dist/schema/locks.d.ts +1 -1
  153. package/dist/schema/preservedGuards.d.ts +1 -1
  154. package/dist/schema/protectionState.d.ts +1 -1
  155. package/dist/schema/rendering.d.ts +1 -1
  156. package/dist/styles/inlineStyle.d.ts +3 -3
  157. package/dist/styles/lineSpacings.d.ts +1 -1
  158. package/dist/table/cellBorders.d.ts +1 -1
  159. package/dist/table/cellFormatting.d.ts +3 -3
  160. package/dist/table/format.d.ts +1 -1
  161. package/dist/table/gridBorders.d.ts +2 -2
  162. package/dist/table/index.d.ts +5 -5
  163. package/dist/table/resize.d.ts +1 -1
  164. package/dist/table/widths.d.ts +1 -1
  165. package/dist/ui/AlignMenu.d.ts +2 -2
  166. package/dist/ui/CellStyleGroup.d.ts +3 -3
  167. package/dist/ui/ColorPicker.d.ts +1 -1
  168. package/dist/ui/CommentsPanel.d.ts +1 -1
  169. package/dist/ui/FontFamilySelect.d.ts +3 -3
  170. package/dist/ui/FontSizeSelect.d.ts +2 -2
  171. package/dist/ui/LinkCard.d.ts +1 -1
  172. package/dist/ui/ParagraphStyleSelect.d.ts +3 -3
  173. package/dist/ui/SpacingMenu.d.ts +2 -2
  174. package/dist/ui/TableMenu.d.ts +2 -2
  175. package/dist/ui/TableSizePicker.d.ts +1 -1
  176. package/dist/ui/TextMenu.d.ts +2 -2
  177. package/dist/ui/Toolbar.d.ts +4 -4
  178. package/dist/ui/ZoomSelect.d.ts +1 -1
  179. package/dist/ui/comments/CommentComposer.d.ts +1 -1
  180. package/dist/ui/comments/useCommentRailLayout.d.ts +1 -1
  181. package/dist/ui/noteItems.d.ts +1 -1
  182. package/dist/ui/notes/NoteAreas.d.ts +5 -5
  183. package/dist/ui/notes/NoteList.d.ts +3 -3
  184. package/dist/ui/notes/StoryRow.d.ts +5 -5
  185. package/dist/ui/notes/noteBands.d.ts +7 -7
  186. package/dist/ui/notes/noteHeights.d.ts +2 -2
  187. package/dist/ui/notes/useStorySurface.d.ts +5 -5
  188. package/dist/ui/presets.d.ts +3 -3
  189. package/package.json +5 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @portone/docx-editor
2
2
 
3
+ ## 0.6.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#240](https://github.com/portone-io/docx-editor/pull/240) [`f452989`](https://github.com/portone-io/docx-editor/commit/f452989ef7871fe0885273104dc570a6f15a9856) Thanks [@Deea222](https://github.com/Deea222)! - The type declarations now resolve in projects that use TypeScript's `node16` or `nodenext` module resolution.
8
+ Their relative imports left the file extension off, which those settings do not accept, so such a project got `any` for almost every export, or errors inside the package with `skipLibCheck` off.
9
+ Heads-up: code in such a project that was going unchecked is now typechecked against the package and may report type errors it had all along.
10
+
3
11
  ## 0.6.8
4
12
 
5
13
  ### Patch Changes
package/CONTRIBUTING.md CHANGED
@@ -56,9 +56,9 @@ A command added to `./commands` or `./table` needs a writer probe in `src/docx/_
56
56
 
57
57
  ## Changesets
58
58
 
59
- If you changed production code under `src/`, run `pnpm changeset` and commit the file it writes.
59
+ If you changed production code under `src/`, or anything else that changes what the build puts in `dist/`, such as the build scripts, run `pnpm changeset` and commit the file it writes.
60
60
  It becomes the CHANGELOG entry, so write it for someone reading release notes rather than the diff.
61
- Changes limited to tests, fixtures, scripts, or documentation do not need a changeset.
61
+ Other changes limited to tests, fixtures, scripts, or documentation do not need a changeset.
62
62
 
63
63
  The public API is the exported names and types of the four entry points - `.`, `./core`, `./commands`, and `./table` - together with the parts of the document model that [What a plugin may rely on](https://docx-editor.portone.io/docs/editor-api/plugins-and-presets#what-a-plugin-may-rely-on) calls stable.
64
64
  An attr that page calls internal is not part of it, and neither is anything under `src/` that no entry point reaches.
@@ -10,15 +10,15 @@
10
10
  import type { Plugin } from "prosemirror-state";
11
11
  import type { EditorView } from "prosemirror-view";
12
12
  import { type CSSProperties, type ReactNode } from "react";
13
- import { type DocxSource } from "./docx/importDocx";
14
- import { type ExportProblem } from "./docx/invariants";
15
- import type { CommentAuthor } from "./editor/commands/commentCommands";
16
- import type { EditRefusal } from "./editor/editRefusal";
17
- import { DocxImportError } from "./ooxml/errors";
18
- import type { EditableComments } from "./schema/protection";
19
- import type { FontFallbacks } from "./styles/fontStack";
20
- import type { DocxEditorPresets } from "./ui/presets";
21
- import { type DocxEditorZoom } from "./ui/zoom";
13
+ import { type DocxSource } from "./docx/importDocx.js";
14
+ import { type ExportProblem } from "./docx/invariants.js";
15
+ import type { CommentAuthor } from "./editor/commands/commentCommands.js";
16
+ import type { EditRefusal } from "./editor/editRefusal.js";
17
+ import { DocxImportError } from "./ooxml/errors.js";
18
+ import type { EditableComments } from "./schema/protection.js";
19
+ import type { FontFallbacks } from "./styles/fontStack.js";
20
+ import type { DocxEditorPresets } from "./ui/presets.js";
21
+ import { type DocxEditorZoom } from "./ui/zoom.js";
22
22
  export interface DocxEditorHandle {
23
23
  view: EditorView;
24
24
  /** Turns the editor state currently on screen into docx bytes */
package/dist/core.d.ts CHANGED
@@ -7,46 +7,46 @@
7
7
  * `no-xml-parser`.
8
8
  */
9
9
  import type { Node as PMNode } from "prosemirror-model";
10
- import type { FidelityNote } from "./docx/fidelity";
11
- import { type DocxBytes, type ImportOptions } from "./docx/importDocx";
12
- import type { DocxSession } from "./docx/session";
13
- export type { CommentOnlyVerdict } from "./docx/commentOnlyChange";
14
- export { onlyCommentsChangedBy } from "./docx/commentOnlyChange";
10
+ import type { FidelityNote } from "./docx/fidelity.js";
11
+ import { type DocxBytes, type ImportOptions } from "./docx/importDocx.js";
12
+ import type { DocxSession } from "./docx/session.js";
13
+ export type { CommentOnlyVerdict } from "./docx/commentOnlyChange.js";
14
+ export { onlyCommentsChangedBy } from "./docx/commentOnlyChange.js";
15
15
  /**
16
16
  * What differs between two files, block by block, for the case where knowing that something
17
17
  * changed is not enough. Each block change carries the `pos` a reader can select it by.
18
18
  */
19
- export type { BlockChange, BlockKind, CommentChange, DocxComparison, PartChange, RowChange, } from "./docx/compareDocx";
20
- export { compareDocx } from "./docx/compareDocx";
21
- export type { ExportOptions } from "./docx/exportDocx";
22
- export { exportDocx, exportDocxReport } from "./docx/exportDocx";
23
- export type { FidelityCode, FidelityNote, FidelitySeverity, } from "./docx/fidelity";
24
- export type { ParagraphStyleOption } from "./docx/formatting";
25
- export type { DocxBytes, ImportOptions } from "./docx/importDocx";
19
+ export type { BlockChange, BlockKind, CommentChange, DocxComparison, PartChange, RowChange, } from "./docx/compareDocx.js";
20
+ export { compareDocx } from "./docx/compareDocx.js";
21
+ export type { ExportOptions } from "./docx/exportDocx.js";
22
+ export { exportDocx, exportDocxReport } from "./docx/exportDocx.js";
23
+ export type { FidelityCode, FidelityNote, FidelitySeverity, } from "./docx/fidelity.js";
24
+ export type { ParagraphStyleOption } from "./docx/formatting.js";
25
+ export type { DocxBytes, ImportOptions } from "./docx/importDocx.js";
26
26
  /**
27
27
  * What the writer would refuse the document over, asked ahead of the write. The first entry is
28
28
  * what `exportDocx` throws, so the two cannot disagree. `reason` tells the situations one code
29
29
  * covers apart and names the content each is about.
30
30
  */
31
- export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./docx/invariants";
32
- export { exportProblems } from "./docx/invariants";
33
- export type { DocxSession } from "./docx/session";
34
- export { documentNumbering, documentPartPath } from "./docx/session";
35
- export type { TextEdit } from "./docx/textDiff";
36
- export type { CellFormat, CellVerticalAlign, DocumentDefaults, HighlightName, LineSpacing, NumberingRef, ParagraphAlign, ParagraphFormat, RowFormat, RowHeight, RunFormat, TableFormat, TableWidth, TableWidthType, UnderlineKind, VerticalAlign, } from "./model/format";
37
- export { toCellFormat, toParagraphFormat, toRowFormat, toRunFormat, toTableFormat, toTableWidth, } from "./model/format";
38
- export type { LevelAlign, LevelIndent, LevelSuffix, NewList, NewListLevel, NumberFormat, Numbering, NumberingLevel, NumberingList, NumberingOptions, NumberingStyleLinks, ReadLevelRun, } from "./numbering/parseNumbering";
39
- export { parseNumbering } from "./numbering/parseNumbering";
40
- export type { DocxExportErrorCode, DocxExportErrorOptions, DocxImportErrorCode, } from "./ooxml/errors";
41
- export { DocxExportError, DocxImportError } from "./ooxml/errors";
31
+ export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "./docx/invariants.js";
32
+ export { exportProblems } from "./docx/invariants.js";
33
+ export type { DocxSession } from "./docx/session.js";
34
+ export { documentNumbering, documentPartPath } from "./docx/session.js";
35
+ export type { TextEdit } from "./docx/textDiff.js";
36
+ export type { CellFormat, CellVerticalAlign, DocumentDefaults, HighlightName, LineSpacing, NumberingRef, ParagraphAlign, ParagraphFormat, RowFormat, RowHeight, RunFormat, TableFormat, TableWidth, TableWidthType, UnderlineKind, VerticalAlign, } from "./model/format.js";
37
+ export { toCellFormat, toParagraphFormat, toRowFormat, toRunFormat, toTableFormat, toTableWidth, } from "./model/format.js";
38
+ export type { LevelAlign, LevelIndent, LevelSuffix, NewList, NewListLevel, NumberFormat, Numbering, NumberingLevel, NumberingList, NumberingOptions, NumberingStyleLinks, ReadLevelRun, } from "./numbering/parseNumbering.js";
39
+ export { parseNumbering } from "./numbering/parseNumbering.js";
40
+ export type { DocxExportErrorCode, DocxExportErrorOptions, DocxImportErrorCode, } from "./ooxml/errors.js";
41
+ export { DocxExportError, DocxImportError } from "./ooxml/errors.js";
42
42
  /**
43
43
  * An image node's size is written in EMU, the unit the document itself uses. A builder
44
44
  * that places an image is working in pixels, so the conversion ships with the type.
45
45
  */
46
- export type { ImageExtent } from "./ooxml/image";
47
- export { emuToPx, pxToEmu, toImageExtent } from "./ooxml/image";
48
- export type { XmlParser } from "./ooxml/xml";
49
- export { docxSchema } from "./schema";
46
+ export type { ImageExtent } from "./ooxml/image.js";
47
+ export { emuToPx, pxToEmu, toImageExtent } from "./ooxml/image.js";
48
+ export type { XmlParser } from "./ooxml/xml.js";
49
+ export { docxSchema } from "./schema/index.js";
50
50
  /**
51
51
  * Opens docx bytes into the document to work on, the session that remembers the file they came
52
52
  * from, and what the file holds that this editor could not model.
@@ -7,9 +7,9 @@
7
7
  * free to rewrite anything the story does not carry - the paper the document is written on, its
8
8
  * styles, its headers - and a document comparison would see none of it.
9
9
  */
10
- import type { XmlParser } from "../ooxml/xml";
11
- import type { EditableComments } from "../schema/protection";
12
- import type { DocxBytes } from "./importDocx";
10
+ import type { XmlParser } from "../ooxml/xml.js";
11
+ import type { EditableComments } from "../schema/protection.js";
12
+ import type { DocxBytes } from "./importDocx.js";
13
13
  /**
14
14
  * Why a file is not the one it claims to be. `part-changed`, `relationship-changed` and
15
15
  * `comment-markup-rejected` name the part they were reached over; `body-changed`,
@@ -3,10 +3,10 @@
3
3
  * (`spec/notes/comments.md`). Only entries of comments written or deleted here change.
4
4
  */
5
5
  import type { Node as PMNode } from "prosemirror-model";
6
- import { type RootDeclarations } from "../../ooxml/partSplice";
7
- import { type PartPlanContext } from "../partPlan";
8
- import type { SessionStore } from "../session";
9
- import { type DurablePartShape } from "./parts";
6
+ import { type RootDeclarations } from "../../ooxml/partSplice.js";
7
+ import { type PartPlanContext } from "../partPlan.js";
8
+ import type { SessionStore } from "../session.js";
9
+ import { type DurablePartShape } from "./parts.js";
10
10
  type DurablePartName = DurablePartShape["name"];
11
11
  export declare function planDurableParts(doc: PMNode, session: SessionStore, context: PartPlanContext): ReadonlyMap<string, Uint8Array>;
12
12
  /** A part that arrived and the planner rewrites, as the export invariants read it */
@@ -7,8 +7,8 @@
7
7
  * producer wrote and shows what it can; this one judges an entry that came back and says no to
8
8
  * everything else.
9
9
  */
10
- import { type XmlAttr } from "../../ooxml/element";
11
- import type { CommentReferenceData, CommentReplyData } from "./model";
10
+ import { type XmlAttr } from "../../ooxml/element.js";
11
+ import type { CommentReferenceData, CommentReplyData } from "./model.js";
12
12
  /** The attributes this editor writes on a `w:comment`. The thread key goes on the body's paragraph */
13
13
  export declare const COMMENT_ATTRIBUTES: ReadonlySet<string>;
14
14
  /** The attributes this editor writes on a `w15:commentEx` */
@@ -2,7 +2,7 @@
2
2
  * Maps imported comment threads to and from ProseMirror reference data.
3
3
  */
4
4
  import type { Node as PMNode } from "prosemirror-model";
5
- import type { ImportedComments } from "./reading";
5
+ import type { ImportedComments } from "./reading.js";
6
6
  /**
7
7
  * A comment as the reference node in the story carries it: who wrote it, where its thread state
8
8
  * hangs, and the replies under it. What it says is not here - a body is a story of its own, held
@@ -11,12 +11,12 @@
11
11
  * have made the change. Asking them as one would refuse a moderator rewriting somebody else's
12
12
  * comment under `editableComments: "all"`, which is a thing the editor lets them do.
13
13
  */
14
- import { type EditableComments } from "../../schema/protection";
15
- import type { JudgedPackages, PolicyOptions, StoryPartKind } from "../protectionPolicy";
16
- import type { SessionStore } from "../session";
17
- import { type Story } from "../storyProjection";
18
- import { type ImportedPeople } from "./people";
19
- import { type ImportedCommentPart } from "./reading";
14
+ import { type EditableComments } from "../../schema/protection.js";
15
+ import type { JudgedPackages, PolicyOptions, StoryPartKind } from "../protectionPolicy.js";
16
+ import type { SessionStore } from "../session.js";
17
+ import { type Story } from "../storyProjection.js";
18
+ import { type ImportedPeople } from "./people.js";
19
+ import { type ImportedCommentPart } from "./reading.js";
20
20
  /**
21
21
  * Whether this editor's writer could have put the entry out, whoever it belongs to.
22
22
  *
@@ -11,10 +11,10 @@
11
11
  * A name the file's comments already write under carries the same weight, recorded or not: a
12
12
  * person appended for it would claim those comments too.
13
13
  */
14
- import { type PartPlanContext } from "../partPlan";
15
- import type { StoryPartKind } from "../protectionPolicy";
16
- import type { SessionStore } from "../session";
17
- import type { CommentReferenceData, CommentReplyData } from "./model";
14
+ import { type PartPlanContext } from "../partPlan.js";
15
+ import type { StoryPartKind } from "../protectionPolicy.js";
16
+ import type { SessionStore } from "../session.js";
17
+ import type { CommentReferenceData, CommentReplyData } from "./model.js";
18
18
  export interface ImportedPeople {
19
19
  partPath: string | null;
20
20
  xml: string | null;
@@ -3,5 +3,5 @@
3
3
  * the server verifier read (`../protectionPolicy`).
4
4
  */
5
5
  type StoryReason = "body-changed" | "comment-not-owned" | "comment-author-forged";
6
- export declare const commentsPolicy: import("../protectionPolicy").ProtectionPolicy<StoryReason, "comment-markup-rejected">;
6
+ export declare const commentsPolicy: import("../protectionPolicy.js").ProtectionPolicy<StoryReason, "comment-markup-rejected">;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Reads comment and comment-extension package parts.
3
3
  */
4
- import { type ImportedPeople } from "./people";
4
+ import { type ImportedPeople } from "./people.js";
5
5
  /**
6
6
  * One entry of the Comments part as it arrived, everything about it but what it says: that is a
7
7
  * story of its own, sliced and read the way a body block is (`docx/story`).
@@ -2,9 +2,9 @@
2
2
  * Plans changed comment package parts while preserving untouched XML.
3
3
  */
4
4
  import type { Node as PMNode } from "prosemirror-model";
5
- import { type RootDeclarations } from "../../ooxml/partSplice";
6
- import type { PartPlanner } from "../partPlan";
7
- import type { SessionStore } from "../session";
5
+ import { type RootDeclarations } from "../../ooxml/partSplice.js";
6
+ import type { PartPlanner } from "../partPlan.js";
7
+ import type { SessionStore } from "../session.js";
8
8
  /**
9
9
  * Whether the Comments part has to be rewritten: a comment or reply came, went, or changed, or an
10
10
  * entry has to gain the key its thread state hangs off. The export invariants ask this as well, so
@@ -1,3 +1,3 @@
1
- export * from "./comments/model";
2
- export * from "./comments/reading";
3
- export * from "./comments/writing";
1
+ export * from "./comments/model.js";
2
+ export * from "./comments/reading.js";
3
+ export * from "./comments/writing.js";
@@ -8,9 +8,9 @@
8
8
  * which is the comparison the returned-file verifier holds a story to, and the package around
9
9
  * them is read through the verifier's own pieces (`./protectionPolicy`).
10
10
  */
11
- import { type XmlParser } from "../ooxml/xml";
12
- import { type DocxBytes } from "./importDocx";
13
- import { type TextEdit } from "./textDiff";
11
+ import { type XmlParser } from "../ooxml/xml.js";
12
+ import { type DocxBytes } from "./importDocx.js";
13
+ import { type TextEdit } from "./textDiff.js";
14
14
  /** What stands at the top level of a body: `control` is a block-level content control, `preserved` a block kept as the XML it arrived as */
15
15
  export type BlockKind = "paragraph" | "table" | "control" | "preserved";
16
16
  /** A row of a changed table: an added row by its index in the revised table, a removed one by its index in the original */
@@ -13,10 +13,10 @@
13
13
  * they cannot pick the same one.
14
14
  */
15
15
  import type { Node as PMNode } from "prosemirror-model";
16
- import { type XmlParser } from "../ooxml/xml";
17
- import { type FidelityNote } from "./fidelity";
18
- import { type PartPlanner } from "./partPlan";
19
- import { type DocxSession } from "./session";
16
+ import { type XmlParser } from "../ooxml/xml.js";
17
+ import { type FidelityNote } from "./fidelity.js";
18
+ import { type PartPlanner } from "./partPlan.js";
19
+ import { type DocxSession } from "./session.js";
20
20
  /** What a caller may say about a write beyond handing over the document and its session */
21
21
  export interface ExportOptions {
22
22
  /**
@@ -9,10 +9,10 @@
9
9
  * among them because a preserved block names the fragment it stands for wherever it ends up: an
10
10
  * edit may move one into a table cell, and the cell writer has no other way to reach the original.
11
11
  */
12
- import { type FidelityCollector } from "./fidelity";
13
- import { type LinkRefs } from "./hyperlink";
14
- import { type ImageRefs } from "./media";
15
- import type { SessionStore } from "./session";
12
+ import { type FidelityCollector } from "./fidelity.js";
13
+ import { type LinkRefs } from "./hyperlink.js";
14
+ import { type ImageRefs } from "./media.js";
15
+ import type { SessionStore } from "./session.js";
16
16
  export interface ExportRefs {
17
17
  images: ImageRefs;
18
18
  links: LinkRefs;
@@ -5,9 +5,9 @@
5
5
  * them last touched it.
6
6
  */
7
7
  import { type Mark, type Node as PMNode } from "prosemirror-model";
8
- import { type ParagraphFormat, type RunFormat } from "../../model/format";
9
- import type { FormattingContext } from "./context";
10
- import { type ParagraphPlacement, type ResolvedParagraph } from "./resolve";
8
+ import { type ParagraphFormat, type RunFormat } from "../../model/format.js";
9
+ import type { FormattingContext } from "./context.js";
10
+ import { type ParagraphPlacement, type ResolvedParagraph } from "./resolve.js";
11
11
  /** The two derived paragraph attrs (`format` and `styleRun` in `schema`) */
12
12
  export interface ParagraphAttrs {
13
13
  format: ParagraphFormat | null;
@@ -37,9 +37,9 @@ export declare function runMarkUnder(mark: Mark | null, isText: boolean, paragra
37
37
  export declare function styledParagraph(node: PMNode, context: FormattingContext, placement?: ParagraphPlacement | null): PMNode;
38
38
  /** Table display inputs, refreshed from the same style context as the paragraphs inside it. */
39
39
  export declare function tableStyleAttrs(tblPr: Element | null, context: FormattingContext): {
40
- format: import("../..").TableFormat | null;
41
- styleInside: import("../tableFormatting").InsideBorders | null;
42
- styleCellMargins: import("../tableFormatting").CellMargins | null;
43
- styleConditions: Readonly<Partial<Record<"band1Horz" | "band1Vert" | "band2Horz" | "band2Vert" | "firstCol" | "firstRow" | "lastCol" | "lastRow" | "neCell" | "nwCell" | "seCell" | "swCell" | "wholeTable", import("../tableFormatting").CellStyleFormat>>> | null;
44
- styleBands: import("../tableFormatting").BandSizes | null;
40
+ format: import("../../index.js").TableFormat | null;
41
+ styleInside: import("../tableFormatting.js").InsideBorders | null;
42
+ styleCellMargins: import("../tableFormatting.js").CellMargins | null;
43
+ styleConditions: Readonly<Partial<Record<"band1Horz" | "band1Vert" | "band2Horz" | "band2Vert" | "firstCol" | "firstRow" | "lastCol" | "lastRow" | "neCell" | "nwCell" | "seCell" | "swCell" | "wholeTable", import("../tableFormatting.js").CellStyleFormat>>> | null;
44
+ styleBands: import("../tableFormatting.js").BandSizes | null;
45
45
  };
@@ -1,9 +1,9 @@
1
- import type { RunFormat } from "../../model/format";
2
- import { type Numbering, type NumberingOptions } from "../../numbering/parseNumbering";
3
- import { type CompatSettings } from "../documentSettings";
4
- import { type ThemeFonts } from "../theme";
5
- import { type StyleTable } from "./styles";
6
- import type { ParagraphFormatLayer } from "./tabStops";
1
+ import type { RunFormat } from "../../model/format.js";
2
+ import { type Numbering, type NumberingOptions } from "../../numbering/parseNumbering.js";
3
+ import { type CompatSettings } from "../documentSettings.js";
4
+ import { type ThemeFonts } from "../theme.js";
5
+ import { type StyleTable } from "./styles.js";
6
+ import type { ParagraphFormatLayer } from "./tabStops.js";
7
7
  /**
8
8
  * Everything a document lays down that the §17.7.2 hierarchy is resolved against.
9
9
  *
@@ -5,9 +5,9 @@
5
5
  * What goes back into the document is always the original XML string, so no matter what is read
6
6
  * here, export is undisturbed.
7
7
  */
8
- import { type DocumentDefaults, type LineSpacing, type RunFormat } from "../../model/format";
9
- import { type ThemeFonts } from "../theme";
10
- import type { ParagraphFormatLayer } from "./tabStops";
8
+ import { type DocumentDefaults, type LineSpacing, type RunFormat } from "../../model/format.js";
9
+ import { type ThemeFonts } from "../theme.js";
10
+ import type { ParagraphFormatLayer } from "./tabStops.js";
11
11
  /** `w:spacing/@line` counts an automatic line height in 240ths of a line (§17.3.1.33) */
12
12
  export declare const LINE_UNITS_PER_LINE = 240;
13
13
  /**
@@ -5,11 +5,11 @@
5
5
  * same whichever path asked for them: opening the document, an edit, a paste, or a paragraph an
6
6
  * edit built from nothing.
7
7
  */
8
- import { type ParagraphFormat, type RunFormat } from "../../model/format";
9
- import type { TabStop } from "../../model/tabStops";
10
- import type { TableStyleOverrideType } from "../tableFormatting";
11
- import type { FormattingContext } from "./context";
12
- import { type StyleFormat } from "./styles";
8
+ import { type ParagraphFormat, type RunFormat } from "../../model/format.js";
9
+ import type { TabStop } from "../../model/tabStops.js";
10
+ import type { TableStyleOverrideType } from "../tableFormatting.js";
11
+ import type { FormattingContext } from "./context.js";
12
+ import { type StyleFormat } from "./styles.js";
13
13
  /** Where a paragraph sits when it is inside a table cell. null for body text */
14
14
  export interface ParagraphPlacement {
15
15
  /** What the table's `w:tblStyle` names. null for a table naming none, which wears the default one */
@@ -10,9 +10,9 @@
10
10
  * The values read are for display only. What goes back into the document is the rPr string, and
11
11
  * a write is a list of children swapped into it (`ooxml/props`), never a tree serialized again.
12
12
  */
13
- import { type RunFormat } from "../../model/format";
14
- import { type Props } from "../../ooxml/props";
15
- import { type ThemeFonts } from "../theme";
13
+ import { type RunFormat } from "../../model/format.js";
14
+ import { type Props } from "../../ooxml/props.js";
15
+ import { type ThemeFonts } from "../theme.js";
16
16
  /** What text one child of the rPr is to be changed to. A null xml removes that child */
17
17
  export type ChildEdit = readonly [name: string, xml: string | null];
18
18
  /** What an edit is written against: the rPr as it stands, and everything the layers below the run lay down */
@@ -1,9 +1,9 @@
1
1
  /** Reads and layers styles.xml values used by the display model. */
2
- import { type BandSizes, type CellMargins, type InsideBorders, type ParagraphFormat, type RunFormat, type TableFormat, type TableStyleOverrideType } from "../../model/format";
3
- import type { NumberingStyleLinks } from "../../numbering/parseNumbering";
4
- import { type ConditionalTableFormat } from "../tableFormatting";
5
- import { type ThemeFonts } from "../theme";
6
- import { type ParagraphFormatLayer } from "./tabStops";
2
+ import { type BandSizes, type CellMargins, type InsideBorders, type ParagraphFormat, type RunFormat, type TableFormat, type TableStyleOverrideType } from "../../model/format.js";
3
+ import type { NumberingStyleLinks } from "../../numbering/parseNumbering.js";
4
+ import { type ConditionalTableFormat } from "../tableFormatting.js";
5
+ import { type ThemeFonts } from "../theme.js";
6
+ import { type ParagraphFormatLayer } from "./tabStops.js";
7
7
  /** The kind of object a style dresses (`w:style/@w:type`, ST_StyleType) */
8
8
  export type StyleType = "paragraph" | "character" | "table" | "numbering";
9
9
  /** What a table style dresses each part of a table with, by the part it covers */
@@ -1,5 +1,5 @@
1
- import { type ParagraphFormat } from "../../model/format";
2
- import { type TabStopDirective } from "../../model/tabStops";
1
+ import { type ParagraphFormat } from "../../model/format.js";
2
+ import { type TabStopDirective } from "../../model/tabStops.js";
3
3
  export type ParagraphFormatLayer = Omit<ParagraphFormat, "numbering" | "tabStops"> & {
4
4
  numbering?: ParagraphFormat["numbering"] | null;
5
5
  tabStops?: readonly TabStopDirective[];
@@ -1,7 +1,7 @@
1
- export * from "./formatting/attrs";
2
- export * from "./formatting/context";
3
- export * from "./formatting/direct";
4
- export * from "./formatting/resolve";
5
- export * from "./formatting/runProperties";
6
- export * from "./formatting/styles";
7
- export type { ParagraphFormatLayer } from "./formatting/tabStops";
1
+ export * from "./formatting/attrs.js";
2
+ export * from "./formatting/context.js";
3
+ export * from "./formatting/direct.js";
4
+ export * from "./formatting/resolve.js";
5
+ export * from "./formatting/runProperties.js";
6
+ export * from "./formatting/styles.js";
7
+ export type { ParagraphFormatLayer } from "./formatting/tabStops.js";
@@ -11,12 +11,12 @@
11
11
  * variants, so the second section of a document draws its own header and not the first section's.
12
12
  */
13
13
  import type { Node as PMNode } from "prosemirror-model";
14
- import { type ParagraphAlign } from "../model/format";
15
- import { type RootDeclarations } from "../ooxml/partSplice";
16
- import { type StoryKey } from "../schema/stories";
17
- import type { PartPlanner } from "./partPlan";
18
- import { type DocumentSection } from "./sections";
19
- import { type ImportedStory, type StoryDeps } from "./story";
14
+ import { type ParagraphAlign } from "../model/format.js";
15
+ import { type RootDeclarations } from "../ooxml/partSplice.js";
16
+ import { type StoryKey } from "../schema/stories.js";
17
+ import type { PartPlanner } from "./partPlan.js";
18
+ import { type DocumentSection } from "./sections.js";
19
+ import { type ImportedStory, type StoryDeps } from "./story.js";
20
20
  /** One story a section may show, as the document currently says it */
21
21
  export interface HeaderFooterContent {
22
22
  story: PMNode;
@@ -10,7 +10,7 @@
10
10
  * so `w:tooltip`, `w:history`, `w:docLocation` and anything else we never read go back out
11
11
  * untouched.
12
12
  */
13
- import { type RelationshipWriter } from "./relationships";
13
+ import { type RelationshipWriter } from "./relationships.js";
14
14
  export interface HyperlinkWrapper {
15
15
  /** The `<w:hyperlink>` opening tag as it came */
16
16
  prefix: string;
@@ -22,7 +22,7 @@
22
22
  * up in bytes nothing rewrites.
23
23
  */
24
24
  import { type Node as PMNode } from "prosemirror-model";
25
- import { type DocxExportErrorCode } from "../ooxml/errors";
25
+ import { type DocxExportErrorCode } from "../ooxml/errors.js";
26
26
  export interface IdentityRule {
27
27
  readonly name: string;
28
28
  /**
@@ -4,9 +4,9 @@
4
4
  * This module knows nothing about the screen. All it knows is the file and the document model.
5
5
  */
6
6
  import type { Node as PMNode } from "prosemirror-model";
7
- import { type XmlParser } from "../ooxml/xml";
8
- import { type FidelityNote } from "./fidelity";
9
- import { SessionStore } from "./session";
7
+ import { type XmlParser } from "../ooxml/xml.js";
8
+ import { type FidelityNote } from "./fidelity.js";
9
+ import { SessionStore } from "./session.js";
10
10
  /** A docx file as bytes, however it arrived (file input, fetch, filesystem) */
11
11
  export type DocxBytes = ArrayBuffer | Uint8Array;
12
12
  /**
@@ -20,10 +20,10 @@
20
20
  * needs.
21
21
  */
22
22
  import type { Node as PMNode } from "prosemirror-model";
23
- import { type ImportedComments } from "./comments/reading";
24
- import { type LinkTargets } from "./hyperlink";
25
- import type { ImageSources } from "./media";
26
- import { type ThemeFonts } from "./theme";
23
+ import { type ImportedComments } from "./comments/reading.js";
24
+ import { type LinkTargets } from "./hyperlink.js";
25
+ import type { ImageSources } from "./media.js";
26
+ import { type ThemeFonts } from "./theme.js";
27
27
  /**
28
28
  * What the body is read with: the images its drawings can point at, the fonts a theme reference
29
29
  * resolves to, the addresses its links can point at, and the comments its references name.
@@ -17,7 +17,7 @@
17
17
  * wrapper under `tr`, a row wrapper under `tbl`, and a block container under the body. Keys are
18
18
  * Clark names (`{namespace}localName`) so that `m:oMath` and `w:sdt` sit in one map.
19
19
  */
20
- import type { PreservedDisplay } from "../schema";
20
+ import type { PreservedDisplay } from "../schema/index.js";
21
21
  export type { PreservedDisplay };
22
22
  export type PreservationTier =
23
23
  /** A reader turns it into an editable node */
@@ -7,7 +7,7 @@
7
7
  * what a chip shows or which fragments a guard answers for.
8
8
  */
9
9
  import type { Mark, Node as PMNode } from "prosemirror-model";
10
- import { type DemotionPolicy, type ElementPolicy, type PreservationRule, type PreservingLevel } from "./importPolicy";
10
+ import { type DemotionPolicy, type ElementPolicy, type PreservationRule, type PreservingLevel } from "./importPolicy.js";
11
11
  /**
12
12
  * The rule an element is kept under.
13
13
  *
@@ -3,7 +3,7 @@
3
3
  * values for display. Unsupported grids return null so the caller can preserve their source XML.
4
4
  */
5
5
  import type { Node as PMNode } from "prosemirror-model";
6
- import { type FormattingContext } from "./formatting";
7
- import { type ImportSources } from "./importParagraph";
6
+ import { type FormattingContext } from "./formatting.js";
7
+ import { type ImportSources } from "./importParagraph.js";
8
8
  /** Moves a `<w:tbl>` into a table node. null if it cannot be modelled */
9
9
  export declare function buildTable(el: Element, srcId: string | null, sources?: ImportSources, context?: FormattingContext): PMNode | null;
@@ -18,10 +18,10 @@
18
18
  * and `assertPartsParse` in `./partPlan` remain the final checks over the parts as actually written.
19
19
  */
20
20
  import type { Node as PMNode } from "prosemirror-model";
21
- import type { ExportProblem } from "../ooxml/errors";
22
- import type { ExportOptions } from "./exportDocx";
23
- import { type DocxSession, type SessionStore } from "./session";
24
- export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "../ooxml/errors";
21
+ import type { ExportProblem } from "../ooxml/errors.js";
22
+ import type { ExportOptions } from "./exportDocx.js";
23
+ import { type DocxSession, type SessionStore } from "./session.js";
24
+ export type { ExportPartName, ExportProblem, ExportProblemReason, ExportProblemStory, ExportStoryKind, } from "../ooxml/errors.js";
25
25
  /** The problems as the writer sees them, for a caller already inside the writer's parser scope */
26
26
  export declare function problemsOf(doc: PMNode, session: SessionStore): readonly ExportProblem[];
27
27
  /**
@@ -3,8 +3,8 @@
3
3
  * bytes without blob-URL lifetime management; `MAX_IMAGE_BYTES` bounds the memory tradeoff.
4
4
  */
5
5
  import type { Node as PMNode } from "prosemirror-model";
6
- import type { PartPlanContext } from "./partPlan";
7
- import type { SessionStore } from "./session";
6
+ import type { PartPlanContext } from "./partPlan.js";
7
+ import type { SessionStore } from "./session.js";
8
8
  /** The images the body can refer to, as data URLs keyed by relationship id */
9
9
  export type ImageSources = ReadonlyMap<string, string>;
10
10
  export declare const NO_IMAGES: ImageSources;
@@ -5,8 +5,8 @@
5
5
  * writer rather than being read off it.
6
6
  */
7
7
  import type { Node as PMNode } from "prosemirror-model";
8
- import { type NewList } from "../numbering/parseNumbering";
9
- import type { SessionStore } from "./session";
8
+ import { type NewList } from "../numbering/parseNumbering.js";
9
+ import type { SessionStore } from "./session.js";
10
10
  /**
11
11
  * How the main part relates the numbering part, and what the package declares that part to hold.
12
12
  *
@@ -5,9 +5,9 @@
5
5
  * entry of their own, which is why a copy names none of the blocks its original was read from.
6
6
  */
7
7
  import { type Node as PMNode } from "prosemirror-model";
8
- import { type NoteKind, type StoryKey } from "../../schema/stories";
9
- import type { FormattingContext } from "../formatting";
10
- import { type SessionStore } from "../session";
8
+ import { type NoteKind, type StoryKey } from "../../schema/stories.js";
9
+ import type { FormattingContext } from "../formatting.js";
10
+ import { type SessionStore } from "../session.js";
11
11
  /**
12
12
  * The elements that stand for a note's own number inside its entry, which is what Word draws the
13
13
  * number from and what a note that keeps its number keeps (`editor/notes/noteSurface`).