create-tauri-ui 0.3.2 → 1.0.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/README.md +188 -97
- package/assets/debug-panel/debug-events.ts.tmpl +97 -0
- package/assets/debug-panel/debug-panel.tsx.tmpl +1354 -0
- package/assets/debug-panel/tauri.ts.tmpl +53 -0
- package/assets/release.yml.tmpl +74 -0
- package/dist/index.mjs +483 -52
- package/index.js +2 -2
- package/package.json +53 -55
- package/templates/.shared/.github/workflows/release.yml +0 -112
- package/templates/.shared/src-tauri/Cargo.lock +0 -3835
- package/templates/.shared/src-tauri/Cargo.toml +0 -39
- package/templates/.shared/src-tauri/build.rs +0 -3
- package/templates/.shared/src-tauri/icons/128x128.png +0 -0
- package/templates/.shared/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/32x32.png +0 -0
- package/templates/.shared/src-tauri/icons/Square107x107Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square142x142Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square150x150Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square284x284Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square30x30Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square310x310Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square44x44Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square71x71Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/Square89x89Logo.png +0 -0
- package/templates/.shared/src-tauri/icons/StoreLogo.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/.shared/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/.shared/src-tauri/icons/icon.icns +0 -0
- package/templates/.shared/src-tauri/icons/icon.ico +0 -0
- package/templates/.shared/src-tauri/icons/icon.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-20x20@1x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-20x20@2x-1.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-20x20@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-20x20@3x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-29x29@1x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-29x29@2x-1.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-29x29@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-29x29@3x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-40x40@1x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-40x40@2x-1.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-40x40@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-40x40@3x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-512@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-60x60@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-60x60@3x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-76x76@1x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-76x76@2x.png +0 -0
- package/templates/.shared/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png +0 -0
- package/templates/.shared/src-tauri/src/main.rs +0 -22
- package/templates/.shared/src-tauri/tauri.conf.json +0 -71
- package/templates/next/.env +0 -1
- package/templates/next/.github/workflows/release.yml +0 -108
- package/templates/next/.vscode/extensions.json +0 -3
- package/templates/next/LICENSE +0 -21
- package/templates/next/README.md +0 -95
- package/templates/next/app-icon.png +0 -0
- package/templates/next/components.json +0 -16
- package/templates/next/next-env.d.ts +0 -5
- package/templates/next/next.config.js +0 -14
- package/templates/next/package.json +0 -87
- package/templates/next/pnpm-lock.yaml +0 -4911
- package/templates/next/postcss.config.js +0 -6
- package/templates/next/prettier.config.js +0 -35
- package/templates/next/public/avatars/01.png +0 -0
- package/templates/next/public/avatars/02.png +0 -0
- package/templates/next/public/avatars/03.png +0 -0
- package/templates/next/public/avatars/04.png +0 -0
- package/templates/next/public/avatars/05.png +0 -0
- package/templates/next/src/app/examples/authentication/components/user-auth-form.tsx +0 -71
- package/templates/next/src/app/examples/authentication/page.tsx +0 -88
- package/templates/next/src/app/examples/cards/components/cookie-settings.tsx +0 -60
- package/templates/next/src/app/examples/cards/components/create-account.tsx +0 -60
- package/templates/next/src/app/examples/cards/components/date-picker.tsx +0 -20
- package/templates/next/src/app/examples/cards/components/github-card.tsx +0 -88
- package/templates/next/src/app/examples/cards/components/notifications.tsx +0 -53
- package/templates/next/src/app/examples/cards/components/payment-method.tsx +0 -129
- package/templates/next/src/app/examples/cards/components/report-an-issue.tsx +0 -85
- package/templates/next/src/app/examples/cards/components/share-document.tsx +0 -120
- package/templates/next/src/app/examples/cards/components/team-members.tsx +0 -149
- package/templates/next/src/app/examples/cards/page.tsx +0 -76
- package/templates/next/src/app/examples/dashboard/components/date-range-picker.tsx +0 -65
- package/templates/next/src/app/examples/dashboard/components/main-nav.tsx +0 -40
- package/templates/next/src/app/examples/dashboard/components/overview.tsx +0 -78
- package/templates/next/src/app/examples/dashboard/components/recent-sales.tsx +0 -71
- package/templates/next/src/app/examples/dashboard/components/search.tsx +0 -13
- package/templates/next/src/app/examples/dashboard/components/team-switcher.tsx +0 -213
- package/templates/next/src/app/examples/dashboard/components/user-nav.tsx +0 -62
- package/templates/next/src/app/examples/dashboard/page.tsx +0 -197
- package/templates/next/src/app/examples/forms/account/account-form.tsx +0 -219
- package/templates/next/src/app/examples/forms/account/page.tsx +0 -18
- package/templates/next/src/app/examples/forms/appearance/appearance-form.tsx +0 -164
- package/templates/next/src/app/examples/forms/appearance/page.tsx +0 -18
- package/templates/next/src/app/examples/forms/components/profile-form.tsx +0 -191
- package/templates/next/src/app/examples/forms/components/sidebar-nav.tsx +0 -44
- package/templates/next/src/app/examples/forms/display/display-form.tsx +0 -132
- package/templates/next/src/app/examples/forms/display/page.tsx +0 -17
- package/templates/next/src/app/examples/forms/layout.tsx +0 -59
- package/templates/next/src/app/examples/forms/notifications/notifications-form.tsx +0 -222
- package/templates/next/src/app/examples/forms/notifications/page.tsx +0 -17
- package/templates/next/src/app/examples/forms/page.tsx +0 -17
- package/templates/next/src/app/examples/layout.tsx +0 -7
- package/templates/next/src/app/examples/music/components/album-artwork.tsx +0 -95
- package/templates/next/src/app/examples/music/components/menu.tsx +0 -200
- package/templates/next/src/app/examples/music/components/podcast-empty-placeholder.tsx +0 -64
- package/templates/next/src/app/examples/music/components/sidebar.tsx +0 -204
- package/templates/next/src/app/examples/music/data/albums.ts +0 -71
- package/templates/next/src/app/examples/music/data/playlists.ts +0 -16
- package/templates/next/src/app/examples/music/page.tsx +0 -141
- package/templates/next/src/app/examples/playground/components/code-viewer.tsx +0 -89
- package/templates/next/src/app/examples/playground/components/maxlength-selector.tsx +0 -55
- package/templates/next/src/app/examples/playground/components/model-selector.tsx +0 -163
- package/templates/next/src/app/examples/playground/components/preset-actions.tsx +0 -122
- package/templates/next/src/app/examples/playground/components/preset-save.tsx +0 -44
- package/templates/next/src/app/examples/playground/components/preset-selector.tsx +0 -82
- package/templates/next/src/app/examples/playground/components/preset-share.tsx +0 -46
- package/templates/next/src/app/examples/playground/components/temperature-selector.tsx +0 -57
- package/templates/next/src/app/examples/playground/components/top-p-selector.tsx +0 -54
- package/templates/next/src/app/examples/playground/data/models.ts +0 -62
- package/templates/next/src/app/examples/playground/data/presets.ts +0 -47
- package/templates/next/src/app/examples/playground/page.tsx +0 -313
- package/templates/next/src/app/examples/tasks/components/columns.tsx +0 -120
- package/templates/next/src/app/examples/tasks/components/data-table-column-header.tsx +0 -71
- package/templates/next/src/app/examples/tasks/components/data-table-faceted-filter.tsx +0 -147
- package/templates/next/src/app/examples/tasks/components/data-table-pagination.tsx +0 -97
- package/templates/next/src/app/examples/tasks/components/data-table-row-actions.tsx +0 -69
- package/templates/next/src/app/examples/tasks/components/data-table-toolbar.tsx +0 -61
- package/templates/next/src/app/examples/tasks/components/data-table-view-options.tsx +0 -59
- package/templates/next/src/app/examples/tasks/components/data-table.tsx +0 -126
- package/templates/next/src/app/examples/tasks/components/user-nav.tsx +0 -62
- package/templates/next/src/app/examples/tasks/data/data.tsx +0 -71
- package/templates/next/src/app/examples/tasks/data/schema.ts +0 -13
- package/templates/next/src/app/examples/tasks/data/seed.ts +0 -20
- package/templates/next/src/app/examples/tasks/data/tasks.json +0 -702
- package/templates/next/src/app/examples/tasks/page.tsx +0 -49
- package/templates/next/src/app/layout.tsx +0 -47
- package/templates/next/src/app/page.tsx +0 -5
- package/templates/next/src/assets/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/templates/next/src/assets/logo.png +0 -0
- package/templates/next/src/components/about-dialog.tsx +0 -111
- package/templates/next/src/components/example/date-picker-with-range.tsx +0 -65
- package/templates/next/src/components/examples-nav.tsx +0 -70
- package/templates/next/src/components/greeting.tsx +0 -21
- package/templates/next/src/components/icons.tsx +0 -156
- package/templates/next/src/components/menu-mode-toggle.tsx +0 -47
- package/templates/next/src/components/menu.tsx +0 -224
- package/templates/next/src/components/mode-toggle.tsx +0 -43
- package/templates/next/src/components/page-header.tsx +0 -52
- package/templates/next/src/components/style-switcher.tsx +0 -19
- package/templates/next/src/components/tailwind-indicator.tsx +0 -18
- package/templates/next/src/components/theme-provider.tsx +0 -9
- package/templates/next/src/components/ui/accordion.tsx +0 -60
- package/templates/next/src/components/ui/alert-dialog.tsx +0 -145
- package/templates/next/src/components/ui/alert.tsx +0 -59
- package/templates/next/src/components/ui/aspect-ratio.tsx +0 -7
- package/templates/next/src/components/ui/avatar.tsx +0 -50
- package/templates/next/src/components/ui/badge.tsx +0 -36
- package/templates/next/src/components/ui/button.tsx +0 -56
- package/templates/next/src/components/ui/calendar.tsx +0 -64
- package/templates/next/src/components/ui/card.tsx +0 -79
- package/templates/next/src/components/ui/checkbox.tsx +0 -30
- package/templates/next/src/components/ui/collapsible.tsx +0 -11
- package/templates/next/src/components/ui/command.tsx +0 -155
- package/templates/next/src/components/ui/context-menu.tsx +0 -200
- package/templates/next/src/components/ui/dialog.tsx +0 -123
- package/templates/next/src/components/ui/dropdown-menu.tsx +0 -200
- package/templates/next/src/components/ui/form.tsx +0 -176
- package/templates/next/src/components/ui/hover-card.tsx +0 -29
- package/templates/next/src/components/ui/input.tsx +0 -25
- package/templates/next/src/components/ui/label.tsx +0 -26
- package/templates/next/src/components/ui/menubar.tsx +0 -236
- package/templates/next/src/components/ui/navigation-menu.tsx +0 -128
- package/templates/next/src/components/ui/popover.tsx +0 -31
- package/templates/next/src/components/ui/progress.tsx +0 -28
- package/templates/next/src/components/ui/radio-group.tsx +0 -44
- package/templates/next/src/components/ui/scroll-area.tsx +0 -48
- package/templates/next/src/components/ui/select.tsx +0 -121
- package/templates/next/src/components/ui/separator.tsx +0 -31
- package/templates/next/src/components/ui/sheet.tsx +0 -144
- package/templates/next/src/components/ui/skeleton.tsx +0 -15
- package/templates/next/src/components/ui/slider.tsx +0 -28
- package/templates/next/src/components/ui/switch.tsx +0 -29
- package/templates/next/src/components/ui/table.tsx +0 -114
- package/templates/next/src/components/ui/tabs.tsx +0 -55
- package/templates/next/src/components/ui/textarea.tsx +0 -24
- package/templates/next/src/components/ui/toast.tsx +0 -127
- package/templates/next/src/components/ui/toaster.tsx +0 -35
- package/templates/next/src/components/ui/toggle.tsx +0 -45
- package/templates/next/src/components/ui/tooltip.tsx +0 -30
- package/templates/next/src/components/ui/use-toast.ts +0 -192
- package/templates/next/src/data/albums.ts +0 -71
- package/templates/next/src/data/playlists.ts +0 -16
- package/templates/next/src/hooks/use-lock-body.ts +0 -12
- package/templates/next/src/hooks/use-mounted.ts +0 -11
- package/templates/next/src/hooks/use-mutation-observer.ts +0 -20
- package/templates/next/src/lib/fonts.ts +0 -11
- package/templates/next/src/lib/utils.ts +0 -6
- package/templates/next/src/styles/globals.css +0 -88
- package/templates/next/src-tauri/Cargo.lock +0 -3835
- package/templates/next/src-tauri/Cargo.toml +0 -39
- package/templates/next/src-tauri/build.rs +0 -3
- package/templates/next/src-tauri/icons/128x128.png +0 -0
- package/templates/next/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/next/src-tauri/icons/32x32.png +0 -0
- package/templates/next/src-tauri/icons/Square107x107Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square142x142Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square150x150Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square284x284Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square30x30Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square310x310Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square44x44Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square71x71Logo.png +0 -0
- package/templates/next/src-tauri/icons/Square89x89Logo.png +0 -0
- package/templates/next/src-tauri/icons/StoreLogo.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/next/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/next/src-tauri/icons/icon.icns +0 -0
- package/templates/next/src-tauri/icons/icon.ico +0 -0
- package/templates/next/src-tauri/icons/icon.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-20x20@1x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-20x20@2x-1.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-20x20@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-20x20@3x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-29x29@1x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-29x29@2x-1.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-29x29@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-29x29@3x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-40x40@1x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-40x40@2x-1.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-40x40@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-40x40@3x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-512@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-60x60@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-60x60@3x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-76x76@1x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-76x76@2x.png +0 -0
- package/templates/next/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png +0 -0
- package/templates/next/src-tauri/src/main.rs +0 -22
- package/templates/next/src-tauri/tauri.conf.json +0 -71
- package/templates/next/tailwind.config.js +0 -78
- package/templates/next/tsconfig.json +0 -35
- package/templates/sveltekit/.github/workflows/release.yml +0 -108
- package/templates/sveltekit/.prettierignore +0 -13
- package/templates/sveltekit/.prettierrc +0 -8
- package/templates/sveltekit/README.md +0 -1
- package/templates/sveltekit/app-icon.png +0 -0
- package/templates/sveltekit/package.json +0 -85
- package/templates/sveltekit/pnpm-lock.yaml +0 -4177
- package/templates/sveltekit/postcss.config.cjs +0 -13
- package/templates/sveltekit/src/app.d.ts +0 -18
- package/templates/sveltekit/src/app.html +0 -16
- package/templates/sveltekit/src/assets/Inter.var.woff2 +0 -0
- package/templates/sveltekit/src/index.test.ts +0 -7
- package/templates/sveltekit/src/lib/components/docs/TailwindIndicator.svelte +0 -10
- package/templates/sveltekit/src/lib/components/docs/charts/Bar.svelte +0 -152
- package/templates/sveltekit/src/lib/components/docs/dashboard/DashboardPage.svelte +0 -108
- package/templates/sveltekit/src/lib/components/docs/dashboard/MainNav.svelte +0 -31
- package/templates/sveltekit/src/lib/components/docs/dashboard/Overview.svelte +0 -5
- package/templates/sveltekit/src/lib/components/docs/dashboard/RecentSales.svelte +0 -61
- package/templates/sveltekit/src/lib/components/docs/dashboard/Search.svelte +0 -7
- package/templates/sveltekit/src/lib/components/docs/dashboard/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/docs/examples-nav/ExampleCodeLink.svelte +0 -19
- package/templates/sveltekit/src/lib/components/docs/examples-nav/ExamplesNav.svelte +0 -27
- package/templates/sveltekit/src/lib/components/docs/examples-nav/index.ts +0 -2
- package/templates/sveltekit/src/lib/components/docs/icons/Apple.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Aria.svelte +0 -11
- package/templates/sveltekit/src/lib/components/docs/icons/GitHub.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Google.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Logo.svelte +0 -17
- package/templates/sveltekit/src/lib/components/docs/icons/Minimize.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Npm.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/PayPal.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Pnpm.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Radix.svelte +0 -14
- package/templates/sveltekit/src/lib/components/docs/icons/RadixSvelte.svelte +0 -14
- package/templates/sveltekit/src/lib/components/docs/icons/Tailwind.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/Yarn.svelte +0 -12
- package/templates/sveltekit/src/lib/components/docs/icons/index.ts +0 -78
- package/templates/sveltekit/src/lib/components/docs/index.ts +0 -6
- package/templates/sveltekit/src/lib/components/docs/light-switch/LightSwitch.svelte +0 -75
- package/templates/sveltekit/src/lib/components/docs/light-switch/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/docs/light-switch/light-switch.ts +0 -87
- package/templates/sveltekit/src/lib/components/docs/light-switch/local-storage-store.ts +0 -81
- package/templates/sveltekit/src/lib/components/ui/accordion/Accordion.svelte +0 -11
- package/templates/sveltekit/src/lib/components/ui/accordion/AccordionContent.svelte +0 -19
- package/templates/sveltekit/src/lib/components/ui/accordion/AccordionItem.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/accordion/AccordionTrigger.svelte +0 -21
- package/templates/sveltekit/src/lib/components/ui/accordion/index.ts +0 -4
- package/templates/sveltekit/src/lib/components/ui/alert/Alert.svelte +0 -29
- package/templates/sveltekit/src/lib/components/ui/alert/AlertDescription.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/alert/AlertTitle.svelte +0 -15
- package/templates/sveltekit/src/lib/components/ui/alert/index.ts +0 -3
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogAction.svelte +0 -12
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogCancel.svelte +0 -15
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogContent.svelte +0 -22
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogDescription.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogFooter.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogHeader.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogOverlay.svelte +0 -15
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogPortal.svelte +0 -9
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/AlertDialogTitle.svelte +0 -11
- package/templates/sveltekit/src/lib/components/ui/alert-dialog/index.ts +0 -12
- package/templates/sveltekit/src/lib/components/ui/aspect-ratio/AspectRatio.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/aspect-ratio/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/avatar/Avatar.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/avatar/AvatarFallback.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/avatar/AvatarImage.svelte +0 -17
- package/templates/sveltekit/src/lib/components/ui/avatar/index.ts +0 -3
- package/templates/sveltekit/src/lib/components/ui/badge/Badge.svelte +0 -39
- package/templates/sveltekit/src/lib/components/ui/badge/index.ts +0 -21
- package/templates/sveltekit/src/lib/components/ui/button/Button.svelte +0 -47
- package/templates/sveltekit/src/lib/components/ui/button/index.ts +0 -28
- package/templates/sveltekit/src/lib/components/ui/card/Card.svelte +0 -18
- package/templates/sveltekit/src/lib/components/ui/card/CardContent.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/card/CardDescription.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/card/CardFooter.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/card/CardHeader.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/card/CardTitle.svelte +0 -16
- package/templates/sveltekit/src/lib/components/ui/card/index.ts +0 -6
- package/templates/sveltekit/src/lib/components/ui/checkbox/Checkbox.svelte +0 -23
- package/templates/sveltekit/src/lib/components/ui/checkbox/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/collapsible/index.ts +0 -7
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogContent.svelte +0 -29
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogDescription.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogFooter.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogHeader.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogOverlay.svelte +0 -15
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogPortal.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/dialog/DialogTitle.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/dialog/index.ts +0 -12
- package/templates/sveltekit/src/lib/components/ui/hover-card/HoverCardContent.svelte +0 -24
- package/templates/sveltekit/src/lib/components/ui/hover-card/index.ts +0 -6
- package/templates/sveltekit/src/lib/components/ui/input/Input.svelte +0 -30
- package/templates/sveltekit/src/lib/components/ui/input/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/label/Label.svelte +0 -16
- package/templates/sveltekit/src/lib/components/ui/label/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/progress/Progress.svelte +0 -22
- package/templates/sveltekit/src/lib/components/ui/progress/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/radio-group/RadioGroup.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/radio-group/RadioGroupItem.svelte +0 -23
- package/templates/sveltekit/src/lib/components/ui/radio-group/index.ts +0 -2
- package/templates/sveltekit/src/lib/components/ui/select/SelectContent.svelte +0 -26
- package/templates/sveltekit/src/lib/components/ui/select/SelectItem.svelte +0 -29
- package/templates/sveltekit/src/lib/components/ui/select/SelectLabel.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/select/SelectSeparator.svelte +0 -9
- package/templates/sveltekit/src/lib/components/ui/select/SelectTrigger.svelte +0 -21
- package/templates/sveltekit/src/lib/components/ui/select/index.ts +0 -10
- package/templates/sveltekit/src/lib/components/ui/separator/Separator.svelte +0 -22
- package/templates/sveltekit/src/lib/components/ui/separator/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetContent.svelte +0 -27
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetDescription.svelte +0 -11
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetFooter.svelte +0 -13
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetHeader.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetOverlay.svelte +0 -15
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetPortal.svelte +0 -28
- package/templates/sveltekit/src/lib/components/ui/sheet/SheetTitle.svelte +0 -14
- package/templates/sveltekit/src/lib/components/ui/sheet/index.ts +0 -102
- package/templates/sveltekit/src/lib/components/ui/skeleton/Skeleton.svelte +0 -8
- package/templates/sveltekit/src/lib/components/ui/skeleton/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/slider/Slider.svelte +0 -22
- package/templates/sveltekit/src/lib/components/ui/slider/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/switch/Switch.svelte +0 -32
- package/templates/sveltekit/src/lib/components/ui/switch/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/table/Table.svelte +0 -12
- package/templates/sveltekit/src/lib/components/ui/table/TableBody.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/table/TableCaption.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/table/TableCell.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/table/TableFooter.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/table/TableHead.svelte +0 -16
- package/templates/sveltekit/src/lib/components/ui/table/TableHeader.svelte +0 -10
- package/templates/sveltekit/src/lib/components/ui/table/TableRow.svelte +0 -16
- package/templates/sveltekit/src/lib/components/ui/table/index.ts +0 -8
- package/templates/sveltekit/src/lib/components/ui/tabs/TabsContent.svelte +0 -20
- package/templates/sveltekit/src/lib/components/ui/tabs/TabsList.svelte +0 -17
- package/templates/sveltekit/src/lib/components/ui/tabs/TabsTrigger.svelte +0 -20
- package/templates/sveltekit/src/lib/components/ui/tabs/index.ts +0 -7
- package/templates/sveltekit/src/lib/components/ui/textarea/Textarea.svelte +0 -30
- package/templates/sveltekit/src/lib/components/ui/textarea/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/toggle/Toggle.svelte +0 -44
- package/templates/sveltekit/src/lib/components/ui/toggle/index.ts +0 -1
- package/templates/sveltekit/src/lib/components/ui/tooltip/TooltipContent.svelte +0 -22
- package/templates/sveltekit/src/lib/components/ui/tooltip/index.ts +0 -6
- package/templates/sveltekit/src/lib/config/components.ts +0 -306
- package/templates/sveltekit/src/lib/config/docs.ts +0 -356
- package/templates/sveltekit/src/lib/config/site.ts +0 -15
- package/templates/sveltekit/src/lib/types/docs.ts +0 -50
- package/templates/sveltekit/src/lib/types/nav.ts +0 -18
- package/templates/sveltekit/src/lib/utils.ts +0 -75
- package/templates/sveltekit/src/routes/+layout.svelte +0 -48
- package/templates/sveltekit/src/routes/+layout.ts +0 -4
- package/templates/sveltekit/src/routes/+page.svelte +0 -0
- package/templates/sveltekit/src/routes/+page.ts +0 -6
- package/templates/sveltekit/src/routes/authentication/+page.svelte +0 -57
- package/templates/sveltekit/src/routes/authentication/+page.ts +0 -7
- package/templates/sveltekit/src/routes/authentication/UserAuthForm.svelte +0 -61
- package/templates/sveltekit/src/routes/cards/+page.svelte +0 -26
- package/templates/sveltekit/src/routes/cards/+page.ts +0 -7
- package/templates/sveltekit/src/routes/cards/CookieSettings.svelte +0 -52
- package/templates/sveltekit/src/routes/cards/CreateAccount.svelte +0 -52
- package/templates/sveltekit/src/routes/cards/DemoContainer.svelte +0 -10
- package/templates/sveltekit/src/routes/cards/Notifications.svelte +0 -38
- package/templates/sveltekit/src/routes/cards/PaymentMethod.svelte +0 -110
- package/templates/sveltekit/src/routes/cards/ReportAnIssue.svelte +0 -71
- package/templates/sveltekit/src/routes/cards/ShareDocument.svelte +0 -91
- package/templates/sveltekit/src/routes/dashboard/+page.svelte +0 -5
- package/templates/sveltekit/src/routes/dashboard/+page.ts +0 -7
- package/templates/sveltekit/src/routes/forms/+page.svelte +0 -0
- package/templates/sveltekit/src/routes/music/+page.svelte +0 -0
- package/templates/sveltekit/src/routes/music/albums.ts +0 -61
- package/templates/sveltekit/src/routes/music/playlists.ts +0 -16
- package/templates/sveltekit/src/routes/playground/+page.svelte +0 -0
- package/templates/sveltekit/src/routes/tasks/+page.svelte +0 -0
- package/templates/sveltekit/src/styles/globals.css +0 -125
- package/templates/sveltekit/src/styles/mdsvex.css +0 -80
- package/templates/sveltekit/src-tauri/Cargo.lock +0 -3835
- package/templates/sveltekit/src-tauri/Cargo.toml +0 -39
- package/templates/sveltekit/src-tauri/build.rs +0 -3
- package/templates/sveltekit/src-tauri/icons/128x128.png +0 -0
- package/templates/sveltekit/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/32x32.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square107x107Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square142x142Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square150x150Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square284x284Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square30x30Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square310x310Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square44x44Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square71x71Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/Square89x89Logo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/StoreLogo.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/sveltekit/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/sveltekit/src-tauri/icons/icon.icns +0 -0
- package/templates/sveltekit/src-tauri/icons/icon.ico +0 -0
- package/templates/sveltekit/src-tauri/icons/icon.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-20x20@1x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-20x20@2x-1.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-20x20@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-20x20@3x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-29x29@1x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-29x29@2x-1.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-29x29@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-29x29@3x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-40x40@1x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-40x40@2x-1.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-40x40@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-40x40@3x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-512@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-60x60@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-60x60@3x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-76x76@1x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-76x76@2x.png +0 -0
- package/templates/sveltekit/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png +0 -0
- package/templates/sveltekit/src-tauri/src/main.rs +0 -22
- package/templates/sveltekit/src-tauri/tauri.conf.json +0 -71
- package/templates/sveltekit/static/avatars/01.png +0 -0
- package/templates/sveltekit/static/avatars/02.png +0 -0
- package/templates/sveltekit/static/avatars/03.png +0 -0
- package/templates/sveltekit/static/avatars/04.png +0 -0
- package/templates/sveltekit/static/avatars/05.png +0 -0
- package/templates/sveltekit/static/favicon.ico +0 -0
- package/templates/sveltekit/svelte.config.js +0 -22
- package/templates/sveltekit/tailwind.config.js +0 -67
- package/templates/sveltekit/tsconfig.json +0 -13
- package/templates/sveltekit/vite.config.js +0 -12
- package/templates/vite/.github/workflows/release.yml +0 -108
- package/templates/vite/.vscode/extensions.json +0 -3
- package/templates/vite/README.md +0 -7
- package/templates/vite/app-icon.png +0 -0
- package/templates/vite/components.json +0 -16
- package/templates/vite/index.html +0 -16
- package/templates/vite/package.json +0 -83
- package/templates/vite/pnpm-lock.yaml +0 -5176
- package/templates/vite/postcss.config.js +0 -6
- package/templates/vite/prettier.config.cjs +0 -35
- package/templates/vite/public/avatars/01.png +0 -0
- package/templates/vite/public/avatars/02.png +0 -0
- package/templates/vite/public/avatars/03.png +0 -0
- package/templates/vite/public/avatars/04.png +0 -0
- package/templates/vite/public/avatars/05.png +0 -0
- package/templates/vite/src/App.tsx +0 -39
- package/templates/vite/src/assets/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/templates/vite/src/components/about-dialog.tsx +0 -101
- package/templates/vite/src/components/icons.tsx +0 -154
- package/templates/vite/src/components/menu-mode-toggle.tsx +0 -47
- package/templates/vite/src/components/menu.tsx +0 -212
- package/templates/vite/src/components/tailwind-indicator.tsx +0 -18
- package/templates/vite/src/components/theme-provider.tsx +0 -9
- package/templates/vite/src/components/ui/accordion.tsx +0 -58
- package/templates/vite/src/components/ui/alert-dialog.tsx +0 -143
- package/templates/vite/src/components/ui/alert.tsx +0 -59
- package/templates/vite/src/components/ui/aspect-ratio.tsx +0 -5
- package/templates/vite/src/components/ui/avatar.tsx +0 -48
- package/templates/vite/src/components/ui/badge.tsx +0 -36
- package/templates/vite/src/components/ui/button.tsx +0 -56
- package/templates/vite/src/components/ui/calendar.tsx +0 -62
- package/templates/vite/src/components/ui/card.tsx +0 -79
- package/templates/vite/src/components/ui/checkbox.tsx +0 -28
- package/templates/vite/src/components/ui/collapsible.tsx +0 -9
- package/templates/vite/src/components/ui/command.tsx +0 -153
- package/templates/vite/src/components/ui/context-menu.tsx +0 -198
- package/templates/vite/src/components/ui/dialog.tsx +0 -121
- package/templates/vite/src/components/ui/dropdown-menu.tsx +0 -198
- package/templates/vite/src/components/ui/form.tsx +0 -176
- package/templates/vite/src/components/ui/hover-card.tsx +0 -27
- package/templates/vite/src/components/ui/input.tsx +0 -25
- package/templates/vite/src/components/ui/label.tsx +0 -24
- package/templates/vite/src/components/ui/menubar.tsx +0 -234
- package/templates/vite/src/components/ui/navigation-menu.tsx +0 -128
- package/templates/vite/src/components/ui/popover.tsx +0 -29
- package/templates/vite/src/components/ui/progress.tsx +0 -26
- package/templates/vite/src/components/ui/radio-group.tsx +0 -42
- package/templates/vite/src/components/ui/scroll-area.tsx +0 -46
- package/templates/vite/src/components/ui/select.tsx +0 -119
- package/templates/vite/src/components/ui/separator.tsx +0 -29
- package/templates/vite/src/components/ui/sheet.tsx +0 -142
- package/templates/vite/src/components/ui/skeleton.tsx +0 -15
- package/templates/vite/src/components/ui/slider.tsx +0 -26
- package/templates/vite/src/components/ui/switch.tsx +0 -27
- package/templates/vite/src/components/ui/table.tsx +0 -114
- package/templates/vite/src/components/ui/tabs.tsx +0 -53
- package/templates/vite/src/components/ui/textarea.tsx +0 -24
- package/templates/vite/src/components/ui/toast.tsx +0 -127
- package/templates/vite/src/components/ui/toaster.tsx +0 -33
- package/templates/vite/src/components/ui/toggle.tsx +0 -43
- package/templates/vite/src/components/ui/tooltip.tsx +0 -28
- package/templates/vite/src/components/ui/use-toast.ts +0 -192
- package/templates/vite/src/dashboard/components/date-range-picker.tsx +0 -65
- package/templates/vite/src/dashboard/components/main-nav.tsx +0 -38
- package/templates/vite/src/dashboard/components/overview.tsx +0 -78
- package/templates/vite/src/dashboard/components/recent-sales.tsx +0 -71
- package/templates/vite/src/dashboard/components/search.tsx +0 -13
- package/templates/vite/src/dashboard/components/team-switcher.tsx +0 -213
- package/templates/vite/src/dashboard/components/user-nav.tsx +0 -62
- package/templates/vite/src/dashboard/page.tsx +0 -191
- package/templates/vite/src/lib/utils.ts +0 -19
- package/templates/vite/src/main.tsx +0 -10
- package/templates/vite/src/styles/globals.css +0 -88
- package/templates/vite/src/vite-env.d.ts +0 -1
- package/templates/vite/src-tauri/Cargo.lock +0 -3835
- package/templates/vite/src-tauri/Cargo.toml +0 -39
- package/templates/vite/src-tauri/build.rs +0 -3
- package/templates/vite/src-tauri/icons/128x128.png +0 -0
- package/templates/vite/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/vite/src-tauri/icons/32x32.png +0 -0
- package/templates/vite/src-tauri/icons/Square107x107Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square142x142Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square150x150Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square284x284Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square30x30Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square310x310Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square44x44Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square71x71Logo.png +0 -0
- package/templates/vite/src-tauri/icons/Square89x89Logo.png +0 -0
- package/templates/vite/src-tauri/icons/StoreLogo.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/templates/vite/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/vite/src-tauri/icons/icon.icns +0 -0
- package/templates/vite/src-tauri/icons/icon.ico +0 -0
- package/templates/vite/src-tauri/icons/icon.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-20x20@1x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-20x20@2x-1.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-20x20@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-20x20@3x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-29x29@1x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-29x29@2x-1.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-29x29@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-29x29@3x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-40x40@1x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-40x40@2x-1.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-40x40@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-40x40@3x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-512@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-60x60@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-60x60@3x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-76x76@1x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-76x76@2x.png +0 -0
- package/templates/vite/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png +0 -0
- package/templates/vite/src-tauri/src/main.rs +0 -22
- package/templates/vite/src-tauri/tauri.conf.json +0 -71
- package/templates/vite/tailwind.config.js +0 -78
- package/templates/vite/tsconfig.json +0 -26
- package/templates/vite/tsconfig.node.json +0 -9
- package/templates/vite/vite.config.ts +0 -33
- /package/{templates/.shared → assets}/app-icon.png +0 -0
|
@@ -0,0 +1,1354 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import {
|
|
5
|
+
getIdentifier,
|
|
6
|
+
getName,
|
|
7
|
+
getTauriVersion,
|
|
8
|
+
getVersion,
|
|
9
|
+
} from "@tauri-apps/api/app"
|
|
10
|
+
import { appConfigDir, appDataDir, resourceDir } from "@tauri-apps/api/path"
|
|
11
|
+
import { currentMonitor, getCurrentWindow } from "@tauri-apps/api/window"
|
|
12
|
+
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow"
|
|
13
|
+
import { attachConsole } from "@tauri-apps/plugin-log"
|
|
14
|
+
import {
|
|
15
|
+
AlertTriangleIcon,
|
|
16
|
+
CopyIcon,
|
|
17
|
+
ExternalLinkIcon,
|
|
18
|
+
PinIcon,
|
|
19
|
+
RefreshCwIcon,
|
|
20
|
+
TerminalSquareIcon,
|
|
21
|
+
XIcon,
|
|
22
|
+
} from "lucide-react"
|
|
23
|
+
|
|
24
|
+
import { Badge } from "__ALIAS_PREFIX__components/ui/badge"
|
|
25
|
+
import { Button } from "__ALIAS_PREFIX__components/ui/button"
|
|
26
|
+
import {
|
|
27
|
+
Sheet,
|
|
28
|
+
SheetContent,
|
|
29
|
+
SheetHeader,
|
|
30
|
+
SheetTitle,
|
|
31
|
+
} from "__ALIAS_PREFIX__components/ui/sheet"
|
|
32
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "__ALIAS_PREFIX__components/ui/tabs"
|
|
33
|
+
import { ToggleGroup, ToggleGroupItem } from "__ALIAS_PREFIX__components/ui/toggle-group"
|
|
34
|
+
import {
|
|
35
|
+
DEBUG_EVENT_NAME,
|
|
36
|
+
type DebugEvent,
|
|
37
|
+
type LogDebugEvent,
|
|
38
|
+
type RuntimeEventDebugEvent,
|
|
39
|
+
emitDebugEvent,
|
|
40
|
+
serializeError,
|
|
41
|
+
} from "__ALIAS_PREFIX__lib/debug-events"
|
|
42
|
+
import { trackedEmit, isTauri } from "__ALIAS_PREFIX__lib/tauri"
|
|
43
|
+
import { cn } from "__ALIAS_PREFIX__lib/utils"
|
|
44
|
+
|
|
45
|
+
type AppDiagnostics = {
|
|
46
|
+
name: string | null
|
|
47
|
+
version: string | null
|
|
48
|
+
identifier: string | null
|
|
49
|
+
tauriVersion: string | null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type WindowDiagnostics = {
|
|
53
|
+
label: string
|
|
54
|
+
title: string | null
|
|
55
|
+
viewportSize: { width: number; height: number } | null
|
|
56
|
+
tauriInnerSize: { width: number; height: number } | null
|
|
57
|
+
outerSize: { width: number; height: number } | null
|
|
58
|
+
outerPosition: { x: number; y: number } | null
|
|
59
|
+
scaleFactor: number | null
|
|
60
|
+
visible: boolean | null
|
|
61
|
+
focused: boolean | null
|
|
62
|
+
maximized: boolean | null
|
|
63
|
+
fullscreen: boolean | null
|
|
64
|
+
decorated: boolean | null
|
|
65
|
+
monitor: {
|
|
66
|
+
name: string | null
|
|
67
|
+
size: { width: number; height: number }
|
|
68
|
+
scaleFactor: number
|
|
69
|
+
} | null
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type ThemeDiagnostics = {
|
|
73
|
+
system: "dark" | "light"
|
|
74
|
+
current: "dark" | "light"
|
|
75
|
+
htmlClass: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type PathDiagnostics = {
|
|
79
|
+
appDataDir: string | null
|
|
80
|
+
appConfigDir: string | null
|
|
81
|
+
resourceDir: string | null
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type ErrorLog = {
|
|
85
|
+
id: string
|
|
86
|
+
timestamp: string
|
|
87
|
+
source: "error" | "unhandledrejection"
|
|
88
|
+
message: string
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type LocationState = {
|
|
92
|
+
pathname: string
|
|
93
|
+
href: string
|
|
94
|
+
search: string
|
|
95
|
+
hash: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
type DebugPanelSide = "left" | "right" | "bottom"
|
|
99
|
+
type DebugPanelTab = "overview" | "runtime" | "system" | "errors"
|
|
100
|
+
|
|
101
|
+
const MAX_LOG_ITEMS = 10
|
|
102
|
+
const COLOR_SCHEME_QUERY = "(prefers-color-scheme: dark)"
|
|
103
|
+
const DEBUG_PANEL_SIDE_KEY = "ctui-debug-panel-side"
|
|
104
|
+
const DEBUG_PANEL_TAB_KEY = "ctui-debug-panel-tab"
|
|
105
|
+
const DEBUG_PANEL_ATTACH_KEY = "ctui-debug-panel-attach"
|
|
106
|
+
const SIDE_PANEL_WIDTH = 480
|
|
107
|
+
const BOTTOM_PANEL_HEIGHT = 320
|
|
108
|
+
|
|
109
|
+
function isDebugPanelSide(value: string): value is DebugPanelSide {
|
|
110
|
+
return value === "left" || value === "right" || value === "bottom"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isDebugPanelTab(value: string): value is DebugPanelTab {
|
|
114
|
+
return (
|
|
115
|
+
value === "overview" ||
|
|
116
|
+
value === "runtime" ||
|
|
117
|
+
value === "system" ||
|
|
118
|
+
value === "errors"
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function isTypingTarget(target: EventTarget | null) {
|
|
123
|
+
if (!(target instanceof HTMLElement)) {
|
|
124
|
+
return false
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
target.isContentEditable ||
|
|
129
|
+
target.tagName === "INPUT" ||
|
|
130
|
+
target.tagName === "TEXTAREA" ||
|
|
131
|
+
target.tagName === "SELECT"
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function readLocationState(): LocationState {
|
|
136
|
+
return {
|
|
137
|
+
pathname: window.location.pathname,
|
|
138
|
+
href: window.location.href,
|
|
139
|
+
search: window.location.search,
|
|
140
|
+
hash: window.location.hash,
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function formatTimestamp(value: string) {
|
|
145
|
+
try {
|
|
146
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
147
|
+
hour: "2-digit",
|
|
148
|
+
minute: "2-digit",
|
|
149
|
+
second: "2-digit",
|
|
150
|
+
}).format(new Date(value))
|
|
151
|
+
} catch {
|
|
152
|
+
return value
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function parsePluginLogMessage(message: string) {
|
|
157
|
+
const match = message.match(
|
|
158
|
+
/^\[([^\]]+)\]\[([^\]]+)\]\[([^\]]+)\]\[([A-Z]+)\]\s*(.*)$/
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
if (!match) {
|
|
162
|
+
return null
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const [, date, time, target, level, text] = match
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
date,
|
|
169
|
+
time,
|
|
170
|
+
target,
|
|
171
|
+
level: level.toLowerCase(),
|
|
172
|
+
text,
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function getLogLevelClasses(level: string) {
|
|
177
|
+
switch (level) {
|
|
178
|
+
case "error":
|
|
179
|
+
return "border-destructive/40 bg-destructive/10 text-destructive"
|
|
180
|
+
case "warn":
|
|
181
|
+
return "border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400"
|
|
182
|
+
case "info":
|
|
183
|
+
return "border-emerald-500/40 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"
|
|
184
|
+
case "debug":
|
|
185
|
+
return "border-sky-500/40 bg-sky-500/10 text-sky-600 dark:text-sky-400"
|
|
186
|
+
case "trace":
|
|
187
|
+
return "border-border bg-muted/60 text-muted-foreground"
|
|
188
|
+
default:
|
|
189
|
+
return "border-border bg-muted/60 text-foreground"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function pushRecent<T>(items: T[], nextItem: T) {
|
|
194
|
+
return [nextItem, ...items].slice(0, MAX_LOG_ITEMS)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function newestFirst<T extends { timestamp: string }>(items: T[]) {
|
|
198
|
+
return [...items].sort(
|
|
199
|
+
(left, right) =>
|
|
200
|
+
new Date(right.timestamp).getTime() - new Date(left.timestamp).getTime()
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function DebugSection({
|
|
205
|
+
title,
|
|
206
|
+
description,
|
|
207
|
+
children,
|
|
208
|
+
}: {
|
|
209
|
+
title: string
|
|
210
|
+
description?: string
|
|
211
|
+
children: React.ReactNode
|
|
212
|
+
}) {
|
|
213
|
+
return (
|
|
214
|
+
<section className="space-y-3 rounded-xl border bg-card/60 p-4">
|
|
215
|
+
<div className="space-y-1">
|
|
216
|
+
<h3 className="text-sm font-medium">{title}</h3>
|
|
217
|
+
{description ? (
|
|
218
|
+
<p className="text-xs text-muted-foreground">{description}</p>
|
|
219
|
+
) : null}
|
|
220
|
+
</div>
|
|
221
|
+
{children}
|
|
222
|
+
</section>
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function KeyValueGrid({
|
|
227
|
+
entries,
|
|
228
|
+
}: {
|
|
229
|
+
entries: Array<[label: string, value: React.ReactNode]>
|
|
230
|
+
}) {
|
|
231
|
+
return (
|
|
232
|
+
<dl className="grid gap-2 text-xs">
|
|
233
|
+
{entries.map(([label, value]) => (
|
|
234
|
+
<div
|
|
235
|
+
key={label}
|
|
236
|
+
className="grid grid-cols-[110px_minmax(0,1fr)] items-start gap-3"
|
|
237
|
+
>
|
|
238
|
+
<dt className="text-muted-foreground">{label}</dt>
|
|
239
|
+
<dd className="font-mono break-all text-foreground">{value}</dd>
|
|
240
|
+
</div>
|
|
241
|
+
))}
|
|
242
|
+
</dl>
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function EntryHighlight() {
|
|
247
|
+
const [visible, setVisible] = React.useState(true)
|
|
248
|
+
|
|
249
|
+
React.useEffect(() => {
|
|
250
|
+
const fadeTimer = window.setTimeout(() => {
|
|
251
|
+
setVisible(false)
|
|
252
|
+
}, 180)
|
|
253
|
+
|
|
254
|
+
return () => {
|
|
255
|
+
window.clearTimeout(fadeTimer)
|
|
256
|
+
}
|
|
257
|
+
}, [])
|
|
258
|
+
|
|
259
|
+
return (
|
|
260
|
+
<span
|
|
261
|
+
aria-hidden="true"
|
|
262
|
+
className={cn(
|
|
263
|
+
"pointer-events-none absolute inset-0 rounded-lg ring-1 ring-primary/50 transition-opacity duration-700",
|
|
264
|
+
visible ? "opacity-100" : "opacity-0"
|
|
265
|
+
)}
|
|
266
|
+
/>
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function DebugPanel() {
|
|
271
|
+
const [open, setOpen] = React.useState(false)
|
|
272
|
+
const [panelSide, setPanelSide] = React.useState<DebugPanelSide>("right")
|
|
273
|
+
const [activeTab, setActiveTab] = React.useState<DebugPanelTab>("overview")
|
|
274
|
+
const [attached, setAttached] = React.useState(false)
|
|
275
|
+
const [tauriReady, setTauriReady] = React.useState(false)
|
|
276
|
+
const [appInfo, setAppInfo] = React.useState<AppDiagnostics>({
|
|
277
|
+
name: null,
|
|
278
|
+
version: null,
|
|
279
|
+
identifier: null,
|
|
280
|
+
tauriVersion: null,
|
|
281
|
+
})
|
|
282
|
+
const [windowInfo, setWindowInfo] = React.useState<WindowDiagnostics>({
|
|
283
|
+
label: "main",
|
|
284
|
+
title: null,
|
|
285
|
+
viewportSize: null,
|
|
286
|
+
tauriInnerSize: null,
|
|
287
|
+
outerSize: null,
|
|
288
|
+
outerPosition: null,
|
|
289
|
+
scaleFactor: null,
|
|
290
|
+
visible: null,
|
|
291
|
+
focused: null,
|
|
292
|
+
maximized: null,
|
|
293
|
+
fullscreen: null,
|
|
294
|
+
decorated: null,
|
|
295
|
+
monitor: null,
|
|
296
|
+
})
|
|
297
|
+
const [themeInfo, setThemeInfo] = React.useState<ThemeDiagnostics>({
|
|
298
|
+
system: "light",
|
|
299
|
+
current: "light",
|
|
300
|
+
htmlClass: "",
|
|
301
|
+
})
|
|
302
|
+
const [pathInfo, setPathInfo] = React.useState<PathDiagnostics>({
|
|
303
|
+
appDataDir: null,
|
|
304
|
+
appConfigDir: null,
|
|
305
|
+
resourceDir: null,
|
|
306
|
+
})
|
|
307
|
+
const [externalLinks, setExternalLinks] = React.useState<string[]>([])
|
|
308
|
+
const [invokeLogs, setInvokeLogs] = React.useState<DebugEvent[]>([])
|
|
309
|
+
const [runtimeEvents, setRuntimeEvents] = React.useState<RuntimeEventDebugEvent[]>([])
|
|
310
|
+
const [logEntries, setLogEntries] = React.useState<LogDebugEvent[]>([])
|
|
311
|
+
const [highlightedRuntimeEventIds, setHighlightedRuntimeEventIds] = React.useState<string[]>([])
|
|
312
|
+
const [highlightedLogIds, setHighlightedLogIds] = React.useState<string[]>([])
|
|
313
|
+
const [errors, setErrors] = React.useState<ErrorLog[]>([])
|
|
314
|
+
const [copied, setCopied] = React.useState(false)
|
|
315
|
+
const [locationState, setLocationState] = React.useState<LocationState>({
|
|
316
|
+
pathname: "",
|
|
317
|
+
href: "",
|
|
318
|
+
search: "",
|
|
319
|
+
hash: "",
|
|
320
|
+
})
|
|
321
|
+
const highlightTimeoutsRef = React.useRef<number[]>([])
|
|
322
|
+
|
|
323
|
+
React.useEffect(() => {
|
|
324
|
+
setTauriReady(isTauri())
|
|
325
|
+
}, [])
|
|
326
|
+
|
|
327
|
+
React.useEffect(() => {
|
|
328
|
+
return () => {
|
|
329
|
+
for (const timeoutId of highlightTimeoutsRef.current) {
|
|
330
|
+
window.clearTimeout(timeoutId)
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}, [])
|
|
334
|
+
|
|
335
|
+
React.useEffect(() => {
|
|
336
|
+
if (typeof window === "undefined") {
|
|
337
|
+
return
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const savedSide = window.sessionStorage.getItem(DEBUG_PANEL_SIDE_KEY)
|
|
341
|
+
|
|
342
|
+
if (savedSide && isDebugPanelSide(savedSide)) {
|
|
343
|
+
setPanelSide(savedSide)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const savedTab = window.sessionStorage.getItem(DEBUG_PANEL_TAB_KEY)
|
|
347
|
+
|
|
348
|
+
if (savedTab && isDebugPanelTab(savedTab)) {
|
|
349
|
+
setActiveTab(savedTab)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
setAttached(window.sessionStorage.getItem(DEBUG_PANEL_ATTACH_KEY) === "true")
|
|
353
|
+
}, [])
|
|
354
|
+
|
|
355
|
+
React.useEffect(() => {
|
|
356
|
+
if (typeof window === "undefined") {
|
|
357
|
+
return
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
window.sessionStorage.setItem(DEBUG_PANEL_SIDE_KEY, panelSide)
|
|
361
|
+
}, [panelSide])
|
|
362
|
+
|
|
363
|
+
React.useEffect(() => {
|
|
364
|
+
if (typeof window === "undefined") {
|
|
365
|
+
return
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
window.sessionStorage.setItem(DEBUG_PANEL_TAB_KEY, activeTab)
|
|
369
|
+
}, [activeTab])
|
|
370
|
+
|
|
371
|
+
React.useEffect(() => {
|
|
372
|
+
if (typeof window === "undefined") {
|
|
373
|
+
return
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
window.sessionStorage.setItem(DEBUG_PANEL_ATTACH_KEY, String(attached))
|
|
377
|
+
}, [attached])
|
|
378
|
+
|
|
379
|
+
React.useEffect(() => {
|
|
380
|
+
function updateThemeInfo() {
|
|
381
|
+
const htmlClass = document.documentElement.className
|
|
382
|
+
const system = window.matchMedia(COLOR_SCHEME_QUERY).matches ? "dark" : "light"
|
|
383
|
+
|
|
384
|
+
setThemeInfo({
|
|
385
|
+
system,
|
|
386
|
+
current: document.documentElement.classList.contains("dark") ? "dark" : "light",
|
|
387
|
+
htmlClass,
|
|
388
|
+
})
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
updateThemeInfo()
|
|
392
|
+
|
|
393
|
+
const mediaQuery = window.matchMedia(COLOR_SCHEME_QUERY)
|
|
394
|
+
const handleMediaChange = () => {
|
|
395
|
+
updateThemeInfo()
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
mediaQuery.addEventListener("change", handleMediaChange)
|
|
399
|
+
|
|
400
|
+
return () => {
|
|
401
|
+
mediaQuery.removeEventListener("change", handleMediaChange)
|
|
402
|
+
}
|
|
403
|
+
}, [])
|
|
404
|
+
|
|
405
|
+
React.useEffect(() => {
|
|
406
|
+
async function loadAppInfo() {
|
|
407
|
+
if (!tauriReady) {
|
|
408
|
+
return
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const [name, version, identifier, tauriVersion] = await Promise.all([
|
|
412
|
+
getName(),
|
|
413
|
+
getVersion(),
|
|
414
|
+
getIdentifier(),
|
|
415
|
+
getTauriVersion(),
|
|
416
|
+
])
|
|
417
|
+
|
|
418
|
+
setAppInfo({
|
|
419
|
+
name,
|
|
420
|
+
version,
|
|
421
|
+
identifier,
|
|
422
|
+
tauriVersion,
|
|
423
|
+
})
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
void loadAppInfo()
|
|
427
|
+
}, [tauriReady])
|
|
428
|
+
|
|
429
|
+
React.useEffect(() => {
|
|
430
|
+
async function loadPaths() {
|
|
431
|
+
if (!tauriReady) {
|
|
432
|
+
return
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const [dataPath, configPath, resourcesPath] = await Promise.all([
|
|
436
|
+
appDataDir(),
|
|
437
|
+
appConfigDir(),
|
|
438
|
+
resourceDir(),
|
|
439
|
+
])
|
|
440
|
+
|
|
441
|
+
setPathInfo({
|
|
442
|
+
appDataDir: dataPath,
|
|
443
|
+
appConfigDir: configPath,
|
|
444
|
+
resourceDir: resourcesPath,
|
|
445
|
+
})
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
void loadPaths()
|
|
449
|
+
}, [tauriReady])
|
|
450
|
+
|
|
451
|
+
React.useEffect(() => {
|
|
452
|
+
if (!tauriReady || !locationState.pathname) {
|
|
453
|
+
return
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
void trackedEmit("ctui://debug-panel-mounted", {
|
|
457
|
+
route: locationState.pathname,
|
|
458
|
+
})
|
|
459
|
+
}, [locationState.pathname, tauriReady])
|
|
460
|
+
|
|
461
|
+
React.useEffect(() => {
|
|
462
|
+
function updateLocationState() {
|
|
463
|
+
const nextState = readLocationState()
|
|
464
|
+
|
|
465
|
+
setLocationState((current) => {
|
|
466
|
+
if (
|
|
467
|
+
current.pathname === nextState.pathname &&
|
|
468
|
+
current.href === nextState.href &&
|
|
469
|
+
current.search === nextState.search &&
|
|
470
|
+
current.hash === nextState.hash
|
|
471
|
+
) {
|
|
472
|
+
return current
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
return nextState
|
|
476
|
+
})
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
updateLocationState()
|
|
480
|
+
|
|
481
|
+
const intervalId = window.setInterval(updateLocationState, 250)
|
|
482
|
+
window.addEventListener("hashchange", updateLocationState)
|
|
483
|
+
window.addEventListener("popstate", updateLocationState)
|
|
484
|
+
|
|
485
|
+
return () => {
|
|
486
|
+
window.clearInterval(intervalId)
|
|
487
|
+
window.removeEventListener("hashchange", updateLocationState)
|
|
488
|
+
window.removeEventListener("popstate", updateLocationState)
|
|
489
|
+
}
|
|
490
|
+
}, [])
|
|
491
|
+
|
|
492
|
+
React.useEffect(() => {
|
|
493
|
+
async function refreshWindowInfo() {
|
|
494
|
+
if (!tauriReady) {
|
|
495
|
+
return
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const currentWindow = getCurrentWindow()
|
|
499
|
+
const currentWebviewWindow = getCurrentWebviewWindow()
|
|
500
|
+
const [
|
|
501
|
+
title,
|
|
502
|
+
tauriInnerSize,
|
|
503
|
+
outerSize,
|
|
504
|
+
outerPosition,
|
|
505
|
+
scaleFactor,
|
|
506
|
+
visible,
|
|
507
|
+
focused,
|
|
508
|
+
maximized,
|
|
509
|
+
fullscreen,
|
|
510
|
+
decorated,
|
|
511
|
+
monitor,
|
|
512
|
+
] = await Promise.all([
|
|
513
|
+
currentWindow.title(),
|
|
514
|
+
currentWindow.innerSize(),
|
|
515
|
+
currentWindow.outerSize(),
|
|
516
|
+
currentWindow.outerPosition(),
|
|
517
|
+
currentWindow.scaleFactor(),
|
|
518
|
+
currentWindow.isVisible(),
|
|
519
|
+
currentWindow.isFocused(),
|
|
520
|
+
currentWindow.isMaximized(),
|
|
521
|
+
currentWindow.isFullscreen(),
|
|
522
|
+
currentWindow.isDecorated(),
|
|
523
|
+
currentMonitor(),
|
|
524
|
+
])
|
|
525
|
+
|
|
526
|
+
setWindowInfo({
|
|
527
|
+
label: currentWebviewWindow.label,
|
|
528
|
+
title,
|
|
529
|
+
viewportSize: {
|
|
530
|
+
width: window.innerWidth,
|
|
531
|
+
height: window.innerHeight,
|
|
532
|
+
},
|
|
533
|
+
tauriInnerSize,
|
|
534
|
+
outerSize,
|
|
535
|
+
outerPosition,
|
|
536
|
+
scaleFactor,
|
|
537
|
+
visible,
|
|
538
|
+
focused,
|
|
539
|
+
maximized,
|
|
540
|
+
fullscreen,
|
|
541
|
+
decorated,
|
|
542
|
+
monitor: monitor
|
|
543
|
+
? {
|
|
544
|
+
name: monitor.name,
|
|
545
|
+
size: monitor.size,
|
|
546
|
+
scaleFactor: monitor.scaleFactor,
|
|
547
|
+
}
|
|
548
|
+
: null,
|
|
549
|
+
})
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
void refreshWindowInfo()
|
|
553
|
+
|
|
554
|
+
if (!tauriReady) {
|
|
555
|
+
return
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
const currentWindow = getCurrentWindow()
|
|
559
|
+
let unlistenFocus: (() => void) | undefined
|
|
560
|
+
let unlistenResize: (() => void) | undefined
|
|
561
|
+
let unlistenMove: (() => void) | undefined
|
|
562
|
+
|
|
563
|
+
void currentWindow
|
|
564
|
+
.onFocusChanged(() => {
|
|
565
|
+
emitDebugEvent({
|
|
566
|
+
id: crypto.randomUUID(),
|
|
567
|
+
kind: "runtime-event",
|
|
568
|
+
name: "window:focus-changed",
|
|
569
|
+
source: "window",
|
|
570
|
+
timestamp: new Date().toISOString(),
|
|
571
|
+
})
|
|
572
|
+
void refreshWindowInfo()
|
|
573
|
+
})
|
|
574
|
+
.then((unlisten) => {
|
|
575
|
+
unlistenFocus = unlisten
|
|
576
|
+
})
|
|
577
|
+
|
|
578
|
+
void currentWindow
|
|
579
|
+
.onResized(() => {
|
|
580
|
+
emitDebugEvent({
|
|
581
|
+
id: crypto.randomUUID(),
|
|
582
|
+
kind: "runtime-event",
|
|
583
|
+
name: "window:resized",
|
|
584
|
+
source: "window",
|
|
585
|
+
timestamp: new Date().toISOString(),
|
|
586
|
+
})
|
|
587
|
+
void refreshWindowInfo()
|
|
588
|
+
})
|
|
589
|
+
.then((unlisten) => {
|
|
590
|
+
unlistenResize = unlisten
|
|
591
|
+
})
|
|
592
|
+
|
|
593
|
+
void currentWindow
|
|
594
|
+
.onMoved(() => {
|
|
595
|
+
emitDebugEvent({
|
|
596
|
+
id: crypto.randomUUID(),
|
|
597
|
+
kind: "runtime-event",
|
|
598
|
+
name: "window:moved",
|
|
599
|
+
source: "window",
|
|
600
|
+
timestamp: new Date().toISOString(),
|
|
601
|
+
})
|
|
602
|
+
void refreshWindowInfo()
|
|
603
|
+
})
|
|
604
|
+
.then((unlisten) => {
|
|
605
|
+
unlistenMove = unlisten
|
|
606
|
+
})
|
|
607
|
+
|
|
608
|
+
return () => {
|
|
609
|
+
unlistenFocus?.()
|
|
610
|
+
unlistenResize?.()
|
|
611
|
+
unlistenMove?.()
|
|
612
|
+
}
|
|
613
|
+
}, [locationState.pathname, tauriReady])
|
|
614
|
+
|
|
615
|
+
React.useEffect(() => {
|
|
616
|
+
function queueHighlight(
|
|
617
|
+
id: string,
|
|
618
|
+
setIds: React.Dispatch<React.SetStateAction<string[]>>
|
|
619
|
+
) {
|
|
620
|
+
setIds((current) => (current.includes(id) ? current : [id, ...current]))
|
|
621
|
+
|
|
622
|
+
const timeoutId = window.setTimeout(() => {
|
|
623
|
+
setIds((current) => current.filter((currentId) => currentId !== id))
|
|
624
|
+
highlightTimeoutsRef.current = highlightTimeoutsRef.current.filter(
|
|
625
|
+
(currentTimeoutId) => currentTimeoutId !== timeoutId
|
|
626
|
+
)
|
|
627
|
+
}, 900)
|
|
628
|
+
|
|
629
|
+
highlightTimeoutsRef.current.push(timeoutId)
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function handleDebugEvent(event: Event) {
|
|
633
|
+
const debugEvent = (event as CustomEvent<DebugEvent>).detail
|
|
634
|
+
|
|
635
|
+
if (debugEvent.kind === "external-link") {
|
|
636
|
+
setExternalLinks((current) => pushRecent(current, debugEvent.href))
|
|
637
|
+
return
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
if (debugEvent.kind === "runtime-event") {
|
|
641
|
+
setRuntimeEvents((current) => pushRecent(current, debugEvent))
|
|
642
|
+
queueHighlight(debugEvent.id, setHighlightedRuntimeEventIds)
|
|
643
|
+
return
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
if (debugEvent.kind === "log") {
|
|
647
|
+
setLogEntries((current) => pushRecent(current, debugEvent))
|
|
648
|
+
queueHighlight(debugEvent.id, setHighlightedLogIds)
|
|
649
|
+
return
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
setInvokeLogs((current) => pushRecent(current, debugEvent))
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function handleError(event: ErrorEvent) {
|
|
656
|
+
setErrors((current) =>
|
|
657
|
+
pushRecent(current, {
|
|
658
|
+
id: crypto.randomUUID(),
|
|
659
|
+
timestamp: new Date().toISOString(),
|
|
660
|
+
source: "error",
|
|
661
|
+
message: event.message || "Unknown runtime error",
|
|
662
|
+
})
|
|
663
|
+
)
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
function handleRejection(event: PromiseRejectionEvent) {
|
|
667
|
+
const reason = serializeError(event.reason)
|
|
668
|
+
|
|
669
|
+
setErrors((current) =>
|
|
670
|
+
pushRecent(current, {
|
|
671
|
+
id: crypto.randomUUID(),
|
|
672
|
+
timestamp: new Date().toISOString(),
|
|
673
|
+
source: "unhandledrejection",
|
|
674
|
+
message: reason.message,
|
|
675
|
+
})
|
|
676
|
+
)
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
window.addEventListener(DEBUG_EVENT_NAME, handleDebugEvent as EventListener)
|
|
680
|
+
window.addEventListener("error", handleError)
|
|
681
|
+
window.addEventListener("unhandledrejection", handleRejection)
|
|
682
|
+
|
|
683
|
+
return () => {
|
|
684
|
+
window.removeEventListener(DEBUG_EVENT_NAME, handleDebugEvent as EventListener)
|
|
685
|
+
window.removeEventListener("error", handleError)
|
|
686
|
+
window.removeEventListener("unhandledrejection", handleRejection)
|
|
687
|
+
}
|
|
688
|
+
}, [])
|
|
689
|
+
|
|
690
|
+
React.useEffect(() => {
|
|
691
|
+
const originalConsole = {
|
|
692
|
+
log: window.console.log,
|
|
693
|
+
info: window.console.info,
|
|
694
|
+
warn: window.console.warn,
|
|
695
|
+
error: window.console.error,
|
|
696
|
+
debug: window.console.debug,
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
function capture(
|
|
700
|
+
level: LogDebugEvent["level"],
|
|
701
|
+
args: unknown[],
|
|
702
|
+
originalMethod: (...data: unknown[]) => void
|
|
703
|
+
) {
|
|
704
|
+
const message = args
|
|
705
|
+
.map((value) => {
|
|
706
|
+
if (typeof value === "string") {
|
|
707
|
+
return value
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
try {
|
|
711
|
+
return JSON.stringify(value)
|
|
712
|
+
} catch {
|
|
713
|
+
return String(value)
|
|
714
|
+
}
|
|
715
|
+
})
|
|
716
|
+
.join(" ")
|
|
717
|
+
|
|
718
|
+
emitDebugEvent({
|
|
719
|
+
id: crypto.randomUUID(),
|
|
720
|
+
kind: "log",
|
|
721
|
+
level,
|
|
722
|
+
message,
|
|
723
|
+
timestamp: new Date().toISOString(),
|
|
724
|
+
})
|
|
725
|
+
|
|
726
|
+
originalMethod(...args)
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
window.console.log = (...args: unknown[]) => {
|
|
730
|
+
capture("log", args, originalConsole.log)
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
window.console.info = (...args: unknown[]) => {
|
|
734
|
+
capture("info", args, originalConsole.info)
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
window.console.warn = (...args: unknown[]) => {
|
|
738
|
+
capture("warn", args, originalConsole.warn)
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
window.console.error = (...args: unknown[]) => {
|
|
742
|
+
capture("error", args, originalConsole.error)
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
window.console.debug = (...args: unknown[]) => {
|
|
746
|
+
capture("debug", args, originalConsole.debug)
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
let detachConsole: (() => void) | undefined
|
|
750
|
+
|
|
751
|
+
if (tauriReady) {
|
|
752
|
+
void attachConsole().then((detach) => {
|
|
753
|
+
detachConsole = detach
|
|
754
|
+
})
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
return () => {
|
|
758
|
+
detachConsole?.()
|
|
759
|
+
window.console.log = originalConsole.log
|
|
760
|
+
window.console.info = originalConsole.info
|
|
761
|
+
window.console.warn = originalConsole.warn
|
|
762
|
+
window.console.error = originalConsole.error
|
|
763
|
+
window.console.debug = originalConsole.debug
|
|
764
|
+
}
|
|
765
|
+
}, [tauriReady])
|
|
766
|
+
|
|
767
|
+
React.useEffect(() => {
|
|
768
|
+
function onKeyDown(event: KeyboardEvent) {
|
|
769
|
+
if (event.defaultPrevented || event.repeat) {
|
|
770
|
+
return
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
if (!(event.metaKey || event.ctrlKey) || event.altKey || event.shiftKey) {
|
|
774
|
+
return
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
if (event.key.toLowerCase() !== "d") {
|
|
778
|
+
return
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if (isTypingTarget(event.target)) {
|
|
782
|
+
return
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
event.preventDefault()
|
|
786
|
+
setOpen((current) => !current)
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
window.addEventListener("keydown", onKeyDown)
|
|
790
|
+
|
|
791
|
+
return () => {
|
|
792
|
+
window.removeEventListener("keydown", onKeyDown)
|
|
793
|
+
}
|
|
794
|
+
}, [])
|
|
795
|
+
|
|
796
|
+
React.useEffect(() => {
|
|
797
|
+
const mainElement = document.querySelector("main")
|
|
798
|
+
|
|
799
|
+
if (!(mainElement instanceof HTMLElement)) {
|
|
800
|
+
return
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
mainElement.style.paddingLeft = ""
|
|
804
|
+
mainElement.style.paddingRight = ""
|
|
805
|
+
mainElement.style.paddingBottom = ""
|
|
806
|
+
|
|
807
|
+
if (open && attached) {
|
|
808
|
+
if (panelSide === "left") {
|
|
809
|
+
mainElement.style.paddingLeft = `${SIDE_PANEL_WIDTH}px`
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
if (panelSide === "right") {
|
|
813
|
+
mainElement.style.paddingRight = `${SIDE_PANEL_WIDTH}px`
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if (panelSide === "bottom") {
|
|
817
|
+
mainElement.style.paddingBottom = `${BOTTOM_PANEL_HEIGHT}px`
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
return () => {
|
|
822
|
+
mainElement.style.paddingLeft = ""
|
|
823
|
+
mainElement.style.paddingRight = ""
|
|
824
|
+
mainElement.style.paddingBottom = ""
|
|
825
|
+
}
|
|
826
|
+
}, [attached, open, panelSide])
|
|
827
|
+
|
|
828
|
+
async function handleCopyText(value: string) {
|
|
829
|
+
await navigator.clipboard.writeText(value)
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
async function handleCopySnapshot() {
|
|
833
|
+
const snapshot = {
|
|
834
|
+
tauriReady,
|
|
835
|
+
panelSide,
|
|
836
|
+
attached,
|
|
837
|
+
appInfo,
|
|
838
|
+
locationState,
|
|
839
|
+
windowInfo,
|
|
840
|
+
themeInfo,
|
|
841
|
+
pathInfo,
|
|
842
|
+
externalLinks,
|
|
843
|
+
invokeLogs,
|
|
844
|
+
runtimeEvents,
|
|
845
|
+
logEntries,
|
|
846
|
+
errors,
|
|
847
|
+
capturedAt: new Date().toISOString(),
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
await navigator.clipboard.writeText(JSON.stringify(snapshot, null, 2))
|
|
851
|
+
setCopied(true)
|
|
852
|
+
window.setTimeout(() => {
|
|
853
|
+
setCopied(false)
|
|
854
|
+
}, 1200)
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
const panelContent = (
|
|
858
|
+
<>
|
|
859
|
+
<SheetHeader className="gap-3 border-b p-4">
|
|
860
|
+
<div className="flex items-start justify-between gap-3">
|
|
861
|
+
<div className="space-y-1">
|
|
862
|
+
{!attached && panelSide !== "bottom" ? (
|
|
863
|
+
<SheetTitle className="sr-only">Development Debug Panel</SheetTitle>
|
|
864
|
+
) : null}
|
|
865
|
+
<h2 className="flex items-center gap-2 text-base font-medium text-foreground">
|
|
866
|
+
<TerminalSquareIcon className="size-4" />
|
|
867
|
+
Development Debug Panel
|
|
868
|
+
</h2>
|
|
869
|
+
</div>
|
|
870
|
+
<div className="flex items-center gap-2">
|
|
871
|
+
<div className="inline-flex items-center rounded-md border bg-muted/40 px-2 py-1 text-xs">
|
|
872
|
+
<span
|
|
873
|
+
className={cn(
|
|
874
|
+
"font-medium transition-colors",
|
|
875
|
+
tauriReady ? "text-foreground" : "text-muted-foreground"
|
|
876
|
+
)}
|
|
877
|
+
>
|
|
878
|
+
Tauri
|
|
879
|
+
</span>
|
|
880
|
+
<span className="px-1 text-muted-foreground">/</span>
|
|
881
|
+
<span
|
|
882
|
+
className={cn(
|
|
883
|
+
"font-medium transition-colors",
|
|
884
|
+
tauriReady ? "text-muted-foreground" : "text-foreground"
|
|
885
|
+
)}
|
|
886
|
+
>
|
|
887
|
+
Web
|
|
888
|
+
</span>
|
|
889
|
+
</div>
|
|
890
|
+
<Button
|
|
891
|
+
variant="ghost"
|
|
892
|
+
size="icon-sm"
|
|
893
|
+
onClick={() => setOpen(false)}
|
|
894
|
+
aria-label="Close debug panel"
|
|
895
|
+
>
|
|
896
|
+
<XIcon className="size-4" />
|
|
897
|
+
</Button>
|
|
898
|
+
</div>
|
|
899
|
+
</div>
|
|
900
|
+
<div className="flex flex-wrap items-center justify-between gap-3 text-xs text-muted-foreground">
|
|
901
|
+
<div className="flex items-center gap-2">
|
|
902
|
+
<span className="rounded-md border px-1.5 py-0.5 font-mono">Cmd/Ctrl + D</span>
|
|
903
|
+
<span>toggle panel</span>
|
|
904
|
+
</div>
|
|
905
|
+
<div className="flex items-center gap-2">
|
|
906
|
+
<Button
|
|
907
|
+
variant={attached ? "secondary" : "outline"}
|
|
908
|
+
size="icon-sm"
|
|
909
|
+
onClick={() => setAttached((current) => !current)}
|
|
910
|
+
aria-pressed={attached}
|
|
911
|
+
aria-label={attached ? "Detach debug panel" : "Attach debug panel"}
|
|
912
|
+
title={attached ? "Detach debug panel" : "Attach debug panel"}
|
|
913
|
+
>
|
|
914
|
+
<PinIcon className="size-4" />
|
|
915
|
+
</Button>
|
|
916
|
+
<ToggleGroup
|
|
917
|
+
type="single"
|
|
918
|
+
value={panelSide}
|
|
919
|
+
onValueChange={(value) => {
|
|
920
|
+
if (isDebugPanelSide(value)) {
|
|
921
|
+
setPanelSide(value)
|
|
922
|
+
}
|
|
923
|
+
}}
|
|
924
|
+
variant="outline"
|
|
925
|
+
size="sm"
|
|
926
|
+
>
|
|
927
|
+
<ToggleGroupItem value="left" aria-label="Dock panel left">
|
|
928
|
+
Left
|
|
929
|
+
</ToggleGroupItem>
|
|
930
|
+
<ToggleGroupItem value="right" aria-label="Dock panel right">
|
|
931
|
+
Right
|
|
932
|
+
</ToggleGroupItem>
|
|
933
|
+
<ToggleGroupItem value="bottom" aria-label="Dock panel bottom">
|
|
934
|
+
Bottom
|
|
935
|
+
</ToggleGroupItem>
|
|
936
|
+
</ToggleGroup>
|
|
937
|
+
</div>
|
|
938
|
+
</div>
|
|
939
|
+
</SheetHeader>
|
|
940
|
+
|
|
941
|
+
<Tabs
|
|
942
|
+
value={activeTab}
|
|
943
|
+
onValueChange={(value) => {
|
|
944
|
+
if (isDebugPanelTab(value)) {
|
|
945
|
+
setActiveTab(value)
|
|
946
|
+
}
|
|
947
|
+
}}
|
|
948
|
+
className="min-h-0 flex-1 gap-0 px-4"
|
|
949
|
+
>
|
|
950
|
+
<TabsList className="w-full justify-start">
|
|
951
|
+
<TabsTrigger value="overview">Overview</TabsTrigger>
|
|
952
|
+
<TabsTrigger value="runtime">
|
|
953
|
+
Runtime
|
|
954
|
+
{invokeLogs.length || externalLinks.length || runtimeEvents.length || logEntries.length ? (
|
|
955
|
+
<Badge variant="secondary" className="ml-1 h-5 min-w-5 px-1.5">
|
|
956
|
+
{invokeLogs.length + externalLinks.length + runtimeEvents.length + logEntries.length}
|
|
957
|
+
</Badge>
|
|
958
|
+
) : null}
|
|
959
|
+
</TabsTrigger>
|
|
960
|
+
<TabsTrigger value="system">System</TabsTrigger>
|
|
961
|
+
<TabsTrigger value="errors">
|
|
962
|
+
Errors
|
|
963
|
+
{errors.length ? (
|
|
964
|
+
<Badge variant="destructive" className="ml-1 h-5 min-w-5 px-1.5">
|
|
965
|
+
{errors.length}
|
|
966
|
+
</Badge>
|
|
967
|
+
) : null}
|
|
968
|
+
</TabsTrigger>
|
|
969
|
+
</TabsList>
|
|
970
|
+
|
|
971
|
+
<TabsContent value="overview" className="min-h-0 flex-1 overflow-hidden pt-2">
|
|
972
|
+
<div className="h-full space-y-4 overflow-y-auto pr-1">
|
|
973
|
+
<DebugSection
|
|
974
|
+
title="App"
|
|
975
|
+
description="Static application metadata from Tauri v2."
|
|
976
|
+
>
|
|
977
|
+
<KeyValueGrid
|
|
978
|
+
entries={[
|
|
979
|
+
["Route", locationState.pathname || "/"],
|
|
980
|
+
["URL", locationState.href || "Unavailable"],
|
|
981
|
+
["Search", locationState.search || "(none)"],
|
|
982
|
+
["Hash", locationState.hash || "(none)"],
|
|
983
|
+
["Name", appInfo.name ?? "Unavailable"],
|
|
984
|
+
["Version", appInfo.version ?? "Unavailable"],
|
|
985
|
+
["Identifier", appInfo.identifier ?? "Unavailable"],
|
|
986
|
+
["Tauri", appInfo.tauriVersion ?? "Unavailable"],
|
|
987
|
+
]}
|
|
988
|
+
/>
|
|
989
|
+
</DebugSection>
|
|
990
|
+
|
|
991
|
+
<DebugSection
|
|
992
|
+
title="Window"
|
|
993
|
+
description="Current Tauri window and monitor state."
|
|
994
|
+
>
|
|
995
|
+
<KeyValueGrid
|
|
996
|
+
entries={[
|
|
997
|
+
["Label", windowInfo.label],
|
|
998
|
+
["Title", windowInfo.title ?? "Unavailable"],
|
|
999
|
+
[
|
|
1000
|
+
"Viewport",
|
|
1001
|
+
windowInfo.viewportSize
|
|
1002
|
+
? `${windowInfo.viewportSize.width} × ${windowInfo.viewportSize.height}`
|
|
1003
|
+
: "Unavailable",
|
|
1004
|
+
],
|
|
1005
|
+
[
|
|
1006
|
+
"Tauri inner",
|
|
1007
|
+
windowInfo.tauriInnerSize
|
|
1008
|
+
? `${windowInfo.tauriInnerSize.width} × ${windowInfo.tauriInnerSize.height}`
|
|
1009
|
+
: "Unavailable",
|
|
1010
|
+
],
|
|
1011
|
+
[
|
|
1012
|
+
"Window outer",
|
|
1013
|
+
windowInfo.outerSize
|
|
1014
|
+
? `${windowInfo.outerSize.width} × ${windowInfo.outerSize.height}`
|
|
1015
|
+
: "Unavailable",
|
|
1016
|
+
],
|
|
1017
|
+
[
|
|
1018
|
+
"Position",
|
|
1019
|
+
windowInfo.outerPosition
|
|
1020
|
+
? `${windowInfo.outerPosition.x}, ${windowInfo.outerPosition.y}`
|
|
1021
|
+
: "Unavailable",
|
|
1022
|
+
],
|
|
1023
|
+
["Scale", windowInfo.scaleFactor ?? "Unavailable"],
|
|
1024
|
+
["Focused", String(windowInfo.focused)],
|
|
1025
|
+
["Visible", String(windowInfo.visible)],
|
|
1026
|
+
["Maximized", String(windowInfo.maximized)],
|
|
1027
|
+
["Fullscreen", String(windowInfo.fullscreen)],
|
|
1028
|
+
["Decorated", String(windowInfo.decorated)],
|
|
1029
|
+
[
|
|
1030
|
+
"Monitor",
|
|
1031
|
+
windowInfo.monitor
|
|
1032
|
+
? `${windowInfo.monitor.name ?? "Unknown"} (${windowInfo.monitor.size.width} × ${windowInfo.monitor.size.height})`
|
|
1033
|
+
: "Unavailable",
|
|
1034
|
+
],
|
|
1035
|
+
]}
|
|
1036
|
+
/>
|
|
1037
|
+
</DebugSection>
|
|
1038
|
+
|
|
1039
|
+
<DebugSection
|
|
1040
|
+
title="Theme"
|
|
1041
|
+
description="Theme state from the root HTML element and system media query."
|
|
1042
|
+
>
|
|
1043
|
+
<KeyValueGrid
|
|
1044
|
+
entries={[
|
|
1045
|
+
["Current", themeInfo.current],
|
|
1046
|
+
["System", themeInfo.system],
|
|
1047
|
+
["HTML class", themeInfo.htmlClass || "(none)"],
|
|
1048
|
+
]}
|
|
1049
|
+
/>
|
|
1050
|
+
</DebugSection>
|
|
1051
|
+
</div>
|
|
1052
|
+
</TabsContent>
|
|
1053
|
+
|
|
1054
|
+
<TabsContent value="runtime" className="min-h-0 flex-1 overflow-hidden pt-2">
|
|
1055
|
+
<div className="h-full space-y-4 overflow-y-auto pr-1">
|
|
1056
|
+
<DebugSection
|
|
1057
|
+
title="Recent invoke() calls"
|
|
1058
|
+
description="Calls captured through the tracked Tauri helper."
|
|
1059
|
+
>
|
|
1060
|
+
{invokeLogs.length ? (
|
|
1061
|
+
<div className="max-h-72 space-y-2 overflow-y-auto pr-1">
|
|
1062
|
+
{invokeLogs.map((entry) => {
|
|
1063
|
+
if (entry.kind !== "invoke") {
|
|
1064
|
+
return null
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
return (
|
|
1068
|
+
<div key={entry.id} className="rounded-lg border bg-background/70 p-3">
|
|
1069
|
+
<div className="mb-2 flex items-center justify-between gap-3">
|
|
1070
|
+
<div className="font-mono text-xs">{entry.command}</div>
|
|
1071
|
+
<div className="flex items-center gap-2">
|
|
1072
|
+
<Badge
|
|
1073
|
+
variant={entry.status === "success" ? "secondary" : "destructive"}
|
|
1074
|
+
>
|
|
1075
|
+
{entry.status}
|
|
1076
|
+
</Badge>
|
|
1077
|
+
<span className="text-[11px] text-muted-foreground">
|
|
1078
|
+
{entry.durationMs} ms
|
|
1079
|
+
</span>
|
|
1080
|
+
</div>
|
|
1081
|
+
</div>
|
|
1082
|
+
<pre className="overflow-x-auto rounded-md bg-muted/60 p-2 text-[11px] leading-relaxed break-words whitespace-pre-wrap">
|
|
1083
|
+
{JSON.stringify(
|
|
1084
|
+
{
|
|
1085
|
+
args: entry.args,
|
|
1086
|
+
result: entry.result,
|
|
1087
|
+
error: entry.error,
|
|
1088
|
+
},
|
|
1089
|
+
null,
|
|
1090
|
+
2
|
|
1091
|
+
)}
|
|
1092
|
+
</pre>
|
|
1093
|
+
</div>
|
|
1094
|
+
)
|
|
1095
|
+
})}
|
|
1096
|
+
</div>
|
|
1097
|
+
) : (
|
|
1098
|
+
<p className="text-xs text-muted-foreground">
|
|
1099
|
+
No tracked Tauri invocations yet.
|
|
1100
|
+
</p>
|
|
1101
|
+
)}
|
|
1102
|
+
</DebugSection>
|
|
1103
|
+
|
|
1104
|
+
<DebugSection
|
|
1105
|
+
title="External links"
|
|
1106
|
+
description="URLs intercepted by the external-link guard."
|
|
1107
|
+
>
|
|
1108
|
+
{externalLinks.length ? (
|
|
1109
|
+
<ul className="max-h-56 space-y-2 overflow-y-auto pr-1 text-xs">
|
|
1110
|
+
{externalLinks.map((href, index) => (
|
|
1111
|
+
<li key={`${href}-${index}`} className="flex gap-2">
|
|
1112
|
+
<ExternalLinkIcon className="mt-0.5 size-3.5 shrink-0 text-muted-foreground" />
|
|
1113
|
+
<span className="font-mono break-all">{href}</span>
|
|
1114
|
+
</li>
|
|
1115
|
+
))}
|
|
1116
|
+
</ul>
|
|
1117
|
+
) : (
|
|
1118
|
+
<p className="text-xs text-muted-foreground">
|
|
1119
|
+
No external links opened yet.
|
|
1120
|
+
</p>
|
|
1121
|
+
)}
|
|
1122
|
+
</DebugSection>
|
|
1123
|
+
|
|
1124
|
+
<DebugSection
|
|
1125
|
+
title="Runtime events"
|
|
1126
|
+
description="Recent Tauri window and emitted event activity."
|
|
1127
|
+
>
|
|
1128
|
+
{runtimeEvents.length ? (
|
|
1129
|
+
<ul className="max-h-72 space-y-2 overflow-y-auto pr-1 text-xs">
|
|
1130
|
+
{newestFirst(runtimeEvents).map((entry) => (
|
|
1131
|
+
<li key={entry.id} className="relative rounded-lg border bg-background/70 p-3">
|
|
1132
|
+
{highlightedRuntimeEventIds.includes(entry.id) ? <EntryHighlight /> : null}
|
|
1133
|
+
<div className="mb-1 flex items-center justify-between gap-3">
|
|
1134
|
+
<span className="font-mono">{entry.name}</span>
|
|
1135
|
+
<Badge variant="outline">{entry.source}</Badge>
|
|
1136
|
+
</div>
|
|
1137
|
+
<div className="mb-2 text-[11px] text-muted-foreground">
|
|
1138
|
+
{formatTimestamp(entry.timestamp)}
|
|
1139
|
+
</div>
|
|
1140
|
+
{entry.payload !== undefined ? (
|
|
1141
|
+
<pre className="overflow-x-auto rounded-md bg-muted/60 p-2 text-[11px] leading-relaxed break-words whitespace-pre-wrap">
|
|
1142
|
+
{JSON.stringify(entry.payload, null, 2)}
|
|
1143
|
+
</pre>
|
|
1144
|
+
) : null}
|
|
1145
|
+
</li>
|
|
1146
|
+
))}
|
|
1147
|
+
</ul>
|
|
1148
|
+
) : (
|
|
1149
|
+
<p className="text-xs text-muted-foreground">
|
|
1150
|
+
No captured runtime events yet.
|
|
1151
|
+
</p>
|
|
1152
|
+
)}
|
|
1153
|
+
</DebugSection>
|
|
1154
|
+
|
|
1155
|
+
<DebugSection
|
|
1156
|
+
title="Plugin logs"
|
|
1157
|
+
description="Recent logs surfaced through the browser console and Tauri log plugin."
|
|
1158
|
+
>
|
|
1159
|
+
{logEntries.length ? (
|
|
1160
|
+
<ul className="max-h-72 space-y-2 overflow-y-auto pr-1 text-xs">
|
|
1161
|
+
{newestFirst(logEntries).map((entry) => {
|
|
1162
|
+
const parsed = parsePluginLogMessage(entry.message)
|
|
1163
|
+
|
|
1164
|
+
return (
|
|
1165
|
+
<li key={entry.id} className="relative rounded-lg border bg-background/70 p-3">
|
|
1166
|
+
{highlightedLogIds.includes(entry.id) ? <EntryHighlight /> : null}
|
|
1167
|
+
{parsed ? (
|
|
1168
|
+
<div className="space-y-2">
|
|
1169
|
+
<div className="flex items-start justify-between gap-3">
|
|
1170
|
+
<div className="min-w-0 space-y-1">
|
|
1171
|
+
<div className="flex min-w-0 items-center gap-2">
|
|
1172
|
+
<span
|
|
1173
|
+
className={cn(
|
|
1174
|
+
"inline-flex rounded-md border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide",
|
|
1175
|
+
getLogLevelClasses(parsed.level)
|
|
1176
|
+
)}
|
|
1177
|
+
>
|
|
1178
|
+
{parsed.level}
|
|
1179
|
+
</span>
|
|
1180
|
+
<span className="truncate font-mono text-[11px] text-muted-foreground">
|
|
1181
|
+
{parsed.target}
|
|
1182
|
+
</span>
|
|
1183
|
+
</div>
|
|
1184
|
+
</div>
|
|
1185
|
+
<div className="shrink-0 text-right text-[11px] text-muted-foreground">
|
|
1186
|
+
<div>{parsed.time}</div>
|
|
1187
|
+
<div>{parsed.date}</div>
|
|
1188
|
+
</div>
|
|
1189
|
+
</div>
|
|
1190
|
+
<p className="font-mono break-words text-foreground">{parsed.text}</p>
|
|
1191
|
+
</div>
|
|
1192
|
+
) : (
|
|
1193
|
+
<>
|
|
1194
|
+
<div className="mb-1 flex items-center justify-between gap-3">
|
|
1195
|
+
<Badge variant="outline">{entry.level}</Badge>
|
|
1196
|
+
<span className="text-[11px] text-muted-foreground">
|
|
1197
|
+
{formatTimestamp(entry.timestamp)}
|
|
1198
|
+
</span>
|
|
1199
|
+
</div>
|
|
1200
|
+
<p className="font-mono break-words text-foreground">
|
|
1201
|
+
{entry.message}
|
|
1202
|
+
</p>
|
|
1203
|
+
</>
|
|
1204
|
+
)}
|
|
1205
|
+
</li>
|
|
1206
|
+
)
|
|
1207
|
+
})}
|
|
1208
|
+
</ul>
|
|
1209
|
+
) : (
|
|
1210
|
+
<p className="text-xs text-muted-foreground">
|
|
1211
|
+
No captured plugin logs yet.
|
|
1212
|
+
</p>
|
|
1213
|
+
)}
|
|
1214
|
+
</DebugSection>
|
|
1215
|
+
</div>
|
|
1216
|
+
</TabsContent>
|
|
1217
|
+
|
|
1218
|
+
<TabsContent value="system" className="min-h-0 flex-1 overflow-hidden pt-2">
|
|
1219
|
+
<div className="h-full space-y-4 overflow-y-auto pr-1">
|
|
1220
|
+
<DebugSection
|
|
1221
|
+
title="Paths"
|
|
1222
|
+
description="Resolved Tauri application directories."
|
|
1223
|
+
>
|
|
1224
|
+
<div className="space-y-2">
|
|
1225
|
+
{[
|
|
1226
|
+
["App data", pathInfo.appDataDir],
|
|
1227
|
+
["App config", pathInfo.appConfigDir],
|
|
1228
|
+
["Resources", pathInfo.resourceDir],
|
|
1229
|
+
].map(([label, value]) => (
|
|
1230
|
+
<div
|
|
1231
|
+
key={label}
|
|
1232
|
+
className="grid grid-cols-[110px_minmax(0,1fr)_auto] items-start gap-3 text-xs"
|
|
1233
|
+
>
|
|
1234
|
+
<div className="text-muted-foreground">{label}</div>
|
|
1235
|
+
<div className="font-mono break-all text-foreground">
|
|
1236
|
+
{value ?? "Unavailable"}
|
|
1237
|
+
</div>
|
|
1238
|
+
<Button
|
|
1239
|
+
variant="ghost"
|
|
1240
|
+
size="sm"
|
|
1241
|
+
disabled={!value}
|
|
1242
|
+
onClick={() => value && void handleCopyText(value)}
|
|
1243
|
+
>
|
|
1244
|
+
<CopyIcon className="size-3.5" />
|
|
1245
|
+
Copy
|
|
1246
|
+
</Button>
|
|
1247
|
+
</div>
|
|
1248
|
+
))}
|
|
1249
|
+
</div>
|
|
1250
|
+
</DebugSection>
|
|
1251
|
+
|
|
1252
|
+
<DebugSection title="Webview" description="Current webview identity.">
|
|
1253
|
+
<KeyValueGrid entries={[["Current label", windowInfo.label]]} />
|
|
1254
|
+
</DebugSection>
|
|
1255
|
+
</div>
|
|
1256
|
+
</TabsContent>
|
|
1257
|
+
|
|
1258
|
+
<TabsContent value="errors" className="min-h-0 flex-1 overflow-hidden pt-2">
|
|
1259
|
+
<div className="h-full space-y-4 overflow-y-auto pr-1">
|
|
1260
|
+
<DebugSection
|
|
1261
|
+
title="Recent errors"
|
|
1262
|
+
description="Uncaught runtime errors and unhandled promise rejections."
|
|
1263
|
+
>
|
|
1264
|
+
{errors.length ? (
|
|
1265
|
+
<ul className="space-y-2 text-xs">
|
|
1266
|
+
{errors.map((entry) => (
|
|
1267
|
+
<li
|
|
1268
|
+
key={entry.id}
|
|
1269
|
+
className="rounded-lg border bg-background/70 p-3"
|
|
1270
|
+
>
|
|
1271
|
+
<div className="mb-1 flex items-center gap-2">
|
|
1272
|
+
<AlertTriangleIcon className="size-3.5 text-destructive" />
|
|
1273
|
+
<span className="font-medium">{entry.source}</span>
|
|
1274
|
+
<span className="text-muted-foreground">
|
|
1275
|
+
{formatTimestamp(entry.timestamp)}
|
|
1276
|
+
</span>
|
|
1277
|
+
</div>
|
|
1278
|
+
<p className="break-words text-muted-foreground">
|
|
1279
|
+
{entry.message}
|
|
1280
|
+
</p>
|
|
1281
|
+
</li>
|
|
1282
|
+
))}
|
|
1283
|
+
</ul>
|
|
1284
|
+
) : (
|
|
1285
|
+
<p className="text-xs text-muted-foreground">
|
|
1286
|
+
No captured runtime errors.
|
|
1287
|
+
</p>
|
|
1288
|
+
)}
|
|
1289
|
+
</DebugSection>
|
|
1290
|
+
</div>
|
|
1291
|
+
</TabsContent>
|
|
1292
|
+
|
|
1293
|
+
<div className="mt-4 flex shrink-0 flex-wrap gap-2 border-t py-3">
|
|
1294
|
+
<Button onClick={handleCopySnapshot} variant="outline" size="sm">
|
|
1295
|
+
<CopyIcon className="size-4" />
|
|
1296
|
+
{copied ? "Copied" : "Copy snapshot"}
|
|
1297
|
+
</Button>
|
|
1298
|
+
<Button onClick={() => window.location.reload()} variant="outline" size="sm">
|
|
1299
|
+
<RefreshCwIcon className="size-4" />
|
|
1300
|
+
Reload app
|
|
1301
|
+
</Button>
|
|
1302
|
+
</div>
|
|
1303
|
+
</Tabs>
|
|
1304
|
+
</>
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
const attachedPanelClassName = cn(
|
|
1308
|
+
"ui-selectable fixed z-50 flex overflow-hidden bg-popover text-sm text-popover-foreground shadow-lg",
|
|
1309
|
+
panelSide === "bottom"
|
|
1310
|
+
? "inset-x-0 bottom-0 flex-col border-t"
|
|
1311
|
+
: panelSide === "left"
|
|
1312
|
+
? "top-0 left-0 h-full flex-col border-r"
|
|
1313
|
+
: "top-0 right-0 h-full flex-col border-l"
|
|
1314
|
+
)
|
|
1315
|
+
|
|
1316
|
+
return (
|
|
1317
|
+
<>
|
|
1318
|
+
{attached ? (
|
|
1319
|
+
open ? (
|
|
1320
|
+
<div
|
|
1321
|
+
className={attachedPanelClassName}
|
|
1322
|
+
style={
|
|
1323
|
+
panelSide === "bottom"
|
|
1324
|
+
? { height: `${BOTTOM_PANEL_HEIGHT}px` }
|
|
1325
|
+
: { width: `${SIDE_PANEL_WIDTH}px` }
|
|
1326
|
+
}
|
|
1327
|
+
>
|
|
1328
|
+
{panelContent}
|
|
1329
|
+
</div>
|
|
1330
|
+
) : null
|
|
1331
|
+
) : panelSide === "bottom" ? (
|
|
1332
|
+
open ? (
|
|
1333
|
+
<div
|
|
1334
|
+
className="ui-selectable fixed inset-x-0 bottom-0 z-50 flex flex-col overflow-hidden border-t bg-popover text-sm text-popover-foreground shadow-lg"
|
|
1335
|
+
style={{ height: `${BOTTOM_PANEL_HEIGHT}px` }}
|
|
1336
|
+
>
|
|
1337
|
+
{panelContent}
|
|
1338
|
+
</div>
|
|
1339
|
+
) : null
|
|
1340
|
+
) : (
|
|
1341
|
+
<Sheet open={open} onOpenChange={setOpen}>
|
|
1342
|
+
<SheetContent
|
|
1343
|
+
side={panelSide}
|
|
1344
|
+
showCloseButton={false}
|
|
1345
|
+
className="ui-selectable flex h-full max-w-[92vw] flex-col gap-0 overflow-hidden p-0"
|
|
1346
|
+
style={{ width: `${SIDE_PANEL_WIDTH}px` }}
|
|
1347
|
+
>
|
|
1348
|
+
{panelContent}
|
|
1349
|
+
</SheetContent>
|
|
1350
|
+
</Sheet>
|
|
1351
|
+
)}
|
|
1352
|
+
</>
|
|
1353
|
+
)
|
|
1354
|
+
}
|