@agent-native/core 0.101.14 → 0.102.1
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/templates-meta.ts +13 -0
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +1 -1
- package/corpus/core/src/client/org/OrgSwitcher.tsx +2 -0
- package/corpus/templates/analytics/changelog/2026-07-15-fixed-the-agent-discarding-a-successful-dashboard-edit-and-r.md +6 -0
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +30 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +15 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +59 -4
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +9 -0
- package/corpus/templates/content/actions/preview-builder-source-review.ts +6 -4
- package/corpus/templates/content/app/components/editor/DescriptionField.tsx +10 -2
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +4 -0
- package/corpus/templates/content/changelog/2026-07-15-page-and-database-descriptions-now-use-a-clean-single-line-f.md +6 -0
- package/corpus/templates/content/changelog/2026-07-15-selected-builder-reviews-now-load-only-the-chosen-rows-avoid.md +6 -0
- package/corpus/templates/content/shared/api.ts +1 -0
- package/corpus/templates/tasks/.agents/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.agents/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +492 -0
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/README.md +43 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +110 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/templates/tasks/.agents/skills/change-summary/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/README.md +75 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/README.md +53 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +73 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +112 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/README.md +41 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +114 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/README.md +42 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +104 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/README.md +55 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/README.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +126 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +280 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/README.md +61 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/SKILL.md +547 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/canvas.md +121 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/document-quality.md +178 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/exemplar.md +62 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/SKILL.md +634 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.claude/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.claude/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.env.example +5 -0
- package/corpus/templates/tasks/.ignore +0 -0
- package/corpus/templates/tasks/.prettierrc +5 -0
- package/corpus/templates/tasks/AGENTS.md +158 -0
- package/corpus/templates/tasks/DEVELOPING.md +185 -0
- package/corpus/templates/tasks/README.md +16 -0
- package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +21 -0
- package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +27 -0
- package/corpus/templates/tasks/actions/bulk-update-tasks.ts +35 -0
- package/corpus/templates/tasks/actions/create-custom-field.ts +22 -0
- package/corpus/templates/tasks/actions/create-inbox-item.ts +30 -0
- package/corpus/templates/tasks/actions/create-task.ts +33 -0
- package/corpus/templates/tasks/actions/delete-custom-field.ts +19 -0
- package/corpus/templates/tasks/actions/delete-inbox-item.ts +17 -0
- package/corpus/templates/tasks/actions/delete-task.ts +17 -0
- package/corpus/templates/tasks/actions/lib/boolean-query-param.ts +30 -0
- package/corpus/templates/tasks/actions/list-custom-fields.ts +18 -0
- package/corpus/templates/tasks/actions/list-inbox-items.ts +16 -0
- package/corpus/templates/tasks/actions/list-tasks.ts +52 -0
- package/corpus/templates/tasks/actions/list-visible-task-fields.ts +18 -0
- package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +31 -0
- package/corpus/templates/tasks/actions/navigate.ts +51 -0
- package/corpus/templates/tasks/actions/reorder-custom-fields.ts +27 -0
- package/corpus/templates/tasks/actions/reorder-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/reorder-tasks.ts +29 -0
- package/corpus/templates/tasks/actions/run.ts +2 -0
- package/corpus/templates/tasks/actions/update-custom-field.ts +33 -0
- package/corpus/templates/tasks/actions/update-inbox-item.ts +24 -0
- package/corpus/templates/tasks/actions/update-task.ts +68 -0
- package/corpus/templates/tasks/actions/update-visible-task-fields.ts +27 -0
- package/corpus/templates/tasks/actions/view-screen-helpers.ts +68 -0
- package/corpus/templates/tasks/actions/view-screen.ts +207 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldCreateBar.tsx +121 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldListRow.tsx +116 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +225 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsListSkeleton.tsx +18 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsPage.tsx +42 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldEditorSidebar.tsx +69 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldTitleSection.tsx +32 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/CurrencyConfigControl.tsx +49 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/FieldConfigControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/NumberConfigControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/PercentConfigControl.tsx +30 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/SelectConfigControl.tsx +135 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/select-colors.ts +23 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/utils.ts +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/types.ts +7 -0
- package/corpus/templates/tasks/app/components/dnd/SortableItem.tsx +72 -0
- package/corpus/templates/tasks/app/components/dnd/SortableList.tsx +136 -0
- package/corpus/templates/tasks/app/components/dnd/reorder-moving-items.ts +160 -0
- package/corpus/templates/tasks/app/components/dnd/sortable-drag-props.ts +60 -0
- package/corpus/templates/tasks/app/components/inbox/InboxList.tsx +222 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListPage.tsx +39 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListRow.tsx +122 -0
- package/corpus/templates/tasks/app/components/layout/Header.tsx +55 -0
- package/corpus/templates/tasks/app/components/layout/HeaderActions.tsx +84 -0
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +134 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +211 -0
- package/corpus/templates/tasks/app/components/shared/AddListItemInput.tsx +57 -0
- package/corpus/templates/tasks/app/components/shared/AlertDialog.tsx +53 -0
- package/corpus/templates/tasks/app/components/shared/BulkDeleteDialog.tsx +76 -0
- package/corpus/templates/tasks/app/components/shared/ChipSelect.tsx +240 -0
- package/corpus/templates/tasks/app/components/shared/DeleteItemDialog.tsx +40 -0
- package/corpus/templates/tasks/app/components/shared/InlineEditable.tsx +166 -0
- package/corpus/templates/tasks/app/components/shared/ListEmptyState.tsx +13 -0
- package/corpus/templates/tasks/app/components/shared/ListErrorMessage.tsx +15 -0
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +75 -0
- package/corpus/templates/tasks/app/components/shared/PageHeader.tsx +25 -0
- package/corpus/templates/tasks/app/components/shared/RowActionsMenu.tsx +42 -0
- package/corpus/templates/tasks/app/components/shared/SidePanel.tsx +99 -0
- package/corpus/templates/tasks/app/components/shared/dnd/ListRowPreview.tsx +37 -0
- package/corpus/templates/tasks/app/components/shared/list/List.tsx +63 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRow.tsx +159 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRowDragHandle.tsx +52 -0
- package/corpus/templates/tasks/app/components/shared/list/ListSkeletonRows.tsx +11 -0
- package/corpus/templates/tasks/app/components/shared/list/SortableListItemShell.tsx +32 -0
- package/corpus/templates/tasks/app/components/shared/list/types.ts +1 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionBar.tsx +158 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionHeaderToggle.tsx +28 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionToolbar.tsx +81 -0
- package/corpus/templates/tasks/app/components/shared/selection/get-list-row-selection-ui.ts +41 -0
- package/corpus/templates/tasks/app/components/shared/selection/use-list-selection.ts +196 -0
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +333 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListHeaderRow.tsx +46 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListPage.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.css +49 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +307 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +102 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskTitleSection.tsx +27 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/DateValueControl.tsx +21 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/FieldValueControl.tsx +76 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/MultiSelectValueControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/NumberValueControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/RichTextValueControl.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/SingleSelectValueControl.tsx +61 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/TextValueControl.tsx +20 -0
- package/corpus/templates/tasks/app/components/tasks/use-task-row-completion-animation.ts +181 -0
- package/corpus/templates/tasks/app/components/ui/accordion.tsx +56 -0
- package/corpus/templates/tasks/app/components/ui/alert-dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/alert.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +5 -0
- package/corpus/templates/tasks/app/components/ui/avatar.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/badge.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +115 -0
- package/corpus/templates/tasks/app/components/ui/button.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/calendar.tsx +70 -0
- package/corpus/templates/tasks/app/components/ui/card.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/carousel.tsx +260 -0
- package/corpus/templates/tasks/app/components/ui/chart.tsx +379 -0
- package/corpus/templates/tasks/app/components/ui/checkbox.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/collapsible.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/command.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/context-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/drawer.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/form.tsx +177 -0
- package/corpus/templates/tasks/app/components/ui/hover-card.tsx +27 -0
- package/corpus/templates/tasks/app/components/ui/input-otp.tsx +69 -0
- package/corpus/templates/tasks/app/components/ui/input.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/label.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/menubar.tsx +254 -0
- package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +128 -0
- package/corpus/templates/tasks/app/components/ui/pagination.tsx +121 -0
- package/corpus/templates/tasks/app/components/ui/popover.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/progress.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/radio-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/resizable.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/scroll-area.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/select.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/separator.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sidebar.tsx +782 -0
- package/corpus/templates/tasks/app/components/ui/skeleton.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/slider.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sonner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/spinner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/switch.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/table.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/tabs.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toast.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toaster.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/tooltip.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/use-toast.ts +3 -0
- package/corpus/templates/tasks/app/entry.client.tsx +19 -0
- package/corpus/templates/tasks/app/entry.server.tsx +10 -0
- package/corpus/templates/tasks/app/global.css +93 -0
- package/corpus/templates/tasks/app/hooks/cache.ts +31 -0
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +93 -0
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +196 -0
- package/corpus/templates/tasks/app/hooks/use-mobile.tsx +21 -0
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +40 -0
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +276 -0
- package/corpus/templates/tasks/app/hooks/use-toast.ts +188 -0
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +140 -0
- package/corpus/templates/tasks/app/lib/app-config.ts +11 -0
- package/corpus/templates/tasks/app/lib/tab-id.ts +1 -0
- package/corpus/templates/tasks/app/lib/utils.ts +1 -0
- package/corpus/templates/tasks/app/root.tsx +130 -0
- package/corpus/templates/tasks/app/routes/_index.tsx +22 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions._index.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions.tsx +5 -0
- package/corpus/templates/tasks/app/routes/fields.tsx +16 -0
- package/corpus/templates/tasks/app/routes/inbox.tsx +16 -0
- package/corpus/templates/tasks/app/routes/tasks.tsx +17 -0
- package/corpus/templates/tasks/app/routes/team.tsx +17 -0
- package/corpus/templates/tasks/app/routes.ts +4 -0
- package/corpus/templates/tasks/app/vite-env.d.ts +6 -0
- package/corpus/templates/tasks/components.json +20 -0
- package/corpus/templates/tasks/data/sync-config.json +1 -0
- package/corpus/templates/tasks/docs/features/README.md +81 -0
- package/corpus/templates/tasks/docs/features/f1-tasks.mdx +67 -0
- package/corpus/templates/tasks/docs/features/f2-custom-fields.mdx +68 -0
- package/corpus/templates/tasks/docs/features/f3-projects.mdx +33 -0
- package/corpus/templates/tasks/docs/features/f4-inbox.mdx +55 -0
- package/corpus/templates/tasks/docs/features/f5-views.mdx +65 -0
- package/corpus/templates/tasks/docs/features/f6-search.mdx +43 -0
- package/corpus/templates/tasks/docs/features/f7-first-run.mdx +66 -0
- package/corpus/templates/tasks/docs/features/f8-chat.mdx +120 -0
- package/corpus/templates/tasks/e2e/global-setup.ts +42 -0
- package/corpus/templates/tasks/e2e/helpers/inbox.ts +71 -0
- package/corpus/templates/tasks/e2e/helpers/tasks.ts +99 -0
- package/corpus/templates/tasks/learnings.defaults.md +5 -0
- package/corpus/templates/tasks/netlify.toml +10 -0
- package/corpus/templates/tasks/package.json +104 -0
- package/corpus/templates/tasks/playwright.config.ts +34 -0
- package/corpus/templates/tasks/public/agent-native-icon-dark.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-icon-light.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-logo-dark.svg +21 -0
- package/corpus/templates/tasks/public/agent-native-logo-light.svg +21 -0
- package/corpus/templates/tasks/public/favicon.svg +1 -0
- package/corpus/templates/tasks/public/icon-180.svg +1 -0
- package/corpus/templates/tasks/public/icon-192.svg +1 -0
- package/corpus/templates/tasks/public/icon-512.svg +1 -0
- package/corpus/templates/tasks/public/manifest.json +21 -0
- package/corpus/templates/tasks/react-router.config.ts +7 -0
- package/corpus/templates/tasks/server/custom-fields/normalize.ts +163 -0
- package/corpus/templates/tasks/server/custom-fields/parse.ts +146 -0
- package/corpus/templates/tasks/server/custom-fields/schema.ts +147 -0
- package/corpus/templates/tasks/server/custom-fields/store.ts +425 -0
- package/corpus/templates/tasks/server/custom-fields/task-fields.ts +104 -0
- package/corpus/templates/tasks/server/custom-fields/types.ts +98 -0
- package/corpus/templates/tasks/server/custom-fields/validate.ts +210 -0
- package/corpus/templates/tasks/server/custom-fields/values/store.ts +386 -0
- package/corpus/templates/tasks/server/db/bulk-write.ts +30 -0
- package/corpus/templates/tasks/server/db/index.ts +5 -0
- package/corpus/templates/tasks/server/db/record-utils.ts +7 -0
- package/corpus/templates/tasks/server/db/schema.ts +67 -0
- package/corpus/templates/tasks/server/db/test-tasks-table.ts +76 -0
- package/corpus/templates/tasks/server/db/transaction.ts +6 -0
- package/corpus/templates/tasks/server/errors.ts +31 -0
- package/corpus/templates/tasks/server/inbox/store.ts +216 -0
- package/corpus/templates/tasks/server/middleware/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +46 -0
- package/corpus/templates/tasks/server/plugins/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/db.ts +90 -0
- package/corpus/templates/tasks/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/tasks/server/stored-items/store.ts +548 -0
- package/corpus/templates/tasks/server/tasks/store.ts +306 -0
- package/corpus/templates/tasks/server/user-config/store.ts +138 -0
- package/corpus/templates/tasks/shared/app-state-tabs.ts +15 -0
- package/corpus/templates/tasks/shared/boolean-param.ts +22 -0
- package/corpus/templates/tasks/shared/bulk-limits.ts +7 -0
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +90 -0
- package/corpus/templates/tasks/shared/navigation.ts +104 -0
- package/corpus/templates/tasks/shared/visible-task-fields.ts +2 -0
- package/corpus/templates/tasks/ssr-entry.ts +15 -0
- package/corpus/templates/tasks/tsconfig.json +24 -0
- package/corpus/templates/tasks/vite.config.ts +19 -0
- package/corpus/templates/tasks/vitest.config.ts +8 -0
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +13 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +1 -1
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +2 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconBold,
|
|
3
|
+
IconH1,
|
|
4
|
+
IconItalic,
|
|
5
|
+
IconLink,
|
|
6
|
+
IconList,
|
|
7
|
+
IconListNumbers,
|
|
8
|
+
} from "@tabler/icons-react";
|
|
9
|
+
import { useRef } from "react";
|
|
10
|
+
|
|
11
|
+
import { Button } from "@/components/ui/button";
|
|
12
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
13
|
+
|
|
14
|
+
export function RichTextValueControl({
|
|
15
|
+
value,
|
|
16
|
+
disabled,
|
|
17
|
+
onChange,
|
|
18
|
+
}: {
|
|
19
|
+
value: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
onChange: (value: string) => void;
|
|
22
|
+
}) {
|
|
23
|
+
const textareaRef = useRef<HTMLTextAreaElement | null>(null);
|
|
24
|
+
|
|
25
|
+
function applyWrap(before: string, after = before, placeholder = "text") {
|
|
26
|
+
const textarea = textareaRef.current;
|
|
27
|
+
if (!textarea) return;
|
|
28
|
+
const start = textarea.selectionStart;
|
|
29
|
+
const end = textarea.selectionEnd;
|
|
30
|
+
const selected = value.slice(start, end) || placeholder;
|
|
31
|
+
const next = `${value.slice(0, start)}${before}${selected}${after}${value.slice(end)}`;
|
|
32
|
+
onChange(next);
|
|
33
|
+
requestAnimationFrame(() => {
|
|
34
|
+
textarea.focus();
|
|
35
|
+
textarea.setSelectionRange(
|
|
36
|
+
start + before.length,
|
|
37
|
+
start + before.length + selected.length,
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function applyLinePrefix(prefix: string) {
|
|
43
|
+
const textarea = textareaRef.current;
|
|
44
|
+
if (!textarea) return;
|
|
45
|
+
const start = textarea.selectionStart;
|
|
46
|
+
const lineStart = value.lastIndexOf("\n", Math.max(0, start - 1)) + 1;
|
|
47
|
+
const next = `${value.slice(0, lineStart)}${prefix}${value.slice(lineStart)}`;
|
|
48
|
+
onChange(next);
|
|
49
|
+
requestAnimationFrame(() => {
|
|
50
|
+
textarea.focus();
|
|
51
|
+
textarea.setSelectionRange(start + prefix.length, start + prefix.length);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const tools = [
|
|
56
|
+
{
|
|
57
|
+
label: "Bold",
|
|
58
|
+
icon: IconBold,
|
|
59
|
+
action: () => applyWrap("**", "**", "bold"),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: "Italic",
|
|
63
|
+
icon: IconItalic,
|
|
64
|
+
action: () => applyWrap("_", "_", "italic"),
|
|
65
|
+
},
|
|
66
|
+
{ label: "Heading", icon: IconH1, action: () => applyLinePrefix("## ") },
|
|
67
|
+
{
|
|
68
|
+
label: "Bulleted list",
|
|
69
|
+
icon: IconList,
|
|
70
|
+
action: () => applyLinePrefix("- "),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Numbered list",
|
|
74
|
+
icon: IconListNumbers,
|
|
75
|
+
action: () => applyLinePrefix("1. "),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: "Link",
|
|
79
|
+
icon: IconLink,
|
|
80
|
+
action: () => applyWrap("[", "](https://example.com)", "link"),
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className="grid gap-2">
|
|
86
|
+
<div className="flex flex-wrap gap-1">
|
|
87
|
+
{tools.map((tool) => {
|
|
88
|
+
const Icon = tool.icon;
|
|
89
|
+
return (
|
|
90
|
+
<Button
|
|
91
|
+
key={tool.label}
|
|
92
|
+
type="button"
|
|
93
|
+
variant="ghost"
|
|
94
|
+
size="icon"
|
|
95
|
+
disabled={disabled}
|
|
96
|
+
onClick={tool.action}
|
|
97
|
+
aria-label={tool.label}
|
|
98
|
+
title={tool.label}
|
|
99
|
+
className="size-8"
|
|
100
|
+
>
|
|
101
|
+
<Icon className="size-4" />
|
|
102
|
+
</Button>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</div>
|
|
106
|
+
<Textarea
|
|
107
|
+
ref={textareaRef}
|
|
108
|
+
value={value}
|
|
109
|
+
disabled={disabled}
|
|
110
|
+
rows={5}
|
|
111
|
+
onChange={(event) => onChange(event.currentTarget.value)}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
package/corpus/templates/tasks/app/components/tasks/fields/controls/SingleSelectValueControl.tsx
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { selectColorClass } from "@/components/custom-fields/editor/config/select-colors";
|
|
2
|
+
import { optionsFromConfig } from "@/components/custom-fields/editor/config/utils";
|
|
3
|
+
import {
|
|
4
|
+
Select,
|
|
5
|
+
SelectContent,
|
|
6
|
+
SelectGroup,
|
|
7
|
+
SelectItem,
|
|
8
|
+
SelectTrigger,
|
|
9
|
+
SelectValue,
|
|
10
|
+
} from "@/components/ui/select";
|
|
11
|
+
import type { FieldValue, TaskFieldValue } from "@/hooks/use-custom-fields";
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
13
|
+
|
|
14
|
+
const EMPTY_SELECT_VALUE = "__empty__";
|
|
15
|
+
|
|
16
|
+
export function SingleSelectValueControl({
|
|
17
|
+
field,
|
|
18
|
+
value,
|
|
19
|
+
disabled,
|
|
20
|
+
onChange,
|
|
21
|
+
}: {
|
|
22
|
+
field: TaskFieldValue & { type: "single_select" };
|
|
23
|
+
value: FieldValue | null;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
onChange: (value: FieldValue | null) => void;
|
|
26
|
+
}) {
|
|
27
|
+
const options = optionsFromConfig(field.config);
|
|
28
|
+
const selected = typeof value === "string" ? value : EMPTY_SELECT_VALUE;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Select
|
|
32
|
+
value={selected}
|
|
33
|
+
disabled={disabled}
|
|
34
|
+
onValueChange={(next) =>
|
|
35
|
+
onChange(next === EMPTY_SELECT_VALUE ? null : next)
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<SelectTrigger>
|
|
39
|
+
<SelectValue />
|
|
40
|
+
</SelectTrigger>
|
|
41
|
+
<SelectContent>
|
|
42
|
+
<SelectGroup>
|
|
43
|
+
<SelectItem value={EMPTY_SELECT_VALUE}>None</SelectItem>
|
|
44
|
+
{options.map((option) => (
|
|
45
|
+
<SelectItem key={option.id} value={option.id}>
|
|
46
|
+
<span className="flex items-center gap-2">
|
|
47
|
+
<span
|
|
48
|
+
className={cn(
|
|
49
|
+
"size-2 rounded-full",
|
|
50
|
+
selectColorClass(option.color),
|
|
51
|
+
)}
|
|
52
|
+
/>
|
|
53
|
+
{option.name}
|
|
54
|
+
</span>
|
|
55
|
+
</SelectItem>
|
|
56
|
+
))}
|
|
57
|
+
</SelectGroup>
|
|
58
|
+
</SelectContent>
|
|
59
|
+
</Select>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Input } from "@/components/ui/input";
|
|
2
|
+
import type { FieldValue } from "@/hooks/use-custom-fields";
|
|
3
|
+
|
|
4
|
+
export function TextValueControl({
|
|
5
|
+
value,
|
|
6
|
+
disabled,
|
|
7
|
+
onChange,
|
|
8
|
+
}: {
|
|
9
|
+
value: FieldValue | null;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onChange: (value: FieldValue | null) => void;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<Input
|
|
15
|
+
value={typeof value === "string" ? value : ""}
|
|
16
|
+
disabled={disabled}
|
|
17
|
+
onChange={(event) => onChange(event.currentTarget.value || null)}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { useEffect, useRef, useState, type AnimationEvent } from "react";
|
|
2
|
+
|
|
3
|
+
export const COMPLETE_EXIT_MS = 260;
|
|
4
|
+
export const COMPLETE_SETTLE_MS = 220;
|
|
5
|
+
const ANIMATION_FALLBACK_BUFFER_MS = 40;
|
|
6
|
+
|
|
7
|
+
export const EXIT_ANIMATION_NAME = "task-row-exit";
|
|
8
|
+
export const COMPLETE_ANIMATION_NAME = "task-row-complete";
|
|
9
|
+
export const RESTORE_ANIMATION_NAME = "task-row-restore";
|
|
10
|
+
|
|
11
|
+
export type CompletionPhase = "idle" | "completing" | "uncompleting" | "exited";
|
|
12
|
+
|
|
13
|
+
function prefersReducedMotion() {
|
|
14
|
+
return (
|
|
15
|
+
typeof window !== "undefined" &&
|
|
16
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface UseTaskRowCompletionAnimationOptions {
|
|
21
|
+
taskDone: boolean;
|
|
22
|
+
hideAfterComplete: boolean;
|
|
23
|
+
onBeginExit?: () => void;
|
|
24
|
+
onExitAfterComplete?: () => void;
|
|
25
|
+
onUpdateTask: (patch: { done: boolean }) => Promise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function useTaskRowCompletionAnimation({
|
|
29
|
+
taskDone,
|
|
30
|
+
hideAfterComplete,
|
|
31
|
+
onBeginExit,
|
|
32
|
+
onExitAfterComplete,
|
|
33
|
+
onUpdateTask,
|
|
34
|
+
}: UseTaskRowCompletionAnimationOptions) {
|
|
35
|
+
const [completionPhase, setCompletionPhase] =
|
|
36
|
+
useState<CompletionPhase>("idle");
|
|
37
|
+
const animationFallbackRef = useRef<number | null>(null);
|
|
38
|
+
const latestTaskDoneRef = useRef(taskDone);
|
|
39
|
+
|
|
40
|
+
const displayDone =
|
|
41
|
+
completionPhase === "completing" || completionPhase === "exited"
|
|
42
|
+
? true
|
|
43
|
+
: completionPhase === "uncompleting"
|
|
44
|
+
? false
|
|
45
|
+
: taskDone;
|
|
46
|
+
const isAnimating =
|
|
47
|
+
completionPhase === "completing" || completionPhase === "uncompleting";
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
latestTaskDoneRef.current = taskDone;
|
|
51
|
+
if (completionPhase === "uncompleting" && !taskDone) {
|
|
52
|
+
resetCompletionPhase();
|
|
53
|
+
}
|
|
54
|
+
}, [completionPhase, taskDone]);
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
return () => {
|
|
58
|
+
if (animationFallbackRef.current !== null) {
|
|
59
|
+
window.clearTimeout(animationFallbackRef.current);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
function clearAnimationFallback() {
|
|
65
|
+
if (animationFallbackRef.current !== null) {
|
|
66
|
+
window.clearTimeout(animationFallbackRef.current);
|
|
67
|
+
animationFallbackRef.current = null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function resetCompletionPhase() {
|
|
72
|
+
clearAnimationFallback();
|
|
73
|
+
setCompletionPhase("idle");
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function finishExitAfterComplete() {
|
|
77
|
+
clearAnimationFallback();
|
|
78
|
+
setCompletionPhase((phase) => {
|
|
79
|
+
if (phase === "exited") return phase;
|
|
80
|
+
onExitAfterComplete?.();
|
|
81
|
+
return "exited";
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function finishSettleAnimation() {
|
|
86
|
+
clearAnimationFallback();
|
|
87
|
+
setCompletionPhase((phase) => {
|
|
88
|
+
if (phase === "uncompleting" && latestTaskDoneRef.current) {
|
|
89
|
+
return phase;
|
|
90
|
+
}
|
|
91
|
+
return "idle";
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function scheduleAnimationFallback(callback: () => void, durationMs: number) {
|
|
96
|
+
clearAnimationFallback();
|
|
97
|
+
if (prefersReducedMotion()) {
|
|
98
|
+
callback();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
animationFallbackRef.current = window.setTimeout(() => {
|
|
102
|
+
animationFallbackRef.current = null;
|
|
103
|
+
callback();
|
|
104
|
+
}, durationMs + ANIMATION_FALLBACK_BUFFER_MS);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function handleRowAnimationEnd(event: AnimationEvent<HTMLDivElement>) {
|
|
108
|
+
if (event.currentTarget !== event.target) return;
|
|
109
|
+
|
|
110
|
+
if (
|
|
111
|
+
event.animationName === EXIT_ANIMATION_NAME &&
|
|
112
|
+
completionPhase === "completing" &&
|
|
113
|
+
hideAfterComplete
|
|
114
|
+
) {
|
|
115
|
+
finishExitAfterComplete();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (
|
|
120
|
+
event.animationName === COMPLETE_ANIMATION_NAME &&
|
|
121
|
+
completionPhase === "completing"
|
|
122
|
+
) {
|
|
123
|
+
finishSettleAnimation();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (
|
|
128
|
+
event.animationName === RESTORE_ANIMATION_NAME &&
|
|
129
|
+
completionPhase === "uncompleting"
|
|
130
|
+
) {
|
|
131
|
+
finishSettleAnimation();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function commitDoneChange(nextDone: boolean) {
|
|
136
|
+
void onUpdateTask({ done: nextDone })
|
|
137
|
+
.then(() => {
|
|
138
|
+
if (nextDone && hideAfterComplete) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
scheduleAnimationFallback(finishSettleAnimation, COMPLETE_SETTLE_MS);
|
|
142
|
+
})
|
|
143
|
+
.catch(resetCompletionPhase);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function handleDoneToggle(checked: boolean | "indeterminate") {
|
|
147
|
+
if (
|
|
148
|
+
checked === "indeterminate" ||
|
|
149
|
+
isAnimating ||
|
|
150
|
+
completionPhase === "exited"
|
|
151
|
+
) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const nextDone = checked === true;
|
|
156
|
+
if (nextDone === taskDone) return;
|
|
157
|
+
|
|
158
|
+
if (nextDone) {
|
|
159
|
+
if (hideAfterComplete) {
|
|
160
|
+
onBeginExit?.();
|
|
161
|
+
}
|
|
162
|
+
setCompletionPhase("completing");
|
|
163
|
+
if (hideAfterComplete) {
|
|
164
|
+
scheduleAnimationFallback(finishExitAfterComplete, COMPLETE_EXIT_MS);
|
|
165
|
+
}
|
|
166
|
+
commitDoneChange(true);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
setCompletionPhase("uncompleting");
|
|
171
|
+
commitDoneChange(false);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
completionPhase,
|
|
176
|
+
displayDone,
|
|
177
|
+
isAnimating,
|
|
178
|
+
handleDoneToggle,
|
|
179
|
+
handleRowAnimationEnd,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const Accordion = AccordionPrimitive.Root;
|
|
8
|
+
|
|
9
|
+
const AccordionItem = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
13
|
+
<AccordionPrimitive.Item
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn("border-b", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
));
|
|
19
|
+
AccordionItem.displayName = "AccordionItem";
|
|
20
|
+
|
|
21
|
+
const AccordionTrigger = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
24
|
+
>(({ className, children, ...props }, ref) => (
|
|
25
|
+
<AccordionPrimitive.Header className="flex">
|
|
26
|
+
<AccordionPrimitive.Trigger
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn(
|
|
29
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<IconChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
36
|
+
</AccordionPrimitive.Trigger>
|
|
37
|
+
</AccordionPrimitive.Header>
|
|
38
|
+
));
|
|
39
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
40
|
+
|
|
41
|
+
const AccordionContent = React.forwardRef<
|
|
42
|
+
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
44
|
+
>(({ className, children, ...props }, ref) => (
|
|
45
|
+
<AccordionPrimitive.Content
|
|
46
|
+
ref={ref}
|
|
47
|
+
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
51
|
+
</AccordionPrimitive.Content>
|
|
52
|
+
));
|
|
53
|
+
|
|
54
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
55
|
+
|
|
56
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/alert-dialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/alert";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/avatar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/badge";
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { IconChevronRight, IconDots } from "@tabler/icons-react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const Breadcrumb = React.forwardRef<
|
|
8
|
+
HTMLElement,
|
|
9
|
+
React.ComponentPropsWithoutRef<"nav"> & {
|
|
10
|
+
separator?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
13
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
14
|
+
|
|
15
|
+
const BreadcrumbList = React.forwardRef<
|
|
16
|
+
HTMLOListElement,
|
|
17
|
+
React.ComponentPropsWithoutRef<"ol">
|
|
18
|
+
>(({ className, ...props }, ref) => (
|
|
19
|
+
<ol
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
29
|
+
|
|
30
|
+
const BreadcrumbItem = React.forwardRef<
|
|
31
|
+
HTMLLIElement,
|
|
32
|
+
React.ComponentPropsWithoutRef<"li">
|
|
33
|
+
>(({ className, ...props }, ref) => (
|
|
34
|
+
<li
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
));
|
|
40
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
41
|
+
|
|
42
|
+
const BreadcrumbLink = React.forwardRef<
|
|
43
|
+
HTMLAnchorElement,
|
|
44
|
+
React.ComponentPropsWithoutRef<"a"> & {
|
|
45
|
+
asChild?: boolean;
|
|
46
|
+
}
|
|
47
|
+
>(({ asChild, className, ...props }, ref) => {
|
|
48
|
+
const Comp = asChild ? Slot : "a";
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn("transition-colors hover:text-foreground", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
59
|
+
|
|
60
|
+
const BreadcrumbPage = React.forwardRef<
|
|
61
|
+
HTMLSpanElement,
|
|
62
|
+
React.ComponentPropsWithoutRef<"span">
|
|
63
|
+
>(({ className, ...props }, ref) => (
|
|
64
|
+
<span
|
|
65
|
+
ref={ref}
|
|
66
|
+
role="link"
|
|
67
|
+
aria-disabled="true"
|
|
68
|
+
aria-current="page"
|
|
69
|
+
className={cn("font-normal text-foreground", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
74
|
+
|
|
75
|
+
const BreadcrumbSeparator = ({
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}: React.ComponentProps<"li">) => (
|
|
80
|
+
<li
|
|
81
|
+
role="presentation"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
className={cn("[&>svg]:size-3.5", className)}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
{children ?? <IconChevronRight />}
|
|
87
|
+
</li>
|
|
88
|
+
);
|
|
89
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
90
|
+
|
|
91
|
+
const BreadcrumbEllipsis = ({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"span">) => (
|
|
95
|
+
<span
|
|
96
|
+
role="presentation"
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
<IconDots className="h-4 w-4" />
|
|
102
|
+
<span className="sr-only">More</span>
|
|
103
|
+
</span>
|
|
104
|
+
);
|
|
105
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
Breadcrumb,
|
|
109
|
+
BreadcrumbList,
|
|
110
|
+
BreadcrumbItem,
|
|
111
|
+
BreadcrumbLink,
|
|
112
|
+
BreadcrumbPage,
|
|
113
|
+
BreadcrumbSeparator,
|
|
114
|
+
BreadcrumbEllipsis,
|
|
115
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/button";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { DayPicker } from "react-day-picker";
|
|
4
|
+
|
|
5
|
+
import { buttonVariants } from "@/components/ui/button";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
9
|
+
|
|
10
|
+
function Calendar({
|
|
11
|
+
className,
|
|
12
|
+
classNames,
|
|
13
|
+
showOutsideDays = true,
|
|
14
|
+
...props
|
|
15
|
+
}: CalendarProps) {
|
|
16
|
+
return (
|
|
17
|
+
<DayPicker
|
|
18
|
+
showOutsideDays={showOutsideDays}
|
|
19
|
+
className={cn("p-3", className)}
|
|
20
|
+
classNames={{
|
|
21
|
+
months: "flex flex-col sm:flex-row gap-4",
|
|
22
|
+
month: "flex flex-col gap-4",
|
|
23
|
+
month_caption: "flex justify-center pt-1 relative items-center h-7",
|
|
24
|
+
caption_label: "text-sm font-medium",
|
|
25
|
+
nav: "flex items-center gap-1",
|
|
26
|
+
button_previous: cn(
|
|
27
|
+
buttonVariants({ variant: "outline" }),
|
|
28
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute start-1 top-1 z-10",
|
|
29
|
+
),
|
|
30
|
+
button_next: cn(
|
|
31
|
+
buttonVariants({ variant: "outline" }),
|
|
32
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute end-1 top-1 z-10",
|
|
33
|
+
),
|
|
34
|
+
month_grid: "w-full border-collapse",
|
|
35
|
+
weekdays: "flex",
|
|
36
|
+
weekday:
|
|
37
|
+
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem] text-center",
|
|
38
|
+
week: "flex w-full mt-2",
|
|
39
|
+
day: "h-9 w-9 text-center text-sm p-0 relative",
|
|
40
|
+
day_button: cn(
|
|
41
|
+
buttonVariants({ variant: "ghost" }),
|
|
42
|
+
"h-9 w-9 p-0 font-normal aria-selected:opacity-100",
|
|
43
|
+
),
|
|
44
|
+
selected:
|
|
45
|
+
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground rounded-md",
|
|
46
|
+
today: "bg-accent text-accent-foreground rounded-md",
|
|
47
|
+
outside: "text-muted-foreground opacity-50",
|
|
48
|
+
disabled: "text-muted-foreground opacity-50",
|
|
49
|
+
hidden: "invisible",
|
|
50
|
+
range_start: "rounded-s-md",
|
|
51
|
+
range_end: "rounded-e-md",
|
|
52
|
+
range_middle:
|
|
53
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
54
|
+
...classNames,
|
|
55
|
+
}}
|
|
56
|
+
components={{
|
|
57
|
+
Chevron: (props) => {
|
|
58
|
+
if (props.orientation === "left") {
|
|
59
|
+
return <IconChevronLeft className="h-4 w-4 rtl:-scale-x-100" />;
|
|
60
|
+
}
|
|
61
|
+
return <IconChevronRight className="h-4 w-4 rtl:-scale-x-100" />;
|
|
62
|
+
},
|
|
63
|
+
}}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
Calendar.displayName = "Calendar";
|
|
69
|
+
|
|
70
|
+
export { Calendar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@agent-native/toolkit/ui/card";
|