@pylonsync/create-pylon 0.22.75 → 0.22.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-pylon.js +24 -74
- package/package.json +1 -1
- package/skill/SKILL.md +7 -11
- package/templates/_root/README.md +2 -8
- package/templates/agency/AGENTS.md +17 -0
- package/templates/agency/app/globals.css +5 -1
- package/templates/agency/app/internal/components/page.tsx +248 -0
- package/templates/agency/app/internal/design/page.tsx +169 -0
- package/templates/agency/app/internal/layout.tsx +89 -0
- package/templates/agency/app/internal/sections.ts +26 -0
- package/templates/agency/app/internal/showcase.tsx +43 -0
- package/templates/agency/app/robots.ts +1 -1
- package/templates/agency/components/ui/button.tsx +22 -20
- package/templates/agency/components/ui/dialog.tsx +77 -64
- package/templates/agency/components/ui/input.tsx +5 -5
- package/templates/agency/components/ui/label.tsx +5 -3
- package/templates/agency/components/ui/select.tsx +81 -19
- package/templates/agency/components/ui/textarea.tsx +5 -3
- package/templates/agency/lib/utils.ts +4 -4
- package/templates/agency/package.json +3 -3
- package/templates/ai-chat/AGENTS.md +17 -0
- package/templates/ai-chat/app/globals.css +5 -1
- package/templates/ai-chat/app/internal/components/page.tsx +248 -0
- package/templates/ai-chat/app/internal/design/page.tsx +173 -0
- package/templates/ai-chat/app/internal/layout.tsx +89 -0
- package/templates/ai-chat/app/internal/sections.ts +26 -0
- package/templates/ai-chat/app/internal/showcase.tsx +43 -0
- package/templates/ai-chat/app/robots.ts +1 -1
- package/templates/ai-chat/components/ui/button.tsx +22 -20
- package/templates/ai-chat/components/ui/dialog.tsx +77 -64
- package/templates/ai-chat/components/ui/input.tsx +5 -5
- package/templates/ai-chat/components/ui/label.tsx +5 -3
- package/templates/ai-chat/components/ui/select.tsx +81 -19
- package/templates/ai-chat/components/ui/textarea.tsx +5 -3
- package/templates/ai-chat/lib/utils.ts +4 -4
- package/templates/ai-chat/package.json +4 -4
- package/templates/ai-studio/AGENTS.md +17 -0
- package/templates/ai-studio/app/globals.css +5 -1
- package/templates/ai-studio/app/internal/components/page.tsx +248 -0
- package/templates/ai-studio/app/internal/design/page.tsx +168 -0
- package/templates/ai-studio/app/internal/layout.tsx +89 -0
- package/templates/ai-studio/app/internal/sections.ts +26 -0
- package/templates/ai-studio/app/internal/showcase.tsx +43 -0
- package/templates/ai-studio/app/robots.ts +1 -1
- package/templates/ai-studio/components/ui/button.tsx +22 -20
- package/templates/ai-studio/components/ui/dialog.tsx +77 -64
- package/templates/ai-studio/components/ui/input.tsx +5 -5
- package/templates/ai-studio/components/ui/label.tsx +5 -3
- package/templates/ai-studio/components/ui/select.tsx +81 -19
- package/templates/ai-studio/components/ui/textarea.tsx +5 -3
- package/templates/ai-studio/lib/utils.ts +4 -4
- package/templates/ai-studio/package.json +4 -4
- package/templates/barebones/AGENTS.md +17 -0
- package/templates/barebones/README.md +6 -3
- package/templates/barebones/app/(app)/layout.tsx +16 -0
- package/templates/barebones/app/{page.tsx → (app)/page.tsx} +2 -2
- package/templates/barebones/app/error.tsx +1 -1
- package/templates/barebones/app/globals.css +9 -7
- package/templates/barebones/app/internal/components/page.tsx +248 -0
- package/templates/barebones/app/internal/design/page.tsx +165 -0
- package/templates/barebones/app/internal/layout.tsx +89 -0
- package/templates/barebones/app/internal/sections.ts +26 -0
- package/templates/barebones/app/internal/showcase.tsx +43 -0
- package/templates/barebones/app/layout.tsx +4 -6
- package/templates/barebones/app/not-found.tsx +2 -4
- package/templates/barebones/app/robots.ts +1 -1
- package/templates/barebones/components/ui/button.tsx +22 -20
- package/templates/barebones/components/ui/dialog.tsx +77 -64
- package/templates/barebones/components/ui/input.tsx +5 -5
- package/templates/barebones/components/ui/label.tsx +5 -3
- package/templates/barebones/components/ui/select.tsx +81 -19
- package/templates/barebones/components/ui/textarea.tsx +5 -3
- package/templates/barebones/lib/utils.ts +4 -4
- package/templates/barebones/package.json +3 -3
- package/templates/chat/AGENTS.md +17 -0
- package/templates/chat/app/globals.css +7 -5
- package/templates/chat/app/internal/components/page.tsx +248 -0
- package/templates/chat/app/internal/design/page.tsx +170 -0
- package/templates/chat/app/internal/layout.tsx +89 -0
- package/templates/chat/app/internal/sections.ts +26 -0
- package/templates/chat/app/internal/showcase.tsx +43 -0
- package/templates/chat/app/not-found.tsx +1 -3
- package/templates/chat/app/robots.ts +1 -1
- package/templates/chat/components/ui/button.tsx +22 -20
- package/templates/chat/components/ui/dialog.tsx +77 -64
- package/templates/chat/components/ui/input.tsx +5 -5
- package/templates/chat/components/ui/label.tsx +5 -3
- package/templates/chat/components/ui/select.tsx +81 -19
- package/templates/chat/components/ui/textarea.tsx +5 -3
- package/templates/chat/lib/utils.ts +4 -4
- package/templates/chat/package.json +4 -4
- package/templates/consumer/AGENTS.md +17 -0
- package/templates/consumer/app/globals.css +9 -7
- package/templates/consumer/app/internal/components/page.tsx +248 -0
- package/templates/consumer/app/internal/design/page.tsx +167 -0
- package/templates/consumer/app/internal/layout.tsx +89 -0
- package/templates/consumer/app/internal/sections.ts +26 -0
- package/templates/consumer/app/internal/showcase.tsx +43 -0
- package/templates/consumer/app/robots.ts +1 -1
- package/templates/consumer/components/ui/button.tsx +22 -20
- package/templates/consumer/components/ui/dialog.tsx +77 -64
- package/templates/consumer/components/ui/input.tsx +5 -5
- package/templates/consumer/components/ui/label.tsx +5 -3
- package/templates/consumer/components/ui/select.tsx +81 -19
- package/templates/consumer/components/ui/textarea.tsx +5 -3
- package/templates/consumer/lib/utils.ts +4 -4
- package/templates/consumer/package.json +4 -4
- package/templates/creator/AGENTS.md +17 -0
- package/templates/creator/app/globals.css +5 -1
- package/templates/creator/app/internal/components/page.tsx +248 -0
- package/templates/creator/app/internal/design/page.tsx +171 -0
- package/templates/creator/app/internal/layout.tsx +89 -0
- package/templates/creator/app/internal/sections.ts +26 -0
- package/templates/creator/app/internal/showcase.tsx +43 -0
- package/templates/creator/app/robots.ts +1 -1
- package/templates/creator/components/ui/button.tsx +22 -20
- package/templates/creator/components/ui/dialog.tsx +77 -64
- package/templates/creator/components/ui/input.tsx +5 -5
- package/templates/creator/components/ui/label.tsx +5 -3
- package/templates/creator/components/ui/select.tsx +81 -19
- package/templates/creator/components/ui/textarea.tsx +5 -3
- package/templates/creator/lib/utils.ts +4 -4
- package/templates/creator/package.json +4 -4
- package/templates/crm/AGENTS.md +17 -0
- package/templates/crm/README.md +3 -4
- package/templates/crm/app/deals/[id]/deal-view.tsx +9 -14
- package/templates/crm/app/globals.css +5 -2
- package/templates/crm/app/internal/components/page.tsx +282 -0
- package/templates/crm/app/internal/design/page.tsx +163 -0
- package/templates/crm/app/internal/layout.tsx +89 -0
- package/templates/crm/app/internal/sections.ts +27 -0
- package/templates/crm/app/internal/showcase.tsx +43 -0
- package/templates/crm/app/not-found.tsx +1 -3
- package/templates/crm/app/robots.ts +1 -1
- package/templates/crm/components/activity-timeline.tsx +6 -8
- package/templates/crm/components/app-shell.tsx +25 -26
- package/templates/crm/components/deal-dialog.tsx +15 -17
- package/templates/crm/components/record-dialog.tsx +10 -11
- package/templates/crm/components/ui/button.tsx +22 -20
- package/templates/crm/components/ui/dialog.tsx +77 -64
- package/templates/crm/components/ui/input.tsx +5 -5
- package/templates/crm/components/ui/label.tsx +5 -3
- package/templates/crm/components/ui/select.tsx +81 -19
- package/templates/crm/components/ui/sheet.tsx +64 -0
- package/templates/crm/components/ui/textarea.tsx +5 -3
- package/templates/crm/lib/utils.ts +4 -4
- package/templates/crm/package.json +4 -4
- package/templates/directory/AGENTS.md +17 -0
- package/templates/directory/app/globals.css +5 -1
- package/templates/directory/app/internal/components/page.tsx +248 -0
- package/templates/directory/app/internal/design/page.tsx +168 -0
- package/templates/directory/app/internal/layout.tsx +89 -0
- package/templates/directory/app/internal/sections.ts +26 -0
- package/templates/directory/app/internal/showcase.tsx +43 -0
- package/templates/directory/app/robots.ts +1 -1
- package/templates/directory/components/ui/button.tsx +22 -20
- package/templates/directory/components/ui/dialog.tsx +77 -64
- package/templates/directory/components/ui/input.tsx +5 -5
- package/templates/directory/components/ui/label.tsx +5 -3
- package/templates/directory/components/ui/select.tsx +81 -19
- package/templates/directory/components/ui/textarea.tsx +5 -3
- package/templates/directory/lib/utils.ts +4 -4
- package/templates/directory/package.json +4 -4
- package/templates/helpdesk/AGENTS.md +17 -0
- package/templates/helpdesk/README.md +1 -1
- package/templates/helpdesk/app/globals.css +5 -2
- package/templates/helpdesk/app/internal/components/page.tsx +282 -0
- package/templates/helpdesk/app/internal/design/page.tsx +163 -0
- package/templates/helpdesk/app/internal/layout.tsx +89 -0
- package/templates/helpdesk/app/internal/sections.ts +27 -0
- package/templates/helpdesk/app/internal/showcase.tsx +43 -0
- package/templates/helpdesk/app/not-found.tsx +1 -3
- package/templates/helpdesk/app/robots.ts +1 -1
- package/templates/helpdesk/app/tickets/[id]/ticket-view.tsx +22 -29
- package/templates/helpdesk/components/app-shell.tsx +25 -26
- package/templates/helpdesk/components/new-ticket-dialog.tsx +15 -17
- package/templates/helpdesk/components/record-dialog.tsx +10 -11
- package/templates/helpdesk/components/ui/button.tsx +22 -20
- package/templates/helpdesk/components/ui/dialog.tsx +77 -64
- package/templates/helpdesk/components/ui/input.tsx +5 -5
- package/templates/helpdesk/components/ui/label.tsx +5 -3
- package/templates/helpdesk/components/ui/select.tsx +81 -19
- package/templates/helpdesk/components/ui/sheet.tsx +64 -0
- package/templates/helpdesk/components/ui/textarea.tsx +5 -3
- package/templates/helpdesk/lib/utils.ts +4 -4
- package/templates/helpdesk/package.json +4 -4
- package/templates/imessage/AGENTS.md +17 -0
- package/templates/imessage/app/globals.css +4 -0
- package/templates/imessage/app/internal/components/page.tsx +248 -0
- package/templates/imessage/app/internal/design/page.tsx +163 -0
- package/templates/imessage/app/internal/layout.tsx +89 -0
- package/templates/imessage/app/internal/sections.ts +26 -0
- package/templates/imessage/app/internal/showcase.tsx +43 -0
- package/templates/imessage/components/ui/button.tsx +22 -20
- package/templates/imessage/components/ui/dialog.tsx +77 -64
- package/templates/imessage/components/ui/input.tsx +5 -5
- package/templates/imessage/components/ui/label.tsx +5 -3
- package/templates/imessage/components/ui/select.tsx +81 -19
- package/templates/imessage/components/ui/textarea.tsx +5 -3
- package/templates/imessage/lib/utils.ts +4 -4
- package/templates/imessage/package.json +4 -4
- package/templates/inventory/AGENTS.md +17 -0
- package/templates/inventory/README.md +1 -1
- package/templates/inventory/app/globals.css +5 -2
- package/templates/inventory/app/internal/components/page.tsx +282 -0
- package/templates/inventory/app/internal/design/page.tsx +163 -0
- package/templates/inventory/app/internal/layout.tsx +89 -0
- package/templates/inventory/app/internal/sections.ts +27 -0
- package/templates/inventory/app/internal/showcase.tsx +43 -0
- package/templates/inventory/app/not-found.tsx +1 -3
- package/templates/inventory/app/products/[id]/product-view.tsx +1 -3
- package/templates/inventory/app/robots.ts +1 -1
- package/templates/inventory/components/app-shell.tsx +25 -26
- package/templates/inventory/components/movement-dialog.tsx +15 -17
- package/templates/inventory/components/record-dialog.tsx +10 -11
- package/templates/inventory/components/ui/button.tsx +22 -20
- package/templates/inventory/components/ui/dialog.tsx +77 -64
- package/templates/inventory/components/ui/input.tsx +5 -5
- package/templates/inventory/components/ui/label.tsx +5 -3
- package/templates/inventory/components/ui/select.tsx +81 -19
- package/templates/inventory/components/ui/sheet.tsx +64 -0
- package/templates/inventory/components/ui/textarea.tsx +5 -3
- package/templates/inventory/lib/utils.ts +4 -4
- package/templates/inventory/package.json +4 -4
- package/templates/inventory/tests/components.test.tsx +27 -14
- package/templates/invoices/AGENTS.md +17 -0
- package/templates/invoices/README.md +1 -1
- package/templates/invoices/app/globals.css +5 -2
- package/templates/invoices/app/internal/components/page.tsx +282 -0
- package/templates/invoices/app/internal/design/page.tsx +163 -0
- package/templates/invoices/app/internal/layout.tsx +89 -0
- package/templates/invoices/app/internal/sections.ts +27 -0
- package/templates/invoices/app/internal/showcase.tsx +43 -0
- package/templates/invoices/app/invoices/[id]/invoice-view.tsx +20 -26
- package/templates/invoices/app/not-found.tsx +1 -3
- package/templates/invoices/app/robots.ts +1 -1
- package/templates/invoices/components/app-shell.tsx +25 -26
- package/templates/invoices/components/payment-dialog.tsx +6 -8
- package/templates/invoices/components/record-dialog.tsx +10 -11
- package/templates/invoices/components/ui/button.tsx +22 -20
- package/templates/invoices/components/ui/dialog.tsx +77 -64
- package/templates/invoices/components/ui/input.tsx +5 -5
- package/templates/invoices/components/ui/label.tsx +5 -3
- package/templates/invoices/components/ui/select.tsx +81 -19
- package/templates/invoices/components/ui/sheet.tsx +64 -0
- package/templates/invoices/components/ui/textarea.tsx +5 -3
- package/templates/invoices/lib/utils.ts +4 -4
- package/templates/invoices/package.json +4 -4
- package/templates/local-service/AGENTS.md +17 -0
- package/templates/local-service/app/globals.css +5 -1
- package/templates/local-service/app/internal/components/page.tsx +248 -0
- package/templates/local-service/app/internal/design/page.tsx +170 -0
- package/templates/local-service/app/internal/layout.tsx +89 -0
- package/templates/local-service/app/internal/sections.ts +26 -0
- package/templates/local-service/app/internal/showcase.tsx +43 -0
- package/templates/local-service/app/robots.ts +1 -1
- package/templates/local-service/components/ui/button.tsx +22 -20
- package/templates/local-service/components/ui/dialog.tsx +77 -64
- package/templates/local-service/components/ui/input.tsx +5 -5
- package/templates/local-service/components/ui/label.tsx +5 -3
- package/templates/local-service/components/ui/select.tsx +81 -19
- package/templates/local-service/components/ui/textarea.tsx +5 -3
- package/templates/local-service/lib/utils.ts +4 -4
- package/templates/local-service/package.json +4 -4
- package/templates/marketplace/AGENTS.md +17 -0
- package/templates/marketplace/README.md +8 -5
- package/templates/marketplace/app/(market)/layout.tsx +113 -0
- package/templates/marketplace/app/{listing → (market)/listing}/[id]/page.tsx +7 -7
- package/templates/marketplace/app/{me → (market)/me}/page.tsx +1 -1
- package/templates/marketplace/app/{not-found.tsx → (market)/not-found.tsx} +1 -3
- package/templates/marketplace/app/{page.tsx → (market)/page.tsx} +5 -5
- package/templates/marketplace/app/{sell → (market)/sell}/page.tsx +1 -1
- package/templates/marketplace/app/error.tsx +1 -3
- package/templates/marketplace/app/globals.css +4 -0
- package/templates/marketplace/app/internal/components/page.tsx +335 -0
- package/templates/marketplace/app/internal/design/page.tsx +158 -0
- package/templates/marketplace/app/internal/layout.tsx +89 -0
- package/templates/marketplace/app/internal/sections.ts +30 -0
- package/templates/marketplace/app/internal/showcase.tsx +43 -0
- package/templates/marketplace/app/layout.tsx +4 -100
- package/templates/marketplace/app/robots.ts +1 -1
- package/templates/marketplace/client/ListingCard.tsx +1 -1
- package/templates/marketplace/components/ui/button.tsx +22 -21
- package/templates/marketplace/components/ui/dialog.tsx +77 -64
- package/templates/marketplace/components/ui/input.tsx +5 -5
- package/templates/marketplace/components/ui/label.tsx +5 -4
- package/templates/marketplace/components/ui/select.tsx +101 -0
- package/templates/marketplace/components/ui/separator.tsx +5 -8
- package/templates/marketplace/components/ui/textarea.tsx +5 -3
- package/templates/marketplace/lib/utils.ts +4 -4
- package/templates/marketplace/package.json +3 -5
- package/templates/projects/AGENTS.md +17 -0
- package/templates/projects/README.md +1 -1
- package/templates/projects/app/globals.css +5 -2
- package/templates/projects/app/internal/components/page.tsx +282 -0
- package/templates/projects/app/internal/design/page.tsx +163 -0
- package/templates/projects/app/internal/layout.tsx +89 -0
- package/templates/projects/app/internal/sections.ts +27 -0
- package/templates/projects/app/internal/showcase.tsx +43 -0
- package/templates/projects/app/not-found.tsx +1 -3
- package/templates/projects/app/projects/[id]/project-view.tsx +9 -14
- package/templates/projects/app/robots.ts +1 -1
- package/templates/projects/components/app-shell.tsx +25 -26
- package/templates/projects/components/record-dialog.tsx +10 -11
- package/templates/projects/components/time-dialog.tsx +6 -8
- package/templates/projects/components/ui/button.tsx +22 -20
- package/templates/projects/components/ui/dialog.tsx +77 -64
- package/templates/projects/components/ui/input.tsx +5 -5
- package/templates/projects/components/ui/label.tsx +5 -3
- package/templates/projects/components/ui/select.tsx +81 -19
- package/templates/projects/components/ui/sheet.tsx +64 -0
- package/templates/projects/components/ui/textarea.tsx +5 -3
- package/templates/projects/lib/utils.ts +4 -4
- package/templates/projects/package.json +4 -4
- package/templates/restaurant/AGENTS.md +17 -0
- package/templates/restaurant/app/globals.css +5 -1
- package/templates/restaurant/app/internal/components/page.tsx +248 -0
- package/templates/restaurant/app/internal/design/page.tsx +168 -0
- package/templates/restaurant/app/internal/layout.tsx +89 -0
- package/templates/restaurant/app/internal/sections.ts +26 -0
- package/templates/restaurant/app/internal/showcase.tsx +43 -0
- package/templates/restaurant/app/robots.ts +1 -1
- package/templates/restaurant/components/ui/button.tsx +22 -20
- package/templates/restaurant/components/ui/dialog.tsx +77 -64
- package/templates/restaurant/components/ui/input.tsx +5 -5
- package/templates/restaurant/components/ui/label.tsx +5 -3
- package/templates/restaurant/components/ui/select.tsx +81 -19
- package/templates/restaurant/components/ui/textarea.tsx +5 -3
- package/templates/restaurant/lib/utils.ts +4 -4
- package/templates/restaurant/package.json +4 -4
- package/templates/saas/AGENTS.md +17 -0
- package/templates/saas/README.md +1 -1
- package/templates/saas/app/(marketing)/not-found.tsx +1 -3
- package/templates/saas/app/dashboard/board-client.tsx +32 -42
- package/templates/saas/app/globals.css +9 -7
- package/templates/saas/app/internal/components/page.tsx +282 -0
- package/templates/saas/app/internal/design/page.tsx +168 -0
- package/templates/saas/app/internal/layout.tsx +89 -0
- package/templates/saas/app/internal/sections.ts +27 -0
- package/templates/saas/app/internal/showcase.tsx +43 -0
- package/templates/saas/app/robots.ts +1 -1
- package/templates/saas/components/dashboard-shell.tsx +28 -21
- package/templates/saas/components/ui/button.tsx +22 -20
- package/templates/saas/components/ui/dialog.tsx +77 -64
- package/templates/saas/components/ui/input.tsx +5 -5
- package/templates/saas/components/ui/label.tsx +5 -3
- package/templates/saas/components/ui/select.tsx +81 -19
- package/templates/saas/components/ui/sheet.tsx +64 -0
- package/templates/saas/components/ui/textarea.tsx +5 -3
- package/templates/saas/lib/utils.ts +4 -4
- package/templates/saas/package.json +4 -4
- package/templates/shop/AGENTS.md +17 -0
- package/templates/shop/app/globals.css +5 -1
- package/templates/shop/app/internal/components/page.tsx +248 -0
- package/templates/shop/app/internal/design/page.tsx +173 -0
- package/templates/shop/app/internal/layout.tsx +89 -0
- package/templates/shop/app/internal/sections.ts +26 -0
- package/templates/shop/app/internal/showcase.tsx +43 -0
- package/templates/shop/app/robots.ts +1 -1
- package/templates/shop/components/ui/button.tsx +22 -20
- package/templates/shop/components/ui/dialog.tsx +77 -64
- package/templates/shop/components/ui/input.tsx +5 -5
- package/templates/shop/components/ui/label.tsx +5 -3
- package/templates/shop/components/ui/select.tsx +81 -19
- package/templates/shop/components/ui/textarea.tsx +5 -3
- package/templates/shop/lib/utils.ts +4 -4
- package/templates/shop/package.json +4 -4
- package/templates/todo/AGENTS.md +17 -0
- package/templates/todo/README.md +7 -4
- package/templates/todo/app/(app)/layout.tsx +16 -0
- package/templates/todo/app/{page.tsx → (app)/page.tsx} +2 -2
- package/templates/todo/app/error.tsx +1 -1
- package/templates/todo/app/globals.css +9 -7
- package/templates/todo/app/internal/components/page.tsx +248 -0
- package/templates/todo/app/internal/design/page.tsx +165 -0
- package/templates/todo/app/internal/layout.tsx +89 -0
- package/templates/todo/app/internal/sections.ts +26 -0
- package/templates/todo/app/internal/showcase.tsx +43 -0
- package/templates/todo/app/layout.tsx +5 -7
- package/templates/todo/app/not-found.tsx +2 -4
- package/templates/todo/app/robots.ts +1 -1
- package/templates/todo/components/ui/button.tsx +22 -20
- package/templates/todo/components/ui/dialog.tsx +77 -64
- package/templates/todo/components/ui/input.tsx +5 -5
- package/templates/todo/components/ui/label.tsx +5 -3
- package/templates/todo/components/ui/select.tsx +81 -19
- package/templates/todo/components/ui/textarea.tsx +5 -3
- package/templates/todo/lib/utils.ts +4 -4
- package/templates/todo/package.json +4 -4
- package/templates/waitlist/AGENTS.md +17 -0
- package/templates/waitlist/app/globals.css +5 -1
- package/templates/waitlist/app/internal/components/page.tsx +248 -0
- package/templates/waitlist/app/internal/design/page.tsx +173 -0
- package/templates/waitlist/app/internal/layout.tsx +89 -0
- package/templates/waitlist/app/internal/sections.ts +26 -0
- package/templates/waitlist/app/internal/showcase.tsx +43 -0
- package/templates/waitlist/app/robots.ts +1 -1
- package/templates/waitlist/components/ui/button.tsx +22 -20
- package/templates/waitlist/components/ui/dialog.tsx +77 -64
- package/templates/waitlist/components/ui/input.tsx +5 -5
- package/templates/waitlist/components/ui/label.tsx +5 -3
- package/templates/waitlist/components/ui/select.tsx +81 -19
- package/templates/waitlist/components/ui/textarea.tsx +5 -3
- package/templates/waitlist/lib/utils.ts +4 -4
- package/templates/waitlist/package.json +4 -4
- package/templates/agency/components.json +0 -20
- package/templates/ai-chat/components.json +0 -20
- package/templates/ai-studio/components.json +0 -20
- package/templates/backend/b2b/apps/api/functions/archiveProject.ts +0 -13
- package/templates/backend/b2b/apps/api/functions/createOrg.ts +0 -44
- package/templates/backend/b2b/apps/api/functions/createProject.ts +0 -22
- package/templates/backend/b2b/apps/api/functions/inviteMember.ts +0 -41
- package/templates/backend/b2b/apps/api/functions/myOrgs.ts +0 -37
- package/templates/backend/b2b/apps/api/functions/orgMembers.ts +0 -13
- package/templates/backend/b2b/apps/api/functions/orgProjects.ts +0 -15
- package/templates/backend/b2b/apps/api/functions/removeMember.ts +0 -25
- package/templates/backend/b2b/apps/api/functions/setMemberRole.ts +0 -33
- package/templates/backend/b2b/apps/api/package.json +0 -20
- package/templates/backend/b2b/apps/api/schema.ts +0 -182
- package/templates/backend/b2b/apps/api/tsconfig.json +0 -13
- package/templates/backend/barebones/apps/api/functions/createWidget.ts +0 -26
- package/templates/backend/barebones/apps/api/functions/listWidgets.ts +0 -19
- package/templates/backend/barebones/apps/api/package.json +0 -20
- package/templates/backend/barebones/apps/api/schema.ts +0 -64
- package/templates/backend/barebones/apps/api/tsconfig.json +0 -13
- package/templates/backend/chat/apps/api/functions/createRoom.ts +0 -32
- package/templates/backend/chat/apps/api/functions/listRooms.ts +0 -15
- package/templates/backend/chat/apps/api/functions/roomMessages.ts +0 -20
- package/templates/backend/chat/apps/api/functions/sendMessage.ts +0 -37
- package/templates/backend/chat/apps/api/package.json +0 -20
- package/templates/backend/chat/apps/api/schema.ts +0 -99
- package/templates/backend/chat/apps/api/tsconfig.json +0 -13
- package/templates/backend/todo/apps/api/functions/addTodo.ts +0 -31
- package/templates/backend/todo/apps/api/functions/deleteTodo.ts +0 -15
- package/templates/backend/todo/apps/api/functions/editTodo.ts +0 -17
- package/templates/backend/todo/apps/api/functions/listTodos.ts +0 -25
- package/templates/backend/todo/apps/api/functions/reorderTodo.ts +0 -15
- package/templates/backend/todo/apps/api/functions/toggleTodo.ts +0 -14
- package/templates/backend/todo/apps/api/package.json +0 -20
- package/templates/backend/todo/apps/api/schema.ts +0 -88
- package/templates/backend/todo/apps/api/tsconfig.json +0 -13
- package/templates/barebones/components.json +0 -20
- package/templates/chat/components.json +0 -20
- package/templates/consumer/components.json +0 -20
- package/templates/creator/components.json +0 -20
- package/templates/crm/components.json +0 -20
- package/templates/directory/components.json +0 -20
- package/templates/expo/barebones/apps/expo/App.tsx +0 -166
- package/templates/expo/barebones/apps/expo/app.json +0 -31
- package/templates/expo/barebones/apps/expo/babel.config.js +0 -6
- package/templates/expo/barebones/apps/expo/package.json +0 -31
- package/templates/expo/barebones/apps/expo/tsconfig.json +0 -16
- package/templates/expo/chat/apps/expo/App.tsx +0 -391
- package/templates/expo/chat/apps/expo/app.json +0 -25
- package/templates/expo/chat/apps/expo/babel.config.js +0 -6
- package/templates/expo/chat/apps/expo/package.json +0 -32
- package/templates/expo/chat/apps/expo/tsconfig.json +0 -16
- package/templates/expo/todo/apps/expo/App.tsx +0 -287
- package/templates/expo/todo/apps/expo/app.json +0 -25
- package/templates/expo/todo/apps/expo/babel.config.js +0 -6
- package/templates/expo/todo/apps/expo/package.json +0 -31
- package/templates/expo/todo/apps/expo/tsconfig.json +0 -16
- package/templates/helpdesk/components.json +0 -20
- package/templates/imessage/components.json +0 -20
- package/templates/inventory/components.json +0 -20
- package/templates/invoices/components.json +0 -20
- package/templates/ios/barebones/apps/ios/Package.swift +0 -34
- package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/ContentView.swift +0 -98
- package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -17
- package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -34
- package/templates/ios/barebones/apps/ios/project.yml +0 -42
- package/templates/ios/chat/apps/ios/Package.swift +0 -24
- package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/ChatRootView.swift +0 -116
- package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -26
- package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/RoomView.swift +0 -136
- package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -58
- package/templates/ios/chat/apps/ios/project.yml +0 -44
- package/templates/ios/todo/apps/ios/Package.swift +0 -23
- package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -18
- package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/TodoListView.swift +0 -230
- package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -28
- package/templates/ios/todo/apps/ios/project.yml +0 -32
- package/templates/local-service/components.json +0 -20
- package/templates/mac/b2b/apps/mac/Package.swift +0 -22
- package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -15
- package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/OrgPickerView.swift +0 -178
- package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
- package/templates/mac/b2b/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
- package/templates/mac/b2b/apps/mac/project.yml +0 -34
- package/templates/mac/barebones/apps/mac/Package.swift +0 -33
- package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/ContentView.swift +0 -104
- package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -17
- package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
- package/templates/mac/barebones/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
- package/templates/mac/barebones/apps/mac/project.yml +0 -34
- package/templates/mac/chat/apps/mac/Package.swift +0 -34
- package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/ChatRootView.swift +0 -143
- package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -26
- package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/RoomView.swift +0 -136
- package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -58
- package/templates/mac/chat/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
- package/templates/mac/chat/apps/mac/project.yml +0 -36
- package/templates/mac/consumer/apps/mac/Package.swift +0 -34
- package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/FeedView.swift +0 -199
- package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -34
- package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/ProfileSetupView.swift +0 -68
- package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/RootView.swift +0 -40
- package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -59
- package/templates/mac/consumer/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
- package/templates/mac/consumer/apps/mac/project.yml +0 -36
- package/templates/mac/todo/apps/mac/Package.swift +0 -33
- package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -19
- package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/TodoListView.swift +0 -244
- package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
- package/templates/mac/todo/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
- package/templates/mac/todo/apps/mac/project.yml +0 -34
- package/templates/marketplace/components/ui/native-select.tsx +0 -62
- package/templates/marketplace/components.json +0 -20
- package/templates/projects/components.json +0 -20
- package/templates/restaurant/components.json +0 -20
- package/templates/saas/components.json +0 -20
- package/templates/shop/components.json +0 -20
- package/templates/todo/components.json +0 -20
- package/templates/ui/packages/ui/package.json +0 -26
- package/templates/ui/packages/ui/src/button.tsx +0 -44
- package/templates/ui/packages/ui/src/card.tsx +0 -39
- package/templates/ui/packages/ui/src/cn.ts +0 -12
- package/templates/ui/packages/ui/src/index.ts +0 -4
- package/templates/ui/packages/ui/src/input.tsx +0 -19
- package/templates/ui/packages/ui/tsconfig.json +0 -15
- package/templates/vite/todo/apps/web/index.html +0 -12
- package/templates/vite/todo/apps/web/package.json +0 -31
- package/templates/vite/todo/apps/web/src/App.tsx +0 -16
- package/templates/vite/todo/apps/web/src/components/TodoList.tsx +0 -281
- package/templates/vite/todo/apps/web/src/index.css +0 -14
- package/templates/vite/todo/apps/web/src/main.tsx +0 -20
- package/templates/vite/todo/apps/web/tsconfig.json +0 -24
- package/templates/vite/todo/apps/web/vite.config.ts +0 -41
- package/templates/waitlist/components.json +0 -20
- package/templates/web/b2b/apps/web/next-env.d.ts +0 -2
- package/templates/web/b2b/apps/web/next.config.ts +0 -24
- package/templates/web/b2b/apps/web/package.json +0 -27
- package/templates/web/b2b/apps/web/postcss.config.mjs +0 -3
- package/templates/web/b2b/apps/web/src/app/components/OrgPicker.tsx +0 -171
- package/templates/web/b2b/apps/web/src/app/globals.css +0 -6
- package/templates/web/b2b/apps/web/src/app/layout.tsx +0 -21
- package/templates/web/b2b/apps/web/src/app/page.tsx +0 -39
- package/templates/web/b2b/apps/web/src/lib/pylon.ts +0 -5
- package/templates/web/b2b/apps/web/tsconfig.json +0 -26
- package/templates/web/barebones/apps/web/next-env.d.ts +0 -2
- package/templates/web/barebones/apps/web/next.config.ts +0 -40
- package/templates/web/barebones/apps/web/package.json +0 -27
- package/templates/web/barebones/apps/web/postcss.config.mjs +0 -3
- package/templates/web/barebones/apps/web/src/app/components/WidgetList.tsx +0 -81
- package/templates/web/barebones/apps/web/src/app/globals.css +0 -6
- package/templates/web/barebones/apps/web/src/app/layout.tsx +0 -21
- package/templates/web/barebones/apps/web/src/app/page.tsx +0 -43
- package/templates/web/barebones/apps/web/src/lib/pylon.ts +0 -14
- package/templates/web/barebones/apps/web/tsconfig.json +0 -26
- package/templates/web/chat/apps/web/next-env.d.ts +0 -2
- package/templates/web/chat/apps/web/next.config.ts +0 -24
- package/templates/web/chat/apps/web/package.json +0 -27
- package/templates/web/chat/apps/web/postcss.config.mjs +0 -3
- package/templates/web/chat/apps/web/src/app/components/ChatRoom.tsx +0 -231
- package/templates/web/chat/apps/web/src/app/globals.css +0 -6
- package/templates/web/chat/apps/web/src/app/layout.tsx +0 -22
- package/templates/web/chat/apps/web/src/app/page.tsx +0 -12
- package/templates/web/chat/apps/web/src/app/providers.tsx +0 -25
- package/templates/web/chat/apps/web/src/lib/pylon.ts +0 -5
- package/templates/web/chat/apps/web/tsconfig.json +0 -26
- package/templates/web/consumer/apps/web/next-env.d.ts +0 -2
- package/templates/web/consumer/apps/web/next.config.ts +0 -24
- package/templates/web/consumer/apps/web/package.json +0 -27
- package/templates/web/consumer/apps/web/postcss.config.mjs +0 -3
- package/templates/web/consumer/apps/web/src/app/components/Feed.tsx +0 -315
- package/templates/web/consumer/apps/web/src/app/globals.css +0 -6
- package/templates/web/consumer/apps/web/src/app/layout.tsx +0 -22
- package/templates/web/consumer/apps/web/src/app/page.tsx +0 -21
- package/templates/web/consumer/apps/web/src/app/providers.tsx +0 -25
- package/templates/web/consumer/apps/web/src/lib/pylon.ts +0 -5
- package/templates/web/consumer/apps/web/tsconfig.json +0 -26
- package/templates/web/todo/apps/web/next-env.d.ts +0 -2
- package/templates/web/todo/apps/web/next.config.ts +0 -26
- package/templates/web/todo/apps/web/package.json +0 -30
- package/templates/web/todo/apps/web/postcss.config.mjs +0 -3
- package/templates/web/todo/apps/web/src/app/components/TodoList.tsx +0 -310
- package/templates/web/todo/apps/web/src/app/globals.css +0 -6
- package/templates/web/todo/apps/web/src/app/layout.tsx +0 -21
- package/templates/web/todo/apps/web/src/app/page.tsx +0 -36
- package/templates/web/todo/apps/web/src/lib/pylon.ts +0 -5
- package/templates/web/todo/apps/web/tsconfig.json +0 -26
- /package/templates/barebones/app/{items-client.tsx → (app)/items-client.tsx} +0 -0
- /package/templates/marketplace/{app/_components → components}/CategoryIcon.tsx +0 -0
- /package/templates/todo/app/{todo-app.tsx → (app)/todo-app.tsx} +0 -0
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Link, type PageProps } from "@pylonsync/react";
|
|
3
|
-
import { Plus, Search } from "lucide-react";
|
|
4
|
-
import { AuthNav } from "../client/AuthNav";
|
|
5
|
-
import { ThemeToggle } from "../client/ThemeToggle";
|
|
6
2
|
|
|
7
|
-
// Root layout
|
|
3
|
+
// Root layout: the document shell for every route. The header and the footer
|
|
4
|
+
// live in `app/(market)/layout.tsx`. Server-rendered; Pylon's SSR head adapter injects the
|
|
8
5
|
// compiled Tailwind <link> from app/globals.css and the fonts from app.ts.
|
|
9
6
|
export default function RootLayout({
|
|
10
7
|
children,
|
|
11
|
-
searchParams,
|
|
12
8
|
}: {
|
|
13
9
|
children: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
const query =
|
|
16
|
-
typeof searchParams?.q === "string" ? searchParams.q.trim() : "";
|
|
17
|
-
|
|
10
|
+
}) {
|
|
18
11
|
return (
|
|
19
12
|
<html lang="en" suppressHydrationWarning>
|
|
20
13
|
<head>
|
|
@@ -38,96 +31,7 @@ export default function RootLayout({
|
|
|
38
31
|
/>
|
|
39
32
|
</head>
|
|
40
33
|
<body className="min-h-screen bg-background text-foreground antialiased">
|
|
41
|
-
|
|
42
|
-
href="#main-content"
|
|
43
|
-
className="fixed left-4 top-4 z-50 -translate-y-20 rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background transition-transform focus:translate-y-0"
|
|
44
|
-
>
|
|
45
|
-
Skip to content
|
|
46
|
-
</a>
|
|
47
|
-
<header className="sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur-xl">
|
|
48
|
-
<div className="mx-auto flex h-16 max-w-[1440px] items-center gap-3 px-4 sm:gap-6 sm:px-8">
|
|
49
|
-
<Link
|
|
50
|
-
href="/"
|
|
51
|
-
translate="no"
|
|
52
|
-
className="flex min-h-11 shrink-0 items-center gap-2"
|
|
53
|
-
aria-label="Reprise home"
|
|
54
|
-
>
|
|
55
|
-
<span
|
|
56
|
-
aria-hidden="true"
|
|
57
|
-
className="grid size-8 place-items-center rounded-full bg-foreground pb-0.5 font-display text-[22px] leading-none text-background"
|
|
58
|
-
>
|
|
59
|
-
r
|
|
60
|
-
</span>
|
|
61
|
-
<span className="font-display text-[26px] leading-none tracking-[-0.01em]">
|
|
62
|
-
Reprise
|
|
63
|
-
</span>
|
|
64
|
-
</Link>
|
|
65
|
-
|
|
66
|
-
<form
|
|
67
|
-
method="get"
|
|
68
|
-
action="/"
|
|
69
|
-
role="search"
|
|
70
|
-
className="relative hidden max-w-xl flex-1 md:block"
|
|
71
|
-
>
|
|
72
|
-
<label htmlFor="header-search" className="sr-only">
|
|
73
|
-
Search listings
|
|
74
|
-
</label>
|
|
75
|
-
<Search
|
|
76
|
-
aria-hidden="true"
|
|
77
|
-
strokeWidth={1.75}
|
|
78
|
-
className="pointer-events-none absolute left-3.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
|
|
79
|
-
/>
|
|
80
|
-
<input
|
|
81
|
-
id="header-search"
|
|
82
|
-
name="q"
|
|
83
|
-
type="search"
|
|
84
|
-
autoComplete="off"
|
|
85
|
-
defaultValue={query}
|
|
86
|
-
placeholder="Search chairs, cameras, sellers, cities"
|
|
87
|
-
className="h-10 w-full rounded-full border-0 bg-muted pl-10 pr-4 text-sm outline-none ring-1 ring-transparent transition-[box-shadow,background-color] duration-200 placeholder:text-muted-foreground focus:bg-card focus:ring-border focus-visible:outline-none"
|
|
88
|
-
/>
|
|
89
|
-
</form>
|
|
90
|
-
|
|
91
|
-
<nav
|
|
92
|
-
aria-label="Primary navigation"
|
|
93
|
-
className="ml-auto flex items-center gap-1 text-sm"
|
|
94
|
-
>
|
|
95
|
-
<Link
|
|
96
|
-
href="/me"
|
|
97
|
-
className="hidden min-h-10 items-center rounded-full px-3 font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground sm:inline-flex"
|
|
98
|
-
>
|
|
99
|
-
Dashboard
|
|
100
|
-
</Link>
|
|
101
|
-
<ThemeToggle />
|
|
102
|
-
<AuthNav />
|
|
103
|
-
<Link
|
|
104
|
-
href="/sell"
|
|
105
|
-
className="ml-1 inline-flex min-h-10 items-center gap-1.5 rounded-full bg-primary pl-3 pr-4 text-sm font-medium text-primary-foreground transition-[background-color,scale] duration-150 hover:bg-primary/85 active:scale-[0.97]"
|
|
106
|
-
>
|
|
107
|
-
<Plus aria-hidden="true" className="size-4" strokeWidth={2} />
|
|
108
|
-
Sell
|
|
109
|
-
</Link>
|
|
110
|
-
</nav>
|
|
111
|
-
</div>
|
|
112
|
-
</header>
|
|
113
|
-
<main
|
|
114
|
-
id="main-content"
|
|
115
|
-
className="mx-auto min-h-[calc(100dvh-8rem)] max-w-[1440px] px-4 sm:px-8"
|
|
116
|
-
>
|
|
117
|
-
{children}
|
|
118
|
-
</main>
|
|
119
|
-
<footer className="mt-16 border-t border-border/70">
|
|
120
|
-
<div className="mx-auto flex max-w-[1440px] flex-col gap-2 px-4 py-8 text-sm text-muted-foreground sm:flex-row sm:items-center sm:justify-between sm:px-8">
|
|
121
|
-
<p>
|
|
122
|
-
<span className="font-display text-lg text-foreground">Reprise</span>{" "}
|
|
123
|
-
· Pre-owned goods from independent sellers
|
|
124
|
-
</p>
|
|
125
|
-
<p className="text-xs">
|
|
126
|
-
Built with Pylon. Listings are server-rendered; offers and sold
|
|
127
|
-
status sync live.
|
|
128
|
-
</p>
|
|
129
|
-
</div>
|
|
130
|
-
</footer>
|
|
34
|
+
{children}
|
|
131
35
|
</body>
|
|
132
36
|
</html>
|
|
133
37
|
);
|
|
@@ -6,7 +6,7 @@ const SITE = process.env.SITE_URL ?? "http://localhost:4321";
|
|
|
6
6
|
export default function robots(): Robots {
|
|
7
7
|
return {
|
|
8
8
|
// Browse + listings are indexable; keep the personal inbox and API out.
|
|
9
|
-
rules: { userAgent: "*", allow: "/", disallow: ["/me", "/api/"] },
|
|
9
|
+
rules: { userAgent: "*", allow: "/", disallow: ["/me", "/api/", "/internal/"] },
|
|
10
10
|
sitemap: `${SITE}/sitemap.xml`,
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Link } from "@pylonsync/react";
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
4
|
import { listingSrcSet } from "../lib/catalog";
|
|
5
|
-
import { CategoryIcon } from "../
|
|
5
|
+
import { CategoryIcon } from "../components/CategoryIcon";
|
|
6
6
|
import { WatchButton } from "./WatchButton";
|
|
7
7
|
import {
|
|
8
8
|
conditionLabel,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Button as ButtonPart } from "@ui-sdk/react/button";
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
5
|
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
|
-
"inline-flex min-h-10 items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-[background-color,color,box-shadow,scale] duration-150 active:not-disabled:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
8
|
+
"inline-flex min-h-10 items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-[background-color,color,box-shadow,scale] duration-150 active:not-data-disabled:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-50 data-pending:cursor-progress data-pending:opacity-70 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -34,25 +34,26 @@ const buttonVariants = cva(
|
|
|
34
34
|
},
|
|
35
35
|
);
|
|
36
36
|
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
37
|
+
export type ButtonProps = Omit<
|
|
38
|
+
React.ComponentProps<typeof ButtonPart>,
|
|
39
|
+
"className"
|
|
40
|
+
> &
|
|
41
|
+
VariantProps<typeof buttonVariants> & { className?: string };
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
/**
|
|
44
|
+
* A button. Return a Promise from `onClick` and the button stays pending
|
|
45
|
+
* (`data-pending`) until it settles, so an action cannot run twice.
|
|
46
|
+
*
|
|
47
|
+
* To render a link that looks like a button, pass the link to `render`:
|
|
48
|
+
* `<Button render={<Link href="/" />}>Home</Button>`.
|
|
49
|
+
*/
|
|
50
|
+
function Button({ className, variant, size, ...props }: ButtonProps) {
|
|
51
|
+
return (
|
|
52
|
+
<ButtonPart
|
|
53
|
+
className={cn(buttonVariants({ variant, size }), className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
57
58
|
|
|
58
59
|
export { Button, buttonVariants };
|
|
@@ -1,55 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
Dialog,
|
|
6
|
+
DialogBackdrop as DialogBackdropPart,
|
|
7
|
+
DialogClose,
|
|
8
|
+
DialogContent as DialogContentPart,
|
|
9
|
+
DialogDescription as DialogDescriptionPart,
|
|
10
|
+
DialogTitle as DialogTitlePart,
|
|
11
|
+
DialogTrigger,
|
|
12
|
+
} from "@ui-sdk/react/dialog";
|
|
5
13
|
import { X } from "lucide-react";
|
|
6
14
|
|
|
7
15
|
import { cn } from "@/lib/utils";
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
const DialogTrigger = DialogPrimitive.Trigger;
|
|
11
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
12
|
-
const DialogClose = DialogPrimitive.Close;
|
|
13
|
-
|
|
14
|
-
const DialogOverlay = React.forwardRef<
|
|
15
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
16
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
17
|
-
>(({ className, ...props }, ref) => (
|
|
18
|
-
<DialogPrimitive.Overlay
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(
|
|
21
|
-
"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
22
|
-
className,
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
));
|
|
27
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
17
|
+
type StringClassName<T> = Omit<T, "className"> & { className?: string };
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
<DialogPrimitive.Content
|
|
36
|
-
ref={ref}
|
|
19
|
+
function DialogBackdrop({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: StringClassName<React.ComponentProps<typeof DialogBackdropPart>>) {
|
|
23
|
+
return (
|
|
24
|
+
<DialogBackdropPart
|
|
37
25
|
className={cn(
|
|
38
|
-
"fixed
|
|
39
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
26
|
+
"fixed inset-0 z-50 bg-black/50 transition-opacity duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0 motion-reduce:transition-none",
|
|
40
27
|
className,
|
|
41
28
|
)}
|
|
42
29
|
{...props}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The dialog panel. It renders its own backdrop and a close button, so a
|
|
36
|
+
* caller writes only the title, the description and the body.
|
|
37
|
+
*/
|
|
38
|
+
function DialogContent({
|
|
39
|
+
className,
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}: Omit<StringClassName<React.ComponentProps<typeof DialogContentPart>>, "children"> & {
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}) {
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<DialogBackdrop />
|
|
48
|
+
<DialogContentPart
|
|
49
|
+
className={cn(
|
|
50
|
+
"fixed inset-0 z-50 m-auto grid h-fit max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg gap-4 overflow-y-auto overscroll-contain rounded-xl border bg-background p-6 text-foreground shadow-lg outline-none",
|
|
51
|
+
"transition-[opacity,scale] duration-200 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0 motion-reduce:transition-none",
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
<DialogClose
|
|
58
|
+
aria-label="Close"
|
|
59
|
+
className="absolute right-3 top-3 rounded-md p-1 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
60
|
+
>
|
|
61
|
+
<X className="size-4" />
|
|
62
|
+
</DialogClose>
|
|
63
|
+
</DialogContentPart>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
53
67
|
|
|
54
68
|
function DialogHeader({
|
|
55
69
|
className,
|
|
@@ -72,39 +86,38 @@ function DialogFooter({
|
|
|
72
86
|
);
|
|
73
87
|
}
|
|
74
88
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
)
|
|
85
|
-
|
|
89
|
+
function DialogTitle({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}: StringClassName<React.ComponentProps<typeof DialogTitlePart>>) {
|
|
93
|
+
return (
|
|
94
|
+
<DialogTitlePart
|
|
95
|
+
className={cn("text-base font-semibold leading-none tracking-tight", className)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
86
100
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
97
|
-
|
|
101
|
+
function DialogDescription({
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}: StringClassName<React.ComponentProps<typeof DialogDescriptionPart>>) {
|
|
105
|
+
return (
|
|
106
|
+
<DialogDescriptionPart
|
|
107
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
98
112
|
|
|
99
113
|
export {
|
|
100
114
|
Dialog,
|
|
115
|
+
DialogBackdrop,
|
|
101
116
|
DialogClose,
|
|
102
117
|
DialogContent,
|
|
103
118
|
DialogDescription,
|
|
104
119
|
DialogFooter,
|
|
105
120
|
DialogHeader,
|
|
106
|
-
DialogOverlay,
|
|
107
|
-
DialogPortal,
|
|
108
121
|
DialogTitle,
|
|
109
122
|
DialogTrigger,
|
|
110
123
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Input as InputPart } from "@ui-sdk/react/input";
|
|
2
3
|
|
|
3
4
|
import { cn } from "@/lib/utils";
|
|
4
5
|
|
|
5
6
|
function Input({
|
|
6
7
|
className,
|
|
7
|
-
type,
|
|
8
8
|
...props
|
|
9
|
-
}: React.
|
|
9
|
+
}: Omit<React.ComponentProps<typeof InputPart>, "className"> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) {
|
|
10
12
|
return (
|
|
11
|
-
<
|
|
12
|
-
type={type}
|
|
13
|
-
data-slot="input"
|
|
13
|
+
<InputPart
|
|
14
14
|
className={cn(
|
|
15
15
|
"flex min-h-11 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm transition-colors",
|
|
16
16
|
"placeholder:text-muted-foreground",
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { Label as
|
|
2
|
+
import { Label as LabelPart } from "@ui-sdk/react/label";
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
6
|
function Label({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof
|
|
9
|
+
}: Omit<React.ComponentProps<typeof LabelPart>, "className"> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) {
|
|
10
12
|
return (
|
|
11
|
-
<
|
|
12
|
-
data-slot="label"
|
|
13
|
+
<LabelPart
|
|
13
14
|
className={cn(
|
|
14
15
|
"flex items-center gap-2 text-sm font-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
15
16
|
className,
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
Select as SelectRoot,
|
|
6
|
+
SelectContent,
|
|
7
|
+
SelectItem,
|
|
8
|
+
SelectItemIndicator,
|
|
9
|
+
SelectItemText,
|
|
10
|
+
SelectTrigger,
|
|
11
|
+
SelectValue,
|
|
12
|
+
} from "@ui-sdk/react/select";
|
|
13
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
14
|
+
|
|
15
|
+
import { cn } from "@/lib/utils";
|
|
16
|
+
|
|
17
|
+
export interface SelectOption {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SelectProps {
|
|
24
|
+
/** The options, in display order. */
|
|
25
|
+
items: SelectOption[];
|
|
26
|
+
/** The selected value. Pass it with `onValueChange` to control the select. */
|
|
27
|
+
value?: string | null;
|
|
28
|
+
defaultValue?: string | null;
|
|
29
|
+
onValueChange?: (value: string) => void;
|
|
30
|
+
/** The text the trigger shows while nothing is selected. */
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/** The form field name. Without a name the select submits nothing. */
|
|
33
|
+
name?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
id?: string;
|
|
37
|
+
"aria-label"?: string;
|
|
38
|
+
/** Classes for the trigger. */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Pick one value from a list. Give it the options as data; it renders the
|
|
44
|
+
* trigger, the list, keyboard navigation and typeahead.
|
|
45
|
+
*
|
|
46
|
+
* For custom option content, groups or search, compose the parts from
|
|
47
|
+
* `@ui-sdk/react/select` in a new component next to this one.
|
|
48
|
+
*/
|
|
49
|
+
function Select({
|
|
50
|
+
items,
|
|
51
|
+
onValueChange,
|
|
52
|
+
id,
|
|
53
|
+
"aria-label": ariaLabel,
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}: SelectProps) {
|
|
57
|
+
return (
|
|
58
|
+
<SelectRoot
|
|
59
|
+
items={items}
|
|
60
|
+
onValueChange={(value) => onValueChange?.(value ?? "")}
|
|
61
|
+
{...props}
|
|
62
|
+
>
|
|
63
|
+
<SelectTrigger
|
|
64
|
+
id={id}
|
|
65
|
+
aria-label={ariaLabel}
|
|
66
|
+
className={cn(
|
|
67
|
+
"flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent py-1 pl-3 pr-2.5 text-left text-sm shadow-sm transition-colors",
|
|
68
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
69
|
+
"data-disabled:cursor-not-allowed data-disabled:opacity-50 data-placeholder:text-muted-foreground",
|
|
70
|
+
className,
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
<SelectValue className="truncate" />
|
|
74
|
+
<ChevronDown className="size-4 shrink-0 opacity-50" />
|
|
75
|
+
</SelectTrigger>
|
|
76
|
+
<SelectContent
|
|
77
|
+
sideOffset={4}
|
|
78
|
+
className={cn(
|
|
79
|
+
"z-50 max-h-(--available-height) min-w-(--anchor-width) overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",
|
|
80
|
+
"origin-(--transform-origin) transition-[opacity,scale] duration-150 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0 motion-reduce:transition-none",
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
{items.map((item) => (
|
|
84
|
+
<SelectItem
|
|
85
|
+
key={item.value}
|
|
86
|
+
value={item.value}
|
|
87
|
+
disabled={item.disabled}
|
|
88
|
+
className="flex cursor-default select-none items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
89
|
+
>
|
|
90
|
+
<SelectItemText>{item.label}</SelectItemText>
|
|
91
|
+
<SelectItemIndicator>
|
|
92
|
+
<Check className="size-4" />
|
|
93
|
+
</SelectItemIndicator>
|
|
94
|
+
</SelectItem>
|
|
95
|
+
))}
|
|
96
|
+
</SelectContent>
|
|
97
|
+
</SelectRoot>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { Select };
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { Separator as
|
|
2
|
+
import { Separator as SeparatorPart } from "@ui-sdk/react/separator"
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
6
|
function Separator({
|
|
7
7
|
className,
|
|
8
|
-
orientation = "horizontal",
|
|
9
|
-
decorative = true,
|
|
10
8
|
...props
|
|
11
|
-
}: React.ComponentProps<typeof
|
|
9
|
+
}: Omit<React.ComponentProps<typeof SeparatorPart>, "className"> & {
|
|
10
|
+
className?: string
|
|
11
|
+
}) {
|
|
12
12
|
return (
|
|
13
|
-
<
|
|
14
|
-
data-slot="separator"
|
|
15
|
-
decorative={decorative}
|
|
16
|
-
orientation={orientation}
|
|
13
|
+
<SeparatorPart
|
|
17
14
|
className={cn(
|
|
18
15
|
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
19
16
|
className
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Textarea as TextareaPart } from "@ui-sdk/react/textarea";
|
|
2
3
|
|
|
3
4
|
import { cn } from "@/lib/utils";
|
|
4
5
|
|
|
5
6
|
function Textarea({
|
|
6
7
|
className,
|
|
7
8
|
...props
|
|
8
|
-
}: React.
|
|
9
|
+
}: Omit<React.ComponentProps<typeof TextareaPart>, "className"> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
}) {
|
|
9
12
|
return (
|
|
10
|
-
<
|
|
11
|
-
data-slot="textarea"
|
|
13
|
+
<TextareaPart
|
|
12
14
|
className={cn(
|
|
13
15
|
"flex min-h-24 w-full rounded-lg border border-input bg-background px-3 py-2.5 text-sm",
|
|
14
16
|
"placeholder:text-muted-foreground",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ClassValue, clsx } from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
3
|
|
|
4
|
-
// `cn`
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
4
|
+
// `cn` merges class names. clsx resolves conditional and array inputs, then
|
|
5
|
+
// tailwind-merge removes conflicting Tailwind utilities so the last one wins:
|
|
6
|
+
// `cn("px-2", "px-4")` is "px-4". Every component passes its `className`
|
|
7
|
+
// through this, so a caller can override a default style.
|
|
8
8
|
export function cn(...inputs: ClassValue[]) {
|
|
9
9
|
return twMerge(clsx(inputs));
|
|
10
10
|
}
|
|
@@ -14,16 +14,14 @@
|
|
|
14
14
|
"@pylonsync/react": "^__PYLON_VERSION__",
|
|
15
15
|
"@pylonsync/sdk": "^__PYLON_VERSION__",
|
|
16
16
|
"@pylonsync/sync": "^__PYLON_VERSION__",
|
|
17
|
-
"@radix-ui/react-dialog": "^1.1.4",
|
|
18
|
-
"@radix-ui/react-label": "^2.1.0",
|
|
19
|
-
"@radix-ui/react-slot": "^1.1.0",
|
|
20
17
|
"@tailwindcss/cli": "^4.3.0",
|
|
21
18
|
"class-variance-authority": "^0.7.1",
|
|
22
19
|
"clsx": "^2.1.1",
|
|
23
20
|
"lucide-react": "^0.460.0",
|
|
24
|
-
"radix-ui": "^1.6.7",
|
|
25
21
|
"react": "^19.0.0",
|
|
26
22
|
"react-dom": "^19.0.0",
|
|
23
|
+
"@ui-sdk/core": "0.1.0-beta.12",
|
|
24
|
+
"@ui-sdk/react": "0.1.0-beta.12",
|
|
27
25
|
"tailwind-merge": "^2.5.0",
|
|
28
26
|
"tailwindcss": "^4.3.0",
|
|
29
27
|
"tw-animate-css": "^1.2.0"
|
|
@@ -34,7 +32,7 @@
|
|
|
34
32
|
"@testing-library/dom": "^10.4.0",
|
|
35
33
|
"@testing-library/react": "^16.3.0",
|
|
36
34
|
"@types/node": "^22.0.0",
|
|
37
|
-
"@types/react": "^19.
|
|
35
|
+
"@types/react": "^19.2.10",
|
|
38
36
|
"@types/react-dom": "^19.0.0",
|
|
39
37
|
"typescript": "^5.6.0"
|
|
40
38
|
}
|
|
@@ -25,6 +25,8 @@ this pass before the user has to ask.
|
|
|
25
25
|
- `app.ts`: data model + manifest (`entity()` + `field.*`, queries/actions/policies, `routes: await discoverAppRoutes()`). Ends with `console.log(JSON.stringify(manifest))` — that line is the manifest handoff (the CLI parses this file's stdout), not debug output. Never remove it.
|
|
26
26
|
- `app/`: file-based SSR routes. `app/page.tsx` → `/`, `app/about/page.tsx` → `/about`, `app/blog/[slug]/page.tsx` → `/blog/:slug`. A `(group)` directory is stripped from the URL — `app/(marketing)/about/page.tsx` still serves `/about` — so a group's `layout.tsx` gives one section its own chrome (nav, footer) without changing any path; routes outside the group render without it. `app/layout.tsx` is the document shell; `app/error.tsx` / `app/not-found.tsx` are boundaries.
|
|
27
27
|
- `app/globals.css`: Tailwind v4 entrypoint (auto-compiled and injected).
|
|
28
|
+
- `components/`: reusable React components. `components/ui/` holds the primitives, built on `@ui-sdk/react`.
|
|
29
|
+
- `app/internal/`: `/internal/design` shows the design tokens and `/internal/components` shows every component. See "UI: design tokens and components".
|
|
28
30
|
- `functions/`: server functions, one per file, `default`-exported.
|
|
29
31
|
- `.pylon/`: local dev state (SQLite, jobs, sessions, uploads). Created by `pylon dev`. Do not commit.
|
|
30
32
|
|
|
@@ -68,6 +70,21 @@ this pass before the user has to ask.
|
|
|
68
70
|
- **It's `db.useQueryOne`, not `useOne`.** Validators and field types have aliases: `v.bool`/`v.boolean`, `v.float`/`v.number`.
|
|
69
71
|
- **Use the supported file and scheduling APIs.** Files go through `<FileUpload>` and `/api/files/*`; an upload is readable by its uploader only, so pass `visibility: "public"` to `uploadFile` or `<FileUpload>` for files every visitor sees; there is no `ctx.files`. One-shot work uses `ctx.scheduler.runAfter`, `runAt`, or `cancel`; there is no `defineWorkflow` or `defineJob`. Recurring work uses `cron("0 * * * *", "fnName")` in `buildManifest({ crons: [...] })`, imported from `@pylonsync/sdk`. Make the target function `internal: true`. It runs with anonymous auth, but its own `ctx.db.*` calls are server-side and bypass policies. Use `ctx.auth.elevate({ admin: true, reason: "..." })`, with a mandatory reason, only when chaining another internal function through `ctx.scheduler`.
|
|
70
72
|
|
|
73
|
+
## UI: design tokens and components
|
|
74
|
+
|
|
75
|
+
Every screen is built from reusable components. Before you write UI, open `/internal/components` (the component gallery) and `/internal/design` (the design tokens) in the running app.
|
|
76
|
+
|
|
77
|
+
- **Reuse first.** Look in `components/` and on `/internal/components` before you write markup. If a component exists, use it. If it almost fits, extend it with a variant or a prop. Do not copy its markup into a page.
|
|
78
|
+
- **A page composes components.** A `page.tsx` holds data loading and layout. When the same markup appears a second time, move it into a component.
|
|
79
|
+
- **Two levels.** `components/ui/` holds primitives (Button, Dialog, Select). A primitive has no app data and makes no `db.*` or `callFn` call. `components/` holds the components of this product, built from the primitives.
|
|
80
|
+
- **Compose, do not configure.** Build a component from small parts that nest (`Card`, `CardHeader`, `CardTitle`) and accept `children`. Do not add a boolean prop for each layout variation. Each component accepts `className` and passes its other props to its root element. A visual variation is a `cva` variant.
|
|
81
|
+
- **Behavior comes from ui-sdk.** Build interactive primitives (dialogs, menus, selects, tabs, tooltips, comboboxes) on `@ui-sdk/react` parts. Do not write focus handling, keyboard navigation or ARIA attributes by hand, and do not add a second component library. Read `node_modules/@ui-sdk/react/docs/llms.txt` first, then the page of each component you use in `node_modules/@ui-sdk/react/docs/components/`. For a behavior with no ready-made component, read `core.md` and `rendering.md` in the same `docs/` directory.
|
|
82
|
+
- **ui-sdk conventions.** Import each component from its own entry (`@ui-sdk/react/dialog`). The parts have no styles. Style them with Tailwind classes and their state attributes (`data-open`, `data-disabled`, `data-highlighted`, `data-starting-style`, `data-ending-style`). To render a part as a different element, pass the element to `render`: `<Button render={<Link href="/" />}>Home</Button>`. There is no `asChild` prop. `@layer ui-sdk;` stays the first line of `app/globals.css`.
|
|
83
|
+
- **Tokens only.** Colors, radii and shadows come from the tokens in `app/globals.css` (`bg-primary`, `text-muted-foreground`, `rounded-lg`). Do not write a hex color in a new component. To add a token, add it to `app/globals.css` and to `app/internal/design/page.tsx`.
|
|
84
|
+
- **Keep the gallery current.** When you add or change a component, update its `Showcase` in `app/internal/components/page.tsx` and its entry in `app/internal/sections.ts` in the same change. Show each variant and each state.
|
|
85
|
+
|
|
86
|
+
The product does not link to `/internal/*`, and `app/robots.ts` and the page metadata keep search engines out. The pages are open to anyone who has the URL. To restrict them, read `auth` in `app/internal/layout.tsx` and call `response.notFound()`.
|
|
87
|
+
|
|
71
88
|
## Testing
|
|
72
89
|
|
|
73
90
|
`pylon test` discovers every `*.test.ts` / `*.test.tsx` file under `tests/` (or `functions/`) and runs it with **Bun's test runner** (`import { test, expect } from "bun:test"`). Run the suite with `pylon test` (or `npm test`); filter with `pylon test <substring>`. This template ships `bunfig.toml` + `tests/setup.ts` (registers happy-dom) so component tests render out of the box, plus starter tests under `tests/`; replace them with your own.
|