@beyondwork/docx-react-component 1.0.98 → 1.0.100

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beyondwork/docx-react-component",
3
3
  "publisher": "beyondwork",
4
- "version": "1.0.98",
4
+ "version": "1.0.100",
5
5
  "description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -204,6 +204,14 @@
204
204
  "ci-check:headless-example-imports": "node scripts/ci-check-headless-example-imports.mjs",
205
205
  "ci-check:no-legacy-presentation": "node scripts/ci-check-no-legacy-presentation.mjs",
206
206
  "ci-check:layer-11-boundary": "node scripts/ci-check-layer-11-boundary.mjs",
207
- "ci-check:layer-11-boundary:update": "node scripts/ci-check-layer-11-boundary.mjs --update"
207
+ "ci-check:layer-11-boundary:update": "node scripts/ci-check-layer-11-boundary.mjs --update",
208
+ "lint:tsgo:harness": "pnpm --filter @docx-react-component/react-word-editor-harness lint:tsgo",
209
+ "harness:dev": "pnpm --filter @docx-react-component/react-word-editor-harness dev",
210
+ "mcp:tool-runner:sync": "bash scripts/tool-runner-sync.sh",
211
+ "mcp:tool-runner:knowledge": "bash scripts/tool-runner-mcp.sh knowledge",
212
+ "mcp:tool-runner:visual-smoke": "bash scripts/tool-runner-mcp.sh visual-smoke",
213
+ "mcp:tool-runner:ooxml-validator": "bash scripts/tool-runner-mcp.sh ooxml-validator",
214
+ "mcp:tool-runner:truth": "bash scripts/tool-runner-mcp.sh truth",
215
+ "mcp:tool-runner:scope-calibration": "bash scripts/tool-runner-mcp.sh scope-calibration"
208
216
  }
209
217
  }
@@ -467,7 +467,7 @@
467
467
  * undefined (F01 + 10 single-column CCEP regression preserved).
468
468
  * Section-level `<w:type w:val="nextColumn"/>` still degrades to
469
469
  * `continuous`-style page merging — cross-section column-state
470
- * carry is explicit follow-up work (tracked on react-refactor).
470
+ * carry is explicit follow-up work (tracked on pe2).
471
471
  * Cache envelopes from v37 invalidate because the per-page
472
472
  * fragment routing under multi-column layouts changes; single-
473
473
  * column envelopes remain shape-compatible but the version bump
@@ -87,7 +87,7 @@ export interface EditorSurfaceControllerProps {
87
87
  /**
88
88
  * Coord-10 L11-4 — forwarded to `TwProseMirrorSurface`. Threaded
89
89
  * from `api.runtime.workflow.createScopeTagRegistry` (shipped by
90
- * L06 in react-refactor `534f2b97`). Replaces the pre-L06-catalog
90
+ * L06 in pe2 `534f2b97`). Replaces the pre-L06-catalog
91
91
  * pragmatic public-types re-export (refactor/11 §4.17, 2026-04-24
92
92
  * `7a2d2fc0`). When absent, `TwProseMirrorSurface` falls back to
93
93
  * the public-types re-export for test / headless mount back-compat.
@@ -133,6 +133,13 @@ export function normalizeMarkupDisplay(
133
133
  }
134
134
  }
135
135
 
136
+ const COMMENT_ACTIVE_MARKER_CLASS =
137
+ "bg-comment-soft underline decoration-comment decoration-2 underline-offset-4 decoration-solid box-decoration-clone rounded-[2px] shadow-[inset_0_-2px_0_var(--color-comment)]";
138
+ const COMMENT_OPEN_MARKER_CLASS =
139
+ "bg-comment-soft underline decoration-comment decoration-2 underline-offset-4 decoration-solid box-decoration-clone rounded-[2px]";
140
+ const COMMENT_RESOLVED_MARKER_CLASS =
141
+ "bg-comment-soft underline decoration-comment/60 decoration-1 underline-offset-4 decoration-solid box-decoration-clone rounded-[2px]";
142
+
136
143
  export function getCommentHighlightClass(
137
144
  model: CommentDecorationModel | undefined,
138
145
  from: number,
@@ -147,23 +154,29 @@ export function getCommentHighlightClass(
147
154
  switch (normalizeMarkupDisplay(markupDisplay)) {
148
155
  case "no-markup":
149
156
  case "original":
150
- return state.hasActive ? "bg-comment-soft" : "";
157
+ if (state.hasActive) {
158
+ return COMMENT_ACTIVE_MARKER_CLASS;
159
+ }
160
+ if (state.hasOpen) {
161
+ return COMMENT_OPEN_MARKER_CLASS;
162
+ }
163
+ return COMMENT_RESOLVED_MARKER_CLASS;
151
164
  case "simple-markup":
152
165
  if (state.hasActive) {
153
- return "underline decoration-comment decoration-2 underline-offset-4";
166
+ return COMMENT_ACTIVE_MARKER_CLASS;
154
167
  }
155
168
  if (state.hasOpen) {
156
- return "underline decoration-comment/60 decoration-1 underline-offset-4";
169
+ return COMMENT_OPEN_MARKER_CLASS;
157
170
  }
158
- return "underline decoration-comment/40 decoration-1 underline-offset-4";
171
+ return COMMENT_RESOLVED_MARKER_CLASS;
159
172
  case "all-markup":
160
173
  if (state.hasActive) {
161
- return "bg-comment-strong";
174
+ return COMMENT_ACTIVE_MARKER_CLASS;
162
175
  }
163
176
  if (state.hasOpen) {
164
- return "bg-comment-soft";
177
+ return COMMENT_OPEN_MARKER_CLASS;
165
178
  }
166
- return "bg-comment-soft opacity-60";
179
+ return COMMENT_RESOLVED_MARKER_CLASS;
167
180
  }
168
181
  }
169
182
 
@@ -26,7 +26,7 @@ import type {
26
26
  import type { CanonicalDocumentEnvelope } from "../../api/public-types.ts";
27
27
  // §4.8 · refactor/11 — search + table descriptor access moved to the
28
28
  // Runtime API v3 seam (`runtime.search.searchDocument` +
29
- // `runtime.table.getSelectionDescriptor`, both shipped in react-refactor
29
+ // `runtime.table.getSelectionDescriptor`, both shipped in pe2
30
30
  // `eb98ae06`). The PM surface receives them as host-supplied callbacks
31
31
  // instead of importing from `src/runtime/**` directly. `TableSelectionDescriptor`
32
32
  // is re-exported from the v3 table family so consumers don't peek into