From 511ef4e16593dd99b982f83f4f3c7d23fcfff834 Mon Sep 17 00:00:00 2001 From: Matthew Lipski Date: Wed, 13 May 2026 19:47:03 +0200 Subject: [PATCH 1/9] Migrate to Vite Plus --- .eslintrc.json | 42 - .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/build.yml | 8 +- .github/workflows/fresh-install-tests.yml | 2 +- .github/workflows/publish.yaml | 2 +- .node-version | 1 + .nvmrc | 1 - .prettierrc | 12 - .vite-hooks/pre-commit | 1 + AGENTS.md | 15 + CONTRIBUTING.md | 10 +- docs/app/(home)/_components/BlockCatalog.tsx | 6 +- .../app/(home)/_components/DigitalCommons.tsx | 4 +- docs/app/(home)/_components/FAQ.tsx | 2 +- .../app/(home)/_components/FeatureSection.tsx | 2 +- docs/app/(home)/_components/FrameworkPill.tsx | 2 +- docs/app/(home)/_components/Hero.tsx | 8 +- docs/app/(home)/_components/Letter.tsx | 8 +- docs/app/(home)/_components/Marquee.tsx | 4 +- docs/app/(home)/_components/Pricing.tsx | 2 +- docs/app/(home)/_components/USP.tsx | 2 +- docs/app/demo/_components/DemoEditor.tsx | 10 +- docs/app/demo/_components/EditorMenu.tsx | 8 +- docs/app/examples/[[...slug]]/page.tsx | 6 +- docs/app/pricing/page.tsx | 2 +- docs/app/pricing/tiers.tsx | 19 +- docs/components/AuthNavButton.tsx | 4 +- docs/components/AuthenticationPage.tsx | 4 +- docs/components/CustomDocsLayout.tsx | 2 +- docs/components/ProBadge.tsx | 2 +- .../fumadocs/layout/home/client.tsx | 29 +- .../fumadocs/layout/language-toggle.tsx | 36 +- docs/components/fumadocs/layout/link-item.tsx | 42 +- .../fumadocs/layout/search-toggle.tsx | 35 +- docs/components/fumadocs/layout/shared.tsx | 35 +- .../fumadocs/layout/sidebar/base.tsx | 194 +- .../fumadocs/layout/sidebar/link-item.tsx | 32 +- .../fumadocs/layout/sidebar/page-tree.tsx | 60 +- .../fumadocs/layout/sidebar/tabs/dropdown.tsx | 58 +- .../fumadocs/layout/sidebar/tabs/index.tsx | 50 +- .../fumadocs/layout/theme-toggle.tsx | 52 +- docs/components/fumadocs/ui/button.tsx | 20 +- docs/components/fumadocs/ui/collapsible.tsx | 10 +- .../fumadocs/ui/navigation-menu.tsx | 31 +- docs/components/fumadocs/ui/popover.tsx | 23 +- docs/components/fumadocs/ui/scroll-area.tsx | 30 +- docs/components/search.tsx | 25 +- docs/content/docs/reference/editor/meta.json | 8 +- docs/eslint.config.mjs | 17 - docs/lib/fumadocs/cn.ts | 2 +- docs/lib/fumadocs/merge-refs.ts | 8 +- docs/lib/fumadocs/urls.ts | 10 +- docs/package.json | 8 +- examples/.eslintrc.js | 6 - examples/01-basic/01-minimal/main.tsx | 2 +- examples/01-basic/01-minimal/package.json | 12 +- examples/01-basic/01-minimal/tsconfig.json | 13 +- examples/01-basic/01-minimal/vite.config.ts | 11 +- examples/01-basic/02-block-objects/main.tsx | 2 +- .../01-basic/02-block-objects/package.json | 12 +- .../01-basic/02-block-objects/tsconfig.json | 13 +- .../01-basic/02-block-objects/vite.config.ts | 11 +- examples/01-basic/03-multi-column/main.tsx | 2 +- .../01-basic/03-multi-column/package.json | 12 +- examples/01-basic/03-multi-column/src/App.tsx | 5 +- .../01-basic/03-multi-column/tsconfig.json | 13 +- .../01-basic/03-multi-column/vite.config.ts | 11 +- examples/01-basic/04-default-blocks/main.tsx | 2 +- .../01-basic/04-default-blocks/package.json | 12 +- .../01-basic/04-default-blocks/tsconfig.json | 13 +- .../01-basic/04-default-blocks/vite.config.ts | 11 +- .../05-removing-default-blocks/main.tsx | 2 +- .../05-removing-default-blocks/package.json | 12 +- .../05-removing-default-blocks/tsconfig.json | 13 +- .../05-removing-default-blocks/vite.config.ts | 11 +- .../01-basic/06-block-manipulation/main.tsx | 2 +- .../06-block-manipulation/package.json | 12 +- .../06-block-manipulation/tsconfig.json | 13 +- .../06-block-manipulation/vite.config.ts | 11 +- .../01-basic/07-selection-blocks/main.tsx | 2 +- .../01-basic/07-selection-blocks/package.json | 12 +- .../07-selection-blocks/tsconfig.json | 13 +- .../07-selection-blocks/vite.config.ts | 11 +- examples/01-basic/08-ariakit/main.tsx | 2 +- examples/01-basic/08-ariakit/package.json | 12 +- examples/01-basic/08-ariakit/tsconfig.json | 13 +- examples/01-basic/08-ariakit/vite.config.ts | 11 +- examples/01-basic/09-shadcn/main.tsx | 2 +- examples/01-basic/09-shadcn/package.json | 12 +- examples/01-basic/09-shadcn/src/App.tsx | 10 +- examples/01-basic/09-shadcn/tsconfig.json | 13 +- examples/01-basic/09-shadcn/vite.config.ts | 11 +- examples/01-basic/10-localization/main.tsx | 2 +- .../01-basic/10-localization/package.json | 12 +- .../01-basic/10-localization/tsconfig.json | 13 +- .../01-basic/10-localization/vite.config.ts | 11 +- .../01-basic/11-custom-placeholder/main.tsx | 2 +- .../11-custom-placeholder/package.json | 12 +- .../11-custom-placeholder/tsconfig.json | 13 +- .../11-custom-placeholder/vite.config.ts | 11 +- examples/01-basic/12-multi-editor/main.tsx | 2 +- .../01-basic/12-multi-editor/package.json | 12 +- .../01-basic/12-multi-editor/tsconfig.json | 13 +- .../01-basic/12-multi-editor/vite.config.ts | 11 +- .../01-basic/13-custom-paste-handler/main.tsx | 2 +- .../13-custom-paste-handler/package.json | 12 +- .../13-custom-paste-handler/tsconfig.json | 13 +- .../13-custom-paste-handler/vite.config.ts | 11 +- .../01-basic/14-editor-scrollable/main.tsx | 2 +- .../14-editor-scrollable/package.json | 12 +- .../14-editor-scrollable/tsconfig.json | 13 +- .../14-editor-scrollable/vite.config.ts | 11 +- examples/01-basic/15-shadowdom/main.tsx | 2 +- examples/01-basic/15-shadowdom/package.json | 12 +- examples/01-basic/15-shadowdom/src/App.tsx | 5 +- .../01-basic/15-shadowdom/src/vite-env.d.ts | 2 +- examples/01-basic/15-shadowdom/tsconfig.json | 13 +- examples/01-basic/15-shadowdom/vite.config.ts | 11 +- .../01-basic/16-read-only-editor/main.tsx | 2 +- .../01-basic/16-read-only-editor/package.json | 12 +- .../16-read-only-editor/tsconfig.json | 13 +- .../16-read-only-editor/vite.config.ts | 11 +- .../01-basic/17-no-trailing-block/main.tsx | 2 +- .../17-no-trailing-block/package.json | 17 +- .../17-no-trailing-block/tsconfig.json | 13 +- .../17-no-trailing-block/vite.config.ts | 11 +- examples/01-basic/testing/main.tsx | 2 +- examples/01-basic/testing/package.json | 12 +- examples/01-basic/testing/tsconfig.json | 13 +- examples/01-basic/testing/vite.config.ts | 11 +- .../02-backend/01-file-uploading/main.tsx | 2 +- .../02-backend/01-file-uploading/package.json | 12 +- .../01-file-uploading/tsconfig.json | 13 +- .../01-file-uploading/vite.config.ts | 11 +- .../02-backend/02-saving-loading/main.tsx | 2 +- .../02-backend/02-saving-loading/package.json | 12 +- .../02-saving-loading/tsconfig.json | 13 +- .../02-saving-loading/vite.config.ts | 11 +- examples/02-backend/03-s3/main.tsx | 2 +- examples/02-backend/03-s3/package.json | 12 +- examples/02-backend/03-s3/tsconfig.json | 13 +- examples/02-backend/03-s3/vite.config.ts | 11 +- .../04-rendering-static-documents/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../01-ui-elements-remove/main.tsx | 2 +- .../01-ui-elements-remove/package.json | 12 +- .../01-ui-elements-remove/tsconfig.json | 13 +- .../01-ui-elements-remove/vite.config.ts | 11 +- .../02-formatting-toolbar-buttons/main.tsx | 2 +- .../package.json | 12 +- .../02-formatting-toolbar-buttons/src/App.tsx | 4 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 4 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../04-side-menu-buttons/main.tsx | 2 +- .../04-side-menu-buttons/package.json | 12 +- .../04-side-menu-buttons/tsconfig.json | 13 +- .../04-side-menu-buttons/vite.config.ts | 11 +- .../05-side-menu-drag-handle-items/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 5 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../11-uppy-file-panel/main.tsx | 2 +- .../11-uppy-file-panel/package.json | 12 +- .../11-uppy-file-panel/src/App.tsx | 4 +- .../11-uppy-file-panel/tsconfig.json | 13 +- .../11-uppy-file-panel/vite.config.ts | 11 +- .../12-static-formatting-toolbar/main.tsx | 2 +- .../12-static-formatting-toolbar/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../03-ui-components/13-custom-ui/main.tsx | 2 +- .../13-custom-ui/package.json | 12 +- .../13-custom-ui/tsconfig.json | 13 +- .../13-custom-ui/vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../15-advanced-tables/main.tsx | 2 +- .../15-advanced-tables/package.json | 12 +- .../15-advanced-tables/tsconfig.json | 13 +- .../15-advanced-tables/vite.config.ts | 11 +- .../16-link-toolbar-buttons/main.tsx | 2 +- .../16-link-toolbar-buttons/package.json | 12 +- .../16-link-toolbar-buttons/tsconfig.json | 13 +- .../16-link-toolbar-buttons/vite.config.ts | 11 +- .../17-advanced-tables-2/.bnexample.json | 9 +- .../17-advanced-tables-2/main.tsx | 2 +- .../17-advanced-tables-2/package.json | 12 +- .../17-advanced-tables-2/tsconfig.json | 13 +- .../17-advanced-tables-2/vite.config.ts | 11 +- .../03-ui-components/18-drag-n-drop/main.tsx | 2 +- .../18-drag-n-drop/package.json | 12 +- .../18-drag-n-drop/tsconfig.json | 13 +- .../18-drag-n-drop/vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../01-theming-dom-attributes/main.tsx | 2 +- .../01-theming-dom-attributes/package.json | 12 +- .../01-theming-dom-attributes/tsconfig.json | 13 +- .../01-theming-dom-attributes/vite.config.ts | 11 +- examples/04-theming/02-changing-font/main.tsx | 2 +- .../04-theming/02-changing-font/package.json | 12 +- .../04-theming/02-changing-font/tsconfig.json | 13 +- .../02-changing-font/vite.config.ts | 11 +- examples/04-theming/03-theming-css/main.tsx | 2 +- .../04-theming/03-theming-css/package.json | 12 +- .../04-theming/03-theming-css/tsconfig.json | 13 +- .../04-theming/03-theming-css/vite.config.ts | 11 +- .../04-theming-css-variables/main.tsx | 2 +- .../04-theming-css-variables/package.json | 12 +- .../04-theming-css-variables/tsconfig.json | 13 +- .../04-theming-css-variables/vite.config.ts | 11 +- .../05-theming-css-variables-code/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- examples/04-theming/06-code-block/main.tsx | 2 +- .../04-theming/06-code-block/package.json | 12 +- .../04-theming/06-code-block/tsconfig.json | 13 +- .../04-theming/06-code-block/vite.config.ts | 11 +- .../04-theming/07-custom-code-block/main.tsx | 2 +- .../07-custom-code-block/package.json | 12 +- .../07-custom-code-block/tsconfig.json | 13 +- .../07-custom-code-block/vite.config.ts | 11 +- .../01-converting-blocks-to-html/main.tsx | 2 +- .../01-converting-blocks-to-html/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../02-converting-blocks-from-html/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../03-converting-blocks-to-md/main.tsx | 2 +- .../03-converting-blocks-to-md/package.json | 12 +- .../03-converting-blocks-to-md/tsconfig.json | 13 +- .../03-converting-blocks-to-md/vite.config.ts | 11 +- .../04-converting-blocks-from-md/main.tsx | 2 +- .../04-converting-blocks-from-md/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../05-converting-blocks-to-pdf/main.tsx | 2 +- .../05-converting-blocks-to-pdf/package.json | 12 +- .../05-converting-blocks-to-pdf/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../06-converting-blocks-to-docx/main.tsx | 2 +- .../06-converting-blocks-to-docx/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../07-converting-blocks-to-odt/main.tsx | 2 +- .../07-converting-blocks-to-odt/package.json | 12 +- .../07-converting-blocks-to-odt/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../09-blocks-to-html-static-render/main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 2 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../10-static-html-render/main.tsx | 2 +- .../10-static-html-render/package.json | 12 +- .../10-static-html-render/tsconfig.json | 13 +- .../10-static-html-render/vite.config.ts | 11 +- .../06-custom-schema/01-alert-block/main.tsx | 2 +- .../01-alert-block/package.json | 12 +- .../01-alert-block/tsconfig.json | 13 +- .../01-alert-block/vite.config.ts | 11 +- .../02-suggestion-menus-mentions/main.tsx | 2 +- .../02-suggestion-menus-mentions/package.json | 12 +- .../02-suggestion-menus-mentions/src/App.tsx | 5 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../06-custom-schema/03-font-style/main.tsx | 2 +- .../03-font-style/package.json | 12 +- .../03-font-style/src/App.tsx | 4 +- .../03-font-style/tsconfig.json | 13 +- .../03-font-style/vite.config.ts | 11 +- .../04-pdf-file-block/main.tsx | 2 +- .../04-pdf-file-block/package.json | 12 +- .../04-pdf-file-block/tsconfig.json | 13 +- .../04-pdf-file-block/vite.config.ts | 11 +- .../05-alert-block-full-ux/main.tsx | 2 +- .../05-alert-block-full-ux/package.json | 12 +- .../05-alert-block-full-ux/src/App.tsx | 4 +- .../05-alert-block-full-ux/tsconfig.json | 13 +- .../05-alert-block-full-ux/vite.config.ts | 11 +- .../06-toggleable-blocks/main.tsx | 2 +- .../06-toggleable-blocks/package.json | 12 +- .../06-toggleable-blocks/tsconfig.json | 13 +- .../06-toggleable-blocks/vite.config.ts | 11 +- .../07-configuring-blocks/main.tsx | 2 +- .../07-configuring-blocks/package.json | 12 +- .../07-configuring-blocks/tsconfig.json | 13 +- .../07-configuring-blocks/vite.config.ts | 11 +- .../08-non-editable-block/main.tsx | 2 +- .../08-non-editable-block/package.json | 12 +- .../08-non-editable-block/tsconfig.json | 13 +- .../08-non-editable-block/vite.config.ts | 11 +- .../draggable-inline-content/main.tsx | 2 +- .../draggable-inline-content/package.json | 12 +- .../draggable-inline-content/tsconfig.json | 13 +- .../draggable-inline-content/vite.config.ts | 11 +- .../react-custom-blocks/main.tsx | 2 +- .../react-custom-blocks/package.json | 12 +- .../react-custom-blocks/tsconfig.json | 13 +- .../react-custom-blocks/vite.config.ts | 11 +- .../react-custom-inline-content/main.tsx | 2 +- .../react-custom-inline-content/package.json | 12 +- .../react-custom-inline-content/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../react-custom-styles/main.tsx | 2 +- .../react-custom-styles/package.json | 12 +- .../react-custom-styles/tsconfig.json | 13 +- .../react-custom-styles/vite.config.ts | 11 +- .../07-collaboration/01-partykit/main.tsx | 2 +- .../07-collaboration/01-partykit/package.json | 12 +- .../01-partykit/tsconfig.json | 13 +- .../01-partykit/vite.config.ts | 11 +- .../07-collaboration/02-liveblocks/main.tsx | 2 +- .../02-liveblocks/package.json | 12 +- .../02-liveblocks/tsconfig.json | 13 +- .../02-liveblocks/vite.config.ts | 11 +- examples/07-collaboration/03-y-sweet/main.tsx | 2 +- .../07-collaboration/03-y-sweet/package.json | 12 +- .../07-collaboration/03-y-sweet/tsconfig.json | 13 +- .../03-y-sweet/vite.config.ts | 11 +- .../07-collaboration/04-electric-sql/main.tsx | 2 +- .../04-electric-sql/package.json | 12 +- .../04-electric-sql/tsconfig.json | 13 +- .../04-electric-sql/vite.config.ts | 11 +- .../07-collaboration/05-comments/main.tsx | 2 +- .../07-collaboration/05-comments/package.json | 12 +- .../05-comments/tsconfig.json | 13 +- .../05-comments/vite.config.ts | 11 +- .../06-comments-with-sidebar/main.tsx | 2 +- .../06-comments-with-sidebar/package.json | 12 +- .../06-comments-with-sidebar/tsconfig.json | 13 +- .../06-comments-with-sidebar/vite.config.ts | 11 +- .../07-collaboration/07-ghost-writer/main.tsx | 2 +- .../07-ghost-writer/package.json | 12 +- .../07-ghost-writer/src/App.tsx | 3 +- .../07-ghost-writer/tsconfig.json | 13 +- .../07-ghost-writer/vite.config.ts | 11 +- examples/07-collaboration/08-forking/main.tsx | 2 +- .../07-collaboration/08-forking/package.json | 12 +- .../07-collaboration/08-forking/tsconfig.json | 13 +- .../08-forking/vite.config.ts | 11 +- .../09-comments-testing/main.tsx | 2 +- .../09-comments-testing/package.json | 12 +- .../09-comments-testing/tsconfig.json | 13 +- .../09-comments-testing/vite.config.ts | 11 +- .../01-tiptap-arrow-conversion/main.tsx | 2 +- .../01-tiptap-arrow-conversion/package.json | 12 +- .../01-tiptap-arrow-conversion/tsconfig.json | 13 +- .../01-tiptap-arrow-conversion/vite.config.ts | 11 +- examples/09-ai/01-minimal/main.tsx | 2 +- examples/09-ai/01-minimal/package.json | 12 +- examples/09-ai/01-minimal/src/App.tsx | 4 +- examples/09-ai/01-minimal/tsconfig.json | 13 +- examples/09-ai/01-minimal/vite.config.ts | 11 +- examples/09-ai/02-playground/main.tsx | 2 +- examples/09-ai/02-playground/package.json | 12 +- examples/09-ai/02-playground/src/App.tsx | 6 +- examples/09-ai/02-playground/tsconfig.json | 13 +- examples/09-ai/02-playground/vite.config.ts | 11 +- .../09-ai/03-custom-ai-menu-items/main.tsx | 2 +- .../03-custom-ai-menu-items/package.json | 12 +- .../09-ai/03-custom-ai-menu-items/src/App.tsx | 8 +- .../03-custom-ai-menu-items/tsconfig.json | 13 +- .../03-custom-ai-menu-items/vite.config.ts | 11 +- examples/09-ai/04-with-collaboration/main.tsx | 2 +- .../09-ai/04-with-collaboration/package.json | 12 +- .../09-ai/04-with-collaboration/src/App.tsx | 6 +- .../09-ai/04-with-collaboration/tsconfig.json | 13 +- .../04-with-collaboration/vite.config.ts | 11 +- examples/09-ai/05-manual-execution/main.tsx | 2 +- .../09-ai/05-manual-execution/package.json | 12 +- .../09-ai/05-manual-execution/tsconfig.json | 13 +- .../09-ai/05-manual-execution/vite.config.ts | 11 +- .../09-ai/06-client-side-transport/main.tsx | 2 +- .../06-client-side-transport/package.json | 12 +- .../06-client-side-transport/src/App.tsx | 6 +- .../06-client-side-transport/tsconfig.json | 13 +- .../06-client-side-transport/vite.config.ts | 11 +- examples/09-ai/07-server-persistence/main.tsx | 2 +- .../09-ai/07-server-persistence/package.json | 12 +- .../09-ai/07-server-persistence/src/App.tsx | 6 +- .../09-ai/07-server-persistence/tsconfig.json | 13 +- .../07-server-persistence/vite.config.ts | 11 +- .../react-vanilla-custom-blocks/main.tsx | 2 +- .../react-vanilla-custom-blocks/package.json | 12 +- .../react-vanilla-custom-blocks/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../react-vanilla-custom-styles/main.tsx | 2 +- .../react-vanilla-custom-styles/package.json | 12 +- .../react-vanilla-custom-styles/tsconfig.json | 13 +- .../vite.config.ts | 11 +- nx.json | 41 +- package.json | 30 +- packages/ariakit/package.json | 19 +- packages/ariakit/tsconfig.json | 2 +- packages/ariakit/vite.config.ts | 4 +- packages/code-block/package.json | 20 +- packages/code-block/src/index.test.ts | 2 +- packages/code-block/vite.config.ts | 2 +- packages/code-block/vitestSetup.ts | 2 +- packages/core/package.json | 24 +- .../insertBlocks/insertBlocks.test.ts | 2 +- .../commands/mergeBlocks/mergeBlocks.test.ts | 2 +- .../commands/moveBlocks/moveBlocks.test.ts | 2 +- .../commands/nestBlock/nestBlock.test.ts | 4 +- .../commands/nestBlock/nestBlock.ts | 6 +- .../replaceBlocks/replaceBlocks.test.ts | 2 +- .../commands/splitBlock/splitBlock.test.ts | 2 +- .../commands/updateBlock/updateBlock.test.ts | 2 +- .../src/api/blockManipulation/setupTestEnv.ts | 2 +- .../blockManipulation/tables/tables.test.ts | 2 +- .../api/exporters/markdown/htmlToMarkdown.ts | 122 +- .../api/getBlocksChangedByTransaction.test.ts | 2 +- .../api/parsers/html/util/nestedLists.test.ts | 2 +- .../parsers/markdown/detectMarkdown.test.ts | 2 +- .../api/parsers/markdown/markdownToHtml.ts | 310 +- packages/core/src/api/positionMapping.test.ts | 2 +- packages/core/src/blocks/Code/block.test.ts | 21 +- .../ListItem/CheckListItem/block.test.ts | 2 +- .../NumberedListItem/IndexingPlugin.test.ts | 15 +- .../NumberedListItem/IndexingPlugin.ts | 97 +- packages/core/src/blocks/Table/block.ts | 6 +- .../threadstore/yjs/YjsThreadStore.test.ts | 2 +- .../core/src/editor/BlockNoteEditor.test.ts | 2 +- .../src/editor/BlockNoteExtension.test.ts | 2 +- packages/core/src/editor/performance.test.ts | 2 +- .../extensions/Collaboration/ForkYDoc.test.ts | 2 +- .../moveColorAttributes.test.ts | 2 +- .../PreviousBlockType.test.ts | 2 +- .../PreviousBlockType/PreviousBlockType.ts | 5 +- .../core/src/extensions/SideMenu/SideMenu.ts | 3 +- .../SuggestionMenu/SuggestionMenu.test.ts | 2 +- .../KeyboardShortcutsExtension.ts | 6 +- .../Link/helpers/autolink.ts | 18 +- .../Link/helpers/linkDetector.ts | 18 +- .../Link/helpers/whitespace.ts | 4 +- .../tiptap-extensions/Link/link.test.ts | 48 +- packages/core/src/schema/blocks/types.ts | 4 +- packages/core/src/util/topo-sort.test.ts | 2 +- packages/core/src/vite-env.d.ts | 2 +- packages/core/src/yjs/utils.test.ts | 2 +- packages/core/vite.config.bundled.ts | 2 +- packages/core/vite.config.ts | 2 +- packages/core/vitestSetup.ts | 2 +- packages/dev-scripts/examples/gen.ts | 12 + .../template-react/package.json.template.tsx | 10 +- .../template-react/tsconfig.json.template.tsx | 1 - .../vite.config.ts.template.tsx | 7 +- packages/dev-scripts/package.json | 13 +- packages/dev-scripts/tsconfig.json | 2 +- packages/mantine/package.json | 19 +- packages/mantine/tsconfig.json | 2 +- packages/mantine/vite.config.ts | 4 +- packages/react/package.json | 22 +- .../DefaultButtons/FileCaptionButton.tsx | 7 +- .../DefaultButtons/FileRenameButton.tsx | 7 +- .../components/Popovers/GenericPopover.tsx | 3 +- .../SuggestionMenu/SuggestionMenu.test.tsx | 2 +- .../TableHandles/TableHandlesController.tsx | 4 +- packages/react/src/schema/ReactBlockSpec.tsx | 8 +- packages/react/vite.config.ts | 4 +- packages/react/vitestSetup.ts | 2 +- packages/server-util/package.json | 20 +- .../src/context/ServerBlockNoteEditor.test.ts | 2 +- .../src/context/react/ReactServer.test.tsx | 2 +- packages/server-util/vite.config.ts | 2 +- packages/server-util/vitestSetup.ts | 2 +- packages/shadcn/package.json | 19 +- packages/shadcn/src/comments/Comment.tsx | 2 +- packages/shadcn/tsconfig.json | 2 +- packages/shadcn/vite.config.ts | 4 +- packages/xl-ai-server/package.json | 14 +- packages/xl-ai-server/vite.config.ts | 2 +- packages/xl-ai/package.json | 20 +- .../columnContainerDocumentState.test.ts | 2 +- .../formats/html-blocks/htmlBlocks.test.ts | 2 +- .../html-blocks/tools/getPartialHTML.test.ts | 2 +- .../api/formats/json/errorHandling.test.ts | 9 +- .../xl-ai/src/api/formats/json/json.test.ts | 2 +- .../api/formats/json/tools/jsontools.test.ts | 2 +- .../markdown-blocks/markdownBlocks.test.ts | 2 +- .../src/api/formats/tests/sharedTestCases.ts | 2 +- .../tests/validateTestEnvironment.test.ts | 2 +- .../src/api/schema/schemaToJSONSchema.test.ts | 2 +- packages/xl-ai/src/prosemirror/agent.test.ts | 2 +- .../xl-ai/src/prosemirror/changeset.test.ts | 2 +- .../src/prosemirror/fragmentUtil.test.ts | 2 +- .../xl-ai/src/prosemirror/rebaseTool.test.ts | 2 +- .../filterNewOrUpdatedOperations.test.ts | 2 +- .../streamTool/filterValidOperations.test.ts | 2 +- .../xl-ai/src/streamTool/preprocess.test.ts | 2 +- .../streamTool/toValidatedOperations.test.ts | 2 +- .../clientside/ClientSideTransport.ts | 6 +- .../vercelAiSdk/util/appendableStream.test.ts | 2 +- .../vercelAiSdk/util/chatHandlers.test.ts | 2 +- .../src/testUtil/suggestChangesTestUtil.ts | 2 +- packages/xl-ai/vite.config.ts | 2 +- packages/xl-ai/vitestSetup.ts | 2 +- packages/xl-docx-exporter/package.json | 22 +- .../src/docx/docxExporter.test.ts | 6 +- packages/xl-docx-exporter/src/vite-env.d.ts | 2 +- packages/xl-docx-exporter/tsconfig.json | 2 +- packages/xl-docx-exporter/vite.config.ts | 2 +- packages/xl-docx-exporter/vitestSetup.ts | 2 +- packages/xl-email-exporter/package.json | 20 +- .../react-email/reactEmailExporter.test.tsx | 2 +- packages/xl-email-exporter/src/vite-env.d.ts | 2 +- packages/xl-email-exporter/tsconfig.json | 2 +- packages/xl-email-exporter/vite.config.ts | 2 +- packages/xl-email-exporter/viteSetup.ts | 2 +- packages/xl-email-exporter/vitestSetup.ts | 2 +- packages/xl-multi-column/package.json | 22 +- .../src/test/commands/backspace.test.ts | 2 +- .../src/test/commands/insertBlocks.test.ts | 2 +- .../src/test/commands/moveBlocks.test.ts | 2 +- .../src/test/commands/removeBlocks.test.ts | 2 +- .../src/test/commands/replaceBlocks.test.ts | 2 +- .../src/test/commands/selection.test.ts | 2 +- .../test/commands/textCursorPosition.test.ts | 2 +- .../src/test/commands/updateBlock.test.ts | 2 +- .../test/commands/util/fixColumnLists.test.ts | 2 +- .../test/conversions/htmlConversion.test.ts | 2 +- .../test/conversions/nodeConversion.test.ts | 2 +- .../xl-multi-column/src/test/setupTestEnv.ts | 2 +- packages/xl-multi-column/src/vite-env.d.ts | 2 +- packages/xl-multi-column/vite.config.ts | 2 +- packages/xl-multi-column/vitestSetup.ts | 2 +- packages/xl-odt-exporter/package.json | 22 +- .../src/odt/odtExporter.test.ts | 2 +- packages/xl-odt-exporter/src/vite-env.d.ts | 2 +- packages/xl-odt-exporter/tsconfig.json | 2 +- packages/xl-odt-exporter/vite.config.ts | 2 +- packages/xl-odt-exporter/vitestSetup.ts | 2 +- packages/xl-pdf-exporter/package.json | 20 +- .../src/pdf/pdfExporter.test.tsx | 2 +- packages/xl-pdf-exporter/src/vite-env.d.ts | 2 +- packages/xl-pdf-exporter/tsconfig.json | 2 +- packages/xl-pdf-exporter/vite.config.ts | 2 +- packages/xl-pdf-exporter/vitestSetup.ts | 2 +- playground/package.json | 19 +- playground/src/examples.gen.tsx | 3508 +++++---- playground/src/vite-env.d.ts | 2 +- playground/tsconfig.json | 1 - playground/vite.config.ts | 109 +- pnpm-lock.yaml | 6294 +++++------------ pnpm-workspace.yaml | 23 +- shared/package.json | 5 - shared/tsconfig.json | 3 +- shared/vite-env.d.ts | 2 +- .../app/api/server-util/route.tsx | 7 +- tests/nextjs-test-app/app/layout.tsx | 6 +- tests/nextjs-test-app/package.json | 8 +- tests/nextjs-test-app/tsconfig.json | 10 +- tests/package.json | 16 +- tests/playwright/index.html | 2 +- tests/src/end-to-end/ai/ai-selection.test.ts | 108 +- .../unit/core/clipboard/copy/runTests.test.ts | 2 +- .../core/clipboard/copyPaste/runTests.test.ts | 2 +- .../copyPasteEquality/runTests.test.ts | 2 +- .../core/clipboard/paste/runTests.test.ts | 2 +- tests/src/unit/core/createTestEditor.ts | 2 +- .../formatConversion/export/runTests.test.ts | 2 +- .../exportParseEqualityTestInstances.ts | 3 +- .../exportParseEquality/runTests.test.ts | 2 +- .../formatConversion/parse/runTests.test.ts | 2 +- tests/src/unit/core/schema/runTests.test.ts | 2 +- .../selection/getSelection/runTests.test.ts | 2 +- .../incrementSelection/runTests.test.ts | 2 +- .../textCursorPosition/runTests.test.ts | 2 +- .../src/unit/core/typeGuards/runTests.test.ts | 2 +- tests/src/unit/nextjs/serverUtil.test.ts | 16 +- .../react/BlockNoteViewRapidRemount.test.tsx | 2 +- .../unit/react/BlockNoteViewRemount.test.tsx | 2 +- .../react/BlockNoteViewRemountHover.test.tsx | 2 +- .../formatConversion/export/runTests.test.ts | 2 +- .../exportParseEquality/runTests.test.ts | 2 +- tests/src/unit/react/setupTestEditor.tsx | 2 +- .../clipboard/copy/copyTestExecutors.ts | 2 +- .../copyPaste/copyPasteTestExecutors.ts | 2 +- .../copyPasteEqualityTestExecutors.ts | 2 +- .../clipboard/paste/pasteTestExecutors.ts | 2 +- .../export/exportTestExecutors.ts | 2 +- .../exportParseEqualityTestExecutors.ts | 6 +- .../parse/parseTestExecutors.ts | 2 +- .../getSelection/getSelectionTestExecutors.ts | 2 +- .../incrementSelectionTestExecutors.ts | 2 +- .../textCursorPositionTestExecutors.ts | 2 +- tests/vite.config.ts | 2 +- tests/vitestSetup.ts | 2 +- vite.config.ts | 78 + vitest.workspace.ts | 16 - 634 files changed, 6307 insertions(+), 9884 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .node-version delete mode 100644 .nvmrc delete mode 100644 .prettierrc create mode 100755 .vite-hooks/pre-commit create mode 100644 AGENTS.md delete mode 100644 docs/eslint.config.mjs delete mode 100644 examples/.eslintrc.js create mode 100644 vite.config.ts delete mode 100644 vitest.workspace.ts diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index e9511bbf61..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "react-app", - "react-app/jest" - ], - "parser": "@typescript-eslint/parser", - "plugins": ["import", "@typescript-eslint"], - "settings": { - "import/extensions": [".ts", ".cts", ".mts", ".tsx", ".js", ".jsx"], - "import/external-module-folders": ["node_modules", "node_modules/@types"], - "import/parsers": { - "@typescript-eslint/parser": [".ts", ".cts", ".mts", ".tsx"] - }, - "import/resolver": { - "node": { - "extensions": [".ts", ".cts", ".mts", ".tsx", ".js", ".jsx"] - } - } - }, - "ignorePatterns": ["**/ui/*"], - "rules": { - "no-console": "error", - "curly": 1, - "import/extensions": ["error", "always", { "ignorePackages": true }], - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": true, - "peerDependencies": true, - "optionalDependencies": false, - "bundledDependencies": false - } - ], - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-comment": "off", - "import/no-cycle": "error" - } -} diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f258f05126..d431145bc6 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,4 +3,4 @@ blank_issues_enabled: false contact_links: - name: Share an idea or suggest an enhancement url: https://github.com/TypeCellOS/BlockNote/discussions/categories/ideas-enhancements - about: Share feature ideas, enhancement suggestions, or other ideas for the BlockNote project. \ No newline at end of file + about: Share feature ideas, enhancement suggestions, or other ideas for the BlockNote project. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91b5ca0414..f4f8ed5f27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: with: cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - node-version-file: ".nvmrc" + node-version-file: ".node-version" - name: Cache NX uses: actions/cache@v5 @@ -86,7 +86,7 @@ jobs: with: cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - node-version-file: ".nvmrc" + node-version-file: ".node-version" - name: Cache NX uses: actions/cache@v5 @@ -138,7 +138,7 @@ jobs: with: cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - node-version-file: ".nvmrc" + node-version-file: ".node-version" - name: Download build artifacts uses: actions/download-artifact@v8 @@ -183,7 +183,7 @@ jobs: with: cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - node-version-file: ".nvmrc" + node-version-file: ".node-version" - name: Install dependencies run: pnpm install diff --git a/.github/workflows/fresh-install-tests.yml b/.github/workflows/fresh-install-tests.yml index 6d6ed4a452..7ca8775ceb 100644 --- a/.github/workflows/fresh-install-tests.yml +++ b/.github/workflows/fresh-install-tests.yml @@ -36,7 +36,7 @@ jobs: - id: setup_node uses: actions/setup-node@v6 with: - node-version-file: ".nvmrc" + node-version-file: ".node-version" # Intentionally no pnpm cache — we want fresh prod dep resolution - id: install_dependencies diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 280d5a5af1..9f2e5c8f30 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -51,7 +51,7 @@ jobs: with: cache: "pnpm" cache-dependency-path: "**/pnpm-lock.yaml" - node-version-file: ".nvmrc" + node-version-file: ".node-version" - name: Cache NX uses: actions/cache@v5 diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..5bf4400f22 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24.15.0 diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index c5ddcef4e7..0000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v22.14.0 \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0f4e5b7d67..0000000000 --- a/.prettierrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/prettierrc", - "semi": true, - "singleQuote": false, - "tabWidth": 2, - "printWidth": 80, - "trailingComma": "all", - "bracketSpacing": true, - "arrowParens": "always", - "endOfLine": "lf", - "plugins": ["prettier-plugin-tailwindcss"] -} diff --git a/.vite-hooks/pre-commit b/.vite-hooks/pre-commit new file mode 100755 index 0000000000..85fb65b4fc --- /dev/null +++ b/.vite-hooks/pre-commit @@ -0,0 +1 @@ +vp staged diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..ef041769ab --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,15 @@ + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/. + +## Review Checklist + +- [ ] Run `vp install` after pulling remote changes and before getting started. +- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes. +- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run