@ahmedrowaihi/8n 6.0.35 → 6.0.37

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 (67) hide show
  1. package/dist/index.mjs +5 -5
  2. package/package.json +3 -3
  3. package/starter/.oxfmtrc.json +14 -0
  4. package/starter/.oxlintrc.json +18 -0
  5. package/starter/content/api/en/createPet.mdx +4 -1
  6. package/starter/content/api/en/deletePet.mdx +4 -1
  7. package/starter/content/api/en/listPets.mdx +4 -1
  8. package/starter/content/api/en/showPetById.mdx +4 -1
  9. package/starter/content/changelog/ar/v1.0.0.mdx +26 -26
  10. package/starter/content/changelog/en/v1.0.0.mdx +26 -26
  11. package/starter/content/docs/ar/components/accordion.mdx +6 -3
  12. package/starter/content/docs/ar/components/audio.mdx +4 -1
  13. package/starter/content/docs/ar/components/cards.mdx +6 -1
  14. package/starter/content/docs/ar/components/circuit-board.mdx +27 -5
  15. package/starter/content/docs/ar/components/code-blocks.mdx +10 -10
  16. package/starter/content/docs/ar/components/drawio.mdx +5 -2
  17. package/starter/content/docs/ar/components/dynamic-code-block.mdx +5 -2
  18. package/starter/content/docs/ar/components/excalidraw.mdx +136 -10
  19. package/starter/content/docs/ar/components/figma.mdx +8 -4
  20. package/starter/content/docs/ar/components/index.mdx +135 -40
  21. package/starter/content/docs/ar/components/inline-toc.mdx +28 -20
  22. package/starter/content/docs/ar/components/mermaid.mdx +8 -4
  23. package/starter/content/docs/ar/components/steps.mdx +3 -12
  24. package/starter/content/docs/ar/components/twoslash.mdx +5 -5
  25. package/starter/content/docs/ar/components/type-table.mdx +3 -3
  26. package/starter/content/docs/ar/components/video.mdx +4 -1
  27. package/starter/content/docs/ar/getting-started.mdx +6 -3
  28. package/starter/content/docs/ar/index.mdx +63 -20
  29. package/starter/content/docs/en/components/accordion.mdx +12 -9
  30. package/starter/content/docs/en/components/audio.mdx +6 -9
  31. package/starter/content/docs/en/components/callout.mdx +4 -4
  32. package/starter/content/docs/en/components/cards.mdx +19 -10
  33. package/starter/content/docs/en/components/circuit-board.mdx +225 -44
  34. package/starter/content/docs/en/components/code-blocks.mdx +4 -1
  35. package/starter/content/docs/en/components/drawio.mdx +29 -9
  36. package/starter/content/docs/en/components/dynamic-code-block.mdx +15 -9
  37. package/starter/content/docs/en/components/excalidraw.mdx +109 -38
  38. package/starter/content/docs/en/components/figma.mdx +10 -9
  39. package/starter/content/docs/en/components/files.mdx +7 -7
  40. package/starter/content/docs/en/components/index.mdx +135 -40
  41. package/starter/content/docs/en/components/inline-toc.mdx +9 -9
  42. package/starter/content/docs/en/components/math.mdx +2 -2
  43. package/starter/content/docs/en/components/mermaid.mdx +6 -5
  44. package/starter/content/docs/en/components/steps.mdx +2 -2
  45. package/starter/content/docs/en/components/tabs.mdx +4 -4
  46. package/starter/content/docs/en/components/tweet.mdx +4 -4
  47. package/starter/content/docs/en/components/twoslash.mdx +4 -1
  48. package/starter/content/docs/en/components/type-table.mdx +7 -7
  49. package/starter/content/docs/en/components/video.mdx +5 -5
  50. package/starter/content/docs/en/getting-started.mdx +5 -0
  51. package/starter/content/docs/en/index.mdx +63 -20
  52. package/starter/content/mcp/en/components.mdx +16 -11
  53. package/starter/content/mcp/en/config.mdx +11 -11
  54. package/starter/content/mcp/en/frontmatter.mdx +6 -6
  55. package/starter/content/mcp/en/meta.json +5 -1
  56. package/starter/content/ui/en/badge.mdx +4 -4
  57. package/starter/content/ui/en/index.mdx +6 -1
  58. package/starter/package-lock.json +886 -307
  59. package/starter/package.json +9 -6
  60. package/starter/scripts/build-dist.mts +9 -1
  61. package/starter/scripts/release.mts +4 -1
  62. package/starter/src/lib/create-docs-page.jsx +1 -1
  63. package/starter/src/lib/mdx-plugins.js +1 -1
  64. package/starter/src/styles/app.css +13 -13
  65. package/starter/src/styles/theme.css +166 -150
  66. package/starter/tsconfig.json +5 -18
  67. package/starter/biome.json +0 -33
package/dist/index.mjs CHANGED
@@ -3736,7 +3736,7 @@ async function checkSelfUpdate() {
3736
3736
  });
3737
3737
  if (!res.ok) return;
3738
3738
  const { version: latest } = await res.json();
3739
- const current = "6.0.35";
3739
+ const current = "6.0.37";
3740
3740
  if (latest !== current) console.log(pc.yellow("⚠") + pc.dim(` new version available: `) + pc.cyan(latest) + pc.dim(` (current: ${current}) — run `) + pc.cyan("npm i -g @ahmedrowaihi/8n") + pc.dim(" to update"));
3741
3741
  } catch {}
3742
3742
  }
@@ -3846,7 +3846,7 @@ async function dev() {
3846
3846
  async function build({ server = false } = {}) {
3847
3847
  const { config, contentDir } = await resolveProject();
3848
3848
  const projectDir = process.cwd();
3849
- console.log(pc.cyan("8n") + pc.dim(` v6.0.35 build → ${contentDir}`));
3849
+ console.log(pc.cyan("8n") + pc.dim(` v6.0.37 build → ${contentDir}`));
3850
3850
  if (server) await runNextFlat(projectDir, "build", buildEnv({
3851
3851
  config,
3852
3852
  contentDir,
@@ -3994,7 +3994,7 @@ function scaffold(targetDir) {
3994
3994
  },
3995
3995
  dependencies: {
3996
3996
  "@ahmedrowaihi/8n": "latest",
3997
- "next": "^16.2.0"
3997
+ next: "^16.2.0"
3998
3998
  }
3999
3999
  }, null, 2) + "\n",
4000
4000
  "next.config.mjs": `// Required for Vercel to detect the Next.js framework.\n// The actual Next.js app is built by the 8n CLI internally.\nexport default {};\n`
@@ -4164,7 +4164,7 @@ async function mcp() {
4164
4164
  const mcpDir = join(getStarterDir(), "content", "mcp", "en");
4165
4165
  const server = new McpServer({
4166
4166
  name: "8n",
4167
- version: "6.0.35"
4167
+ version: "6.0.37"
4168
4168
  });
4169
4169
  server.registerTool("read_me", {
4170
4170
  description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
@@ -4305,7 +4305,7 @@ Example: get_component({ name: "components" }) returns all available MDX compone
4305
4305
 
4306
4306
  //#endregion
4307
4307
  //#region src/index.ts
4308
- const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.35").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
4308
+ const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.37").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
4309
4309
  if (cmd.opts().debug) process.env.DEBUG_8N = "1";
4310
4310
  });
4311
4311
  program.command("init").description("Scaffold a new docs project in the current directory").action(init);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/8n",
3
+ "version": "6.0.37",
3
4
  "description": "8n docs — run your docs site from your content directory",
4
- "type": "module",
5
5
  "bin": {
6
6
  "8n": "./dist/index.mjs"
7
7
  },
@@ -9,6 +9,7 @@
9
9
  "dist",
10
10
  "starter"
11
11
  ],
12
+ "type": "module",
12
13
  "scripts": {
13
14
  "build:cli": "tsdown",
14
15
  "dev:cli": "tsdown --watch",
@@ -29,6 +30,5 @@
29
30
  "tsx": "^4.21.0",
30
31
  "typescript": "^5.9.3",
31
32
  "zod": "^4.3.6"
32
- },
33
- "version": "6.0.35"
33
+ }
34
34
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "useTabs": false,
3
+ "tabWidth": 2,
4
+ "printWidth": 80,
5
+ "singleQuote": false,
6
+ "jsxSingleQuote": false,
7
+ "quoteProps": "as-needed",
8
+ "trailingComma": "all",
9
+ "semi": true,
10
+ "arrowParens": "always",
11
+ "bracketSameLine": false,
12
+ "bracketSpacing": true,
13
+ "ignorePatterns": ["node_modules", ".source"]
14
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript", "react", "nextjs", "import"],
4
+ "categories": {
5
+ "correctness": "error",
6
+ "suspicious": "warn"
7
+ },
8
+ "rules": {
9
+ "no-unused-vars": "off",
10
+ "typescript/no-unused-vars": "warn",
11
+ "react/jsx-no-target-blank": "error",
12
+ "react/no-danger": "warn",
13
+ "react/self-closing-comp": "warn",
14
+ "import/no-self-import": "error",
15
+ "import/no-cycle": "warn"
16
+ },
17
+ "ignorePatterns": ["node_modules/", ".next/", "out/", ".source/", "dist/"]
18
+ }
@@ -11,4 +11,7 @@ _openapi:
11
11
 
12
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
13
 
14
- <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets","method":"post"}]} />
14
+ <APIPage
15
+ document={"./openapi/petstore.json"}
16
+ operations={[{ path: "/pets", method: "post" }]}
17
+ />
@@ -11,4 +11,7 @@ _openapi:
11
11
 
12
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
13
 
14
- <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets/{petId}","method":"delete"}]} />
14
+ <APIPage
15
+ document={"./openapi/petstore.json"}
16
+ operations={[{ path: "/pets/{petId}", method: "delete" }]}
17
+ />
@@ -11,4 +11,7 @@ _openapi:
11
11
 
12
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
13
 
14
- <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets","method":"get"}]} />
14
+ <APIPage
15
+ document={"./openapi/petstore.json"}
16
+ operations={[{ path: "/pets", method: "get" }]}
17
+ />
@@ -11,4 +11,7 @@ _openapi:
11
11
 
12
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
13
 
14
- <APIPage document={"./openapi/petstore.json"} operations={[{"path":"/pets/{petId}","method":"get"}]} />
14
+ <APIPage
15
+ document={"./openapi/petstore.json"}
16
+ operations={[{ path: "/pets/{petId}", method: "get" }]}
17
+ />
@@ -21,33 +21,33 @@ summary: الإصدار الأول — توثيق ثنائي اللغة بدعم
21
21
 
22
22
  ### مكوّنات MDX
23
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` | عرض شجرة نظام الملفات |
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
37
  | `ExcalidrawBlock` | رسوم Excalidraw تفاعلية (معزولة بـ iframe، مع تبديل العرض/التحرير) |
38
- | `Tweet` | تغريدات مُضمَّنة مُصيَّرة من الخادم عبر react-tweet |
38
+ | `Tweet` | تغريدات مُضمَّنة مُصيَّرة من الخادم عبر react-tweet |
39
39
 
40
40
  ### مميزات أخرى
41
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` |
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` |
@@ -21,33 +21,33 @@ Full-text search powered by [Orama](https://orama.com) runs entirely in the brow
21
21
 
22
22
  ### MDX Components
23
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 |
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
37
  | `ExcalidrawBlock` | Interactive Excalidraw diagrams (iframe-isolated, view/edit toggle) |
38
- | `Tweet` | Server-rendered tweet embeds via react-tweet |
38
+ | `Tweet` | Server-rendered tweet embeds via react-tweet |
39
39
 
40
40
  ### Also Included
41
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 |
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 |
@@ -6,12 +6,15 @@ icon: ChevronDown
6
6
 
7
7
  <Accordions type="single">
8
8
  <Accordion title="ما هذا القالب؟">
9
- موقع توثيق مبني بـ Fumadocs يعمل على Next.js، مع دعم i18n وخطوط ثمانية والبحث المحلي.
9
+ موقع توثيق مبني بـ Fumadocs يعمل على Next.js، مع دعم i18n وخطوط ثمانية
10
+ والبحث المحلي.
10
11
  </Accordion>
11
12
  <Accordion title="هل يمكنني إضافة لغات أخرى؟">
12
- نعم — أضف اللغة إلى `src/config.ts` وأنشئ مجلد <code>{'content/docs/<locale>/'}</code> المقابل.
13
+ نعم — أضف اللغة إلى `src/config.ts` وأنشئ مجلد{" "}
14
+ <code>{"content/docs/<locale>/"}</code> المقابل.
13
15
  </Accordion>
14
16
  <Accordion title="هل يعمل بدون إنترنت؟">
15
- يستخدم البحث Orama محلياً — بدون طلبات API خارجية. يحتاج الموقع فقط إلى خادم ملفات ثابتة.
17
+ يستخدم البحث Orama محلياً — بدون طلبات API خارجية. يحتاج الموقع فقط إلى خادم
18
+ ملفات ثابتة.
16
19
  </Accordion>
17
20
  </Accordions>
@@ -6,4 +6,7 @@ icon: Music
6
6
 
7
7
  `Audio` يعرض مشغّل صوت مدمج. المصادر المدعومة: MP3 وAAC وOGG وبث HLS وروابط ملفات الصوت المباشرة.
8
8
 
9
- <Audio src="https://www.youtube.com/watch?v=pO5dgZrM9Mk" title="سورة الفاتحة — الشيخ محمود خليل الحصري" />
9
+ <Audio
10
+ src="https://www.youtube.com/watch?v=pO5dgZrM9Mk"
11
+ title="سورة الفاتحة — الشيخ محمود خليل الحصري"
12
+ />
@@ -6,5 +6,10 @@ icon: LayoutGrid
6
6
 
7
7
  <Cards>
8
8
  <Card title="بطاقة أولى" description="وصف قصير يظهر هنا." href="#" />
9
- <Card title="بطاقة ثانية" description="بطاقة أخرى مع رابط." href="#" icon="Star" />
9
+ <Card
10
+ title="بطاقة ثانية"
11
+ description="بطاقة أخرى مع رابط."
12
+ href="#"
13
+ icon="Star"
14
+ />
10
15
  </Cards>
@@ -7,14 +7,36 @@ icon: CircuitBoard
7
7
  `CircuitBoardBlock` يرسم مخطط عقد متحرك مع نبضات كهربائية على المسارات. مناسب لتوضيح بنية الأنظمة والخدمات المصغّرة والتواصل بين المكونات.
8
8
 
9
9
  <CircuitBoardBlock
10
- width={580} height={240}
10
+ width={580}
11
+ height={240}
11
12
  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" },
13
+ {
14
+ id: "client",
15
+ x: 80,
16
+ y: 120,
17
+ label: "العميل",
18
+ status: "active",
19
+ icon: "Monitor",
20
+ },
21
+ {
22
+ id: "api",
23
+ x: 290,
24
+ y: 120,
25
+ label: "API",
26
+ status: "processing",
27
+ icon: "Server",
28
+ },
29
+ {
30
+ id: "db",
31
+ x: 500,
32
+ y: 120,
33
+ label: "قاعدة البيانات",
34
+ status: "active",
35
+ icon: "Database",
36
+ },
15
37
  ]}
16
38
  connections={[
17
39
  { from: "client", to: "api", animated: true },
18
- { from: "api", to: "db", bidirectional: true },
40
+ { from: "api", to: "db", bidirectional: true },
19
41
  ]}
20
42
  />
@@ -7,13 +7,13 @@ icon: Code
7
7
  كتلة كود عادية مع عنوان وتمييز بالألوان:
8
8
 
9
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';
10
+ import { loader } from "fumadocs-core/source";
11
+ import { createMDXSource } from "fumadocs-mdx";
12
+ import { docs } from "@/.source";
13
13
 
14
14
  // بناء مصدر التوثيق من مجموعة MDX المولّدة
15
15
  export const source = loader({
16
- baseUrl: '/docs',
16
+ baseUrl: "/docs",
17
17
  source: createMDXSource(docs),
18
18
  });
19
19
  ```
@@ -21,10 +21,10 @@ export const source = loader({
21
21
  تمييز أسطر محددة باستخدام `// [!code highlight]`:
22
22
 
23
23
  ```tsx title="src/routes/$lang/docs/$.tsx"
24
- export const Route = createFileRoute('/$lang/docs/$')({
24
+ export const Route = createFileRoute("/$lang/docs/$")({
25
25
  component: Page, // [!code highlight]
26
26
  loader: async ({ params }) => {
27
- const slugs = params._splat?.split('/') ?? [];
27
+ const slugs = params._splat?.split("/") ?? [];
28
28
  return loader({ data: { slugs, lang: params.lang } }); // [!code highlight]
29
29
  },
30
30
  });
@@ -33,13 +33,13 @@ export const Route = createFileRoute('/$lang/docs/$')({
33
33
  أرقام الأسطر باستخدام `lineNumbers`:
34
34
 
35
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';
36
+ import { loader } from "fumadocs-core/source";
37
+ import { createMDXSource } from "fumadocs-mdx";
38
+ import { docs } from "@/.source";
39
39
 
40
40
  // بناء مصدر التوثيق من مجموعة MDX المولّدة
41
41
  export const source = loader({
42
- baseUrl: '/docs',
42
+ baseUrl: "/docs",
43
43
  source: createMDXSource(docs),
44
44
  });
45
45
  ```
@@ -6,7 +6,9 @@ icon: Share2
6
6
 
7
7
  `DrawioBlock` يُضمِّن مخطط draw.io تفاعلي كامل. مرِّر عناصر `mxCell` كـ XML خام — المكوّن يُغلّفها تلقائياً.
8
8
 
9
- <DrawioBlock height={300} xml={`
9
+ <DrawioBlock
10
+ height={300}
11
+ xml={`
10
12
  <mxCell id="2" value="العميل" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
11
13
  <mxGeometry x="80" y="120" width="120" height="60" as="geometry"/>
12
14
  </mxCell>
@@ -16,4 +18,5 @@ icon: Share2
16
18
  <mxCell id="4" style="endArrow=classic;html=1;flowAnimation=1;" edge="1" source="2" target="3" parent="1">
17
19
  <mxGeometry relative="1" as="geometry"/>
18
20
  </mxCell>
19
- `} />
21
+ `}
22
+ />
@@ -6,7 +6,10 @@ icon: Braces
6
6
 
7
7
  `DynamicCodeBlock` يعرض كتلة كود مع لغة يمكن تغييرها في وقت التشغيل:
8
8
 
9
- <DynamicCodeBlock lang="ts" code={`export async function greet() {
9
+ <DynamicCodeBlock
10
+ lang="ts"
11
+ code={`export async function greet() {
10
12
  'use server';
11
13
  return { message: 'مرحباً من الخادم!' };
12
- }`} />
14
+ }`}
15
+ />
@@ -6,13 +6,139 @@ icon: PenLine
6
6
 
7
7
  `ExcalidrawBlock` يُضمِّن مخطط Excalidraw تفاعلي بوضع القراءة فقط. مرِّر `initialData` مع عناصر المخطط.
8
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
- }} />
9
+ <ExcalidrawBlock
10
+ height={350}
11
+ initialData={{
12
+ elements: [
13
+ {
14
+ id: "1",
15
+ type: "rectangle",
16
+ x: 100,
17
+ y: 60,
18
+ width: 160,
19
+ height: 60,
20
+ roundness: { type: 3 },
21
+ strokeColor: "#1971c2",
22
+ backgroundColor: "#d0ebff",
23
+ fillStyle: "solid",
24
+ strokeWidth: 2,
25
+ roughness: 1,
26
+ opacity: 100,
27
+ groupIds: [],
28
+ frameId: null,
29
+ isDeleted: false,
30
+ boundElements: [{ type: "text", id: "1t" }],
31
+ updated: 1,
32
+ version: 1,
33
+ versionNonce: 1,
34
+ },
35
+ {
36
+ id: "1t",
37
+ type: "text",
38
+ x: 130,
39
+ y: 78,
40
+ width: 100,
41
+ height: 25,
42
+ text: "محتوى",
43
+ fontSize: 16,
44
+ fontFamily: 1,
45
+ textAlign: "center",
46
+ verticalAlign: "middle",
47
+ containerId: "1",
48
+ strokeColor: "#1971c2",
49
+ backgroundColor: "transparent",
50
+ fillStyle: "solid",
51
+ strokeWidth: 1,
52
+ roughness: 1,
53
+ opacity: 100,
54
+ groupIds: [],
55
+ frameId: null,
56
+ isDeleted: false,
57
+ boundElements: null,
58
+ updated: 1,
59
+ version: 1,
60
+ versionNonce: 2,
61
+ },
62
+ {
63
+ id: "2",
64
+ type: "rectangle",
65
+ x: 380,
66
+ y: 60,
67
+ width: 160,
68
+ height: 60,
69
+ roundness: { type: 3 },
70
+ strokeColor: "#2f9e44",
71
+ backgroundColor: "#d3f9d8",
72
+ fillStyle: "solid",
73
+ strokeWidth: 2,
74
+ roughness: 1,
75
+ opacity: 100,
76
+ groupIds: [],
77
+ frameId: null,
78
+ isDeleted: false,
79
+ boundElements: [{ type: "text", id: "2t" }],
80
+ updated: 1,
81
+ version: 1,
82
+ versionNonce: 3,
83
+ },
84
+ {
85
+ id: "2t",
86
+ type: "text",
87
+ x: 410,
88
+ y: 78,
89
+ width: 100,
90
+ height: 25,
91
+ text: "نشر",
92
+ fontSize: 16,
93
+ fontFamily: 1,
94
+ textAlign: "center",
95
+ verticalAlign: "middle",
96
+ containerId: "2",
97
+ strokeColor: "#2f9e44",
98
+ backgroundColor: "transparent",
99
+ fillStyle: "solid",
100
+ strokeWidth: 1,
101
+ roughness: 1,
102
+ opacity: 100,
103
+ groupIds: [],
104
+ frameId: null,
105
+ isDeleted: false,
106
+ boundElements: null,
107
+ updated: 1,
108
+ version: 1,
109
+ versionNonce: 4,
110
+ },
111
+ {
112
+ id: "3",
113
+ type: "arrow",
114
+ x: 260,
115
+ y: 90,
116
+ width: 120,
117
+ height: 0,
118
+ strokeColor: "#495057",
119
+ backgroundColor: "transparent",
120
+ fillStyle: "solid",
121
+ strokeWidth: 2,
122
+ roughness: 1,
123
+ opacity: 100,
124
+ groupIds: [],
125
+ frameId: null,
126
+ isDeleted: false,
127
+ boundElements: null,
128
+ updated: 1,
129
+ version: 1,
130
+ versionNonce: 5,
131
+ startBinding: { elementId: "1", focus: 0, gap: 1 },
132
+ endBinding: { elementId: "2", focus: 0, gap: 1 },
133
+ points: [
134
+ [0, 0],
135
+ [120, 0],
136
+ ],
137
+ lastCommittedPoint: null,
138
+ startArrowhead: null,
139
+ endArrowhead: "arrow",
140
+ },
141
+ ],
142
+ appState: { viewBackgroundColor: "transparent" },
143
+ }}
144
+ />
@@ -7,10 +7,14 @@ icon: Figma
7
7
  `FigmaBlock` يُضمِّن ملف Figma أو نموذجاً تفاعلياً أو لوحة FigJam. مرِّر رابط المشاركة من Figma مباشرةً — يُحوَّل تلقائياً إلى رابط التضمين.
8
8
 
9
9
  <Callout type="info">
10
- يجب أن يكون الملف عاماً أو مفعّلاً بخيار "يمكن لأي شخص لديه الرابط المشاهدة" حتى يظهر التضمين.
10
+ يجب أن يكون الملف عاماً أو مفعّلاً بخيار "يمكن لأي شخص لديه الرابط المشاهدة"
11
+ حتى يظهر التضمين.
11
12
  </Callout>
12
13
 
13
- ````mdx
14
+ ```mdx
14
15
  <FigmaBlock url="https://www.figma.com/design/abc123/My-File" />
15
- <FigmaBlock url="https://www.figma.com/proto/abc123/My-Prototype" height={600} />
16
- ````
16
+ <FigmaBlock
17
+ url="https://www.figma.com/proto/abc123/My-Prototype"
18
+ height={600}
19
+ />
20
+ ```