robindoc 0.0.0-experimental-7bcc2d8 → 0.0.0-experimental-d1e1e97
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/lib/components/blocks/theme-detector/index.d.ts.map +1 -1
- package/lib/components/blocks/theme-detector/index.js +2 -1
- package/lib/components/blocks/theme-detector/index.js.map +1 -1
- package/lib/components/elements/article/utils.d.ts +1 -1
- package/lib/components/elements/article/utils.d.ts.map +1 -1
- package/lib/components/elements/article/utils.js +1 -1
- package/lib/components/elements/article/utils.js.map +1 -1
- package/lib/styles.css +161 -161
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/theme-detector/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/theme-detector/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAkCzC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAoBjC,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import t,{useEffect as e}from"react";const s=()=>{const t=document.querySelector(".r-root");if(!t)return;const e=localStorage.getItem("theme");e&&["light","dark"].includes(e)?t.classList.add(`r-theme-${e}`):(t.classList.add("r-theme-system"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?t.classList.add("r-theme-dark"):t.classList.add("r-theme-light"));const s=localStorage.getItem("r-tabs"),r=s?.split(";").filter(t=>t&&/[\w-]+=[\w]+/.test(t))||[];Array.from(t.classList).forEach(e=>{e.startsWith("r-tabs-global")&&t.classList.remove(e)}),r.forEach(e=>{const[s,r]=e.split("=");t.classList.add(`r-tabs-global__${s}`,`r-tabs-global__${s}_${r}`)}),t.classList.add("r-ready")},r=()=>(e(()=>{const t=document.querySelector(".r-root");if(t&&!t.classList.contains("r-ready"))return s(),()=>{t.classList.remove("r-ready")}},[]),t.createElement("script",{id:"detect-theme",dangerouslySetInnerHTML:{__html:`(${s})()`},async:!0}));export{r as ThemeDetector};
|
|
2
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/theme-detector/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/theme-detector/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect } from \"react\";\n\nconst clientLogic = () => {\n const root = document.querySelector(\".r-root\");\n\n if (!root) return;\n\n const userTheme = localStorage.getItem(\"theme\");\n if (userTheme && [\"light\", \"dark\"].includes(userTheme)) {\n root.classList.add(`r-theme-${userTheme}`);\n } else {\n root.classList.add(`r-theme-system`);\n if (window.matchMedia && window.matchMedia(\"(prefers-color-scheme: dark)\").matches) {\n root.classList.add(\"r-theme-dark\");\n } else {\n root.classList.add(\"r-theme-light\");\n }\n }\n\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && /[\\w-]+=[\\w]+/.test(item)) || [];\n const classNames = Array.from(root.classList);\n classNames.forEach((className) => {\n if (className.startsWith(`r-tabs-global`)) {\n root.classList.remove(className);\n }\n });\n items.forEach((item) => {\n const [tabsKey, tab] = item.split(\"=\");\n root.classList.add(`r-tabs-global__${tabsKey}`, `r-tabs-global__${tabsKey}_${tab}`);\n });\n root.classList.add(\"r-ready\");\n};\n\nexport const ThemeDetector: React.FC = () => {\n useEffect(() => {\n const root = document.querySelector(\".r-root\");\n if (!root || root.classList.contains(\"r-ready\")) return;\n clientLogic();\n\n return () => {\n root.classList.remove(\"r-ready\");\n };\n }, []);\n\n return (\n <script\n id=\"detect-theme\"\n dangerouslySetInnerHTML={{\n __html: `(${clientLogic})()`,\n }}\n async\n />\n );\n};\n"],"names":["clientLogic","root","document","querySelector","userTheme","localStorage","getItem","includes","classList","add","window","matchMedia","matches","store","items","split","filter","item","test","Array","from","forEach","className","startsWith","remove","tabsKey","tab","ThemeDetector","useEffect","contains","React","createElement","id","dangerouslySetInnerHTML","__html","async"],"mappings":";qCAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMA,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAChB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAAA,CAAOC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAEpC,CAAA,CAAA,CAAA,CAAKF,CAAAA,CAAM,OAEX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMG,CAAAA,CAAYC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACnCF,CAAAA,CAAAA,CAAa,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASH,CAAAA,CAAAA,CACxCH,CAAAA,CAAKO,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAUC,CAAAA,CAAAA,CAAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAWL,CAAAA,CAAAA,CAAAA,CAAAA,CAA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25
|
tabName: string;
|
|
26
26
|
};
|
|
27
27
|
}) => boolean;
|
|
28
|
-
export declare const formatLinkHref: (href: string,
|
|
28
|
+
export declare const formatLinkHref: (href: string, currentPathname: string, pages?: PagesType) => {
|
|
29
29
|
href: string;
|
|
30
30
|
external: boolean;
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/article/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGxD,OAAO,EAAE,KAAK,cAAc,EAAE,4BAAsC;AAGpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM;;;CAmB5C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,WAEnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,YAEjD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM;;;;;CAmBxC,CAAC;AAEF,eAAO,MAAM,cAAc,GACvB,OAAO,KAAK,GAAG,KAAK,EAAE,EACtB,WAAW;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,YAa/E,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/article/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGxD,OAAO,EAAE,KAAK,cAAc,EAAE,4BAAsC;AAGpE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM;;;CAmB5C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,WAEnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,YAEjD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM;;;;;CAmBxC,CAAC;AAEF,eAAO,MAAM,cAAc,GACvB,OAAO,KAAK,GAAG,KAAK,EAAE,EACtB,WAAW;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,YAa/E,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,iBAAiB,MAAM,EAAE,QAAQ,SAAS;;;CAmBtF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO;;;;;;;;;;;UAoBjC,cAAc;;;;CAKrD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"github-slugger";import e from"gray-matter";import{lexer as r}from"marked";import{join as n,dirname as o}from"path";import{parseTokenText as s}from"../../../core/utils/content-tools.js";const
|
|
1
|
+
import t from"github-slugger";import e from"gray-matter";import{lexer as r}from"marked";import{join as n,dirname as o}from"path";import{parseTokenText as s}from"../../../core/utils/content-tools.js";const a=n=>{const{content:o}=e(n),a=r(o.trim()),i=new t,c=a.reduce((t,e)=>{if("heading"===e.type&&(2===e.depth||3===e.depth)){const r=s(e);t.push({title:r,id:i.slug(r),token:e,nested:3===e.depth})}return t},[]);return{tokens:a,headings:c}},i=t=>t.toLowerCase().replace(/\W/g,"_").replace(/_+/g,"_"),c=t=>/^[A-Z][a-zA-Z0-9]+$/.test(t),g=t=>{let e={},r=t;const n=t.match(/[a-z]+=("[^"]+"|'[^']+'|[^ ]+)|[a-z]+/g);if(Array.isArray(n)){const[t,...o]=n;r=t,e=o.reduce((t,e)=>{const[r,...n]=e.split("=");return t[r]=!n||(0===n.length||n.join("=").replace(/(^["']|['"]$)/g,"")),t},{})}return{lang:r,configuration:e}},p=(t,e)=>{if(Array.isArray(t)||!Object.keys(e).length)return!1;if("code"===t.type){const{lang:r,configuration:n}=g(t.lang);if(e["string"==typeof n.tab?i(n.tab):r]||!n.switcher)return!0}return"space"!==t.type&&"code"!==t.type},h=(t,e,r)=>{let s=t;const a=/^(https?:\/\/|\/)/.test(t);if(r&&!a){const a=new URL(t,"http://r"),i=r.find(t=>t.clientPath===e);if(i){const t=n(o(i.origPath),a.pathname).replace(/\\/g,"/"),e=r.find(e=>e.origPath===t);e&&(a.pathname=e.clientPath,s=a.toString().replace("http://r",""))}}return{href:s,external:a}},l=t=>{const e=t.raw.match(/^> \[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\n/);if(e){const[r,n]=e,o={...t,raw:t.raw.substring(r.length)};if(o.tokens){const t={...o.tokens[0]};if(t.raw=t.raw.substring(n.length+4),t.text=t.text.substring(n.length+4),t.tokens[0]){const e={...t.tokens[0]};e.raw=e.raw.substring(n.length+4),e.text=e.text.substring(n.length+4),t.tokens[0]=e}o.tokens[0]=t}return{token:o,type:n.toLowerCase()}}return{token:t,type:null}};export{i as formatId,h as formatLinkHref,p as isNewCodeToken,l as parseBlockqoute,g as parseCodeLang,a as parseMarkdown,c as validateComponentName};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/components/elements/article/utils.ts"],"sourcesContent":["import GithubSlugger from \"github-slugger\";\nimport matter from \"gray-matter\";\nimport { lexer, type Tokens, type Token } from \"marked\";\nimport { dirname, join } from \"path\";\n\nimport { type BlockquoteType } from \"@src/components/ui/blockquote\";\nimport { parseTokenText } from \"@src/core/utils/content-tools\";\n\nimport { type PagesType } from \"./types\";\n\nexport type AnchorData = {\n title: string;\n id: string;\n nested: boolean;\n token: Token;\n};\n\nexport const parseMarkdown = (content: string) => {\n const { content: matterContent } = matter(content);\n const tokens = lexer(matterContent.trim());\n\n const slugger = new GithubSlugger();\n const headings = tokens.reduce<AnchorData[]>((acc, token) => {\n if (token.type === \"heading\" && (token.depth === 2 || token.depth === 3)) {\n const title = parseTokenText(token);\n acc.push({\n title,\n id: slugger.slug(title),\n token,\n nested: token.depth === 3,\n });\n }\n return acc;\n }, []);\n\n return { tokens, headings };\n};\n\nexport const formatId = (raw: string) => {\n return raw.toLowerCase().replace(/\\W/g, \"_\").replace(/_+/g, \"_\");\n};\n\nexport const validateComponentName = (name: string) => {\n return /^[A-Z][a-zA-Z0-9]+$/.test(name);\n};\n\nexport const parseCodeLang = (raw: string) => {\n let configuration: { [key: string]: string | boolean } = {};\n let lang: string = raw;\n\n const match = raw.match(/[a-z]+=(\"[^\"]+\"|'[^']+'|[^ ]+)|[a-z]+/g);\n if (Array.isArray(match)) {\n const [language, ...modifiers] = match as string[];\n lang = language;\n configuration = modifiers.reduce<{ [key: string]: string | boolean }>((acc, cur) => {\n const [key, ...value] = cur.split(\"=\");\n if (value) {\n acc[key] = value.length === 0 ? true : value.join(\"=\").replace(/(^[\"']|['\"]$)/g, \"\");\n } else {\n acc[key] = true;\n }\n return acc;\n }, {});\n }\n return { lang, configuration };\n};\n\nexport const isNewCodeToken = (\n token: Token | Token[],\n codeQueue: { [lang: string]: { element: React.ReactNode; tabName: string } },\n) => {\n if (Array.isArray(token) || !Object.keys(codeQueue).length) return false;\n\n if (token.type === \"code\") {\n const { lang, configuration } = parseCodeLang(token.lang);\n const tabKey = typeof configuration.tab === \"string\" ? formatId(configuration.tab) : lang;\n if (codeQueue[tabKey] || !configuration.switcher) return true;\n }\n\n if (token.type !== \"space\" && token.type !== \"code\") return true;\n\n return false;\n};\n\nexport const formatLinkHref = (href: string,
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/components/elements/article/utils.ts"],"sourcesContent":["import GithubSlugger from \"github-slugger\";\nimport matter from \"gray-matter\";\nimport { lexer, type Tokens, type Token } from \"marked\";\nimport { dirname, join } from \"path\";\n\nimport { type BlockquoteType } from \"@src/components/ui/blockquote\";\nimport { parseTokenText } from \"@src/core/utils/content-tools\";\n\nimport { type PagesType } from \"./types\";\n\nexport type AnchorData = {\n title: string;\n id: string;\n nested: boolean;\n token: Token;\n};\n\nexport const parseMarkdown = (content: string) => {\n const { content: matterContent } = matter(content);\n const tokens = lexer(matterContent.trim());\n\n const slugger = new GithubSlugger();\n const headings = tokens.reduce<AnchorData[]>((acc, token) => {\n if (token.type === \"heading\" && (token.depth === 2 || token.depth === 3)) {\n const title = parseTokenText(token);\n acc.push({\n title,\n id: slugger.slug(title),\n token,\n nested: token.depth === 3,\n });\n }\n return acc;\n }, []);\n\n return { tokens, headings };\n};\n\nexport const formatId = (raw: string) => {\n return raw.toLowerCase().replace(/\\W/g, \"_\").replace(/_+/g, \"_\");\n};\n\nexport const validateComponentName = (name: string) => {\n return /^[A-Z][a-zA-Z0-9]+$/.test(name);\n};\n\nexport const parseCodeLang = (raw: string) => {\n let configuration: { [key: string]: string | boolean } = {};\n let lang: string = raw;\n\n const match = raw.match(/[a-z]+=(\"[^\"]+\"|'[^']+'|[^ ]+)|[a-z]+/g);\n if (Array.isArray(match)) {\n const [language, ...modifiers] = match as string[];\n lang = language;\n configuration = modifiers.reduce<{ [key: string]: string | boolean }>((acc, cur) => {\n const [key, ...value] = cur.split(\"=\");\n if (value) {\n acc[key] = value.length === 0 ? true : value.join(\"=\").replace(/(^[\"']|['\"]$)/g, \"\");\n } else {\n acc[key] = true;\n }\n return acc;\n }, {});\n }\n return { lang, configuration };\n};\n\nexport const isNewCodeToken = (\n token: Token | Token[],\n codeQueue: { [lang: string]: { element: React.ReactNode; tabName: string } },\n) => {\n if (Array.isArray(token) || !Object.keys(codeQueue).length) return false;\n\n if (token.type === \"code\") {\n const { lang, configuration } = parseCodeLang(token.lang);\n const tabKey = typeof configuration.tab === \"string\" ? formatId(configuration.tab) : lang;\n if (codeQueue[tabKey] || !configuration.switcher) return true;\n }\n\n if (token.type !== \"space\" && token.type !== \"code\") return true;\n\n return false;\n};\n\nexport const formatLinkHref = (href: string, currentPathname: string, pages?: PagesType) => {\n let finalHref: string = href;\n const external = /^(https?:\\/\\/|\\/)/.test(href);\n\n if (pages && !external) {\n const pseudoUrl = new URL(href, \"http://r\");\n const currentPageData = pages.find((item) => item.clientPath === currentPathname);\n\n if (currentPageData) {\n const linkOrigPath = join(dirname(currentPageData.origPath), pseudoUrl.pathname).replace(/\\\\/g, \"/\");\n const linkData = pages.find((item) => item.origPath === linkOrigPath);\n\n if (linkData) {\n pseudoUrl.pathname = linkData.clientPath;\n finalHref = pseudoUrl.toString().replace(\"http://r\", \"\");\n }\n }\n }\n return { href: finalHref, external };\n};\n\nexport const parseBlockqoute = (token: Tokens.Blockquote | Tokens.Generic) => {\n const typeMatch = token.raw.match(/^> \\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\\n/);\n if (typeMatch) {\n const [raw, type] = typeMatch;\n const newToken = { ...token, raw: token.raw.substring(raw.length) };\n if (newToken.tokens) {\n const firstToken = { ...newToken.tokens[0] } as Tokens.Paragraph;\n firstToken.raw = firstToken.raw.substring(type.length + 4);\n firstToken.text = firstToken.text.substring(type.length + 4);\n if (firstToken.tokens[0]) {\n const firstSubtoken = { ...firstToken.tokens[0] } as Tokens.Paragraph;\n firstSubtoken.raw = firstSubtoken.raw.substring(type.length + 4);\n firstSubtoken.text = firstSubtoken.text.substring(type.length + 4);\n firstToken.tokens[0] = firstSubtoken;\n }\n newToken.tokens[0] = firstToken;\n }\n\n return {\n token: newToken,\n type: type.toLowerCase() as BlockquoteType,\n };\n }\n\n return { token, type: null };\n};\n"],"names":["parseMarkdown","content","matterContent","matter","tokens","lexer","trim","slugger","GithubSlugger","headings","reduce","acc","token","type","depth","title","parseTokenText","push","id","slug","nested","formatId","raw","toLowerCase","replace","validateComponentName","name","test","parseCodeLang","configuration","lang","match","Array","isArray","language","modifiers","cur","key","value","split","length","join","isNewCodeToken","codeQueue","Object","keys","tab","switcher","formatLinkHref","href","currentPathname","pages","finalHref","external","pseudoUrl","URL","currentPageData","find","item","clientPath","linkOrigPath","dirname","origPath","pathname","linkData","toString","parseBlockqoute","typeMatch","newToken","substring","firstToken","text","firstSubtoken"],"mappings":"uMAiBO,MAAMA,EAAiBC,IAC1B,MAAQA,QAASC,GAAkBC,EAAOF,GACpCG,EAASC,EAAMH,EAAcI,QAE7BC,EAAU,IAAIC,EACdC,EAAWL,EAAOM,OAAqB,CAACC,EAAKC,KAC/C,GAAmB,YAAfA,EAAMC,OAAuC,IAAhBD,EAAME,OAA+B,IAAhBF,EAAME,OAAc,CACtE,MAAMC,EAAQC,EAAeJ,GAC7BD,EAAIM,KAAK,CACLF,QACAG,GAAIX,EAAQY,KAAKJ,GACjBH,QACAQ,OAAwB,IAAhBR,EAAME,OAEtB,CACA,OAAOH,GACR,IAEH,MAAO,CAAEP,SAAQK,aAGRY,EAAYC,GACdA,EAAIC,cAAcC,QAAQ,MAAO,KAAKA,QAAQ,MAAO,KAGnDC,EAAyBC,GAC3B,sBAAsBC,KAAKD,GAGzBE,EAAiBN,IAC1B,IAAIO,EAAqD,CAAA,EACrDC,EAAeR,EAEnB,MAAMS,EAAQT,EAAIS,MAAM,0CACxB,GAAIC,MAAMC,QAAQF,GAAQ,CACtB,MAAOG,KAAaC,GAAaJ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AKxD,EAAOU,IAAKV,EAAMU,IAAI+C,UAAU/C,EAAIkB,SAC1D,GAAI4B,EAAShE,OAAQ,CACjB,MAAMkE,EAAa,IAAKF,EAAShE,OAAO,IAGxC,GAFAkE,EAAWhD,IAAMgD,EAAWhD,IAAI+C,UAAUxD,EAAK2B,OAAS,GACxD8B,EAAWC,KAAOD,EAAWC,KAAKF,UAAUxD,EAAK2B,OAAS,GACtD8B,EAAWlE,OAAO,GAAI,CACtB,MAAMoE,EAAgB,IAAKF,EAAWlE,OAAO,IAC7CoE,EAAclD,IAAMkD,EAAclD,IAAI+C,UAAUxD,EAAK2B,OAAS,GAC9DgC,EAAcD,KAAOC,EAAcD,KAAKF,UAAUxD,EAAK2B,OAAS,GAChE8B,EAAWlE,OAAO,GAAKoE,CAC3B,CACAJ,EAAShE,OAAO,GAAKkE,CACzB,CAEA,MAAO,CACH1D,MAAOwD,EACPvD,KAAMA,EAAKU,cAEnB,CAEA,MAAO,CAAEX,QAAOC,KAAM"}
|
package/lib/styles.css
CHANGED
|
@@ -467,57 +467,6 @@
|
|
|
467
467
|
top: 8px;
|
|
468
468
|
left: 12px;
|
|
469
469
|
z-index: 1001;
|
|
470
|
-
}.keylink-to-navigation {
|
|
471
|
-
margin-top: -40px;
|
|
472
|
-
}.r-article {
|
|
473
|
-
padding: 20px 0 80px;
|
|
474
|
-
grid-area: content;
|
|
475
|
-
}
|
|
476
|
-
@media screen and (width >= 1180px) {
|
|
477
|
-
.r-article {
|
|
478
|
-
padding: 32px 0 80px;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
.r-article > *:first-child {
|
|
482
|
-
margin-top: 0;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
.r-checkbox {
|
|
486
|
-
cursor: pointer;
|
|
487
|
-
width: 20px;
|
|
488
|
-
height: 20px;
|
|
489
|
-
margin: 4px;
|
|
490
|
-
vertical-align: middle;
|
|
491
|
-
box-sizing: border-box;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.r-label {
|
|
495
|
-
cursor: pointer;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.r-task-ol,
|
|
499
|
-
.r-task-ul {
|
|
500
|
-
list-style: none;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.r-task-label {
|
|
504
|
-
display: block;
|
|
505
|
-
width: 100%;
|
|
506
|
-
padding-top: 2px;
|
|
507
|
-
padding-bottom: 2px;
|
|
508
|
-
box-sizing: border-box;
|
|
509
|
-
}
|
|
510
|
-
.r-task-label:hover .r-checkbox {
|
|
511
|
-
filter: brightness(0.8);
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.r-task-li.r-task-li {
|
|
515
|
-
margin-block-start: 2px;
|
|
516
|
-
margin-block-end: 2px;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.r-label-text {
|
|
520
|
-
vertical-align: middle;
|
|
521
470
|
}.r-sidebar {
|
|
522
471
|
grid-area: sidebar;
|
|
523
472
|
box-sizing: border-box;
|
|
@@ -792,6 +741,57 @@
|
|
|
792
741
|
|
|
793
742
|
.r-sidebar-drop[open] > .r-sidebar-drop-btn > .r-sidebar-drop-icon {
|
|
794
743
|
transform: rotate(90deg);
|
|
744
|
+
}.keylink-to-navigation {
|
|
745
|
+
margin-top: -40px;
|
|
746
|
+
}.r-article {
|
|
747
|
+
padding: 20px 0 80px;
|
|
748
|
+
grid-area: content;
|
|
749
|
+
}
|
|
750
|
+
@media screen and (width >= 1180px) {
|
|
751
|
+
.r-article {
|
|
752
|
+
padding: 32px 0 80px;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
.r-article > *:first-child {
|
|
756
|
+
margin-top: 0;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.r-checkbox {
|
|
760
|
+
cursor: pointer;
|
|
761
|
+
width: 20px;
|
|
762
|
+
height: 20px;
|
|
763
|
+
margin: 4px;
|
|
764
|
+
vertical-align: middle;
|
|
765
|
+
box-sizing: border-box;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.r-label {
|
|
769
|
+
cursor: pointer;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.r-task-ol,
|
|
773
|
+
.r-task-ul {
|
|
774
|
+
list-style: none;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.r-task-label {
|
|
778
|
+
display: block;
|
|
779
|
+
width: 100%;
|
|
780
|
+
padding-top: 2px;
|
|
781
|
+
padding-bottom: 2px;
|
|
782
|
+
box-sizing: border-box;
|
|
783
|
+
}
|
|
784
|
+
.r-task-label:hover .r-checkbox {
|
|
785
|
+
filter: brightness(0.8);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.r-task-li.r-task-li {
|
|
789
|
+
margin-block-start: 2px;
|
|
790
|
+
margin-block-end: 2px;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.r-label-text {
|
|
794
|
+
vertical-align: middle;
|
|
795
795
|
}.r-header-menu {
|
|
796
796
|
display: flex;
|
|
797
797
|
justify-content: flex-end;
|
|
@@ -996,6 +996,31 @@
|
|
|
996
996
|
font-size: 14px;
|
|
997
997
|
color: var(--r-neutral-600);
|
|
998
998
|
margin: 12px 0 0;
|
|
999
|
+
}.r-header-social {
|
|
1000
|
+
display: flex;
|
|
1001
|
+
flex: 1;
|
|
1002
|
+
justify-content: flex-end;
|
|
1003
|
+
}
|
|
1004
|
+
@media screen and (width >= 1024px) {
|
|
1005
|
+
.r-header-social {
|
|
1006
|
+
flex: none;
|
|
1007
|
+
justify-content: unset;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.r-header-social-git {
|
|
1012
|
+
color: var(--r-neutral-700);
|
|
1013
|
+
transition: color 0.2s;
|
|
1014
|
+
}
|
|
1015
|
+
.r-header-social-git:hover, .r-header-social-git:focus {
|
|
1016
|
+
color: var(--r-neutral-950);
|
|
1017
|
+
}.r-container {
|
|
1018
|
+
max-width: 1180px;
|
|
1019
|
+
padding-right: 12px;
|
|
1020
|
+
padding-left: 12px;
|
|
1021
|
+
margin-right: auto;
|
|
1022
|
+
margin-left: auto;
|
|
1023
|
+
box-sizing: border-box;
|
|
999
1024
|
}.r-dropdown {
|
|
1000
1025
|
position: relative;
|
|
1001
1026
|
color: var(--r-neutral-600);
|
|
@@ -1075,31 +1100,6 @@
|
|
|
1075
1100
|
|
|
1076
1101
|
.r-dropdown-link._active {
|
|
1077
1102
|
color: var(--r-primary-700);
|
|
1078
|
-
}.r-container {
|
|
1079
|
-
max-width: 1180px;
|
|
1080
|
-
padding-right: 12px;
|
|
1081
|
-
padding-left: 12px;
|
|
1082
|
-
margin-right: auto;
|
|
1083
|
-
margin-left: auto;
|
|
1084
|
-
box-sizing: border-box;
|
|
1085
|
-
}.r-header-social {
|
|
1086
|
-
display: flex;
|
|
1087
|
-
flex: 1;
|
|
1088
|
-
justify-content: flex-end;
|
|
1089
|
-
}
|
|
1090
|
-
@media screen and (width >= 1024px) {
|
|
1091
|
-
.r-header-social {
|
|
1092
|
-
flex: none;
|
|
1093
|
-
justify-content: unset;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
.r-header-social-git {
|
|
1098
|
-
color: var(--r-neutral-700);
|
|
1099
|
-
transition: color 0.2s;
|
|
1100
|
-
}
|
|
1101
|
-
.r-header-social-git:hover, .r-header-social-git:focus {
|
|
1102
|
-
color: var(--r-neutral-950);
|
|
1103
1103
|
}.r-theme-switcher {
|
|
1104
1104
|
position: relative;
|
|
1105
1105
|
display: flex;
|
|
@@ -1191,6 +1191,47 @@
|
|
|
1191
1191
|
user-select: none;
|
|
1192
1192
|
pointer-events: none;
|
|
1193
1193
|
box-sizing: border-box;
|
|
1194
|
+
}.r-breadcrumbs {
|
|
1195
|
+
grid-area: breadcrumbs;
|
|
1196
|
+
list-style: none;
|
|
1197
|
+
margin: 0;
|
|
1198
|
+
padding: 20px 0 0;
|
|
1199
|
+
line-height: 2;
|
|
1200
|
+
}
|
|
1201
|
+
@media screen and (width >= 768px) {
|
|
1202
|
+
.r-breadcrumbs {
|
|
1203
|
+
padding: 32px 0 0;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
.r-breadcrumb {
|
|
1208
|
+
display: inline;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.r-breadcrumb._previous::after {
|
|
1212
|
+
content: "/";
|
|
1213
|
+
font-weight: 600;
|
|
1214
|
+
margin-inline: 8px;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.r-breadcrumb-link {
|
|
1218
|
+
color: var(--r-neutral-700);
|
|
1219
|
+
text-decoration: none;
|
|
1220
|
+
}
|
|
1221
|
+
.r-breadcrumb-link:hover {
|
|
1222
|
+
color: var(--r-primary-800);
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
.r-breadcrumb-link,
|
|
1226
|
+
.r-breadcrumb-title {
|
|
1227
|
+
display: inline;
|
|
1228
|
+
padding: 6px 0;
|
|
1229
|
+
margin: 0;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.r-breadcrumb-title {
|
|
1233
|
+
color: var(--r-neutral-950);
|
|
1234
|
+
font-weight: 600;
|
|
1194
1235
|
}.r-contents {
|
|
1195
1236
|
grid-area: contents;
|
|
1196
1237
|
}
|
|
@@ -1424,50 +1465,6 @@
|
|
|
1424
1465
|
}
|
|
1425
1466
|
.r-contents-git:hover {
|
|
1426
1467
|
color: var(--r-neutral-900);
|
|
1427
|
-
}.r-breadcrumbs {
|
|
1428
|
-
grid-area: breadcrumbs;
|
|
1429
|
-
list-style: none;
|
|
1430
|
-
margin: 0;
|
|
1431
|
-
padding: 20px 0 0;
|
|
1432
|
-
line-height: 2;
|
|
1433
|
-
}
|
|
1434
|
-
@media screen and (width >= 768px) {
|
|
1435
|
-
.r-breadcrumbs {
|
|
1436
|
-
padding: 32px 0 0;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
.r-breadcrumb {
|
|
1441
|
-
display: inline;
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
.r-breadcrumb._previous::after {
|
|
1445
|
-
content: "/";
|
|
1446
|
-
font-weight: 600;
|
|
1447
|
-
margin-inline: 8px;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
.r-breadcrumb-link {
|
|
1451
|
-
color: var(--r-neutral-700);
|
|
1452
|
-
text-decoration: none;
|
|
1453
|
-
}
|
|
1454
|
-
.r-breadcrumb-link:hover {
|
|
1455
|
-
color: var(--r-primary-800);
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
.r-breadcrumb-link,
|
|
1459
|
-
.r-breadcrumb-title {
|
|
1460
|
-
display: inline;
|
|
1461
|
-
padding: 6px 0;
|
|
1462
|
-
margin: 0;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.r-breadcrumb-title {
|
|
1466
|
-
color: var(--r-neutral-950);
|
|
1467
|
-
font-weight: 600;
|
|
1468
|
-
}.r-last-modified {
|
|
1469
|
-
color: var(--r-neutral-700);
|
|
1470
|
-
margin-block-start: 16px;
|
|
1471
1468
|
}.r-pagination {
|
|
1472
1469
|
grid-area: pagination;
|
|
1473
1470
|
display: grid;
|
|
@@ -1542,6 +1539,9 @@
|
|
|
1542
1539
|
|
|
1543
1540
|
.r-pagination-svg {
|
|
1544
1541
|
display: block;
|
|
1542
|
+
}.r-last-modified {
|
|
1543
|
+
color: var(--r-neutral-700);
|
|
1544
|
+
margin-block-start: 16px;
|
|
1545
1545
|
}.r-git-logo {
|
|
1546
1546
|
display: block;
|
|
1547
1547
|
}.r-external-mark {
|
|
@@ -1575,25 +1575,6 @@
|
|
|
1575
1575
|
background-color: currentColor;
|
|
1576
1576
|
border-radius: 0 0 0 4px;
|
|
1577
1577
|
box-sizing: border-box;
|
|
1578
|
-
}.r-anchor-heading:hover .r-anchor-heading-link {
|
|
1579
|
-
visibility: visible;
|
|
1580
|
-
opacity: 1;
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
.r-anchor-heading-link {
|
|
1584
|
-
visibility: hidden;
|
|
1585
|
-
opacity: 0;
|
|
1586
|
-
transition: opacity 0.3s allow-discrete;
|
|
1587
|
-
padding-inline: 8px;
|
|
1588
|
-
margin-inline-start: -4px;
|
|
1589
|
-
color: var(--r-neutral-600);
|
|
1590
|
-
text-decoration: none;
|
|
1591
|
-
}
|
|
1592
|
-
.r-anchor-heading-link:hover {
|
|
1593
|
-
color: var(--r-link-base-hovered);
|
|
1594
|
-
}
|
|
1595
|
-
.r-anchor-heading-link::after {
|
|
1596
|
-
content: "#";
|
|
1597
1578
|
}.r-code-section {
|
|
1598
1579
|
position: relative;
|
|
1599
1580
|
margin-block-start: 1.5em;
|
|
@@ -1638,6 +1619,25 @@
|
|
|
1638
1619
|
|
|
1639
1620
|
.r-code-section-filename {
|
|
1640
1621
|
font-family: var(--monospace-font, monospace, monospace);
|
|
1622
|
+
}.r-anchor-heading:hover .r-anchor-heading-link {
|
|
1623
|
+
visibility: visible;
|
|
1624
|
+
opacity: 1;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.r-anchor-heading-link {
|
|
1628
|
+
visibility: hidden;
|
|
1629
|
+
opacity: 0;
|
|
1630
|
+
transition: opacity 0.3s allow-discrete;
|
|
1631
|
+
padding-inline: 8px;
|
|
1632
|
+
margin-inline-start: -4px;
|
|
1633
|
+
color: var(--r-neutral-600);
|
|
1634
|
+
text-decoration: none;
|
|
1635
|
+
}
|
|
1636
|
+
.r-anchor-heading-link:hover {
|
|
1637
|
+
color: var(--r-link-base-hovered);
|
|
1638
|
+
}
|
|
1639
|
+
.r-anchor-heading-link::after {
|
|
1640
|
+
content: "#";
|
|
1641
1641
|
}.r-block {
|
|
1642
1642
|
width: 100%;
|
|
1643
1643
|
overflow: auto;
|
|
@@ -1702,6 +1702,18 @@
|
|
|
1702
1702
|
}
|
|
1703
1703
|
.r-blockquote-caution .r-blockquote-title {
|
|
1704
1704
|
color: var(--r-caution);
|
|
1705
|
+
}.r-code-span {
|
|
1706
|
+
font-family: var(--monospace-font, monospace, monospace);
|
|
1707
|
+
background-color: var(--r-neutral-200);
|
|
1708
|
+
color: var(--r-primary-900);
|
|
1709
|
+
border-radius: 4px;
|
|
1710
|
+
padding: 2px 6px;
|
|
1711
|
+
font-size: 16px;
|
|
1712
|
+
letter-spacing: 0.5px;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.r-code-span + .r-content-link-external {
|
|
1716
|
+
margin-left: -12px;
|
|
1705
1717
|
}.r-code-block {
|
|
1706
1718
|
font-family: var(--monospace-font, monospace, monospace);
|
|
1707
1719
|
font-size: 16px;
|
|
@@ -1717,18 +1729,6 @@
|
|
|
1717
1729
|
scrollbar-width: thin;
|
|
1718
1730
|
scrollbar-color: var(--r-neutral-200) transparent;
|
|
1719
1731
|
box-sizing: border-box;
|
|
1720
|
-
}.r-code-span {
|
|
1721
|
-
font-family: var(--monospace-font, monospace, monospace);
|
|
1722
|
-
background-color: var(--r-neutral-200);
|
|
1723
|
-
color: var(--r-primary-900);
|
|
1724
|
-
border-radius: 4px;
|
|
1725
|
-
padding: 2px 6px;
|
|
1726
|
-
font-size: 16px;
|
|
1727
|
-
letter-spacing: 0.5px;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
.r-code-span + .r-content-link-external {
|
|
1731
|
-
margin-left: -12px;
|
|
1732
1732
|
}.r-h1 {
|
|
1733
1733
|
font-size: 32px;
|
|
1734
1734
|
line-height: 1.4;
|
|
@@ -1854,14 +1854,6 @@
|
|
|
1854
1854
|
.r-modal._visible {
|
|
1855
1855
|
transform: translateX(-50%) scale(1);
|
|
1856
1856
|
}
|
|
1857
|
-
}.r-kbd-key {
|
|
1858
|
-
background-color: var(--r-neutral-200);
|
|
1859
|
-
font-size: 12px;
|
|
1860
|
-
border-radius: 4px;
|
|
1861
|
-
padding: 5px 8px;
|
|
1862
|
-
min-width: 24px;
|
|
1863
|
-
text-align: center;
|
|
1864
|
-
box-sizing: border-box;
|
|
1865
1857
|
}.r-kbd-container {
|
|
1866
1858
|
display: flex;
|
|
1867
1859
|
gap: 4px;
|
|
@@ -1870,6 +1862,14 @@
|
|
|
1870
1862
|
}
|
|
1871
1863
|
.r-kbd-container:hover {
|
|
1872
1864
|
color: var(--r-neutral-950);
|
|
1865
|
+
}.r-kbd-key {
|
|
1866
|
+
background-color: var(--r-neutral-200);
|
|
1867
|
+
font-size: 12px;
|
|
1868
|
+
border-radius: 4px;
|
|
1869
|
+
padding: 5px 8px;
|
|
1870
|
+
min-width: 24px;
|
|
1871
|
+
text-align: center;
|
|
1872
|
+
box-sizing: border-box;
|
|
1873
1873
|
}.r-copy-button {
|
|
1874
1874
|
position: relative;
|
|
1875
1875
|
padding: 8px;
|
|
@@ -2049,10 +2049,10 @@
|
|
|
2049
2049
|
|
|
2050
2050
|
.r-task-label-text {
|
|
2051
2051
|
vertical-align: middle;
|
|
2052
|
-
}.r-task-ol {
|
|
2053
|
-
list-style: none;
|
|
2054
2052
|
}.r-task-ul {
|
|
2055
2053
|
list-style: none;
|
|
2054
|
+
}.r-task-ol {
|
|
2055
|
+
list-style: none;
|
|
2056
2056
|
}.r-backdrop {
|
|
2057
2057
|
position: fixed;
|
|
2058
2058
|
top: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robindoc",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-d1e1e97",
|
|
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": {
|