@portone/docx-editor 0.6.7 → 0.6.8

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @portone/docx-editor
2
2
 
3
+ ## 0.6.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#219](https://github.com/portone-io/docx-editor/pull/219) [`7271f4b`](https://github.com/portone-io/docx-editor/commit/7271f4b5ce80b0acbad84f28ae04b24d2807e57d) Thanks [@Deea222](https://github.com/Deea222)! - With prosemirror-view 1.42.6, typing with an IME at the start of a footnote or endnote (in front of its number) or over a bookmark broke, and a page break opened an empty line in front of itself; both behave as before again.
8
+
3
9
  ## 0.6.7
4
10
 
5
11
  ### Patch Changes
@@ -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,
package/dist/styles.css CHANGED
@@ -10,6 +10,19 @@
10
10
 
11
11
  @import "prosemirror-view/style/prosemirror.css";
12
12
 
13
+ /*
14
+ * prosemirror-view 1.42.6 puts a buffer image in front of inline atoms. It opens an empty line
15
+ * in front of block-level page spaces, and on Chrome it breaks IME composition over note marks
16
+ * and bookmark markers. The end-of-line separator before the trailing break and the cursor
17
+ * wrapper (mark-placeholder) stay.
18
+ */
19
+ :is(.docx-editor-sheet, .docx-editor-story-body)
20
+ img.ProseMirror-separator:not([mark-placeholder]):has(
21
+ + :not(br.ProseMirror-trailingBreak)
22
+ ) {
23
+ display: none !important;
24
+ }
25
+
13
26
  /* The height is usually decided by the host UI, so this is written to let the app's own class win */
14
27
  :where(.docx-editor-frame) {
15
28
  height: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portone/docx-editor",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "A simple DOCX editor for React, built directly on OOXML.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -73,10 +73,10 @@
73
73
  "react": ">=18"
74
74
  },
75
75
  "devDependencies": {
76
- "@biomejs/biome": "2.5.14",
76
+ "@biomejs/biome": "2.6.6",
77
77
  "@changesets/changelog-github": "^1.0.0",
78
78
  "@changesets/cli": "^3.0.1",
79
- "@microsoft/api-extractor": "7.59.2",
79
+ "@microsoft/api-extractor": "7.59.4",
80
80
  "@playwright/test": "^1.62.1",
81
81
  "@types/jsdom": "^30.0.0",
82
82
  "@types/node": "^26.2.0",