From 2b73b720dc1bd1c9d7a39483403099754c75267b Mon Sep 17 00:00:00 2001 From: Rajat Saxena Date: Sun, 15 Nov 2026 13:42:31 +0530 Subject: [PATCH] fix(text-editor): use one version range for every tiptap dependency Three @tiptap packages were pinned to exactly 3.31.3 while the others used caret ranges. A fresh npm install resolved the ranges to the latest tiptap, nested a second @tiptap/core 3.31.3 for the pinned packages, and @tiptap/extension-table then loaded the old core and crashed on a missing isValidCSSStyleValue export. That broke npx @frontlit/preview@alpha. Also gives borders the theme border colour in the local preview, matching apps/sites globals.css, so cards no longer render with text-coloured borders. --- .changeset/preview-theme-borders.md | 5 ++++ .changeset/text-editor-tiptap-ranges.md | 5 ++++ bun.lock | 36 ++++++++++++------------- packages/preview/client/preview.css | 12 +++++++++ packages/text-editor/package.json | 36 ++++++++++++------------- 5 files changed, 58 insertions(+), 36 deletions(-) create mode 100644 .changeset/preview-theme-borders.md create mode 100644 .changeset/text-editor-tiptap-ranges.md diff --git a/.changeset/preview-theme-borders.md b/.changeset/preview-theme-borders.md new file mode 100644 index 00000000..fafada95 --- /dev/null +++ b/.changeset/preview-theme-borders.md @@ -0,0 +1,5 @@ +--- +"@frontlit/preview": patch +--- + +Give borders the theme's border colour, as published sites do. Cards, dividers and the header border used to render in the text colour. diff --git a/.changeset/text-editor-tiptap-ranges.md b/.changeset/text-editor-tiptap-ranges.md new file mode 100644 index 00000000..ed2ccaf5 --- /dev/null +++ b/.changeset/text-editor-tiptap-ranges.md @@ -0,0 +1,5 @@ +--- +"@frontlit/text-editor": patch +--- + +Use one version range (`^3.31.3`) for every `@tiptap/*` dependency. Three packages were pinned to exactly 3.31.3 while the rest floated, so a fresh npm install pulled two copies of `@tiptap/core` and `@tiptap/extension-table` crashed with "does not provide an export named 'isValidCSSStyleValue'". This broke `npx @frontlit/preview@alpha`. diff --git a/bun.lock b/bun.lock index 7377621a..2fbe3d36 100644 --- a/bun.lock +++ b/bun.lock @@ -298,24 +298,24 @@ "version": "0.1.0-alpha.4", "dependencies": { "@floating-ui/dom": "^1.6.0", - "@tiptap/core": "^3.0.0", - "@tiptap/extension-bubble-menu": "^3.10.4", - "@tiptap/extension-code": "3.31.3", - "@tiptap/extension-code-block": "3.31.3", - "@tiptap/extension-code-block-lowlight": "^3.0.0", - "@tiptap/extension-dropcursor": "^3.0.0", - "@tiptap/extension-gapcursor": "^3.0.0", - "@tiptap/extension-heading": "^3.0.0", - "@tiptap/extension-highlight": "^3.11.0", - "@tiptap/extension-image": "^3.0.0", - "@tiptap/extension-link": "^3.0.0", - "@tiptap/extension-placeholder": "^3.0.0", - "@tiptap/extension-table": "^3.10.7", - "@tiptap/extensions": "3.31.3", - "@tiptap/pm": "^3.0.0", - "@tiptap/react": "^3.0.0", - "@tiptap/starter-kit": "^3.0.0", - "@tiptap/static-renderer": "^3.10.7", + "@tiptap/core": "^3.31.3", + "@tiptap/extension-bubble-menu": "^3.31.3", + "@tiptap/extension-code": "^3.31.3", + "@tiptap/extension-code-block": "^3.31.3", + "@tiptap/extension-code-block-lowlight": "^3.31.3", + "@tiptap/extension-dropcursor": "^3.31.3", + "@tiptap/extension-gapcursor": "^3.31.3", + "@tiptap/extension-heading": "^3.31.3", + "@tiptap/extension-highlight": "^3.31.3", + "@tiptap/extension-image": "^3.31.3", + "@tiptap/extension-link": "^3.31.3", + "@tiptap/extension-placeholder": "^3.31.3", + "@tiptap/extension-table": "^3.31.3", + "@tiptap/extensions": "^3.31.3", + "@tiptap/pm": "^3.31.3", + "@tiptap/react": "^3.31.3", + "@tiptap/starter-kit": "^3.31.3", + "@tiptap/static-renderer": "^3.31.3", "acorn": "^8.19.0", "clsx": "^2.1.1", "highlight.js": "^11.10.0", diff --git a/packages/preview/client/preview.css b/packages/preview/client/preview.css index b26e3691..939bcfbc 100644 --- a/packages/preview/client/preview.css +++ b/packages/preview/client/preview.css @@ -1,3 +1,15 @@ +/* Match apps/sites/app/globals.css: borders take the theme's border colour. + * Tailwind 4 defaults border-color to currentColor, so without this every + * card, divider and header border renders in the text colour. Being in the + * base layer, it still loses to utilities such as border-primary. */ +@layer base { + *, + ::before, + ::after { + border-color: var(--border); + } +} + html, body, #root { diff --git a/packages/text-editor/package.json b/packages/text-editor/package.json index a05fdf59..3f6fe2e2 100644 --- a/packages/text-editor/package.json +++ b/packages/text-editor/package.json @@ -74,24 +74,24 @@ }, "dependencies": { "@floating-ui/dom": "^1.6.0", - "@tiptap/core": "^3.0.0", - "@tiptap/extension-bubble-menu": "^3.10.4", - "@tiptap/extension-code": "3.31.3", - "@tiptap/extension-code-block": "3.31.3", - "@tiptap/extension-code-block-lowlight": "^3.0.0", - "@tiptap/extension-dropcursor": "^3.0.0", - "@tiptap/extension-gapcursor": "^3.0.0", - "@tiptap/extension-heading": "^3.0.0", - "@tiptap/extension-highlight": "^3.11.0", - "@tiptap/extension-image": "^3.0.0", - "@tiptap/extension-link": "^3.0.0", - "@tiptap/extension-placeholder": "^3.0.0", - "@tiptap/extension-table": "^3.10.7", - "@tiptap/extensions": "3.31.3", - "@tiptap/pm": "^3.0.0", - "@tiptap/react": "^3.0.0", - "@tiptap/starter-kit": "^3.0.0", - "@tiptap/static-renderer": "^3.10.7", + "@tiptap/core": "^3.31.3", + "@tiptap/extension-bubble-menu": "^3.31.3", + "@tiptap/extension-code": "^3.31.3", + "@tiptap/extension-code-block": "^3.31.3", + "@tiptap/extension-code-block-lowlight": "^3.31.3", + "@tiptap/extension-dropcursor": "^3.31.3", + "@tiptap/extension-gapcursor": "^3.31.3", + "@tiptap/extension-heading": "^3.31.3", + "@tiptap/extension-highlight": "^3.31.3", + "@tiptap/extension-image": "^3.31.3", + "@tiptap/extension-link": "^3.31.3", + "@tiptap/extension-placeholder": "^3.31.3", + "@tiptap/extension-table": "^3.31.3", + "@tiptap/extensions": "^3.31.3", + "@tiptap/pm": "^3.31.3", + "@tiptap/react": "^3.31.3", + "@tiptap/starter-kit": "^3.31.3", + "@tiptap/static-renderer": "^3.31.3", "acorn": "^8.19.0", "clsx": "^2.1.1", "highlight.js": "^11.10.0",