ref0-git 0.0.0 → 0.2.0
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/app/apps/github/.dev.vars.example +6 -0
- package/app/apps/github/README.md +70 -0
- package/app/apps/github/THIRD_PARTY_NOTICES.md +214 -0
- package/app/apps/github/components.json +25 -0
- package/app/apps/github/generated/git-rest.ts +10444 -0
- package/app/apps/github/generated/routeTree.gen.ts +1242 -0
- package/app/apps/github/migrations/postgres/0001_auth.sql +46 -0
- package/app/apps/github/migrations/sql/0001_auth.sql +19 -0
- package/app/apps/github/migrations/sql/0002_passkeys.sql +9 -0
- package/app/apps/github/migrations/sql/0003_orgs.sql +22 -0
- package/app/apps/github/migrations/sql/0004_avatars.sql +6 -0
- package/app/apps/github/package.json +80 -0
- package/app/apps/github/src/branches/branch-list.tsx +385 -0
- package/app/apps/github/src/branches/branches.ts +55 -0
- package/app/apps/github/src/clients/allowed.ts +213 -0
- package/app/apps/github/src/clients/at-most.ts +17 -0
- package/app/apps/github/src/clients/avatars.ts +410 -0
- package/app/apps/github/src/clients/cached.ts +65 -0
- package/app/apps/github/src/clients/calls.ts +160 -0
- package/app/apps/github/src/clients/clients.ts +82 -0
- package/app/apps/github/src/clients/graphql.ts +50 -0
- package/app/apps/github/src/clients/host-answer.ts +28 -0
- package/app/apps/github/src/clients/host-calls.ts +382 -0
- package/app/apps/github/src/clients/icon-bytes.ts +203 -0
- package/app/apps/github/src/clients/proxy.ts +59 -0
- package/app/apps/github/src/clients/session-ended.ts +18 -0
- package/app/apps/github/src/clients/transfers.ts +212 -0
- package/app/apps/github/src/code/breadcrumbs.tsx +50 -0
- package/app/apps/github/src/code/code-page.tsx +147 -0
- package/app/apps/github/src/code/code-tree.tsx +338 -0
- package/app/apps/github/src/code/controls.tsx +230 -0
- package/app/apps/github/src/code/file-view.tsx +450 -0
- package/app/apps/github/src/code/files.ts +332 -0
- package/app/apps/github/src/code/folder-list.tsx +122 -0
- package/app/apps/github/src/code/go-to-file.tsx +131 -0
- package/app/apps/github/src/code/highlighted.tsx +58 -0
- package/app/apps/github/src/code/lines.ts +46 -0
- package/app/apps/github/src/code/load.ts +147 -0
- package/app/apps/github/src/code/markdown-files.ts +58 -0
- package/app/apps/github/src/code/places.ts +88 -0
- package/app/apps/github/src/code/ref-pages.ts +179 -0
- package/app/apps/github/src/code/ref-switcher.tsx +203 -0
- package/app/apps/github/src/code/refs.ts +142 -0
- package/app/apps/github/src/code/repo-home.tsx +240 -0
- package/app/apps/github/src/code/repo.ts +105 -0
- package/app/apps/github/src/code/saved-reads.ts +199 -0
- package/app/apps/github/src/code/saved.ts +110 -0
- package/app/apps/github/src/code/tree-fold.ts +186 -0
- package/app/apps/github/src/code/trees.ts +136 -0
- package/app/apps/github/src/components/avatar-picture.ts +53 -0
- package/app/apps/github/src/components/avatar-url.ts +16 -0
- package/app/apps/github/src/components/confirm-action.tsx +100 -0
- package/app/apps/github/src/components/count.tsx +24 -0
- package/app/apps/github/src/components/create-button.tsx +38 -0
- package/app/apps/github/src/components/file-icons/file-icons.css +225 -0
- package/app/apps/github/src/components/file-icons/file-icons.tsx +138 -0
- package/app/apps/github/src/components/filter.tsx +35 -0
- package/app/apps/github/src/components/hotkeys/hotkeys.tsx +255 -0
- package/app/apps/github/src/components/item-list.tsx +65 -0
- package/app/apps/github/src/components/language-dot.tsx +29 -0
- package/app/apps/github/src/components/list-toolbar.tsx +82 -0
- package/app/apps/github/src/components/markdown/editor.tsx +57 -0
- package/app/apps/github/src/components/markdown/markdown.css +177 -0
- package/app/apps/github/src/components/markdown/markdown.tsx +82 -0
- package/app/apps/github/src/components/owner-card.tsx +196 -0
- package/app/apps/github/src/components/pull-status.tsx +34 -0
- package/app/apps/github/src/components/recent.ts +41 -0
- package/app/apps/github/src/components/relative-time.tsx +78 -0
- package/app/apps/github/src/components/repos/icon-hashes.ts +91 -0
- package/app/apps/github/src/components/repos/new-repo-form.tsx +196 -0
- package/app/apps/github/src/components/repos/repo-icon.tsx +47 -0
- package/app/apps/github/src/components/repos/repo-list.tsx +528 -0
- package/app/apps/github/src/components/repos/your-repos.tsx +124 -0
- package/app/apps/github/src/components/review-state.tsx +75 -0
- package/app/apps/github/src/components/route-dialog.tsx +137 -0
- package/app/apps/github/src/components/save-button.tsx +58 -0
- package/app/apps/github/src/components/shell/app-shell.tsx +164 -0
- package/app/apps/github/src/components/shell/create-org-dialog.tsx +118 -0
- package/app/apps/github/src/components/shell/create-row.tsx +49 -0
- package/app/apps/github/src/components/shell/link-menu.tsx +94 -0
- package/app/apps/github/src/components/shell/nav-user.tsx +97 -0
- package/app/apps/github/src/components/shell/owner-repos.tsx +247 -0
- package/app/apps/github/src/components/shell/owner-switcher.tsx +104 -0
- package/app/apps/github/src/components/shell/repo-switcher.tsx +179 -0
- package/app/apps/github/src/components/shell/sections.ts +31 -0
- package/app/apps/github/src/components/shell/submenu-chevron.ts +147 -0
- package/app/apps/github/src/components/signin/device-card.tsx +139 -0
- package/app/apps/github/src/components/signin/login-form.tsx +88 -0
- package/app/apps/github/src/components/signin/signin-page.tsx +33 -0
- package/app/apps/github/src/components/signin/signup-form.tsx +106 -0
- package/app/apps/github/src/components/states/live-status.tsx +42 -0
- package/app/apps/github/src/components/states/states.tsx +126 -0
- package/app/apps/github/src/components/tab-indicator.tsx +143 -0
- package/app/apps/github/src/components/theme-choice.tsx +108 -0
- package/app/apps/github/src/components/theme-provider.tsx +126 -0
- package/app/apps/github/src/components/tones.ts +23 -0
- package/app/apps/github/src/components/ui/alert-dialog.tsx +187 -0
- package/app/apps/github/src/components/ui/alert.tsx +78 -0
- package/app/apps/github/src/components/ui/avatar.tsx +106 -0
- package/app/apps/github/src/components/ui/badge.tsx +51 -0
- package/app/apps/github/src/components/ui/breadcrumb.tsx +124 -0
- package/app/apps/github/src/components/ui/button-group.tsx +87 -0
- package/app/apps/github/src/components/ui/button.tsx +61 -0
- package/app/apps/github/src/components/ui/calendar.tsx +221 -0
- package/app/apps/github/src/components/ui/card.tsx +102 -0
- package/app/apps/github/src/components/ui/checkbox.tsx +26 -0
- package/app/apps/github/src/components/ui/collapsible.tsx +19 -0
- package/app/apps/github/src/components/ui/combobox.tsx +304 -0
- package/app/apps/github/src/components/ui/command.tsx +208 -0
- package/app/apps/github/src/components/ui/dialog.tsx +156 -0
- package/app/apps/github/src/components/ui/dropdown-menu.tsx +290 -0
- package/app/apps/github/src/components/ui/empty.tsx +100 -0
- package/app/apps/github/src/components/ui/field.tsx +236 -0
- package/app/apps/github/src/components/ui/hover-card.tsx +48 -0
- package/app/apps/github/src/components/ui/input-group.tsx +163 -0
- package/app/apps/github/src/components/ui/input.tsx +19 -0
- package/app/apps/github/src/components/ui/item.tsx +201 -0
- package/app/apps/github/src/components/ui/kbd.tsx +27 -0
- package/app/apps/github/src/components/ui/label.tsx +33 -0
- package/app/apps/github/src/components/ui/popover.tsx +87 -0
- package/app/apps/github/src/components/ui/radio-group.tsx +35 -0
- package/app/apps/github/src/components/ui/select.tsx +198 -0
- package/app/apps/github/src/components/ui/separator.tsx +22 -0
- package/app/apps/github/src/components/ui/sheet.tsx +138 -0
- package/app/apps/github/src/components/ui/sidebar.tsx +724 -0
- package/app/apps/github/src/components/ui/skeleton.tsx +13 -0
- package/app/apps/github/src/components/ui/sonner.tsx +47 -0
- package/app/apps/github/src/components/ui/styles.css +242 -0
- package/app/apps/github/src/components/ui/table.tsx +113 -0
- package/app/apps/github/src/components/ui/tabs.tsx +79 -0
- package/app/apps/github/src/components/ui/textarea.tsx +17 -0
- package/app/apps/github/src/components/ui/title.ts +6 -0
- package/app/apps/github/src/components/ui/toggle-group.tsx +89 -0
- package/app/apps/github/src/components/ui/toggle.tsx +42 -0
- package/app/apps/github/src/components/ui/tooltip.tsx +63 -0
- package/app/apps/github/src/components/user-avatar.tsx +145 -0
- package/app/apps/github/src/components/view-tabs.tsx +42 -0
- package/app/apps/github/src/context/context.ts +133 -0
- package/app/apps/github/src/diffs/blobs.ts +94 -0
- package/app/apps/github/src/diffs/diff-view.tsx +155 -0
- package/app/apps/github/src/diffs/files.ts +121 -0
- package/app/apps/github/src/diffs/hunks.tsx +454 -0
- package/app/apps/github/src/diffs/patch.ts +131 -0
- package/app/apps/github/src/diffs/rows.ts +137 -0
- package/app/apps/github/src/history/commit-diff.ts +54 -0
- package/app/apps/github/src/history/commit-list.tsx +207 -0
- package/app/apps/github/src/history/commit-page.tsx +147 -0
- package/app/apps/github/src/history/history.ts +129 -0
- package/app/apps/github/src/hooks/allowed.ts +31 -0
- package/app/apps/github/src/hooks/answers.ts +65 -0
- package/app/apps/github/src/hooks/avatars.ts +54 -0
- package/app/apps/github/src/hooks/draft.ts +38 -0
- package/app/apps/github/src/hooks/open-counts.ts +127 -0
- package/app/apps/github/src/hooks/profiles.ts +120 -0
- package/app/apps/github/src/hooks/repos.ts +440 -0
- package/app/apps/github/src/hooks/use-mobile.ts +19 -0
- package/app/apps/github/src/hooks/viewer.ts +39 -0
- package/app/apps/github/src/inbox/count.ts +70 -0
- package/app/apps/github/src/inbox/inbox-item.tsx +66 -0
- package/app/apps/github/src/inbox/inbox-page.tsx +572 -0
- package/app/apps/github/src/inbox/marks.ts +130 -0
- package/app/apps/github/src/inbox/release-tags.ts +65 -0
- package/app/apps/github/src/inbox/search.ts +97 -0
- package/app/apps/github/src/inbox/subjects.ts +184 -0
- package/app/apps/github/src/inbox/subscription-controls.tsx +184 -0
- package/app/apps/github/src/inbox/subscriptions.ts +189 -0
- package/app/apps/github/src/inbox/threads.ts +198 -0
- package/app/apps/github/src/issues/changes.ts +332 -0
- package/app/apps/github/src/issues/counts.ts +62 -0
- package/app/apps/github/src/issues/issue-list.tsx +682 -0
- package/app/apps/github/src/issues/issue-page.tsx +533 -0
- package/app/apps/github/src/issues/issues.ts +566 -0
- package/app/apps/github/src/issues/label-dialog.tsx +310 -0
- package/app/apps/github/src/issues/labels-page.tsx +119 -0
- package/app/apps/github/src/issues/new-issue.tsx +79 -0
- package/app/apps/github/src/issues/parts.tsx +71 -0
- package/app/apps/github/src/issues/picker.tsx +298 -0
- package/app/apps/github/src/issues/search.ts +238 -0
- package/app/apps/github/src/issues/sidebar.tsx +236 -0
- package/app/apps/github/src/lib/cn.ts +8 -0
- package/app/apps/github/src/lib/highlighting.ts +13 -0
- package/app/apps/github/src/live/follow.ts +129 -0
- package/app/apps/github/src/live/sse.ts +74 -0
- package/app/apps/github/src/live/use-follow.ts +37 -0
- package/app/apps/github/src/markdown/README.md +53 -0
- package/app/apps/github/src/markdown/allowed-html.ts +69 -0
- package/app/apps/github/src/markdown/context.ts +206 -0
- package/app/apps/github/src/markdown/images.ts +81 -0
- package/app/apps/github/src/markdown/lookup.ts +122 -0
- package/app/apps/github/src/markdown/patches.ts +299 -0
- package/app/apps/github/src/markdown/query.ts +25 -0
- package/app/apps/github/src/markdown/references.ts +158 -0
- package/app/apps/github/src/markdown/render.ts +103 -0
- package/app/apps/github/src/names/owners.ts +51 -0
- package/app/apps/github/src/names/repos.ts +24 -0
- package/app/apps/github/src/palette/palette.tsx +547 -0
- package/app/apps/github/src/palette/recent.ts +116 -0
- package/app/apps/github/src/palette/rows.tsx +455 -0
- package/app/apps/github/src/palette/server.ts +104 -0
- package/app/apps/github/src/palette/targets.ts +306 -0
- package/app/apps/github/src/policy.ts +600 -0
- package/app/apps/github/src/private-repos.ts +47 -0
- package/app/apps/github/src/pulls/compare-page.tsx +342 -0
- package/app/apps/github/src/pulls/files-tab.tsx +776 -0
- package/app/apps/github/src/pulls/live.ts +124 -0
- package/app/apps/github/src/pulls/merge-box.tsx +367 -0
- package/app/apps/github/src/pulls/merge-button.ts +86 -0
- package/app/apps/github/src/pulls/pull-list.tsx +235 -0
- package/app/apps/github/src/pulls/pull-page.tsx +474 -0
- package/app/apps/github/src/pulls/pull.ts +468 -0
- package/app/apps/github/src/pulls/pulls.ts +318 -0
- package/app/apps/github/src/pulls/review.ts +350 -0
- package/app/apps/github/src/pulls/search.ts +130 -0
- package/app/apps/github/src/queue/queue-page.tsx +405 -0
- package/app/apps/github/src/queue/queue.ts +231 -0
- package/app/apps/github/src/releases/latest-release.tsx +55 -0
- package/app/apps/github/src/releases/overview.tsx +30 -0
- package/app/apps/github/src/releases/release-form.tsx +353 -0
- package/app/apps/github/src/releases/release-list.tsx +173 -0
- package/app/apps/github/src/releases/release-view.tsx +183 -0
- package/app/apps/github/src/releases/releases.ts +308 -0
- package/app/apps/github/src/releases/tag-list.tsx +134 -0
- package/app/apps/github/src/router.tsx +46 -0
- package/app/apps/github/src/routes/$owner/$repo/_code/blob/$.tsx +33 -0
- package/app/apps/github/src/routes/$owner/$repo/_code/tree/$.tsx +28 -0
- package/app/apps/github/src/routes/$owner/$repo/_code.tsx +11 -0
- package/app/apps/github/src/routes/$owner/$repo/_releases/releases/index.tsx +19 -0
- package/app/apps/github/src/routes/$owner/$repo/_releases/tags.tsx +19 -0
- package/app/apps/github/src/routes/$owner/$repo/_releases.tsx +23 -0
- package/app/apps/github/src/routes/$owner/$repo/branches.tsx +39 -0
- package/app/apps/github/src/routes/$owner/$repo/commit/$sha.tsx +34 -0
- package/app/apps/github/src/routes/$owner/$repo/commits/$.tsx +42 -0
- package/app/apps/github/src/routes/$owner/$repo/compare/$.tsx +19 -0
- package/app/apps/github/src/routes/$owner/$repo/index.tsx +24 -0
- package/app/apps/github/src/routes/$owner/$repo/issues/$number.tsx +50 -0
- package/app/apps/github/src/routes/$owner/$repo/issues/index.tsx +53 -0
- package/app/apps/github/src/routes/$owner/$repo/issues/new.tsx +43 -0
- package/app/apps/github/src/routes/$owner/$repo/labels.tsx +22 -0
- package/app/apps/github/src/routes/$owner/$repo/pull/$number/checks.tsx +15 -0
- package/app/apps/github/src/routes/$owner/$repo/pull/$number/commits.tsx +15 -0
- package/app/apps/github/src/routes/$owner/$repo/pull/$number/files.tsx +15 -0
- package/app/apps/github/src/routes/$owner/$repo/pull/$number/index.tsx +19 -0
- package/app/apps/github/src/routes/$owner/$repo/pull/$number/route.tsx +52 -0
- package/app/apps/github/src/routes/$owner/$repo/pulls/index.tsx +48 -0
- package/app/apps/github/src/routes/$owner/$repo/queue.tsx +22 -0
- package/app/apps/github/src/routes/$owner/$repo/releases/edit/$.tsx +58 -0
- package/app/apps/github/src/routes/$owner/$repo/releases/new.tsx +40 -0
- package/app/apps/github/src/routes/$owner/$repo/releases/tag/$.tsx +35 -0
- package/app/apps/github/src/routes/$owner/$repo/route.tsx +102 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/access.tsx +9 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/hooks/index.tsx +16 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/hooks/new.tsx +25 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/index.tsx +17 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/route.tsx +28 -0
- package/app/apps/github/src/routes/$owner/$repo/settings/rules.tsx +12 -0
- package/app/apps/github/src/routes/$owner/$repo/tokens.tsx +16 -0
- package/app/apps/github/src/routes/$owner/index.tsx +45 -0
- package/app/apps/github/src/routes/-nav.tsx +293 -0
- package/app/apps/github/src/routes/-root-testing.ts +107 -0
- package/app/apps/github/src/routes/__root.tsx +225 -0
- package/app/apps/github/src/routes/api.auth.$.ts +18 -0
- package/app/apps/github/src/routes/downloads/$owner/$repo/$asset.tsx +10 -0
- package/app/apps/github/src/routes/file-icons[.]svg.ts +21 -0
- package/app/apps/github/src/routes/icons/$owner/$repo.tsx +14 -0
- package/app/apps/github/src/routes/icons/$owner/index.tsx +14 -0
- package/app/apps/github/src/routes/icons/index.tsx +12 -0
- package/app/apps/github/src/routes/index.tsx +48 -0
- package/app/apps/github/src/routes/login.tsx +24 -0
- package/app/apps/github/src/routes/login_.code.tsx +31 -0
- package/app/apps/github/src/routes/new.tsx +91 -0
- package/app/apps/github/src/routes/notifications.tsx +20 -0
- package/app/apps/github/src/routes/orgs/$owner/issues.tsx +8 -0
- package/app/apps/github/src/routes/orgs/$owner/pulls.tsx +8 -0
- package/app/apps/github/src/routes/orgs/$owner/releases.tsx +8 -0
- package/app/apps/github/src/routes/orgs/$owner/route.tsx +25 -0
- package/app/apps/github/src/routes/orgs/$owner/settings.tsx +30 -0
- package/app/apps/github/src/routes/orgs/$owner/tokens.tsx +15 -0
- package/app/apps/github/src/routes/settings.tsx +54 -0
- package/app/apps/github/src/routes/signup.tsx +24 -0
- package/app/apps/github/src/routes/uploads/$owner/$repo/$release.tsx +10 -0
- package/app/apps/github/src/seed/acme.ts +498 -0
- package/app/apps/github/src/seed/licenses.ts +114 -0
- package/app/apps/github/src/seed/seed.ts +538 -0
- package/app/apps/github/src/server.ts +97 -0
- package/app/apps/github/src/settings/account-avatar.tsx +43 -0
- package/app/apps/github/src/settings/avatar-section.tsx +140 -0
- package/app/apps/github/src/settings/avatar.ts +58 -0
- package/app/apps/github/src/settings/general-settings.tsx +439 -0
- package/app/apps/github/src/settings/general.ts +73 -0
- package/app/apps/github/src/settings/hook-form.tsx +195 -0
- package/app/apps/github/src/settings/hook-list.tsx +166 -0
- package/app/apps/github/src/settings/hooks.ts +87 -0
- package/app/apps/github/src/settings/org-settings.tsx +228 -0
- package/app/apps/github/src/settings/orgs.ts +116 -0
- package/app/apps/github/src/settings/rule-list.tsx +72 -0
- package/app/apps/github/src/settings/rules.ts +27 -0
- package/app/apps/github/src/settings/settings-layout.tsx +114 -0
- package/app/apps/github/src/signin/approval.ts +186 -0
- package/app/apps/github/src/signin/auth-client.ts +127 -0
- package/app/apps/github/src/signin/auth.ts +753 -0
- package/app/apps/github/src/signin/avatars.ts +126 -0
- package/app/apps/github/src/signin/client-ip.ts +39 -0
- package/app/apps/github/src/signin/credentials.ts +26 -0
- package/app/apps/github/src/signin/device-code.ts +95 -0
- package/app/apps/github/src/signin/device-prompt.ts +125 -0
- package/app/apps/github/src/signin/errors.ts +135 -0
- package/app/apps/github/src/signin/host-session.ts +68 -0
- package/app/apps/github/src/signin/orgs.ts +283 -0
- package/app/apps/github/src/signin/owner-names.ts +183 -0
- package/app/apps/github/src/signin/person-lock.ts +104 -0
- package/app/apps/github/src/signin/seal.ts +88 -0
- package/app/apps/github/src/signin/seed-people.ts +92 -0
- package/app/apps/github/src/signin/session.ts +48 -0
- package/app/apps/github/src/signin/unborn.ts +110 -0
- package/app/apps/github/src/signin/viewer-orgs.ts +47 -0
- package/app/apps/github/src/signin/viewer.ts +74 -0
- package/app/apps/github/src/signin/with-headers.ts +14 -0
- package/app/apps/github/src/tokens/tokens-page.tsx +529 -0
- package/app/apps/github/src/tokens/tokens.ts +54 -0
- package/app/apps/github/tsconfig.json +25 -0
- package/app/apps/github/tsconfig.worker.json +24 -0
- package/app/apps/github/vite.config.ts +21 -0
- package/app/pnpm-workspace.yaml +216 -0
- package/app/tsconfig.base.json +127 -0
- package/dist/LICENSE +202 -0
- package/dist/cli/child.mjs +42 -0
- package/dist/cli/commands.mjs +23 -0
- package/dist/cli/credentials.mjs +84 -0
- package/dist/cli/documents.mjs +214 -0
- package/dist/cli/events.mjs +55 -0
- package/dist/cli/failure.mjs +105 -0
- package/dist/cli/folders.mjs +32 -0
- package/dist/cli/git-remote-ref0.d.mts +1 -0
- package/dist/cli/git-remote-ref0.mjs +29 -0
- package/dist/cli/git.mjs +48 -0
- package/dist/cli/helpers.mjs +51 -0
- package/dist/cli/hosts.mjs +127 -0
- package/dist/cli/node.mjs +15 -0
- package/dist/cli/output.mjs +135 -0
- package/dist/cli/prompt.mjs +35 -0
- package/dist/cli/queue.mjs +215 -0
- package/dist/cli/ref0-git.d.mts +1 -0
- package/dist/cli/ref0-git.mjs +144 -0
- package/dist/cli/repos.mjs +162 -0
- package/dist/cli/resources.mjs +131 -0
- package/dist/cli/run-end.mjs +57 -0
- package/dist/cli/runtime.mjs +50 -0
- package/dist/cli/setup.mjs +1410 -0
- package/dist/cli/sign-in.mjs +162 -0
- package/dist/cli/sign-ins.mjs +79 -0
- package/dist/cli/sqlite.mjs +28 -0
- package/dist/cli/tokens.mjs +141 -0
- package/dist/cli/vendor.mjs +123 -0
- package/dist/init/app.mjs +231 -0
- package/dist/init/astro.mjs +49 -0
- package/dist/init/choices.mjs +497 -0
- package/dist/init/cloudflare.mjs +324 -0
- package/dist/init/create.mjs +151 -0
- package/dist/init/detect.mjs +297 -0
- package/dist/init/files.mjs +75 -0
- package/dist/init/frameworks.mjs +248 -0
- package/dist/init/git-module.mjs +49 -0
- package/dist/init/github-routes.mjs +66 -0
- package/dist/init/jsonc.mjs +143 -0
- package/dist/init/metadata.mjs +48 -0
- package/dist/init/mounts.mjs +109 -0
- package/dist/init/next.mjs +205 -0
- package/dist/init/node-app.mjs +189 -0
- package/dist/init/node.mjs +458 -0
- package/dist/init/nuxt.mjs +115 -0
- package/dist/init/output.mjs +21 -0
- package/dist/init/plan.mjs +82 -0
- package/dist/init/range-major.mjs +257 -0
- package/dist/init/react-router.mjs +59 -0
- package/dist/init/routes.mjs +148 -0
- package/dist/init/shell.mjs +4 -0
- package/dist/init/stores.mjs +51 -0
- package/dist/init/sveltekit.mjs +139 -0
- package/dist/init/template.mjs +142 -0
- package/dist/init/templates.mjs +343 -0
- package/dist/init/vercel.mjs +383 -0
- package/dist/init/versions.mjs +32 -0
- package/dist/init/workspace.mjs +20 -0
- package/package.json +48 -6
- package/README.md +0 -5
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Command as CommandPrimitive } from "cmdk"
|
|
5
|
+
import { cn } from "#/lib/cn"
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
Dialog,
|
|
9
|
+
DialogContent,
|
|
10
|
+
DialogDescription,
|
|
11
|
+
DialogHeader,
|
|
12
|
+
DialogTitle,
|
|
13
|
+
} from "#/components/ui/dialog"
|
|
14
|
+
import {
|
|
15
|
+
InputGroup,
|
|
16
|
+
InputGroupAddon,
|
|
17
|
+
} from "#/components/ui/input-group"
|
|
18
|
+
import { CheckIcon, SearchIcon } from "lucide-react"
|
|
19
|
+
|
|
20
|
+
// Nova's command over Lyra's, by the user's call, 23 Nov (J29): a rounded dialog, padded groups and
|
|
21
|
+
// rounded rows, with the input flush at the top, its bottom border its only edge. Rows take py-2.5,
|
|
22
|
+
// 10px above and below, by the user's call (J30). Groups pad as the sidebar's SidebarGroup does,
|
|
23
|
+
// p-2, with gap-0.5 between rows, and the list's scroll-py-2 keeps a row the keyboard scrolls to
|
|
24
|
+
// clear of that padding (J31). A group after another starts 1px higher, pt-1.75, so two groups
|
|
25
|
+
// sit 15px apart, not p-2's 16 (J38). A row's words and icon are muted until it's selected, and
|
|
26
|
+
// its shortcut stays muted then too (J39).
|
|
27
|
+
function Command({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
31
|
+
return (
|
|
32
|
+
<CommandPrimitive
|
|
33
|
+
data-slot="command"
|
|
34
|
+
className={cn(
|
|
35
|
+
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover text-popover-foreground",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function CommandDialog({
|
|
44
|
+
title = "Command Palette",
|
|
45
|
+
description = "Search for a command to run...",
|
|
46
|
+
children,
|
|
47
|
+
className,
|
|
48
|
+
showCloseButton = false,
|
|
49
|
+
...props
|
|
50
|
+
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
51
|
+
title?: string
|
|
52
|
+
description?: string
|
|
53
|
+
className?: string
|
|
54
|
+
showCloseButton?: boolean
|
|
55
|
+
children: React.ReactNode
|
|
56
|
+
}) {
|
|
57
|
+
return (
|
|
58
|
+
<Dialog {...props}>
|
|
59
|
+
<DialogHeader className="sr-only">
|
|
60
|
+
<DialogTitle>{title}</DialogTitle>
|
|
61
|
+
<DialogDescription>{description}</DialogDescription>
|
|
62
|
+
</DialogHeader>
|
|
63
|
+
<DialogContent
|
|
64
|
+
className={cn(
|
|
65
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
showCloseButton={showCloseButton}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</DialogContent>
|
|
72
|
+
</Dialog>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function CommandInput({
|
|
77
|
+
className,
|
|
78
|
+
before,
|
|
79
|
+
...props
|
|
80
|
+
}: React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
81
|
+
/** What sits before the text, such as a mode's chip. */
|
|
82
|
+
before?: React.ReactNode
|
|
83
|
+
}) {
|
|
84
|
+
return (
|
|
85
|
+
<div data-slot="command-input-wrapper" className="border-b">
|
|
86
|
+
<InputGroup className="h-10 rounded-none border-none bg-transparent shadow-none! dark:bg-transparent *:data-[slot=input-group-addon]:pl-3!">
|
|
87
|
+
<CommandPrimitive.Input
|
|
88
|
+
data-slot="command-input"
|
|
89
|
+
className={cn(
|
|
90
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
91
|
+
className
|
|
92
|
+
)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
<InputGroupAddon>
|
|
96
|
+
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
97
|
+
</InputGroupAddon>
|
|
98
|
+
{before !== undefined && <InputGroupAddon className="pl-1!">{before}</InputGroupAddon>}
|
|
99
|
+
</InputGroup>
|
|
100
|
+
</div>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function CommandList({
|
|
105
|
+
className,
|
|
106
|
+
...props
|
|
107
|
+
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
108
|
+
return (
|
|
109
|
+
<CommandPrimitive.List
|
|
110
|
+
data-slot="command-list"
|
|
111
|
+
className={cn(
|
|
112
|
+
"no-scrollbar max-h-72 scroll-py-2 overflow-x-hidden overflow-y-auto outline-none",
|
|
113
|
+
className
|
|
114
|
+
)}
|
|
115
|
+
{...props}
|
|
116
|
+
/>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function CommandEmpty({
|
|
121
|
+
className,
|
|
122
|
+
...props
|
|
123
|
+
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
124
|
+
return (
|
|
125
|
+
<CommandPrimitive.Empty
|
|
126
|
+
data-slot="command-empty"
|
|
127
|
+
className={cn("py-6 text-center text-sm", className)}
|
|
128
|
+
{...props}
|
|
129
|
+
/>
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function CommandGroup({
|
|
134
|
+
className,
|
|
135
|
+
...props
|
|
136
|
+
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
137
|
+
return (
|
|
138
|
+
<CommandPrimitive.Group
|
|
139
|
+
data-slot="command-group"
|
|
140
|
+
className={cn(
|
|
141
|
+
"overflow-hidden p-2 text-foreground [[cmdk-group]+&]:pt-1.75 **:[[cmdk-group-items]]:flex **:[[cmdk-group-items]]:flex-col **:[[cmdk-group-items]]:gap-0.5 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-meta **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
142
|
+
className
|
|
143
|
+
)}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function CommandSeparator({
|
|
150
|
+
className,
|
|
151
|
+
...props
|
|
152
|
+
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
153
|
+
return (
|
|
154
|
+
<CommandPrimitive.Separator
|
|
155
|
+
data-slot="command-separator"
|
|
156
|
+
className={cn("-mx-1 h-px bg-border", className)}
|
|
157
|
+
{...props}
|
|
158
|
+
/>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function CommandItem({
|
|
163
|
+
className,
|
|
164
|
+
children,
|
|
165
|
+
...props
|
|
166
|
+
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
167
|
+
return (
|
|
168
|
+
<CommandPrimitive.Item
|
|
169
|
+
data-slot="command-item"
|
|
170
|
+
className={cn(
|
|
171
|
+
"group/command-item pressable pressable-row relative flex cursor-default items-center gap-2 rounded-sm px-2 py-2.5 text-sm text-muted-foreground outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
172
|
+
className
|
|
173
|
+
)}
|
|
174
|
+
{...props}
|
|
175
|
+
>
|
|
176
|
+
{children}
|
|
177
|
+
<CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
|
|
178
|
+
</CommandPrimitive.Item>
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function CommandShortcut({
|
|
183
|
+
className,
|
|
184
|
+
...props
|
|
185
|
+
}: React.ComponentProps<"span">) {
|
|
186
|
+
return (
|
|
187
|
+
<span
|
|
188
|
+
data-slot="command-shortcut"
|
|
189
|
+
className={cn(
|
|
190
|
+
"ml-auto text-meta tracking-widest text-muted-foreground",
|
|
191
|
+
className
|
|
192
|
+
)}
|
|
193
|
+
{...props}
|
|
194
|
+
/>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export {
|
|
199
|
+
Command,
|
|
200
|
+
CommandDialog,
|
|
201
|
+
CommandInput,
|
|
202
|
+
CommandList,
|
|
203
|
+
CommandEmpty,
|
|
204
|
+
CommandGroup,
|
|
205
|
+
CommandItem,
|
|
206
|
+
CommandShortcut,
|
|
207
|
+
CommandSeparator,
|
|
208
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
|
|
3
|
+
import { cn } from "#/lib/cn"
|
|
4
|
+
|
|
5
|
+
import { Button } from "#/components/ui/button"
|
|
6
|
+
import { titleClass } from "./title.ts"
|
|
7
|
+
import { XIcon } from "lucide-react"
|
|
8
|
+
|
|
9
|
+
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
10
|
+
return <DialogPrimitive.Root data-slot="dialog" {...props} />
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
|
|
14
|
+
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
|
|
18
|
+
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
|
|
22
|
+
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function DialogOverlay({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: DialogPrimitive.Backdrop.Props) {
|
|
29
|
+
return (
|
|
30
|
+
<DialogPrimitive.Backdrop
|
|
31
|
+
data-slot="dialog-overlay"
|
|
32
|
+
className={cn(
|
|
33
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function DialogContent({
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
showCloseButton = true,
|
|
45
|
+
...props
|
|
46
|
+
}: DialogPrimitive.Popup.Props & {
|
|
47
|
+
showCloseButton?: boolean
|
|
48
|
+
}) {
|
|
49
|
+
return (
|
|
50
|
+
<DialogPortal>
|
|
51
|
+
<DialogOverlay />
|
|
52
|
+
<DialogPrimitive.Popup
|
|
53
|
+
data-slot="dialog-content"
|
|
54
|
+
className={cn(
|
|
55
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg bg-popover p-4 text-sm/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
56
|
+
className
|
|
57
|
+
)}
|
|
58
|
+
{...props}
|
|
59
|
+
>
|
|
60
|
+
{children}
|
|
61
|
+
{showCloseButton && (
|
|
62
|
+
<DialogPrimitive.Close
|
|
63
|
+
data-slot="dialog-close"
|
|
64
|
+
render={
|
|
65
|
+
<Button
|
|
66
|
+
variant="ghost"
|
|
67
|
+
className="absolute top-2 right-2"
|
|
68
|
+
size="icon-sm"
|
|
69
|
+
/>
|
|
70
|
+
}
|
|
71
|
+
>
|
|
72
|
+
<XIcon
|
|
73
|
+
/>
|
|
74
|
+
<span className="sr-only">Close</span>
|
|
75
|
+
</DialogPrimitive.Close>
|
|
76
|
+
)}
|
|
77
|
+
</DialogPrimitive.Popup>
|
|
78
|
+
</DialogPortal>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
data-slot="dialog-header"
|
|
86
|
+
className={cn("flex flex-col gap-1 text-left", className)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function DialogFooter({
|
|
93
|
+
className,
|
|
94
|
+
showCloseButton = false,
|
|
95
|
+
children,
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<"div"> & {
|
|
98
|
+
showCloseButton?: boolean
|
|
99
|
+
}) {
|
|
100
|
+
return (
|
|
101
|
+
<div
|
|
102
|
+
data-slot="dialog-footer"
|
|
103
|
+
className={cn(
|
|
104
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
105
|
+
className
|
|
106
|
+
)}
|
|
107
|
+
{...props}
|
|
108
|
+
>
|
|
109
|
+
{children}
|
|
110
|
+
{showCloseButton && (
|
|
111
|
+
<DialogPrimitive.Close render={<Button variant="outline" />}>
|
|
112
|
+
Close
|
|
113
|
+
</DialogPrimitive.Close>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
|
|
120
|
+
return (
|
|
121
|
+
<DialogPrimitive.Title
|
|
122
|
+
data-slot="dialog-title"
|
|
123
|
+
className={cn(titleClass, className)}
|
|
124
|
+
{...props}
|
|
125
|
+
/>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function DialogDescription({
|
|
130
|
+
className,
|
|
131
|
+
...props
|
|
132
|
+
}: DialogPrimitive.Description.Props) {
|
|
133
|
+
return (
|
|
134
|
+
<DialogPrimitive.Description
|
|
135
|
+
data-slot="dialog-description"
|
|
136
|
+
className={cn(
|
|
137
|
+
"text-sm/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
138
|
+
className
|
|
139
|
+
)}
|
|
140
|
+
{...props}
|
|
141
|
+
/>
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
Dialog,
|
|
147
|
+
DialogClose,
|
|
148
|
+
DialogContent,
|
|
149
|
+
DialogDescription,
|
|
150
|
+
DialogFooter,
|
|
151
|
+
DialogHeader,
|
|
152
|
+
DialogOverlay,
|
|
153
|
+
DialogPortal,
|
|
154
|
+
DialogTitle,
|
|
155
|
+
DialogTrigger,
|
|
156
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu"
|
|
3
|
+
import { cn } from "#/lib/cn"
|
|
4
|
+
import { ChevronRightIcon, CheckIcon } from "lucide-react"
|
|
5
|
+
import { Input } from "#/components/ui/input"
|
|
6
|
+
|
|
7
|
+
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
8
|
+
return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
|
|
12
|
+
return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
|
|
16
|
+
return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function DropdownMenuContent({
|
|
20
|
+
align = "start",
|
|
21
|
+
alignOffset = 0,
|
|
22
|
+
anchor,
|
|
23
|
+
side = "bottom",
|
|
24
|
+
sideOffset = 4,
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: MenuPrimitive.Popup.Props &
|
|
28
|
+
Pick<
|
|
29
|
+
MenuPrimitive.Positioner.Props,
|
|
30
|
+
"align" | "alignOffset" | "anchor" | "side" | "sideOffset"
|
|
31
|
+
>) {
|
|
32
|
+
return (
|
|
33
|
+
<MenuPrimitive.Portal>
|
|
34
|
+
<MenuPrimitive.Positioner
|
|
35
|
+
className="isolate z-50 outline-none"
|
|
36
|
+
align={align}
|
|
37
|
+
alignOffset={alignOffset}
|
|
38
|
+
anchor={anchor}
|
|
39
|
+
side={side}
|
|
40
|
+
sideOffset={sideOffset}
|
|
41
|
+
>
|
|
42
|
+
<MenuPrimitive.Popup
|
|
43
|
+
data-slot="dropdown-menu-content"
|
|
44
|
+
className={cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-[180px] origin-(--transform-origin) p-1.5 overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none!", className )}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
</MenuPrimitive.Positioner>
|
|
48
|
+
</MenuPrimitive.Portal>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Makes the menu or submenu directly inside it searchable: its input filters its list. */
|
|
53
|
+
function DropdownMenuFilter({ ...props }: MenuPrimitive.FilterProvider.Props) {
|
|
54
|
+
return <MenuPrimitive.FilterProvider {...props} />
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function DropdownMenuInput({ className, ...props }: MenuPrimitive.Input.Props) {
|
|
58
|
+
return (
|
|
59
|
+
<MenuPrimitive.Input
|
|
60
|
+
data-slot="dropdown-menu-input"
|
|
61
|
+
render={<Input className={cn("mb-1.5", className)} />}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function DropdownMenuList({ ...props }: MenuPrimitive.List.Props) {
|
|
68
|
+
return <MenuPrimitive.List data-slot="dropdown-menu-list" {...props} />
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
|
|
72
|
+
return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function DropdownMenuLabel({
|
|
76
|
+
className,
|
|
77
|
+
inset,
|
|
78
|
+
...props
|
|
79
|
+
}: MenuPrimitive.GroupLabel.Props & {
|
|
80
|
+
inset?: boolean
|
|
81
|
+
}) {
|
|
82
|
+
return (
|
|
83
|
+
<MenuPrimitive.GroupLabel
|
|
84
|
+
data-slot="dropdown-menu-label"
|
|
85
|
+
data-inset={inset}
|
|
86
|
+
className={cn(
|
|
87
|
+
"px-2 py-2 text-meta text-muted-foreground data-inset:pl-7",
|
|
88
|
+
className
|
|
89
|
+
)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function DropdownMenuItem({
|
|
96
|
+
className,
|
|
97
|
+
inset,
|
|
98
|
+
variant = "default",
|
|
99
|
+
...props
|
|
100
|
+
}: MenuPrimitive.Item.Props & {
|
|
101
|
+
inset?: boolean
|
|
102
|
+
variant?: "default" | "destructive"
|
|
103
|
+
}) {
|
|
104
|
+
return (
|
|
105
|
+
<MenuPrimitive.Item
|
|
106
|
+
data-slot="dropdown-menu-item"
|
|
107
|
+
data-inset={inset}
|
|
108
|
+
data-variant={variant}
|
|
109
|
+
className={cn(
|
|
110
|
+
"pressable pressable-row group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden select-none focus:bg-accent data-highlighted:bg-accent focus:text-accent-foreground data-highlighted:text-accent-foreground not-data-[variant=destructive]:focus:**:not-[svg,svg_*]:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:not-[svg,svg_*]:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
/>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
|
|
119
|
+
return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function DropdownMenuSubTrigger({
|
|
123
|
+
className,
|
|
124
|
+
inset,
|
|
125
|
+
children,
|
|
126
|
+
...props
|
|
127
|
+
}: MenuPrimitive.SubmenuTrigger.Props & {
|
|
128
|
+
inset?: boolean
|
|
129
|
+
}) {
|
|
130
|
+
return (
|
|
131
|
+
<MenuPrimitive.SubmenuTrigger
|
|
132
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
133
|
+
data-inset={inset}
|
|
134
|
+
className={cn(
|
|
135
|
+
"pressable pressable-row flex cursor-default items-center gap-2 rounded-sm px-2 py-2 text-sm outline-hidden select-none focus:bg-accent data-highlighted:bg-accent focus:text-accent-foreground data-highlighted:text-accent-foreground not-data-[variant=destructive]:focus:**:not-[svg,svg_*]:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:not-[svg,svg_*]:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
136
|
+
className
|
|
137
|
+
)}
|
|
138
|
+
{...props}
|
|
139
|
+
>
|
|
140
|
+
{children}
|
|
141
|
+
<ChevronRightIcon className="ml-auto" />
|
|
142
|
+
</MenuPrimitive.SubmenuTrigger>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function DropdownMenuSubContent({
|
|
147
|
+
align = "start",
|
|
148
|
+
alignOffset = -3,
|
|
149
|
+
side = "right",
|
|
150
|
+
sideOffset = 0,
|
|
151
|
+
className,
|
|
152
|
+
...props
|
|
153
|
+
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
154
|
+
return (
|
|
155
|
+
<DropdownMenuContent
|
|
156
|
+
data-slot="dropdown-menu-sub-content"
|
|
157
|
+
className={cn("w-auto rounded-md bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
|
|
158
|
+
align={align}
|
|
159
|
+
alignOffset={alignOffset}
|
|
160
|
+
side={side}
|
|
161
|
+
sideOffset={sideOffset}
|
|
162
|
+
{...props}
|
|
163
|
+
/>
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function DropdownMenuCheckboxItem({
|
|
168
|
+
className,
|
|
169
|
+
children,
|
|
170
|
+
checked,
|
|
171
|
+
inset,
|
|
172
|
+
...props
|
|
173
|
+
}: MenuPrimitive.CheckboxItem.Props & {
|
|
174
|
+
inset?: boolean
|
|
175
|
+
}) {
|
|
176
|
+
return (
|
|
177
|
+
<MenuPrimitive.CheckboxItem
|
|
178
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
179
|
+
data-inset={inset}
|
|
180
|
+
className={cn(
|
|
181
|
+
"pressable pressable-row relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent data-highlighted:bg-accent focus:text-accent-foreground data-highlighted:text-accent-foreground focus:**:not-[svg,svg_*]:text-accent-foreground data-highlighted:**:not-[svg,svg_*]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
182
|
+
className
|
|
183
|
+
)}
|
|
184
|
+
checked={checked}
|
|
185
|
+
{...props}
|
|
186
|
+
>
|
|
187
|
+
<span
|
|
188
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
189
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
190
|
+
>
|
|
191
|
+
<MenuPrimitive.CheckboxItemIndicator>
|
|
192
|
+
<CheckIcon
|
|
193
|
+
/>
|
|
194
|
+
</MenuPrimitive.CheckboxItemIndicator>
|
|
195
|
+
</span>
|
|
196
|
+
{children}
|
|
197
|
+
</MenuPrimitive.CheckboxItem>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
|
|
202
|
+
return (
|
|
203
|
+
<MenuPrimitive.RadioGroup
|
|
204
|
+
data-slot="dropdown-menu-radio-group"
|
|
205
|
+
{...props}
|
|
206
|
+
/>
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function DropdownMenuRadioItem({
|
|
211
|
+
className,
|
|
212
|
+
children,
|
|
213
|
+
inset,
|
|
214
|
+
...props
|
|
215
|
+
}: MenuPrimitive.RadioItem.Props & {
|
|
216
|
+
inset?: boolean
|
|
217
|
+
}) {
|
|
218
|
+
return (
|
|
219
|
+
<MenuPrimitive.RadioItem
|
|
220
|
+
data-slot="dropdown-menu-radio-item"
|
|
221
|
+
data-inset={inset}
|
|
222
|
+
className={cn(
|
|
223
|
+
"pressable pressable-row relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent data-highlighted:bg-accent focus:text-accent-foreground data-highlighted:text-accent-foreground focus:**:not-[svg,svg_*]:text-accent-foreground data-highlighted:**:not-[svg,svg_*]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
224
|
+
className
|
|
225
|
+
)}
|
|
226
|
+
{...props}
|
|
227
|
+
>
|
|
228
|
+
<span
|
|
229
|
+
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
230
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
231
|
+
>
|
|
232
|
+
<MenuPrimitive.RadioItemIndicator>
|
|
233
|
+
<CheckIcon
|
|
234
|
+
/>
|
|
235
|
+
</MenuPrimitive.RadioItemIndicator>
|
|
236
|
+
</span>
|
|
237
|
+
{children}
|
|
238
|
+
</MenuPrimitive.RadioItem>
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function DropdownMenuSeparator({
|
|
243
|
+
className,
|
|
244
|
+
...props
|
|
245
|
+
}: MenuPrimitive.Separator.Props) {
|
|
246
|
+
return (
|
|
247
|
+
<MenuPrimitive.Separator
|
|
248
|
+
data-slot="dropdown-menu-separator"
|
|
249
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
250
|
+
{...props}
|
|
251
|
+
/>
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function DropdownMenuShortcut({
|
|
256
|
+
className,
|
|
257
|
+
...props
|
|
258
|
+
}: React.ComponentProps<"span">) {
|
|
259
|
+
return (
|
|
260
|
+
<span
|
|
261
|
+
data-slot="dropdown-menu-shortcut"
|
|
262
|
+
className={cn(
|
|
263
|
+
"ml-auto text-meta tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
264
|
+
className
|
|
265
|
+
)}
|
|
266
|
+
{...props}
|
|
267
|
+
/>
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export {
|
|
272
|
+
DropdownMenu,
|
|
273
|
+
DropdownMenuPortal,
|
|
274
|
+
DropdownMenuTrigger,
|
|
275
|
+
DropdownMenuContent,
|
|
276
|
+
DropdownMenuFilter,
|
|
277
|
+
DropdownMenuGroup,
|
|
278
|
+
DropdownMenuInput,
|
|
279
|
+
DropdownMenuLabel,
|
|
280
|
+
DropdownMenuList,
|
|
281
|
+
DropdownMenuItem,
|
|
282
|
+
DropdownMenuCheckboxItem,
|
|
283
|
+
DropdownMenuRadioGroup,
|
|
284
|
+
DropdownMenuRadioItem,
|
|
285
|
+
DropdownMenuSeparator,
|
|
286
|
+
DropdownMenuShortcut,
|
|
287
|
+
DropdownMenuSub,
|
|
288
|
+
DropdownMenuSubTrigger,
|
|
289
|
+
DropdownMenuSubContent,
|
|
290
|
+
}
|