@ahmedrowaihi/8n-starter 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/app/[lang]/(docs)/[section]/[[...slug]]/page.jsx +1 -0
- package/app/[lang]/(docs)/error.jsx +2 -0
- package/app/[lang]/(docs)/layout.jsx +1 -0
- package/app/[lang]/(docs)/loading.jsx +1 -0
- package/app/[lang]/(marketing)/layout.jsx +2 -0
- package/app/[lang]/(marketing)/page.jsx +1 -0
- package/app/[lang]/changelog/[...slug]/layout.jsx +1 -0
- package/app/[lang]/changelog/[...slug]/page.jsx +1 -0
- package/app/[lang]/changelog/layout.jsx +1 -0
- package/app/[lang]/changelog/page.jsx +1 -0
- package/app/[lang]/error.jsx +2 -0
- package/app/[lang]/lang-setup.jsx +2 -0
- package/app/[lang]/layout.jsx +1 -0
- package/app/[lang]/loading.jsx +1 -0
- package/app/[lang]/playground/page.jsx +2 -0
- package/app/[lang]/rss.xml/route.js +1 -0
- package/app/api/_dev/watch/route.js +1 -0
- package/app/api/chat/route.js +1 -0
- package/app/api/pages/route.js +1 -0
- package/app/api/search/route.js +1 -0
- package/app/excalidraw/layout.jsx +1 -0
- package/app/excalidraw/page.jsx +13 -0
- package/app/layout.jsx +1 -0
- package/app/llms-full.txt/route.js +1 -0
- package/app/llms.mdx/[section]/[...slug]/route.js +1 -0
- package/app/llms.txt/route.js +1 -0
- package/app/not-found.jsx +1 -0
- package/app/page.jsx +1 -0
- package/app/robots.js +1 -0
- package/app/sitemap.js +1 -0
- package/next.config.mjs +14 -0
- package/package.json +116 -0
- package/postcss.config.mjs +5 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/fonts/ThmanyahSans/Thmanyahsans12-Black.woff2 +0 -0
- package/public/fonts/ThmanyahSans/Thmanyahsans12-Bold.woff2 +0 -0
- package/public/fonts/ThmanyahSans/Thmanyahsans12-Light.woff2 +0 -0
- package/public/fonts/ThmanyahSans/Thmanyahsans12-Medium.woff2 +0 -0
- package/public/fonts/ThmanyahSans/Thmanyahsans12-Regular.woff2 +0 -0
- package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Black.woff2 +0 -0
- package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Bold.woff2 +0 -0
- package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Light.woff2 +0 -0
- package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Medium.woff2 +0 -0
- package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Regular.woff2 +0 -0
- package/public/fonts/sar.woff +0 -0
- package/public/manifest.json +22 -0
- package/public/thmanyah-icon.svg +3 -0
- package/src/components/ai-elements/conversation.jsx +2 -0
- package/src/components/ai-elements/reasoning.jsx +2 -0
- package/src/components/ai-elements/shimmer.jsx +2 -0
- package/src/components/api-page.client.jsx +2 -0
- package/src/components/api-page.jsx +1 -0
- package/src/components/blocks/audio.jsx +2 -0
- package/src/components/blocks/circuit-board.jsx +2 -0
- package/src/components/blocks/drawio-block.jsx +2 -0
- package/src/components/blocks/excalidraw.jsx +2 -0
- package/src/components/blocks/figma-block.jsx +2 -0
- package/src/components/blocks/mermaid.jsx +2 -0
- package/src/components/blocks/video.jsx +2 -0
- package/src/components/credit-button.jsx +2 -0
- package/src/components/dev-refresh.jsx +2 -0
- package/src/components/error-state.jsx +2 -0
- package/src/components/feedback/client.jsx +1 -0
- package/src/components/feedback/github.js +1 -0
- package/src/components/feedback/schema.js +1 -0
- package/src/components/fumadocs/layout/docs/client.jsx +4 -0
- package/src/components/fumadocs/layout/docs/index.jsx +1 -0
- package/src/components/fumadocs/layout/docs/page/client.jsx +2 -0
- package/src/components/fumadocs/layout/docs/page/docs-toc.jsx +9 -0
- package/src/components/fumadocs/layout/docs/page/index.jsx +1 -0
- package/src/components/fumadocs/layout/docs/sidebar.jsx +2 -0
- package/src/components/fumadocs/layout/editor-button.jsx +2 -0
- package/src/components/fumadocs/layout/home/client.jsx +2 -0
- package/src/components/fumadocs/layout/home/index.jsx +1 -0
- package/src/components/fumadocs/layout/link-item.jsx +2 -0
- package/src/components/fumadocs/layout/page-actions.jsx +2 -0
- package/src/components/fumadocs/layout/search-toggle.jsx +2 -0
- package/src/components/fumadocs/layout/shared.jsx +1 -0
- package/src/components/fumadocs/layout/sidebar/base.jsx +2 -0
- package/src/components/fumadocs/layout/sidebar/link-item.jsx +2 -0
- package/src/components/fumadocs/layout/sidebar/page-tree.jsx +1 -0
- package/src/components/fumadocs/layout/sidebar/tabs/dropdown.jsx +2 -0
- package/src/components/fumadocs/layout/sidebar/tabs/index.jsx +1 -0
- package/src/components/fumadocs/layout/sidebar-back-button.jsx +2 -0
- package/src/components/fumadocs/layout/sidebar-footer.jsx +1 -0
- package/src/components/fumadocs/layout/theme-toggle.jsx +2 -0
- package/src/components/fumadocs/mdx/base-ui.jsx +1 -0
- package/src/components/fumadocs/mdx/blocks.jsx +1 -0
- package/src/components/fumadocs/mdx/openapi.js +1 -0
- package/src/components/fumadocs/mdx-server.js +1 -0
- package/src/components/fumadocs/mdx.jsx +1 -0
- package/src/components/fumadocs/search-toggle.jsx +2 -0
- package/src/components/fumadocs/search.jsx +2 -0
- package/src/components/fumadocs/toc/clerk.jsx +2 -0
- package/src/components/fumadocs/toc/default.jsx +2 -0
- package/src/components/fumadocs/toc/index.jsx +2 -0
- package/src/components/language-switcher.jsx +2 -0
- package/src/components/logo-loader.jsx +2 -0
- package/src/components/logo.jsx +1 -0
- package/src/components/markdown.jsx +2 -0
- package/src/components/not-found.jsx +1 -0
- package/src/components/page-transition.jsx +2 -0
- package/src/components/story/badge.js +1 -0
- package/src/components/story/button.js +1 -0
- package/src/components/story/index.js +1 -0
- package/src/components/ui/accordion.jsx +1 -0
- package/src/components/ui/alert-dialog.jsx +1 -0
- package/src/components/ui/alert.jsx +1 -0
- package/src/components/ui/aspect-ratio.jsx +1 -0
- package/src/components/ui/avatar.jsx +2 -0
- package/src/components/ui/badge.client.jsx +2 -0
- package/src/components/ui/badge.jsx +1 -0
- package/src/components/ui/breadcrumb.jsx +1 -0
- package/src/components/ui/button-group.jsx +1 -0
- package/src/components/ui/button.client.jsx +2 -0
- package/src/components/ui/button.jsx +1 -0
- package/src/components/ui/calendar.jsx +2 -0
- package/src/components/ui/card.jsx +1 -0
- package/src/components/ui/carousel.jsx +1 -0
- package/src/components/ui/chart.jsx +6 -0
- package/src/components/ui/checkbox.jsx +2 -0
- package/src/components/ui/collapsible.jsx +1 -0
- package/src/components/ui/combobox.jsx +2 -0
- package/src/components/ui/command.jsx +1 -0
- package/src/components/ui/context-menu.jsx +2 -0
- package/src/components/ui/dialog.jsx +2 -0
- package/src/components/ui/direction.jsx +1 -0
- package/src/components/ui/drawer.jsx +2 -0
- package/src/components/ui/dropdown-menu.jsx +1 -0
- package/src/components/ui/empty.jsx +1 -0
- package/src/components/ui/field.jsx +2 -0
- package/src/components/ui/hover-card.jsx +2 -0
- package/src/components/ui/input-group.jsx +1 -0
- package/src/components/ui/input-otp.jsx +1 -0
- package/src/components/ui/input.jsx +1 -0
- package/src/components/ui/item.jsx +1 -0
- package/src/components/ui/kbd.jsx +1 -0
- package/src/components/ui/label.jsx +2 -0
- package/src/components/ui/menubar.jsx +1 -0
- package/src/components/ui/native-select.jsx +1 -0
- package/src/components/ui/navigation-menu.jsx +1 -0
- package/src/components/ui/pagination.jsx +1 -0
- package/src/components/ui/popover.jsx +1 -0
- package/src/components/ui/progress.jsx +2 -0
- package/src/components/ui/radio-group.jsx +1 -0
- package/src/components/ui/resizable.jsx +2 -0
- package/src/components/ui/scroll-area.jsx +1 -0
- package/src/components/ui/select.jsx +2 -0
- package/src/components/ui/separator.jsx +1 -0
- package/src/components/ui/sheet.jsx +1 -0
- package/src/components/ui/sidebar.jsx +1 -0
- package/src/components/ui/skeleton.jsx +1 -0
- package/src/components/ui/slider.jsx +2 -0
- package/src/components/ui/sonner.jsx +1 -0
- package/src/components/ui/spinner.jsx +1 -0
- package/src/components/ui/switch.jsx +2 -0
- package/src/components/ui/table.jsx +1 -0
- package/src/components/ui/tabs.jsx +2 -0
- package/src/components/ui/textarea.jsx +1 -0
- package/src/components/ui/toggle-group.jsx +2 -0
- package/src/components/ui/toggle.jsx +1 -0
- package/src/components/ui/tooltip.jsx +2 -0
- package/src/config.js +1 -0
- package/src/features/ai/chat/agents.js +1 -0
- package/src/features/ai/chat/components/api-key-form.jsx +2 -0
- package/src/features/ai/chat/components/brand.jsx +2 -0
- package/src/features/ai/chat/components/content.jsx +2 -0
- package/src/features/ai/chat/components/layout.jsx +2 -0
- package/src/features/ai/chat/components/message.jsx +2 -0
- package/src/features/ai/chat/components/model-select.jsx +2 -0
- package/src/features/ai/chat/components/panels.jsx +2 -0
- package/src/features/ai/chat/components/prompt.jsx +3 -0
- package/src/features/ai/chat/components/tool-renderer.jsx +2 -0
- package/src/features/ai/chat/components/trigger.jsx +2 -0
- package/src/features/ai/chat/constants.js +1 -0
- package/src/features/ai/chat/handler.js +1 -0
- package/src/features/ai/chat/hooks/use-pages.js +2 -0
- package/src/features/ai/chat/index.js +1 -0
- package/src/features/ai/chat/panel-store.js +2 -0
- package/src/features/ai/chat/provider.jsx +7 -0
- package/src/features/ai/chat/selection-store.js +2 -0
- package/src/features/ai/chat/settings-store.js +2 -0
- package/src/features/ai/chat/store.js +1 -0
- package/src/features/ai/chat/tools.js +1 -0
- package/src/features/ai/chat/types.js +1 -0
- package/src/features/ai/playground/agents.js +1 -0
- package/src/features/ai/playground/tools.js +1 -0
- package/src/features/ai/shared/create-model.js +1 -0
- package/src/features/ai/shared/filter-reasoning.js +1 -0
- package/src/features/changelog/components/changelog-list.jsx +2 -0
- package/src/features/changelog/components/entry-content.jsx +2 -0
- package/src/features/changelog/index.js +1 -0
- package/src/features/docs/components/page-content.jsx +2 -0
- package/src/features/docs/index.js +1 -0
- package/src/features/docs/section-page.jsx +1 -0
- package/src/features/feedback/components/feedback-block-mdx.jsx +2 -0
- package/src/features/feedback/components/feedback.jsx +2 -0
- package/src/features/feedback/github.js +6 -0
- package/src/features/feedback/index.js +1 -0
- package/src/features/feedback/schema.js +1 -0
- package/src/features/marketing/components/home.jsx +1 -0
- package/src/features/marketing/index.js +1 -0
- package/src/features/mdx-playground/components/editor.jsx +2 -0
- package/src/features/mdx-playground/components/playground-provider.jsx +2 -0
- package/src/features/mdx-playground/components/playground-sidebar.jsx +2 -0
- package/src/features/mdx-playground/components/playground.jsx +2 -0
- package/src/features/mdx-playground/components/proposal-context.jsx +2 -0
- package/src/features/mdx-playground/components/update-content-card.jsx +2 -0
- package/src/features/mdx-playground/hooks/use-mdx-compiler.js +1 -0
- package/src/features/mdx-playground/hooks/use-playground-chat.js +7 -0
- package/src/features/mdx-playground/lib/compile.js +19 -0
- package/src/features/mdx-playground/lib/components-reference.js +1 -0
- package/src/features/mdx-playground/store/settings.js +1 -0
- package/src/hooks/use-copy-button.js +1 -0
- package/src/hooks/use-locale.js +2 -0
- package/src/hooks/use-mobile.js +1 -0
- package/src/i18n.d.ts +23 -0
- package/src/lib/cn.js +1 -0
- package/src/lib/content-source.js +1 -0
- package/src/lib/create-docs-layout.jsx +1 -0
- package/src/lib/create-docs-page.jsx +1 -0
- package/src/lib/i18n.js +1 -0
- package/src/lib/layout.shared.jsx +1 -0
- package/src/lib/llms.js +1 -0
- package/src/lib/mdx-compiler.js +1 -0
- package/src/lib/mdx-plugins.js +1 -0
- package/src/lib/merge-refs.js +1 -0
- package/src/lib/navigation.js +2 -0
- package/src/lib/openapi.js +1 -0
- package/src/lib/pages-api.js +1 -0
- package/src/lib/rss.js +1 -0
- package/src/lib/sitemap.js +1 -0
- package/src/lib/source.js +3 -0
- package/src/lib/story.js +1 -0
- package/src/lib/theme-transition.js +23 -0
- package/src/lib/urls.js +1 -0
- package/src/lib/utils.js +1 -0
- package/src/locale.config.js +1 -0
- package/src/styles/app.css +20 -0
- package/src/styles/theme.css +301 -0
- package/tsconfig.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{generateStaticParams,generateMetadata,default}from"@/features/docs/section-page";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createDocsLayout as o}from"@/lib/create-docs-layout";export default o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{LogoLoader as t}from"@/components/logo-loader";export default function r(){return e("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:e(t,{className:"size-14"})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import t from"next/dynamic";import{AISearchTrigger as i}from"@/features/ai/chat";import{MessageCircleIcon as o}from"lucide-react";import{Transition as s}from"@/components/page-transition";let n=t(()=>import("@/features/ai/chat").then(e=>({default:e.AISearchPanel})),{ssr:!1});export default function l({children:t}){return a(r,{children:[e(n,{}),e(s,{className:"flex flex-col flex-1",children:t}),e(i,{position:"float","aria-label":"Ask AI",variant:"secondary",size:"icon",className:"rounded-full text-muted-foreground size-12",children:e(o,{className:"size-5"})})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{HomePage as r}from"@/features/marketing";export default async function a({params:e}){let{lang:n}=await e;return t(r,{lang:n})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createDocsLayout as o}from"@/lib/create-docs-layout";export default o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createDocsPage as a}from"@/lib/create-docs-page";import{ChangelogEntryContent as t}from"@/features/changelog";import{getMDXComponents as o}from"@/components/fumadocs/mdx";export const{generateStaticParams,generateMetadata,default:Page}=a("changelog",{render:({page:a,toc:r,lang:d,MDX:n})=>e(t,{toc:r,lang:d,lastModified:a.data.lastModified??null,version:a.data.version,date:a.data.date,children:e(n,{components:o()})})});export default Page;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Transition as r}from"@/components/page-transition";export default function t({children:o}){return e(r,{className:"flex flex-col flex-1",children:o})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{getSources as e}from"@/lib/source";import{localeConfig as a}from"@/locale.config";import{ChangelogList as r}from"@/features/changelog";export async function generateMetadata({params:t}){let{lang:e}=await t,r=a[e]?.translations??a.en.translations,n=a[e]?.siteName??a.en.siteName;return{title:`${r.changelog} — ${n}`}}export default async function n({params:a}){let{lang:i}=await a,{changelogSource:o}=await e();return t(r,{entries:o.getPages(i).map(t=>({url:t.url,title:t.data.title,summary:t.data.summary??null,version:t.data.version,date:t.data.date})).sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime()),lang:i})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{DevRefresh as t}from"@/components/dev-refresh";import a from"@/components/fumadocs/search";import{getLocaleDir as o,i18n as n}from"@/lib/i18n";import{localeConfig as i,locales as m}from"@/locale.config";import{defineI18nUI as s}from"@fumadocs/base-ui/i18n";import{RootProvider as p}from"@fumadocs/base-ui/provider/next";import{redirect as f}from"next/navigation";import l from"./lang-setup";let{provider:c}=s(n,{translations:Object.fromEntries(m.map(r=>[r,{displayName:i[r].displayName,...i[r].translations}]))});export function generateStaticParams(){return m.map(r=>({lang:r}))}export default async function u({children:i,params:m}){let{lang:s}=await m;n.languages.includes(s)||f(`/${n.defaultLanguage}`);let d=o(s),g="auto"===d?"ltr":d;return e(p,{i18n:c(s),dir:g,search:{SearchDialog:a},children:[r(l,{lang:s,dir:d}),i,"development"===process.env.NODE_ENV&&r(t,{})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{LogoLoader as t}from"@/components/logo-loader";export default function r(){return e("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:e(t,{className:"size-14"})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getRSS as t}from"@/lib/rss";import{locales as e}from"@/locale.config";export const dynamic="force-static";export function generateStaticParams(){return e.map(t=>({lang:t}))}export async function GET(e,{params:r}){let{lang:a}=await r;return new Response(await t(a),{headers:{"Content-Type":"application/rss+xml; charset=utf-8"}})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{watch as e,existsSync as n}from"node:fs";import{env as t}from"@/config";export const dynamic="force-dynamic";export function GET(){return"development"!==process.env.NODE_ENV?new Response("Not found",{status:404}):new Response(new ReadableStream({start(o){if(o.enqueue("data: connected\n\n"),!n(t.CONTENT_DIR))return;let r=e(t.CONTENT_DIR,{recursive:!0},()=>{o.enqueue("data: change\n\n")});o.close=()=>r.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{handleChat as r}from"@/features/ai/chat/handler";export async function POST(t){return r(t)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getPageEntries as o}from"@/lib/pages-api";export const dynamic="force-static";export async function GET(){return Response.json(await o())}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSources as t}from"@/lib/source";export const dynamic="force-static";export async function GET(){let{searchServer:c}=await t();return c.staticGET()}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const metadata={robots:{index:!1,follow:!1}};export default function t({children:o}){return o}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import"@excalidraw/excalidraw/index.css";import{lazy as r,Suspense as d,useState as a}from"react";import{useSearchParams as t}from"next/navigation";let n=r(async()=>{if("u"<typeof window)return{default:()=>null};let{Excalidraw:i}=await import("@excalidraw/excalidraw");return{default:({initialData:o,viewMode:r})=>e(i,{initialData:o,viewModeEnabled:r})}});function l(){let o=t().get("data"),r=o?JSON.parse(decodeURIComponent(o)):void 0,[l,c]=a(!0);return i("div",{id:"excalidraw-root",children:[e("button",{id:"mode-toggle",className:l?"":"edit",onClick:()=>c(e=>!e),children:l?"✏️":"👁️"}),e(d,{fallback:null,children:e(n,{initialData:r,viewMode:l})})]})}export default function c(){return i(o,{children:[e("style",{href:"excalidraw-page",precedence:"default",children:`
|
|
3
|
+
body { overflow: hidden; }
|
|
4
|
+
#excalidraw-root { position: fixed; inset: 0; }
|
|
5
|
+
#mode-toggle {
|
|
6
|
+
position: absolute; top: 10px; inset-inline-end: 10px; z-index: 10;
|
|
7
|
+
padding: 6px 12px; border-radius: 6px; border: 1px solid #ced4da;
|
|
8
|
+
background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
|
|
9
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
10
|
+
}
|
|
11
|
+
#mode-toggle:hover { background: #f1f3f5; }
|
|
12
|
+
#mode-toggle.edit { background: #e7f5ff; border-color: #74c0fc; color: #1971c2; }
|
|
13
|
+
`}),e("div",{id:"excalidraw-root",children:e(d,{fallback:null,children:e(l,{})})})]})}
|
package/app/layout.jsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import"@/styles/app.css";import{defaultLocale as e}from"@/locale.config";import{AIProvider as t}from"@/features/ai/chat";export default function i({children:n}){return r("html",{lang:e,suppressHydrationWarning:!0,children:r("body",{className:"flex flex-col min-h-screen",children:r(t,{children:n})})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLlmsFullText as t}from"@/lib/llms";export const dynamic="force-static";export async function GET(){return new Response(await t())}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLlmsMdxStaticParams as t,getLlmsMdxPage as a}from"@/lib/llms";import{notFound as e}from"next/navigation";export const dynamic="force-static";export async function GET(t,{params:n}){let{section:r,slug:o}=await n,i=await a(r,o);return i||e(),new Response(i,{headers:{"Content-Type":"text/markdown"}})}export{t as generateStaticParams};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getLlmsIndex as t}from"@/lib/llms";export const dynamic="force-static";export async function GET(){return new Response(await t())}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import n from"next/link";import{i18n as r}from"@/lib/i18n";import{localeConfig as o}from"@/locale.config";export default function a(){let a=o[r.defaultLanguage]?.translations??o.en.translations;return t("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4 text-center px-4",children:[e("h1",{className:"text-4xl font-bold",children:a.notFoundTitle}),e("p",{className:"text-muted-foreground",children:a.notFoundDescription}),e(n,{href:`/${r.defaultLanguage}`,className:"underline text-sm text-muted-foreground hover:text-foreground",children:a.notFoundBack})]})}
|
package/app/page.jsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{redirect as t}from"next/navigation";import{i18n as i}from"@/lib/i18n";export default function n(){t(`/${i.defaultLanguage}`)}
|
package/app/robots.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{env as e}from"@/config";export default function t(){return{rules:{userAgent:"*",allow:"/"},sitemap:`${e.SITE_URL}/sitemap.xml`}}
|
package/app/sitemap.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{buildSitemap as default}from"@/lib/sitemap";
|
package/next.config.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const config = {
|
|
3
|
+
reactStrictMode: true,
|
|
4
|
+
|
|
5
|
+
// Prevent heavy server-only packages from being bundled into client chunks
|
|
6
|
+
serverExternalPackages: ["twoslash", "typescript", "gray-matter"],
|
|
7
|
+
|
|
8
|
+
// Serve optimised AVIF/WebP variants for any next/image usage
|
|
9
|
+
images: {
|
|
10
|
+
formats: ["image/avif", "image/webp"],
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default config;
|
package/package.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ahmedrowaihi/8n-starter",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"exports": {
|
|
6
|
+
"./package.json": "./package.json"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "next dev",
|
|
10
|
+
"build": "next build",
|
|
11
|
+
"start": "next start",
|
|
12
|
+
"build:dist": "tsx scripts/build-dist.mts",
|
|
13
|
+
"generate:api": "tsx scripts/generate-docs.mts",
|
|
14
|
+
"types:check": "tsc --noEmit",
|
|
15
|
+
"lint": "biome check",
|
|
16
|
+
"format": "biome format --write"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"app",
|
|
20
|
+
"src",
|
|
21
|
+
"public",
|
|
22
|
+
"next.config.mjs",
|
|
23
|
+
"postcss.config.mjs",
|
|
24
|
+
"tsconfig.json"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@ai-sdk/anthropic": "^3.0.58",
|
|
28
|
+
"@ai-sdk/openai-compatible": "^2.0.35",
|
|
29
|
+
"@ai-sdk/react": "^3.0.118",
|
|
30
|
+
"@base-ui/react": "^1.3.0",
|
|
31
|
+
"@codemirror/lang-javascript": "^6.2.5",
|
|
32
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
33
|
+
"@codemirror/language": "^6.12.2",
|
|
34
|
+
"@codemirror/language-data": "^6.5.2",
|
|
35
|
+
"@codemirror/merge": "^6.12.1",
|
|
36
|
+
"@codemirror/state": "^6.6.0",
|
|
37
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
38
|
+
"@codemirror/view": "^6.40.0",
|
|
39
|
+
"@excalidraw/excalidraw": "^0.18.0",
|
|
40
|
+
"@fontsource-variable/geist": "^5.2.8",
|
|
41
|
+
"@fumadocs/base-ui": "^16.6.17",
|
|
42
|
+
"@fumadocs/mdx-remote": "^1.4.6",
|
|
43
|
+
"@fumadocs/story": "^0.0.11",
|
|
44
|
+
"@lezer/highlight": "^1.2.3",
|
|
45
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
46
|
+
"@openrouter/ai-sdk-provider": "^2.3.1",
|
|
47
|
+
"@orama/orama": "^3.1.18",
|
|
48
|
+
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
49
|
+
"@streamdown/cjk": "^1.0.2",
|
|
50
|
+
"@streamdown/code": "^1.1.0",
|
|
51
|
+
"@streamdown/math": "^1.0.2",
|
|
52
|
+
"@streamdown/mermaid": "^1.0.2",
|
|
53
|
+
"@t3-oss/env-nextjs": "^0.13.10",
|
|
54
|
+
"@vidstack/react": "^1.12.13",
|
|
55
|
+
"ai": "^6.0.116",
|
|
56
|
+
"class-variance-authority": "^0.7.1",
|
|
57
|
+
"clsx": "^2.1.1",
|
|
58
|
+
"cmdk": "^1.1.1",
|
|
59
|
+
"codemirror": "^6.0.2",
|
|
60
|
+
"date-fns": "^4.1.0",
|
|
61
|
+
"embla-carousel-react": "^8.6.0",
|
|
62
|
+
"feed": "^5.2.0",
|
|
63
|
+
"flexsearch": "^0.8.212",
|
|
64
|
+
"fumadocs-core": "16.6.17",
|
|
65
|
+
"fumadocs-openapi": "^10.3.18",
|
|
66
|
+
"fumadocs-twoslash": "^3.1.14",
|
|
67
|
+
"fumadocs-ui": "^16.6.17",
|
|
68
|
+
"gray-matter": "^4.0.3",
|
|
69
|
+
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
70
|
+
"input-otp": "^1.4.2",
|
|
71
|
+
"katex": "^0.16.38",
|
|
72
|
+
"lucide-react": "^0.577.0",
|
|
73
|
+
"mermaid": "^11.13.0",
|
|
74
|
+
"motion": "^12.36.0",
|
|
75
|
+
"next": "^16.0.0",
|
|
76
|
+
"next-themes": "^0.4.6",
|
|
77
|
+
"react": "^19.2.4",
|
|
78
|
+
"react-day-picker": "^9.14.0",
|
|
79
|
+
"react-dom": "^19.2.4",
|
|
80
|
+
"react-resizable-panels": "^4.7.3",
|
|
81
|
+
"react-tweet": "^3.3.0",
|
|
82
|
+
"recharts": "2.15.4",
|
|
83
|
+
"rehype-katex": "^7.0.1",
|
|
84
|
+
"remark": "^15.0.1",
|
|
85
|
+
"remark-frontmatter": "^5.0.0",
|
|
86
|
+
"remark-gfm": "^4.0.1",
|
|
87
|
+
"remark-math": "^6.0.0",
|
|
88
|
+
"remark-rehype": "^11.1.2",
|
|
89
|
+
"scroll-into-view-if-needed": "^3.1.0",
|
|
90
|
+
"shadcn": "^4.0.8",
|
|
91
|
+
"sonner": "^2.0.7",
|
|
92
|
+
"streamdown": "^2.4.0",
|
|
93
|
+
"tailwind-merge": "^3.5.0",
|
|
94
|
+
"tw-animate-css": "^1.4.0",
|
|
95
|
+
"twoslash": "^0.3.6",
|
|
96
|
+
"unist-util-visit": "^5.1.0",
|
|
97
|
+
"use-stick-to-bottom": "^1.1.3",
|
|
98
|
+
"vaul": "^1.1.2",
|
|
99
|
+
"zod": "^4.3.6",
|
|
100
|
+
"zustand": "^5.0.11"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@biomejs/biome": "^2.4.6",
|
|
104
|
+
"@swc/core": "^1.15.18",
|
|
105
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
106
|
+
"@types/hast": "^3.0.4",
|
|
107
|
+
"@types/mdx": "^2.0.13",
|
|
108
|
+
"@types/node": "^25.5.0",
|
|
109
|
+
"@types/react": "^19.2.14",
|
|
110
|
+
"@types/react-dom": "^19.2.3",
|
|
111
|
+
"tailwindcss": "^4.2.1",
|
|
112
|
+
"tsx": "^4.21.0",
|
|
113
|
+
"typescript": "^5.9.3"
|
|
114
|
+
},
|
|
115
|
+
"version": "2.2.0"
|
|
116
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Thmanyah Docs",
|
|
3
|
+
"short_name": "Docs",
|
|
4
|
+
"description": "A docs starter built with Fumadocs, Next, and Thmanyah fonts.",
|
|
5
|
+
"start_url": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#ffffff",
|
|
8
|
+
"theme_color": "#000000",
|
|
9
|
+
"icons": [
|
|
10
|
+
{
|
|
11
|
+
"src": "/apple-touch-icon.png",
|
|
12
|
+
"sizes": "180x180",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "/thmanyah-icon.svg",
|
|
17
|
+
"sizes": "any",
|
|
18
|
+
"type": "image/svg+xml",
|
|
19
|
+
"purpose": "any maskable"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M9.8339 17.7084C11.1402 16.073 11.6679 14.4352 11.8974 12.7433H12.1101C12.3396 14.4352 12.8673 16.073 14.1736 17.7084H14.3023L16.5019 13.3224C13.9398 11.8729 12.9035 9.87848 12.1716 7.29163H11.836C11.104 9.87848 10.0677 11.8729 7.50558 13.3224L9.70519 17.7084H9.8339Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{Button as r}from"@/components/ui/button";import{cn as s}from"@/lib/utils";import{ArrowDownIcon as n,DownloadIcon as a}from"lucide-react";import{useCallback as l}from"react";import{StickToBottom as i,useStickToBottomContext as c}from"use-stick-to-bottom";export const Conversation=({className:t,...o})=>e(i,{className:s("relative flex-1 overflow-y-hidden",t),initial:"smooth",resize:"smooth",role:"log",...o});export const ConversationContent=({className:t,...o})=>e(i.Content,{className:s("flex flex-col gap-8 p-4",t),...o});export const ConversationEmptyState=({className:r,title:n="No messages yet",description:a="Start a conversation to see messages here",icon:l,children:i,...c})=>e("div",{className:s("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",r),...c,children:i??t(o,{children:[l&&e("div",{className:"text-muted-foreground",children:l}),t("div",{className:"space-y-1",children:[e("h3",{className:"font-medium text-sm",children:n}),a&&e("p",{className:"text-muted-foreground text-sm",children:a})]})]})});export const ConversationScrollButton=({className:t,...o})=>{let{isAtBottom:a,scrollToBottom:i}=c(),m=l(()=>{i()},[i]);return!a&&e(r,{className:s("absolute bottom-4 inset-s-[50%] translate-x-[-50%] rtl:-translate-x-[-50%] rounded-full dark:bg-background dark:hover:bg-muted",t),onClick:m,size:"icon",type:"button",variant:"outline",...o,children:e(n,{className:"size-4"})})};let m=e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);return`**${t}:** ${e.parts.filter(e=>"text"===e.type).map(e=>e.text).join("")}`};export const messagesToMarkdown=(e,t=m)=>e.map((e,o)=>t(e,o)).join("\n\n");export const ConversationDownload=({messages:t,filename:o="conversation.md",formatMessage:n=m,className:i,children:c,...d})=>{let u=l(()=>{let e=new Blob([messagesToMarkdown(t,n)],{type:"text/markdown"}),r=URL.createObjectURL(e),s=document.createElement("a");s.href=r,s.download=o,document.body.append(s),s.click(),s.remove(),URL.revokeObjectURL(r)},[t,o,n]);return e(r,{className:s("absolute top-4 inset-e-4 rounded-full dark:bg-background dark:hover:bg-muted",i),onClick:u,size:"icon",type:"button",variant:"outline",...d,children:c??e(a,{className:"size-4"})})};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useControllableState as r}from"@radix-ui/react-use-controllable-state";import{Collapsible as n,CollapsibleContent as a,CollapsibleTrigger as i}from"@/components/ui/collapsible";import{cn as s}from"@/lib/utils";import{cjk as l}from"@streamdown/cjk";import{code as m}from"@streamdown/code";import{math as d}from"@streamdown/math";import{mermaid as u}from"@streamdown/mermaid";import{BrainIcon as c,ChevronDownIcon as p}from"lucide-react";import{createContext as g,memo as f,useCallback as h,useContext as x,useEffect as R,useMemo as w,useRef as N,useState as T}from"react";import{Streamdown as b}from"streamdown";import{Shimmer as v}from"./shimmer";let C=g(null);export const useReasoning=()=>{let e=x(C);if(!e)throw Error("Reasoning components must be used within Reasoning");return e};export const Reasoning=f(({className:t,isStreaming:o=!1,open:a,defaultOpen:i,onOpenChange:l,duration:m,children:d,...u})=>{let c=i??o,p=!1===i,[g,f]=r({defaultProp:c,onChange:l,prop:a}),[x,b]=r({defaultProp:void 0,prop:m}),v=N(o),[j,y]=T(!1),P=N(null);R(()=>{o?(v.current=!0,null===P.current&&(P.current=Date.now())):null!==P.current&&(b(Math.ceil((Date.now()-P.current)/1e3)),P.current=null)},[o,b]),R(()=>{!o||g||p||f(!0)},[o,g,f,p]),R(()=>{if(v.current&&!o&&g&&!j){let e=setTimeout(()=>{f(!1),y(!0)},1e3);return()=>clearTimeout(e)}},[o,g,f,j]);let k=h(e=>{f(e)},[f]),z=w(()=>({duration:x,isOpen:g,isStreaming:o,setIsOpen:f}),[x,g,o,f]);return e(C.Provider,{value:z,children:e(n,{className:s("not-prose mb-4",t),onOpenChange:k,open:g,...u,children:d})})});let j=(o,r)=>o||0===r?e(v,{duration:1,children:"Thinking..."}):void 0===r?e("p",{children:"Thought for a few seconds"}):t("p",{children:["Thought for ",r," seconds"]});export const ReasoningTrigger=f(({className:r,children:n,getThinkingMessage:a=j,...l})=>{let{isStreaming:m,isOpen:d,duration:u}=useReasoning();return e(i,{className:s("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",r),...l,children:n??t(o,{children:[e(c,{className:"size-4"}),a(m,u),e(p,{className:s("size-4 transition-transform",d?"rotate-180":"rotate-0")})]})})});let y={cjk:l,code:m,math:d,mermaid:u};export const ReasoningContent=f(({className:t,children:o,...r})=>e(a,{className:s("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",t),...r,children:e(b,{plugins:y,children:o})}));Reasoning.displayName="Reasoning",ReasoningTrigger.displayName="ReasoningTrigger",ReasoningContent.displayName="ReasoningContent";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{cn as e}from"@/lib/utils";import{motion as a}from"motion/react";import{memo as t,useMemo as o}from"react";let n=new Map;export const Shimmer=t(({children:t,as:i="p",className:c,duration:l=2,spread:s=2})=>{var d;let g,m=(d=i,(g=n.get(d))||(g=a.create(d),n.set(d,g)),g),p=o(()=>(t?.length??0)*s,[t,s]);return r(m,{animate:{backgroundPosition:"0% center"},className:e("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",c),initial:{backgroundPosition:"100% center"},style:{"--spread":`${p}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},transition:{duration:l,ease:"linear",repeat:Infinity},children:t})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAPIPage as o}from"fumadocs-openapi/ui";import{openapi as p}from"@/lib/openapi";import i from"./api-page.client";export const APIPage=o(p,{client:i});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{MediaPlayer as o,MediaProvider as t}from"@vidstack/react";import{useEffect as a,useRef as l}from"react";import{DefaultAudioLayout as i,defaultLayoutIcons as s}from"@vidstack/react/player/layouts/default";import{useDir as u}from"@/hooks/use-locale";let d={Play:"تشغيل",Pause:"إيقاف مؤقت",Mute:"كتم الصوت",Unmute:"تشغيل الصوت",Volume:"الصوت",Replay:"إعادة التشغيل",Seek:"التقديم","Seek Forward":"تقديم","Seek Backward":"ترجيع",Download:"تنزيل",Speed:"السرعة",Normal:"عادي",Loop:"تكرار",LIVE:"مباشر","Skip To Live":"الانتقال إلى البث المباشر",Settings:"الإعدادات",Chapters:"الفصول"};export function Audio({src:m,title:n=""}){let c=u(),p=l(null);return a(()=>()=>{p.current?.pause()},[]),r(o,{ref:p,src:m,title:n,dir:"ltr",viewType:"audio",logLevel:"warn",className:"w-full rounded-lg overflow-hidden my-4",children:[e(t,{}),e(i,{icons:s,translations:"rtl"===c?d:void 0})]})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{motion as i,useReducedMotion as o}from"motion/react";import{Server as n,Database as a,Cloud as l,Globe as s,Cpu as d,Monitor as c,Smartphone as h,Shield as u,Lock as f,Key as p,Settings as g,HardDrive as m,Archive as x,Package as y,Mail as $,MessageSquare as k,Bell as b,User as v,Users as w,Code as M,Terminal as L,Zap as D,RefreshCw as W,CheckCircle as j,XCircle as O,AlertCircle as z,Clock as B,Wifi as H,Radio as C,Network as N,Play as S,Pause as V,LayoutGrid as G}from"lucide-react";import{cn as I}from"@/lib/cn";let U={Server:n,Database:a,Cloud:l,Globe:s,Cpu:d,Monitor:c,Smartphone:h,Shield:u,Lock:f,Key:p,Settings:g,HardDrive:m,Archive:x,Package:y,Mail:$,MessageSquare:k,Bell:b,User:v,Users:w,Code:M,Terminal:L,Zap:D,RefreshCw:W,CheckCircle:j,XCircle:O,AlertCircle:z,Clock:B,Wifi:H,Radio:C,Network:N,Play:S,Pause:V,LayoutGrid:G},A="color-mix(in srgb, var(--color-foreground) 8%, transparent)",E="color-mix(in srgb, var(--color-foreground) 18%, transparent)",F="color-mix(in srgb, var(--color-foreground) 55%, transparent)",R="color-mix(in srgb, var(--color-foreground) 35%, transparent)",q="color-mix(in srgb, var(--color-foreground) 70%, transparent)",J="color-mix(in srgb, var(--color-muted-foreground) 90%, transparent)",K="var(--color-destructive)";function P(e){return"sm"===e?24:"lg"===e?48:36}function Q(e,r){return r?r:"active"===e?q:"processing"===e?J:"error"===e?K:R}export function CircuitBoardBlock({nodes:n,connections:a,width:l=600,height:s=400,gridSize:d=20,showGrid:c=!0,gridColor:h,traceColor:u,pulseColor:f,nodeColor:p,pulseSpeed:g=2,traceWidth:m=2,variant:x="auto",className:y}){let $=t.useId().replace(/:/g,""),k=`glow-${$}`,b=`grid-${$}`,v=o(),w=t.useMemo(()=>new Map(n.map(e=>[e.id,e])),[n]),M=u||E,L=f||F;return e("div",{className:I("not-prose my-4 w-full overflow-hidden rounded-lg border border-border","dark"===x&&"dark","light"===x&&"light",y),children:r("div",{style:{position:"relative",aspectRatio:`${l} / ${s}`},children:[r("svg",{viewBox:`0 0 ${l} ${s}`,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"},"aria-hidden":!0,children:[r("defs",{children:[r("filter",{id:k,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[e("feGaussianBlur",{stdDeviation:"3",result:"blur"}),r("feMerge",{children:[e("feMergeNode",{in:"blur"}),e("feMergeNode",{in:"SourceGraphic"})]})]}),c&&e("pattern",{id:b,width:d,height:d,patternUnits:"userSpaceOnUse",children:e("circle",{cx:d/2,cy:d/2,r:"0.5",fill:h||A})})]}),c&&e("rect",{width:l,height:s,fill:`url(#${b})`}),a.map((t,o)=>{let n=w.get(t.from),a=w.get(t.to);if(!n||!a)return null;let l=function(e,r){let t=P(e.size)/2+4,i=P(r.size)/2+4,o=r.x-e.x,n=r.y-e.y;if(Math.abs(o)>=Math.abs(n)){let n=e.x+(o>0?t:-t),a=r.x+(o>0?-i:i),l=e.x+o/2;return`M ${n} ${e.y} H ${l} V ${r.y} H ${a}`}let a=e.y+(n>0?t:-t),l=r.y+(n>0?-i:i),s=e.y+n/2;return`M ${e.x} ${a} V ${s} H ${r.x} V ${l}`}(n,a),s=t.pulseColor||L,d=.15*o;return r("g",{children:[e(i.path,{d:l,fill:"none",stroke:t.color||M,strokeWidth:m,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:+!!v},animate:{pathLength:1},transition:{duration:.8,delay:d,ease:"easeOut"}}),!1!==t.animated&&!v&&e(i.path,{d:l,fill:"none",stroke:s,strokeWidth:m+2,strokeLinecap:"round",strokeLinejoin:"round",filter:`url(#${k})`,strokeDasharray:`${50} ${450}`,initial:{strokeDashoffset:500},animate:{strokeDashoffset:-500},transition:{duration:g,repeat:1/0,ease:"linear",delay:d+.8}}),t.bidirectional&&!v&&e(i.path,{d:l,fill:"none",stroke:s,strokeWidth:m+2,strokeLinecap:"round",strokeLinejoin:"round",filter:`url(#${k})`,strokeDasharray:`${50} ${450}`,initial:{strokeDashoffset:-500},animate:{strokeDashoffset:500},transition:{duration:g,repeat:1/0,ease:"linear",delay:d+.8+g/2}})]},`${t.from}-${t.to}-${o}`)}),n.map(t=>{let o=P(t.size),n=o/2,a=Q(t.status,p);return r("g",{children:[e("rect",{x:t.x-n,y:t.y-n,width:o,height:o,rx:"6",fill:a,fillOpacity:"0.12"}),e("rect",{x:t.x-n,y:t.y-n,width:o,height:o,rx:"6",fill:"none",stroke:a,strokeWidth:"1.5"}),"active"===t.status&&!v&&e(i.rect,{x:t.x-n,y:t.y-n,width:o,height:o,rx:"6",fill:"none",stroke:a,strokeWidth:"8",strokeOpacity:"0.1",filter:`url(#${k})`,animate:{opacity:[.4,1,.4]},transition:{duration:2.5,repeat:1/0,ease:"easeInOut"}}),"processing"===t.status&&!v&&e(i.rect,{x:t.x-n,y:t.y-n,width:o,height:o,rx:"6",fill:a,animate:{opacity:[.05,.2,.05]},transition:{duration:1.5,repeat:1/0}}),t.label&&e("text",{x:t.x,y:t.y+n+13,textAnchor:"middle",fontSize:"10",fontWeight:"500",fill:a,style:{fontFamily:"var(--font-sans)"},children:t.label})]},t.id)})]}),n.map(r=>{if(!r.icon)return null;let t=U[r.icon];if(!t)return null;let i=Q(r.status,p);return e("div",{"aria-hidden":!0,style:{position:"absolute",left:`${r.x/l*100}%`,top:`${r.y/s*100}%`,transform:"translate(-50%, -50%)",color:i,pointerEvents:"none",lineHeight:0},children:e(t,{width:18,height:18,strokeWidth:1.5})},`icon-${r.id}`)})]})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{useEffect as t,useRef as r,useState as a}from"react";export function DrawioBlock({xml:i,height:l=400,variant:n="auto"}){let o=r(null),[d,m]=a(!1),[s,c]=a(!1);t(()=>{if("auto"!==n)return void c("dark"===n);let e=()=>c(document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"));e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[n]);let u=`https://embed.diagrams.net/?embed=1&proto=json&spin=1&chrome=0&nav=0&fit=1${s?"&dark=1":""}`;t(()=>{m(!1)},[u]),t(()=>{let e=e=>{if(o.current&&e.source===o.current.contentWindow)try{let t="string"==typeof e.data?JSON.parse(e.data):e.data;"init"===t.event&&m(!0)}catch{}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]);let f=i?function(e){let t='<mxCell id="0"/><mxCell id="1" parent="0"/>';if(!e||!e.trim())return`<mxfile><diagram name="Page-1" id="page-1"><mxGraphModel><root>${t}</root></mxGraphModel></diagram></mxfile>`;if(e.includes("<mxfile"))return e;if(e.includes("<mxGraphModel"))return`<mxfile><diagram name="Page-1" id="page-1">${e}</diagram></mxfile>`;let r=e;e.includes("<root>")&&(r=e.replace(/<\/?root>/g,"").trim());let a=r.lastIndexOf("/>"),i=r.lastIndexOf("</mxCell>"),l=Math.max(a,i);if(-1!==l){let e=i>a?9:2,t=r.slice(l+e);/^(\s*<\/[^>]+>)*\s*$/.test(t)&&(r=r.slice(0,l+e))}return r=r.replace(/<mxCell[^>]*\bid=["']0["'][^>]*(?:\/>|><\/mxCell>)/g,"").replace(/<mxCell[^>]*\bid=["']1["'][^>]*(?:\/>|><\/mxCell>)/g,"").trim(),`<mxfile><diagram name="Page-1" id="page-1"><mxGraphModel><root>${t}${r}</root></mxGraphModel></diagram></mxfile>`}(i):"";return t(()=>{d&&o.current&&f&&o.current.contentWindow?.postMessage(JSON.stringify({action:"load",xml:f}),"*")},[d,f]),e("div",{className:"not-prose my-4 overflow-hidden rounded-lg border border-border",style:{height:l},children:e("iframe",{ref:o,src:u,className:"h-full w-full border-none",title:"Diagram"})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as r,Fragment as a}from"react/jsx-runtime";import{useState as i}from"react";import{Maximize2 as o}from"lucide-react";import{Button as t}from"@/components/ui/button";import{Dialog as n,DialogContent as l,DialogHeader as m,DialogTitle as d}from"@/components/ui/dialog";export function ExcalidrawBlock({initialData:s,height:c=400}){let[h,p]=i(!1),x=s?`/excalidraw?data=${encodeURIComponent(JSON.stringify(s))}`:"/excalidraw";return r(a,{children:[r("div",{className:"not-prose my-4 overflow-hidden rounded-lg border relative",children:[e("iframe",{src:x,style:{border:"none",width:"100%",height:c},title:"Excalidraw diagram"}),e(t,{onClick:()=>p(!0),variant:"secondary",size:"icon-sm",className:"absolute bottom-3 inset-e-3 shadow-sm",title:"Expand",children:e(o,{})})]}),e(n,{open:h,onOpenChange:p,children:r(l,{className:"w-[70vw] max-w-[70vw] sm:max-w-[70vw] flex flex-col gap-0 p-0 overflow-hidden",children:[e(m,{className:"px-4 py-2 border-b shrink-0",children:e(d,{className:"text-sm font-medium",children:"Diagram"})}),e("iframe",{src:x,style:{border:"none",width:"100%",flex:1,minHeight:0,height:"75vh"},title:"Excalidraw diagram"})]})})]})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";export function FigmaBlock({url:r,height:o=450}){return e("div",{className:"not-prose my-2 overflow-hidden rounded-lg border border-border",style:{height:o},children:e("iframe",{src:function(e){try{let r=new URL(e);if("embed.figma.com"===r.hostname)return e;if("www.figma.com"===r.hostname||"figma.com"===r.hostname)return r.hostname="embed.figma.com",r.searchParams.set("embed-host","docs"),r.toString()}catch{}return e}(r),className:"h-full w-full border-none",title:"Figma",allowFullScreen:!0})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useEffect as e,useRef as a}from"react";import{useTheme as t}from"next-themes";import{useCopyButton as l}from"@/hooks/use-copy-button";import{Check as i,Copy as n,ExternalLink as f}from"lucide-react";import{Button as s,buttonVariants as c}from"@/components/ui/button";import{cn as d}from"@/lib/cn";let m={theme:"base",themeVariables:{fontFamily:"ThmanyahSerif, ui-serif, Georgia, serif",fontSize:"16px",primaryColor:"#ffffff",primaryTextColor:"#171717",primaryBorderColor:"#171717",mainBkg:"#ffffff",nodeBorder:"#171717",secondaryColor:"#f5f5f5",secondaryTextColor:"#171717",secondaryBorderColor:"#a3a3a3",tertiaryColor:"#f9f7ef",tertiaryTextColor:"#171717",tertiaryBorderColor:"#a3a3a3",background:"transparent",clusterBkg:"#f5f5f5",clusterBorder:"#a3a3a3",titleColor:"#171717",lineColor:"#171717",edgeLabelBackground:"#f9f7ef",textColor:"#171717",actorBkg:"#171717",actorBorder:"#171717",actorTextColor:"#fafafa",actorLineColor:"#171717",signalColor:"#171717",signalTextColor:"#171717",labelBoxBkgColor:"#f5f5f5",labelBoxBorderColor:"#a3a3a3",labelTextColor:"#171717",loopTextColor:"#171717",noteBorderColor:"#a3a3a3",noteBkgColor:"#f5f5f5",noteTextColor:"#171717",activationBorderColor:"#171717",activationBkgColor:"#e5e5e5"}},C={theme:"base",themeVariables:{fontFamily:"ThmanyahSerif, ui-serif, Georgia, serif",fontSize:"16px",primaryColor:"#323232",primaryTextColor:"#fafafa",primaryBorderColor:"#a3a3a3",mainBkg:"#323232",nodeBorder:"#a3a3a3",secondaryColor:"#383838",secondaryTextColor:"#fafafa",secondaryBorderColor:"#737373",tertiaryColor:"#282828",tertiaryTextColor:"#fafafa",tertiaryBorderColor:"#737373",background:"transparent",clusterBkg:"#383838",clusterBorder:"#737373",titleColor:"#fafafa",lineColor:"#a3a3a3",edgeLabelBackground:"#282828",textColor:"#fafafa",actorBkg:"#e5e5e5",actorBorder:"#e5e5e5",actorTextColor:"#171717",actorLineColor:"#a3a3a3",signalColor:"#fafafa",signalTextColor:"#fafafa",labelBoxBkgColor:"#323232",labelBoxBorderColor:"#737373",labelTextColor:"#fafafa",loopTextColor:"#fafafa",noteBorderColor:"#737373",noteBkgColor:"#323232",noteTextColor:"#fafafa",activationBorderColor:"#a3a3a3",activationBkgColor:"#383838"}};function g({chart:o}){let[e,a]=l(()=>{navigator.clipboard.writeText(o)});return r(s,{onClick:a,variant:"secondary",size:"sm",className:"gap-1.5 [&_svg]:size-3.5",children:e?r(i,{}):r(n,{})})}function p({chart:o}){let e=btoa(encodeURIComponent(JSON.stringify({code:o,mermaid:{theme:"neutral"}})).replace(/%([0-9A-F]{2})/g,(r,o)=>String.fromCharCode(parseInt(o,16))));return r("a",{href:`https://mermaid.live/edit#base64:${e}`,target:"_blank",rel:"noopener noreferrer",className:d(c({variant:"secondary",size:"sm"}),"gap-1.5 [&_svg]:size-3.5"),children:r(f,{})})}export function Mermaid({chart:l}){let i=a(null),{resolvedTheme:n}=t();return e(()=>{i.current&&r().catch(console.error);async function r(){let r=(await import("mermaid")).default;r.initialize({startOnLoad:!1,look:"handDrawn",handDrawnSeed:42,flowchart:{nodeSpacing:80,rankSpacing:80,padding:20},sequence:{mirrorActors:!1,messageAlign:"center",boxTextMargin:8},..."dark"===n?C:m});let o=`mermaid-${Math.random().toString(36).slice(2)}`,{svg:e}=await r.render(o,l);if(i.current){i.current.innerHTML=e;let r=i.current.querySelector("svg");r&&(r.style.opacity="0",r.style.transition="opacity 0.4s ease",requestAnimationFrame(()=>{r.style.opacity="1"}))}}},[l,n]),o("div",{className:" my-8 rounded-xl border bg-card border-border rotate-[-0.4deg] hover:rotate-0 transition-transform duration-400 ease-[cubic-bezier(0.34,1.56,0.64,1)] ",children:[o("div",{className:"flex items-center justify-end gap-2 border-b border-border px-4 py-2",children:[r(g,{chart:l}),r(p,{chart:l})]}),r("div",{ref:i,className:"flex justify-center overflow-x-auto px-6 py-8"})]})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{MediaPlayer as t,MediaProvider as a}from"@vidstack/react";import{useEffect as i,useRef as l}from"react";import{DefaultVideoLayout as r,defaultLayoutIcons as n}from"@vidstack/react/player/layouts/default";import{useDir as s}from"@/hooks/use-locale";let c={Play:"تشغيل",Pause:"إيقاف مؤقت",Mute:"كتم الصوت",Unmute:"تشغيل الصوت",Volume:"الصوت",Fullscreen:"ملء الشاشة","Enter Fullscreen":"ملء الشاشة","Exit Fullscreen":"الخروج من ملء الشاشة","Enter PiP":"صورة داخل صورة","Exit PiP":"إغلاق صورة داخل صورة",Captions:"الترجمات",Settings:"الإعدادات",Quality:"الجودة",Speed:"السرعة",Normal:"عادي",Auto:"تلقائي",Default:"افتراضي",Loop:"تكرار",Replay:"إعادة التشغيل",Seek:"التقديم","Seek Forward":"تقديم","Seek Backward":"ترجيع","Skip To Live":"الانتقال إلى البث المباشر",LIVE:"مباشر",Download:"تنزيل",Audio:"الصوت",Playback:"التشغيل",Chapters:"الفصول",AirPlay:"AirPlay","Google Cast":"Google Cast",Reset:"إعادة تعيين",Off:"إيقاف",Disabled:"معطّل","Closed-Captions Off":"الترجمات المغلقة: إيقاف","Closed-Captions On":"الترجمات المغلقة: تشغيل","Caption Styles":"أنماط الترجمة",Font:"الخط",Family:"عائلة الخط",Size:"الحجم",Color:"اللون",Opacity:"الشفافية",Shadow:"الظل",Text:"النص","Text Background":"خلفية النص","Display Background":"خلفية العرض",Track:"المسار",Accessibility:"إمكانية الوصول",Announcements:"الإعلانات","Keyboard Animations":"حركات لوحة المفاتيح",Boost:"تعزيز",Connected:"متصل",Connecting:"جارٍ الاتصال",Disconnected:"غير متصل",Continue:"متابعة",PiP:"صورة داخل صورة","Captions look like this":"تبدو الترجمات هكذا"};export function Video({src:u,title:d=""}){let p=s(),m=l(null);return i(()=>()=>{m.current?.pause()},[]),o(t,{ref:m,src:u,title:d,dir:"ltr",logLevel:"warn",className:"w-full rounded-lg overflow-hidden my-4",children:[e(a,{}),e(r,{icons:n,translations:"rtl"===p?c:void 0})]})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Tooltip as t,TooltipContent as o,TooltipProvider as i,TooltipTrigger as n}from"@/components/ui/tooltip";import{Heart as a}from"lucide-react";export function CreditButton(){return e(i,{children:r(t,{children:[e(n,{render:e("a",{href:"https://github.com/ahmedrowaihi",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center size-8 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent transition-colors","aria-label":"Built with love by @ahmedrowaihi",children:e(a,{className:"size-3.5"})})}),e(o,{side:"bottom",children:"❤️ by @ahmedrowaihi"})]})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{LogoLoader as r}from"@/components/logo-loader";export function ErrorState({error:n,reset:o,minHeight:s="min-h-screen"}){return t("div",{className:`flex flex-col items-center justify-center ${s} gap-6 text-center px-4`,children:[e(r,{className:"size-14 text-muted-foreground"}),e("h1",{className:"text-2xl font-bold",children:n.message||"Something went wrong"}),e("button",{type:"button",onClick:o,className:"underline text-sm text-muted-foreground hover:text-foreground",children:"Try again"})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Feedback,FeedbackBlock}from"@/features/feedback";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createGitHubFeedbackAction,createGitHubBlockFeedbackAction}from"@/features/feedback";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{blockFeedback,pageFeedback,actionResponse}from"@/features/feedback";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as o}from"react/jsx-runtime";import{usePathname as t,Link as e}from"@/lib/navigation";import{useIsScrollTop as r}from"@fumadocs/base-ui/utils/use-is-scroll-top";import{createContext as a,use as d,useMemo as i}from"react";import{cn as n}from"@/lib/cn";import{useSidebar as s}from"@/components/fumadocs/layout/sidebar/base";import{isTabActive as c}from"@/components/fumadocs/layout/sidebar/tabs/dropdown";export const LayoutContext=a(null);export function useDocsLayout(){let o=d(LayoutContext);if(!o)throw Error("Please use <DocsPage /> (`fumadocs-ui/layouts/docs/page`) under <DocsLayout /> (`fumadocs-ui/layouts/docs`).");return o}export function LayoutContextProvider({navTransparentMode:t="none",children:e}){let a=r({enabled:"top"===t})??!0,d="top"===t?a:"always"===t;return o(LayoutContext,{value:i(()=>({isNavTransparent:d}),[d]),children:e})}export function LayoutHeader(t){let{isNavTransparent:e}=useDocsLayout();return o("header",{"data-transparent":e,...t,children:t.children})}export function LayoutBody({className:t,style:e,children:r,...a}){let{collapsed:d}=s();return o("div",{id:"nd-docs-layout",className:n("grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]",t),"data-sidebar-collapsed":d,style:{gridTemplate:`"sidebar sidebar header toc toc"
|
|
3
|
+
"sidebar sidebar toc-popover toc toc"
|
|
4
|
+
"sidebar sidebar main toc toc" 1fr / minmax(min-content, 1fr) var(--fd-sidebar-col) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-col) - var(--fd-toc-width))) var(--fd-toc-width) minmax(min-content, 1fr)`,"--fd-docs-row-1":"var(--fd-banner-height, 0px)","--fd-docs-row-2":"calc(var(--fd-docs-row-1) + var(--fd-header-height))","--fd-docs-row-3":"calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))","--fd-sidebar-col":d?"0px":"var(--fd-sidebar-width)",...e},...a,children:r})}export function LayoutTabs({options:r,...a}){let d=t(),s=i(()=>r.findLast(o=>c(o,d)),[r,d]);return o("div",{...a,className:n("flex flex-row items-end gap-6 overflow-auto [grid-area:main]",a.className),children:r.map((t,r)=>o(e,{href:t.url,className:n("inline-flex border-b-2 border-transparent transition-colors items-center pb-1.5 font-medium gap-2 text-fd-muted-foreground text-sm text-nowrap hover:text-fd-accent-foreground",t.unlisted&&s!==t&&"hidden",s===t&&"border-fd-primary text-fd-primary"),children:t.title},r))})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{useMemo as o}from"react";import{Sidebar as n}from"lucide-react";import{cn as s}from"@/lib/cn";import{buttonVariants as r}from"@/components/ui/button";import{Sidebar as i,SidebarCollapseTrigger as l,SidebarContent as m,SidebarDrawer as d,SidebarLinkItem as c,SidebarPageTree as p,SidebarTrigger as f,SidebarViewport as h}from"./sidebar";import{renderTitleNav as u,useLinkItems as b}from"@/components/fumadocs/layout/shared";import{LinkItem as g}from"@/components/fumadocs/layout/link-item";import{LayoutBody as x,LayoutContextProvider as N,LayoutHeader as v,LayoutTabs as y}from"./client";import{TreeContextProvider as z}from"@fumadocs/base-ui/contexts/tree";import{ThemeToggle as k}from"@/components/fumadocs/layout/theme-toggle";import{LargeSearchToggle as j,SearchToggle as D}from"@/components/fumadocs/layout/search-toggle";import{getSidebarTabs as w}from"@/components/fumadocs/layout/sidebar/tabs";import{SidebarTabsDropdown as A}from"@/components/fumadocs/layout/sidebar/tabs/dropdown";export function DocsLayout({nav:{transparentMode:I,...L}={},sidebar:{tabs:F,enabled:M=!0,defaultOpenLevel:O,prefetch:P,...S}={},searchToggle:T={},themeSwitch:q={},tabMode:B="auto",i18n:C=!1,children:E,tree:G,...H}){let J=o(()=>Array.isArray(F)?F:"object"==typeof F?w(G,F):!1!==F?w(G):[],[G,F]),{menuItems:K}=b(H);return e(z,{tree:G,children:e(N,{navTransparentMode:I,children:e(i,{defaultOpenLevel:O,prefetch:P,children:a(x,{...H.containerProps,children:[!1!==L.enabled&&(L.component??a(v,{id:"nd-subnav",className:"[grid-area:header] sticky top-(--fd-docs-row-1) z-30 flex items-center ps-4 pe-2.5 border-b transition-colors backdrop-blur-sm h-(--fd-header-height) md:hidden max-md:layout:[--fd-header-height:--spacing(14)] data-[transparent=false]:bg-fd-background/80",children:[u(L,{className:"inline-flex items-center gap-2.5 font-semibold"}),e("div",{className:"flex-1",children:L.children}),!1!==T.enabled&&(T.components?.sm??e(D,{className:"p-2",hideIfDisabled:!0})),M&&e(f,{className:s(r({variant:"ghost",size:"icon-sm",className:"p-2"})),children:e(n,{})})]})),M&&function(){let{footer:o,banner:i,collapsible:b=!0,component:x,components:N,...v}=S;if(x)return x;let y=K.filter(e=>"icon"===e.type),z=a(h,{children:[K.filter(e=>"icon"!==e.type).map((a,t,o)=>e(c,{item:a,className:s(t===o.length-1&&"mb-4")},t)),e(p,{...N})]});return a(t,{children:[a(m,{...v,children:[a("div",{className:"flex flex-col gap-3 p-4 pb-2",children:[a("div",{className:"flex",children:[u(L,{className:"inline-flex text-[0.9375rem] items-center gap-2.5 font-medium me-auto"}),L.children,b&&e(l,{className:s(r({variant:"ghost",size:"icon-sm",className:"mb-auto text-fd-muted-foreground"})),children:e(n,{})})]}),!1!==T.enabled&&(T.components?.lg??e(j,{hideIfDisabled:!0})),J.length>0&&"auto"===B&&e(A,{options:J}),i]}),z,(C||y.length>0||q?.enabled!==!1||o)&&e("div",{className:"flex flex-col border-t p-4 pt-2 empty:hidden",children:a("div",{className:"flex text-fd-muted-foreground items-center empty:hidden",children:[y.map((a,t)=>e(g,{item:a,className:s(r({size:"icon-sm",variant:"ghost"})),"aria-label":a.label,children:a.icon},t)),o,!1!==q.enabled&&(q.component??e(k,{className:"ms-auto p-0",mode:q.mode}))]})})]}),a(d,{children:[a("div",{className:"flex flex-col gap-3 p-4 pb-2",children:[a("div",{className:"flex text-fd-muted-foreground items-center gap-1.5",children:[e("div",{className:"flex flex-1",children:y.map((a,t)=>e(g,{item:a,className:s(r({size:"icon-sm",variant:"ghost",className:"p-2"})),"aria-label":a.label,children:a.icon},t))}),!1!==q.enabled&&(q.component??e(k,{className:"p-0",mode:q.mode})),e(f,{className:s(r({variant:"ghost",size:"icon-sm",className:"p-2"})),children:e(n,{})})]}),J.length>0&&e(A,{options:J}),i]}),z,e("div",{className:"flex flex-col border-t p-4 pt-2 empty:hidden",children:e("div",{className:"flex text-fd-muted-foreground items-center empty:hidden",children:o})})]})]})}(),"top"===B&&J.length>0&&e(y,{options:J,className:"z-10 bg-fd-background border-b px-6 pt-3 xl:px-8 max-md:hidden"}),E]})})})})}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{createContext as o,Fragment as a,use as n,useEffect as i,useEffectEvent as s,useMemo as l,useRef as c,useState as m}from"react";import{ChevronDown as d,ChevronLeft as u,ChevronRight as p}from"lucide-react";import{Link as f,usePathname as x}from"@/lib/navigation";import{cn as h}from"@/lib/cn";import{useI18n as g}from"@fumadocs/base-ui/contexts/i18n";import{useTreeContext as v,useTreePath as N}from"@fumadocs/base-ui/contexts/tree";import{getBreadcrumbItemsFromPath as b}from"fumadocs-core/breadcrumb";import{isActive as y}from"@/lib/urls";import{Collapsible as k,CollapsibleContent as P,CollapsibleTrigger as w}from"@/components/ui/collapsible";import{useTOCItems as C}from"@/components/fumadocs/toc";import{useActiveAnchor as L}from"fumadocs-core/toc";import{useDocsLayout as z}from"@/components/fumadocs/layout/docs/client";import{useFooterItems as O}from"@fumadocs/base-ui/utils/use-footer-items";let T=o(null);export function PageTOCPopover({className:t,children:r,...o}){let a=c(null),[n,d]=m(!1),{isNavTransparent:u}=z(),p=s(e=>{n&&a.current&&!a.current.contains(e.target)&&d(!1)});return i(()=>(window.addEventListener("click",p),()=>{window.removeEventListener("click",p)}),[]),e(T,{value:l(()=>({open:n,setOpen:d}),[d,n]),children:e(k,{open:n,onOpenChange:d,"data-toc-popover":"",className:h("sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",t),...o,children:e("header",{ref:a,className:h("border-b backdrop-blur-sm transition-colors",(!u||n)&&"bg-fd-background/80",n&&"shadow-lg"),children:r})})})}export function PageTOCPopoverTrigger({className:r,...o}){let{text:a}=g(),{open:i}=n(T),s=C(),c=L(),m=l(()=>s.findIndex(e=>c===e.url.slice(1)),[s,c]),u=N().at(-1),p=-1!==m&&!i;return t(w,{className:h("flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",r),"data-toc-popover-trigger":"",...o,children:[e($,{value:(m+1)/Math.max(1,s.length),max:1,className:h("shrink-0",i&&"text-fd-primary")}),t("span",{className:"grid flex-1 *:my-auto *:row-start-1 *:col-start-1",children:[e("span",{className:h("truncate transition-[opacity,translate,color]",i&&"text-fd-foreground",p&&"opacity-0 -translate-y-full pointer-events-none"),children:u?.name??a.toc}),e("span",{className:h("truncate transition-[opacity,translate]",!p&&"opacity-0 translate-y-full pointer-events-none"),children:s[m]?.title})]}),e(d,{className:h("shrink-0 transition-transform mx-0.5",i&&"rotate-180")})]})}function $({value:r,strokeWidth:o=2,size:a=24,min:n=0,max:i=100,...s}){var l,c,m;let d=(l=r,c=n,m=i,l<c?c:l>m?m:l),u=(a-o)/2,p=2*Math.PI*u,f=d/i*p,x={cx:a/2,cy:a/2,r:u,fill:"none",strokeWidth:o};return t("svg",{role:"progressbar",viewBox:`0 0 ${a} ${a}`,"aria-valuenow":d,"aria-valuemin":n,"aria-valuemax":i,...s,children:[e("circle",{...x,className:"stroke-current/25"}),e("circle",{...x,stroke:"currentColor",strokeDasharray:p,strokeDashoffset:p-f,strokeLinecap:"round",transform:`rotate(-90 ${a/2} ${a/2})`,className:"transition-all"})]})}export function PageTOCPopoverContent(t){return e(P,{"data-toc-popover-content":"",...t,className:h("flex flex-col px-4 max-h-[50vh] md:px-6",t.className),children:t.children})}export function PageLastUpdate({date:e,...r}){let{text:o}=g(),[a,n]=m("");return i(()=>{n(e.toLocaleDateString())},[e]),t("p",{...r,className:h("text-sm text-fd-muted-foreground",r.className),children:[o.lastUpdate," ",a]})}export function PageFooter({items:o,children:a,className:n,...i}){let s=O(),c=x(),{previous:m,next:d}=l(()=>{if(o)return o;let e=s.findIndex(e=>y(e.url,c));return -1===e?{}:{previous:s[e-1],next:s[e+1]}},[s,o,c]);return t(r,{children:[t("div",{className:h("@container grid gap-4",m&&d?"grid-cols-2":"grid-cols-1",n),...i,children:[m&&e(j,{item:m,index:0}),d&&e(j,{item:d,index:1})]}),a]})}function j({item:r,index:o}){let{text:a}=g();return t(f,{href:r.url,className:h("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",1===o&&"text-end"),children:[t("div",{className:h("inline-flex items-center gap-1.5 font-medium",1===o&&"flex-row-reverse"),children:[e(0===o?u:p,{className:"-mx-1 size-4 shrink-0 rtl:rotate-180"}),e("p",{children:r.name})]}),e("p",{className:"text-fd-muted-foreground truncate",children:r.description??(0===o?a.previousPage:a.nextPage)})]})}export function PageBreadcrumb({includeRoot:r,includeSeparator:o,includePage:n,...i}){let s=N(),{root:c}=v(),m=l(()=>b(c,s,{includePage:n,includeSeparator:o,includeRoot:r}),[n,r,o,s,c]);return 0===m.length?null:e("div",{...i,className:h("flex items-center gap-1.5 text-sm text-fd-muted-foreground",i.className),children:m.map((r,o)=>{let n=h("truncate",o===m.length-1&&"text-fd-primary font-medium");return t(a,{children:[0!==o&&e(p,{className:"size-3.5 shrink-0"}),r.url?e(f,{href:r.url,className:h(n,"transition-opacity hover:opacity-80"),children:r.name}):e("span",{className:n,children:r.name})]},o)})})}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import s from"next/dynamic";let o=s(()=>import("@/features/ai/chat").then(e=>({default:e.AIChatSidebar})),{ssr:!1});import{Button as r}from"@/components/ui/button";import{Tabs as l,TabsContent as c,TabsList as i,TabsTrigger as n}from"@/components/ui/tabs";import{PanelRightClose as d,PanelRightOpen as m,Sparkles as f,Text as h}from"lucide-react";import{useEffect as p,useState as u}from"react";import{TOCProvider as x,TOCScrollArea as v}from"@/components/fumadocs/toc";import*as N from"@/components/fumadocs/toc/clerk";import*as y from"@/components/fumadocs/toc/default";export function DocsTOC({toc:s,style:g,header:b,footer:k,translations:w}){let[z,C]=u(!1),[j,E]=u(!1);p(()=>{let e=document.getElementById("nd-docs-layout");if(e)return e.style.setProperty("--fd-toc-width",z?"40px":"360px"),()=>{e.style.removeProperty("--fd-toc-width")}},[z]);let I=a=>{let s;return t(l,{defaultValue:"toc",className:"flex flex-col flex-1 min-h-0",children:[(s=a,t("div",{className:"flex items-center gap-1 mb-1 me-4 shrink-0",children:[t(i,{className:"flex-1 gap-0 px-0 border-b-0",variant:"line",children:[t(n,{value:"toc",className:"flex-1 justify-center gap-1.5 text-xs",children:[e(h,{className:"size-3.5 shrink-0"}),e("span",{className:"truncate",children:w.toc})]}),t(n,{value:"chat",className:"flex-1 justify-center gap-1.5 text-xs",children:[e(f,{className:"size-3.5 shrink-0"}),e("span",{className:"truncate",children:w.aiChatTrigger})]})]}),s?e(r,{type:"button",onClick:()=>C(!0),"aria-label":"Collapse",size:"icon-sm",variant:"ghost",className:"text-muted-foreground rounded-md shrink-0",children:e(d,{className:"size-3.5 rtl:rotate-180"})}):e(r,{type:"button",onClick:()=>{C(!1),E(!1)},"aria-label":"Pin open",size:"icon-sm",variant:"ghost",className:"text-muted-foreground rounded-md shrink-0",children:e(m,{className:"size-3.5 rtl:rotate-180"})})]})),t(c,{value:"toc",className:"flex flex-col flex-1 min-h-0 pe-4 mt-0 data-[state=inactive]:hidden",children:[b,e(v,{children:"clerk"===g?e(N.TOCItems,{}):e(y.TOCItems,{})}),k]}),e(c,{value:"chat",className:"flex flex-col flex-1 min-h-0 mt-0 data-[state=inactive]:hidden overflow-hidden",children:e(o,{})})]})};return t(x,{toc:s,children:[e("style",{href:"toc-peek-styles",precedence:"default",children:`
|
|
3
|
+
:root { --toc-slide: 100%; }
|
|
4
|
+
[dir="rtl"] { --toc-slide: -100%; }
|
|
5
|
+
@keyframes toc-peek-in {
|
|
6
|
+
from { translate: var(--toc-slide) 0; opacity: 0.5; }
|
|
7
|
+
to { translate: 0 0; opacity: 1; }
|
|
8
|
+
}
|
|
9
|
+
`}),e("div",{id:"nd-toc",className:"sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-4 pb-2 max-xl:hidden",onMouseLeave:()=>E(!1),children:z?t(a,{children:[e("div",{className:"flex flex-col items-center",children:e(r,{type:"button",onClick:()=>C(!1),"aria-label":"Expand",size:"icon-sm",variant:"ghost",className:"text-muted-foreground rounded-md",children:e(m,{className:"size-3.5 rtl:rotate-180"})})}),e("div",{className:"absolute inset-e-0 inset-y-0 w-4",onMouseEnter:()=>E(!0)}),j&&e("div",{className:"fixed inset-e-0 bottom-0 w-80 bg-fd-background shadow-lg flex flex-col pt-4 pb-2 z-30 animate-[toc-peek-in_200ms_ease-out]",style:{top:"var(--fd-docs-row-1, 0px)"},onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:I(!1)})]}):I(!0)})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Slot as r,Slottable as n}from"@radix-ui/react-slot";import{cn as a}from"@/lib/cn";import{buttonVariants as c}from"@/components/ui/button";import{Edit as i,Text as l}from"lucide-react";import{I18nLabel as d}from"@fumadocs/base-ui/contexts/i18n";import{PageBreadcrumb as s,PageFooter as m,PageTOCPopover as p,PageTOCPopoverContent as f,PageTOCPopoverTrigger as u}from"./client";import*as x from"@/components/fumadocs/toc/default";import*as h from"@/components/fumadocs/toc/clerk";import{TOCProvider as b,TOCScrollArea as g}from"@/components/fumadocs/toc";export function DocsPage({breadcrumb:{enabled:c=!0,component:i,...v}={},footer:{enabled:N,component:w,...y}={},full:O=!1,tableOfContentPopover:{enabled:C,component:k,...D}={},tableOfContent:{enabled:P,component:T,...I}={},toc:j=[],children:z,className:B,asChild:G=!1}){P??=!O&&(j.length>0||void 0!==I.footer||void 0!==I.header),C??=j.length>0||void 0!==D.header||void 0!==D.footer;let E=e=>e;return(P||C)&&(E=o=>e(b,{single:I.single,toc:j,children:o})),E(o(t,{children:[C&&(k??o(p,{children:[e(u,{}),o(f,{children:[D.header,e(g,{children:"clerk"===D.style?e(h.TOCItems,{}):e(x.TOCItems,{})}),D.footer]})]})),o(G?r:"article",{id:"nd-page","data-full":O,className:a("flex flex-col w-full max-w-225 mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-4",O?"max-w-292":"xl:layout:[--fd-toc-width:320px]",B),children:[c&&(i??e(s,{...v})),e(n,{children:z}),!1!==N&&(w??e(m,{...y}))]}),P&&(T??o("div",{id:"nd-toc",className:"sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden",children:[I.header,o("h3",{id:"toc-title",className:"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",children:[e(l,{className:"size-4"}),e(d,{label:"toc"})]}),e(g,{children:"clerk"===I.style?e(h.TOCItems,{}):e(x.TOCItems,{})}),I.footer]}))]}))}export function EditOnGitHub(r){return e("a",{target:"_blank",rel:"noreferrer noopener",...r,className:a(c({variant:"secondary",size:"sm",className:"gap-1.5 not-prose"}),r.className),children:r.children??o(t,{children:[e(i,{className:"size-3.5"}),e(d,{label:"editOnGithub"})]})})}export function DocsBody({children:o,className:t,...r}){return e("div",{...r,className:a("prose flex-1",t),children:o})}export function DocsDescription({children:o,className:t,...r}){return void 0===o?null:e("p",{...r,className:a("mb-8 text-lg text-fd-muted-foreground",t),children:o})}export function DocsTitle({children:o,className:t,...r}){return e("h1",{...r,className:a("text-[1.75em] font-semibold",t),children:o})}export{PageLastUpdate,PageBreadcrumb}from"./client";export{MarkdownCopyButton,ViewOptionsPopover}from"@/components/fumadocs/layout/page-actions";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import*as a from"@/components/fumadocs/layout/sidebar/base";import{cn as i}from"@/lib/cn";import{useRef as o}from"react";import{cva as n}from"class-variance-authority";import{createPageTreeRenderer as d}from"@/components/fumadocs/layout/sidebar/page-tree";import{createLinkItemRenderer as s}from"@/components/fumadocs/layout/sidebar/link-item";import{buttonVariants as l}from"@/components/ui/button";import{SearchToggle as c}from"@/components/fumadocs/layout/search-toggle";import{Search as f,Sidebar as b}from"lucide-react";import{mergeRefs as u}from"@/lib/merge-refs";import{ScrollArea as m,ScrollViewport as p}from"@/components/ui/scroll-area";let g=n("relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{link:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",button:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"},highlight:{true:"data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:inset-s-2.5"}}});function h(e){return`calc(${2+3*e} * var(--spacing))`}export function Sidebar(r){return e(a.SidebarProvider,{...r})}export function SidebarFolder(r){return e(a.SidebarFolder,{...r})}export function SidebarCollapseTrigger(r){return e(a.SidebarCollapseTrigger,{...r})}export function SidebarViewport(r){return e(m,{...r,className:i("min-h-0 flex-1",r.className),children:e(p,{className:"p-4 overscroll-contain",style:{maskImage:"linear-gradient(to bottom, transparent, white 12px, white calc(100% - 12px), transparent)"},children:e("div",{className:"flex flex-col gap-0.5",children:r.children})})})}export function SidebarTrigger(r){return e(a.SidebarTrigger,{...r})}export function SidebarContent({ref:n,className:d,children:s,...m}){let p=o(null);return e(a.SidebarContent,{children:({collapsed:o,hovered:g,ref:h,...x})=>r(t,{children:[r("div",{"data-sidebar-placeholder":"",className:"sticky top-(--fd-docs-row-1) z-20 [grid-area:sidebar] pointer-events-none *:pointer-events-auto h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] md:layout:[--fd-sidebar-width:268px] max-md:hidden",children:[o&&e("div",{className:"absolute inset-s-0 inset-y-0 w-4",...x}),e("aside",{id:"nd-sidebar",ref:u(p,n,h),"data-collapsed":o,"data-hovered":o&&g,className:i("absolute flex flex-col w-full inset-s-0 inset-y-0 items-end bg-fd-background text-sm border-e duration-250 *:w-(--fd-sidebar-width)",o&&["inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)",g?"shadow-lg translate-x-2 rtl:-translate-x-2":"-translate-x-(--fd-sidebar-width) rtl:translate-x-full"],p.current&&"true"===p.current.getAttribute("data-collapsed")!==o&&"transition-[width,inset-block,translate,background-color]",d),...m,...x,children:s})]}),r("div",{"data-sidebar-panel":"",className:i("fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] inset-s-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10",(!o||g)&&"pointer-events-none opacity-0"),children:[e(a.SidebarCollapseTrigger,{className:i(l({variant:"ghost",size:"icon-sm",className:"rounded-lg"})),children:e(b,{})}),e(c,{className:"rounded-lg",hideIfDisabled:!0,children:e(f,{})})]})]})})}export function SidebarDrawer({children:o,className:n,...d}){return r(t,{children:[e(a.SidebarDrawerOverlay,{className:"fixed z-40 inset-0 backdrop-blur-xs transition-opacity duration-300 data-[state=closed]:opacity-0 data-[state=closed]:pointer-events-none"}),e(a.SidebarDrawerContent,{className:i("fixed text-[0.9375rem] flex flex-col shadow-lg border-s inset-e-0 inset-y-0 w-[85%] max-w-95 z-40 bg-fd-background transition-transform duration-250 ease-out data-[state=closed]:translate-x-(--fd-sidebar-drawer-offset) rtl:data-[state=closed]:-translate-x-(--fd-sidebar-drawer-offset)",n),...d,children:o})]})}export function SidebarSeparator({className:r,style:t,children:o,...n}){let d=a.useFolderDepth();return e(a.SidebarSeparator,{className:i("inline-flex items-center gap-2 mb-1 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0",0===d&&"first:mt-0",r),style:{paddingInlineStart:h(d),...t},...n,children:o})}export function SidebarItem({className:r,style:t,children:o,...n}){let d=a.useFolderDepth();return e(a.SidebarItem,{className:i(g({variant:"link",highlight:d>=1}),r),style:{paddingInlineStart:h(d),...t},...n,children:o})}export function SidebarFolderTrigger({className:r,style:t,...o}){let{depth:n,collapsible:d}=a.useFolder();return e(a.SidebarFolderTrigger,{className:i(g({variant:d?"button":null}),"w-full",r),style:{paddingInlineStart:h(n-1),...t},...o,children:o.children})}export function SidebarFolderLink({className:r,style:t,...o}){let n=a.useFolderDepth();return e(a.SidebarFolderLink,{className:i(g({variant:"link",highlight:n>1}),"w-full",r),style:{paddingInlineStart:h(n-1),...t},...o,children:o.children})}export function SidebarFolderContent({className:r,children:t,...o}){let n=a.useFolderDepth();return e(a.SidebarFolderContent,{className:i("relative flex flex-col gap-0.5 *:first:mt-0.5",1===n&&"before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:inset-s-2.5",r),...o,children:t})}export const SidebarPageTree=d({SidebarFolder,SidebarFolderContent,SidebarFolderLink,SidebarFolderTrigger,SidebarItem,SidebarSeparator});export const SidebarLinkItem=s({SidebarFolder,SidebarFolderContent,SidebarFolderLink,SidebarFolderTrigger,SidebarItem});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import r from"next/link";import{Pencil as o}from"lucide-react";import{buttonVariants as i}from"@/components/ui/button";import{cn as e}from"@/lib/cn";export function EditorButton({lang:m}){return t(r,{href:`/${m}/playground`,className:e(i({variant:"ghost",size:"sm"}),"w-fit justify-start gap-2 text-fd-muted-foreground"),children:t(o,{className:"size-4"})})}
|