{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \n \n );\n}\n"},"id":{"kind":"string","value":"alifarooq9/rapidlaunch/starterkits/saas/src/app/layout.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"alifarooq9/rapidlaunch/starterkits/saas/src/app/layout.tsx\",\n \"repo_id\": \"alifarooq9/rapidlaunch\",\n \"token_count\": 451\n}"},"__index_level_0__":{"kind":"number","value":16,"string":"16"}}},{"rowIdx":1303,"cells":{"text":{"kind":"string","value":"import {\n BarChart4Icon,\n BookTextIcon,\n Building2Icon,\n ClipboardListIcon,\n CreditCardIcon,\n HelpCircleIcon,\n LayoutDashboardIcon,\n MessageSquareIcon,\n PenLineIcon,\n Settings2Icon,\n UserRoundCheckIcon,\n UserRoundPlusIcon,\n UsersRoundIcon,\n} from \"lucide-react\";\nimport { siteUrls } from \"@/config/urls\";\n\n/**\n * This file contains the configuration for the navigation items in the sidebar\n * to add a new navigation item, you can add a new object to the navigation array\n * 1 id: a unique id for the navigation, add it to the navIds object\n * 2 label: the label for the navigation (it's a category label)\n * 3 showLabel: if true, the label will be shown in the sidebar (it's a category label)\n * 4 items: an array of navigation items\n * - label: the label for the navigation item\n * - icon: the icon for the navigation item\n * - href: the href for the navigation item\n * - subMenu: an array of subMenu items\n * > label: the label for the subMenu item\n * > href: the href for the subMenu item\n * > icon: the icon for the subMenu item\n *\n * @use specific navigation items in the sidebar, you can use the filterNavItems function\n */\n\ntype IconProps = React.HTMLAttributes;\n\ntype NavItemBase = {\n label: string;\n icon: React.ComponentType;\n disabled?: boolean;\n};\n\ntype NavItemWithHref = NavItemBase & {\n href: string;\n external?: boolean;\n subMenu?: never;\n};\n\ntype NavItemWithSubMenu = NavItemBase & {\n href?: never;\n subMenu: {\n label: string;\n href: string;\n icon: React.ComponentType;\n external?: boolean;\n disabled?: boolean;\n }[];\n};\n\ntype NavItem = NavItemWithHref | NavItemWithSubMenu;\n\nexport type SidebarNavItems = {\n id: string;\n label: string;\n showLabel?: boolean;\n items: NavItem[];\n};\n\nconst navIds = {\n admin: \"admin\",\n general: \"general\",\n org: \"org\",\n resources: \"resources\",\n};\n\nconst navigation: SidebarNavItems[] = [\n {\n id: navIds.admin,\n label: \"Admin\",\n showLabel: true,\n items: [\n {\n label: \"Dashboard\",\n icon: LayoutDashboardIcon,\n href: siteUrls.admin.dashboard,\n },\n {\n label: \"Users\",\n icon: UsersRoundIcon,\n href: siteUrls.admin.users,\n },\n {\n label: \"Organizations\",\n icon: Building2Icon,\n href: siteUrls.admin.organizations,\n },\n {\n label: \"Waitlist\",\n icon: ClipboardListIcon,\n href: siteUrls.admin.waitlist,\n },\n {\n label: \"Analytics\",\n icon: BarChart4Icon,\n href: siteUrls.admin.analytics,\n },\n {\n label: \"Feedback List\",\n icon: HelpCircleIcon,\n href: siteUrls.admin.feedbacks,\n },\n ],\n },\n {\n id: navIds.general,\n label: \"General\",\n showLabel: true,\n items: [\n {\n label: \"Dashboard\",\n icon: LayoutDashboardIcon,\n href: siteUrls.dashboard.home,\n },\n ],\n },\n {\n id: navIds.org,\n label: \"Organization\",\n showLabel: true,\n items: [\n {\n label: \"Members\",\n icon: UsersRoundIcon,\n subMenu: [\n {\n label: \"Org Members\",\n icon: UserRoundCheckIcon,\n href: siteUrls.organization.members.home,\n },\n {\n label: \"Invite Members\",\n icon: UserRoundPlusIcon,\n href: siteUrls.organization.members.invite,\n },\n ],\n },\n {\n label: \"Plans & Billing\",\n icon: CreditCardIcon,\n href: siteUrls.organization.plansAndBilling,\n },\n {\n label: \"Settings\",\n icon: Settings2Icon,\n href: siteUrls.organization.settings,\n },\n ],\n },\n {\n id: navIds.resources,\n label: \"Resources\",\n showLabel: true,\n items: [\n {\n label: \"Feedbacks\",\n icon: MessageSquareIcon,\n href: siteUrls.feedback,\n },\n {\n label: \"Docs\",\n icon: BookTextIcon,\n href: siteUrls.docs,\n },\n {\n label: \"Blog\",\n icon: PenLineIcon,\n href: siteUrls.blogs,\n },\n {\n label: \"Support\",\n icon: HelpCircleIcon,\n href: siteUrls.support,\n },\n ],\n },\n];\n\ntype FilterNavItemsProps = {\n removeIds?: string[];\n includedIds?: string[];\n};\n\n/**\n * @purpose Filters the navigation items for the sidebar.\n * The filterNavItems function filters the navigation items for the sidebar.\n * @param removeIds An array of string identifiers to remove from the navigation items.\n * @param includeIds An array of string identifiers to include in the navigation items.\n *\n * @returns The filtered navigation items for the sidebar.\n * */\n\nexport function filteredNavItems({\n removeIds = [],\n includedIds = [],\n}: FilterNavItemsProps) {\n let includedItems = sidebarConfig.navigation;\n\n if (includedIds.length) {\n includedItems = includedItems.filter((item) =>\n includedIds.includes(item.id),\n );\n }\n\n if (removeIds.length) {\n includedItems = includedItems.filter(\n (item) => !removeIds.includes(item.id),\n );\n }\n\n return includedItems;\n}\n\n/**\n * The sidebarConfig is an object that contains the configuration for the dashboard\n * @export all the configuration for the sidebar in sidebarConfig\n */\n\nexport const sidebarConfig = {\n navIds,\n navigation,\n filteredNavItems,\n} as const;\n"},"id":{"kind":"string","value":"alifarooq9/rapidlaunch/starterkits/saas/src/config/sidebar.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"alifarooq9/rapidlaunch/starterkits/saas/src/config/sidebar.ts\",\n \"repo_id\": \"alifarooq9/rapidlaunch\",\n \"token_count\": 3027\n}"},"__index_level_0__":{"kind":"number","value":17,"string":"17"}}},{"rowIdx":1304,"cells":{"text":{"kind":"string","value":"\"use server\";\n\nimport { orgConfig } from \"@/config/organization\";\nimport { db } from \"@/server/db\";\nimport {\n membersToOrganizations,\n orgRequests,\n organizations,\n} from \"@/server/db/schema\";\nimport { adminProcedure, protectedProcedure } from \"@/server/procedures\";\nimport { and, asc, count, desc, eq, ilike, inArray, or } from \"drizzle-orm\";\nimport { cookies } from \"next/headers\";\nimport { z } from \"zod\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nexport async function getUserOrgsQuery() {\n const { user } = await protectedProcedure();\n\n return (\n await db.query.membersToOrganizations\n .findMany({\n where: eq(membersToOrganizations.memberId, user.id),\n with: {\n organization: true,\n },\n })\n .execute()\n ).map((mto) => ({\n ...mto.organization,\n }));\n}\n\nexport async function getOrganizations() {\n const userOrgs = await getUserOrgsQuery();\n\n const defaultOrg = cookies().get(orgConfig.cookieName)?.value;\n\n const currentOrg =\n userOrgs.find((org) => org.id === defaultOrg) ?? userOrgs[0];\n\n return {\n currentOrg: currentOrg as typeof organizations.$inferSelect,\n userOrgs,\n };\n}\n\nexport async function getOrgRequestsQuery() {\n await protectedProcedure();\n\n const { currentOrg } = await getOrganizations();\n\n return await db.query.orgRequests\n .findMany({\n where: eq(orgRequests.organizationId, currentOrg.id),\n with: {\n user: true,\n },\n })\n .execute();\n}\n\n/**\n * @purpose Get organization by id\n * @param orgId\n * @returns organization\n */\n\ntype GetOrgByIdProps = {\n orgId: string;\n};\n\nexport async function getOrgByIdQuery({ orgId }: GetOrgByIdProps) {\n await protectedProcedure();\n\n return await db.query.organizations.findFirst({\n where: and(eq(organizations.id, orgId)),\n columns: {\n name: true,\n image: true,\n },\n });\n}\n\n/**\n * @purpose Get paginated users\n * @param page - page number\n * @param per_page - number of items per page\n * @param sort - sort by column\n * @param email - filter by email\n * @param role - filter by role\n * @param operator - filter by operator\n * @returns Paginated users\n */\n\nconst panginatedOrgMembersPropsSchema = z.object({\n page: z.coerce.number().default(1),\n per_page: z.coerce.number().default(10),\n sort: z.string().optional(),\n email: z.string().optional(),\n role: z.string().optional(),\n operator: z.string().optional(),\n});\n\ntype GetPaginatedOrgMembersQueryProps = z.infer<\n typeof panginatedOrgMembersPropsSchema\n>;\n\nexport async function getPaginatedOrgMembersQuery(\n input: GetPaginatedOrgMembersQueryProps,\n) {\n const { currentOrg } = await getOrganizations();\n\n noStore();\n const offset = (input.page - 1) * input.per_page;\n\n const [column, order] = (input.sort?.split(\".\") as [\n keyof typeof membersToOrganizations.$inferSelect | undefined,\n \"asc\" | \"desc\" | undefined,\n ]) ?? [\"title\", \"desc\"];\n\n const roles =\n (input.role?.split(\n \".\",\n ) as (typeof membersToOrganizations.$inferSelect.role)[]) ?? [];\n\n const { data, total } = await db.transaction(async (tx) => {\n const data = await tx.query.membersToOrganizations.findMany({\n offset,\n limit: input.per_page,\n where: and(\n eq(membersToOrganizations.organizationId, currentOrg.id),\n or(\n input.email\n ? ilike(\n membersToOrganizations.memberEmail,\n `%${input.email}%`,\n )\n : undefined,\n\n roles.length > 0\n ? inArray(membersToOrganizations.role, roles)\n : undefined,\n ),\n ),\n with: {\n member: {\n columns: {\n id: true,\n email: true,\n image: true,\n name: true,\n },\n },\n },\n orderBy:\n column && column in membersToOrganizations\n ? order === \"asc\"\n ? asc(membersToOrganizations[column])\n : desc(membersToOrganizations[column])\n : desc(membersToOrganizations.createdAt),\n });\n\n const total = await tx\n .select({\n count: count(),\n })\n .from(membersToOrganizations)\n .where(\n and(\n eq(membersToOrganizations.organizationId, currentOrg.id),\n or(\n input.email\n ? ilike(\n membersToOrganizations.memberEmail,\n `%${input.email}%`,\n )\n : undefined,\n\n roles.length > 0\n ? inArray(membersToOrganizations.role, roles)\n : undefined,\n ),\n ),\n )\n .execute()\n .then((res) => res[0]?.count ?? 0);\n\n return { data, total };\n });\n\n const pageCount = Math.ceil(total / input.per_page);\n\n return { data, pageCount, total };\n}\n\nconst panginatedOrgPropsSchema = z.object({\n page: z.coerce.number().default(1),\n per_page: z.coerce.number().default(10),\n sort: z.string().optional(),\n email: z.string().optional(),\n name: z.string().optional(),\n operator: z.string().optional(),\n});\n\ntype GetPaginatedOrgsQueryProps = z.infer;\n\nexport async function getPaginatedOrgsQuery(input: GetPaginatedOrgsQueryProps) {\n noStore();\n await adminProcedure();\n\n const offset = (input.page - 1) * input.per_page;\n\n const [column, order] = (input.sort?.split(\".\") as [\n keyof typeof organizations.$inferSelect | undefined,\n \"asc\" | \"desc\" | undefined,\n ]) ?? [\"title\", \"desc\"];\n\n const { data, total } = await db.transaction(async (tx) => {\n const response = await tx.query.organizations.findMany({\n where: input.email\n ? ilike(organizations.email, `%${input.email}%`)\n : undefined,\n with: {\n owner: true,\n membersToOrganizations: {\n with: {\n member: true,\n },\n },\n subscriptions: true,\n },\n offset,\n limit: input.per_page,\n orderBy:\n column && column in organizations\n ? order === \"asc\"\n ? asc(organizations[column])\n : desc(organizations[column])\n : desc(organizations.createdAt),\n });\n\n const data = response.map((org) => {\n return {\n ...org,\n members: org.membersToOrganizations.map((mto) => {\n return {\n ...mto.member,\n role: mto.role,\n };\n }),\n };\n });\n\n const total = await tx\n .select({\n count: count(),\n })\n .from(organizations)\n .where(\n or(\n input.email\n ? ilike(organizations.email, `%${input.email}%`)\n : undefined,\n ),\n )\n .execute()\n .then((res) => res[0]?.count ?? 0);\n\n return { data, total };\n });\n\n const pageCount = Math.ceil(total / input.per_page);\n\n return { data, pageCount, total };\n}\n"},"id":{"kind":"string","value":"alifarooq9/rapidlaunch/starterkits/saas/src/server/actions/organization/queries.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"alifarooq9/rapidlaunch/starterkits/saas/src/server/actions/organization/queries.ts\",\n \"repo_id\": \"alifarooq9/rapidlaunch\",\n \"token_count\": 4077\n}"},"__index_level_0__":{"kind":"number","value":18,"string":"18"}}},{"rowIdx":1305,"cells":{"text":{"kind":"string","value":"import { createClient } from '@/utils/supabase/server';\nimport { NextResponse } from 'next/server';\nimport { NextRequest } from 'next/server';\nimport { getErrorRedirect, getStatusRedirect } from '@/utils/helpers';\n\nexport async function GET(request: NextRequest) {\n // The `/auth/callback` route is required for the server-side auth flow implemented\n // by the `@supabase/ssr` package. It exchanges an auth code for the user's session.\n const requestUrl = new URL(request.url);\n const code = requestUrl.searchParams.get('code');\n\n if (code) {\n const supabase = createClient();\n\n const { error } = await supabase.auth.exchangeCodeForSession(code);\n\n if (error) {\n return NextResponse.redirect(\n getErrorRedirect(\n `${requestUrl.origin}/dashboard/signin`,\n error.name,\n \"Sorry, we weren't able to log you in. Please try again.\"\n )\n );\n }\n }\n\n // URL to redirect to after sign in process completes\n return NextResponse.redirect(\n getStatusRedirect(\n `${requestUrl.origin}/dashboard/main`,\n 'Success!',\n 'You are now signed in.'\n )\n );\n}\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/app/auth/callback/route.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/app/auth/callback/route.ts\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 398\n}"},"__index_level_0__":{"kind":"number","value":19,"string":"19"}}},{"rowIdx":1306,"cells":{"text":{"kind":"string","value":"interface Props {\n text: string;\n editable?: boolean;\n onChange?: (value: string) => void;\n}\n\nexport const TextBlock: React.FC = ({\n text,\n editable = false,\n onChange = () => {}\n}) => {\n return (\n onChange(e.target.value)}\n disabled={!editable}\n />\n );\n};\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/components/TextBlock.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/components/TextBlock.tsx\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 199\n}"},"__index_level_0__":{"kind":"number","value":20,"string":"20"}}},{"rowIdx":1307,"cells":{"text":{"kind":"string","value":"/*eslint-disable*/\n'use client';\n\nimport { Button } from '@/components/ui/button';\nimport { Card } from '@/components/ui/card';\nimport Notification from '@/components/notification';\nimport { HiOutlineBellAlert } from 'react-icons/hi2';\nimport { Switch } from '@/components/ui/switch';\nimport { HiOutlineCheck } from 'react-icons/hi';\n\ninterface Props {\n notifications: {\n message: string;\n time: string;\n status?: 'danger' | 'waiting' | 'confirmed';\n className?: string;\n }[];\n}\n\nexport default function Settings(props: Props) {\n return (\n \n
\n

\n Notifications\n

\n

\n You have 3 unread messages.\n

\n
\n \n \n
\n

\n Push Notifications\n

\n

\n Send notifications to device.\n

\n
\n \n \n {props.notifications.map((notification, key) => {\n return (\n \n );\n })}\n\n \n \n );\n}\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/components/dashboard/settings/components/notification-settings.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/components/dashboard/settings/components/notification-settings.tsx\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 950\n}"},"__index_level_0__":{"kind":"number","value":21,"string":"21"}}},{"rowIdx":1308,"cells":{"text":{"kind":"string","value":"import { createContext } from 'react';\nimport { User } from '@supabase/supabase-js';\n\ninterface OpenContextType {\n open: boolean;\n setOpen: React.Dispatch>;\n}\ntype UserDetails = { [x: string]: any } | null;\n\nexport const OpenContext = createContext(undefined);\nexport const UserContext = createContext(undefined);\nexport const UserDetailsContext = createContext(\n undefined\n);\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/contexts/layout.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/contexts/layout.ts\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 134\n}"},"__index_level_0__":{"kind":"number","value":22,"string":"22"}}},{"rowIdx":1309,"cells":{"text":{"kind":"string","value":"/**\n * Chrome has a bug with transitions on load since 2012!\n *\n * To prevent a \"pop\" of content, you have to disable all transitions until\n * the page is done loading.\n *\n * https://lab.laukstein.com/bug/input\n * https://twitter.com/timer150/status/1345217126680899584\n */\nbody.loading * {\n transition: none !important;\n}\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/styles/chrome-bug.css"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/styles/chrome-bug.css\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 100\n}"},"__index_level_0__":{"kind":"number","value":23,"string":"23"}}},{"rowIdx":1310,"cells":{"text":{"kind":"string","value":"import { Database } from '@/types/types_db';\n\ntype Price = Database['public']['Tables']['prices']['Row'];\n\nexport const getURL = (path?: string) => {\n let url =\n process?.env?.NEXT_PUBLIC_SITE_URL ?? // Set this to your site URL in production env.\n process?.env?.NEXT_PUBLIC_VERCEL_URL ?? // Automatically set by Vercel.\n 'http://localhost:3000/';\n // Make sure to include `https://` when not localhost.\n url = url.includes('http') ? url : `https://${url}`;\n // Make sure to including trailing `/`.\n url = url.charAt(url.length - 1) === '/' ? url : `${url}/`;\n\n if (path) {\n path = path.replace(/^\\/+/, '');\n\n // Concatenate the URL and the path.\n return path ? `${url}/${path}` : url;\n }\n\n return url;\n};\n\nexport const postData = async ({\n url,\n data\n}: {\n url: string;\n data?: { price: Price };\n}) => {\n console.log('posting,', url, data);\n\n const res = await fetch(url, {\n method: 'POST',\n headers: new Headers({ 'Content-Type': 'application/json' }),\n credentials: 'same-origin',\n body: JSON.stringify(data)\n });\n\n if (!res.ok) {\n console.log('Error in postData', { url, data, res });\n\n throw Error(res.statusText);\n }\n\n return res.json();\n};\n\nexport const toDateTime = (secs: number) => {\n var t = new Date('1970-01-01T00:30:00Z'); // Unix epoch start.\n t.setSeconds(secs);\n return t;\n};\n\nexport const calculateTrialEndUnixTimestamp = (\n trialPeriodDays: number | null | undefined\n) => {\n // Check if trialPeriodDays is null, undefined, or less than 2 days\n if (\n trialPeriodDays === null ||\n trialPeriodDays === undefined ||\n trialPeriodDays < 2\n ) {\n return undefined;\n }\n\n const currentDate = new Date(); // Current date and time\n const trialEnd = new Date(\n currentDate.getTime() + (trialPeriodDays + 1) * 24 * 60 * 60 * 1000\n ); // Add trial days\n return Math.floor(trialEnd.getTime() / 1000); // Convert to Unix timestamp in seconds\n};\n\nconst toastKeyMap: { [key: string]: string[] } = {\n status: ['status', 'status_description'],\n error: ['error', 'error_description']\n};\n\nconst getToastRedirect = (\n path: string,\n toastType: string,\n toastName: string,\n toastDescription: string = '',\n disableButton: boolean = false,\n arbitraryParams: string = ''\n): string => {\n const [nameKey, descriptionKey] = toastKeyMap[toastType];\n\n let redirectPath = `${path}?${nameKey}=${encodeURIComponent(toastName)}`;\n\n if (toastDescription) {\n redirectPath += `&${descriptionKey}=${encodeURIComponent(\n toastDescription\n )}`;\n }\n\n if (disableButton) {\n redirectPath += `&disable_button=true`;\n }\n\n if (arbitraryParams) {\n redirectPath += `&${arbitraryParams}`;\n }\n\n return redirectPath;\n};\n\nexport const getStatusRedirect = (\n path: string,\n statusName: string,\n statusDescription: string = '',\n disableButton: boolean = false,\n arbitraryParams: string = ''\n) =>\n getToastRedirect(\n path,\n 'status',\n statusName,\n statusDescription,\n disableButton,\n arbitraryParams\n );\n\nexport const getErrorRedirect = (\n path: string,\n errorName: string,\n errorDescription: string = '',\n disableButton: boolean = false,\n arbitraryParams: string = ''\n) =>\n getToastRedirect(\n path,\n 'error',\n errorName,\n errorDescription,\n disableButton,\n arbitraryParams\n );\n"},"id":{"kind":"string","value":"horizon-ui/shadcn-nextjs-boilerplate/utils/helpers.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"horizon-ui/shadcn-nextjs-boilerplate/utils/helpers.ts\",\n \"repo_id\": \"horizon-ui/shadcn-nextjs-boilerplate\",\n \"token_count\": 1173\n}"},"__index_level_0__":{"kind":"number","value":24,"string":"24"}}},{"rowIdx":1311,"cells":{"text":{"kind":"string","value":"# FIXME: Configure environment variables for production\n\n# Hosting\n# Replace by your domain name\n# NEXT_PUBLIC_APP_URL=https://example.com\n\n# Sentry DSN\nNEXT_PUBLIC_SENTRY_DSN=\n\n# Stripe\n# If you need a real Stripe subscription payment with checkout page, customer portal, webhook, etc.\n# You can check out the Next.js Boilerplate Pro: https://nextjs-boilerplate.com/pro-saas-starter-kit\nNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live\n# Use Stripe test mode price id or production price id\nBILLING_PLAN_ENV=prod\n\n######## [BEGIN] SENSITIVE DATA ######## For security reason, don't update the following variables (secret key) directly in this file.\n######## Please create a new file named `.env.production.local`, all environment files ending with `.local` won't be tracked by Git.\n######## After creating the file, you can add the following variables.\n# Database\n# Using an incorrect DATABASE_URL value, Next.js build will timeout and you will get the following error: \"because it took more than 60 seconds\"\n# DATABASE_URL=postgresql://postgres@localhost:5432/postgres\n\n# Stripe\nSTRIPE_SECRET_KEY=your_stripe_secret_key\nSTRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret\n\n# Error monitoring\n# SENTRY_AUTH_TOKEN=\n\n# Logging ingestion\n# LOGTAIL_SOURCE_TOKEN=\n######## [END] SENSITIVE DATA\n"},"id":{"kind":"string","value":"ixartz/SaaS-Boilerplate/.env.production"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"ixartz/SaaS-Boilerplate/.env.production\",\n \"repo_id\": \"ixartz/SaaS-Boilerplate\",\n \"token_count\": 399\n}"},"__index_level_0__":{"kind":"number","value":25,"string":"25"}}},{"rowIdx":1312,"cells":{"text":{"kind":"string","value":"import type { UserConfig } from '@commitlint/types';\n\nconst Configuration: UserConfig = {\n extends: ['@commitlint/config-conventional'],\n};\n\nexport default Configuration;\n"},"id":{"kind":"string","value":"ixartz/SaaS-Boilerplate/commitlint.config.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"ixartz/SaaS-Boilerplate/commitlint.config.ts\",\n \"repo_id\": \"ixartz/SaaS-Boilerplate\",\n \"token_count\": 49\n}"},"__index_level_0__":{"kind":"number","value":26,"string":"26"}}},{"rowIdx":1313,"cells":{"text":{"kind":"string","value":"import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';\n\nimport { CTA } from '@/templates/CTA';\nimport { DemoBanner } from '@/templates/DemoBanner';\nimport { FAQ } from '@/templates/FAQ';\nimport { Features } from '@/templates/Features';\nimport { Footer } from '@/templates/Footer';\nimport { Hero } from '@/templates/Hero';\nimport { Navbar } from '@/templates/Navbar';\nimport { Pricing } from '@/templates/Pricing';\nimport { Sponsors } from '@/templates/Sponsors';\n\nexport async function generateMetadata(props: { params: { locale: string } }) {\n const t = await getTranslations({\n locale: props.params.locale,\n namespace: 'Index',\n });\n\n return {\n title: t('meta_title'),\n description: t('meta_description'),\n };\n}\n\nconst IndexPage = (props: { params: { locale: string } }) => {\n unstable_setRequestLocale(props.params.locale);\n\n return (\n <>\n \n \n \n \n \n \n \n \n
\n
\n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/components/code-block-wrapper.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/components/code-block-wrapper.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 752\n}"},"__index_level_0__":{"kind":"number","value":71,"string":"71"}}},{"rowIdx":1358,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport * as React from \"react\"\nimport Link, { LinkProps } from \"next/link\"\nimport { useRouter } from \"next/navigation\"\nimport { ViewVerticalIcon } from \"@radix-ui/react-icons\"\n\nimport { docsConfig } from \"@/config/docs\"\nimport { siteConfig } from \"@/config/site\"\nimport { cn } from \"@/lib/utils\"\nimport { Icons } from \"@/components/icons\"\nimport { Button } from \"@/registry/new-york/ui/button\"\nimport { ScrollArea } from \"@/registry/new-york/ui/scroll-area\"\nimport { Sheet, SheetContent, SheetTrigger } from \"@/registry/new-york/ui/sheet\"\n\nexport function MobileNav() {\n const [open, setOpen] = React.useState(false)\n\n return (\n \n \n \n \n \n \n \n \n Toggle Menu\n \n \n \n \n \n {siteConfig.name}\n \n \n
\n {docsConfig.mainNav?.map(\n (item) =>\n item.href && (\n \n {item.title}\n \n )\n )}\n
\n
\n {docsConfig.sidebarNav.map((item, index) => (\n
\n

{item.title}

\n {item?.items?.length &&\n item.items.map((item) => (\n \n {!item.disabled &&\n (item.href ? (\n \n {item.title}\n {item.label && (\n \n {item.label}\n \n )}\n \n ) : (\n item.title\n ))}\n \n ))}\n
\n ))}\n
\n
\n
\n
\n )\n}\n\ninterface MobileLinkProps extends LinkProps {\n onOpenChange?: (open: boolean) => void\n children: React.ReactNode\n className?: string\n}\n\nfunction MobileLink({\n href,\n onOpenChange,\n className,\n children,\n ...props\n}: MobileLinkProps) {\n const router = useRouter()\n return (\n {\n router.push(href.toString())\n onOpenChange?.(false)\n }}\n className={cn(className)}\n {...props}\n >\n {children}\n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/components/mobile-nav.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/components/mobile-nav.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 2550\n}"},"__index_level_0__":{"kind":"number","value":72,"string":"72"}}},{"rowIdx":1359,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport { cn } from \"@/lib/utils\"\nimport { useConfig } from \"@/hooks/use-config\"\n\ninterface ThemeWrapperProps extends React.ComponentProps<\"div\"> {\n defaultTheme?: string\n}\n\nexport function ThemeWrapper({\n defaultTheme,\n children,\n className,\n}: ThemeWrapperProps) {\n const [config] = useConfig()\n\n return (\n \n {children}\n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/components/theme-wrapper.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/components/theme-wrapper.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 269\n}"},"__index_level_0__":{"kind":"number","value":73,"string":"73"}}},{"rowIdx":1360,"cells":{"text":{"kind":"string","value":"import { useAtom } from \"jotai\"\nimport { atomWithStorage } from \"jotai/utils\"\n\nimport { BaseColor } from \"@/registry/registry-base-colors\"\nimport { Style } from \"@/registry/registry-styles\"\n\ntype Config = {\n style: Style[\"name\"]\n theme: BaseColor[\"name\"]\n radius: number\n}\n\nconst configAtom = atomWithStorage(\"config\", {\n style: \"default\",\n theme: \"zinc\",\n radius: 0.5,\n})\n\nexport function useConfig() {\n return useAtom(configAtom)\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/hooks/use-config.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/hooks/use-config.ts\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 158\n}"},"__index_level_0__":{"kind":"number","value":74,"string":"74"}}},{"rowIdx":1361,"cells":{"text":{"kind":"string","value":"import { UnistNode, UnistTree } from \"types/unist\"\nimport { visit } from \"unist-util-visit\"\n\nexport function rehypeNpmCommand() {\n return (tree: UnistTree) => {\n visit(tree, (node: UnistNode) => {\n if (node.type !== \"element\" || node?.tagName !== \"pre\") {\n return\n }\n\n // npm install.\n if (node.properties?.[\"__rawString__\"]?.startsWith(\"npm install\")) {\n const npmCommand = node.properties?.[\"__rawString__\"]\n node.properties[\"__npmCommand__\"] = npmCommand\n node.properties[\"__yarnCommand__\"] = npmCommand.replace(\n \"npm install\",\n \"yarn add\"\n )\n node.properties[\"__pnpmCommand__\"] = npmCommand.replace(\n \"npm install\",\n \"pnpm add\"\n )\n node.properties[\"__bunCommand__\"] = npmCommand.replace(\n \"npm install\",\n \"bun add\"\n )\n }\n\n // npx create.\n if (node.properties?.[\"__rawString__\"]?.startsWith(\"npx create-\")) {\n const npmCommand = node.properties?.[\"__rawString__\"]\n node.properties[\"__npmCommand__\"] = npmCommand\n node.properties[\"__yarnCommand__\"] = npmCommand.replace(\n \"npx create-\",\n \"yarn create \"\n )\n node.properties[\"__pnpmCommand__\"] = npmCommand.replace(\n \"npx create-\",\n \"pnpm create \"\n )\n node.properties[\"__bunCommand__\"] = npmCommand.replace(\n \"npx\",\n \"bunx --bun\"\n )\n }\n\n // npx.\n if (\n node.properties?.[\"__rawString__\"]?.startsWith(\"npx\") &&\n !node.properties?.[\"__rawString__\"]?.startsWith(\"npx create-\")\n ) {\n const npmCommand = node.properties?.[\"__rawString__\"]\n node.properties[\"__npmCommand__\"] = npmCommand\n node.properties[\"__yarnCommand__\"] = npmCommand\n node.properties[\"__pnpmCommand__\"] = npmCommand.replace(\n \"npx\",\n \"pnpm dlx\"\n )\n node.properties[\"__bunCommand__\"] = npmCommand.replace(\n \"npx\",\n \"bunx --bun\"\n )\n }\n })\n }\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/lib/rehype-npm-command.ts"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/lib/rehype-npm-command.ts\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 981\n}"},"__index_level_0__":{"kind":"number","value":75,"string":"75"}}},{"rowIdx":1362,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport { Bar, BarChart, Label, Rectangle, ReferenceLine, XAxis } from \"recharts\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/default/ui/card\"\nimport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n} from \"@/registry/default/ui/chart\"\n\nexport default function Component() {\n return (\n \n \n Today\n \n 12,584{\" \"}\n \n steps\n \n \n \n \n \n \n }\n />\n {\n return new Date(value).toLocaleDateString(\"en-US\", {\n weekday: \"short\",\n })\n }}\n />\n {\n return new Date(value).toLocaleDateString(\"en-US\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n })\n }}\n />\n }\n cursor={false}\n />\n \n \n \n \n \n \n \n \n \n Over the past 7 days, you have walked{\" \"}\n 53,305 steps.\n \n \n You need 12,584{\" \"}\n more steps to reach your goal.\n \n \n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/block/charts-01-chunk-0.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/block/charts-01-chunk-0.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 2474\n}"},"__index_level_0__":{"kind":"number","value":76,"string":"76"}}},{"rowIdx":1363,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/registry/default/ui/card\"\n\nexport default function Component() {\n return (\n \n \n Upgrade to Pro\n \n Unlock all features and get unlimited access to our support team.\n \n \n \n \n \n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/block/dashboard-02-chunk-0.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/block/dashboard-02-chunk-0.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 290\n}"},"__index_level_0__":{"kind":"number","value":77,"string":"77"}}},{"rowIdx":1364,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport Image from \"next/image\"\nimport { MoreHorizontal } from \"lucide-react\"\n\nimport { Badge } from \"@/registry/default/ui/badge\"\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/default/ui/card\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuTrigger,\n} from \"@/registry/default/ui/dropdown-menu\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/registry/default/ui/table\"\n\nexport default function Component() {\n return (\n \n \n Products\n \n Manage your products and view their sales performance.\n \n \n \n \n \n \n \n Image\n \n Name\n Status\n Price\n \n Total Sales\n \n Created at\n \n Actions\n \n \n \n \n \n \n \n \n \n Laser Lemonade Machine\n \n \n Draft\n \n $499.99\n 25\n \n 2023-07-12 10:42 AM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n \n \n \n \n Hypernova Headphones\n \n \n Active\n \n $129.99\n 100\n \n 2023-10-18 03:21 PM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n \n \n \n AeroGlow Desk Lamp\n \n Active\n \n $39.99\n 50\n \n 2023-11-29 08:15 AM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n \n \n \n \n TechTonic Energy Drink\n \n \n Draft\n \n $2.99\n 0\n \n 2023-12-25 11:59 PM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n \n \n \n \n Gamer Gear Pro Controller\n \n \n Active\n \n $59.99\n 75\n \n 2024-01-01 12:00 AM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n \n \n \n Luminous VR Headset\n \n Active\n \n $199.99\n 30\n \n 2024-02-14 02:14 PM\n \n \n \n \n \n \n \n Actions\n Edit\n Delete\n \n \n \n \n \n
\n
\n \n
\n Showing 1-10 of 32 products\n
\n
\n
\n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/block/dashboard-06-chunk-0.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/block/dashboard-06-chunk-0.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 6325\n}"},"__index_level_0__":{"kind":"number","value":78,"string":"78"}}},{"rowIdx":1365,"cells":{"text":{"kind":"string","value":"import { Database } from \"lucide-react\"\n\nimport { Card, CardContent } from \"@/registry/default/ui/card\"\nimport { Progress } from \"@/registry/default/ui/progress\"\n\nexport function StorageCard() {\n return (\n \n \n
\n \n
\n
\n

Running out of space?

\n

79.2 GB / 100 GB used

\n \n
\n
\n
\n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/block/sidebar-01/components/storage-card.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/block/sidebar-01/components/storage-card.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 396\n}"},"__index_level_0__":{"kind":"number","value":79,"string":"79"}}},{"rowIdx":1366,"cells":{"text":{"kind":"string","value":"import { ChevronDown, Slash } from \"lucide-react\"\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from \"@/registry/default/ui/breadcrumb\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/registry/default/ui/dropdown-menu\"\n\nexport default function BreadcrumbWithDropdown() {\n return (\n \n \n \n Home\n \n \n \n \n \n \n \n Components\n \n \n \n Documentation\n Themes\n GitHub\n \n \n \n \n \n \n \n Breadcrumb\n \n \n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/breadcrumb-dropdown.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/breadcrumb-dropdown.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 680\n}"},"__index_level_0__":{"kind":"number","value":80,"string":"80"}}},{"rowIdx":1367,"cells":{"text":{"kind":"string","value":"\"use client\"\n\nimport Link from \"next/link\"\nimport { zodResolver } from \"@hookform/resolvers/zod\"\nimport { useForm } from \"react-hook-form\"\nimport { z } from \"zod\"\n\nimport { toast } from \"@/registry/default/hooks/use-toast\"\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Checkbox } from \"@/registry/default/ui/checkbox\"\nimport {\n Form,\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n} from \"@/registry/default/ui/form\"\n\nconst FormSchema = z.object({\n mobile: z.boolean().default(false).optional(),\n})\n\nexport default function CheckboxReactHookFormSingle() {\n const form = useForm>({\n resolver: zodResolver(FormSchema),\n defaultValues: {\n mobile: true,\n },\n })\n\n function onSubmit(data: z.infer) {\n toast({\n title: \"You submitted the following values:\",\n description: (\n
\n          {JSON.stringify(data, null, 2)}\n        
\n ),\n })\n }\n\n return (\n
\n \n (\n \n \n \n \n
\n \n Use different settings for my mobile devices\n \n \n You can manage your mobile notifications in the{\" \"}\n mobile settings page.\n \n
\n
\n )}\n />\n \n \n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/checkbox-form-single.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/checkbox-form-single.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 971\n}"},"__index_level_0__":{"kind":"number","value":81,"string":"81"}}},{"rowIdx":1368,"cells":{"text":{"kind":"string","value":"import { Copy } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/default/ui/dialog\"\nimport { Input } from \"@/registry/default/ui/input\"\nimport { Label } from \"@/registry/default/ui/label\"\n\nexport default function DialogCloseButton() {\n return (\n \n \n \n \n \n \n Share link\n \n Anyone who has this link will be able to view this.\n \n \n
\n
\n \n \n
\n \n
\n \n \n \n \n \n
\n
\n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/dialog-close-button.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/dialog-close-button.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 758\n}"},"__index_level_0__":{"kind":"number","value":82,"string":"82"}}},{"rowIdx":1369,"cells":{"text":{"kind":"string","value":"import React from \"react\"\n\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"@/registry/default/ui/input-otp\"\n\nexport default function InputOTPWithSeparator() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/input-otp-separator.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/input-otp-separator.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 311\n}"},"__index_level_0__":{"kind":"number","value":83,"string":"83"}}},{"rowIdx":1370,"cells":{"text":{"kind":"string","value":"import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/registry/default/ui/resizable\"\n\nexport default function ResizableDemo() {\n return (\n \n \n
\n Header\n
\n
\n \n \n
\n Content\n
\n
\n \n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/resizable-vertical.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/resizable-vertical.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 318\n}"},"__index_level_0__":{"kind":"number","value":84,"string":"84"}}},{"rowIdx":1371,"cells":{"text":{"kind":"string","value":"import { Button } from \"@/registry/default/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/registry/default/ui/card\"\nimport { Input } from \"@/registry/default/ui/input\"\nimport { Label } from \"@/registry/default/ui/label\"\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"@/registry/default/ui/tabs\"\n\nexport default function TabsDemo() {\n return (\n \n \n Account\n Password\n \n \n \n \n Account\n \n Make changes to your account here. Click save when you're done.\n \n \n \n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n \n \n \n Password\n \n Change your password here. After saving, you'll be logged out.\n \n \n \n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n
\n )\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/tabs-demo.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/tabs-demo.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 1114\n}"},"__index_level_0__":{"kind":"number","value":85,"string":"85"}}},{"rowIdx":1372,"cells":{"text":{"kind":"string","value":"export default function TypographyLarge() {\n return
Are you absolutely sure?
\n}\n"},"id":{"kind":"string","value":"shadcn-ui/ui/apps/www/registry/default/example/typography-large.tsx"},"metadata":{"kind":"string","value":"{\n \"file_path\": \"shadcn-ui/ui/apps/www/registry/default/example/typography-large.tsx\",\n \"repo_id\": \"shadcn-ui/ui\",\n \"token_count\": 37\n}"},"__index_level_0__":{"kind":"number","value":86,"string":"86"}}},{"rowIdx":1373,"cells":{"text":{"kind":"string","value":"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) =>