Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dev.fast/canvas",
"version": "0.5.0",
"version": "0.6.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -33,6 +33,7 @@
},
"devDependencies": {
"@dev.fast/review-canvas": "workspace:*",
"@tiptap/pm": "3.33.0",
"@types/node": "24.12.2",
"@types/react": "19.2.14",
"react": "19.2.5",
Expand All @@ -43,6 +44,7 @@
"vitest": "4.1.12"
},
"peerDependencies": {
"@tiptap/pm": "^3.33.0",
"react": "^19.2.0",
"react-dom": "^19.2.0"
}
Expand Down
14 changes: 13 additions & 1 deletion packages/canvas/scripts/check-pack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,19 @@ try {
if (entry.includes(marker))
throw new Error(`index.js bundles ${marker.replace(/-$/, "")}`);

for (const file of files.filter((name) => name.endsWith(".js"))) {
const scripts = files.filter((name) => name.endsWith(".js"));

// ProseMirror is a peer: the editor imports the host's copy.
if (
!scripts.some((file) =>
/from\s*["'`]@tiptap\/pm\/view["'`]/.test(
readFileSync(path.join(out, file), "utf8"),
),
)
)
throw new Error(`${tarball} bundles ProseMirror`);

for (const file of scripts) {
const code = readFileSync(path.join(out, file), "utf8");

// React is external: a CommonJS require of it throws in a browser.
Expand Down
2 changes: 1 addition & 1 deletion packages/review/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@speed-highlight/core": "1.2.15",
"@stylexjs/stylex": "0.19.1",
"@tanstack/react-query": "5.103.1",
"@tiptap/pm": "3.31.4",
"@tiptap/pm": "3.33.0",
"@xyflow/react": "12.10.2",
"animejs": "catalog:",
"d3": "7.9.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/review/app/package.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function themeCss(source: string | Uint8Array) {
return `${faces.join("\n")}\n:root{${palette}}\n`;
}

// React stays external; fonts and wasm ship as files.
// React and ProseMirror stay external, so a host shares its copies; fonts and
// wasm ship as files.
export default defineConfig({
root: __dirname,
plugins: [
Expand Down Expand Up @@ -75,7 +76,7 @@ export default defineConfig({
input: {
canvas: path.resolve(__dirname, "src/canvas-entry.ts"),
},
external: [/^react(?:-dom)?(?:\/.*)?$/],
external: [/^react(?:-dom)?(?:\/.*)?$/, /^@tiptap\/pm\/.*$/],
output: {
entryFileNames: "index.js",
chunkFileNames: "assets/[name]-[hash].js",
Expand Down
37 changes: 32 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading