@beyondwork/docx-react-component 1.0.55 → 1.0.56
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,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beyondwork/docx-react-component",
|
|
3
3
|
"publisher": "beyondwork",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.56",
|
|
5
5
|
"description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
|
|
6
|
+
"packageManager": "pnpm@10.30.3",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"sideEffects": [
|
|
8
9
|
"**/*.css"
|
|
@@ -92,6 +93,37 @@
|
|
|
92
93
|
"./ui-tailwind/theme/editor-theme.css": "./src/ui-tailwind/theme/editor-theme.css"
|
|
93
94
|
},
|
|
94
95
|
"types": "./src/index.ts",
|
|
96
|
+
"scripts": {
|
|
97
|
+
"build": "tsup",
|
|
98
|
+
"test": "bash scripts/run-workspace-tests.sh",
|
|
99
|
+
"test:repo": "node scripts/ci-check-layout-engine-version.mjs && node scripts/run-repo-tests.mjs core",
|
|
100
|
+
"test:repo:all": "node scripts/run-repo-tests.mjs all",
|
|
101
|
+
"test:repo:optional": "node scripts/run-repo-tests.mjs optional",
|
|
102
|
+
"test:repo:browser-ui": "node scripts/run-repo-tests.mjs browser-ui",
|
|
103
|
+
"test:wcag-audit": "node scripts/run-repo-tests.mjs wcag-audit",
|
|
104
|
+
"test:harness": "pnpm --filter @docx-react-component/react-word-editor-harness test",
|
|
105
|
+
"test:visual": "VISUAL_SMOKE_PROFILE=bare pnpm exec playwright test --project=chromium",
|
|
106
|
+
"test:visual:chrome": "VISUAL_SMOKE_PROFILE=chrome-cycle pnpm exec playwright test --project=chromium",
|
|
107
|
+
"visual:list-runs": "node scripts/visual-smoke-list-runs.mjs",
|
|
108
|
+
"mcp:visual-smoke": "node scripts/visual-smoke-mcp.mjs",
|
|
109
|
+
"lint": "pnpm run lint:no-authored-js && pnpm run lint:docs-contracts && pnpm run lint:tsgo && pnpm run lint:tsgo:harness",
|
|
110
|
+
"lint:docs-contracts": "bash scripts/check-reference-load-contract.sh",
|
|
111
|
+
"lint:no-authored-js": "bash scripts/check-no-authored-js.sh",
|
|
112
|
+
"lint:tsgo": "tsgo --noEmit -p tsconfig.build.json",
|
|
113
|
+
"lint:tsgo:harness": "pnpm --filter @docx-react-component/react-word-editor-harness lint:tsgo",
|
|
114
|
+
"generate:token-reference": "node scripts/generate-token-reference.mjs",
|
|
115
|
+
"check:token-reference": "node scripts/generate-token-reference.mjs --check",
|
|
116
|
+
"context7:api-check": "bash scripts/context7-export-env.sh run bash scripts/context7-api-check.sh",
|
|
117
|
+
"wave:doctor": "bash scripts/context7-export-env.sh run pnpm exec wave doctor --json",
|
|
118
|
+
"wave:dry-run": "bash scripts/context7-export-env.sh run pnpm exec wave launch --lane main --dry-run --no-dashboard",
|
|
119
|
+
"wave:launch": "bash scripts/context7-export-env.sh run pnpm exec wave launch --lane main",
|
|
120
|
+
"wave:launch:managed": "bash scripts/wave-launch.sh",
|
|
121
|
+
"wave:status": "bash scripts/wave-status.sh",
|
|
122
|
+
"wave:watch": "bash scripts/wave-watch.sh --follow",
|
|
123
|
+
"wave:dashboard:current": "bash scripts/wave-dashboard-attach.sh current",
|
|
124
|
+
"wave:dashboard:global": "bash scripts/wave-dashboard-attach.sh global",
|
|
125
|
+
"harness:dev": "pnpm --filter @docx-react-component/react-word-editor-harness dev"
|
|
126
|
+
},
|
|
95
127
|
"keywords": [
|
|
96
128
|
"docx",
|
|
97
129
|
"word",
|
|
@@ -175,35 +207,14 @@
|
|
|
175
207
|
"y-protocols": "^1.0.7",
|
|
176
208
|
"yjs": "^13.6.30"
|
|
177
209
|
},
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"test:visual": "VISUAL_SMOKE_PROFILE=bare pnpm exec playwright test --project=chromium",
|
|
188
|
-
"test:visual:chrome": "VISUAL_SMOKE_PROFILE=chrome-cycle pnpm exec playwright test --project=chromium",
|
|
189
|
-
"visual:list-runs": "node scripts/visual-smoke-list-runs.mjs",
|
|
190
|
-
"mcp:visual-smoke": "node scripts/visual-smoke-mcp.mjs",
|
|
191
|
-
"lint": "pnpm run lint:no-authored-js && pnpm run lint:docs-contracts && pnpm run lint:tsgo && pnpm run lint:tsgo:harness",
|
|
192
|
-
"lint:docs-contracts": "bash scripts/check-reference-load-contract.sh",
|
|
193
|
-
"lint:no-authored-js": "bash scripts/check-no-authored-js.sh",
|
|
194
|
-
"lint:tsgo": "tsgo --noEmit -p tsconfig.build.json",
|
|
195
|
-
"lint:tsgo:harness": "pnpm --filter @docx-react-component/react-word-editor-harness lint:tsgo",
|
|
196
|
-
"generate:token-reference": "node scripts/generate-token-reference.mjs",
|
|
197
|
-
"check:token-reference": "node scripts/generate-token-reference.mjs --check",
|
|
198
|
-
"context7:api-check": "bash scripts/context7-export-env.sh run bash scripts/context7-api-check.sh",
|
|
199
|
-
"wave:doctor": "bash scripts/context7-export-env.sh run pnpm exec wave doctor --json",
|
|
200
|
-
"wave:dry-run": "bash scripts/context7-export-env.sh run pnpm exec wave launch --lane main --dry-run --no-dashboard",
|
|
201
|
-
"wave:launch": "bash scripts/context7-export-env.sh run pnpm exec wave launch --lane main",
|
|
202
|
-
"wave:launch:managed": "bash scripts/wave-launch.sh",
|
|
203
|
-
"wave:status": "bash scripts/wave-status.sh",
|
|
204
|
-
"wave:watch": "bash scripts/wave-watch.sh --follow",
|
|
205
|
-
"wave:dashboard:current": "bash scripts/wave-dashboard-attach.sh current",
|
|
206
|
-
"wave:dashboard:global": "bash scripts/wave-dashboard-attach.sh global",
|
|
207
|
-
"harness:dev": "pnpm --filter @docx-react-component/react-word-editor-harness dev"
|
|
210
|
+
"pnpm": {
|
|
211
|
+
"onlyBuiltDependencies": [
|
|
212
|
+
"esbuild",
|
|
213
|
+
"sharp"
|
|
214
|
+
],
|
|
215
|
+
"overrides": {
|
|
216
|
+
"react": "19.2.4",
|
|
217
|
+
"react-dom": "19.2.4"
|
|
218
|
+
}
|
|
208
219
|
}
|
|
209
|
-
}
|
|
220
|
+
}
|
|
@@ -660,6 +660,7 @@ export const editorSchema = new Schema({
|
|
|
660
660
|
},
|
|
661
661
|
toDOM(node) {
|
|
662
662
|
const previewSrc = node.attrs.previewSrc as string | null;
|
|
663
|
+
const previewMediaId = node.attrs.previewMediaId as string | null;
|
|
663
664
|
const detail = (node.attrs.detail as string) ?? "Chart";
|
|
664
665
|
if (previewSrc) {
|
|
665
666
|
// Bitmap-backed: render the fallback image Word cached in mc:Fallback.
|
|
@@ -698,6 +699,7 @@ export const editorSchema = new Schema({
|
|
|
698
699
|
{
|
|
699
700
|
class: "inline-flex items-center gap-1 mx-0.5 px-1.5 py-0.5 rounded text-xs text-blue-700 bg-blue-50 border border-blue-200",
|
|
700
701
|
"data-node-type": "chart_atom",
|
|
702
|
+
...(previewMediaId ? { "data-preview-media-id": previewMediaId } : {}),
|
|
701
703
|
contenteditable: "false",
|
|
702
704
|
title: detail,
|
|
703
705
|
},
|
|
@@ -718,6 +720,7 @@ export const editorSchema = new Schema({
|
|
|
718
720
|
},
|
|
719
721
|
toDOM(node) {
|
|
720
722
|
const previewSrc = node.attrs.previewSrc as string | null;
|
|
723
|
+
const previewMediaId = node.attrs.previewMediaId as string | null;
|
|
721
724
|
const detail = (node.attrs.detail as string) ?? "SmartArt";
|
|
722
725
|
if (previewSrc) {
|
|
723
726
|
return [
|
|
@@ -753,6 +756,7 @@ export const editorSchema = new Schema({
|
|
|
753
756
|
{
|
|
754
757
|
class: "inline-flex items-center gap-1 mx-0.5 px-1.5 py-0.5 rounded text-xs text-purple-700 bg-purple-50 border border-purple-200",
|
|
755
758
|
"data-node-type": "smartart_atom",
|
|
759
|
+
...(previewMediaId ? { "data-preview-media-id": previewMediaId } : {}),
|
|
756
760
|
contenteditable: "false",
|
|
757
761
|
title: detail,
|
|
758
762
|
},
|
|
@@ -668,7 +668,6 @@ function buildOpaqueInlineOrComplexAtom(
|
|
|
668
668
|
): PMNode {
|
|
669
669
|
const label = segment.label;
|
|
670
670
|
const detail = segment.detail;
|
|
671
|
-
|
|
672
671
|
if (segment.presentation === "text-box" || segment.presentation === "checkbox") {
|
|
673
672
|
return editorSchema.nodes.opaque_inline.create({
|
|
674
673
|
fragmentId: segment.fragmentId,
|