From eec166b5c94fce5f8ad7ba1f24d9b5fc48eb3709 Mon Sep 17 00:00:00 2001 From: olliethedev <3martynov@gmail.com> Date: Fri, 6 Mar 2026 15:56:32 -0500 Subject: [PATCH 1/6] chore: update copy-stack-src script and CSS imports in demo projects to use app directory for stack sources --- demos/ai-chat/app/globals.css | 8 +------- demos/ai-chat/copy-stack-src.mjs | 4 ++-- demos/blog/app/globals.css | 8 +------- demos/blog/copy-stack-src.mjs | 4 ++-- demos/cms/app/globals.css | 8 +------- demos/cms/copy-stack-src.mjs | 4 ++-- demos/form-builder/app/globals.css | 8 +------- demos/form-builder/copy-stack-src.mjs | 4 ++-- demos/kanban/app/globals.css | 8 +------- demos/kanban/copy-stack-src.mjs | 4 ++-- demos/ui-builder/app/globals.css | 8 +------- demos/ui-builder/copy-stack-src.mjs | 4 ++-- 12 files changed, 18 insertions(+), 54 deletions(-) diff --git a/demos/ai-chat/app/globals.css b/demos/ai-chat/app/globals.css index df29e2c..cb3aa81 100644 --- a/demos/ai-chat/app/globals.css +++ b/demos/ai-chat/app/globals.css @@ -2,15 +2,9 @@ @import "tw-animate-css"; @import "@btst/stack/plugins/ai-chat/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/ai-chat/copy-stack-src.mjs b/demos/ai-chat/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/ai-chat/copy-stack-src.mjs +++ b/demos/ai-chat/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose diff --git a/demos/blog/app/globals.css b/demos/blog/app/globals.css index 2829890..e183a2c 100644 --- a/demos/blog/app/globals.css +++ b/demos/blog/app/globals.css @@ -2,15 +2,9 @@ @import "tw-animate-css"; @import "@btst/stack/plugins/blog/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/blog/copy-stack-src.mjs b/demos/blog/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/blog/copy-stack-src.mjs +++ b/demos/blog/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose diff --git a/demos/cms/app/globals.css b/demos/cms/app/globals.css index 5b5e523..e14b130 100644 --- a/demos/cms/app/globals.css +++ b/demos/cms/app/globals.css @@ -2,15 +2,9 @@ @import "tw-animate-css"; @import "@btst/stack/plugins/cms/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/cms/copy-stack-src.mjs b/demos/cms/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/cms/copy-stack-src.mjs +++ b/demos/cms/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose diff --git a/demos/form-builder/app/globals.css b/demos/form-builder/app/globals.css index dc6bac3..1d963b6 100644 --- a/demos/form-builder/app/globals.css +++ b/demos/form-builder/app/globals.css @@ -2,15 +2,9 @@ @import "tw-animate-css"; @import "@btst/stack/plugins/form-builder/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/form-builder/copy-stack-src.mjs b/demos/form-builder/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/form-builder/copy-stack-src.mjs +++ b/demos/form-builder/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose diff --git a/demos/kanban/app/globals.css b/demos/kanban/app/globals.css index f0d3457..b6e5c6c 100644 --- a/demos/kanban/app/globals.css +++ b/demos/kanban/app/globals.css @@ -2,15 +2,9 @@ @import "tw-animate-css"; @import "@btst/stack/plugins/kanban/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/kanban/copy-stack-src.mjs b/demos/kanban/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/kanban/copy-stack-src.mjs +++ b/demos/kanban/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose diff --git a/demos/ui-builder/app/globals.css b/demos/ui-builder/app/globals.css index eaf9e8f..e1c6494 100644 --- a/demos/ui-builder/app/globals.css +++ b/demos/ui-builder/app/globals.css @@ -3,15 +3,9 @@ @import "@btst/stack/plugins/ui-builder/css"; @import "@btst/stack/plugins/cms/css"; @import "@btst/stack/plugins/route-docs/css"; -/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules - * (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs - * (run via predev/prebuild) copies @btst/stack/src outside node_modules so Tailwind - * can scan it. Safe to remove once the upstream bug is fixed. */ +/* WebContainers workaround: the WASM Tailwind scanner cannot traverse node_modules (https://github.com/tailwindlabs/tailwindcss/issues/18418). copy-stack-src.mjs (run via dev/build) copies @btst/stack/src outside node_modules so Tailwind can scan it. Safe to remove once the upstream bug is fixed. */ @source "./.btst-stack-src/**/*.{ts,tsx}"; @source "./.btst-stack-ui/**/*.{ts,tsx}"; -/* Monorepo fallback: direct source path used in local development */ -@source "../../../packages/stack/src/**/*.{ts,tsx}"; -@source "../../../packages/ui/src/**/*.{ts,tsx}"; @custom-variant dark (&:is(.dark *)); diff --git a/demos/ui-builder/copy-stack-src.mjs b/demos/ui-builder/copy-stack-src.mjs index dc457f0..eca1c4d 100644 --- a/demos/ui-builder/copy-stack-src.mjs +++ b/demos/ui-builder/copy-stack-src.mjs @@ -12,10 +12,10 @@ import { cp, mkdir, rm } from "fs/promises"; import { existsSync } from "fs"; const src = "node_modules/@btst/stack/src"; -const dest = ".btst-stack-src"; +const dest = "app/.btst-stack-src"; const uiSrc = "node_modules/@btst/stack/dist/packages/ui"; -const uiDest = ".btst-stack-ui"; +const uiDest = "app/.btst-stack-ui"; if (!existsSync(src)) { // Likely running in the monorepo where the workspace symlink does not expose From 4cfa6df471d2779fd3ab302044d125824aa167c5 Mon Sep 17 00:00:00 2001 From: olliethedev <3martynov@gmail.com> Date: Fri, 6 Mar 2026 15:56:52 -0500 Subject: [PATCH 2/6] fix: update key for UIBuilderPluginOverrides in demo project --- demos/ui-builder/app/pages/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/ui-builder/app/pages/layout.tsx b/demos/ui-builder/app/pages/layout.tsx index 546ab68..3c5e1d7 100644 --- a/demos/ui-builder/app/pages/layout.tsx +++ b/demos/ui-builder/app/pages/layout.tsx @@ -10,7 +10,7 @@ import { getOrCreateQueryClient } from "@/lib/query-client"; type PluginOverrides = { cms: CMSPluginOverrides; - uiBuilder: UIBuilderPluginOverrides; + "ui-builder": UIBuilderPluginOverrides; }; export default function PagesLayout({ @@ -39,7 +39,7 @@ export default function PagesLayout({ ), }, - uiBuilder: { + "ui-builder": { apiBaseURL: baseURL, apiBasePath: "/api/data", navigate: (path) => router.push(path), From 029ee91966e860cde4a1f6f9a77b217047c59d3f Mon Sep 17 00:00:00 2001 From: olliethedev <3martynov@gmail.com> Date: Fri, 6 Mar 2026 16:07:49 -0500 Subject: [PATCH 3/6] fix: update redirect and links in form-builder demo to point to new forms page --- demos/form-builder/app/pages/layout.tsx | 8 ++++---- demos/form-builder/next.config.ts | 4 +--- docs/content/docs/demos/form-builder.mdx | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/demos/form-builder/app/pages/layout.tsx b/demos/form-builder/app/pages/layout.tsx index 44d84d9..ad85f24 100644 --- a/demos/form-builder/app/pages/layout.tsx +++ b/demos/form-builder/app/pages/layout.tsx @@ -7,7 +7,7 @@ import { StackProvider } from "@btst/stack/context"; import type { FormBuilderPluginOverrides } from "@btst/stack/plugins/form-builder/client"; import { getOrCreateQueryClient } from "@/lib/query-client"; -type PluginOverrides = { formBuilder: FormBuilderPluginOverrides }; +type PluginOverrides = { "form-builder": FormBuilderPluginOverrides }; export default function PagesLayout({ children, @@ -26,7 +26,7 @@ export default function PagesLayout({ basePath="/pages" overrides={{ - formBuilder: { + "form-builder": { apiBaseURL: baseURL, apiBasePath: "/api/data", navigate: (path) => router.push(path), @@ -41,14 +41,14 @@ export default function PagesLayout({