@ahmedrowaihi/8n 0.5.19 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/README.md +14 -0
  2. package/app/[lang]/(docs)/[section]/[[...slug]]/page.jsx +1 -0
  3. package/app/[lang]/(docs)/error.jsx +2 -0
  4. package/app/[lang]/(docs)/layout.jsx +1 -0
  5. package/app/[lang]/(docs)/loading.jsx +1 -0
  6. package/app/[lang]/(marketing)/layout.jsx +2 -0
  7. package/app/[lang]/(marketing)/page.jsx +1 -0
  8. package/app/[lang]/changelog/[...slug]/layout.jsx +1 -0
  9. package/app/[lang]/changelog/[...slug]/page.jsx +1 -0
  10. package/app/[lang]/changelog/layout.jsx +1 -0
  11. package/app/[lang]/changelog/page.jsx +1 -0
  12. package/app/[lang]/error.jsx +2 -0
  13. package/app/[lang]/lang-setup.jsx +2 -0
  14. package/app/[lang]/layout.jsx +1 -0
  15. package/app/[lang]/loading.jsx +1 -0
  16. package/app/[lang]/playground/page.jsx +2 -0
  17. package/app/[lang]/rss.xml/route.js +1 -0
  18. package/app/api/chat/route.js +1 -0
  19. package/app/api/dev/watch/route.js +1 -0
  20. package/app/api/pages/route.js +1 -0
  21. package/app/api/search/route.js +1 -0
  22. package/app/excalidraw/layout.jsx +1 -0
  23. package/app/excalidraw/page.jsx +13 -0
  24. package/app/layout.jsx +1 -0
  25. package/app/llms-full.txt/route.js +1 -0
  26. package/app/llms.mdx/[section]/[...slug]/route.js +1 -0
  27. package/app/llms.txt/route.js +1 -0
  28. package/app/not-found.jsx +1 -0
  29. package/app/page.jsx +1 -0
  30. package/app/robots.js +1 -0
  31. package/app/sitemap.js +1 -0
  32. package/content/api/ar/meta.json +1 -0
  33. package/content/api/en/createPet.mdx +14 -0
  34. package/content/api/en/deletePet.mdx +14 -0
  35. package/content/api/en/index.mdx +14 -0
  36. package/content/api/en/listPets.mdx +14 -0
  37. package/content/api/en/meta.json +5 -0
  38. package/content/api/en/showPetById.mdx +14 -0
  39. package/content/changelog/ar/meta.json +3 -0
  40. package/content/changelog/ar/v1.0.0.mdx +53 -0
  41. package/content/changelog/en/meta.json +3 -0
  42. package/content/changelog/en/v1.0.0.mdx +53 -0
  43. package/content/docs/ar/components/accordion.mdx +17 -0
  44. package/content/docs/ar/components/audio.mdx +9 -0
  45. package/content/docs/ar/components/callout.mdx +10 -0
  46. package/content/docs/ar/components/cards.mdx +10 -0
  47. package/content/docs/ar/components/circuit-board.mdx +20 -0
  48. package/content/docs/ar/components/code-blocks.mdx +56 -0
  49. package/content/docs/ar/components/drawio.mdx +19 -0
  50. package/content/docs/ar/components/dynamic-code-block.mdx +12 -0
  51. package/content/docs/ar/components/excalidraw.mdx +18 -0
  52. package/content/docs/ar/components/figma.mdx +16 -0
  53. package/content/docs/ar/components/files.mdx +25 -0
  54. package/content/docs/ar/components/index.mdx +51 -0
  55. package/content/docs/ar/components/inline-toc.mdx +33 -0
  56. package/content/docs/ar/components/math.mdx +29 -0
  57. package/content/docs/ar/components/mermaid.mdx +21 -0
  58. package/content/docs/ar/components/meta.json +27 -0
  59. package/content/docs/ar/components/steps.mdx +20 -0
  60. package/content/docs/ar/components/tabs.mdx +24 -0
  61. package/content/docs/ar/components/tweet.mdx +9 -0
  62. package/content/docs/ar/components/twoslash.mdx +48 -0
  63. package/content/docs/ar/components/type-table.mdx +25 -0
  64. package/content/docs/ar/components/video.mdx +9 -0
  65. package/content/docs/ar/getting-started.mdx +102 -0
  66. package/content/docs/ar/index.mdx +57 -0
  67. package/content/docs/ar/meta.json +4 -0
  68. package/content/docs/en/components/accordion.mdx +41 -0
  69. package/content/docs/en/components/audio.mdx +32 -0
  70. package/content/docs/en/components/callout.mdx +27 -0
  71. package/content/docs/en/components/cards.mdx +42 -0
  72. package/content/docs/en/components/circuit-board.mdx +106 -0
  73. package/content/docs/en/components/code-blocks.mdx +88 -0
  74. package/content/docs/en/components/drawio.mdx +77 -0
  75. package/content/docs/en/components/dynamic-code-block.mdx +30 -0
  76. package/content/docs/en/components/excalidraw.mdx +120 -0
  77. package/content/docs/en/components/figma.mdx +35 -0
  78. package/content/docs/en/components/files.mdx +52 -0
  79. package/content/docs/en/components/index.mdx +51 -0
  80. package/content/docs/en/components/inline-toc.mdx +40 -0
  81. package/content/docs/en/components/math.mdx +45 -0
  82. package/content/docs/en/components/mermaid.mdx +50 -0
  83. package/content/docs/en/components/meta.json +27 -0
  84. package/content/docs/en/components/steps.mdx +61 -0
  85. package/content/docs/en/components/tabs.mdx +58 -0
  86. package/content/docs/en/components/tweet.mdx +26 -0
  87. package/content/docs/en/components/twoslash.mdx +83 -0
  88. package/content/docs/en/components/type-table.mdx +58 -0
  89. package/content/docs/en/components/video.mdx +32 -0
  90. package/content/docs/en/getting-started.mdx +102 -0
  91. package/content/docs/en/index.mdx +57 -0
  92. package/content/docs/en/meta.json +4 -0
  93. package/content/mcp/ar/meta.json +1 -0
  94. package/content/mcp/en/components.mdx +206 -0
  95. package/content/mcp/en/config.mdx +38 -0
  96. package/content/mcp/en/frontmatter.mdx +40 -0
  97. package/content/mcp/en/meta.json +1 -0
  98. package/content/mcp/en/structure.mdx +55 -0
  99. package/content/ui/ar/meta.json +1 -0
  100. package/content/ui/en/badge.mdx +18 -0
  101. package/content/ui/en/index.mdx +75 -0
  102. package/content/ui/en/meta.json +5 -0
  103. package/dist/{adapter.cjs → cli/adapter.cjs} +1 -1
  104. package/dist/cli/index.mjs +452 -0
  105. package/next.config.mjs +13 -0
  106. package/package.json +112 -17
  107. package/postcss.config.mjs +5 -0
  108. package/public/apple-touch-icon.png +0 -0
  109. package/public/fonts/ThmanyahSans/Thmanyahsans12-Black.woff2 +0 -0
  110. package/public/fonts/ThmanyahSans/Thmanyahsans12-Bold.woff2 +0 -0
  111. package/public/fonts/ThmanyahSans/Thmanyahsans12-Light.woff2 +0 -0
  112. package/public/fonts/ThmanyahSans/Thmanyahsans12-Medium.woff2 +0 -0
  113. package/public/fonts/ThmanyahSans/Thmanyahsans12-Regular.woff2 +0 -0
  114. package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Black.woff2 +0 -0
  115. package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Bold.woff2 +0 -0
  116. package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Light.woff2 +0 -0
  117. package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Medium.woff2 +0 -0
  118. package/public/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Regular.woff2 +0 -0
  119. package/public/fonts/sar.woff +0 -0
  120. package/public/manifest.json +22 -0
  121. package/public/thmanyah-icon.svg +3 -0
  122. package/src/cli/adapter.ts +41 -0
  123. package/src/cli/commands/build.ts +13 -0
  124. package/src/cli/commands/dev.ts +13 -0
  125. package/src/cli/commands/init.ts +141 -0
  126. package/src/cli/commands/mcp.ts +191 -0
  127. package/src/cli/commands/start.ts +12 -0
  128. package/src/cli/index.ts +26 -0
  129. package/src/cli/load-config.ts +26 -0
  130. package/src/cli/web-app.ts +95 -0
  131. package/src/components/ai-elements/conversation.jsx +2 -0
  132. package/src/components/ai-elements/reasoning.jsx +2 -0
  133. package/src/components/ai-elements/shimmer.jsx +2 -0
  134. package/src/components/api-page.client.jsx +2 -0
  135. package/src/components/api-page.jsx +1 -0
  136. package/src/components/blocks/audio.jsx +2 -0
  137. package/src/components/blocks/circuit-board.jsx +2 -0
  138. package/src/components/blocks/drawio-block.jsx +2 -0
  139. package/src/components/blocks/excalidraw.jsx +2 -0
  140. package/src/components/blocks/figma-block.jsx +2 -0
  141. package/src/components/blocks/mermaid.jsx +2 -0
  142. package/src/components/blocks/video.jsx +2 -0
  143. package/src/components/credit-button.jsx +2 -0
  144. package/src/components/dev-refresh.jsx +2 -0
  145. package/src/components/error-state.jsx +2 -0
  146. package/src/components/feedback/client.jsx +1 -0
  147. package/src/components/feedback/github.js +1 -0
  148. package/src/components/feedback/schema.js +1 -0
  149. package/src/components/fumadocs/layout/docs/client.jsx +4 -0
  150. package/src/components/fumadocs/layout/docs/index.jsx +1 -0
  151. package/src/components/fumadocs/layout/docs/page/client.jsx +2 -0
  152. package/src/components/fumadocs/layout/docs/page/docs-toc.jsx +9 -0
  153. package/src/components/fumadocs/layout/docs/page/index.jsx +1 -0
  154. package/src/components/fumadocs/layout/docs/sidebar.jsx +2 -0
  155. package/src/components/fumadocs/layout/editor-button.jsx +2 -0
  156. package/src/components/fumadocs/layout/home/client.jsx +2 -0
  157. package/src/components/fumadocs/layout/home/index.jsx +1 -0
  158. package/src/components/fumadocs/layout/link-item.jsx +2 -0
  159. package/src/components/fumadocs/layout/page-actions.jsx +2 -0
  160. package/src/components/fumadocs/layout/search-toggle.jsx +2 -0
  161. package/src/components/fumadocs/layout/shared.jsx +1 -0
  162. package/src/components/fumadocs/layout/sidebar/base.jsx +2 -0
  163. package/src/components/fumadocs/layout/sidebar/link-item.jsx +2 -0
  164. package/src/components/fumadocs/layout/sidebar/page-tree.jsx +1 -0
  165. package/src/components/fumadocs/layout/sidebar/tabs/dropdown.jsx +2 -0
  166. package/src/components/fumadocs/layout/sidebar/tabs/index.jsx +1 -0
  167. package/src/components/fumadocs/layout/sidebar-back-button.jsx +2 -0
  168. package/src/components/fumadocs/layout/sidebar-footer.jsx +1 -0
  169. package/src/components/fumadocs/layout/theme-toggle.jsx +2 -0
  170. package/src/components/fumadocs/mdx/base-ui.jsx +1 -0
  171. package/src/components/fumadocs/mdx/blocks.jsx +1 -0
  172. package/src/components/fumadocs/mdx/openapi.js +1 -0
  173. package/src/components/fumadocs/mdx-server.js +1 -0
  174. package/src/components/fumadocs/mdx.jsx +1 -0
  175. package/src/components/fumadocs/search-toggle.jsx +2 -0
  176. package/src/components/fumadocs/search.jsx +2 -0
  177. package/src/components/fumadocs/toc/clerk.jsx +2 -0
  178. package/src/components/fumadocs/toc/default.jsx +2 -0
  179. package/src/components/fumadocs/toc/index.jsx +2 -0
  180. package/src/components/language-switcher.jsx +2 -0
  181. package/src/components/logo-loader.jsx +2 -0
  182. package/src/components/logo.jsx +1 -0
  183. package/src/components/markdown.jsx +2 -0
  184. package/src/components/not-found.jsx +1 -0
  185. package/src/components/page-transition.jsx +2 -0
  186. package/src/components/story/badge.js +1 -0
  187. package/src/components/story/button.js +1 -0
  188. package/src/components/story/index.js +1 -0
  189. package/src/components/ui/accordion.jsx +1 -0
  190. package/src/components/ui/alert-dialog.jsx +1 -0
  191. package/src/components/ui/alert.jsx +1 -0
  192. package/src/components/ui/aspect-ratio.jsx +1 -0
  193. package/src/components/ui/avatar.jsx +2 -0
  194. package/src/components/ui/badge.client.jsx +2 -0
  195. package/src/components/ui/badge.jsx +1 -0
  196. package/src/components/ui/breadcrumb.jsx +1 -0
  197. package/src/components/ui/button-group.jsx +1 -0
  198. package/src/components/ui/button.client.jsx +2 -0
  199. package/src/components/ui/button.jsx +1 -0
  200. package/src/components/ui/calendar.jsx +2 -0
  201. package/src/components/ui/card.jsx +1 -0
  202. package/src/components/ui/carousel.jsx +1 -0
  203. package/src/components/ui/chart.jsx +6 -0
  204. package/src/components/ui/checkbox.jsx +2 -0
  205. package/src/components/ui/collapsible.jsx +1 -0
  206. package/src/components/ui/combobox.jsx +2 -0
  207. package/src/components/ui/command.jsx +1 -0
  208. package/src/components/ui/context-menu.jsx +2 -0
  209. package/src/components/ui/dialog.jsx +2 -0
  210. package/src/components/ui/direction.jsx +1 -0
  211. package/src/components/ui/drawer.jsx +2 -0
  212. package/src/components/ui/dropdown-menu.jsx +1 -0
  213. package/src/components/ui/empty.jsx +1 -0
  214. package/src/components/ui/field.jsx +2 -0
  215. package/src/components/ui/hover-card.jsx +2 -0
  216. package/src/components/ui/input-group.jsx +1 -0
  217. package/src/components/ui/input-otp.jsx +1 -0
  218. package/src/components/ui/input.jsx +1 -0
  219. package/src/components/ui/item.jsx +1 -0
  220. package/src/components/ui/kbd.jsx +1 -0
  221. package/src/components/ui/label.jsx +2 -0
  222. package/src/components/ui/menubar.jsx +1 -0
  223. package/src/components/ui/native-select.jsx +1 -0
  224. package/src/components/ui/navigation-menu.jsx +1 -0
  225. package/src/components/ui/pagination.jsx +1 -0
  226. package/src/components/ui/popover.jsx +1 -0
  227. package/src/components/ui/progress.jsx +2 -0
  228. package/src/components/ui/radio-group.jsx +1 -0
  229. package/src/components/ui/resizable.jsx +2 -0
  230. package/src/components/ui/scroll-area.jsx +1 -0
  231. package/src/components/ui/select.jsx +2 -0
  232. package/src/components/ui/separator.jsx +1 -0
  233. package/src/components/ui/sheet.jsx +1 -0
  234. package/src/components/ui/sidebar.jsx +1 -0
  235. package/src/components/ui/skeleton.jsx +1 -0
  236. package/src/components/ui/slider.jsx +2 -0
  237. package/src/components/ui/sonner.jsx +1 -0
  238. package/src/components/ui/spinner.jsx +1 -0
  239. package/src/components/ui/switch.jsx +2 -0
  240. package/src/components/ui/table.jsx +1 -0
  241. package/src/components/ui/tabs.jsx +2 -0
  242. package/src/components/ui/textarea.jsx +1 -0
  243. package/src/components/ui/toggle-group.jsx +2 -0
  244. package/src/components/ui/toggle.jsx +1 -0
  245. package/src/components/ui/tooltip.jsx +2 -0
  246. package/src/config.js +1 -0
  247. package/src/features/ai/chat/agents.js +1 -0
  248. package/src/features/ai/chat/components/api-key-form.jsx +2 -0
  249. package/src/features/ai/chat/components/brand.jsx +2 -0
  250. package/src/features/ai/chat/components/content.jsx +2 -0
  251. package/src/features/ai/chat/components/layout.jsx +2 -0
  252. package/src/features/ai/chat/components/message.jsx +2 -0
  253. package/src/features/ai/chat/components/model-select.jsx +2 -0
  254. package/src/features/ai/chat/components/panels.jsx +2 -0
  255. package/src/features/ai/chat/components/prompt.jsx +3 -0
  256. package/src/features/ai/chat/components/tool-renderer.jsx +2 -0
  257. package/src/features/ai/chat/components/trigger.jsx +2 -0
  258. package/src/features/ai/chat/constants.js +1 -0
  259. package/src/features/ai/chat/handler.js +1 -0
  260. package/src/features/ai/chat/hooks/use-pages.js +2 -0
  261. package/src/features/ai/chat/index.js +1 -0
  262. package/src/features/ai/chat/panel-store.js +2 -0
  263. package/src/features/ai/chat/provider.jsx +7 -0
  264. package/src/features/ai/chat/selection-store.js +2 -0
  265. package/src/features/ai/chat/settings-store.js +2 -0
  266. package/src/features/ai/chat/store.js +1 -0
  267. package/src/features/ai/chat/tools.js +1 -0
  268. package/src/features/ai/chat/types.js +1 -0
  269. package/src/features/ai/playground/agents.js +1 -0
  270. package/src/features/ai/playground/tools.js +1 -0
  271. package/src/features/ai/shared/create-model.js +1 -0
  272. package/src/features/ai/shared/filter-reasoning.js +1 -0
  273. package/src/features/changelog/components/changelog-list.jsx +2 -0
  274. package/src/features/changelog/components/entry-content.jsx +2 -0
  275. package/src/features/changelog/index.js +1 -0
  276. package/src/features/docs/components/page-content.jsx +2 -0
  277. package/src/features/docs/index.js +1 -0
  278. package/src/features/docs/section-page.jsx +1 -0
  279. package/src/features/feedback/components/feedback-block-mdx.jsx +2 -0
  280. package/src/features/feedback/components/feedback.jsx +2 -0
  281. package/src/features/feedback/github.js +6 -0
  282. package/src/features/feedback/index.js +1 -0
  283. package/src/features/feedback/schema.js +1 -0
  284. package/src/features/marketing/components/home.jsx +1 -0
  285. package/src/features/marketing/index.js +1 -0
  286. package/src/features/mdx-playground/components/editor.jsx +2 -0
  287. package/src/features/mdx-playground/components/playground-provider.jsx +2 -0
  288. package/src/features/mdx-playground/components/playground-sidebar.jsx +2 -0
  289. package/src/features/mdx-playground/components/playground.jsx +2 -0
  290. package/src/features/mdx-playground/components/proposal-context.jsx +2 -0
  291. package/src/features/mdx-playground/components/update-content-card.jsx +2 -0
  292. package/src/features/mdx-playground/hooks/use-mdx-compiler.js +1 -0
  293. package/src/features/mdx-playground/hooks/use-playground-chat.js +7 -0
  294. package/src/features/mdx-playground/lib/compile.js +19 -0
  295. package/src/features/mdx-playground/lib/components-reference.js +1 -0
  296. package/src/features/mdx-playground/store/settings.js +1 -0
  297. package/src/hooks/use-copy-button.js +1 -0
  298. package/src/hooks/use-locale.js +2 -0
  299. package/src/hooks/use-mobile.js +1 -0
  300. package/src/i18n.d.ts +23 -0
  301. package/src/lib/cn.js +1 -0
  302. package/src/lib/content-source.js +1 -0
  303. package/src/lib/create-docs-layout.jsx +1 -0
  304. package/src/lib/create-docs-page.jsx +1 -0
  305. package/src/lib/i18n.js +1 -0
  306. package/src/lib/layout.shared.jsx +1 -0
  307. package/src/lib/llms.js +1 -0
  308. package/src/lib/mdx-compiler.js +1 -0
  309. package/src/lib/mdx-plugins.js +1 -0
  310. package/src/lib/merge-refs.js +1 -0
  311. package/src/lib/navigation.js +2 -0
  312. package/src/lib/openapi.js +1 -0
  313. package/src/lib/pages-api.js +1 -0
  314. package/src/lib/rss.js +1 -0
  315. package/src/lib/sitemap.js +1 -0
  316. package/src/lib/source.js +3 -0
  317. package/src/lib/story.js +1 -0
  318. package/src/lib/theme-transition.js +23 -0
  319. package/src/lib/urls.js +1 -0
  320. package/src/lib/utils.js +1 -0
  321. package/src/locale.config.js +1 -0
  322. package/src/styles/app.css +20 -0
  323. package/src/styles/theme.css +301 -0
  324. package/tsconfig.json +49 -0
  325. package/dist/dist-Chcd8TDR.mjs +0 -12
  326. package/dist/dist-D141EqSt.mjs +0 -17697
  327. package/dist/index.mjs +0 -12139
  328. package/dist/json5-CuDBm1Te.mjs +0 -767
  329. package/dist/jsonc-B5ER7fvF.mjs +0 -3
  330. package/dist/multipart-parser-1klXEOeN.mjs +0 -175
  331. package/dist/node-BEh-s3PG.mjs +0 -3974
  332. package/dist/toml-C1A3VULl.mjs +0 -672
  333. package/dist/yaml-JEnhp2tM.mjs +0 -1063
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # .
2
+
3
+ This is a Next application generated with
4
+ [Create Fumadocs](https://github.com/fuma-nama/fumadocs).
5
+
6
+ Run development server:
7
+
8
+ ```bash
9
+ npm run dev
10
+ # or
11
+ pnpm dev
12
+ # or
13
+ yarn dev
14
+ ```
@@ -0,0 +1 @@
1
+ export{generateStaticParams,generateMetadata,default}from"@/features/docs/section-page";
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{useEffect as e}from"react";import{ErrorState as o}from"@/components/error-state";export default function t({error:m,reset:n}){return e(()=>{console.error(m)},[m]),r(o,{error:m,reset:n,minHeight:"min-h-[60vh]"})}
@@ -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,2 @@
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{useEffect as o}from"react";import{ErrorState as e}from"@/components/error-state";export default function t({error:m,reset:n}){return o(()=>{console.error(m)},[m]),r(e,{error:m,reset:n})}
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{useEffect as e}from"react";export default function t({lang:n,dir:m}){return e(()=>{document.documentElement.lang=n,document.documentElement.dir=m},[n,m]),null}
@@ -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,2 @@
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import{MDXPlayground as o}from"@/features/mdx-playground/components/playground";export default function t(){return r(o,{})}
@@ -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{handleChat as r}from"@/features/ai/chat/handler";export async function POST(t){return r(t)}
@@ -0,0 +1 @@
1
+ import{watch as e,existsSync as n}from"node:fs";import{env as t}from"@/config";export const dynamic="force-static";export function GET(){let o;if("development"!==process.env.NODE_ENV)return new Response("Not found",{status:404});let c=new TextEncoder;return new Response(new ReadableStream({start(r){r.enqueue(c.encode("data: connected\n\n")),n(t.CONTENT_DIR)&&(o=e(t.CONTENT_DIR,{recursive:!0},()=>{try{r.enqueue(c.encode("data: change\n\n"))}catch{o?.close()}}))},cancel(){o?.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}
@@ -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 t}from"@/config";export const dynamic="force-static";export default function e(){return{rules:{userAgent:"*",allow:"/"},sitemap:`${t.SITE_URL}/sitemap.xml`}}
package/app/sitemap.js ADDED
@@ -0,0 +1 @@
1
+ export const dynamic="force-static";export{buildSitemap as default}from"@/lib/sitemap";
@@ -0,0 +1 @@
1
+ { "title": "مرجع API", "icon": "PlugZap" }
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Create a pet
3
+ full: true
4
+ _openapi:
5
+ method: POST
6
+ toc: []
7
+ structuredData:
8
+ headings: []
9
+ contents: []
10
+ ---
11
+
12
+ {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
13
+
14
+ <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets","method":"post"}]} />
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Delete a pet
3
+ full: true
4
+ _openapi:
5
+ method: DELETE
6
+ toc: []
7
+ structuredData:
8
+ headings: []
9
+ contents: []
10
+ ---
11
+
12
+ {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
13
+
14
+ <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets/{petId}","method":"delete"}]} />
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: API Reference
3
+ description: Interactive REST API reference for the Petstore sample API.
4
+ icon: PlugZap
5
+ ---
6
+
7
+ This section documents the Petstore sample API. Replace the OpenAPI spec at `openapi/petstore.json` with your own schema and run `pnpm generate:api` to regenerate.
8
+
9
+ <Cards>
10
+ <Card title="List all pets" href="/en/api/listPets" />
11
+ <Card title="Get a pet" href="/en/api/showPetById" />
12
+ <Card title="Create a pet" href="/en/api/createPet" />
13
+ <Card title="Delete a pet" href="/en/api/deletePet" />
14
+ </Cards>
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: List all pets
3
+ full: true
4
+ _openapi:
5
+ method: GET
6
+ toc: []
7
+ structuredData:
8
+ headings: []
9
+ contents: []
10
+ ---
11
+
12
+ {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
13
+
14
+ <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets","method":"get"}]} />
@@ -0,0 +1,5 @@
1
+ {
2
+ "title": "API Reference",
3
+ "icon": "PlugZap",
4
+ "pages": ["index", "listPets", "showPetById", "createPet", "deletePet"]
5
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Get a pet
3
+ full: true
4
+ _openapi:
5
+ method: GET
6
+ toc: []
7
+ structuredData:
8
+ headings: []
9
+ contents: []
10
+ ---
11
+
12
+ {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
13
+
14
+ <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets/{petId}","method":"get"}]} />
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "سجل التغييرات"
3
+ }
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: الإصدار 1.0.0
3
+ version: 1.0.0
4
+ date: "2026-03-14"
5
+ summary: الإصدار الأول — توثيق ثنائي اللغة بدعم RTL كامل، بحث محلي، خطوط ثمانية، مكوّنات MDX غنية، Excalidraw، تضمين التغريدات، رياضيات، TwoSlash، تغذيات RSS، وملف LLMs.txt.
6
+ ---
7
+
8
+ ## الإصدار الأول
9
+
10
+ ### توثيق ثنائي اللغة (العربية + الإنجليزية)
11
+
12
+ دعم كامل للكتابة من اليمين إلى اليسار بالعربية مع تبديل تلقائي لاتجاه `dir` حسب اللغة. جميع مكوّنات الواجهة تستخدم خصائص CSS المنطقية (`start`/`end`، `inset-s-*`/`inset-e-*`) في كل مكان — لا استخدام لـ `left`/`right` نهائيًا — مما يضمن تخطيطًا صحيحًا لكلا اتجاهَي الكتابة.
13
+
14
+ ### توليد ثابت مع Next.js
15
+
16
+ مبني على Next.js 16 مع توليد ثابت كامل. جميع الصفحات تُصيَّر مسبقًا عند البناء — تحميل سريع دون الحاجة لخادم في وقت التشغيل.
17
+
18
+ ### بحث محلي بدون اتصال
19
+
20
+ بحث نصي كامل مدعوم بـ [Orama](https://orama.com) يعمل كليًا في المتصفح — لا طلبات خارجية، لا اعتماد على الشبكة. يعمل بدون اتصال بعد أول تحميل.
21
+
22
+ ### مكوّنات MDX
23
+
24
+ | المكوّن | الوصف |
25
+ |---------|-------|
26
+ | `Callout` | كتل تنبيه: معلومة، تحذير، خطأ، تلميح |
27
+ | `Steps` | تسلسلات خطوات مرقّمة |
28
+ | `Tabs` | لوحات محتوى بتبويبات |
29
+ | `Accordion` | أقسام قابلة للطي |
30
+ | `Cards` | شبكات بطاقات روابط |
31
+ | `TypeTable` | جداول مرجعية لأنواع API |
32
+ | `CodeBlock` | كود بتمييز صياغي وزر نسخ |
33
+ | `Mermaid` | مخططات Mermaid مُصيَّرة مع توسيع بالشاشة الكاملة |
34
+ | `Video` | تضمين فيديو متجاوب |
35
+ | `Audio` | مشغّل صوت مضمّن |
36
+ | `Files` | عرض شجرة نظام الملفات |
37
+ | `ExcalidrawBlock` | رسوم Excalidraw تفاعلية (معزولة بـ iframe، مع تبديل العرض/التحرير) |
38
+ | `Tweet` | تغريدات مُضمَّنة مُصيَّرة من الخادم عبر react-tweet |
39
+
40
+ ### مميزات أخرى
41
+
42
+ | الميزة | التفاصيل |
43
+ |--------|----------|
44
+ | توسيع بالشاشة الكاملة | مخططات Mermaid و Excalidraw تدعم زر توسيع بالشاشة الكاملة |
45
+ | TwoSlash | أنواع TypeScript والأخطاء والإكمال التلقائي مُصيَّرة مضمّنة؛ النتائج مُخزَّنة مؤقتًا |
46
+ | الرياضيات | تصيير KaTeX عبر `remark-math` + `rehype-katex` |
47
+ | تمييز الصياغة | [Shiki](https://shiki.style) مع ثيمَي `catppuccin-latte` / `vesper` |
48
+ | تعليقات كود RTL | التعليقات العربية في كتل الكود تُحاذى تلقائيًا عبر محوّل `rtl-spans` |
49
+ | خطوط ثمانية | خطوط العربية واللاتينية من نظام التصميم لثمانية مطبّقة بشكل عام |
50
+ | تغذيات RSS | تُولَّد تلقائيًا على `/{lang}/rss.xml` للغتين |
51
+ | ملف LLMs.txt | `/llms.txt` و`/llms-full.txt` وفق اتفاقية [llms.txt](https://llmstxt.org) |
52
+ | تواريخ آخر تعديل | تاريخ آخر تعديل git لكل صفحة عبر `fumadocs-mdx/plugins/last-modified` |
53
+ | سجل التغييرات | مصدر `content/changelog/` ثنائي اللغة بحقول `version` و`date` و`summary` |
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "Changelog"
3
+ }
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Version 1.0.0
3
+ version: 1.0.0
4
+ date: "2026-03-14"
5
+ summary: Initial release — bilingual docs with full RTL support, offline search, Thmanyah fonts, rich MDX components, Excalidraw, Tweet embeds, math, TwoSlash, RSS feeds, and LLMs.txt.
6
+ ---
7
+
8
+ ## Initial Release
9
+
10
+ ### Bilingual Docs (Arabic + English)
11
+
12
+ Full right-to-left support for Arabic with automatic `dir` switching per locale. All UI components use logical CSS properties (`start`/`end`, `inset-s-*`/`inset-e-*`) throughout — no `left`/`right` anywhere — ensuring correct bidirectional layout for both LTR and RTL languages.
13
+
14
+ ### Next.js Static Export
15
+
16
+ Built on Next.js 16 with full static generation. All pages are prerendered at build time — fast cold loads with no server dependency at runtime.
17
+
18
+ ### Offline-Capable Search
19
+
20
+ Full-text search powered by [Orama](https://orama.com) runs entirely in the browser — no external API calls, no network dependency. Works offline after first load.
21
+
22
+ ### MDX Components
23
+
24
+ | Component | Description |
25
+ |-----------|-------------|
26
+ | `Callout` | Info, warning, error, and tip callout blocks |
27
+ | `Steps` | Numbered step sequences |
28
+ | `Tabs` | Tabbed content panels |
29
+ | `Accordion` | Collapsible sections |
30
+ | `Cards` | Link card grids |
31
+ | `TypeTable` | API type reference tables |
32
+ | `CodeBlock` | Syntax-highlighted code with copy button |
33
+ | `Mermaid` | Rendered Mermaid diagrams with fullscreen expand |
34
+ | `Video` | Responsive video embeds |
35
+ | `Audio` | Audio player embeds |
36
+ | `Files` | Filesystem tree display |
37
+ | `ExcalidrawBlock` | Interactive Excalidraw diagrams (iframe-isolated, view/edit toggle) |
38
+ | `Tweet` | Server-rendered tweet embeds via react-tweet |
39
+
40
+ ### Also Included
41
+
42
+ | Feature | Details |
43
+ |---------|---------|
44
+ | Fullscreen expand | Mermaid and Excalidraw diagrams both have a fullscreen overlay button |
45
+ | TwoSlash | TypeScript hover types, errors, and completions rendered inline; results cached to filesystem |
46
+ | Math | KaTeX rendering via `remark-math` + `rehype-katex` |
47
+ | Syntax highlighting | [Shiki](https://shiki.style) with `catppuccin-latte` / `vesper` themes |
48
+ | RTL code comments | Arabic comments in code blocks auto-aligned right via `rtl-spans` transformer |
49
+ | Thmanyah fonts | Arabic and Latin typefaces from Thmanyah's design system applied globally |
50
+ | RSS feeds | Auto-generated at `/{lang}/rss.xml` for both locales |
51
+ | LLMs.txt | `/llms.txt` and `/llms-full.txt` following the [llms.txt](https://llmstxt.org) convention |
52
+ | Last modified dates | Per-page git last-modified date via `fumadocs-mdx/plugins/last-modified` |
53
+ | Changelog | Bilingual `content/changelog/` source with `version`, `date`, and `summary` fields |
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: الأكورديون
3
+ description: أقسام قابلة للطي والفتح.
4
+ icon: ChevronDown
5
+ ---
6
+
7
+ <Accordions type="single">
8
+ <Accordion title="ما هذا القالب؟">
9
+ موقع توثيق مبني بـ Fumadocs يعمل على Next.js، مع دعم i18n وخطوط ثمانية والبحث المحلي.
10
+ </Accordion>
11
+ <Accordion title="هل يمكنني إضافة لغات أخرى؟">
12
+ نعم — أضف اللغة إلى `src/config.ts` وأنشئ مجلد <code>{'content/docs/<locale>/'}</code> المقابل.
13
+ </Accordion>
14
+ <Accordion title="هل يعمل بدون إنترنت؟">
15
+ يستخدم البحث Orama محلياً — بدون طلبات API خارجية. يحتاج الموقع فقط إلى خادم ملفات ثابتة.
16
+ </Accordion>
17
+ </Accordions>
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: الصوت
3
+ description: مشغّل صوت مدمج لأي تيار أو ملف.
4
+ icon: Music
5
+ ---
6
+
7
+ `Audio` يعرض مشغّل صوت مدمج. المصادر المدعومة: MP3 وAAC وOGG وبث HLS وروابط ملفات الصوت المباشرة.
8
+
9
+ <Audio src="https://www.youtube.com/watch?v=pO5dgZrM9Mk" title="سورة الفاتحة — الشيخ محمود خليل الحصري" />
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: التنبيهات
3
+ description: إبراز الملاحظات والتحذيرات والأخطاء.
4
+ icon: CircleAlert
5
+ ---
6
+
7
+ <Callout>تنبيه افتراضي — معلومات عامة.</Callout>
8
+ <Callout type="info">تنبيه معلوماتي.</Callout>
9
+ <Callout type="warn">تنبيه تحذيري.</Callout>
10
+ <Callout type="error">تنبيه خطأ — حدث خطأ ما.</Callout>
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: البطاقات
3
+ description: شبكة بطاقات التنقل.
4
+ icon: LayoutGrid
5
+ ---
6
+
7
+ <Cards>
8
+ <Card title="بطاقة أولى" description="وصف قصير يظهر هنا." href="#" />
9
+ <Card title="بطاقة ثانية" description="بطاقة أخرى مع رابط." href="#" icon="Star" />
10
+ </Cards>
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: CircuitBoardBlock
3
+ description: مخطط عقد متحرك مع نبضات كهربائية على المسارات.
4
+ icon: CircuitBoard
5
+ ---
6
+
7
+ `CircuitBoardBlock` يرسم مخطط عقد متحرك مع نبضات كهربائية على المسارات. مناسب لتوضيح بنية الأنظمة والخدمات المصغّرة والتواصل بين المكونات.
8
+
9
+ <CircuitBoardBlock
10
+ width={580} height={240}
11
+ nodes={[
12
+ { id: "client", x: 80, y: 120, label: "العميل", status: "active", icon: "Monitor" },
13
+ { id: "api", x: 290, y: 120, label: "API", status: "processing", icon: "Server" },
14
+ { id: "db", x: 500, y: 120, label: "قاعدة البيانات", status: "active", icon: "Database" },
15
+ ]}
16
+ connections={[
17
+ { from: "client", to: "api", animated: true },
18
+ { from: "api", to: "db", bidirectional: true },
19
+ ]}
20
+ />
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: كتل الكود
3
+ description: تمييز بالألوان وفروق وأرقام أسطر.
4
+ icon: Code
5
+ ---
6
+
7
+ كتلة كود عادية مع عنوان وتمييز بالألوان:
8
+
9
+ ```ts title="src/lib/source.ts"
10
+ import { loader } from 'fumadocs-core/source';
11
+ import { createMDXSource } from 'fumadocs-mdx';
12
+ import { docs } from '@/.source';
13
+
14
+ // بناء مصدر التوثيق من مجموعة MDX المولّدة
15
+ export const source = loader({
16
+ baseUrl: '/docs',
17
+ source: createMDXSource(docs),
18
+ });
19
+ ```
20
+
21
+ تمييز أسطر محددة باستخدام `// [!code highlight]`:
22
+
23
+ ```tsx title="src/routes/$lang/docs/$.tsx"
24
+ export const Route = createFileRoute('/$lang/docs/$')({
25
+ component: Page, // [!code highlight]
26
+ loader: async ({ params }) => {
27
+ const slugs = params._splat?.split('/') ?? [];
28
+ return loader({ data: { slugs, lang: params.lang } }); // [!code highlight]
29
+ },
30
+ });
31
+ ```
32
+
33
+ أرقام الأسطر باستخدام `lineNumbers`:
34
+
35
+ ```ts lineNumbers title="src/lib/source.ts"
36
+ import { loader } from 'fumadocs-core/source';
37
+ import { createMDXSource } from 'fumadocs-mdx';
38
+ import { docs } from '@/.source';
39
+
40
+ // بناء مصدر التوثيق من مجموعة MDX المولّدة
41
+ export const source = loader({
42
+ baseUrl: '/docs',
43
+ source: createMDXSource(docs),
44
+ });
45
+ ```
46
+
47
+ إضافات وحذف مع `// [!code ++]` و `// [!code --]`:
48
+
49
+ ```ts
50
+ themes: {
51
+ light: 'github-light', // [!code --]
52
+ dark: 'github-dark', // [!code --]
53
+ light: 'catppuccin-latte', // [!code ++]
54
+ dark: 'vesper', // [!code ++]
55
+ },
56
+ ```
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: DrawioBlock
3
+ description: تضمين مخططات draw.io التفاعلية.
4
+ icon: Share2
5
+ ---
6
+
7
+ `DrawioBlock` يُضمِّن مخطط draw.io تفاعلي كامل. مرِّر عناصر `mxCell` كـ XML خام — المكوّن يُغلّفها تلقائياً.
8
+
9
+ <DrawioBlock height={300} xml={`
10
+ <mxCell id="2" value="العميل" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
11
+ <mxGeometry x="80" y="120" width="120" height="60" as="geometry"/>
12
+ </mxCell>
13
+ <mxCell id="3" value="الخادم" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
14
+ <mxGeometry x="360" y="120" width="120" height="60" as="geometry"/>
15
+ </mxCell>
16
+ <mxCell id="4" style="endArrow=classic;html=1;flowAnimation=1;" edge="1" source="2" target="3" parent="1">
17
+ <mxGeometry relative="1" as="geometry"/>
18
+ </mxCell>
19
+ `} />
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: كتلة كود ديناميكية
3
+ description: كتلة كود يمكن تغيير لغتها في وقت التشغيل.
4
+ icon: Braces
5
+ ---
6
+
7
+ `DynamicCodeBlock` يعرض كتلة كود مع لغة يمكن تغييرها في وقت التشغيل:
8
+
9
+ <DynamicCodeBlock lang="ts" code={`export async function greet() {
10
+ 'use server';
11
+ return { message: 'مرحباً من الخادم!' };
12
+ }`} />
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: Excalidraw
3
+ description: تضمين مخططات Excalidraw بوضع القراءة فقط.
4
+ icon: PenLine
5
+ ---
6
+
7
+ `ExcalidrawBlock` يُضمِّن مخطط Excalidraw تفاعلي بوضع القراءة فقط. مرِّر `initialData` مع عناصر المخطط.
8
+
9
+ <ExcalidrawBlock height={350} initialData={{
10
+ elements: [
11
+ { id: "1", type: "rectangle", x: 100, y: 60, width: 160, height: 60, roundness: { type: 3 }, strokeColor: "#1971c2", backgroundColor: "#d0ebff", fillStyle: "solid", strokeWidth: 2, roughness: 1, opacity: 100, groupIds: [], frameId: null, isDeleted: false, boundElements: [{ type: "text", id: "1t" }], updated: 1, version: 1, versionNonce: 1 },
12
+ { id: "1t", type: "text", x: 130, y: 78, width: 100, height: 25, text: "محتوى", fontSize: 16, fontFamily: 1, textAlign: "center", verticalAlign: "middle", containerId: "1", strokeColor: "#1971c2", backgroundColor: "transparent", fillStyle: "solid", strokeWidth: 1, roughness: 1, opacity: 100, groupIds: [], frameId: null, isDeleted: false, boundElements: null, updated: 1, version: 1, versionNonce: 2 },
13
+ { id: "2", type: "rectangle", x: 380, y: 60, width: 160, height: 60, roundness: { type: 3 }, strokeColor: "#2f9e44", backgroundColor: "#d3f9d8", fillStyle: "solid", strokeWidth: 2, roughness: 1, opacity: 100, groupIds: [], frameId: null, isDeleted: false, boundElements: [{ type: "text", id: "2t" }], updated: 1, version: 1, versionNonce: 3 },
14
+ { id: "2t", type: "text", x: 410, y: 78, width: 100, height: 25, text: "نشر", fontSize: 16, fontFamily: 1, textAlign: "center", verticalAlign: "middle", containerId: "2", strokeColor: "#2f9e44", backgroundColor: "transparent", fillStyle: "solid", strokeWidth: 1, roughness: 1, opacity: 100, groupIds: [], frameId: null, isDeleted: false, boundElements: null, updated: 1, version: 1, versionNonce: 4 },
15
+ { id: "3", type: "arrow", x: 260, y: 90, width: 120, height: 0, strokeColor: "#495057", backgroundColor: "transparent", fillStyle: "solid", strokeWidth: 2, roughness: 1, opacity: 100, groupIds: [], frameId: null, isDeleted: false, boundElements: null, updated: 1, version: 1, versionNonce: 5, startBinding: { elementId: "1", focus: 0, gap: 1 }, endBinding: { elementId: "2", focus: 0, gap: 1 }, points: [[0,0],[120,0]], lastCommittedPoint: null, startArrowhead: null, endArrowhead: "arrow" }
16
+ ],
17
+ appState: { viewBackgroundColor: "transparent" }
18
+ }} />
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: FigmaBlock
3
+ description: تضمين ملفات Figma والنماذج التفاعلية.
4
+ icon: Figma
5
+ ---
6
+
7
+ `FigmaBlock` يُضمِّن ملف Figma أو نموذجاً تفاعلياً أو لوحة FigJam. مرِّر رابط المشاركة من Figma مباشرةً — يُحوَّل تلقائياً إلى رابط التضمين.
8
+
9
+ <Callout type="info">
10
+ يجب أن يكون الملف عاماً أو مفعّلاً بخيار "يمكن لأي شخص لديه الرابط المشاهدة" حتى يظهر التضمين.
11
+ </Callout>
12
+
13
+ ````mdx
14
+ <FigmaBlock url="https://www.figma.com/design/abc123/My-File" />
15
+ <FigmaBlock url="https://www.figma.com/proto/abc123/My-Prototype" height={600} />
16
+ ````
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: هيكل الملفات
3
+ description: مخططات شجرة الملفات.
4
+ icon: FolderTree
5
+ ---
6
+
7
+ <Files>
8
+ <Folder name="src" defaultOpen>
9
+ <Folder name="routes" defaultOpen>
10
+ <File name="__root.tsx" />
11
+ <File name="$lang.tsx" />
12
+ <Folder name="$lang">
13
+ <File name="index.tsx" />
14
+ <Folder name="docs">
15
+ <File name="$.tsx" />
16
+ </Folder>
17
+ </Folder>
18
+ </Folder>
19
+ <Folder name="lib">
20
+ <File name="i18n.ts" />
21
+ <File name="source.ts" />
22
+ <File name="layout.shared.tsx" />
23
+ </Folder>
24
+ </Folder>
25
+ </Files>