create-bubbles 0.1.11 → 0.1.13
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/dist/index.js +2 -1
- package/package.json +1 -1
- package/template-vp-monorepo-react-nestjs/.oxfmtrc.jsonc +8 -0
- package/template-vp-monorepo-react-nestjs/.oxlintrc.jsonc +3 -0
- package/template-vp-monorepo-react-nestjs/.specs//351/234/200/346/261/202.md +5 -0
- package/template-vp-monorepo-react-nestjs/.vite-hooks/commit-msg +1 -0
- package/template-vp-monorepo-react-nestjs/.vite-hooks/pre-commit +1 -0
- package/template-vp-monorepo-react-nestjs/.vscode/extensions.json +3 -0
- package/template-vp-monorepo-react-nestjs/README.md +29 -0
- package/template-vp-monorepo-react-nestjs/apps/service/.oxlintrc.jsonc +3 -0
- package/template-vp-monorepo-react-nestjs/apps/web/.env +1 -0
- package/template-vp-monorepo-react-nestjs/apps/web/.oxlintrc.jsonc +4 -0
- package/{template-vue-vite-biome → template-vp-monorepo-react-nestjs/apps/web}/index.html +4 -4
- package/template-vp-monorepo-react-nestjs/apps/web/package.json +39 -0
- package/template-vp-monorepo-react-nestjs/apps/web/public/favicon.svg +1 -0
- package/template-vp-monorepo-react-nestjs/apps/web/public/icons.svg +24 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/App.tsx +24 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/hero.png +0 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/react.svg +1 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/assets/vite.svg +1 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/components/Loading/PageLoading.tsx +11 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/main.tsx +5 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/pages/home/index.tsx +17 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/router/index.tsx +25 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/styles/index.css +7 -0
- package/template-vp-monorepo-react-nestjs/apps/web/src/types/auto-imports.d.ts +58 -0
- package/{template-vue-vite-biome → template-vp-monorepo-react-nestjs/apps/web}/tsconfig.json +5 -9
- package/template-vp-monorepo-react-nestjs/apps/web/vite.config.ts +32 -0
- package/template-vp-monorepo-react-nestjs/commitlint.config.js +0 -0
- package/template-vp-monorepo-react-nestjs/package.json +20 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/README.md +23 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/package.json +39 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/src/index.ts +3 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/tests/index.test.ts +6 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/tsconfig.json +20 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/tsdown.config.ts +9 -0
- package/template-vp-monorepo-react-nestjs/packages/utils/vite.config.ts +7 -0
- package/template-vp-monorepo-react-nestjs/pnpm-workspace.yaml +23 -0
- package/template-vp-monorepo-react-nestjs/tsconfig.json +9 -0
- package/template-vp-monorepo-react-nestjs/vite.config.ts +8 -0
- package/template-vp-react/.vscode/settings.json +11 -0
- package/template-vp-react/package.json +10 -10
- package/template-vp-react-shadcn/.env +1 -0
- package/template-vp-react-shadcn/.oxfmtrc.jsonc +8 -0
- package/template-vp-react-shadcn/.oxlintrc.jsonc +3 -0
- package/template-vp-react-shadcn/.vite-hooks/commit-msg +1 -0
- package/template-vp-react-shadcn/.vite-hooks/pre-commit +1 -0
- package/template-vp-react-shadcn/.vscode/extensions.json +3 -0
- package/template-vp-react-shadcn/.vscode/settings.json +12 -0
- package/template-vp-react-shadcn/agents.md +44 -0
- package/template-vp-react-shadcn/commitlint.config.js +1 -0
- package/template-vp-react-shadcn/components.json +25 -0
- package/template-vp-react-shadcn/index.html +13 -0
- package/template-vp-react-shadcn/package.json +56 -0
- package/template-vp-react-shadcn/public/favicon.svg +1 -0
- package/template-vp-react-shadcn/public/icons.svg +24 -0
- package/template-vp-react-shadcn/src/App.tsx +24 -0
- package/template-vp-react-shadcn/src/assets/hero.png +0 -0
- package/template-vp-react-shadcn/src/assets/react.svg +1 -0
- package/template-vp-react-shadcn/src/assets/vite.svg +1 -0
- package/template-vp-react-shadcn/src/components/Loading/PageLoading.tsx +11 -0
- package/template-vp-react-shadcn/src/components/Player/VideoJS/index.tsx +163 -0
- package/template-vp-react-shadcn/src/components/Player/index.ts +7 -0
- package/template-vp-react-shadcn/src/components/ui/button.tsx +67 -0
- package/template-vp-react-shadcn/src/components/ui/sonner.tsx +43 -0
- package/template-vp-react-shadcn/src/components/ui/spinner.tsx +17 -0
- package/template-vp-react-shadcn/src/hooks/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/lib/utils.ts +6 -0
- package/template-vp-react-shadcn/src/main.tsx +5 -0
- package/template-vp-react-shadcn/src/pages/home/index.tsx +96 -0
- package/template-vp-react-shadcn/src/router/index.tsx +25 -0
- package/template-vp-react-shadcn/src/router/modules/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/store/.gitkeep +0 -0
- package/template-vp-react-shadcn/src/styles/index.css +16 -0
- package/template-vp-react-shadcn/src/styles/shadcn.css +127 -0
- package/template-vp-react-shadcn/src/types/auto-imports.d.ts +58 -0
- package/template-vp-react-shadcn/src/utils/env/index.tsx +6 -0
- package/template-vp-react-shadcn/src/utils/request/alova-core/index.ts +276 -0
- package/template-vp-react-shadcn/src/utils/request/alova-core/utils.ts +24 -0
- package/template-vp-react-shadcn/src/utils/request/index.ts +48 -0
- package/template-vp-react-shadcn/src/utils/request/readme.md +176 -0
- package/template-vp-react-shadcn/tsconfig.json +32 -0
- package/template-vp-react-shadcn/vite.config.ts +35 -0
- package/template-vue-vite-eslint/package.json +29 -33
- package/template-vue-vite-eslint/src/main.ts +0 -1
- package/template-vue-vite-eslint/src/styles/index.scss +0 -3
- package/template-vue-vite-eslint/src/types/components.d.ts +0 -4
- package/template-vue-vite-eslint/src/utils/request/index.ts +4 -4
- package/template-vue-vite-eslint/vite.config.ts +2 -4
- package/template-vue-rsbuild-biome/.env +0 -5
- package/template-vue-rsbuild-biome/.env.development +0 -1
- package/template-vue-rsbuild-biome/.env.production +0 -1
- package/template-vue-rsbuild-biome/.prettierignore +0 -4
- package/template-vue-rsbuild-biome/.prettierrc +0 -18
- package/template-vue-rsbuild-biome/.vscode/settings.json +0 -13
- package/template-vue-rsbuild-biome/README.md +0 -29
- package/template-vue-rsbuild-biome/biome.json +0 -109
- package/template-vue-rsbuild-biome/index.html +0 -7
- package/template-vue-rsbuild-biome/lefthook.yml +0 -11
- package/template-vue-rsbuild-biome/package.json +0 -36
- package/template-vue-rsbuild-biome/rsbuild.config.ts +0 -41
- package/template-vue-rsbuild-biome/src/App.vue +0 -3
- package/template-vue-rsbuild-biome/src/index.ts +0 -13
- package/template-vue-rsbuild-biome/src/router/guard/index.tsx +0 -6
- package/template-vue-rsbuild-biome/src/router/guard/permissionGuard.ts +0 -8
- package/template-vue-rsbuild-biome/src/router/index.tsx +0 -14
- package/template-vue-rsbuild-biome/src/router/modules/index.tsx +0 -10
- package/template-vue-rsbuild-biome/src/store/index.ts +0 -7
- package/template-vue-rsbuild-biome/src/store/modules/user.ts +0 -17
- package/template-vue-rsbuild-biome/src/styles/index.css +0 -16
- package/template-vue-rsbuild-biome/src/types/auto-import.d.ts +0 -78
- package/template-vue-rsbuild-biome/src/types/components.d.ts +0 -15
- package/template-vue-rsbuild-biome/src/types/env.d.ts +0 -17
- package/template-vue-rsbuild-biome/src/utils/env.ts +0 -10
- package/template-vue-rsbuild-biome/src/utils/request/core/index.ts +0 -166
- package/template-vue-rsbuild-biome/src/utils/request/core/utils.ts +0 -38
- package/template-vue-rsbuild-biome/src/utils/request/index.ts +0 -39
- package/template-vue-rsbuild-biome/src/views/home/index.vue +0 -14
- package/template-vue-rsbuild-biome/tsconfig.json +0 -29
- package/template-vue-rsbuild-biome/uno.config.ts +0 -9
- package/template-vue-vite-biome/.env +0 -4
- package/template-vue-vite-biome/.env.development +0 -1
- package/template-vue-vite-biome/.env.production +0 -1
- package/template-vue-vite-biome/.gitlab-ci.yml +0 -84
- package/template-vue-vite-biome/.vscode/settings.json +0 -10
- package/template-vue-vite-biome/README.md +0 -3
- package/template-vue-vite-biome/biome.json +0 -109
- package/template-vue-vite-biome/commitlint.config.js +0 -1
- package/template-vue-vite-biome/lefthook.yml +0 -11
- package/template-vue-vite-biome/package.json +0 -50
- package/template-vue-vite-biome/public/vite.svg +0 -1
- package/template-vue-vite-biome/src/App.vue +0 -19
- package/template-vue-vite-biome/src/assets/icon/vue.svg +0 -1
- package/template-vue-vite-biome/src/components/Icon/svg-icon.vue +0 -29
- package/template-vue-vite-biome/src/layout/default/index.vue +0 -3
- package/template-vue-vite-biome/src/main.ts +0 -15
- package/template-vue-vite-biome/src/router/guard/index.ts +0 -7
- package/template-vue-vite-biome/src/router/guard/permissionGuard.ts +0 -13
- package/template-vue-vite-biome/src/router/index.ts +0 -17
- package/template-vue-vite-biome/src/router/modules/index.ts +0 -31
- package/template-vue-vite-biome/src/store/index.ts +0 -10
- package/template-vue-vite-biome/src/store/modules/user.ts +0 -17
- package/template-vue-vite-biome/src/styles/element-plus-variables.css +0 -4
- package/template-vue-vite-biome/src/styles/index.scss +0 -31
- package/template-vue-vite-biome/src/styles/variables.scss +0 -3
- package/template-vue-vite-biome/src/types/vite-env.d.ts +0 -13
- package/template-vue-vite-biome/src/utils/env.ts +0 -10
- package/template-vue-vite-biome/src/utils/request/core/index.ts +0 -166
- package/template-vue-vite-biome/src/utils/request/core/utils.ts +0 -38
- package/template-vue-vite-biome/src/utils/request/index.ts +0 -39
- package/template-vue-vite-biome/src/views/home/index.vue +0 -16
- package/template-vue-vite-biome/src/views/login/index.vue +0 -11
- package/template-vue-vite-biome/src/views/model/index.vue +0 -7
- package/template-vue-vite-biome/uno.config.ts +0 -10
- package/template-vue-vite-biome/vite.config.ts +0 -51
- package/template-vue-vite-eslint/.vscode/settings.json +0 -62
- package/template-vue-vite-eslint/src/styles/element-plus-variables.css +0 -3
- package/template-vue-vite-eslint/src/styles/plus-pro-components-variables.css +0 -3
- package/template-vue-vite-eslint/src/types/index.d.ts +0 -1
- /package/{template-vue-rsbuild-biome/public → template-vp-monorepo-react-nestjs/apps/web/src/router/modules}/.gitkeep +0 -0
- /package/{template-vue-vite-biome/src/styles/font.scss → template-vp-react-shadcn/src/api/.gitkeep} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Slot } from "radix-ui";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
13
|
+
outline:
|
|
14
|
+
"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
15
|
+
secondary:
|
|
16
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
17
|
+
ghost:
|
|
18
|
+
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
19
|
+
destructive:
|
|
20
|
+
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default:
|
|
25
|
+
"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
26
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
27
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
28
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
29
|
+
icon: "size-8",
|
|
30
|
+
"icon-xs":
|
|
31
|
+
"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
32
|
+
"icon-sm":
|
|
33
|
+
"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
34
|
+
"icon-lg": "size-9",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
size: "default",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
function Button({
|
|
45
|
+
className,
|
|
46
|
+
variant = "default",
|
|
47
|
+
size = "default",
|
|
48
|
+
asChild = false,
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<"button"> &
|
|
51
|
+
VariantProps<typeof buttonVariants> & {
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
}) {
|
|
54
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Comp
|
|
58
|
+
data-slot="button"
|
|
59
|
+
data-variant={variant}
|
|
60
|
+
data-size={size}
|
|
61
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useTheme } from "next-themes";
|
|
2
|
+
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
|
3
|
+
import {
|
|
4
|
+
CircleCheckIcon,
|
|
5
|
+
InfoIcon,
|
|
6
|
+
TriangleAlertIcon,
|
|
7
|
+
OctagonXIcon,
|
|
8
|
+
Loader2Icon,
|
|
9
|
+
} from "lucide-react";
|
|
10
|
+
|
|
11
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
12
|
+
const { theme = "system" } = useTheme();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Sonner
|
|
16
|
+
theme={theme as ToasterProps["theme"]}
|
|
17
|
+
className="toaster group"
|
|
18
|
+
icons={{
|
|
19
|
+
success: <CircleCheckIcon className="size-4" />,
|
|
20
|
+
info: <InfoIcon className="size-4" />,
|
|
21
|
+
warning: <TriangleAlertIcon className="size-4" />,
|
|
22
|
+
error: <OctagonXIcon className="size-4" />,
|
|
23
|
+
loading: <Loader2Icon className="size-4 animate-spin" />,
|
|
24
|
+
}}
|
|
25
|
+
style={
|
|
26
|
+
{
|
|
27
|
+
"--normal-bg": "var(--popover)",
|
|
28
|
+
"--normal-text": "var(--popover-foreground)",
|
|
29
|
+
"--normal-border": "var(--border)",
|
|
30
|
+
"--border-radius": "var(--radius)",
|
|
31
|
+
} as React.CSSProperties
|
|
32
|
+
}
|
|
33
|
+
toastOptions={{
|
|
34
|
+
classNames: {
|
|
35
|
+
toast: "cn-toast",
|
|
36
|
+
},
|
|
37
|
+
}}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { Toaster };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Loader2Icon } from "lucide-react";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
function Spinner({ className, ...props }: ComponentProps<"svg">) {
|
|
7
|
+
return (
|
|
8
|
+
<Loader2Icon
|
|
9
|
+
role="status"
|
|
10
|
+
aria-label="Loading"
|
|
11
|
+
className={cn("size-4 animate-spin", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Spinner };
|
|
File without changes
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PlayCircle } from "lucide-react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
import { VideoJS, VIDEO_JS_SOURCE_TYPES, type VideoJSSourceType } from "@/components/Player";
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
const HOME_TEXT = {
|
|
9
|
+
player: "VideoJS 播放器",
|
|
10
|
+
title: "HLS / MP4 播放示例",
|
|
11
|
+
play: "播放",
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
type DemoSource = {
|
|
15
|
+
id: Exclude<VideoJSSourceType, "auto" | "native">;
|
|
16
|
+
name: string;
|
|
17
|
+
src: string;
|
|
18
|
+
type: string;
|
|
19
|
+
poster: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const DEMO_SOURCES: DemoSource[] = [
|
|
23
|
+
{
|
|
24
|
+
id: VIDEO_JS_SOURCE_TYPES.HLS,
|
|
25
|
+
name: "HLS",
|
|
26
|
+
src: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
|
|
27
|
+
type: "application/vnd.apple.mpegurl",
|
|
28
|
+
poster: "https://image.mux.com/x36xhzz/thumbnail.jpg?time=0",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: VIDEO_JS_SOURCE_TYPES.MP4,
|
|
32
|
+
name: "MP4",
|
|
33
|
+
src: "https://media.w3.org/2010/05/sintel/trailer.mp4",
|
|
34
|
+
type: "video/mp4",
|
|
35
|
+
poster: "https://media.w3.org/2010/05/sintel/poster.png",
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const Home = () => {
|
|
40
|
+
const [activeSourceType, setActiveSourceType] = useState<DemoSource["id"]>(
|
|
41
|
+
VIDEO_JS_SOURCE_TYPES.HLS,
|
|
42
|
+
);
|
|
43
|
+
const activeSource =
|
|
44
|
+
DEMO_SOURCES.find((source) => source.id === activeSourceType) ?? DEMO_SOURCES[0];
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<main className="min-h-screen bg-zinc-950 px-4 py-6 text-white sm:px-6 lg:px-8">
|
|
48
|
+
<section className="mx-auto flex w-full max-w-6xl flex-col gap-5">
|
|
49
|
+
<div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
|
|
50
|
+
<div className="space-y-2">
|
|
51
|
+
<p className="text-sm font-medium text-emerald-300">{HOME_TEXT.player}</p>
|
|
52
|
+
<h1 className="max-w-2xl text-3xl font-semibold tracking-normal text-white sm:text-4xl">
|
|
53
|
+
{HOME_TEXT.title}
|
|
54
|
+
</h1>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div className="flex rounded-lg border border-white/10 bg-white/5 p-1">
|
|
58
|
+
{DEMO_SOURCES.map((source) => {
|
|
59
|
+
const isActive = source.id === activeSource.id;
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<Button
|
|
63
|
+
key={source.id}
|
|
64
|
+
type="button"
|
|
65
|
+
variant="ghost"
|
|
66
|
+
className={cn(
|
|
67
|
+
"h-9 gap-2 rounded-md px-4 text-white hover:bg-white/10 hover:text-white",
|
|
68
|
+
isActive && "bg-white text-zinc-950 hover:bg-white hover:text-zinc-950",
|
|
69
|
+
)}
|
|
70
|
+
onClick={() => setActiveSourceType(source.id)}
|
|
71
|
+
>
|
|
72
|
+
<PlayCircle className="size-4" />
|
|
73
|
+
{source.name}
|
|
74
|
+
</Button>
|
|
75
|
+
);
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<VideoJS
|
|
81
|
+
key={activeSource.src}
|
|
82
|
+
src={activeSource.src}
|
|
83
|
+
type={activeSource.type}
|
|
84
|
+
sourceType={activeSource.id}
|
|
85
|
+
poster={activeSource.poster}
|
|
86
|
+
preload="metadata"
|
|
87
|
+
className="border border-white/10 shadow-2xl shadow-black/40"
|
|
88
|
+
/>
|
|
89
|
+
</section>
|
|
90
|
+
|
|
91
|
+
<Button>{HOME_TEXT.play}</Button>
|
|
92
|
+
</main>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default Home;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createBrowserRouter, Navigate, type RouteObject } from "react-router";
|
|
2
|
+
|
|
3
|
+
export const lazyLoad = (path: string, fileName = "index") => {
|
|
4
|
+
const Module = lazy(() => import(`@/pages/${path}/${fileName}.tsx`));
|
|
5
|
+
return <Module />;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const routes: RouteObject[] = [
|
|
9
|
+
{
|
|
10
|
+
path: "/",
|
|
11
|
+
id: "index",
|
|
12
|
+
element: <Navigate to={"/home"} />,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
path: "/home",
|
|
16
|
+
id: "home",
|
|
17
|
+
element: lazyLoad("home"),
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export const router = createBrowserRouter(routes, {
|
|
22
|
+
basename: "/",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const navigator = router.navigate;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "shadcn/tailwind.css";
|
|
2
|
+
|
|
3
|
+
@custom-variant dark (&:is(.dark *));
|
|
4
|
+
|
|
5
|
+
@theme inline {
|
|
6
|
+
--font-heading: var(--font-sans);
|
|
7
|
+
--font-sans: "Geist Variable", sans-serif;
|
|
8
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
9
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
10
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
11
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
12
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
13
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
14
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
15
|
+
--color-sidebar: var(--sidebar);
|
|
16
|
+
--color-chart-5: var(--chart-5);
|
|
17
|
+
--color-chart-4: var(--chart-4);
|
|
18
|
+
--color-chart-3: var(--chart-3);
|
|
19
|
+
--color-chart-2: var(--chart-2);
|
|
20
|
+
--color-chart-1: var(--chart-1);
|
|
21
|
+
--color-ring: var(--ring);
|
|
22
|
+
--color-input: var(--input);
|
|
23
|
+
--color-border: var(--border);
|
|
24
|
+
--color-destructive: var(--destructive);
|
|
25
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
26
|
+
--color-accent: var(--accent);
|
|
27
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
28
|
+
--color-muted: var(--muted);
|
|
29
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
30
|
+
--color-secondary: var(--secondary);
|
|
31
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
32
|
+
--color-primary: var(--primary);
|
|
33
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
34
|
+
--color-popover: var(--popover);
|
|
35
|
+
--color-card-foreground: var(--card-foreground);
|
|
36
|
+
--color-card: var(--card);
|
|
37
|
+
--color-foreground: var(--foreground);
|
|
38
|
+
--color-background: var(--background);
|
|
39
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
40
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
41
|
+
--radius-lg: var(--radius);
|
|
42
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
43
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
44
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
45
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root {
|
|
49
|
+
--background: oklch(1 0 0);
|
|
50
|
+
--foreground: oklch(0.145 0 0);
|
|
51
|
+
--card: oklch(1 0 0);
|
|
52
|
+
--card-foreground: oklch(0.145 0 0);
|
|
53
|
+
--popover: oklch(1 0 0);
|
|
54
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
55
|
+
--primary: rgb(47 123 255);
|
|
56
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
57
|
+
--secondary: oklch(0.97 0 0);
|
|
58
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
59
|
+
--muted: oklch(0.97 0 0);
|
|
60
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
61
|
+
--accent: oklch(0.97 0 0);
|
|
62
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
63
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
64
|
+
--border: oklch(0.922 0 0);
|
|
65
|
+
--input: oklch(0.922 0 0);
|
|
66
|
+
--ring: rgb(47 123 255);
|
|
67
|
+
--chart-1: oklch(0.87 0 0);
|
|
68
|
+
--chart-2: oklch(0.556 0 0);
|
|
69
|
+
--chart-3: oklch(0.439 0 0);
|
|
70
|
+
--chart-4: oklch(0.371 0 0);
|
|
71
|
+
--chart-5: oklch(0.269 0 0);
|
|
72
|
+
--radius: 0.625rem;
|
|
73
|
+
--sidebar: oklch(0.985 0 0);
|
|
74
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
75
|
+
--sidebar-primary: rgb(47 123 255);
|
|
76
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
77
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
78
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
79
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
80
|
+
--sidebar-ring: rgb(47 123 255);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dark {
|
|
84
|
+
--background: oklch(0.145 0 0);
|
|
85
|
+
--foreground: oklch(0.985 0 0);
|
|
86
|
+
--card: oklch(0.205 0 0);
|
|
87
|
+
--card-foreground: oklch(0.985 0 0);
|
|
88
|
+
--popover: oklch(0.205 0 0);
|
|
89
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
90
|
+
--primary: rgb(47 123 255);
|
|
91
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--secondary: oklch(0.269 0 0);
|
|
93
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
94
|
+
--muted: oklch(0.269 0 0);
|
|
95
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
96
|
+
--accent: oklch(0.269 0 0);
|
|
97
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
98
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
99
|
+
--border: oklch(1 0 0 / 10%);
|
|
100
|
+
--input: oklch(1 0 0 / 15%);
|
|
101
|
+
--ring: rgb(47 123 255);
|
|
102
|
+
--chart-1: oklch(0.87 0 0);
|
|
103
|
+
--chart-2: oklch(0.556 0 0);
|
|
104
|
+
--chart-3: oklch(0.439 0 0);
|
|
105
|
+
--chart-4: oklch(0.371 0 0);
|
|
106
|
+
--chart-5: oklch(0.269 0 0);
|
|
107
|
+
--sidebar: oklch(0.205 0 0);
|
|
108
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-primary: rgb(47 123 255);
|
|
110
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
111
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
112
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
113
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
114
|
+
--sidebar-ring: rgb(47 123 255);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@layer base {
|
|
118
|
+
* {
|
|
119
|
+
@apply border-border outline-ring/50;
|
|
120
|
+
}
|
|
121
|
+
body {
|
|
122
|
+
@apply bg-background text-foreground;
|
|
123
|
+
}
|
|
124
|
+
html {
|
|
125
|
+
@apply font-sans;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
// biome-ignore lint: disable
|
|
7
|
+
export {}
|
|
8
|
+
declare global {
|
|
9
|
+
const Activity: typeof import('react').Activity
|
|
10
|
+
const Fragment: typeof import('react').Fragment
|
|
11
|
+
const Suspense: typeof import('react').Suspense
|
|
12
|
+
const cache: typeof import('react').cache
|
|
13
|
+
const cacheSignal: typeof import('react').cacheSignal
|
|
14
|
+
const createContext: typeof import('react').createContext
|
|
15
|
+
const createPortal: typeof import('react-dom').createPortal
|
|
16
|
+
const createRef: typeof import('react').createRef
|
|
17
|
+
const flushSync: typeof import('react-dom').flushSync
|
|
18
|
+
const forwardRef: typeof import('react').forwardRef
|
|
19
|
+
const lazy: typeof import('react').lazy
|
|
20
|
+
const memo: typeof import('react').memo
|
|
21
|
+
const preconnect: typeof import('react-dom').preconnect
|
|
22
|
+
const prefetchDNS: typeof import('react-dom').prefetchDNS
|
|
23
|
+
const preinit: typeof import('react-dom').preinit
|
|
24
|
+
const preinitModule: typeof import('react-dom').preinitModule
|
|
25
|
+
const preload: typeof import('react-dom').preload
|
|
26
|
+
const preloadModule: typeof import('react-dom').preloadModule
|
|
27
|
+
const startTransition: typeof import('react').startTransition
|
|
28
|
+
const use: typeof import('react').use
|
|
29
|
+
const useActionState: typeof import('react').useActionState
|
|
30
|
+
const useCallback: typeof import('react').useCallback
|
|
31
|
+
const useContext: typeof import('react').useContext
|
|
32
|
+
const useDebugValue: typeof import('react').useDebugValue
|
|
33
|
+
const useDeferredValue: typeof import('react').useDeferredValue
|
|
34
|
+
const useEffect: typeof import('react').useEffect
|
|
35
|
+
const useEffectEvent: typeof import('react').useEffectEvent
|
|
36
|
+
const useFormStatus: typeof import('react-dom').useFormStatus
|
|
37
|
+
const useHref: typeof import('react-router').useHref
|
|
38
|
+
const useId: typeof import('react').useId
|
|
39
|
+
const useImperativeHandle: typeof import('react').useImperativeHandle
|
|
40
|
+
const useInRouterContext: typeof import('react-router').useInRouterContext
|
|
41
|
+
const useInsertionEffect: typeof import('react').useInsertionEffect
|
|
42
|
+
const useLayoutEffect: typeof import('react').useLayoutEffect
|
|
43
|
+
const useLocation: typeof import('react-router').useLocation
|
|
44
|
+
const useMemo: typeof import('react').useMemo
|
|
45
|
+
const useNavigate: typeof import('react-router').useNavigate
|
|
46
|
+
const useNavigationType: typeof import('react-router').useNavigationType
|
|
47
|
+
const useOptimistic: typeof import('react').useOptimistic
|
|
48
|
+
const useOutlet: typeof import('react-router').useOutlet
|
|
49
|
+
const useOutletContext: typeof import('react-router').useOutletContext
|
|
50
|
+
const useParams: typeof import('react-router').useParams
|
|
51
|
+
const useReducer: typeof import('react').useReducer
|
|
52
|
+
const useRef: typeof import('react').useRef
|
|
53
|
+
const useResolvedPath: typeof import('react-router').useResolvedPath
|
|
54
|
+
const useRoutes: typeof import('react-router').useRoutes
|
|
55
|
+
const useState: typeof import('react').useState
|
|
56
|
+
const useSyncExternalStore: typeof import('react').useSyncExternalStore
|
|
57
|
+
const useTransition: typeof import('react').useTransition
|
|
58
|
+
}
|