@pylonsync/create-pylon 0.22.74 → 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 +8 -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/functions/checkout.ts +9 -8
- 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,68 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import PylonClient
|
|
3
|
-
import PylonSync
|
|
4
|
-
|
|
5
|
-
struct ProfileSetupView: View {
|
|
6
|
-
@EnvironmentObject var session: AppSession
|
|
7
|
-
let engine: SyncEngine
|
|
8
|
-
let existingHandles: [String]
|
|
9
|
-
|
|
10
|
-
@State private var handle = ""
|
|
11
|
-
@State private var displayName = ""
|
|
12
|
-
@State private var bio = ""
|
|
13
|
-
@State private var saving = false
|
|
14
|
-
@State private var errorMessage: String?
|
|
15
|
-
|
|
16
|
-
var body: some View {
|
|
17
|
-
NavigationStack {
|
|
18
|
-
Form {
|
|
19
|
-
Section("Set up your profile") {
|
|
20
|
-
TextField("handle (lowercase, 2–20)", text: $handle)
|
|
21
|
-
.autocorrectionDisabled()
|
|
22
|
-
.textInputAutocapitalization(.never)
|
|
23
|
-
TextField("Display name", text: $displayName)
|
|
24
|
-
TextField("Bio (optional)", text: $bio)
|
|
25
|
-
}
|
|
26
|
-
if let errorMessage {
|
|
27
|
-
Section {
|
|
28
|
-
Text(errorMessage)
|
|
29
|
-
.foregroundStyle(.red)
|
|
30
|
-
.font(.caption)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
Section {
|
|
34
|
-
Button(saving ? "Saving…" : "Save") {
|
|
35
|
-
Task { await save() }
|
|
36
|
-
}
|
|
37
|
-
.disabled(saving
|
|
38
|
-
|| handle.trimmingCharacters(in: .whitespaces).isEmpty
|
|
39
|
-
|| displayName.trimmingCharacters(in: .whitespaces).isEmpty)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.navigationTitle("__APP_NAME__")
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private func save() async {
|
|
47
|
-
saving = true
|
|
48
|
-
defer { saving = false }
|
|
49
|
-
let lower = handle.trimmingCharacters(in: .whitespaces).lowercased()
|
|
50
|
-
if existingHandles.contains(lower) {
|
|
51
|
-
errorMessage = "@\(lower) is taken"
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
do {
|
|
55
|
-
let profile: Profile = try await session.client.callFn(
|
|
56
|
-
"upsertProfile",
|
|
57
|
-
args: UpsertProfileArgs(
|
|
58
|
-
handle: lower,
|
|
59
|
-
displayName: displayName.trimmingCharacters(in: .whitespaces),
|
|
60
|
-
bio: bio.trimmingCharacters(in: .whitespaces),
|
|
61
|
-
),
|
|
62
|
-
)
|
|
63
|
-
session.setMyProfileId(profile.id)
|
|
64
|
-
} catch {
|
|
65
|
-
errorMessage = "Save failed: \(error.localizedDescription)"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import PylonClient
|
|
3
|
-
import PylonSync
|
|
4
|
-
import PylonSwiftUI
|
|
5
|
-
|
|
6
|
-
/// Watches the live Profile collection. If we have a saved profileId
|
|
7
|
-
/// AND a Profile row in the local store with that id, render the
|
|
8
|
-
/// feed; otherwise, profile setup. The profile row appears in the
|
|
9
|
-
/// store via the SyncEngine, so a fresh device sees its own profile
|
|
10
|
-
/// pop in moments after `upsertProfile` returns.
|
|
11
|
-
struct RootView: View {
|
|
12
|
-
@EnvironmentObject var session: AppSession
|
|
13
|
-
let engine: SyncEngine
|
|
14
|
-
@StateObject private var profiles: PylonQuery<Profile>
|
|
15
|
-
|
|
16
|
-
init(engine: SyncEngine) {
|
|
17
|
-
self.engine = engine
|
|
18
|
-
_profiles = StateObject(
|
|
19
|
-
wrappedValue: PylonQuery<Profile>(engine: engine, entity: "Profile"),
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var body: some View {
|
|
24
|
-
Group {
|
|
25
|
-
if let me = currentProfile {
|
|
26
|
-
FeedView(engine: engine, me: me, profiles: profiles.rows)
|
|
27
|
-
} else {
|
|
28
|
-
ProfileSetupView(
|
|
29
|
-
engine: engine,
|
|
30
|
-
existingHandles: profiles.rows.map { $0.handle },
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private var currentProfile: Profile? {
|
|
37
|
-
guard let id = session.myProfileId else { return nil }
|
|
38
|
-
return profiles.rows.first { $0.id == id }
|
|
39
|
-
}
|
|
40
|
-
}
|
package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import PylonClient
|
|
3
|
-
import PylonSync
|
|
4
|
-
|
|
5
|
-
@main
|
|
6
|
-
struct __APP_NAME_PASCAL__App: App {
|
|
7
|
-
@StateObject private var session = AppSession()
|
|
8
|
-
|
|
9
|
-
var body: some Scene {
|
|
10
|
-
Window("__APP_NAME__", id: "main") {
|
|
11
|
-
Group {
|
|
12
|
-
if let engine = session.engine {
|
|
13
|
-
RootView(engine: engine)
|
|
14
|
-
.environmentObject(session)
|
|
15
|
-
.frame(minWidth: 480, minHeight: 600)
|
|
16
|
-
} else {
|
|
17
|
-
ProgressView()
|
|
18
|
-
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
.task { await session.bootIfNeeded() }
|
|
22
|
-
}
|
|
23
|
-
.windowResizability(.contentMinSize)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@MainActor
|
|
28
|
-
final class AppSession: ObservableObject {
|
|
29
|
-
let client: PylonClient
|
|
30
|
-
@Published private(set) var engine: SyncEngine?
|
|
31
|
-
@Published var myProfileId: String?
|
|
32
|
-
|
|
33
|
-
init() {
|
|
34
|
-
let baseURLString = ProcessInfo.processInfo.environment["PYLON_BASE_URL"]
|
|
35
|
-
?? "http://localhost:4321"
|
|
36
|
-
guard let url = URL(string: baseURLString) else {
|
|
37
|
-
fatalError("Invalid PYLON_BASE_URL: \(baseURLString)")
|
|
38
|
-
}
|
|
39
|
-
self.client = PylonClient(baseURL: url, appName: "__APP_NAME_SNAKE__")
|
|
40
|
-
self.myProfileId = UserDefaults.standard.string(forKey: "myProfileId")
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
func bootIfNeeded() async {
|
|
44
|
-
guard engine == nil else { return }
|
|
45
|
-
let baseURLString = ProcessInfo.processInfo.environment["PYLON_BASE_URL"]
|
|
46
|
-
?? "http://localhost:4321"
|
|
47
|
-
guard let url = URL(string: baseURLString) else { return }
|
|
48
|
-
let config = SyncEngineConfig(baseURL: url, appName: "__APP_NAME_SNAKE__")
|
|
49
|
-
let engine = await SyncEngine(config: config, client: client)
|
|
50
|
-
await engine.start()
|
|
51
|
-
self.engine = engine
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
func setMyProfileId(_ id: String?) {
|
|
55
|
-
myProfileId = id
|
|
56
|
-
if let id { UserDefaults.standard.set(id, forKey: "myProfileId") }
|
|
57
|
-
else { UserDefaults.standard.removeObject(forKey: "myProfileId") }
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<!-- App Sandbox + outgoing-network client. Without these the
|
|
6
|
-
scaffolded app can't reach localhost:4321 during dev or
|
|
7
|
-
a remote Pylon Cloud URL in production. -->
|
|
8
|
-
<key>com.apple.security.app-sandbox</key>
|
|
9
|
-
<true/>
|
|
10
|
-
<key>com.apple.security.network.client</key>
|
|
11
|
-
<true/>
|
|
12
|
-
</dict>
|
|
13
|
-
</plist>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
name: __APP_NAME_PASCAL__
|
|
2
|
-
options:
|
|
3
|
-
bundleIdPrefix: com.example
|
|
4
|
-
deploymentTarget:
|
|
5
|
-
macOS: "13.0"
|
|
6
|
-
|
|
7
|
-
packages:
|
|
8
|
-
pylon:
|
|
9
|
-
url: https://github.com/pylonsync/pylon-swift.git
|
|
10
|
-
from: "0.3.0"
|
|
11
|
-
|
|
12
|
-
targets:
|
|
13
|
-
__APP_NAME_PASCAL__:
|
|
14
|
-
type: application
|
|
15
|
-
platform: macOS
|
|
16
|
-
sources:
|
|
17
|
-
- path: Sources/__APP_NAME_PASCAL__
|
|
18
|
-
settings:
|
|
19
|
-
base:
|
|
20
|
-
GENERATE_INFOPLIST_FILE: YES
|
|
21
|
-
INFOPLIST_KEY_CFBundleDisplayName: __APP_NAME__
|
|
22
|
-
INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.developer-tools"
|
|
23
|
-
INFOPLIST_KEY_NSHumanReadableCopyright: ""
|
|
24
|
-
SWIFT_VERSION: "5.9"
|
|
25
|
-
ENABLE_PREVIEWS: YES
|
|
26
|
-
# The mac app talks to the local Pylon control plane during dev.
|
|
27
|
-
# App Sandbox needs the network client entitlement to reach
|
|
28
|
-
# localhost; we declare it via codesign entitlements at build time.
|
|
29
|
-
CODE_SIGN_ENTITLEMENTS: __APP_NAME_PASCAL__.entitlements
|
|
30
|
-
dependencies:
|
|
31
|
-
- package: pylon
|
|
32
|
-
product: PylonClient
|
|
33
|
-
- package: pylon
|
|
34
|
-
product: PylonSync
|
|
35
|
-
- package: pylon
|
|
36
|
-
product: PylonSwiftUI
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// swift-tools-version:5.9
|
|
2
|
-
import PackageDescription
|
|
3
|
-
|
|
4
|
-
// SwiftPM package for the __APP_NAME__ macOS app.
|
|
5
|
-
//
|
|
6
|
-
// The executable target runs locally with `swift run`. For a proper
|
|
7
|
-
// signed `.app` bundle:
|
|
8
|
-
//
|
|
9
|
-
// brew install xcodegen
|
|
10
|
-
// xcodegen generate
|
|
11
|
-
// open __APP_NAME_PASCAL__.xcodeproj
|
|
12
|
-
//
|
|
13
|
-
// The Xcode project pulls the same Sources/__APP_NAME_PASCAL__/ tree
|
|
14
|
-
// as `swift build`, so SwiftPM and Xcode share one source set.
|
|
15
|
-
let package = Package(
|
|
16
|
-
name: "__APP_NAME_PASCAL__",
|
|
17
|
-
platforms: [
|
|
18
|
-
.macOS(.v13),
|
|
19
|
-
],
|
|
20
|
-
dependencies: [
|
|
21
|
-
.package(url: "https://github.com/pylonsync/pylon-swift.git", from: "0.3.0"),
|
|
22
|
-
],
|
|
23
|
-
targets: [
|
|
24
|
-
.executableTarget(
|
|
25
|
-
name: "__APP_NAME_PASCAL__",
|
|
26
|
-
dependencies: [
|
|
27
|
-
.product(name: "PylonClient", package: "pylon-swift"),
|
|
28
|
-
.product(name: "PylonSwiftUI", package: "pylon-swift"),
|
|
29
|
-
],
|
|
30
|
-
path: "Sources/__APP_NAME_PASCAL__"
|
|
31
|
-
),
|
|
32
|
-
]
|
|
33
|
-
)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
|
|
3
|
-
/// Mirrors `Todo` from `apps/api/schema.ts`. Regenerate from the
|
|
4
|
-
/// schema with `pylon codegen client schema.ts --target swift` for
|
|
5
|
-
/// production.
|
|
6
|
-
struct Todo: Codable, Identifiable, Hashable {
|
|
7
|
-
let id: String
|
|
8
|
-
var title: String
|
|
9
|
-
var done: Bool
|
|
10
|
-
let createdAt: String
|
|
11
|
-
var position: Double?
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
struct AddTodoArgs: Encodable { let title: String }
|
|
15
|
-
struct ToggleTodoArgs: Encodable { let id: String; let done: Bool }
|
|
16
|
-
struct EditTodoArgs: Encodable { let id: String; let title: String }
|
|
17
|
-
struct DeleteTodoArgs: Encodable { let id: String }
|
|
18
|
-
struct ReorderTodoArgs: Encodable { let id: String; let position: Double }
|
|
19
|
-
struct EmptyArgs: Encodable {}
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import PylonClient
|
|
3
|
-
|
|
4
|
-
/// macOS Todo list. List with inline checkbox + edit-on-double-click +
|
|
5
|
-
/// delete on hover. macOS doesn't ship `EditButton`, so reordering is
|
|
6
|
-
/// drag-and-drop via `.onMove(perform:)` which works in editable List.
|
|
7
|
-
struct TodoListView: View {
|
|
8
|
-
@EnvironmentObject var session: AppSession
|
|
9
|
-
@State private var todos: [Todo] = []
|
|
10
|
-
@State private var draftTitle: String = ""
|
|
11
|
-
@State private var loading = true
|
|
12
|
-
@State private var pending = false
|
|
13
|
-
@State private var errorMessage: String?
|
|
14
|
-
@State private var editingId: String?
|
|
15
|
-
@State private var editingDraft: String = ""
|
|
16
|
-
@State private var hoveredId: String?
|
|
17
|
-
|
|
18
|
-
var body: some View {
|
|
19
|
-
VStack(spacing: 0) {
|
|
20
|
-
HStack(spacing: 8) {
|
|
21
|
-
TextField("What needs doing?", text: $draftTitle)
|
|
22
|
-
.textFieldStyle(.roundedBorder)
|
|
23
|
-
.onSubmit { Task { await add() } }
|
|
24
|
-
Button("Add") { Task { await add() } }
|
|
25
|
-
.keyboardShortcut(.defaultAction)
|
|
26
|
-
.disabled(draftTitle.trimmingCharacters(in: .whitespaces).isEmpty || pending)
|
|
27
|
-
}
|
|
28
|
-
.padding(16)
|
|
29
|
-
|
|
30
|
-
Divider()
|
|
31
|
-
|
|
32
|
-
if loading {
|
|
33
|
-
ProgressView().padding()
|
|
34
|
-
Spacer()
|
|
35
|
-
} else if todos.isEmpty {
|
|
36
|
-
Spacer()
|
|
37
|
-
Text("No todos yet.")
|
|
38
|
-
.foregroundStyle(.secondary)
|
|
39
|
-
Spacer()
|
|
40
|
-
} else {
|
|
41
|
-
List {
|
|
42
|
-
ForEach(todos) { todo in
|
|
43
|
-
row(todo)
|
|
44
|
-
}
|
|
45
|
-
.onMove { source, destination in
|
|
46
|
-
Task { await reorder(from: source, to: destination) }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
.listStyle(.inset)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if let errorMessage {
|
|
53
|
-
Divider()
|
|
54
|
-
Text(errorMessage)
|
|
55
|
-
.foregroundStyle(.red)
|
|
56
|
-
.font(.caption)
|
|
57
|
-
.padding(8)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.task { await load() }
|
|
61
|
-
.toolbar {
|
|
62
|
-
ToolbarItem(placement: .primaryAction) {
|
|
63
|
-
Button { Task { await load() } } label: {
|
|
64
|
-
Image(systemName: "arrow.clockwise")
|
|
65
|
-
}
|
|
66
|
-
.disabled(loading)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@ViewBuilder
|
|
72
|
-
private func row(_ todo: Todo) -> some View {
|
|
73
|
-
HStack(spacing: 10) {
|
|
74
|
-
Button { Task { await toggle(todo) } } label: {
|
|
75
|
-
Image(systemName: todo.done ? "checkmark.circle.fill" : "circle")
|
|
76
|
-
.foregroundStyle(todo.done ? .green : .secondary)
|
|
77
|
-
.imageScale(.large)
|
|
78
|
-
}
|
|
79
|
-
.buttonStyle(.plain)
|
|
80
|
-
|
|
81
|
-
if editingId == todo.id {
|
|
82
|
-
TextField("Title", text: $editingDraft)
|
|
83
|
-
.textFieldStyle(.roundedBorder)
|
|
84
|
-
.onSubmit { Task { await commitEdit(todo) } }
|
|
85
|
-
Button("Save") { Task { await commitEdit(todo) } }
|
|
86
|
-
.buttonStyle(.bordered)
|
|
87
|
-
Button("Cancel") {
|
|
88
|
-
editingId = nil
|
|
89
|
-
editingDraft = ""
|
|
90
|
-
}
|
|
91
|
-
.buttonStyle(.bordered)
|
|
92
|
-
} else {
|
|
93
|
-
Text(todo.title)
|
|
94
|
-
.strikethrough(todo.done, color: .secondary)
|
|
95
|
-
.foregroundStyle(todo.done ? .secondary : .primary)
|
|
96
|
-
.onTapGesture(count: 2) {
|
|
97
|
-
editingId = todo.id
|
|
98
|
-
editingDraft = todo.title
|
|
99
|
-
}
|
|
100
|
-
Spacer()
|
|
101
|
-
if hoveredId == todo.id {
|
|
102
|
-
Button("Edit") {
|
|
103
|
-
editingId = todo.id
|
|
104
|
-
editingDraft = todo.title
|
|
105
|
-
}
|
|
106
|
-
.buttonStyle(.borderless)
|
|
107
|
-
.font(.caption)
|
|
108
|
-
Button("Delete") { Task { await delete(todo) } }
|
|
109
|
-
.buttonStyle(.borderless)
|
|
110
|
-
.font(.caption)
|
|
111
|
-
.foregroundStyle(.red)
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
.padding(.vertical, 4)
|
|
116
|
-
.contentShape(Rectangle())
|
|
117
|
-
.onHover { hovering in
|
|
118
|
-
hoveredId = hovering ? todo.id : (hoveredId == todo.id ? nil : hoveredId)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// MARK: - Network
|
|
123
|
-
|
|
124
|
-
private func load() async {
|
|
125
|
-
loading = true
|
|
126
|
-
defer { loading = false }
|
|
127
|
-
do {
|
|
128
|
-
let rows: [Todo] = try await session.pylon.callFn("listTodos", args: EmptyArgs())
|
|
129
|
-
todos = rows
|
|
130
|
-
errorMessage = nil
|
|
131
|
-
} catch {
|
|
132
|
-
errorMessage = "Load failed: \(error.localizedDescription)"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
private func add() async {
|
|
137
|
-
let trimmed = draftTitle.trimmingCharacters(in: .whitespaces)
|
|
138
|
-
guard !trimmed.isEmpty else { return }
|
|
139
|
-
pending = true
|
|
140
|
-
defer { pending = false }
|
|
141
|
-
do {
|
|
142
|
-
let todo: Todo = try await session.pylon.callFn(
|
|
143
|
-
"addTodo",
|
|
144
|
-
args: AddTodoArgs(title: trimmed),
|
|
145
|
-
)
|
|
146
|
-
todos.append(todo)
|
|
147
|
-
draftTitle = ""
|
|
148
|
-
} catch {
|
|
149
|
-
errorMessage = "Add failed: \(error.localizedDescription)"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
private func toggle(_ todo: Todo) async {
|
|
154
|
-
let nextDone = !todo.done
|
|
155
|
-
if let i = todos.firstIndex(where: { $0.id == todo.id }) {
|
|
156
|
-
todos[i].done = nextDone
|
|
157
|
-
}
|
|
158
|
-
do {
|
|
159
|
-
let _: Todo = try await session.pylon.callFn(
|
|
160
|
-
"toggleTodo",
|
|
161
|
-
args: ToggleTodoArgs(id: todo.id, done: nextDone),
|
|
162
|
-
)
|
|
163
|
-
} catch {
|
|
164
|
-
if let i = todos.firstIndex(where: { $0.id == todo.id }) {
|
|
165
|
-
todos[i].done = todo.done
|
|
166
|
-
}
|
|
167
|
-
errorMessage = "Toggle failed: \(error.localizedDescription)"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
private func commitEdit(_ todo: Todo) async {
|
|
172
|
-
let trimmed = editingDraft.trimmingCharacters(in: .whitespaces)
|
|
173
|
-
guard !trimmed.isEmpty, trimmed != todo.title else {
|
|
174
|
-
editingId = nil
|
|
175
|
-
editingDraft = ""
|
|
176
|
-
return
|
|
177
|
-
}
|
|
178
|
-
let originalTitle = todo.title
|
|
179
|
-
if let i = todos.firstIndex(where: { $0.id == todo.id }) {
|
|
180
|
-
todos[i].title = trimmed
|
|
181
|
-
}
|
|
182
|
-
editingId = nil
|
|
183
|
-
editingDraft = ""
|
|
184
|
-
do {
|
|
185
|
-
let _: Todo = try await session.pylon.callFn(
|
|
186
|
-
"editTodo",
|
|
187
|
-
args: EditTodoArgs(id: todo.id, title: trimmed),
|
|
188
|
-
)
|
|
189
|
-
} catch {
|
|
190
|
-
if let i = todos.firstIndex(where: { $0.id == todo.id }) {
|
|
191
|
-
todos[i].title = originalTitle
|
|
192
|
-
}
|
|
193
|
-
errorMessage = "Rename failed: \(error.localizedDescription)"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
private func delete(_ todo: Todo) async {
|
|
198
|
-
let snapshot = todos
|
|
199
|
-
todos.removeAll { $0.id == todo.id }
|
|
200
|
-
do {
|
|
201
|
-
let _: Todo = try await session.pylon.callFn(
|
|
202
|
-
"deleteTodo",
|
|
203
|
-
args: DeleteTodoArgs(id: todo.id),
|
|
204
|
-
)
|
|
205
|
-
} catch {
|
|
206
|
-
todos = snapshot
|
|
207
|
-
errorMessage = "Delete failed: \(error.localizedDescription)"
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
private func reorder(from source: IndexSet, to destination: Int) async {
|
|
212
|
-
var moved = todos
|
|
213
|
-
moved.move(fromOffsets: source, toOffset: destination)
|
|
214
|
-
guard let movedIndex = source.first else { return }
|
|
215
|
-
let newIndex = destination > movedIndex ? destination - 1 : destination
|
|
216
|
-
guard newIndex < moved.count else { return }
|
|
217
|
-
let movedTodo = moved[newIndex]
|
|
218
|
-
let prev = newIndex > 0 ? moved[newIndex - 1] : nil
|
|
219
|
-
let next = newIndex + 1 < moved.count ? moved[newIndex + 1] : nil
|
|
220
|
-
let prevPos = prev?.position ?? 0
|
|
221
|
-
let nextPos = next?.position ?? 0
|
|
222
|
-
let position: Double
|
|
223
|
-
if prev != nil && next != nil {
|
|
224
|
-
position = (prevPos + nextPos) / 2
|
|
225
|
-
} else if prev != nil {
|
|
226
|
-
position = prevPos + 1024
|
|
227
|
-
} else if next != nil {
|
|
228
|
-
position = nextPos - 1024
|
|
229
|
-
} else {
|
|
230
|
-
position = 1024
|
|
231
|
-
}
|
|
232
|
-
let snapshot = todos
|
|
233
|
-
todos = moved
|
|
234
|
-
do {
|
|
235
|
-
let _: Todo = try await session.pylon.callFn(
|
|
236
|
-
"reorderTodo",
|
|
237
|
-
args: ReorderTodoArgs(id: movedTodo.id, position: position),
|
|
238
|
-
)
|
|
239
|
-
} catch {
|
|
240
|
-
todos = snapshot
|
|
241
|
-
errorMessage = "Reorder failed: \(error.localizedDescription)"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import PylonClient
|
|
3
|
-
|
|
4
|
-
@main
|
|
5
|
-
struct __APP_NAME_PASCAL__App: App {
|
|
6
|
-
@StateObject private var session = AppSession()
|
|
7
|
-
|
|
8
|
-
var body: some Scene {
|
|
9
|
-
Window("__APP_NAME__", id: "main") {
|
|
10
|
-
TodoListView()
|
|
11
|
-
.environmentObject(session)
|
|
12
|
-
.frame(minWidth: 480, minHeight: 360)
|
|
13
|
-
}
|
|
14
|
-
.windowResizability(.contentMinSize)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@MainActor
|
|
19
|
-
final class AppSession: ObservableObject {
|
|
20
|
-
let pylon: PylonClient
|
|
21
|
-
|
|
22
|
-
init() {
|
|
23
|
-
let baseURLString = ProcessInfo.processInfo.environment["PYLON_BASE_URL"]
|
|
24
|
-
?? "http://localhost:4321"
|
|
25
|
-
guard let url = URL(string: baseURLString) else {
|
|
26
|
-
fatalError("Invalid PYLON_BASE_URL: \(baseURLString)")
|
|
27
|
-
}
|
|
28
|
-
self.pylon = PylonClient(baseURL: url, appName: "__APP_NAME_SNAKE__")
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<!-- App Sandbox + outgoing-network client. Without these the
|
|
6
|
-
scaffolded app can't reach localhost:4321 during dev or
|
|
7
|
-
a remote Pylon Cloud URL in production. -->
|
|
8
|
-
<key>com.apple.security.app-sandbox</key>
|
|
9
|
-
<true/>
|
|
10
|
-
<key>com.apple.security.network.client</key>
|
|
11
|
-
<true/>
|
|
12
|
-
</dict>
|
|
13
|
-
</plist>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: __APP_NAME_PASCAL__
|
|
2
|
-
options:
|
|
3
|
-
bundleIdPrefix: com.example
|
|
4
|
-
deploymentTarget:
|
|
5
|
-
macOS: "13.0"
|
|
6
|
-
|
|
7
|
-
packages:
|
|
8
|
-
pylon:
|
|
9
|
-
url: https://github.com/pylonsync/pylon-swift.git
|
|
10
|
-
from: "0.3.0"
|
|
11
|
-
|
|
12
|
-
targets:
|
|
13
|
-
__APP_NAME_PASCAL__:
|
|
14
|
-
type: application
|
|
15
|
-
platform: macOS
|
|
16
|
-
sources:
|
|
17
|
-
- path: Sources/__APP_NAME_PASCAL__
|
|
18
|
-
settings:
|
|
19
|
-
base:
|
|
20
|
-
GENERATE_INFOPLIST_FILE: YES
|
|
21
|
-
INFOPLIST_KEY_CFBundleDisplayName: __APP_NAME__
|
|
22
|
-
INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.developer-tools"
|
|
23
|
-
INFOPLIST_KEY_NSHumanReadableCopyright: ""
|
|
24
|
-
SWIFT_VERSION: "5.9"
|
|
25
|
-
ENABLE_PREVIEWS: YES
|
|
26
|
-
# The mac app talks to the local Pylon control plane during dev.
|
|
27
|
-
# App Sandbox needs the network client entitlement to reach
|
|
28
|
-
# localhost; we declare it via codesign entitlements at build time.
|
|
29
|
-
CODE_SIGN_ENTITLEMENTS: __APP_NAME_PASCAL__.entitlements
|
|
30
|
-
dependencies:
|
|
31
|
-
- package: pylon
|
|
32
|
-
product: PylonClient
|
|
33
|
-
- package: pylon
|
|
34
|
-
product: PylonSwiftUI
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { ChevronDownIcon } from "lucide-react"
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
|
|
6
|
-
function NativeSelect({
|
|
7
|
-
className,
|
|
8
|
-
size = "default",
|
|
9
|
-
...props
|
|
10
|
-
}: Omit<React.ComponentProps<"select">, "size"> & { size?: "sm" | "default" }) {
|
|
11
|
-
return (
|
|
12
|
-
<div
|
|
13
|
-
className="group/native-select relative w-full has-[select:disabled]:opacity-50"
|
|
14
|
-
data-slot="native-select-wrapper"
|
|
15
|
-
>
|
|
16
|
-
<select
|
|
17
|
-
data-slot="native-select"
|
|
18
|
-
data-size={size}
|
|
19
|
-
className={cn(
|
|
20
|
-
"h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50",
|
|
21
|
-
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
22
|
-
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
<ChevronDownIcon
|
|
28
|
-
className="pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none"
|
|
29
|
-
aria-hidden="true"
|
|
30
|
-
data-slot="native-select-icon"
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function NativeSelectOption({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<"option">) {
|
|
40
|
-
return (
|
|
41
|
-
<option
|
|
42
|
-
data-slot="native-select-option"
|
|
43
|
-
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
44
|
-
{...props}
|
|
45
|
-
/>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function NativeSelectOptGroup({
|
|
50
|
-
className,
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<"optgroup">) {
|
|
53
|
-
return (
|
|
54
|
-
<optgroup
|
|
55
|
-
data-slot="native-select-optgroup"
|
|
56
|
-
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "",
|
|
8
|
-
"css": "app/globals.css",
|
|
9
|
-
"baseColor": "zinc",
|
|
10
|
-
"cssVariables": true
|
|
11
|
-
},
|
|
12
|
-
"aliases": {
|
|
13
|
-
"components": "@/components",
|
|
14
|
-
"utils": "@/lib/utils",
|
|
15
|
-
"ui": "@/components/ui",
|
|
16
|
-
"lib": "@/lib",
|
|
17
|
-
"hooks": "@/hooks"
|
|
18
|
-
},
|
|
19
|
-
"iconLibrary": "lucide"
|
|
20
|
-
}
|