repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/tabs.tsx
src/components/ui/tabs.tsx
"use client" import * as TabsPrimitive from "@radix-ui/react-tabs" import * as React from "react" import { cn } from "@/lib/utils" function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) { return ( <TabsPrimitive.Root data-slot="tabs" className={cn("flex flex-col...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/button.tsx
src/components/ui/button.tsx
import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import * as React from "react" import { cn } from "@/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all dis...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/popover.tsx
src/components/ui/popover.tsx
"use client" import * as PopoverPrimitive from "@radix-ui/react-popover" import * as React from "react" import { cn } from "@/lib/utils" const Popover = PopoverPrimitive.Root const PopoverTrigger = PopoverPrimitive.Trigger const PopoverContent = React.forwardRef< React.ElementRef<typeof PopoverPrimitive.Content>...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/cookie-consent.tsx
src/components/ui/cookie-consent.tsx
"use client" import { AnimatePresence, motion } from "framer-motion" import { Cookie, X } from "lucide-react" import Link from "next/link" import * as React from "react" import { Button } from "@/components/ui/button" import { cn } from "@/lib/utils" const COOKIE_CONSENT_KEY = "cookie-consent" export type CookieCon...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/textarea.tsx
src/components/ui/textarea.tsx
import * as React from "react" import { cn } from "@/lib/utils" function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { return ( <textarea data-slot="textarea" className={cn( "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-r...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/dropdown-menu.tsx
src/components/ui/dropdown-menu.tsx
"use client" import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) { ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/switch.tsx
src/components/ui/switch.tsx
"use client" import * as SwitchPrimitive from "@radix-ui/react-switch" import * as React from "react" import { cn } from "@/lib/utils" function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) { return ( <SwitchPrimitive.Root data-slot="switch" className={cn( ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/separator.tsx
src/components/ui/separator.tsx
"use client" import * as SeparatorPrimitive from "@radix-ui/react-separator" import * as React from "react" import { cn } from "@/lib/utils" function Separator({ className, orientation = "horizontal", decorative = true, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>) { return ( <Separ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/sheet.tsx
src/components/ui/sheet.tsx
"use client" import * as SheetPrimitive from "@radix-ui/react-dialog" import { XIcon } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) { return <SheetPrimitive.Root data-slot="sheet" {...props} /> } ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/scroll-area.tsx
src/components/ui/scroll-area.tsx
"use client" import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" import * as React from "react" import { cn } from "@/lib/utils" function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) { return ( <ScrollAreaPrimitive.Root data-slo...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/card.tsx
src/components/ui/card.tsx
import * as React from "react" import { cn } from "@/lib/utils" function Card({ className, ...props }: React.ComponentProps<"div">) { return ( <div data-slot="card" className={cn( "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className )} ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/input-clear-form.tsx
src/components/ui/input-clear-form.tsx
"use client" import { X } from "lucide-react" import * as React from "react" import { Controller,useFormContext } from "react-hook-form" import { Button } from "@/components/ui/button" import { Input, InputProps } from "@/components/ui/input" import { cn } from "@/lib/utils" interface InputClearFormProps extends Omi...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/badge.tsx
src/components/ui/badge.tsx
import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import * as React from "react" import { cn } from "@/lib/utils" const badgeVariants = cva( "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowra...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/skeleton.tsx
src/components/ui/skeleton.tsx
import { cn } from "@/lib/utils" function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) { return ( <div className={cn("animate-pulse rounded-md bg-muted", className)} {...props} /> ) } export { Skeleton }
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/tooltip.tsx
src/components/ui/tooltip.tsx
"use client" import * as TooltipPrimitive from "@radix-ui/react-tooltip" import * as React from "react" import { cn } from "@/lib/utils" function TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) { return ( <TooltipPrimitive.Provider data-slot="t...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/input-clear.tsx
src/components/ui/input-clear.tsx
"use client" import { X } from "lucide-react" import * as React from "react" import { Button } from "@/components/ui/button" import { Input, InputProps } from "@/components/ui/input" import { cn } from "@/lib/utils" interface InputClearProps extends Omit<InputProps, "onChange"> { value?: string onChange?: (value...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/select.tsx
src/components/ui/select.tsx
"use client" import * as SelectPrimitive from "@radix-ui/react-select" import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) { return <SelectPrimitiv...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/back-to-top.tsx
src/components/ui/back-to-top.tsx
"use client" import { AnimatePresence, motion, useMotionValue, useSpring, useTransform } from "framer-motion" import { ArrowUp } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" interface BackToTopProps { /** 显示阈值(滚动距离,默认 300px) */ threshold?: number /** 滚动动画持续时间(毫秒,默认 500) *...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/alert-dialog.tsx
src/components/ui/alert-dialog.tsx
"use client" import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" import * as React from "react" import { buttonVariants } from "@/components/ui/button" import { cn } from "@/lib/utils" function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) { return <AlertDialo...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/command.tsx
src/components/ui/command.tsx
"use client" import { Command as CommandPrimitive } from "cmdk" import { SearchIcon } from "lucide-react" import * as React from "react" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@/components/ui/dialog" import { cn } from "@/lib/utils" function Command({ classN...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/input.tsx
src/components/ui/input.tsx
import * as React from "react" import { cn } from "@/lib/utils" export type InputProps = React.ComponentProps<"input"> function Input({ className, type, ...props }: InputProps) { return ( <input type={type} data-slot="input" className={cn( "file:text-foreground placeholder:text-muted-...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/checkbox.tsx
src/components/ui/checkbox.tsx
"use client" import * as CheckboxPrimitive from "@radix-ui/react-checkbox" import { CheckIcon } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) { return ( <CheckboxPrimitive.R...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/components/ui/context-menu.tsx
src/components/ui/context-menu.tsx
"use client" import * as ContextMenuPrimitive from "@radix-ui/react-context-menu" import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" import * as React from "react" import { cn } from "@/lib/utils" const ContextMenu = ContextMenuPrimitive.Root const ContextMenuTrigger = React.forwardRef< React....
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/actions/calendar.ts
src/actions/calendar.ts
"use server" import { revalidatePath, revalidateTag } from "next/cache" import { cookies } from "next/headers" import type { CalendarEvent } from "@/lib/api/types" const API_BASE = process.env.API_URL || process.env.NEXT_PUBLIC_API_URL || "/api" const IS_MOCK_MODE = process.env.NEXT_PUBLIC_MOCK === "true" // ======...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/actions/file.ts
src/actions/file.ts
"use server" import { revalidatePath, revalidateTag } from "next/cache" import { cookies } from "next/headers" import type { FileItem, StorageInfo } from "@/lib/api/types" const API_BASE = process.env.API_URL || process.env.NEXT_PUBLIC_API_URL || "/api" const IS_MOCK_MODE = process.env.NEXT_PUBLIC_MOCK === "true" /...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/actions/document.ts
src/actions/document.ts
"use server" import { revalidatePath, revalidateTag } from "next/cache" import { cookies } from "next/headers" import type { Document } from "@/lib/api/types" const API_BASE = process.env.API_URL || process.env.NEXT_PUBLIC_API_URL || "/api" const IS_MOCK_MODE = process.env.NEXT_PUBLIC_MOCK === "true" // ===========...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/actions/user.ts
src/actions/user.ts
"use server" import { revalidatePath, revalidateTag } from "next/cache" import { cookies } from "next/headers" import { adaptBackendUser } from "@/lib/api/adapters" import type { BackendUser } from "@/lib/api/backend-types" import type { User } from "@/lib/api/types" const API_BASE = process.env.API_URL || process.e...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/actions/index.ts
src/actions/index.ts
/** * Server Actions 统一导出 * * 使用示例: * ```tsx * import { loginAction, createUserAction } from "@/actions" * * // 在表单中使用 * async function handleSubmit(formData: FormData) { * const result = await loginAction({ * email: formData.get("email") as string, * password: formData.get("password") as string, ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/dashboard-store.ts
src/stores/dashboard-store.ts
import type { Layout } from "react-grid-layout" import { create } from "zustand" import { persist } from "zustand/middleware" // 仪表盘小部件类型 export type WidgetType = | "stats" | "chart-line" | "chart-bar" | "chart-pie" | "recent-users" | "notifications" | "tasks" | "calendar" | "quick-actions" export i...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/tabs-store.ts
src/stores/tabs-store.ts
import { create } from "zustand" import { persist } from "zustand/middleware" export interface Tab { id: string title: string path: string icon?: string closable?: boolean } interface TabsState { tabs: Tab[] activeTabId: string | null // 操作 addTab: (tab: Omit<Tab, "id">) => string removeTab: (id: ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/navigation-store.ts
src/stores/navigation-store.ts
import { create } from "zustand" export type NavigationSource = | "command" | "sidebar" | "tabbar" | "tabbar-refresh" | "header" | "footer" | "other" interface NavigationState { pendingPath: string | null label: string | null source: NavigationSource | null startNavigation: (options: { path:...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/auth-store.ts
src/stores/auth-store.ts
import { create } from "zustand" import { createJSONStorage, persist } from "zustand/middleware" import { AccountWithToken, authApi, LoginRequest, RegisterRequest, tokenStorage, } from "@/lib/api/client" interface AuthState { user: AccountWithToken | null accounts: AccountWithToken[] activeAccountId: ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/ui-settings-store.ts
src/stores/ui-settings-store.ts
import { create } from "zustand" import { persist } from "zustand/middleware" export type SkinPreset = | "default" | "blue" | "emerald" | "amber" | "violet" | "rose" | "teal" | "slate" | "ocean" | "sunset" | "aurora" interface UiSettingsState { skin: SkinPreset showFooter: boolean showTabB...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/stores/error-store.ts
src/stores/error-store.ts
import { create } from "zustand" export type ErrorSource = "error" | "promise" | "manual" export interface ErrorLog { id: string message: string detail?: string timestamp: number source: ErrorSource read?: boolean } interface ErrorStore { errors: ErrorLog[] addError: (log: Omit<ErrorLog, "id" | "time...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/__tests__/setup.ts
src/__tests__/setup.ts
import "@testing-library/jest-dom/vitest" import { cleanup } from "@testing-library/react" import { afterEach, vi } from "vitest" // 每个测试后自动清理 afterEach(() => { cleanup() }) // Mock next/navigation vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn(), replace: vi.fn(), prefetch: vi.f...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/__tests__/test-utils.tsx
src/__tests__/test-utils.tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query" import { render, type RenderOptions } from "@testing-library/react" import * as React from "react" import { ThemeProvider } from "@/providers/theme-provider" /** * 创建测试用的 QueryClient */ export function createTestQueryClient() { return new Qu...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/__tests__/config/routes.test.ts
src/__tests__/config/routes.test.ts
import { describe, expect, it } from "vitest" import { findPermissionRule, getMenuPermission, getRoutePermission, getRouteTitle, isAuthRoute, isPublicRoute, MENU_ITEMS, PERMISSION_RULES, PUBLIC_ROUTES, ROUTE_PERMISSIONS, ROUTE_TITLES, } from "@/config/routes" describe("routes config", () => { ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/types/view-transitions.d.ts
src/types/view-transitions.d.ts
// View Transitions API 类型声明 interface ViewTransition { finished: Promise<void> ready: Promise<void> updateCallbackDone: Promise<void> skipTransition(): void } interface Document { startViewTransition(callback: () => void | Promise<void>): ViewTransition }
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/error-provider.tsx
src/providers/error-provider.tsx
"use client" import * as React from "react" import { useErrorStore } from "@/stores/error-store" interface ErrorProviderProps { children: React.ReactNode } export function ErrorProvider({ children }: ErrorProviderProps) { const addError = useErrorStore((state) => state.addError) React.useEffect(() => { c...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/auth-provider.tsx
src/providers/auth-provider.tsx
"use client" import { Loader2 } from "lucide-react" import { usePathname, useRouter } from "next/navigation" import * as React from "react" import { useAuthStore } from "@/stores/auth-store" interface AuthProviderProps { children: React.ReactNode } // 公开路由列表 const publicRoutes = [ "/login", "/register", "/f...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/keep-alive-provider.tsx
src/providers/keep-alive-provider.tsx
"use client" import { usePathname } from "next/navigation" import * as React from "react" import { useTabsStore } from "@/stores/tabs-store" interface CacheItem { key: string element: React.ReactElement scrollPosition: number } interface KeepAliveContextType { cachedPages: Map<string, CacheItem> activePat...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/permission-provider.tsx
src/providers/permission-provider.tsx
"use client" import * as React from "react" import type { AccountWithToken } from "@/lib/api/client" import { mockRoles } from "@/lib/api/mock-data" import type { Permission, Role } from "@/lib/api/types" import { useAuthStore } from "@/stores/auth-store" // 权限上下文 interface PermissionContextType { permissions: Per...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/app-providers.tsx
src/providers/app-providers.tsx
"use client" import * as React from "react" import { MockProvider } from "@/components/mock-provider" import { TdkManager } from "@/components/tdk-manager" import { CookieConsent } from "@/components/ui/cookie-consent" import { AuthProvider } from "@/providers/auth-provider" import { ErrorProvider } from "@/providers...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/query-provider.tsx
src/providers/query-provider.tsx
"use client" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" import * as React from "react" /** * 查询缓存配置 * 根据数据类型设置不同的缓存策略 */ export const QUERY_CACHE_CONFIG = { /** 静态数据:角色、权限等不常变化的数据 */ static: { staleTime: 30 * 60 * 1000, // 30分钟 gcTime: 60 * 60 * 1000, // 60分钟 }, /**...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/theme-provider.tsx
src/providers/theme-provider.tsx
"use client" import { ThemeProvider as NextThemesProvider } from "next-themes" import * as React from "react" export function ThemeProvider({ children, ...props }: React.ComponentProps<typeof NextThemesProvider>) { return <NextThemesProvider {...props}>{children}</NextThemesProvider> }
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/providers/websocket-provider.tsx
src/providers/websocket-provider.tsx
"use client" import { useQueryClient } from "@tanstack/react-query" import * as React from "react" import { notificationKeys } from "@/hooks/use-notifications" import type { Notification } from "@/lib/api/types" // WebSocket 连接状态 type ConnectionStatus = "connecting" | "connected" | "disconnected" | "error" interfac...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/store-factory.ts
src/lib/store-factory.ts
/** * Zustand Store 工厂函数 * 提供统一的 store 创建模式,减少重复代码 */ import type { StateCreator, StoreMutatorIdentifier } from "zustand" import { create } from "zustand" import { createJSONStorage, persist, type PersistOptions, type PersistStorage } from "zustand/middleware" // ===================================================...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/utils.ts
src/lib/utils.ts
import { type ClassValue,clsx } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) }
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/cloudflare-image-loader.ts
src/lib/cloudflare-image-loader.ts
/** * Cloudflare Images 自定义 loader * * 使用方法: * 1. 开通 Cloudflare Images 服务 * 2. 设置环境变量 NEXT_PUBLIC_CF_IMAGES_ACCOUNT_HASH * 3. 上传图片到 Cloudflare Images 或使用 URL fetch 功能 * * 文档: https://developers.cloudflare.com/images/transform-images/ */ interface ImageLoaderParams { src: string width: number quality?: n...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/query-keys.ts
src/lib/query-keys.ts
/** * React Query Keys 统一管理 * * 集中管理所有 query keys,确保: * - 类型安全 * - 避免 key 冲突 * - 方便 invalidation */ // ============================================================================ // 用户相关 // ============================================================================ export const userKeys = { all: ["users"] ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/mock-fetch.ts
src/lib/mock-fetch.ts
// Mock fetch 拦截器 // Mock.js 只拦截 XMLHttpRequest,需要手动拦截 fetch import Mock from "mockjs" // 保存原始 fetch const originalFetch = window.fetch // 提取 URL 的路径部分(去除查询参数和 hash) function getUrlPathname(url: string): string { try { // 处理相对路径 if (url.startsWith("/")) { const questionIndex = url.indexOf("?") ...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/project-info.ts
src/lib/project-info.ts
export const projectInfo = { name: "halolight", author: "h7ml", repo: "https://github.com/halolight/halolight", homepage: "https://halolight.h7ml.cn", desc: "基于 Next.js 14 的现代化中文后台管理系统", }
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/auth/password-rules.ts
src/lib/auth/password-rules.ts
export const passwordRules = [ { label: "至少 8 个字符", test: (p: string) => p.length >= 8 }, { label: "包含大写字母", test: (p: string) => /[A-Z]/.test(p) }, { label: "包含小写字母", test: (p: string) => /[a-z]/.test(p) }, { label: "包含数字", test: (p: string) => /[0-9]/.test(p) }, ] export function getPasswordStrength(password...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/client.ts
src/lib/api/client.ts
import axios, { AxiosError, InternalAxiosRequestConfig } from "axios" import Cookies from "js-cookie" import { adaptBackendCurrentUserResponse, adaptBackendLoginResponse, adaptBackendRefreshResponse, } from "./adapters" import type { BackendCurrentUserResponse, BackendLoginResponse, BackendRefreshTokenResp...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/api-router.ts
src/lib/api/api-router.ts
/** * API Router - 统一的数据访问层 * * 根据 NEXT_PUBLIC_MOCK 环境变量自动切换 Mock API 和真实 API。 * Server Actions 和 React Query hooks 都通过此 router 获取数据, * 确保 Mock 模式在服务端和客户端都能正常工作。 */ import { tokenStorage } from "./client" import { calendarApi, documentApi, messageApi, notificationApi, roleApi, userApi, } from "./mock...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/mock-api.ts
src/lib/api/mock-api.ts
import { mockCalendarEvents, mockChartData, mockDashboardStats, mockDocuments, mockMessages, mockNotifications, mockRoles, mockUsers, } from "./mock-data" import type { ApiResponse, CalendarEvent, ChartData, DashboardStats, Document, Message, Notification, PaginatedResponse, Role, Us...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/adapters.ts
src/lib/api/adapters.ts
/** * API 类型适配器 * 将后端 API 响应转换为前端类型 */ import type { BackendCurrentUserResponse, BackendLoginResponse, BackendPaginatedResponse, BackendPermission, BackendRefreshTokenResponse, BackendRole, BackendUser, BackendUserStatus, } from "./backend-types" import type { AccountWithToken, CurrentUserRespon...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/backend-types.ts
src/lib/api/backend-types.ts
/** * 后端 API 原始响应类型定义 * 定义所有从 NestJS 后端接收的原始数据结构 */ // ============================================================================ // 通用响应类型 // ============================================================================ /** 后端分页元数据 */ export interface BackendPaginationMeta { total: number page: number limi...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/types.ts
src/lib/api/types.ts
/** * API 类型定义中心 * 所有 API 相关的类型定义都集中在这里 */ // ============================================================================ // 通用响应类型 // ============================================================================ /** 标准 API 响应 */ export interface ApiResponse<T> { code: number data: T message: string } /** 分...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/services.ts
src/lib/api/services.ts
// API 服务基础配置 import { adaptBackendCurrentUser, adaptBackendRole, adaptBackendUser, adaptBackendUserList, } from "./adapters" import type { BackendCurrentUserResponse, BackendPaginatedResponse, BackendRole, BackendUser, } from "./backend-types" import { tokenStorage } from "./client" import type { Act...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/api/mock-data.ts
src/lib/api/mock-data.ts
import type { CalendarEvent, ChartData, DashboardStats, Document, Message, Notification, Role, User, } from "./types" // 预定义角色 export const mockRoles: Role[] = [ { id: "admin", name: "admin", label: "超级管理员", description: "拥有系统所有权限", permissions: [ "dashboard:view", "us...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/lib/validations/schemas.ts
src/lib/validations/schemas.ts
import { z } from "zod" // 登录表单验证 export const loginSchema = z.object({ email: z .string() .min(1, "请输入邮箱") .email("请输入有效的邮箱地址"), password: z .string() .min(1, "请输入密码") .min(6, "密码至少6个字符"), remember: z.boolean().optional(), }) export type LoginFormData = z.infer<typeof loginSchema> // 注...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/config/routes.ts
src/config/routes.ts
/** * 路由与权限配置中心 * 统一管理所有路由、权限映射和菜单配置 */ import type { LucideIcon } from "lucide-react" import { BarChart3, Calendar, FileText, FolderOpen, LayoutDashboard, Mail, Settings, ShieldCheck, Users, } from "lucide-react" import type { Permission } from "@/lib/api/types" // =============================...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
halolight/halolight
https://github.com/halolight/halolight/blob/b923ab0d92fb2fcfd83c5bead80a9a125f252c10/src/config/tdk.ts
src/config/tdk.ts
import { PERMISSION_RULES, ROUTE_TITLES } from "./routes" export interface TdkEntry { title: string description: string keywords: string } export const DEFAULT_TDK: TdkEntry = { title: "Admin Pro", description: "Admin Pro 企业级后台管理系统,为团队提供统一的数据、权限与运营控制中心。", keywords: "Admin Pro, 后台管理, 仪表盘, 运营", } export co...
typescript
MIT
b923ab0d92fb2fcfd83c5bead80a9a125f252c10
2026-01-05T05:01:18.490502Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/cypress.config.ts
viewer/cypress.config.ts
import { defineConfig } from "cypress"; export default defineConfig({ includeShadowDom: true, e2e: { baseUrl: 'http://localhost:3000' } });
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/App.tsx
viewer/src/App.tsx
import { AnalyticalTable, AnalyticalTableColumnDefinition, AnalyticalTablePropTypes, FlexibleColumnLayout, Icon, IllustratedMessage, Title, Toolbar } from "@ui5/webcomponents-react"; import { useContext, useEffect, useState } from "react"; import { useSearchParams } from "react-router-dom"; import { BaseObjectElementSu...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/reportWebVitals.ts
viewer/src/reportWebVitals.ts
import { ReportHandler } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry)...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/setupTests.ts
viewer/src/setupTests.ts
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom';
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/index.tsx
viewer/src/index.tsx
import reportWebVitals from './reportWebVitals'; import ReactDOM from 'react-dom/client'; import parse from '@ui5/webcomponents-base/dist/PropertiesFileFormat.js'; import React from 'react'; import App from './App'; import { registerI18nLoader } from '@ui5/webcomponents-base/dist/asset-registries/i18n.js'; import { Th...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/react-app-env.d.ts
viewer/src/react-app-env.d.ts
/// <reference types="react-scripts" />
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/components/StateStatus.tsx
viewer/src/components/StateStatus.tsx
import { ObjectElement, States } from "../providers/DataProvider"; import { ObjectStatus } from "@ui5/webcomponents-react"; export default function StateStatus({ object }: { object?: ObjectElement }) { const state = States[object?.state ?? "unknown"]; return <ObjectStatus state={state.state}>{state.label}<...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/components/PageFilter.tsx
viewer/src/components/PageFilter.tsx
import { FilterBar, FilterGroupItem, MultiComboBox, MultiComboBoxItem, MultiComboBoxPropTypes, Option, Select } from "@ui5/webcomponents-react"; import { useContext } from "react"; import { DataContext, Products } from "../providers/DataProvider"; import { FilterContext } from "../providers/FilterProvider"; export def...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/components/PageBar.tsx
viewer/src/components/PageBar.tsx
import { Icon, Input, InputPropTypes, ResponsivePopoverDomRef, ShellBar, ShellBarItem, ShellBarItemPropTypes } from "@ui5/webcomponents-react"; import { useI18nBundle } from '@ui5/webcomponents-react-base'; import { RefObject, useContext, useRef } from "react"; import { useSearchParams } from "react-router-dom"; import...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/components/ElementTab.tsx
viewer/src/components/ElementTab.tsx
import { AnalyticalTable, AnalyticalTablePropTypes, Button, DynamicPage, DynamicPageHeader, DynamicPageTitle, FlexBox, IllustratedMessage, Label, Text, Title } from "@ui5/webcomponents-react"; import { useI18nBundle } from '@ui5/webcomponents-react-base'; import { Dispatch, HTMLAttributes, PropsWithChildren, SetStateAc...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/components/ThemePopover.tsx
viewer/src/components/ThemePopover.tsx
import { List, ListPropTypes, ResponsivePopover, ResponsivePopoverDomRef, StandardListItem } from "@ui5/webcomponents-react"; import { forwardRef, useEffect, useState } from "react"; import { getTheme, setTheme } from '@ui5/webcomponents-base/dist/config/Theme.js'; import { useI18nBundle } from "@ui5/webcomponents-reac...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/providers/DataProvider.tsx
viewer/src/providers/DataProvider.tsx
import { IllustratedMessage, MultiComboBoxPropTypes, ResponsivePopoverDomRef, SelectPropTypes, ValueState } from "@ui5/webcomponents-react"; import { useI18nBundle } from "@ui5/webcomponents-react-base"; import { Context, PropsWithChildren, createContext, createRef, useEffect, useMemo, useState } from "react"; import {...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/src/providers/FilterProvider.tsx
viewer/src/providers/FilterProvider.tsx
import { Context, Dispatch, PropsWithChildren, SetStateAction, createContext, useContext, useEffect, useState } from "react"; import { SetURLSearchParams, useSearchParams } from "react-router-dom"; import { DataContext, ElementState, ObjectElement, State, States } from "./DataProvider"; export type KeyValueStates = { ...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/cypress/support/e2e.ts
viewer/cypress/support/e2e.ts
// *********************************************************** // This example support/e2e.ts is processed and // loaded automatically before your test files. // // This is a great place to put global configuration and // behavior that modifies Cypress. // // You can change the location of this file or turn off // auto...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/cypress/support/commands.ts
viewer/cypress/support/commands.ts
/// <reference types="cypress" /> // *********************************************** // This example commands.ts shows you how to // create various custom commands and overwrite // existing commands. // // For more comprehensive examples of custom // commands please read more here: // https://on.cypress.io/custom-comma...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/cypress/e2e/contentTest.cy.ts
viewer/cypress/e2e/contentTest.cy.ts
describe('template spec', () => { beforeEach(() => { cy.visit("/") }) it("all rows in table are present", () => { cy.get("[data-component-name=\"AnalyticalTableBodyScrollableContainer\"]") .find("[role=\"row\"]") .first() .click() }); it("check l...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
SAP/abap-atc-cr-cv-s4hc
https://github.com/SAP/abap-atc-cr-cv-s4hc/blob/e6109c929f06144e820a34b12d4152e40105cb28/viewer/cypress/e2e/queryParamsFilter.cy.ts
viewer/cypress/e2e/queryParamsFilter.cy.ts
describe('Query parameter driven filters', () => { function getDistinctStates() { const states: Set<string> = new Set(); cy.get('[data-component-name="AnalyticalTableBodyScrollableContainer"]').find('[role="row"]').each($row => { // Each row contains ObjectStatus element for the state; g...
typescript
Apache-2.0
e6109c929f06144e820a34b12d4152e40105cb28
2026-01-05T04:59:33.745016Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/next-env.d.ts
apps/web/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> /// <reference path="./.next/types/routes.d.ts" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/next.config.ts
apps/web/next.config.ts
import type { NextConfig } from "next"; const nextConfig: NextConfig = { transpilePackages: ['tiktok-dl-core'], serverExternalPackages: ['vm2'], }; export default nextConfig;
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/services/rotator.ts
apps/web/src/services/rotator.ts
import {maxRotateCount, providerCache} from '@/config/config'; import {BaseProvider, ExtractedInfo, getRandomProvider} from 'tiktok-dl-core'; import {redisClient} from '@/lib/redis'; /** * Rotate provider. * @param {BaseProvider} provider Provider instance * @param {string} url Video TikTok URL * @param {boolean?}...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/app/layout.tsx
apps/web/src/app/layout.tsx
import type { Metadata } from "next"; import "./globals.css"; export const metadata: Metadata = { title: "TikTok-DL", description: "An Open-Source Project where it could download TikTok's Video without annoying ads!", keywords: 'tiktok-downloader, tiktokdl, tiktok, download video tiktok, tiktok no watermark', ...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/app/page.tsx
apps/web/src/app/page.tsx
'use client'; import { apiClient } from "@/api/api"; import { DownloadResponse } from "@/api/types"; import { Button } from "@/components/ui/button"; import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; im...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/app/api/providers/route.ts
apps/web/src/app/api/providers/route.ts
import { BaseProvider, Providers } from "tiktok-dl-core"; const transformProvider = (provider: BaseProvider) => { const params = provider.getParams(); return { name: provider.resourceName(), url: provider.client?.defaults.options.prefixUrl, maintenance: provider.maintenance, pa...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/app/api/download/route.ts
apps/web/src/app/api/download/route.ts
import { downloadValidator } from "@/validators/download.validator"; import { rotateProvider } from "@/services/rotator"; import { NextRequest } from "next/server"; import { getProvider } from "tiktok-dl-core"; const handleRequest = async <T>(json: T) => { try { const safeData = await downloadValidator.saf...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/app/api/stored-links/route.ts
apps/web/src/app/api/stored-links/route.ts
import { redisClient } from "@/lib/redis"; import { matchLink } from "tiktok-dl-core"; export async function GET() { const keys = await redisClient.keys('*'); return Response.json({ data: keys.filter(key => matchLink(key)), }); }
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/validators/download.validator.ts
apps/web/src/validators/download.validator.ts
import { getTikTokURL } from "@/lib/utils"; import { Providers } from "tiktok-dl-core"; import z from "zod"; export const downloadValidator = z.object({ url: z.url().refine((url) => getTikTokURL(url), { error: 'Invalid VT URL', }), type: z.enum(Providers.map(provider => provider.resourceName()).con...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/components/ui/form.tsx
apps/web/src/components/ui/form.tsx
"use client" import * as LabelPrimitive from "@radix-ui/react-label" import { Slot } from "@radix-ui/react-slot" import { Controller, FormProvider, useFormContext, useFormState, type ControllerProps, type FieldPath, type FieldValues, } from "react-hook-form" import * as React from "react" import { Labe...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/components/ui/label.tsx
apps/web/src/components/ui/label.tsx
"use client" import * as LabelPrimitive from "@radix-ui/react-label" import * as React from "react" import { cn } from "@/lib/utils" function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) { return ( <LabelPrimitive.Root data-slot="label" className={cn( ...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/components/ui/button.tsx
apps/web/src/components/ui/button.tsx
import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" import * as React from "react" import { cn } from "@/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center whitespace-nowrap rounded-base text-sm font-base ring-offset-white trans...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/components/ui/input.tsx
apps/web/src/components/ui/input.tsx
import * as React from "react" import { cn } from "@/lib/utils" function Input({ className, type, ...props }: React.ComponentProps<"input">) { return ( <input type={type} data-slot="input" className={cn( "flex h-10 w-full rounded-base border-2 border-border bg-secondary-background sele...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/api/api.ts
apps/web/src/api/api.ts
import ky from "ky"; export const apiClient = ky.extend({ referrerPolicy: 'same-origin', credentials: 'same-origin', priority: 'high', throwHttpErrors: false, cache: 'force-cache', });
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/api/types.ts
apps/web/src/api/types.ts
import { ExtractedInfo } from "tiktok-dl-core" export type DownloadResponse = { data: ExtractedInfo & { provider: string; }; message?: string; }
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/lib/utils.ts
apps/web/src/lib/utils.ts
import { clsx, type ClassValue } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } /** Get TikTok Video URL. * @param {string} url Video * @return {string} */ export function getTikTokURL(url: string): string | undefined { try { ...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/lib/redis.ts
apps/web/src/lib/redis.ts
import Redis from 'ioredis'; export const redisClient = new Redis( process.env.REDIS_URL ?? 'redis://:@localhost:6379', );
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/apps/web/src/config/config.ts
apps/web/src/config/config.ts
export const rateLimitConfig = { enable: true, // you can set it to 'false' /** * How much rate limit count per x second(s) * -is allowed? Default: 60 requests */ maxRatelimitPerXSeconds: 60, /** * Every x second(s), the ratelimit data will removed. * So, their ratelimit data wi...
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false
hansputera/tiktok-dl
https://github.com/hansputera/tiktok-dl/blob/803879bc7429579b3abf5ff68041078baaaf6d5f/packages/core/fetch.ts
packages/core/fetch.ts
import got, {ExtendOptions} from 'got'; export const getFetch = (baseUrl: string, options?: ExtendOptions) => got.extend({ prefixUrl: baseUrl, dnsCache: true, ...options, });
typescript
MIT
803879bc7429579b3abf5ff68041078baaaf6d5f
2026-01-05T05:01:22.817932Z
false