From 8a7c4875bf2dc97a1cdde33fad15b04cd4d53320 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Wed, 15 Jul 2026 12:12:33 +0200 Subject: [PATCH] Revert "chore(merge): resolve v2 conflicts" This reverts commit 377f2f6a20a44619324fbc7046b79feb05956411, reversing changes made to 7e4cb0201b4d45a9f55a601e65b7447d8477fc33. --- .env.example | 9 +- .github/act/workshop.md | 19 - .github/workflows/deployment-docs.yml | 56 + .github/workflows/deployment-workshop.yml | 47 - .opencode/changelog/2026-07-03.md | 28 - .opencode/changelog/2026-07-06.md | 9 - AGENTS.md | 2 - PRODUCT.md | 35 - apps/docs/components.json | 24 - apps/docs/docs/management/workshop/index.mdx | 59 - apps/docs/docusaurus.config.ts | 29 +- apps/docs/package.json | 10 +- apps/docs/src/components/ui/badge.tsx | 56 +- apps/docs/src/components/ui/button.tsx | 50 - apps/docs/src/components/ui/card.tsx | 70 - apps/docs/src/components/ui/dialog.tsx | 134 - apps/docs/src/components/ui/header.tsx | 4 +- apps/docs/src/components/ui/input.tsx | 20 - apps/docs/src/components/ui/select.tsx | 167 - apps/docs/src/components/ui/separator.tsx | 19 - apps/docs/src/components/ui/textarea.tsx | 18 - .../components/workshop/DetailComments.tsx | 178 - .../src/components/workshop/DetailPage.tsx | 361 - .../components/workshop/DetailSections.tsx | 123 - .../src/components/workshop/SubmitForm.tsx | 542 - .../src/components/workshop/WorkshopApp.tsx | 523 - apps/docs/src/components/workshop/format.ts | 6 - .../src/components/workshop/useWorkshop.ts | 349 - .../src/components/workshop/workshop-utils.ts | 16 - apps/docs/src/css/custom.css | 193 +- apps/docs/src/lib/pocketbase.ts | 52 - apps/docs/src/lib/utils.ts | 11 - apps/docs/src/lib/workshop-schema.spec.ts | 49 - apps/docs/src/lib/workshop-schema.ts | 78 - apps/docs/src/pages/workshop/index.tsx | 22 - apps/docs/tsconfig.json | 1 - .../boards/[name]/settings/_customCss.tsx | 4 +- .../custom-widgets/_copy-ai-prompt-button.tsx | 8 +- .../custom-widgets/_custom-widget-form.tsx | 112 - .../custom-widgets/_custom-widget-list.tsx | 57 +- .../[locale]/manage/custom-widgets/page.tsx | 2 - .../install-from-workshop-buttons.tsx | 98 - .../workshop-install/workshop-api.ts | 47 - .../workshop-browser-modal.tsx | 221 - apps/workshop/.gitignore | 3 - apps/workshop/Dockerfile | 54 - apps/workshop/Dockerfile.dockerignore | 15 - apps/workshop/README.md | 80 - apps/workshop/docker-compose.yml | 28 - apps/workshop/pb_hooks/workshop.pb.js | 75 - .../pb_migrations/1750000000_init_workshop.js | 172 - .../1750000002_marketplace_view.js | 49 - apps/workshop/scripts/smoke-test.sh | 30 - package.json | 3 - packages/translation/src/lang/en.json | 18 +- pnpm-lock.yaml | 30500 ++++++---------- pnpm-workspace.yaml | 11 +- scripts/ci/workshop-act.sh | 22 - 58 files changed, 11115 insertions(+), 23863 deletions(-) delete mode 100644 .github/act/workshop.md create mode 100644 .github/workflows/deployment-docs.yml delete mode 100644 .github/workflows/deployment-workshop.yml delete mode 100644 .opencode/changelog/2026-07-03.md delete mode 100644 .opencode/changelog/2026-07-06.md delete mode 100644 PRODUCT.md delete mode 100644 apps/docs/components.json delete mode 100644 apps/docs/docs/management/workshop/index.mdx delete mode 100644 apps/docs/src/components/ui/button.tsx delete mode 100644 apps/docs/src/components/ui/card.tsx delete mode 100644 apps/docs/src/components/ui/dialog.tsx delete mode 100644 apps/docs/src/components/ui/input.tsx delete mode 100644 apps/docs/src/components/ui/select.tsx delete mode 100644 apps/docs/src/components/ui/separator.tsx delete mode 100644 apps/docs/src/components/ui/textarea.tsx delete mode 100644 apps/docs/src/components/workshop/DetailComments.tsx delete mode 100644 apps/docs/src/components/workshop/DetailPage.tsx delete mode 100644 apps/docs/src/components/workshop/DetailSections.tsx delete mode 100644 apps/docs/src/components/workshop/SubmitForm.tsx delete mode 100644 apps/docs/src/components/workshop/WorkshopApp.tsx delete mode 100644 apps/docs/src/components/workshop/format.ts delete mode 100644 apps/docs/src/components/workshop/useWorkshop.ts delete mode 100644 apps/docs/src/components/workshop/workshop-utils.ts delete mode 100644 apps/docs/src/lib/pocketbase.ts delete mode 100644 apps/docs/src/lib/utils.ts delete mode 100644 apps/docs/src/lib/workshop-schema.spec.ts delete mode 100644 apps/docs/src/lib/workshop-schema.ts delete mode 100644 apps/docs/src/pages/workshop/index.tsx delete mode 100644 apps/nextjs/src/components/workshop-install/install-from-workshop-buttons.tsx delete mode 100644 apps/nextjs/src/components/workshop-install/workshop-api.ts delete mode 100644 apps/nextjs/src/components/workshop-install/workshop-browser-modal.tsx delete mode 100644 apps/workshop/.gitignore delete mode 100644 apps/workshop/Dockerfile delete mode 100644 apps/workshop/Dockerfile.dockerignore delete mode 100644 apps/workshop/README.md delete mode 100644 apps/workshop/docker-compose.yml delete mode 100644 apps/workshop/pb_hooks/workshop.pb.js delete mode 100644 apps/workshop/pb_migrations/1750000000_init_workshop.js delete mode 100644 apps/workshop/pb_migrations/1750000002_marketplace_view.js delete mode 100755 apps/workshop/scripts/smoke-test.sh delete mode 100755 scripts/ci/workshop-act.sh diff --git a/.env.example b/.env.example index a6ca0698d..22dca3adb 100644 --- a/.env.example +++ b/.env.example @@ -66,11 +66,4 @@ UNSAFE_ENABLE_MOCK_INTEGRATION=true # Whether demo mode is read-only. Defaults to true (the public demo blocks all mutations). # Set to false for writable preview deployments so the demo user can modify the dashboard. -# DEMO_READ_ONLY=false - -# Community workshop (PocketBase) base URL used by the in-app "Install from Workshop" buttons -# Workshop API override for local Homarr development: -# NEXT_PUBLIC_WORKSHOP_API_URL=http://localhost:8090 -# Docs site workshop URL used for "Open Workshop" links -# In production this defaults to https://homarr.dev/workshop -# NEXT_PUBLIC_WORKSHOP_URL=http://localhost:3003/workshop +# DEMO_READ_ONLY=false \ No newline at end of file diff --git a/.github/act/workshop.md b/.github/act/workshop.md deleted file mode 100644 index a0746d4aa..000000000 --- a/.github/act/workshop.md +++ /dev/null @@ -1,19 +0,0 @@ -# Workshop deployment with ACT - -The Workshop workflow builds the same image used on the VPS and smoke-tests both Docusaurus and PocketBase. Registry login and pushes are skipped under ACT. - -From the repository root: - -```sh -pnpm ci:act:workshop -``` - -The wrapper selects `.github/workflows/deployment-workshop.yml`, derives the active Docker socket (including Docker Desktop and OrbStack contexts), and runs only the `deploy` job using a `workflow_dispatch` event. - -To inspect the workflow without running it: - -```sh -act workflow_dispatch --list --workflows .github/workflows/deployment-workshop.yml -``` - -No GitHub or registry secrets are required for the local run. diff --git a/.github/workflows/deployment-docs.yml b/.github/workflows/deployment-docs.yml new file mode 100644 index 000000000..eeb53d101 --- /dev/null +++ b/.github/workflows/deployment-docs.yml @@ -0,0 +1,56 @@ +name: "[Deployment] Documentation" + +on: + push: + branches: ["dev"] + paths: + - "apps/docs/**" + - "packages/definitions/src/docs/**" + - ".github/workflows/deployment-docs.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +env: + SKIP_ENV_VALIDATION: true + TURBO_API: ${{ secrets.TURBO_API }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + - name: Setup + uses: ./tooling/github/setup + - name: Build docs + run: pnpm turbo build --filter=@homarr/docs + env: + CI: "true" + - name: Setup Pages + uses: actions/configure-pages@v6 + - name: Upload pages artifact + uses: actions/upload-pages-artifact@v5 + with: + path: "apps/docs/build" + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/deployment-workshop.yml b/.github/workflows/deployment-workshop.yml deleted file mode 100644 index 621c4609c..000000000 --- a/.github/workflows/deployment-workshop.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "[Deployment] Workshop" - -on: - push: - branches: ["dev"] - paths: - - "apps/docs/**" - - "apps/workshop/**" - workflow_dispatch: - -permissions: - contents: read - packages: write - -concurrency: - group: workshop-deployment - cancel-in-progress: true - -jobs: - deploy: - name: Build, test, and publish - runs-on: ubuntu-latest - timeout-minutes: 25 - env: - LOCAL_IMAGE: homarr/workshop:ci - REGISTRY_IMAGE: ghcr.io/homarr-labs/workshop - steps: - - name: Check out repository - uses: actions/checkout@v7 - - - name: Build combined Workshop image - run: docker build --file apps/workshop/Dockerfile --tag "$LOCAL_IMAGE" . - - - name: Smoke-test static docs and PocketBase - run: bash apps/workshop/scripts/smoke-test.sh "$LOCAL_IMAGE" - - - name: Log in to GitHub Container Registry - if: ${{ env.ACT != 'true' }} - run: echo "${{ github.token }}" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin - - - name: Publish immutable and latest tags - if: ${{ env.ACT != 'true' }} - run: | - docker tag "$LOCAL_IMAGE" "$REGISTRY_IMAGE:sha-${GITHUB_SHA}" - docker tag "$LOCAL_IMAGE" "$REGISTRY_IMAGE:latest" - docker push "$REGISTRY_IMAGE:sha-${GITHUB_SHA}" - docker push "$REGISTRY_IMAGE:latest" diff --git a/.opencode/changelog/2026-07-03.md b/.opencode/changelog/2026-07-03.md deleted file mode 100644 index 114755375..000000000 --- a/.opencode/changelog/2026-07-03.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changes — 2026-07-03 - -## PR #5984 Review And Dev Merge Fixes - -- **Why**: Make `feat/widget-store` mergeable with `dev` and address CodeRabbit review feedback before requesting another review. -- **What**: Merged `origin/dev`, resolved `apps/docs/package.json` and `pnpm-lock.yaml`, and fixed workshop vote state handling, 404-only vote recovery, PocketBase filename URL encoding, required widget `$schema` validation, install-button localization, public author email fallback, placeholder product copy, and workshop safety/submission guidance. -- **Files**: `apps/docs/src/components/store/useStore.ts`, `apps/docs/src/lib/pocketbase.ts`, `apps/docs/src/lib/store-schema.ts`, `apps/docs/src/lib/store-schema.spec.ts`, `apps/nextjs/src/components/store-install/install-from-store-buttons.tsx`, `packages/translation/src/lang/en.json`, `apps/store/pb_migrations/1750000002_marketplace_view.js`, `apps/docs/docs/management/store/index.mdx`, `PRODUCT.md`, `pnpm-lock.yaml`, `apps/docs/package.json`. -- **Tests**: `pnpm lint` passed with warnings, `pnpm typecheck` passed, `pnpm exec vitest run apps/docs/src/lib/store-schema.spec.ts` passed. Full `pnpm test` failed on unrelated timeout/external-dependency tests: Immich icon fetch, Pi-hole container, MySQL migration, and Nextcloud hook. -- **Docs**: Updated workshop management docs with a stronger safety warning and submission guidelines. -- **Risks**: The commit includes a large required `dev` merge, so review should distinguish upstream merge changes from the scoped CodeRabbit fixes. - -## PR #5984 Additional CodeRabbit Fixes - -- **Why**: Resolve the remaining actionable CodeRabbit comments before requesting Copilot review. -- **What**: Commented out opt-in example env flags, pinned the PocketBase image, ignored store-local env files, documented PocketBase admin bootstrap vars, enabled GitHub OAuth only when credentials are present, indexed `comments.submission`, added reduced-motion handling for submit-step animation, added accessible comment action labels, used created vote records directly on detail pages, tracked copy-failure timers for cleanup, prevented screenshot carousel controls from navigating card links, and normalized the `useStore` utils import alias. -- **Files**: `.env.example`, `apps/store/docker-compose.yml`, `apps/store/.gitignore`, `apps/store/README.md`, `apps/store/pb_migrations/1750000000_init_store.js`, `apps/docs/src/css/custom.css`, `apps/docs/src/components/store/DetailPage.tsx`, `apps/docs/src/components/store/StoreApp.tsx`, `apps/docs/src/components/store/useStore.ts`. -- **Tests**: `pnpm --filter @homarr/docs typecheck`, `pnpm --filter @homarr/docs lint`, `pnpm --filter nextjs typecheck`, and `pnpm exec vitest run apps/docs/src/lib/store-schema.spec.ts` passed; docs lint still reports pre-existing warnings outside this fix set. -- **Docs**: Updated `apps/store/README.md` with admin bootstrap variables. -- **Risks**: PocketBase image pin assumes `ghcr.io/muchobien/pocketbase:0.26.2` remains the intended runtime version for this new store service. - -## PR #5984 Final Review Stability Fix - -- **Why**: Address CodeRabbit's remaining outside-diff stability comments before the final push. -- **What**: Updated `useStore` to await PocketBase auth refresh before loading workshop data and to return `null` from `requireUserId` on auth failures, allowing vote lock cleanup to run. -- **Files**: `apps/docs/src/components/store/useStore.ts`, `.opencode/changelog/2026-07-03.md`. -- **Tests**: `pnpm --filter @homarr/docs typecheck`, `pnpm --filter @homarr/docs lint`, and `pnpm exec vitest run apps/docs/src/lib/store-schema.spec.ts` passed; docs lint still reports pre-existing warnings outside this fix. -- **Docs**: Changelog updated only. -- **Risks**: Low; the change preserves existing auth refresh behavior but sequences initial loading after auth state is known. diff --git a/.opencode/changelog/2026-07-06.md b/.opencode/changelog/2026-07-06.md deleted file mode 100644 index 0d8361fad..000000000 --- a/.opencode/changelog/2026-07-06.md +++ /dev/null @@ -1,9 +0,0 @@ -# Changes — 2026-07-06 - -## Workshop Review Cleanup -- **Why**: Address PR review feedback to use Day.js for date/time logic, split the oversized detail component, and avoid duplicated workshop helpers. -- **What**: Added shared Day.js relative-time formatting, shared download/vote helpers, extracted detail comments and detail UI sections into separate components, and recorded the Day.js/shared-helper convention in `AGENTS.md`. -- **Files**: `apps/docs/src/components/store/DetailPage.tsx`, `apps/docs/src/components/store/StoreApp.tsx`, `apps/docs/src/components/store/useStore.ts`, `apps/docs/src/components/store/DetailComments.tsx`, `apps/docs/src/components/store/DetailSections.tsx`, `apps/docs/src/components/store/format.ts`, `apps/docs/src/components/store/store-utils.ts`, `AGENTS.md` -- **Tests**: `pnpm --filter @homarr/docs typecheck`; `pnpm --filter @homarr/docs lint`; targeted `oxfmt --check` for changed store files. -- **Docs**: Updated `AGENTS.md` with date/time and shared-helper conventions. -- **Risks**: Refactor moves code without intentional behavior changes; UI smoke testing in browser not run. diff --git a/AGENTS.md b/AGENTS.md index 265f7fe07..be1afe9fb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -81,5 +81,3 @@ When modifying user-facing code, you MUST also update the corresponding document - UI: Mantine (not Tailwind) — Tailwind is only used in docs app - Icons: @tabler/icons-react - Docs app can import from `@homarr/definitions` for shared types -- Use `dayjs` for date/time formatting or comparisons; do not hand-roll relative time or date math. -- Extract shared helpers/components when the same logic appears in multiple workshop/store files. diff --git a/PRODUCT.md b/PRODUCT.md deleted file mode 100644 index 629b0abb5..000000000 --- a/PRODUCT.md +++ /dev/null @@ -1,35 +0,0 @@ -# Product - -## Register - -GitHub OAuth is used for workshop accounts so community members can submit, vote on, comment on, and report shared widgets or CSS themes without creating a separate Homarr-specific identity. - -## Users - -Self-hosting enthusiasts managing homelab services. Technical users comfortable with Docker, APIs, and configuration files. They use Homarr as a personal dashboard to monitor and control 50+ services (media servers, DNS, NAS, download clients). Context: desktop browser, often on a local network, task-focused. - -## Product Purpose - -Homarr is a self-hosted dashboard for homelab management. It aggregates service status, media libraries, system stats, and administrative controls into a single drag-and-drop interface with 39+ widgets. The marketplace extension lets users share and install custom widgets and CSS themes created by the community. - -## Brand Personality - -Practical, capable, community-driven. - -## Anti-references - -- Generic SaaS landing pages with gradient hero sections and metric grids -- Overly corporate enterprise dashboards (ServiceNow, Salesforce) -- Cluttered "hacker" UIs with no visual hierarchy - -## Design Principles - -1. **Tool disappears into the task.** The interface should feel invisible; users came to manage their homelab, not admire the dashboard. -2. **Density when it earns it.** Show useful information compactly; don't spread thin content across oversized cards. -3. **Community first.** Sharing, voting, and installing should feel effortless and trustworthy. -4. **Consistency across surfaces.** The marketplace in the docs app should feel like it belongs to the same product as the main Next.js app. -5. **Respect the user's time.** Fast loads, instant feedback, no choreographed animations. - -## Accessibility & Inclusion - -WCAG 2.1 AA. Support for reduced motion. Sufficient contrast ratios (4.5:1 body text, 3:1 large text). Keyboard navigable. diff --git a/apps/docs/components.json b/apps/docs/components.json deleted file mode 100644 index 15e244db4..000000000 --- a/apps/docs/components.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "base-nova", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "", - "css": "src/css/custom.css", - "baseColor": "mist", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - }, - "iconLibrary": "tabler", - "rtl": false, - "menuColor": "default", - "menuAccent": "subtle" -} diff --git a/apps/docs/docs/management/workshop/index.mdx b/apps/docs/docs/management/workshop/index.mdx deleted file mode 100644 index c187e2f99..000000000 --- a/apps/docs/docs/management/workshop/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -tags: - - Workshop - - Custom Widgets - - Custom CSS ---- - -# Community Workshop - -The [Community Workshop](pathname:///workshop) is where Homarr users share and discover -**custom CSS themes** and **custom widgets**. You can browse submissions, upvote the ones -you like, report abuse, and install entries directly into your own Homarr instance. - -:::warning - -The workshop contains community-made content. Widgets may contain unwanted or malicious content and it is your duty to check & verify safety of the content. While we try to remove malicious content as best as we can, we take no responsibility. Always review the widget JSON and all CSS before installing it on your instance and take frequent backups as prevention measures. - -::: - -## Browsing and voting - -- Filter by **Widgets** or **CSS**, and sort by **Top rated** or **Newest**. -- Sign in with **GitHub** to upvote/downvote, submit your own creations, or report a submission. -- Each submission shows its title, description, author, version, an optional screenshot, and the full content. - -## Submitting - -1. Sign in with GitHub. -2. Click **Submit** and choose the type: - - **Custom widget** — paste the JSON exported from **Manage → Custom Widgets → Export**. - It must match the `homarr-custom-widget-v2` schema (validated before submission). - - **Custom CSS** — paste your stylesheet (max 16384 characters). -3. Add a title, description, optional screenshot, and changelog, then submit. - -Submissions are published immediately. Reported entries are reviewed and may be removed. - -## Submission guidelines - -Submissions must be useful to Homarr users and safe to install. Do not submit content that is -malicious, deceptive, illegal, hateful, sexually explicit, gore, gambling-focused, spam, or content -that primarily promotes unrelated products or services. - -## Installing into Homarr - -You can install workshop entries without leaving Homarr: - -- **Custom widgets** — go to **Manage → Custom Widgets**, click **Install from Workshop**, pick an - entry, and it is imported (secrets such as API keys must be re-entered afterwards). -- **Custom CSS** — open a board's **Settings → Custom CSS**, click **Install from Workshop**, and - pick a theme to load it into the editor before saving. - -Alternatively, use **Copy** (or **Download** for widgets) on any submission and import it -manually. - -## Workshop deployment - -Workshop is powered by [PocketBase](https://pocketbase.io). The production image compiles the current Docusaurus site and serves it together with the API from one origin. The deployment lives in `apps/workshop/` with a Dockerfile, Compose configuration, version-controlled migrations, hooks, a smoke test, and ACT-local workflow instructions. - -Homarr instances use `NEXT_PUBLIC_WORKSHOP_API_URL` to reach the central API and `NEXT_PUBLIC_WORKSHOP_URL` for links to the public page. Docusaurus uses `WORKSHOP_URL` only when its development server runs separately; the combined production image always uses its own origin. diff --git a/apps/docs/docusaurus.config.ts b/apps/docs/docusaurus.config.ts index 62384c741..0edf8a8f3 100644 --- a/apps/docs/docusaurus.config.ts +++ b/apps/docs/docusaurus.config.ts @@ -20,11 +20,6 @@ const config: Config = { onBrokenAnchors: "throw", onDuplicateRoutes: "throw", - customFields: { - // Empty means same-origin, which is the production Workshop image shape. - workshopUrl: process.env.WORKSHOP_URL ?? "", - }, - future: { v4: { removeLegacyPostBuildHeadAttribute: true, @@ -129,11 +124,6 @@ const config: Config = { position: "left", to: "/blog", }, - { - label: "Workshop", - position: "left", - to: "/workshop", - }, { label: "About us", position: "left", @@ -288,12 +278,7 @@ const config: Config = { return { name: "resolve-homarr-packages", configureWebpack() { - return { - resolve: { - symlinks: false, - alias: { "@": require("path").resolve(__dirname, "src") }, - }, - }; + return { resolve: { symlinks: false } }; }, }; }, @@ -324,18 +309,6 @@ const config: Config = { }, }; }, - function workshopDetailRoutePlugin() { - return { - name: "workshop-detail-route", - async contentLoaded({ actions }) { - actions.addRoute({ - path: "/workshop/:id", - component: "@site/src/components/workshop/DetailPage", - exact: true, - }); - }, - }; - }, "@signalwire/docusaurus-plugin-llms-txt", async function tailwindCssPlugin() { return { diff --git a/apps/docs/package.json b/apps/docs/package.json index a38e620fc..a627a4d37 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -21,7 +21,6 @@ "verify:search": "node ./scripts/verify-algolia-search.mjs" }, "dependencies": { - "@base-ui/react": "catalog:", "@docusaurus/core": "^3.10.1", "@docusaurus/faster": "^3.10.1", "@docusaurus/plugin-content-docs": "^3.10.1", @@ -34,12 +33,10 @@ "@signalwire/docusaurus-plugin-llms-txt": "^1.2.2", "@tabler/icons-react": "catalog:", "@tailwindcss/postcss": "^4.3.2", - "class-variance-authority": "catalog:", "clsx": "catalog:", "dayjs": "catalog:", "docusaurus-plugin-image-zoom": "^3.0.1", "leader-line-new": "^1.1.9", - "pocketbase": "catalog:", "postcss": "^8.5.16", "posthog-docusaurus": "^2.0.5", "prism-react-renderer": "^2.4.1", @@ -47,9 +44,7 @@ "react": "catalog:", "react-dom": "catalog:", "swiper": "^14.0.5", - "tailwind-merge": "catalog:", - "tailwindcss": "^4.3.2", - "zod": "catalog:" + "tailwindcss": "^4.3.2" }, "devDependencies": { "@docusaurus/module-type-aliases": "^3.10.1", @@ -60,7 +55,8 @@ "@types/react": "catalog:", "@types/react-dom": "catalog:", "cheerio": "^1.2.0", - "typescript": "catalog:" + "typescript": "catalog:", + "zod": "catalog:" }, "peerDependencies": { "@docusaurus/theme-common": "^3.10.1", diff --git a/apps/docs/src/components/ui/badge.tsx b/apps/docs/src/components/ui/badge.tsx index e1997af40..5776a59c3 100644 --- a/apps/docs/src/components/ui/badge.tsx +++ b/apps/docs/src/components/ui/badge.tsx @@ -1,49 +1,13 @@ -import { mergeProps } from "@base-ui/react/merge-props"; -import { useRender } from "@base-ui/react/use-render"; -import { cva, type VariantProps } from "class-variance-authority"; +import { ReactNode } from "react"; -import { cn } from "@/lib/utils"; - -const badgeVariants = cva( - "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80", - secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80", - destructive: - "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20", - outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground", - ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50", - link: "text-primary underline-offset-4 hover:underline", - }, - }, - defaultVariants: { - variant: "default", - }, - }, -); - -function Badge({ - className, - variant = "default", - render, - ...props -}: useRender.ComponentProps<"span"> & VariantProps) { - return useRender({ - defaultTagName: "span", - props: mergeProps<"span">( - { - className: cn(badgeVariants({ variant }), className), - }, - props, - ), - render, - state: { - slot: "badge", - variant, - }, - }); +interface BadgeProps { + children: ReactNode; } -export { Badge, badgeVariants }; +export const Badge = ({ children }: BadgeProps) => { + return ( + + {children} + + ); +}; diff --git a/apps/docs/src/components/ui/button.tsx b/apps/docs/src/components/ui/button.tsx deleted file mode 100644 index 914b2251f..000000000 --- a/apps/docs/src/components/ui/button.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Button as ButtonPrimitive } from "@base-ui/react/button"; -import { cva, type VariantProps } from "class-variance-authority"; - -import { cn } from "@/lib/utils"; - -const buttonVariants = cva( - "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/80", - outline: - "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50", - secondary: - "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground", - ghost: - "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50", - destructive: - "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", - xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3", - sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5", - lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", - icon: "size-8", - "icon-xs": - "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3", - "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg", - "icon-lg": "size-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - }, -); - -function Button({ - className, - variant = "default", - size = "default", - ...props -}: ButtonPrimitive.Props & VariantProps) { - return ; -} - -export { Button, buttonVariants }; diff --git a/apps/docs/src/components/ui/card.tsx b/apps/docs/src/components/ui/card.tsx deleted file mode 100644 index 9ac0597c8..000000000 --- a/apps/docs/src/components/ui/card.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import * as React from "react"; - -import { cn } from "@/lib/utils"; - -function Card({ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) { - return ( -
img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", - className, - )} - {...props} - /> - ); -} - -function CardHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ); -} - -function CardTitle({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ); -} - -function CardDescription({ className, ...props }: React.ComponentProps<"div">) { - return
; -} - -function CardAction({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ); -} - -function CardContent({ className, ...props }: React.ComponentProps<"div">) { - return
; -} - -function CardFooter({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ); -} - -export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent }; diff --git a/apps/docs/src/components/ui/dialog.tsx b/apps/docs/src/components/ui/dialog.tsx deleted file mode 100644 index 1794a2773..000000000 --- a/apps/docs/src/components/ui/dialog.tsx +++ /dev/null @@ -1,134 +0,0 @@ -"use client"; - -import * as React from "react"; -import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"; - -import { cn } from "@/lib/utils"; -import { Button } from "@/components/ui/button"; -import { IconX } from "@tabler/icons-react"; - -function Dialog({ ...props }: DialogPrimitive.Root.Props) { - return ; -} - -function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) { - return ; -} - -function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) { - return ; -} - -function DialogClose({ ...props }: DialogPrimitive.Close.Props) { - return ; -} - -function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) { - return ( - - ); -} - -function DialogContent({ - className, - children, - showCloseButton = true, - ...props -}: DialogPrimitive.Popup.Props & { - showCloseButton?: boolean; -}) { - return ( - - - - {children} - {showCloseButton && ( - } - > - - Close - - )} - - - ); -} - -function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { - return
; -} - -function DialogFooter({ - className, - showCloseButton = false, - children, - ...props -}: React.ComponentProps<"div"> & { - showCloseButton?: boolean; -}) { - return ( -
- {children} - {showCloseButton && }>Close} -
- ); -} - -function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) { - return ( - - ); -} - -function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) { - return ( - - ); -} - -export { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogOverlay, - DialogPortal, - DialogTitle, - DialogTrigger, -}; diff --git a/apps/docs/src/components/ui/header.tsx b/apps/docs/src/components/ui/header.tsx index ef5907cbb..5e99e0cff 100644 --- a/apps/docs/src/components/ui/header.tsx +++ b/apps/docs/src/components/ui/header.tsx @@ -1,4 +1,4 @@ -import type { ReactNode } from "react"; +import { ReactNode } from "react"; import { Badge } from "../ui/badge"; interface DocsHeaderProps { @@ -18,7 +18,7 @@ export const DocsHeader = (props: DocsHeaderProps) => {

{props.title}

{props.categories.map((category) => ( - {category} + {category} ))}
diff --git a/apps/docs/src/components/ui/input.tsx b/apps/docs/src/components/ui/input.tsx deleted file mode 100644 index abb87eb98..000000000 --- a/apps/docs/src/components/ui/input.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import * as React from "react"; -import { Input as InputPrimitive } from "@base-ui/react/input"; - -import { cn } from "@/lib/utils"; - -function Input({ className, type, ...props }: React.ComponentProps<"input">) { - return ( - - ); -} - -export { Input }; diff --git a/apps/docs/src/components/ui/select.tsx b/apps/docs/src/components/ui/select.tsx deleted file mode 100644 index fbd671c7e..000000000 --- a/apps/docs/src/components/ui/select.tsx +++ /dev/null @@ -1,167 +0,0 @@ -"use client"; - -import * as React from "react"; -import { Select as SelectPrimitive } from "@base-ui/react/select"; - -import { cn } from "@/lib/utils"; -import { IconSelector, IconCheck, IconChevronUp, IconChevronDown } from "@tabler/icons-react"; - -const Select = SelectPrimitive.Root; - -function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) { - return ; -} - -function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) { - return ( - - ); -} - -function SelectTrigger({ - className, - size = "default", - children, - ...props -}: SelectPrimitive.Trigger.Props & { - size?: "sm" | "default"; -}) { - return ( - - {children} - } /> - - ); -} - -function SelectContent({ - className, - children, - side = "bottom", - sideOffset = 4, - align = "center", - alignOffset = 0, - alignItemWithTrigger = true, - ...props -}: SelectPrimitive.Popup.Props & - Pick) { - return ( - - - - - {children} - - - - - ); -} - -function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) { - return ( - - ); -} - -function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) { - return ( - - - {children} - - } - > - - - - ); -} - -function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) { - return ( - - ); -} - -function SelectScrollUpButton({ className, ...props }: React.ComponentProps) { - return ( - - - - ); -} - -function SelectScrollDownButton({ className, ...props }: React.ComponentProps) { - return ( - - - - ); -} - -export { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectScrollDownButton, - SelectScrollUpButton, - SelectSeparator, - SelectTrigger, - SelectValue, -}; diff --git a/apps/docs/src/components/ui/separator.tsx b/apps/docs/src/components/ui/separator.tsx deleted file mode 100644 index e99046a0d..000000000 --- a/apps/docs/src/components/ui/separator.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"; - -import { cn } from "@/lib/utils"; - -function Separator({ className, orientation = "horizontal", ...props }: SeparatorPrimitive.Props) { - return ( - - ); -} - -export { Separator }; diff --git a/apps/docs/src/components/ui/textarea.tsx b/apps/docs/src/components/ui/textarea.tsx deleted file mode 100644 index d102c701b..000000000 --- a/apps/docs/src/components/ui/textarea.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from "react"; - -import { cn } from "@/lib/utils"; - -function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { - return ( -