robindoc 3.7.4 → 3.7.5

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 (41) hide show
  1. package/README.md +1 -1
  2. package/lib/components/blocks/code-section/index.d.ts +3 -2
  3. package/lib/components/blocks/code-section/index.d.ts.map +1 -1
  4. package/lib/components/blocks/code-section/index.js +1 -1
  5. package/lib/components/blocks/code-section/index.js.map +1 -1
  6. package/lib/components/elements/article/document.d.ts.map +1 -1
  7. package/lib/components/elements/article/document.js +1 -1
  8. package/lib/components/elements/article/document.js.map +1 -1
  9. package/lib/components/elements/article/tags.d.ts +1 -1
  10. package/lib/components/elements/article/tags.js +1 -1
  11. package/lib/components/elements/article/tags.js.map +1 -1
  12. package/lib/components/elements/article/utils.d.ts.map +1 -1
  13. package/lib/components/elements/article/utils.js +1 -1
  14. package/lib/components/elements/article/utils.js.map +1 -1
  15. package/lib/components/ui/code-block/{index.d.ts → index.client.d.ts} +1 -1
  16. package/lib/components/ui/code-block/index.client.d.ts.map +1 -0
  17. package/lib/components/ui/code-block/index.client.js +3 -0
  18. package/lib/components/ui/code-block/index.client.js.map +1 -0
  19. package/lib/components/ui/code-block/index.isomorphic.d.ts +11 -0
  20. package/lib/components/ui/code-block/index.isomorphic.d.ts.map +1 -0
  21. package/lib/components/ui/code-block/index.isomorphic.js +2 -0
  22. package/lib/components/ui/code-block/index.isomorphic.js.map +1 -0
  23. package/lib/components/ui/code-block/index.server.d.ts +11 -0
  24. package/lib/components/ui/code-block/index.server.d.ts.map +1 -0
  25. package/lib/components/ui/code-block/index.server.js +2 -0
  26. package/lib/components/ui/code-block/index.server.js.map +1 -0
  27. package/lib/components/ui/code-block/shared.d.ts +3 -0
  28. package/lib/components/ui/code-block/shared.d.ts.map +1 -0
  29. package/lib/components/ui/code-block/shared.js +2 -0
  30. package/lib/components/ui/code-block/shared.js.map +1 -0
  31. package/lib/components/ui/code-span/index.d.ts +1 -4
  32. package/lib/components/ui/code-span/index.d.ts.map +1 -1
  33. package/lib/components/ui/code-span/index.js +1 -1
  34. package/lib/components/ui/code-span/index.js.map +1 -1
  35. package/lib/components/ui/tabs/index.d.ts.map +1 -1
  36. package/lib/components/ui/tabs/index.js.map +1 -1
  37. package/lib/styles.css +703 -703
  38. package/package.json +4 -3
  39. package/lib/components/ui/code-block/index.d.ts.map +0 -1
  40. package/lib/components/ui/code-block/index.js +0 -2
  41. package/lib/components/ui/code-block/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robindoc",
3
- "version": "3.7.4",
3
+ "version": "3.7.5",
4
4
  "description": "Robindoc is a framework for automatically creating documentation websites based on markdown files, built on React.js Server Components",
5
5
  "main": "./lib/index.js",
6
6
  "scripts": {
@@ -36,11 +36,12 @@
36
36
  "clsx": "2.1.1",
37
37
  "dot-prop": "10.1.0",
38
38
  "github-slugger": "2.0.0",
39
- "tinyglobby": "0.2.15",
40
39
  "gray-matter": "4.0.3",
40
+ "hast-util-to-jsx-runtime": "2.3.6",
41
41
  "html-react-parser": "5.2.11",
42
42
  "marked": "17.0.1",
43
- "shiki": "3.21.0"
43
+ "shiki": "3.21.0",
44
+ "tinyglobby": "0.2.15"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@rollup/plugin-commonjs": "29.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/code-block/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAC;AACrC,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAMhE,OAAO,mBAAmB,CAAC;AAE3B,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAqBD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoB9C,CAAC"}
@@ -1,2 +0,0 @@
1
- import e,{cache as a}from"react";import{createHighlighter as t}from"shiki";import n from"clsx";import{githubDynamic as o}from"./theme.js";import{CodeSpan as r}from"../code-span/index.js";const c=(async()=>{const e=await t({langs:[],themes:[]});return await e.loadTheme(o),e})(),s=a(async e=>{const a=await c;return a.getLoadedLanguages().includes(e)||await a.loadLanguage(e),a}),i=async({code:a,lang:t,className:c,inline:i})=>{const m=await s(t);await m.loadTheme(o);const l=m.codeToHtml(a,{lang:t,theme:"github-dynamic",structure:"inline"});if(i)return e.createElement(r,{code:l});const d=i?"code":"pre";return e.createElement(d,{className:n(i?"r-code-span":"r-code-block",c),dangerouslySetInnerHTML:{__html:l}})};export{i as CodeBlock};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ui/code-block/index.tsx"],"sourcesContent":["import React, { cache } from \"react\";\nimport { createHighlighter, type BuiltinLanguage } from \"shiki\";\nimport clsx from \"clsx\";\n\nimport { githubDynamic } from \"./theme\";\nimport { CodeSpan } from \"../code-span\";\n\nimport \"./code-block.scss\";\n\nexport interface CodeBlockProps {\n code: string;\n lang: BuiltinLanguage;\n className?: string;\n inline?: boolean;\n}\n\nconst initBaseHighlighter = async () => {\n const highlighter = await createHighlighter({ langs: [], themes: [] });\n await highlighter.loadTheme(githubDynamic);\n return highlighter;\n};\n\nconst highlighterPromise = initBaseHighlighter();\n\nconst getHighlighter = cache(async (language: BuiltinLanguage) => {\n const highlighter = await highlighterPromise;\n const loadedLanguages = highlighter.getLoadedLanguages();\n\n if (!loadedLanguages.includes(language)) {\n await highlighter.loadLanguage(language);\n }\n\n return highlighter;\n});\n\nexport const CodeBlock: React.FC<CodeBlockProps> = async ({ code, lang, className, inline }) => {\n const highlighter = await getHighlighter(lang);\n await highlighter.loadTheme(githubDynamic);\n\n const html = highlighter.codeToHtml(code, {\n lang,\n theme: \"github-dynamic\",\n structure: \"inline\",\n });\n\n if (inline) return <CodeSpan code={html} />;\n\n const Component = inline ? \"code\" : \"pre\";\n\n return (\n <Component\n className={clsx(inline ? \"r-code-span\" : \"r-code-block\", className)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n};\n"],"names":["highlighterPromise","async","highlighter","createHighlighter","langs","themes","loadTheme","githubDynamic","initBaseHighlighter","getHighlighter","cache","language","getLoadedLanguages","includes","loadLanguage","CodeBlock","code","lang","className","inline","html","codeToHtml","theme","structure","React","CodeSpan","Component","createElement","clsx","dangerouslySetInnerHTML","__html"],"mappings":"2LAgBA,MAMMA,EANsBC,WACxB,MAAMC,QAAoBC,EAAkB,CAAEC,MAAO,GAAIC,OAAQ,KAEjE,aADMH,EAAYI,UAAUC,GACrBL,GAGgBM,GAErBC,EAAiBC,EAAMT,MAAOU,IAChC,MAAMT,QAAoBF,EAO1B,OANwBE,EAAYU,qBAEfC,SAASF,UACpBT,EAAYY,aAAaH,GAG5BT,IAGEa,EAAsCd,OAASe,OAAMC,OAAMC,YAAWC,aAC/E,MAAMjB,QAAoBO,EAAeQ,SACnCf,EAAYI,UAAUC,GAE5B,MAAMa,EAAOlB,EAAYmB,WAAWL,EAAM,CACtCC,OACAK,MAAO,iBACPC,UAAW,WAGf,GAAIJ,EAAQ,OAAOK,gBAACC,EAAQ,CAACT,KAAMI,IAEnC,MAAMM,EAAYP,EAAS,OAAS,MAEpC,OACIK,EAAAG,cAACD,EAAS,CACNR,UAAWU,EAAKT,EAAS,cAAgB,eAAgBD,GACzDW,wBAAyB,CAAEC,OAAQV"}