robindoc 2.5.1 → 3.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.
- package/lib/components/blocks/contents/index.js +1 -1
- package/lib/components/blocks/contents/index.js.map +1 -1
- package/lib/components/blocks/header-social/index.js +1 -1
- package/lib/components/blocks/header-social/index.js.map +1 -1
- package/lib/components/elements/article/utils.d.ts +0 -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/components/ui/blockquote/index.d.ts.map +1 -1
- package/lib/components/ui/blockquote/index.js.map +1 -1
- package/lib/components/ui/tabs/tabs-header/index.js +1 -1
- package/lib/components/ui/tabs/tabs-header/index.js.map +1 -1
- package/lib/core/utils/content-tools.d.ts +3 -0
- package/lib/core/utils/content-tools.d.ts.map +1 -0
- package/lib/core/utils/content-tools.js +2 -0
- package/lib/core/utils/content-tools.js.map +1 -0
- package/lib/core/utils/{get-meta.d.ts → get-metadata.d.ts} +3 -3
- package/lib/core/utils/get-metadata.d.ts.map +1 -0
- package/lib/core/utils/get-metadata.js +2 -0
- package/lib/core/utils/get-metadata.js.map +1 -0
- package/lib/core/utils/{git-data.d.ts → git-tools.d.ts} +1 -1
- package/lib/core/utils/git-tools.d.ts.map +1 -0
- package/lib/core/utils/{git-data.js → git-tools.js} +1 -1
- package/lib/core/utils/git-tools.js.map +1 -0
- package/lib/core/utils/initialize-robindoc.d.ts +5 -5
- package/lib/core/utils/initialize-robindoc.d.ts.map +1 -1
- package/lib/core/utils/initialize-robindoc.js +1 -1
- package/lib/core/utils/initialize-robindoc.js.map +1 -1
- package/lib/core/utils/load-content.d.ts.map +1 -1
- package/lib/core/utils/load-content.js.map +1 -1
- package/lib/core/utils/parse-structure.js +1 -1
- package/lib/core/utils/parse-structure.js.map +1 -1
- package/lib/core/utils/path-tools.d.ts +5 -3
- package/lib/core/utils/path-tools.d.ts.map +1 -1
- package/lib/core/utils/path-tools.js +1 -1
- package/lib/core/utils/path-tools.js.map +1 -1
- package/lib/core/utils/{tabs-store.d.ts → tabs-tools.d.ts} +1 -1
- package/lib/core/utils/tabs-tools.d.ts.map +1 -0
- package/lib/core/utils/{tabs-store.js → tabs-tools.js} +1 -1
- package/lib/core/utils/{tabs-store.js.map → tabs-tools.js.map} +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/package.json +8 -2
- package/lib/core/utils/get-meta.d.ts.map +0 -1
- package/lib/core/utils/get-meta.js +0 -2
- package/lib/core/utils/get-meta.js.map +0 -1
- package/lib/core/utils/git-data.d.ts.map +0 -1
- package/lib/core/utils/git-data.js.map +0 -1
- package/lib/core/utils/tabs-store.d.ts.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import e,{useRef as t,useEffect as n}from"react";import r from"clsx";import{useHeadingIndex as s}from"../../contexts/contents/use-heading-index.js";import{detectGitType as c}from"../../../core/utils/git-
|
|
2
|
+
import e,{useRef as t,useEffect as n}from"react";import r from"clsx";import{useHeadingIndex as s}from"../../contexts/contents/use-heading-index.js";import{detectGitType as c}from"../../../core/utils/git-tools.js";const o=({headings:o,hideContents:l,editUri:a,translations:i})=>{const m=t(null),d=t(null),h=t(null),p=s(),{onThisPage:u="On this page",editOnService:f="Edit on {service}"}=i||{};return n((()=>{h.current&&d.current&&d.current.style.setProperty("--drop-height",h.current.offsetHeight+"px")}),[]),e.createElement("div",{className:"r-contents"},e.createElement("div",{className:"r-contents-sticky",ref:m},o.length>0&&!l&&e.createElement(e.Fragment,null,e.createElement("input",{type:"checkbox",className:"r-contents-control",id:"r-contents"}),e.createElement("div",{className:"r-contents-details"},e.createElement("label",{className:"r-contents-title",htmlFor:"r-contents"},u,e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"r-contents-chevron"},e.createElement("path",{d:"m6 9 6 6 6-6"}))),e.createElement("div",{className:"r-contents-list",ref:d},e.createElement("div",{className:"r-contents-list-content",ref:h},o.map(((t,n)=>e.createElement("a",{href:`#${t.id}`,key:t.id,className:r("r-contents-link",t.nested&&"_nested",null!==p&&n<=p&&"_passed",p===n&&"_active"),ref:e=>{e?.offsetTop&&m.current&&m.current.scrollHeight>m.current.clientHeight&&p===n&&m.current.scrollTo({top:Math.max(e.offsetTop-Math.ceil(window.innerHeight/2),0)})}},t.title))))))),a?.match(/^https?:\/\//)&&e.createElement("div",{className:"r-contents-actions"},e.createElement("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"r-contents-git"},f.replace("{service}",c(a).name)))))};export{o as Contents};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/contents/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\nimport { useHeadingIndex } from \"@src/components/contexts/contents/use-heading-index\";\nimport { detectGitType } from \"@src/core/utils/git-data\";\n\nimport \"./contents.scss\";\n\nexport interface ContentsProps extends React.PropsWithChildren {\n headings: { id: string; nested: boolean; title: string | JSX.Element }[];\n hideContents?: boolean;\n editUri?: string | null;\n translations?: {\n /** On this page */\n onThisPage?: string;\n /** Edit on {service} */\n editOnService?: string;\n };\n}\n\nexport const Contents: React.FC<ContentsProps> = ({ headings, hideContents, editUri, translations }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const headingIndex = useHeadingIndex();\n const { onThisPage = \"On this page\", editOnService = \"Edit on {service}\" } = translations || {};\n\n useEffect(() => {\n if (dropdownContentRef.current && dropdownRef.current) {\n dropdownRef.current.style.setProperty(\"--drop-height\", dropdownContentRef.current.offsetHeight + \"px\");\n }\n }, []);\n\n return (\n <div className=\"r-contents\">\n <div className=\"r-contents-sticky\" ref={containerRef}>\n {headings.length > 0 && !hideContents && (\n <>\n <input type=\"checkbox\" className=\"r-contents-control\" id=\"r-contents\" />\n <div className=\"r-contents-details\">\n <label className=\"r-contents-title\" htmlFor=\"r-contents\">\n {onThisPage}\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"r-contents-chevron\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </label>\n <div className=\"r-contents-list\" ref={dropdownRef}>\n <div className=\"r-contents-list-content\" ref={dropdownContentRef}>\n {headings.map((heading, index) => (\n <a\n href={`#${heading.id}`}\n key={heading.id}\n className={clsx(\n \"r-contents-link\",\n heading.nested && \"_nested\",\n headingIndex !== null && index <= headingIndex && \"_passed\",\n headingIndex === index && \"_active\",\n )}\n ref={(node) => {\n if (\n node?.offsetTop &&\n containerRef.current &&\n containerRef.current.scrollHeight >\n containerRef.current.clientHeight &&\n headingIndex === index\n ) {\n containerRef.current.scrollTo({\n top: Math.max(\n node.offsetTop - Math.ceil(window.innerHeight / 2),\n 0,\n ),\n });\n }\n }}\n >\n {heading.title}\n </a>\n ))}\n </div>\n </div>\n </div>\n </>\n )}\n {editUri?.match(/^https?:\\/\\//) && (\n <div className=\"r-contents-actions\">\n <a href={editUri} target=\"_blank\" rel=\"noopener noreferrer\" className=\"r-contents-git\">\n {editOnService.replace(\"{service}\", detectGitType(editUri).name)}\n </a>\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"names":["Contents","headings","hideContents","editUri","translations","containerRef","useRef","dropdownRef","dropdownContentRef","headingIndex","useHeadingIndex","onThisPage","editOnService","useEffect","current","style","setProperty","offsetHeight","React","createElement","className","ref","length","Fragment","type","id","htmlFor","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","d","map","heading","index","href","key","clsx","nested","node","offsetTop","scrollHeight","clientHeight","scrollTo","top","Math","max","ceil","window","innerHeight","title","match","target","rel","replace","detectGitType","name"],"mappings":";oNAqBO,CAAMA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAoC,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAUC,eAAcC,CAASC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACjF,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAeC,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACtCC,CAAcD,CAAAA,CAAAA,CAAuB,CACrCE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAqBF,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC5CG,CAAeC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACfC,WAAEA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAcC,CAAEA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAgB,CAAwBR,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAgB,GAQ7F,CANAS,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,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AA,CAAA,CAAA,CAAA,CAAA,CAAsBrC,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACjER,CAAc8C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAcxD,CAASyD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAMlF"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/contents/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\nimport { useHeadingIndex } from \"@src/components/contexts/contents/use-heading-index\";\nimport { detectGitType } from \"@src/core/utils/git-tools\";\n\nimport \"./contents.scss\";\n\nexport interface ContentsProps extends React.PropsWithChildren {\n headings: { id: string; nested: boolean; title: string | JSX.Element }[];\n hideContents?: boolean;\n editUri?: string | null;\n translations?: {\n /** On this page */\n onThisPage?: string;\n /** Edit on {service} */\n editOnService?: string;\n };\n}\n\nexport const Contents: React.FC<ContentsProps> = ({ headings, hideContents, editUri, translations }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const headingIndex = useHeadingIndex();\n const { onThisPage = \"On this page\", editOnService = \"Edit on {service}\" } = translations || {};\n\n useEffect(() => {\n if (dropdownContentRef.current && dropdownRef.current) {\n dropdownRef.current.style.setProperty(\"--drop-height\", dropdownContentRef.current.offsetHeight + \"px\");\n }\n }, []);\n\n return (\n <div className=\"r-contents\">\n <div className=\"r-contents-sticky\" ref={containerRef}>\n {headings.length > 0 && !hideContents && (\n <>\n <input type=\"checkbox\" className=\"r-contents-control\" id=\"r-contents\" />\n <div className=\"r-contents-details\">\n <label className=\"r-contents-title\" htmlFor=\"r-contents\">\n {onThisPage}\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"r-contents-chevron\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </label>\n <div className=\"r-contents-list\" ref={dropdownRef}>\n <div className=\"r-contents-list-content\" ref={dropdownContentRef}>\n {headings.map((heading, index) => (\n <a\n href={`#${heading.id}`}\n key={heading.id}\n className={clsx(\n \"r-contents-link\",\n heading.nested && \"_nested\",\n headingIndex !== null && index <= headingIndex && \"_passed\",\n headingIndex === index && \"_active\",\n )}\n ref={(node) => {\n if (\n node?.offsetTop &&\n containerRef.current &&\n containerRef.current.scrollHeight >\n containerRef.current.clientHeight &&\n headingIndex === index\n ) {\n containerRef.current.scrollTo({\n top: Math.max(\n node.offsetTop - Math.ceil(window.innerHeight / 2),\n 0,\n ),\n });\n }\n }}\n >\n {heading.title}\n </a>\n ))}\n </div>\n </div>\n </div>\n </>\n )}\n {editUri?.match(/^https?:\\/\\//) && (\n <div className=\"r-contents-actions\">\n <a href={editUri} target=\"_blank\" rel=\"noopener noreferrer\" className=\"r-contents-git\">\n {editOnService.replace(\"{service}\", detectGitType(editUri).name)}\n </a>\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"names":["Contents","headings","hideContents","editUri","translations","containerRef","useRef","dropdownRef","dropdownContentRef","headingIndex","useHeadingIndex","onThisPage","editOnService","useEffect","current","style","setProperty","offsetHeight","React","createElement","className","ref","length","Fragment","type","id","htmlFor","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","d","map","heading","index","href","key","clsx","nested","node","offsetTop","scrollHeight","clientHeight","sc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rC,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACjER,CAAc8C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAcxD,CAASyD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAMlF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{detectGitType as r}from"../../../core/utils/git-
|
|
1
|
+
import e from"react";import{detectGitType as r}from"../../../core/utils/git-tools.js";import{GithubLogo as t,GitlabLogo as o,GitLogo as i}from"../../ui/git-logos/index.js";const l={github:t,gitlab:o,git:i},a=({git:t})=>{const o="string"==typeof t?{uri:t,logo:l[r(t).key]}:t,i=o.logo;return e.createElement("div",{className:"r-header-social"},e.createElement("a",{href:o.uri,className:"r-header-social-git",target:"_blank",rel:"noopener noreferrer"},e.createElement(i,null)))};export{a as HeaderSocial};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/header-social/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { detectGitType } from \"@src/core/utils/git-
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/blocks/header-social/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { detectGitType } from \"@src/core/utils/git-tools\";\nimport { GithubLogo, GitlabLogo, GitLogo } from \"@src/components/ui/git-logos\";\n\nimport \"./header-social.scss\";\n\nconst gitLogos = {\n github: GithubLogo,\n gitlab: GitlabLogo,\n git: GitLogo,\n};\n\nexport const HeaderSocial: React.FC<{ git: string | { uri: string; logo: React.ElementType } }> = ({ git }) => {\n const gitData = typeof git === \"string\" ? { uri: git, logo: gitLogos[detectGitType(git).key] } : git;\n const Logo = gitData.logo;\n\n return (\n <div className=\"r-header-social\">\n <a href={gitData.uri} className=\"r-header-social-git\" target=\"_blank\" rel=\"noopener noreferrer\">\n <Logo />\n </a>\n </div>\n );\n};\n"],"names":["gitLogos","github","GithubLogo","gitlab","GitlabLogo","git","GitLogo","HeaderSocial","gitData","uri","logo","detectGitType","key","Logo","React","createElement","className","href","target","rel"],"mappings":"4KAOA,MAAMA,EAAW,CACbC,OAAQC,EACRC,OAAQC,EACRC,IAAKC,GAGIC,EAAqF,EAAGF,UACjG,MAAMG,EAAyB,iBAARH,EAAmB,CAAEI,IAAKJ,EAAKK,KAAMV,EAASW,EAAcN,GAAKO,MAASP,EAC3FQ,EAAOL,EAAQE,KAErB,OACII,EAAAC,cAAA,MAAA,CAAKC,UAAU,mBACXF,EAAAC,cAAA,IAAA,CAAGE,KAAMT,EAAQC,IAAKO,UAAU,sBAAsBE,OAAO,SAASC,IAAI,uBACtEL,EAAAC,cAACF,EAAI,OAGf"}
|
|
@@ -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;
|
|
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,YAAa,MAAM;;;CAmB5C,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAS,MAAM,WAEnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,MAAM,YAEjD,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,MAAM;;;;;CAmBxC,CAAC;AAEF,eAAO,MAAM,cAAc,UAChB,KAAK,GAAG,KAAK,EAAE,aACX;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,YAa3E,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,MAAM,YAAY,MAAM,UAAU,SAAS;;;CAiB/E,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,OAAO,UAAU,GAAG,OAAO,OAAO;;;;;;;;;;;;;;;CAyBxE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"github-slugger";import e from"gray-matter";import{lexer as
|
|
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 i=n=>{const{content:o}=e(n),i=r(o.trim()),a=new t,c=i.reduce(((t,e)=>{if("heading"===e.type&&(2===e.depth||3===e.depth)){const r=s(e);t.push({title:r,id:a.slug(r),token:e,nested:3===e.depth})}return t}),[]);return{tokens:i,headings:c}},a=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}},l=(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?a(n.tab):r]||!n.switcher)return!0}return"space"!==t.type&&"code"!==t.type},p=(t,e,r)=>{let s=t;const i=/^(https?:\/\/|\/)/.test(t);if(r&&!i){const i=r.find((t=>t.clientPath===e));if(i){const e=n(o(i.origPath),t).replace(/\\/g,"/"),a=r.find((t=>t.origPath===e));a&&(s=a?.clientPath)}}return{href:s,external:i}},u=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{a as formatId,p as formatLinkHref,l as isNewCodeToken,u as parseBlockqoute,g as parseCodeLang,i 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 { type PagesType } from \"./types\";\n\nexport type AnchorData = {\n title: string;\n id: string;\n nested: boolean;\n token: Token;\n};\n\nexport const
|
|
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: JSX.Element; 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, pathname: string, pages?: PagesType) => {\n let finalHref: string = href;\n const external = /^(https?:\\/\\/|\\/)/.test(href);\n\n if (pages && !external) {\n const currentPageData = pages.find((item) => item.clientPath === pathname);\n\n if (currentPageData) {\n const linkOrigPath = join(dirname(currentPageData.origPath), href).replace(/\\\\/g, \"/\");\n const linkData = pages.find((item) => item.origPath === linkOrigPath);\n\n if (linkData) {\n finalHref = linkData?.clientPath;\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","pathname","pages","finalHref","external","currentPageData","find","item","clientPath","linkOrigPath","dirname","origPath","linkData","parseBlockqoute","typeMatch","newToken","substring","firstToken","text","firstSubtoken"],"mappings":"uMAiBa,MAAAA,EAAiBC,IAC1B,MAAQA,QAASC,GAAkBC,EAAOF,GACpCG,EAASC,EAAMH,EAAcI,QAE7BC,EAAU,IAAIC,EACdC,EAAWL,EAAOM,QAAqB,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,OAErB,CACD,OAAOH,CAAG,GACX,IAEH,MAAO,CAAEP,SAAQK,WAAU,EAGlBY,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,EACjCD,EAAOI,EACPL,EAAgBM,EAAUzB,QAA4C,CAACC,EAAKyB,KACxE,MAAOC,KAAQC,GAASF,EAAIG,MAAM,KAMlC,OAJI5B,EAAI0B,IADJC,IAC4B,IAAjBA,EAAME,QAAsBF,EAAMG,KAAK,KAAKjB,QAAQ,iBAAkB,KAI9Eb,CAAG,GACX,CAAE,EACR,CACD,MAAO,CAAEmB,OAAMD,gBAAe,EAGrBa,EAAiB,CAC1B9B,EACA+B,KAEA,GAAIX,MAAMC,QAAQrB,KAAWgC,OAAOC,KAAKF,GAAWH,OAAQ,OAAO,EAEnE,GAAmB,SAAf5B,EAAMC,KAAiB,CAC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O,GAAKgE,CAC1B,CACDJ,EAAS5D,OAAO,GAAK8D,CACxB,CAED,MAAO,CACHtD,MAAOoD,EACPnD,KAAMA,EAAKU,cAElB,CAED,MAAO,CAAEX,QAAOC,KAAM,KAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/blockquote/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAElF,UAAU,eAAe;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/blockquote/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAElF,UAAU,eAAe;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA2BzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/ui/blockquote/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { TYPES_DATA } from \"./data\";\n\nimport \"./blockquote.scss\";\n\nexport type BlockquoteType = \"note\" | \"tip\" | \"important\" | \"warning\" | \"caution\";\n\ninterface BlockquoteProps {\n className?: string;\n type?: BlockquoteType | null;\n}\n\nexport const Blockquote: React.FC<React.PropsWithChildren<BlockquoteProps>> = ({ className, type, children }) => {\n const { icon: Icon, title }
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/ui/blockquote/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { TYPES_DATA } from \"./data\";\n\nimport \"./blockquote.scss\";\n\nexport type BlockquoteType = \"note\" | \"tip\" | \"important\" | \"warning\" | \"caution\";\n\ninterface BlockquoteProps {\n className?: string;\n type?: BlockquoteType | null;\n}\n\nexport const Blockquote: React.FC<React.PropsWithChildren<BlockquoteProps>> = ({ className, type, children }) => {\n const { icon: Icon, title } =\n type && type in TYPES_DATA ? TYPES_DATA[type] : ({} as { icon: undefined; title: undefined });\n\n return (\n <blockquote className={clsx(\"r-blockquote\", type && `r-blockquote-${type}`, className)}>\n {title && Icon && (\n <p className=\"r-blockquote-title\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"r-blockquote-icon\"\n >\n <Icon />\n </svg>\n {title}\n </p>\n )}\n {children}\n </blockquote>\n );\n};\n"],"names":["Blockquote","className","type","children","icon","Icon","title","TYPES_DATA","React","createElement","clsx","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin"],"mappings":"gFAcO,MAAMA,EAAiE,EAAGC,YAAWC,OAAMC,eAC9F,MAAQC,KAAMC,EAAIC,MAAEA,GAChBJ,GAAQA,KAAQK,EAAaA,EAAWL,GAAS,CAAA,EAErD,OACIM,EAAAC,cAAA,aAAA,CAAYR,UAAWS,EAAK,eAAgBR,GAAQ,gBAAgBA,IAAQD,IACvEK,GAASD,GACNG,EAAGC,cAAA,IAAA,CAAAR,UAAU,sBACTO,EAAAC,cAAA,MAAA,CACIE,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLC,OAAO,eACPC,YAAY,IACZC,cAAc,QACdC,eAAe,QACfjB,UAAU,qBAEVO,EAACC,cAAAJ,SAEJC,GAGRH,EAEP"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import e from"react";import t from"clsx";import{saveTab as a}from"../../../../core/utils/tabs-
|
|
2
|
+
import e from"react";import t from"clsx";import{saveTab as a}from"../../../../core/utils/tabs-tools.js";const r={code:"r-tab-header-code"},s=({tabs:s,tabsTypeId:o,type:m})=>e.createElement("div",{className:"r-tabs-header"},s.map((s=>e.createElement("div",{key:s.id,className:t(`r-tab-header r-tab-header_${s.id}`,m&&r[m]),onClick:()=>(e=>{Array.from(document.documentElement.classList).forEach((e=>{e.startsWith(`r-tabs-global__${o}`)&&document.documentElement.classList.remove(e)})),document.documentElement.classList.add(`r-tabs-global__${o}`,`r-tabs-global__${o}_${e}`),a(o,e)})(s.id)},s.name))));export{s as TabsHeader};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/tabs/tabs-header/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport { saveTab } from \"@src/core/utils/tabs-
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/tabs/tabs-header/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport clsx from \"clsx\";\nimport { saveTab } from \"@src/core/utils/tabs-tools\";\n\nexport interface TabsHeaderProps {\n tabs: { name: string; id: string }[];\n tabsTypeId: string;\n type?: \"code\";\n}\n\nconst typeClassNames = {\n code: \"r-tab-header-code\",\n};\n\nexport const TabsHeader: React.FC<TabsHeaderProps> = ({ tabs, tabsTypeId, type }) => {\n const changeTabHandler = (tab: string) => {\n const classNames = Array.from(document.documentElement.classList);\n classNames.forEach((className) => {\n if (className.startsWith(`r-tabs-global__${tabsTypeId}`)) {\n document.documentElement.classList.remove(className);\n }\n });\n document.documentElement.classList.add(`r-tabs-global__${tabsTypeId}`, `r-tabs-global__${tabsTypeId}_${tab}`);\n saveTab(tabsTypeId, tab);\n };\n\n return (\n <div className=\"r-tabs-header\">\n {tabs.map((tab) => (\n <div\n key={tab.id}\n className={clsx(`r-tab-header r-tab-header_${tab.id}`, type && typeClassNames[type])}\n onClick={() => changeTabHandler(tab.id)}\n >\n {tab.name}\n </div>\n ))}\n </div>\n );\n};\n"],"names":["typeClassNames","code","TabsHeader","tabs","tabsTypeId","type","React","createElement","className","map","tab","key","id","clsx","onClick","Array","from","document","documentElement","classList","forEach","startsWith","remove","add","saveTab","changeTabHandler","name"],"mappings":";wGAYA,MAAMA,CAAiB,CAAA,CACnBC,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAGGC,EAAwC,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAMC,CAAYC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAalEC,EAAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAKC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAU,iBACVL,CAAKM,CAAAA,CAAAA,CAAAA,CAAAA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AAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASC,gBAAgBC,CAAUG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAOd,CAC9C,CAAA,CAAA,CAAA,CAAA,CAEJS,SAASC,CAAgBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAUI,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkBnB,IAAc,CAAkBA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAcM,CACvGc,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQpB,EAAYM,CAAI,CAAA,CAAA,CASGe,CAAiBf,CAAIE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAEnCF,EAAIgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/content-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,cAAc,UAAW,KAAK,KAAG,MAgB7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-tools.js","sources":["../../../src/core/utils/content-tools.ts"],"sourcesContent":["import { type Token } from \"marked\";\n\nexport const parseTokenText = (token: Token): string => {\n if (!token) return \"\";\n\n if (\"tokens\" in token) {\n return token.tokens?.map((el) => parseTokenText(el)).join(\"\") || \"\";\n }\n\n if (\"text\" in token) {\n return token.text;\n }\n\n if (\"raw\" in token) {\n return token.raw;\n }\n\n return \"\";\n};\n"],"names":["parseTokenText","token","tokens","map","el","join","text","raw"],"mappings":"AAEa,MAAAA,EAAkBC,GACtBA,EAED,WAAYA,EACLA,EAAMC,QAAQC,KAAKC,GAAOJ,EAAeI,KAAKC,KAAK,KAAO,GAGjE,SAAUJ,EACHA,EAAMK,KAGb,QAASL,EACFA,EAAMM,IAGV,GAdY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseProvider } from "../providers/base";
|
|
2
|
-
type
|
|
2
|
+
type GetMetadataOptions = {
|
|
3
3
|
uri: string;
|
|
4
4
|
provider?: BaseProvider;
|
|
5
5
|
content?: undefined;
|
|
@@ -8,6 +8,6 @@ type GetMetaOptions = {
|
|
|
8
8
|
provider?: undefined;
|
|
9
9
|
content: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const getMetadata: (opts: GetMetadataOptions) => Promise<Record<string, string>>;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=get-
|
|
13
|
+
//# sourceMappingURL=get-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-metadata.d.ts","sourceRoot":"","sources":["../../../src/core/utils/get-metadata.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,KAAK,kBAAkB,GACjB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GAC7D;IAAE,GAAG,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,eAAO,MAAM,WAAW,SAAgB,kBAAkB,oCAsCzD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"gray-matter";import{lexer as o}from"marked";import{set as r}from"dot-prop";import{loadContent as e}from"./load-content.js";import{parseTokenText as n}from"./content-tools.js";const i=async i=>{const{uri:a,provider:s,content:c}=i,{data:d}=a?await e(a,s):{data:c};if(!d)throw new Error("Robindoc: Please provide content or valid URI");const{content:p,data:m}=t(d),f=o(p),l=Object.entries(f.links).reduce(((t,o)=>{const[e,n]=o,i=n.title,a=e.startsWith("robin.")&&e.substring(6);return i&&a&&r(t,a,i),t}),m);if(!l.title){const t=f.find((t=>"heading"===t.type&&1===t.depth));t?.text&&(l.title=n(t))}if(!l.description){const t=f.find((t=>"paragraph"===t.type));t?.text&&(l.description=n(t))}return l};export{i as getMetadata};
|
|
2
|
+
//# sourceMappingURL=get-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-metadata.js","sources":["../../../src/core/utils/get-metadata.ts"],"sourcesContent":["import matter from \"gray-matter\";\nimport { lexer, Tokens } from \"marked\";\nimport { set } from \"dot-prop\";\n\nimport { type BaseProvider } from \"../providers/base\";\nimport { loadContent } from \"./load-content\";\nimport { parseTokenText } from \"./content-tools\";\n\ntype GetMetadataOptions =\n | { uri: string; provider?: BaseProvider; content?: undefined }\n | { uri?: undefined; provider?: undefined; content: string };\n\nexport const getMetadata = async (opts: GetMetadataOptions) => {\n const { uri, provider, content } = opts;\n const { data } = uri ? await loadContent(uri, provider) : { data: content };\n\n if (!data) {\n throw new Error(\"Robindoc: Please provide content or valid URI\");\n }\n\n const { content: matterContent, data: matterData } = matter(data);\n const tree = lexer(matterContent);\n\n const robinData = Object.entries(tree.links).reduce<Record<string, string>>((acc, cur) => {\n const [key, value] = cur;\n const content = value.title;\n const metaKey = key.startsWith(\"robin.\") && key.substring(6);\n\n if (content && metaKey) {\n set(acc, metaKey, content);\n }\n\n return acc;\n }, matterData);\n\n if (!robinData.title) {\n const pageHeading = tree.find((el) => el.type === \"heading\" && el.depth === 1) as Tokens.Heading | undefined;\n if (pageHeading?.text) {\n robinData.title = parseTokenText(pageHeading);\n }\n }\n\n if (!robinData.description) {\n const firstParagraph = tree.find((el) => el.type === \"paragraph\") as Tokens.Heading | undefined;\n if (firstParagraph?.text) {\n robinData.description = parseTokenText(firstParagraph);\n }\n }\n\n return robinData;\n};\n"],"names":["getMetadata","async","opts","uri","provider","content","data","loadContent","Error","matterContent","matterData","matter","tree","lexer","robinData","Object","entries","links","reduce","acc","cur","key","value","title","metaKey","startsWith","substring","set","pageHeading","find","el","type","depth","text","parseTokenText","description","firstParagraph"],"mappings":"mMAYaA,EAAcC,MAAOC,IAC9B,MAAMC,IAAEA,EAAGC,SAAEA,EAAQC,QAAEA,GAAYH,GAC7BI,KAAEA,GAASH,QAAYI,EAAYJ,EAAKC,GAAY,CAAEE,KAAMD,GAElE,IAAKC,EACD,MAAM,IAAIE,MAAM,iDAGpB,MAAQH,QAASI,EAAeH,KAAMI,GAAeC,EAAOL,GACtDM,EAAOC,EAAMJ,GAEbK,EAAYC,OAAOC,QAAQJ,EAAKK,OAAOC,QAA+B,CAACC,EAAKC,KAC9E,MAAOC,EAAKC,GAASF,EACff,EAAUiB,EAAMC,MAChBC,EAAUH,EAAII,WAAW,WAAaJ,EAAIK,UAAU,GAM1D,OAJIrB,GAAWmB,GACXG,EAAIR,EAAKK,EAASnB,GAGfc,CAAG,GACXT,GAEH,IAAKI,EAAUS,MAAO,CAClB,MAAMK,EAAchB,EAAKiB,MAAMC,GAAmB,YAAZA,EAAGC,MAAmC,IAAbD,EAAGE,QAC9DJ,GAAaK,OACbnB,EAAUS,MAAQW,EAAeN,GAExC,CAED,IAAKd,EAAUqB,YAAa,CACxB,MAAMC,EAAiBxB,EAAKiB,MAAMC,GAAmB,cAAZA,EAAGC,OACxCK,GAAgBH,OAChBnB,EAAUqB,YAAcD,EAAeE,GAE9C,CAED,OAAOtB,CAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/git-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,MAAM;;;;;;;;;CAQxC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const t=t=>t.match(/^https?:\/\/github.com/)?{name:"GitHub",key:"github"}:t.match(/^https?:\/\/gitlab.com/)?{name:"GitLab",key:"gitlab"}:{name:"Git",key:"git"};export{t as detectGitType};
|
|
2
|
-
//# sourceMappingURL=git-
|
|
2
|
+
//# sourceMappingURL=git-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-tools.js","sources":["../../../src/core/utils/git-tools.ts"],"sourcesContent":["export const detectGitType = (uri: string) => {\n if (uri.match(/^https?:\\/\\/github.com/)) {\n return { name: \"GitHub\", key: \"github\" } as const;\n } else if (uri.match(/^https?:\\/\\/gitlab.com/)) {\n return { name: \"GitLab\", key: \"gitlab\" } as const;\n } else {\n return { name: \"Git\", key: \"git\" } as const;\n }\n};\n"],"names":["detectGitType","uri","match","name","key"],"mappings":"AAAa,MAAAA,EAAiBC,GACtBA,EAAIC,MAAM,0BACH,CAAEC,KAAM,SAAUC,IAAK,UACvBH,EAAIC,MAAM,0BACV,CAAEC,KAAM,SAAUC,IAAK,UAEvB,CAAED,KAAM,MAAOC,IAAK"}
|
|
@@ -9,13 +9,13 @@ type SidebarProps = Omit<SidebarPropsBase, "tree">;
|
|
|
9
9
|
export declare const initializeRobindoc: (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {
|
|
10
10
|
Page: React.FC<PageProps>;
|
|
11
11
|
Sidebar: React.FC<SidebarProps>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
getStaticParams: <T extends string = "segments">(prefix?: string, segmentsParamKey?: T) => Promise<Record<T, string[]>[]>;
|
|
13
|
+
getMetadata: (pathname: string) => Promise<Record<string, string>>;
|
|
14
|
+
getPageData: (pathname: string) => Promise<{
|
|
15
15
|
title: string;
|
|
16
|
-
|
|
16
|
+
raw: string;
|
|
17
17
|
}>;
|
|
18
|
-
|
|
18
|
+
getPageInstruction: (pathname: string) => Promise<import("../types/content").Page>;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
21
21
|
//# sourceMappingURL=initialize-robindoc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize-robindoc.d.ts","sourceRoot":"","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"initialize-robindoc.d.ts","sourceRoot":"","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AACjH,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AAEjH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOpD,KAAK,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IACtG,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAUnD,eAAO,MAAM,kBAAkB,sBAAuB,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,QAAQ,SAAS,CAAC,CAAC;;;8DAoDxF,MAAM,qBACI,CAAC;4BAiBc,MAAM;4BAgBN,MAAM;;;;mCAeC,MAAM;CAarD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{Article as e}from"../../components/elements/article/index.js";import{Sidebar as r}from"../../components/elements/sidebar/index.js";import{parseStructure as a}from"./parse-structure.js";import{getConfiguration as n}from"./get-configuration.js";import{
|
|
1
|
+
import t from"react";import{Article as e}from"../../components/elements/article/index.js";import{Sidebar as r}from"../../components/elements/sidebar/index.js";import{parseStructure as a}from"./parse-structure.js";import{getConfiguration as n}from"./get-configuration.js";import{getMetadata as i}from"./get-metadata.js";import{normalizePathname as o,removeTrailingSlash as s}from"./path-tools.js";import{loadContent as c}from"./load-content.js";const u=u=>{const p=(async t=>"function"==typeof t?t():t)(u).then((t=>a(t.items||[],n(t.configuration||{}))));return{Page:async({pathname:r,...a})=>{const{pages:n}=await p,i=o(r),s=n[i];if(!s)throw new Error(`Can not find data for "${i}". Please check structure`);const c=Object.keys(n),u=c.indexOf(i),m=c[u-1],f=u<c.length-1&&c[u+1],d=m&&{pathname:m,title:n[m].title},g=f&&{pathname:f,title:n[f].title},l=s.crumbs.map((t=>({title:n[t].title,pathname:t}))),h=Object.entries(n).reduce(((t,[e,{origPath:r}])=>(r&&t.push({clientPath:e,origPath:r}),t)),[]);return t.createElement(e,{pathname:i,provider:s.configuration.provider,uri:s.uri,title:s.title,breadcrumbs:l,prev:d||void 0,next:g||void 0,pages:h,...a})},Sidebar:async e=>{const{tree:a}=await p;return t.createElement(r,{tree:a,...e})},getStaticParams:async(t="",e="segments")=>{const{pages:r}=await p,a=Object.keys(r),n=s(t);return a.reduce(((t,r)=>r.startsWith(n)?(t.push({[e]:r.substring(n.length+1).split("/")}),t):t),[])},getMetadata:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return await i({uri:a.uri,provider:a.configuration.provider})},getPageData:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);const n=a.title,{data:i}=await c(a.uri,a.configuration.provider);return{title:n,raw:i}},getPageInstruction:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return a}}};export{u as initializeRobindoc};
|
|
2
2
|
//# sourceMappingURL=initialize-robindoc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize-robindoc.js","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"sourcesContent":["import React from \"react\";\nimport { Article as ArticleBase, type ArticleProps as ArticlePropsBase } from \"@src/components/elements/article\";\nimport { Sidebar as SidebarBase, type SidebarProps as SidebarPropsBase } from \"@src/components/elements/sidebar\";\nimport { type Structure } from \"../types/structure\";\nimport { parseStructure } from \"./parse-structure\";\nimport { getConfiguration } from \"./get-configuration\";\nimport {
|
|
1
|
+
{"version":3,"file":"initialize-robindoc.js","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Article as ArticleBase, type ArticleProps as ArticlePropsBase } from \"@src/components/elements/article\";\nimport { Sidebar as SidebarBase, type SidebarProps as SidebarPropsBase } from \"@src/components/elements/sidebar\";\n\nimport { type Structure } from \"../types/structure\";\nimport { parseStructure } from \"./parse-structure\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata as getMetadataBase } from \"./get-metadata\";\nimport { normalizePathname, removeTrailingSlash } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\ntype PageProps = Omit<Partial<ArticlePropsBase>, \"uri\" | \"content\" | \"provider\" | \"pathname\" | \"pages\"> & {\n pathname: string;\n};\n\ntype SidebarProps = Omit<SidebarPropsBase, \"tree\">;\n\nconst loadStructure = async (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n if (typeof structureTemplate === \"function\") {\n return structureTemplate();\n } else {\n return structureTemplate;\n }\n};\n\nexport const initializeRobindoc = (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n const structureParsedPromise = loadStructure(structureTemplate).then((structure) =>\n parseStructure(structure.items || [], getConfiguration(structure.configuration || {})),\n );\n\n const Page: React.FC<PageProps> = async ({ pathname, ...props }) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const paths = Object.keys(pages);\n const targetPageIndex = paths.indexOf(pathnameNormalized);\n const prevPagePathname = paths[targetPageIndex - 1];\n const nextPagePathname = targetPageIndex < paths.length - 1 && paths[targetPageIndex + 1];\n const prev = prevPagePathname && { pathname: prevPagePathname, title: pages[prevPagePathname].title };\n const next = nextPagePathname && { pathname: nextPagePathname, title: pages[nextPagePathname].title };\n\n const breadcrumbs = pageInstruction.crumbs.map((crumb) => ({ title: pages[crumb].title, pathname: crumb }));\n const clientPages = Object.entries(pages).reduce<{ clientPath: string; origPath: string }[]>(\n (acc, [clientPath, { origPath }]) => {\n if (origPath) acc.push({ clientPath, origPath });\n return acc;\n },\n [],\n );\n\n return (\n <ArticleBase\n pathname={pathnameNormalized}\n provider={pageInstruction.configuration.provider}\n uri={pageInstruction.uri}\n title={pageInstruction.title}\n breadcrumbs={breadcrumbs}\n prev={prev || undefined}\n next={next || undefined}\n pages={clientPages}\n {...props}\n />\n );\n };\n\n const Sidebar: React.FC<SidebarProps> = async (props) => {\n const { tree } = await structureParsedPromise;\n\n return <SidebarBase tree={tree} {...props} />;\n };\n\n const getStaticParams = async <T extends string = \"segments\">(\n prefix: string = \"\",\n segmentsParamKey: T = \"segments\" as T,\n ) => {\n const { pages } = await structureParsedPromise;\n const pagesArr = Object.keys(pages);\n const prefixWithoutTrailingSlash = removeTrailingSlash(prefix);\n\n return pagesArr.reduce<Record<T, string[]>[]>((acc, cur) => {\n if (!cur.startsWith(prefixWithoutTrailingSlash)) return acc;\n\n acc.push({\n [segmentsParamKey]: cur.substring(prefixWithoutTrailingSlash.length + 1).split(\"/\"),\n } as Record<T, string[]>);\n\n return acc;\n }, []);\n };\n\n const getMetadata = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const metadata = await getMetadataBase({\n uri: pageInstruction.uri,\n provider: pageInstruction.configuration.provider,\n });\n return metadata;\n };\n\n const getPageData = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const title = pageInstruction.title;\n const { data } = await loadContent(pageInstruction.uri, pageInstruction.configuration.provider);\n\n return { title, raw: data };\n };\n\n const getPageInstruction = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n return pageInstruction;\n };\n\n return { Page, Sidebar, getStaticParams, getMetadata, getPageData, getPageInstruction };\n};\n"],"names":["initializeRobindoc","structureTemplate","structureParsedPromise","async","loadStructure","then","structure","parseStructure","items","getConfiguration","configuration","Page","pathname","props","pages","pathnameNormalized","normalizePathname","pageInstruction","Error","paths","Object","keys","targetPageIndex","indexOf","prevPagePathname","nextPagePathname","length","prev","title","next","breadcrumbs","crumbs","map","crumb","clientPages","entries","reduce","acc","clientPath","origPath","push","React","ArticleBase","provider","uri","undefined","Sidebar","tree","createElement","SidebarBase","getStaticParams","prefix","segmentsParamKey","pagesArr","prefixWithoutTrailingSlash","removeTrailingSlash","cur","startsWith","substring","split","getMetadata","getMetadataBase","getPageData","data","loadContent","raw","getPageInstruction"],"mappings":"4bAkBA,MAQaA,EAAsBC,IAC/B,MAAMC,EATYC,OAAOF,GACQ,mBAAtBA,EACAA,IAEAA,EAKoBG,CAAcH,GAAmB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;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"load-content.d.ts","sourceRoot":"","sources":["../../../src/core/utils/load-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,WAAW,QAAe,MAAM,gBAAgB,YAAY,SAAS,MAAM;;;;;;;;;;;;;;;;EA4BvF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-content.js","sources":["../../../src/core/utils/load-content.ts"],"sourcesContent":["import { type BaseProvider } from \"../providers/base\";\nimport { GithubProvider } from \"../providers/github\";\nimport { FileSystemProvider } from \"../providers\";\n\nexport const loadContent = async (uri: string, providerArg?: BaseProvider, root?: string) => {\n if (providerArg) {\n const content = await providerArg.load(uri);\n return { data: content, type: providerArg.type, provider: providerArg };\n }\n if (uri.startsWith(\"https://github.com/\")) {\n const provider = new GithubProvider(uri);\n if (provider.pathname) {\n const content = await provider.load(provider.pathname);\n return { data: content, type: \"remote\", provider };\n } else {\n throw new Error(\"Can not load content\");\n }\n }\n if (uri.match(/https?:\\/\\//)) {\n const resp = await fetch(uri);\n if (!resp.ok) {\n throw new Error(\"Can not load content\");\n }\n const content = await resp.text();\n return { data: content, type: \"remote\", provider: null };\n }\n\n const provider = new FileSystemProvider(root);\n const content = await provider.load(uri);\n return { data: content, type: \"local\", provider };\n};\n"],"names":["loadContent","async","uri","providerArg","root","data","load","type","provider","startsWith","GithubProvider","pathname","Error","match","resp","fetch","ok","text","FileSystemProvider"],"mappings":"yHAIO,MAAMA,EAAcC,MAAOC,EAAaC,EAA4BC,KACvE,GAAID,EAAa,CAEb,MAAO,CAAEE,WADaF,EAAYG,KAAKJ,GACfK,KAAMJ,EAAYI,KAAMC,SAAUL,EAC7D,
|
|
1
|
+
{"version":3,"file":"load-content.js","sources":["../../../src/core/utils/load-content.ts"],"sourcesContent":["import { type BaseProvider } from \"../providers/base\";\nimport { GithubProvider } from \"../providers/github\";\nimport { FileSystemProvider } from \"../providers\";\n\nexport const loadContent = async (uri: string, providerArg?: BaseProvider, root?: string) => {\n if (providerArg) {\n const content = await providerArg.load(uri);\n return { data: content, type: providerArg.type, provider: providerArg };\n }\n\n if (uri.startsWith(\"https://github.com/\")) {\n const provider = new GithubProvider(uri);\n if (provider.pathname) {\n const content = await provider.load(provider.pathname);\n return { data: content, type: \"remote\", provider };\n } else {\n throw new Error(\"Can not load content\");\n }\n }\n\n if (uri.match(/https?:\\/\\//)) {\n const resp = await fetch(uri);\n if (!resp.ok) {\n throw new Error(\"Can not load content\");\n }\n const content = await resp.text();\n return { data: content, type: \"remote\", provider: null };\n }\n\n const provider = new FileSystemProvider(root);\n const content = await provider.load(uri);\n return { data: content, type: \"local\", provider };\n};\n"],"names":["loadContent","async","uri","providerArg","root","data","load","type","provider","startsWith","GithubProvider","pathname","Error","match","resp","fetch","ok","text","FileSystemProvider"],"mappings":"yHAIO,MAAMA,EAAcC,MAAOC,EAAaC,EAA4BC,KACvE,GAAID,EAAa,CAEb,MAAO,CAAEE,WADaF,EAAYG,KAAKJ,GACfK,KAAMJ,EAAYI,KAAMC,SAAUL,EAC7D,CAED,GAAID,EAAIO,WAAW,uBAAwB,CACvC,MAAMD,EAAW,IAAIE,EAAeR,GACpC,GAAIM,EAASG,SAAU,CAEnB,MAAO,CAAEN,WADaG,EAASF,KAAKE,EAASG,UACrBJ,KAAM,SAAUC,WAC3C,CACG,MAAM,IAAII,MAAM,uBAEvB,CAED,GAAIV,EAAIW,MAAM,eAAgB,CAC1B,MAAMC,QAAaC,MAAMb,GACzB,IAAKY,EAAKE,GACN,MAAM,IAAIJ,MAAM,wBAGpB,MAAO,CAAEP,WADaS,EAAKG,OACHV,KAAM,SAAUC,SAAU,KACrD,CAED,MAAMA,EAAW,IAAIU,EAAmBd,GAExC,MAAO,CAAEC,WADaG,EAASF,KAAKJ,GACZK,KAAM,QAASC,WAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getConfiguration as t}from"./get-configuration.js";import{
|
|
1
|
+
import{getConfiguration as t}from"./get-configuration.js";import{getMetadata as e}from"./get-metadata.js";import{mergePathname as r,normalizePathname as i,generatePseudoTitle as a,checkIsLinkExternal as s}from"./path-tools.js";import{loadContent as o}from"./load-content.js";const n=async(t={},c=[],p="",u)=>{const f={},h=[];if(!t.provider)return{pages:f,tree:h};const g=await t.provider.filesPromise;if(g.structures.includes(`${p}/structure.json`)){const e=await(async(t={},e="",a=[],c)=>{const p={},u=[];if(!t.provider)return{pages:p,tree:u};if((await t.provider.filesPromise).structures.includes(`${e}/structure.json`)){const f=await o(`${e}/structure.json`,t.provider);try{const o=JSON.parse(f.data);for(const f in o){const h=o[f],g=i("index"===f?e:e+"/"+f),l=r(t.basePath,g),d=i(l);if(!s(d)){const e=await(t.provider?.getPageSourcePathname(g,d));e&&(p[d]={title:h.title,uri:g,configuration:t,origPath:e,crumbs:a})}let m;if("index"!==f){const e=await n(t,[...a,d],g,c+1);m=e.tree,Object.assign(p,e.pages)}u.push({title:h.title,href:d,items:m,type:"row"})}}catch{throw new Error(`Can't parse structure "${e}/structure.json"`)}return{pages:p,tree:u}}})(t,p,c,u+1);if(e)return e}for await(const s of g.docs){const o=s.clientPath.split("/").filter(Boolean).length;if(!p&&!(o<2)||p&&!s.clientPath.match(new RegExp(`^${p.replace(/\/$/,"")}/[^/]+$`)))continue;const{clientPath:g}=s,l=r(t.basePath,g),d=i(l),m=(await e({provider:t.provider,uri:g})).title||a(d),w=await(t.provider?.getPageSourcePathname(g,d));w&&(f[d]={title:m,uri:g,configuration:t,origPath:w,crumbs:c});const P=await n(t,[...c,d],g,u+1);Object.assign(f,P.pages),u<(t.spreadedLevel||1)?h.push({title:m,href:d,type:0===u?"heading":"row"},...P.tree):h.push({title:m,href:d,items:P.tree,type:0===u?"heading":"row"})}return{pages:f,tree:h}},c=async(e,o={},p=[],u="",f=0)=>{if("auto"===e){return await n(o,p,u,f)}const h=await(async(e,o={},n=[],p,u)=>{const f={},h=[];for await(const g of e){if("string"==typeof g){const t=await c(g,o,n,p,u);Object.assign(f,t.pages),h.push(...t.tree);continue}if("separator"===g.type){h.push({type:"separator"});continue}let e=n;const l=t(g.configuration||{},o),d=g.href,m=r(l.basePath,d),w=i(m);if(!s(w)&&d){const t=await(l.provider?.getPageSourcePathname(d,w));t&&(f[w]={title:g.title||"",uri:d,configuration:l,origPath:t,crumbs:n},e=[...n,w])}let P=[];if(g.items){const t=await c(g.items,l,e,g.href,u+1);P=t.tree,Object.assign(f,t.pages)}g.hidden||(u<(o.spreadedLevel||1)?h.push({title:g.title||a(w),href:g.href?w:void 0,type:g.type},...P):h.push({title:g.title||a(w),href:g.href?w:void 0,items:P,type:g.type}))}return{pages:f,tree:h}})(e,o,p,u,f);return h};export{c as parseStructure};
|
|
2
2
|
//# sourceMappingURL=parse-structure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-structure.js","sources":["../../../src/core/utils/parse-structure.ts"],"sourcesContent":["import { type DocItem } from \"../types/structure\";\nimport { type Pages, type Crumbs, type Configuration } from \"../types/content\";\nimport { type TreeItem } from \"../../components/elements/sidebar/types\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMeta } from \"./get-meta\";\nimport { generatePseudoTitle, checkIsLinkExternal, mergePathname, normalizePathname } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\nconst parseJSONStructure = async (\n parentConfiguration: Configuration = {},\n parentPathname = \"\",\n crumbs: Crumbs = [],\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const content = await loadContent(`${parentPathname}/structure.json`, parentConfiguration.provider);\n try {\n const structure: { [segment: string]: { title: string } } = JSON.parse(content.data);\n for (const segment in structure) {\n const data = structure[segment];\n const clientPath = normalizePathname(\n segment === \"index\" ? parentPathname : parentPathname + \"/\" + segment,\n );\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized)) {\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(\n clientPath,\n pathnameNormalized,\n );\n if (origPath) {\n pages[pathnameNormalized] = {\n title: data.title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n }\n\n let subTree: TreeItem[] | undefined;\n if (segment !== \"index\") {\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n tree.push({\n title: data.title,\n href: pathnameNormalized,\n items: subTree,\n type: \"row\",\n });\n }\n } catch {\n throw new Error(`Can't parse structure \"${parentPathname}/structure.json\"`);\n }\n return { pages, tree };\n }\n};\n\nconst parseAutoStructure = async (\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname = \"\",\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const jsonStructureData = await parseJSONStructure(\n parentConfiguration,\n parentPathname,\n crumbs,\n nestingLevel + 1,\n );\n if (jsonStructureData) {\n return jsonStructureData;\n }\n }\n\n for await (const generatedItem of branchFiles.docs) {\n const linkLevel = generatedItem.clientPath.split(\"/\").filter(Boolean).length;\n const topLevelLink = linkLevel < 2;\n\n if (\n (!parentPathname && !topLevelLink) ||\n (parentPathname &&\n !generatedItem.clientPath.match(new RegExp(`^${parentPathname.replace(/\\/$/, \"\")}/[^/]+$`)))\n ) {\n continue;\n }\n\n const { clientPath } = generatedItem;\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n const meta = await getMeta({ provider: parentConfiguration.provider, uri: clientPath });\n const title = meta.title || generatePseudoTitle(pathnameNormalized);\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n if (origPath) {\n pages[pathnameNormalized] = {\n title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n Object.assign(pages, subItemsData.pages);\n\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title,\n href: pathnameNormalized,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n },\n ...subItemsData.tree,\n );\n } else {\n tree.push({\n title,\n href: pathnameNormalized,\n items: subItemsData.tree,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n });\n }\n }\n\n return { pages, tree };\n};\n\nconst parseStaticStructure = async (\n items: DocItem[],\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname: string,\n nestingLevel: number,\n): Promise<{\n pages: Pages;\n tree: TreeItem[];\n}> => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n for await (const item of items) {\n if (typeof item === \"string\") {\n const subItemsData = await parseStructure(item, parentConfiguration, crumbs, parentPathname, nestingLevel);\n Object.assign(pages, subItemsData.pages);\n tree.push(...subItemsData.tree);\n continue;\n }\n if (item.type === \"separator\") {\n tree.push({ type: \"separator\" });\n\n continue;\n }\n let subCrumbs = crumbs;\n const configuration = getConfiguration(item.configuration || {}, parentConfiguration);\n const clientPath = item.href;\n const pathname = mergePathname(configuration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized) && clientPath) {\n const origPath = await configuration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n\n if (origPath) {\n pages[pathnameNormalized] = {\n title: item.title || \"\",\n uri: clientPath,\n configuration,\n origPath,\n crumbs,\n };\n subCrumbs = [...crumbs, pathnameNormalized];\n }\n }\n\n let subTree: TreeItem[] = [];\n if (item.items) {\n const subItemsData = await parseStructure(\n item.items,\n configuration,\n subCrumbs,\n item.href,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n if (!item.hidden) {\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n type: item.type,\n },\n ...subTree,\n );\n } else {\n tree.push({\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n items: subTree,\n type: item.type,\n });\n }\n }\n }\n\n return { pages, tree };\n};\n\nexport const parseStructure = async (\n items: DocItem[] | \"auto\",\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n pathname: string = \"\",\n nestingLevel: number = 0,\n) => {\n if (items === \"auto\") {\n const structureData = await parseAutoStructure(parentConfiguration, crumbs, pathname, nestingLevel);\n return structureData;\n }\n\n const structureData = await parseStaticStructure(items, parentConfiguration, crumbs, pathname, nestingLevel);\n return structureData;\n};\n"],"names":["parseAutoStructure","async","parentConfiguration","crumbs","parentPathname","nestingLevel","pages","tree","provider","branchFiles","filesPromise","structures","includes","jsonStructureData","content","loadContent","structure","JSON","parse","data","segment","clientPath","normalizePathname","pathname","mergePathname","basePath","pathnameNormalized","checkIsLinkExternal","origPath","getPageSourcePathname","title","uri","configuration","subTree","subItemsData","Object","assign","push","href","items","type","Error","parseJSONStructure","generatedItem","docs","linkLevel","split","filter","Boolean","length","match","RegExp","replace","getMeta","generatePseudoTitle","spreadedLevel","parseStructure","structureData","item","subCrumbs","getConfiguration","hidden","undefined","parseStaticStructure"],"mappings":"2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8B,KAAK,CACNP,MAAO4B,EAAK5B,OAASwB,EAAoB5B,GACzCY,KAAMoB,EAAKpB,KAAOZ,OAAqBoC,EACvCvB,MAAON,EACPO,KAAMkB,EAAKlB,OAI1B,CAED,MAAO,CAAElC,QAAOC,OAAM,EAeMwD,CAAqBxB,EAAOrC,EAAqBC,EAAQoB,EAAUlB,GAC/F,OAAOoD,CAAa"}
|
|
1
|
+
{"version":3,"file":"parse-structure.js","sources":["../../../src/core/utils/parse-structure.ts"],"sourcesContent":["import { type DocItem } from \"../types/structure\";\nimport { type Pages, type Crumbs, type Configuration } from \"../types/content\";\nimport { type TreeItem } from \"../../components/elements/sidebar/types\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata } from \"./get-metadata\";\nimport { generatePseudoTitle, checkIsLinkExternal, mergePathname, normalizePathname } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\nconst parseJSONStructure = async (\n parentConfiguration: Configuration = {},\n parentPathname = \"\",\n crumbs: Crumbs = [],\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const content = await loadContent(`${parentPathname}/structure.json`, parentConfiguration.provider);\n try {\n const structure: { [segment: string]: { title: string } } = JSON.parse(content.data);\n for (const segment in structure) {\n const data = structure[segment];\n const clientPath = normalizePathname(\n segment === \"index\" ? parentPathname : parentPathname + \"/\" + segment,\n );\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized)) {\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(\n clientPath,\n pathnameNormalized,\n );\n if (origPath) {\n pages[pathnameNormalized] = {\n title: data.title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n }\n\n let subTree: TreeItem[] | undefined;\n if (segment !== \"index\") {\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n tree.push({\n title: data.title,\n href: pathnameNormalized,\n items: subTree,\n type: \"row\",\n });\n }\n } catch {\n throw new Error(`Can't parse structure \"${parentPathname}/structure.json\"`);\n }\n return { pages, tree };\n }\n};\n\nconst parseAutoStructure = async (\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname = \"\",\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const jsonStructureData = await parseJSONStructure(\n parentConfiguration,\n parentPathname,\n crumbs,\n nestingLevel + 1,\n );\n if (jsonStructureData) {\n return jsonStructureData;\n }\n }\n\n for await (const generatedItem of branchFiles.docs) {\n const linkLevel = generatedItem.clientPath.split(\"/\").filter(Boolean).length;\n const topLevelLink = linkLevel < 2;\n\n if (\n (!parentPathname && !topLevelLink) ||\n (parentPathname &&\n !generatedItem.clientPath.match(new RegExp(`^${parentPathname.replace(/\\/$/, \"\")}/[^/]+$`)))\n ) {\n continue;\n }\n\n const { clientPath } = generatedItem;\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n const metadata = await getMetadata({ provider: parentConfiguration.provider, uri: clientPath });\n const title = metadata.title || generatePseudoTitle(pathnameNormalized);\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n if (origPath) {\n pages[pathnameNormalized] = {\n title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n Object.assign(pages, subItemsData.pages);\n\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title,\n href: pathnameNormalized,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n },\n ...subItemsData.tree,\n );\n } else {\n tree.push({\n title,\n href: pathnameNormalized,\n items: subItemsData.tree,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n });\n }\n }\n\n return { pages, tree };\n};\n\nconst parseStaticStructure = async (\n items: DocItem[],\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname: string,\n nestingLevel: number,\n): Promise<{\n pages: Pages;\n tree: TreeItem[];\n}> => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n for await (const item of items) {\n if (typeof item === \"string\") {\n const subItemsData = await parseStructure(item, parentConfiguration, crumbs, parentPathname, nestingLevel);\n Object.assign(pages, subItemsData.pages);\n tree.push(...subItemsData.tree);\n continue;\n }\n if (item.type === \"separator\") {\n tree.push({ type: \"separator\" });\n\n continue;\n }\n let subCrumbs = crumbs;\n const configuration = getConfiguration(item.configuration || {}, parentConfiguration);\n const clientPath = item.href;\n const pathname = mergePathname(configuration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized) && clientPath) {\n const origPath = await configuration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n\n if (origPath) {\n pages[pathnameNormalized] = {\n title: item.title || \"\",\n uri: clientPath,\n configuration,\n origPath,\n crumbs,\n };\n subCrumbs = [...crumbs, pathnameNormalized];\n }\n }\n\n let subTree: TreeItem[] = [];\n if (item.items) {\n const subItemsData = await parseStructure(\n item.items,\n configuration,\n subCrumbs,\n item.href,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n if (!item.hidden) {\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n type: item.type,\n },\n ...subTree,\n );\n } else {\n tree.push({\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n items: subTree,\n type: item.type,\n });\n }\n }\n }\n\n return { pages, tree };\n};\n\nexport const parseStructure = async (\n items: DocItem[] | \"auto\",\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n pathname: string = \"\",\n nestingLevel: number = 0,\n) => {\n if (items === \"auto\") {\n const structureParsed = await parseAutoStructure(parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n }\n\n const structureParsed = await parseStaticStructure(items, parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n};\n"],"names":["parseAutoStructure","async","parentConfiguration","crumbs","parentPathname","nestingLevel","pages","tree","provider","branchFiles","filesPromise","structures","includes","jsonStructureData","content","loadContent","structure","JSON","parse","data","segment","clientPath","normalizePathname","pathname","mergePathname","basePath","pathnameNormalized","checkIsLinkExternal","origPath","getPageSourcePathname","title","uri","configuration","subTree","subItemsData","Object","assign","push","href","items","type","Error","parseJSONStructure","generatedItem","docs","linkLevel","split","filter","Boolean","length","match","RegExp","replace","getMetadata","generatePseudoTitle","spreadedLevel","parseStructure","structureParsed","item","subCrumbs","getConfiguration","hidden","undefined","parseStaticStructure"],"mappings":"mRAQA,MAmEMA,EAAqBC,MACvBC,EAAqC,GACrCC,EAAiB,GACjBC,EAAiB,GACjBC,KAEA,MAAMC,EAAe,CAAA,EACfC,EAAmB,GAEzB,IAAKL,EAAoBM,SAAU,MAAO,CAAEF,QAAOC,QAEnD,MAAME,QAAoBP,EAAoBM,SAASE,aAEvD,GAAID,EAAYE,WAAWC,SAAS,GAAGR,oBAAkC,CACrE,MAAMS,OAjFaZ,OACvBC,EAAqC,GACrCE,EAAiB,GACjBD,EAAiB,GACjBE,KAEA,MAAMC,EAAe,CAAA,EACfC,EAAmB,GAEzB,IAAKL,EAAoBM,SAAU,MAAO,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jC,EAAK8B,KAAK,CAAEG,KAAM,cAElB,QACH,CACD,IAAImB,EAAYxD,EAChB,MAAM6B,EAAgB4B,EAAiBF,EAAK1B,eAAiB,CAAA,EAAI9B,GAC3DmB,EAAaqC,EAAKpB,KAClBf,EAAWC,EAAcQ,EAAcP,SAAUJ,GACjDK,EAAqBJ,EAAkBC,GAE7C,IAAKI,EAAoBD,IAAuBL,EAAY,CACxD,MAAMO,QAAiBI,EAAcxB,UAAUqB,sBAAsBR,EAAYK,IAE7EE,IACAtB,EAAMoB,GAAsB,CACxBI,MAAO4B,EAAK5B,OAAS,GACrBC,IAAKV,EACLW,gBACAJ,WACAzB,UAEJwD,EAAY,IAAIxD,EAAQuB,GAE/B,CAED,IAAIO,EAAsB,GAC1B,GAAIyB,EAAKnB,MAAO,CACZ,MAAML,QAAqBsB,EACvBE,EAAKnB,MACLP,EACA2B,EACAD,EAAKpB,KACLjC,EAAe,GAEnB4B,EAAUC,EAAa3B,KACvB4B,OAAOC,OAAO9B,EAAO4B,EAAa5B,MACrC,CAEIoD,EAAKG,SACFxD,GAAgBH,EAAoBqD,eAAiB,GACrDhD,EAAK8B,KACD,CACIP,MAAO4B,EAAK5B,OAASwB,EAAoB5B,GACzCY,KAAMoB,EAAKpB,KAAOZ,OAAqBoC,EACvCtB,KAAMkB,EAAKlB,SAEZP,GAGP1B,EAAK8B,KAAK,CACNP,MAAO4B,EAAK5B,OAASwB,EAAoB5B,GACzCY,KAAMoB,EAAKpB,KAAOZ,OAAqBoC,EACvCvB,MAAON,EACPO,KAAMkB,EAAKlB,OAI1B,CAED,MAAO,CAAElC,QAAOC,OAAM,EAeQwD,CAAqBxB,EAAOrC,EAAqBC,EAAQoB,EAAUlB,GACjG,OAAOoD,CAAe"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare const getFileUrl: (
|
|
2
|
-
export declare const normalizePathname: (
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const getFileUrl: (pathname: string) => string;
|
|
2
|
+
export declare const normalizePathname: (pathname?: string | null) => string;
|
|
3
|
+
export declare const removeTrailingSlash: (pathname?: string | null) => string;
|
|
4
|
+
export declare const addTrailingSlash: (pathname?: string | null) => string;
|
|
5
|
+
export declare const generatePseudoTitle: (pathname?: string | null) => string;
|
|
4
6
|
export declare const checkIsLinkExternal: (href: string) => boolean;
|
|
5
7
|
export declare const mergePathname: (basePath?: string, href?: string) => string | undefined;
|
|
6
8
|
//# sourceMappingURL=path-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/path-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"path-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/path-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,aAAc,MAAM,WAS1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,MAAM,GAAG,IAAI,WAIzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAAe,MAAM,GAAG,IAAI,WAI3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,cAAe,MAAM,GAAG,IAAI,WAIxD,CAAC;AAEF,eAAO,MAAM,mBAAmB,cAAe,MAAM,GAAG,IAAI,WAS3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,YAG/C,CAAC;AAEF,eAAO,MAAM,aAAa,cAAe,MAAM,SAAS,MAAM,uBAE7D,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=e=>{const[,t,n]=e.match(/(?:^|\/)([^/]+)(\.mdx?)$/)||[];return e.replace(new RegExp(`((/|^)(readme|README|index|${t}/${t}))?${n}$`),"")},t=e=>e&&e.replace(/\/$/,"")||"/",n=e=>{const n=t(e).split("/").filter(Boolean);if(0===n.length)return"Index";return n[n.length-1].split("-").map((e=>e[0].toUpperCase()+e.substring(1))).join(" ")},
|
|
1
|
+
const e=e=>{const[,t,n]=e.match(/(?:^|\/)([^/]+)(\.mdx?)$/)||[];return e.replace(new RegExp(`((/|^)(readme|README|index|${t}/${t}))?${n}$`),"")},t=e=>e&&e.replace(/\/$/,"")||"/",n=e=>e?e.endsWith("/")?e.substring(0,e.length-1):e:"",r=e=>{const n=t(e).split("/").filter(Boolean);if(0===n.length)return"Index";return n[n.length-1].split("-").map((e=>e[0].toUpperCase()+e.substring(1))).join(" ")},s=e=>"r"!==new URL(e,"http://r").host,p=(e,t)=>!t||s(t)?t:(e||"")+t;export{s as checkIsLinkExternal,r as generatePseudoTitle,e as getFileUrl,p as mergePathname,t as normalizePathname,n as removeTrailingSlash};
|
|
2
2
|
//# sourceMappingURL=path-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-tools.js","sources":["../../../src/core/utils/path-tools.ts"],"sourcesContent":["export const getFileUrl = (
|
|
1
|
+
{"version":3,"file":"path-tools.js","sources":["../../../src/core/utils/path-tools.ts"],"sourcesContent":["export const getFileUrl = (pathname: string) => {\n const [, filename, ext] = pathname.match(/(?:^|\\/)([^/]+)(\\.mdx?)$/) || [];\n\n const clientPath = pathname.replace(\n new RegExp(`((\\/|^)(readme|README|index|${filename}/${filename}))?${ext}$`),\n \"\",\n );\n\n return clientPath;\n};\n\nexport const normalizePathname = (pathname?: string | null) => {\n if (!pathname) return \"/\";\n\n return pathname.replace(/\\/$/, \"\") || \"/\";\n};\n\nexport const removeTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname.substring(0, pathname.length - 1) : pathname;\n};\n\nexport const addTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname : pathname + \"/\";\n};\n\nexport const generatePseudoTitle = (pathname?: string | null) => {\n const pathnamename = normalizePathname(pathname);\n const pathnamenameSegments = pathnamename.split(\"/\").filter(Boolean);\n\n if (pathnamenameSegments.length === 0) return \"Index\";\n\n const lastSegment = pathnamenameSegments[pathnamenameSegments.length - 1];\n const lastSegmentWords = lastSegment.split(\"-\");\n return lastSegmentWords.map((word) => word[0].toUpperCase() + word.substring(1)).join(\" \");\n};\n\nexport const checkIsLinkExternal = (href: string) => {\n const url = new URL(href, \"http://r\");\n return url.host !== \"r\";\n};\n\nexport const mergePathname = (basePath?: string, href?: string) => {\n return !href || checkIsLinkExternal(href) ? href : (basePath || \"\") + href;\n};\n"],"names":["getFileUrl","pathname","filename","ext","match","replace","RegExp","normalizePathname","removeTrailingSlash","endsWith","substring","length","generatePseudoTitle","pathnamenameSegments","split","filter","Boolean","map","word","toUpperCase","join","checkIsLinkExternal","href","URL","host","mergePathname","basePath"],"mappings":"AAAa,MAAAA,EAAcC,IACvB,MAAM,CAAGC,EAAUC,GAAOF,EAASG,MAAM,6BAA+B,GAOxE,OALmBH,EAASI,QACxB,IAAIC,OAAO,8BAA+BJ,KAAYA,OAAcC,MACpE,GAGa,EAGRI,EAAqBN,GACzBA,GAEEA,EAASI,QAAQ,MAAO,KAFT,IAKbG,EAAuBP,GAC3BA,EAEEA,EAASQ,SAAS,KAAOR,EAASS,UAAU,EAAGT,EAASU,OAAS,GAAKV,EAFvD,GAWbW,EAAuBX,IAChC,MACMY,EADeN,EAAkBN,GACGa,MAAM,KAAKC,OAAOC,SAE5D,GAAoC,IAAhCH,EAAqBF,OAAc,MAAO,QAI9C,OAFoBE,EAAqBA,EAAqBF,OAAS,GAClCG,MAAM,KACnBG,KAAKC,GAASA,EAAK,GAAGC,cAAgBD,EAAKR,UAAU,KAAIU,KAAK,IAAI,EAGjFC,EAAuBC,GAEZ,MADR,IAAIC,IAAID,EAAM,YACfE,KAGFC,EAAgB,CAACC,EAAmBJ,KACrCA,GAAQD,EAAoBC,GAAQA,GAAQI,GAAY,IAAMJ"}
|
|
@@ -2,4 +2,4 @@ export declare const saveTab: (tabsKey: string, tab: string) => void;
|
|
|
2
2
|
export declare const clearTabs: () => void;
|
|
3
3
|
export declare const getTab: (tabsKey: string) => string | null;
|
|
4
4
|
export declare const getTabs: () => string[][];
|
|
5
|
-
//# sourceMappingURL=tabs-
|
|
5
|
+
//# sourceMappingURL=tabs-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/tabs-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAa,MAAM,OAAO,MAAM,SAKnD,CAAC;AAEF,eAAO,MAAM,SAAS,YAErB,CAAC;AAEF,eAAO,MAAM,MAAM,YAAa,MAAM,kBAIrC,CAAC;AAEF,eAAO,MAAM,OAAO,kBAInB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const t=(t,s)=>{const e=localStorage.getItem("r-tabs"),o=e?.split(";").filter((s=>s&&!s.startsWith(`${t}=`)))||[];o.push(`${t}=${s}`),localStorage.setItem("r-tabs",o.join(";"))};export{t as saveTab};
|
|
2
|
-
//# sourceMappingURL=tabs-
|
|
2
|
+
//# sourceMappingURL=tabs-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-
|
|
1
|
+
{"version":3,"file":"tabs-tools.js","sources":["../../../src/core/utils/tabs-tools.ts"],"sourcesContent":["export const saveTab = (tabsKey: string, tab: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && !item.startsWith(`${tabsKey}=`)) || [];\n items.push(`${tabsKey}=${tab}`);\n localStorage.setItem(\"r-tabs\", items.join(\";\"));\n};\n\nexport const clearTabs = () => {\n localStorage.removeItem(\"r-tabs\");\n};\n\nexport const getTab = (tabsKey: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const tab = store?.split(\";\").find((item) => item && item.startsWith(`${tabsKey}=`));\n return tab?.substring(tabsKey.length) || null;\n};\n\nexport const getTabs = () => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && /[\\w-]+=[\\w]+/.test(item)) || [];\n return items.map((item) => item.split(\"=\"));\n};\n"],"names":["saveTab","tabsKey","tab","store","localStorage","getItem","items","split","filter","item","startsWith","push","setItem","join"],"mappings":"MAAaA,EAAU,CAACC,EAAiBC,KACrC,MAAMC,EAAQC,aAAaC,QAAQ,UAC7BC,EAAQH,GAAOI,MAAM,KAAKC,QAAQC,GAASA,IAASA,EAAKC,WAAW,GAAGT,SAAgB,GAC7FK,EAAMK,KAAK,GAAGV,KAAWC,KACzBE,aAAaQ,QAAQ,SAAUN,EAAMO,KAAK,KAAK"}
|
package/lib/styles.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
:root{overflow:hidden;--rb-neutral-50: #f8fafc;--rb-neutral-100: #f1f5f9;--rb-neutral-200: #e2e8f0;--rb-neutral-300: #cbd5e1;--rb-neutral-400: #94a3b8;--rb-neutral-500: #64748b;--rb-neutral-600: #475569;--rb-neutral-700: #334155;--rb-neutral-800: #1e293b;--rb-neutral-900: #0f172a;--rb-neutral-950: #020617;--rb-primary-50: #fff7ed;--rb-primary-100: #ffedd5;--rb-primary-200: #fed7aa;--rb-primary-300: #fdba74;--rb-primary-400: #fb923c;--rb-primary-500: #f97316;--rb-primary-600: #ea580c;--rb-primary-700: #c2410c;--rb-primary-800: #9a3412;--rb-primary-900: #7c2d12;--rb-primary-950: #27130d;--rb-secondary-50: #eff6ff;--rb-secondary-100: #dbeafe;--rb-secondary-200: #bfdbfe;--rb-secondary-300: #93c5fd;--rb-secondary-400: #60a5fa;--rb-secondary-500: #3b82f6;--rb-secondary-600: #2563eb;--rb-secondary-700: #1d4ed8;--rb-secondary-800: #1e40af;--rb-secondary-900: #1e3a8a;--rb-secondary-950: #172554;--rb-body-50: #ffffff;--rb-body-950: #00020a}body{--header-height: 60px;position:relative;padding:0;margin:0;accent-color:var(--r-primary-600, #ea580c);box-sizing:border-box;background-color:var(--r-body);color:var(--r-neutral-950);height:100vh;overflow:hidden auto;scroll-padding-top:calc(var(--header-height) + 20px);scrollbar-color:var(--r-neutral-400) var(--r-neutral-200);white-space:pre-wrap}@media screen and (width < 768px){body{scroll-padding-top:calc(var(--header-height) + 60px)}}@media screen and (width > 1180px){body{scroll-behavior:smooth;scrollbar-gutter:stable}}*,*:before,*:after{box-sizing:inherit}@media(prefers-reduced-motion: reduce){*,::before,::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;background-attachment:initial !important;scroll-behavior:auto !important;transition-duration:1ms !important;transition-delay:-1ms !important}}svg{display:block}@media screen and (width < 768px){.body-mobile-lock{overflow:hidden}}@media screen and (width < 1024px){.body-tablet-lock{overflow:hidden}}.body-lock{overflow:hidden}.theme-light{color-scheme:light;--r-body: var(--rb-body-50);--r-neutral-50: var(--rb-neutral-50, #f8fafc);--r-neutral-100: var(--rb-neutral-100, #f1f5f9);--r-neutral-200: var(--rb-neutral-200, #e2e8f0);--r-neutral-300: var(--rb-neutral-300, #cbd5e1);--r-neutral-400: var(--rb-neutral-400, #94a3b8);--r-neutral-500: var(--rb-neutral-500, #64748b);--r-neutral-600: var(--rb-neutral-600, #475569);--r-neutral-700: var(--rb-neutral-700, #334155);--r-neutral-800: var(--rb-neutral-800, #1e293b);--r-neutral-900: var(--rb-neutral-900, #0f172a);--r-neutral-950: var(--rb-neutral-950, #020617);--r-primary-50: var(--rb-primary-50, #fff7ed);--r-primary-100: var(--rb-primary-100, #ffedd5);--r-primary-200: var(--rb-primary-200, #fed7aa);--r-primary-300: var(--rb-primary-300, #fdba74);--r-primary-400: var(--rb-primary-400, #fb923c);--r-primary-500: var(--rb-primary-500, #f97316);--r-primary-600: var(--rb-primary-600, #ea580c);--r-primary-700: var(--rb-primary-700, #c2410c);--r-primary-800: var(--rb-primary-800, #9a3412);--r-primary-900: var(--rb-primary-900, #7c2d12);--r-primary-950: var(--rb-primary-950, #27130d);--r-secondary-50: var(--rb-secondary-50, #eff6ff);--r-secondary-100: var(--rb-secondary-100, #dbeafe);--r-secondary-200: var(--rb-secondary-200, #bfdbfe);--r-secondary-300: var(--rb-secondary-300, #93c5fd);--r-secondary-400: var(--rb-secondary-400, #60a5fa);--r-secondary-500: var(--rb-secondary-500, #3b82f6);--r-secondary-600: var(--rb-secondary-600, #2563eb);--r-secondary-700: var(--rb-secondary-700, #1d4ed8);--r-secondary-800: var(--rb-secondary-800, #1e40af);--r-secondary-900: var(--rb-secondary-900, #1e3a8a);--r-secondary-950: var(--rb-secondary-950, #172554);--r-success: #15803d;--r-note: #0e7490;--r-tip: #047857;--r-important: #a21caf;--r-warning: #b45309;--r-caution: #b91c1c;--r-link: var(--r-secondary-600);--r-link-hovered: var(--r-secondary-800);--r-link-active: var(--r-primary-700);--r-cl-1: #f9826c;--r-cl-2: var(--r-neutral-100);--r-cl-3: #e1e4e8;--r-cl-4: #2f363d;--r-cl-5: #959da5;--r-cl-6: #2188ff;--r-cl-7: #dbedff;--r-cl-8: #005cc5;--r-cl-9: #586069;--r-cl-10: #6a737d;--r-cl-11: #fafbfc;--r-cl-12: #159739;--r-cl-13: #138934;--r-cl-14: #1b1f23;--r-cl-15: #d1d5da;--r-cl-16: #34d05822;--r-cl-17: #d73a4922;--r-cl-18: #ffdf5d;--r-cl-19: #ffdf5d66;--r-cl-20: #28a74525;--r-cl-21: #d1d5da11;--r-cl-22: #24292e;--r-cl-23: #0366d611;--r-cl-24: #f6f8fa;--r-cl-25: #0366d625;--r-cl-26: #34d05840;--r-cl-27: #34d05800;--r-cl-28: #ffd33d33;--r-cl-29: #24943e99;--r-cl-30: #24943e50;--r-cl-31: #be5007;--r-cl-32: #5a32a3;--r-cl-33: #044289;--r-cl-34: #cb2431;--r-cl-35: #28a745;--r-cl-36: #cc2536;--r-cl-37: #d7dbe0;--r-cl-38: #eff2f6;--r-cl-39: #1b1f234d;--r-cl-40: #f9c513;--r-cl-41: #444d56;--r-cl-42: #e2e5e9;--r-cl-43: #cce5ff;--r-cl-44: #ebf0f4;--r-cl-45: #e8eaed;--r-cl-46: #6a737d33;--r-cl-47: #959da588;--r-cl-48: #959da533;--r-cl-49: #959da544;--r-cl-50: #0366d6;--r-cl-51: #3192aa;--r-cl-52: #22863a;--r-cl-53: #b08800;--r-cl-54: #1b7c83;--r-cl-55: #dbab09;--r-cl-56: #6f42c1;--r-cl-57: #b31d28;--r-cl-58: #032f62;--r-cl-59: #b31d28;--r-cl-60: #ffeef0;--r-cl-61: #f0fff4;--r-cl-62: #ffebda}.theme-dark{color-scheme:dark;--r-body: var(--rb-body-950);--r-neutral-50: var(--rb-neutral-950, #020617);--r-neutral-100: var(--rb-neutral-900, #0f172a);--r-neutral-200: var(--rb-neutral-800, #1e293b);--r-neutral-300: var(--rb-neutral-700, #334155);--r-neutral-400: var(--rb-neutral-600, #475569);--r-neutral-500: var(--rb-neutral-500, #64748b);--r-neutral-600: var(--rb-neutral-400, #94a3b8);--r-neutral-700: var(--rb-neutral-300, #cbd5e1);--r-neutral-800: var(--rb-neutral-200, #e2e8f0);--r-neutral-900: var(--rb-neutral-100, #f1f5f9);--r-neutral-950: var(--rb-neutral-50, #f8fafc);--r-primary-50: var(--rb-primary-950, #27130d);--r-primary-100: var(--rb-primary-900, #7c2d12);--r-primary-200: var(--rb-primary-800, #9a3412);--r-primary-300: var(--rb-primary-700, #c2410c);--r-primary-400: var(--rb-primary-600, #ea580c);--r-primary-500: var(--rb-primary-500, #f97316);--r-primary-600: var(--rb-primary-400, #fb923c);--r-primary-700: var(--rb-primary-300, #fdba74);--r-primary-800: var(--rb-primary-200, #fed7aa);--r-primary-900: var(--rb-primary-100, #ffedd5);--r-primary-950: var(--rb-primary-50, #fff7ed);--r-secondary-50: var(--rb-secondary-950, #172554);--r-secondary-100: var(--rb-secondary-900, #1e3a8a);--r-secondary-200: var(--rb-secondary-800, #1e40af);--r-secondary-300: var(--rb-secondary-700, #1d4ed8);--r-secondary-400: var(--rb-secondary-600, #2563eb);--r-secondary-500: var(--rb-secondary-500, #3b82f6);--r-secondary-600: var(--rb-secondary-400, #60a5fa);--r-secondary-700: var(--rb-secondary-300, #93c5fd);--r-secondary-800: var(--rb-secondary-200, #bfdbfe);--r-secondary-900: var(--rb-secondary-100, #dbeafe);--r-secondary-950: var(--rb-secondary-50, #eff6ff);--r-success: #86efac;--r-note: #22d3ee;--r-tip: #34d399;--r-important: #e879f9;--r-warning: #fbbf24;--r-caution: #f87171;--r-link: var(--r-secondary-500);--r-link-hovered: var(--r-secondary-800);--r-link-active: var(--r-primary-700);--r-cl-1: #f9826c;--r-cl-2: var(--r-neutral-100);--r-cl-3: #444d56;--r-cl-4: #e1e4e8;--r-cl-5: #959da5;--r-cl-6: #0366d6;--r-cl-7: #1d2d3e;--r-cl-8: #79b8ff;--r-cl-9: #d1d5da;--r-cl-10: #9ba3ac;--r-cl-11: #24292e;--r-cl-12: #176f2c;--r-cl-13: #22863a;--r-cl-14: #fff;--r-cl-15: #586069;--r-cl-16: #28a74530;--r-cl-17: #d73a4930;--r-cl-18: #ffd33d44;--r-cl-19: #ffd33d22;--r-cl-20: #2b6a3033;--r-cl-21: #58606915;--r-cl-22: #e1e4e8;--r-cl-23: #3392ff22;--r-cl-24: #2f363d;--r-cl-25: #3392ff44;--r-cl-26: #17e5e650;--r-cl-27: #17e5e600;--r-cl-28: #c6902625;--r-cl-29: #17e5e699;--r-cl-30: #17e5e666;--r-cl-31: #ffab70;--r-cl-32: #b392f0;--r-cl-33: #c8e1ff;--r-cl-34: #f97583;--r-cl-35: #34d058;--r-cl-36: #f97583;--r-cl-37: #444d56;--r-cl-38: #2f363d;--r-cl-39: #444d56;--r-cl-40: #ffea7f;--r-cl-41: #d1d5da;--r-cl-42: #39414a;--r-cl-43: #044289;--r-cl-44: #282e34;--r-cl-45: #282e34;--r-cl-47: #6a737d88;--r-cl-48: #6a737d33;--r-cl-49: #6a737d44;--r-cl-50: #79b8ff;--r-cl-51: #56d4dd;--r-cl-52: #85e89d;--r-cl-53: #ffea7f;--r-cl-54: #39c5cf;--r-cl-55: #ffea7f;--r-cl-56: #b392f0;--r-cl-57: #fdaeba;--r-cl-58: #dbedff;--r-cl-59: #fdaeb7;--r-cl-60: #86181d;--r-cl-61: #144620;--r-cl-62: #c24e00}.r-header{position:sticky;background-color:var(--r-body);top:0;border-bottom:1px solid var(--r-neutral-300);height:60px;z-index:1000}.r-header-body{height:100%;display:flex;justify-content:space-between;align-items:center;gap:24px}.r-header-logo{display:block;margin-right:24px;color:var(--r-neutral-700);transition:color .2s}.r-header-logo:hover,.r-header-logo:focus{color:var(--r-neutral-950)}.r-header-nav{display:flex;flex-direction:column;gap:12px 16px}@media screen and (width >= 1024px){.r-header-nav{flex-direction:row}}.r-header-link{color:var(--r-neutral-600);text-decoration:none;padding:4px 0;transition:color .2s}.r-header-link:hover,.r-header-link:focus-visible{color:var(--r-neutral-950)}.r-header-link._target{color:var(--r-primary-800)}.r-header-link._target:hover,.r-header-link._target:focus-visible{color:var(--r-primary-700)}.r-header-actions{display:flex;flex-direction:column-reverse;gap:16px;align-items:stretch}@media screen and (width >= 1024px){.r-header-actions{flex-direction:row;align-items:center;gap:28px}}.r-header-sections{display:flex;align-items:center;gap:12px}@media screen and (width < 768px){.r-header-sections .r-dropdown{flex:1}}@media screen and (width < 768px){.r-header-sections .r-dropdown-drop{max-width:none;width:100%;left:0}}.r-footer{border-top:1px solid var(--r-neutral-300);padding-top:24px;padding-bottom:24px}.r-footer-row{display:flex;justify-content:space-between;align-items:center;gap:32px}.r-footer-additional{margin-top:32px;justify-content:flex-end}.r-copyright{color:var(--r-neutral-800)}.r-powered{font-size:14px;display:block;color:var(--r-neutral-600)}.r-powered-link{font-weight:600;text-decoration:none;color:var(--r-neutral-950)}.r-powered-link:hover{color:var(--r-primary-900)}.r-docs-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}@media screen and (width >= 768px){.r-docs-container{display:grid;justify-content:center;column-gap:32px;grid-template-areas:"sidebar breadcrumbs" "sidebar contents" "sidebar content" "sidebar pagination";grid-template-columns:1fr calc(100% - 248px);grid-template-rows:auto auto 1fr auto}}@media screen and (width >= 1180px){.r-docs-container{column-gap:40px;grid-template-areas:"sidebar breadcrumbs contents" "sidebar content contents" "sidebar pagination contents";grid-template-columns:1fr 640px 1fr;grid-template-rows:auto 1fr auto}}.r-blog-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}@media screen and (width >= 1180px){.r-blog-container{display:grid;justify-content:space-between;column-gap:40px;grid-template-areas:"breadcrumbs contents" "content contents" "pagination contents";grid-template-columns:760px 220px;grid-template-rows:auto 1fr auto}}.r-page-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}.keylink-to-content{position:absolute !important;top:8px;left:12px;z-index:1001}.keylink-to-navigation{margin-top:-40px}.r-article{padding:20px 0 80px;grid-area:content}@media screen and (width >= 1180px){.r-article{padding:32px 0 80px}}.r-article>*:first-child{margin-top:0}.r-checkbox{cursor:pointer;width:20px;height:20px;margin:4px;vertical-align:middle}.r-label{cursor:pointer}.r-task-ol,.r-task-ul{list-style:none}.r-task-label{display:block;width:100%;padding-top:2px;padding-bottom:2px}.r-task-label:hover .r-checkbox{filter:brightness(0.8)}.r-task-li.r-task-li{margin-block-start:2px;margin-block-end:2px}.r-label-text{vertical-align:middle}.r-sidebar{grid-area:sidebar}@media screen and (width < 768px){.r-sidebar{position:sticky;width:calc(100% + 24px);top:var(--header-height);left:0;margin:0 -12px;background-color:var(--r-body);border-bottom:1px solid var(--r-neutral-200);z-index:10;opacity:.98;padding:0;overflow:auto}}.r-sidebar-top-mock{grid-row-start:1;grid-column-start:1}@media screen and (width < 768px){.r-sidebar:not(._opened) .r-sidebar-nav{display:none}}@media screen and (width < 768px){.r-sidebar._opened{height:calc(100vh - var(--header-height))}}.r-sidebar-drop{margin-top:-4px;padding-top:4px}.r-sidebar-sublist{position:relative;padding-top:2px}.r-sidebar-sublist:hover::before{background-color:var(--r-primary-800);transition-delay:initial}.r-sidebar-sublist::before{content:"";position:absolute;top:0;left:-12px;right:0;height:2px;border-bottom-left-radius:2px;background-color:var(--r-neutral-200);z-index:1;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-nav{padding:32px 4px 32px 2px}@media screen and (width < 768px){.r-sidebar-nav{padding:12px}}@media screen and (width >= 768px){.r-sidebar-nav{position:sticky;top:var(--header-height);overflow:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);scrollbar-gutter:stable;max-height:calc(100vh - var(--header-height))}}@media screen and (width < 768px){.r-sidebar-space{display:block;height:40px}}.r-sidebar-btn{position:sticky;top:0;display:flex;width:100%;font-size:14px;border:0;padding:12px;background:none;cursor:pointer;color:var(--r-neutral-800);background-color:var(--r-body);z-index:1}@media screen and (width >= 768px){.r-sidebar-btn{display:none}}.r-sidebar-chevron{display:inline;margin-right:6px;transition:transform .2s}.r-sidebar._opened .r-sidebar-chevron{transform:rotate(90deg)}.r-sidebar-list{color:var(--r-neutral-700);list-style:none;padding:0;margin:0;font-size:14px}.r-sidebar-drop[open]::details-content{height:var(--drop-height, auto)}.r-sidebar-drop::details-content{height:0;overflow:hidden;transition:height .3s,content-visibility .3s allow-discrete}.r-sidebar-sublist{margin-left:12px}.r-sidebar-sublist .r-sidebar-link{position:relative;border-top-left-radius:0;border-bottom-left-radius:0}.r-sidebar-sublist .r-sidebar-link::before{content:"";position:absolute;left:0;top:-1px;width:2px;height:calc(100% + 4px);background-color:var(--r-neutral-200);transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-li{position:relative;padding-top:2px;padding-bottom:2px;line-height:1.5}.r-sidebar-li._separator{background:var(--r-neutral-200);padding:1px}.r-sidebar-li._droppable>a{padding-right:32px}.r-sidebar-li-d0{margin-left:-8px}.r-sidebar-p{margin:0;padding:4px 10px}.r-sidebar-heading{color:var(--r-neutral-900);font-weight:600;margin-block-end:4px}.r-sidebar-heading:not(:first-child){margin-block-start:12px}.r-sidebar-link{display:block;padding:4px 10px;color:inherit;border-bottom:2px solid rgba(0,0,0,0);border-radius:2px;text-decoration:none;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s,color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-link._target{color:var(--r-primary-950);background-color:var(--r-neutral-50)}.r-sidebar-link:hover{color:var(--r-primary-800);background-color:var(--r-neutral-100);transition-delay:initial}.r-sidebar-link:hover::before{background-color:currentColor;transition-delay:initial}.r-sidebar-link._active{color:var(--r-primary-700);background-color:var(--r-neutral-50)}.r-sidebar-link._active::before{background-color:currentColor}.r-sidebar-drop-btn{position:absolute;right:3px;top:5px;border-radius:4px;padding:4px;background-color:var(--r-neutral-200);list-style:none;cursor:pointer;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s,color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-drop-btn:hover{background-color:var(--r-neutral-300);color:var(--r-primary-500);transition-delay:initial}.r-sidebar-drop-btn::before{content:"";position:absolute;inset:-4px}.r-sidebar-drop-btn::-webkit-details-marker{display:none}.r-sidebar-drop-icon{display:block;transition:transform .2s}.r-sidebar-drop[open]>.r-sidebar-drop-btn>.r-sidebar-drop-icon{transform:rotate(90deg)}.r-header-menu{display:flex;justify-content:flex-end;order:1}@media screen and (width >= 1024px){.r-header-menu{flex:1;order:unset}}.r-header-menu._opened .r-header-responsive{display:flex}.r-header-responsive{display:none;justify-content:flex-end;flex:1;gap:24px;z-index:1}@media screen and (width < 1024px){.r-header-responsive{flex-direction:column-reverse;padding:12px;background-color:var(--r-body);position:fixed;top:60px;right:0;bottom:0;left:0}}@media screen and (width >= 1024px){.r-header-responsive{display:flex;justify-content:space-between;align-items:center}}.r-header-burger{position:relative;display:flex;align-items:center;justify-content:center;height:32px;width:32px;cursor:pointer;background:none;border:none}@media screen and (width >= 1024px){.r-header-burger{display:none}}.r-burger-line{display:block;width:20px;height:1.5px;position:absolute;background-color:var(--r-neutral-700);margin:auto;transition:transform .3s}.r-burger-line._top{transform:translateY(-3px)}.r-header-menu._opened .r-burger-line._top{transform:translateY(0) rotate(45deg);margin-top:0}.r-burger-line._bottom{transform:translateY(3px)}.r-header-menu._opened .r-burger-line._bottom{transform:translateY(0) rotate(-45deg);margin-top:0}.r-search-btn{position:relative;border-radius:6px;background-color:var(--r-neutral-100);color:var(--r-neutral-600);padding:8px 20px;border:1px solid var(--r-neutral-200);width:100%;text-align:left;cursor:text}@media screen and (width >= 768px){.r-search-btn{width:220px;padding:8px 96px 8px 20px}}.r-search-btn:hover{border-color:var(--r-neutral-600)}.r-search-btn:hover .r-search-kbd{color:var(--r-neutral-950)}.r-search-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.r-search-kbd{display:none;position:absolute;right:6px;top:50%;transform:translateY(-50%)}@media screen and (width >= 768px){.r-search-kbd{display:flex}}.r-search-popup-header{position:relative;border-bottom:1px solid var(--r-neutral-200)}.r-search-input{border-radius:12px 12px 0 0;background-color:var(--r-neutral-50);padding:16px 20px;border:none;border-bottom:2px solid var(--r-neutral-300);width:100%;font-size:16px}@media screen and (width >= 768px){.r-search-input{padding:16px 72px 16px 20px}}.r-search-input:hover{border-bottom-color:var(--r-primary-800)}.r-search-input:focus{outline:none;border-bottom-color:var(--r-primary-600)}.r-search-input::placeholder{color:var(--r-neutral-500)}.r-search-popup-kbd{color:var(--r-neutral-600);right:20px}.r-search-results{padding:12px 8px 8px;max-height:min(400px,100vh - 200px);overflow-y:auto;list-style:none;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);margin:0}.r-search-item{display:block;text-decoration:none;color:var(--r-neutral-700);padding:8px 12px;border:1px solid var(--r-neutral-100);border-radius:6px;width:100%;margin-top:6px}.r-search-item:hover,.r-search-item:focus{color:var(--r-neutral-950);background-color:var(--r-neutral-50)}.r-search-item-title{margin:0}.r-search-item-desc{font-size:14px;color:var(--r-neutral-600);margin:12px 0 0}.r-dropdown{position:relative;color:var(--r-neutral-600);transition:color .2s .1s}.r-dropdown:hover,.r-dropdown:focus-within{color:var(--r-neutral-950)}.r-dropdown:hover .r-dropdown-drop,.r-dropdown:focus-within .r-dropdown-drop{visibility:visible;pointer-events:all;transform:translateY(20px);opacity:1}.r-dropdown:hover .r-dropdown-chevron,.r-dropdown:focus-within .r-dropdown-chevron{transform:rotate(180deg)}.r-dropdown-summary{display:flex;justify-content:space-between;align-items:center;width:100%;position:relative;color:inherit;cursor:pointer;padding:10px 4px;font-size:16px;border:0;background:none;z-index:1}.r-dropdown-chevron{margin-left:6px;transition:transform .3s .1s}.r-dropdown-drop{list-style:none;position:absolute;top:16px;left:-12px;visibility:hidden;pointer-events:none;opacity:0;transition:transform .3s .1s,opacity .3s .1s,visibility .3s .1s;background-color:var(--r-neutral-50);border:1px solid var(--r-neutral-100);border-radius:8px;margin:0;padding:2px 6px;min-width:120px;max-width:180px}.r-dropdown-link{display:block;width:100%;text-decoration:none;color:var(--r-neutral-700);padding:4px 8px;margin-top:4px;margin-bottom:4px;border-radius:4px;transition:background-color .2s}.r-dropdown-link:hover{color:var(--r-neutral-900);background-color:var(--r-neutral-100)}.r-dropdown-link._active{color:var(--r-primary-700)}.r-header-social{display:flex;flex:1;justify-content:flex-end}@media screen and (width >= 1024px){.r-header-social{flex:none;justify-content:unset}}.r-header-social-git{color:var(--r-neutral-700);transition:color .2s}.r-header-social-git:hover,.r-header-social-git:focus{color:var(--r-neutral-950)}.r-container{max-width:1180px;padding-right:12px;padding-left:12px;margin-right:auto;margin-left:auto}.r-theme-switcher{position:relative;display:flex;gap:4px;width:108px;height:36px;padding:2px;background-color:var(--r-neutral-950);border-radius:14px}.r-theme-switcher::before{content:"";position:absolute;display:block;height:32px;width:32px;top:2px;left:2px;background-color:var(--r-body);border-radius:12px;transition:left .2s}.r-theme-switcher-btn{padding:8px;background:none;border:0;border-radius:12px;cursor:pointer;color:var(--r-neutral-50);fill:var(--r-neutral-950);z-index:1;transition:color .2s .1s,fill .2s}.r-theme-switcher-btn:hover{color:var(--r-neutral-50);fill:var(--r-neutral-50)}.theme-dark:not(.theme-system) .r-theme-switcher::before{left:2px}.theme-dark:not(.theme-system) .r-theme-switcher-btn__dark{color:var(--r-neutral-950);pointer-events:none}.theme-system .r-theme-switcher::before{left:38px}.theme-system .r-theme-switcher-btn__system{color:var(--r-neutral-950);pointer-events:none}.theme-light:not(.theme-system) .r-theme-switcher::before{left:74px}.theme-light:not(.theme-system) .r-theme-switcher-btn__light{color:var(--r-neutral-950);pointer-events:none}.r-keylink{display:block;position:relative;padding:8px 12px;border:2px solid var(--r-neutral-500);border-radius:6px;text-decoration:none;background:var(--r-body)}.r-keylink:not(:focus){width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important;user-select:none;pointer-events:none}.r-breadcrumbs{grid-area:breadcrumbs;list-style:none;margin:0;padding:20px 0 0;line-height:2}@media screen and (width >= 768px){.r-breadcrumbs{padding:32px 0 0}}.r-breadcrumb{display:inline}.r-breadcrumb._previous::after{content:"/";font-weight:600;margin-inline:8px}.r-breadcrumb-link{color:var(--r-neutral-700);text-decoration:none}.r-breadcrumb-link:hover{color:var(--r-primary-800)}.r-breadcrumb-link,.r-breadcrumb-title{display:inline;padding:6px 0;margin:0}.r-breadcrumb-title{color:var(--r-neutral-950);font-weight:600}.r-pagination{grid-area:pagination;display:grid;grid-template-columns:repeat(auto-fit, minmax(148px, 1fr));gap:16px;margin-bottom:80px}.r-pagination-item{position:relative;padding-top:8px;padding-bottom:8px;text-decoration:none;font-size:14px;color:var(--r-neutral-700)}.r-pagination-item:hover{color:var(--r-neutral-900)}.r-pagination-item._prev{padding-left:32px}.r-pagination-item._next{text-align:right;padding-right:32px}.r-pagination-text{display:block;line-height:2}.r-pagination-title{font-weight:600;font-size:18px;color:var(--r-neutral-950)}.r-pagination-icon{position:absolute;top:50%;transform:translateY(-50%);transition:transform .2s;margin:-4px}.r-pagination-icon._prev{left:0}.r-pagination-item:hover .r-pagination-icon._prev{transform:translate(-4px, -50%)}@media screen and (width >= 1180px){.r-pagination-item:hover .r-pagination-icon._prev{transform:translate(-8px, -50%)}}.r-pagination-icon._next{right:0}.r-pagination-item:hover .r-pagination-icon._next{transform:translate(4px, -50%)}@media screen and (width >= 1180px){.r-pagination-item:hover .r-pagination-icon._next{transform:translate(8px, -50%)}}.r-contents{grid-area:contents}.r-contents-sticky{position:sticky;top:var(--header-height);width:100%}@media screen and (width >= 1180px){.r-contents-sticky{padding:0 12px;max-height:calc(100vh - var(--header-height));overflow:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);scrollbar-gutter:stable}}.r-contents-control{display:contents;visibility:hidden}@media screen and (width >= 1180px){.r-contents-control{pointer-events:none}}@media screen and (width < 1180px){.r-contents-control:checked+.r-contents-details .r-contents-list{visibility:visible;height:var(--drop-height, auto)}}@media screen and (width < 1180px){.r-contents-control:checked+.r-contents-details .r-contents-title{color:var(--r-neutral-800)}}.r-contents-control:checked+.r-contents-details .r-contents-chevron{transform:rotate(180deg)}.r-contents-list{overflow:hidden;transition:height .3s allow-discrete,visibility .3s allow-discrete}@media screen and (width < 1180px){.r-contents-list{visibility:hidden;height:0}}.r-contents-list-content{padding:2px}@media screen and (width < 1180px){.r-contents-details{background:var(--r-neutral-100);border-radius:4px}}.r-contents-title{display:block;position:sticky;top:0;cursor:pointer;margin-top:20px;padding:12px;color:var(--r-neutral-600);z-index:1}@media screen and (width < 1180px){.r-contents-title{display:flex;align-items:center;justify-content:space-between}}@media screen and (width >= 1180px){.r-contents-title{color:var(--r-neutral-900);background:var(--r-body);font-weight:600;margin-top:0;padding:32px 0 12px;cursor:auto}}@media screen and (width < 1180px){.r-contents-title:hover{color:var(--r-neutral-900)}}.r-contents-chevron{display:inline;vertical-align:middle;margin-left:8px;transition:transform .2s}@media screen and (width >= 1180px){.r-contents-chevron{display:none}}.r-contents-link{display:block;position:relative;color:var(--r-neutral-600);text-decoration:none;padding-top:4px;padding-bottom:4px;padding-left:12px;margin-bottom:8px;font-size:14px;line-height:1.5;transition:color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-contents-link.r-contents-link:hover{color:var(--r-primary-800);transition-delay:initial}.r-contents-link::before,.r-contents-link::after{content:"";display:block;position:absolute;top:-4px;left:0;height:calc(100% + 8px);border-style:solid;border-width:0 2px 0 0;border-color:var(--r-primary-800)}.r-contents-link::before{border-color:var(--r-neutral-200)}.r-contents-link::after{mask-image:linear-gradient(135deg, #000 50%, transparent 50%);mask-repeat:no-repeat;mask-size:200% 200%;mask-position:100% 100%}.r-contents-link._nested{margin-left:16px}.r-contents-link._nested::before,.r-contents-link._nested::after{left:-16px;width:18px}.r-contents-link:not(._nested)+.r-contents-link._nested::before,.r-contents-link:not(._nested)+.r-contents-link._nested::after{border-top-width:2px}.r-contents-link._nested+.r-contents-link:not(._nested)::before,.r-contents-link._nested+.r-contents-link:not(._nested)::after{width:18px;border-width:2px 0 0 2px}.r-contents-link._nested+.r-contents-link:not(._nested)::after{mask-image:linear-gradient(45deg, transparent 50%, #000 50%);mask-position:0 100% !important}.r-contents-link._nested+.r-contents-link._passed:not(._nested)::after{mask-position:100% 0 !important}@media screen and (width >= 1180px){.r-contents-link._passed{color:var(--r-neutral-800)}}@media screen and (width >= 1180px){.r-contents-link._passed::after{mask-position:0 0 !important}}@media screen and (width >= 1180px){.r-contents-link._active{color:var(--r-primary-800)}}.r-contents-link._active::after,.r-contents-link._active+.r-contents-link::after{transition:mask-position .3s}.r-contents-actions{position:sticky;bottom:0;padding-top:2px;padding-bottom:2px;margin-top:20px;background-color:var(--r-body)}@media screen and (width < 1180px){.r-contents-actions{display:none}}.r-contents-git{display:block;width:100%;position:relative;color:var(--r-neutral-600);text-decoration:none;padding-top:10px;padding-bottom:10px;font-size:14px;font-weight:600}.r-contents-git:hover{color:var(--r-neutral-900)}.r-last-modified{color:var(--r-neutral-700);margin-block-start:16px}.r-external-mark{position:relative;vertical-align:text-top;display:inline-block;margin-left:-4px;margin-right:2px;width:6px;height:6px}.r-external-mark::after{content:"";position:absolute;top:0;right:0;width:100%;height:100%;border-top:1px solid currentColor;border-right:1px solid currentColor}.r-external-mark::before{content:"";position:absolute;top:0;right:0;width:3px;height:3px;background-color:currentColor;border-radius:0 0 0 4px}.r-anchor-heading:hover .r-anchor-heading-link{visibility:visible;opacity:1}.r-anchor-heading-link{visibility:hidden;opacity:0;transition:opacity .3s allow-discrete;padding-inline:8px;margin-inline-start:-4px;color:var(--r-neutral-600);text-decoration:none}.r-anchor-heading-link:hover{color:var(--r-link-base-hovered)}.r-anchor-heading-link::after{content:"#"}.r-code-section{position:relative;margin-block-start:1.5em;margin-block-end:1.75em}.r-code-section-header{font-family:var(--monospace-font, monospace, monospace);display:flex;justify-content:space-between;align-items:center;border-top-left-radius:6px;border-top-right-radius:6px;padding:6px 20px;background-color:var(--r-neutral-100);border:1px solid var(--r-neutral-300);color:var(--r-neutral-700)}.r-code-section-header+.r-code-section-block{border-top-left-radius:0;border-top-right-radius:0;border-top:0;margin-block-start:0;margin-block-end:0}.r-code-section:hover .r-code-section-copy{opacity:.9}.r-code-section-copy.r-code-section-copy{position:absolute;right:9px;top:9px;opacity:0;transition:opacity .2s,color .2s,background-color .2s}.r-code-section-copy.r-code-section-copy:hover,.r-code-section-copy.r-code-section-copy._active{opacity:1}.r-code-section-filename{font-family:var(--monospace-font, monospace, monospace)}.r-block{width:100%;overflow:auto;margin-block-start:12px;margin-block-end:12px;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0)}.r-blockquote{background-color:var(--r-neutral-100);padding:8px 12px 8px 20px;border-left:6px solid var(--r-neutral-600);border-top-right-radius:2px;border-bottom-right-radius:2px;font:inherit;margin-inline:0;margin-block-start:1em;margin-block-end:1em}.r-blockquote-title{font-weight:600}.r-blockquote-icon{display:inline-block;vertical-align:middle;margin-top:-2px;margin-right:8px}.r-blockquote-note{border-left-color:var(--r-note)}.r-blockquote-note .r-blockquote-title{color:var(--r-note)}.r-blockquote-tip{border-left-color:var(--r-tip)}.r-blockquote-tip .r-blockquote-title{color:var(--r-tip)}.r-blockquote-important{border-left-color:var(--r-important)}.r-blockquote-important .r-blockquote-title{color:var(--r-important)}.r-blockquote-warning{border-left-color:var(--r-warning)}.r-blockquote-warning .r-blockquote-title{color:var(--r-warning)}.r-blockquote-caution{border-left-color:var(--r-caution)}.r-blockquote-caution .r-blockquote-title{color:var(--r-caution)}.r-code-span{font-family:var(--monospace-font, monospace, monospace);background-color:var(--r-neutral-100);border-radius:4px;padding:2px 6px;font-size:16px}.r-code-span+.r-content-link-external{margin-left:-12px}.r-code-block{font-family:var(--monospace-font, monospace, monospace);font-size:16px;line-height:1.33;border-radius:6px;padding:16px 20px;margin-block-start:1.5em;margin-block-end:1.75em;color:var(--r-primary-800);background-color:var(--r-neutral-50);border:1px solid var(--r-neutral-300);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0)}.r-h1{font-size:32px;line-height:1.4;margin-block-start:.67em;margin-block-end:.67em}.r-h2{font-size:26px;line-height:1.4;margin-block-start:.83em;margin-block-end:.83em}.r-h3{font-size:22px;line-height:1.4;margin-block-start:1em;margin-block-end:1em}.r-h4{font-size:20px;line-height:1.4;margin-block-start:1.33em;margin-block-end:1.33em}.r-h5{font-size:18px;line-height:1.4;margin-block-start:1.5em;margin-block-end:1.5em}.r-h6{font-size:16px;line-height:1.4;margin-block-start:1.8em;margin-block-end:1.8em}.r-img{max-width:100%}.r-p{line-height:1.8;margin-block-start:1em;margin-block-end:1em}.r-tabs{margin-block-start:1.5em;margin-block-end:1.75em}.r-tab-list{position:relative;z-index:1}.r-tab-list .r-code-section,.r-tab-list .r-code-block,.r-tab-list .r-code-section-header{margin-block-start:0;margin-block-end:0;border-top-left-radius:0;border-top-right-radius:0;background-color:var(--r-neutral-50)}.r-tabs-header{display:flex}.r-tab-header{cursor:pointer;border:1px solid var(--r-neutral-300);color:var(--r-neutral-600);border-bottom:0;margin-bottom:-1px;background-color:var(--r-body);border-top-left-radius:4px;border-top-right-radius:4px;padding:8px 20px}.r-tab-header:hover{background-color:var(--r-neutral-50);color:var(--r-primary-600)}.r-tab-header-code{font-family:var(--monospace-font, monospace, monospace)}.r-kbd-container{display:flex;gap:4px;font-size:14px;cursor:pointer}.r-kbd-container:hover{color:var(--r-neutral-950)}.r-kbd-key{background-color:var(--r-neutral-200);font-size:12px;border-radius:4px;padding:5px 8px;min-width:24px;text-align:center}.r-modal{position:fixed;left:0;bottom:0;width:100%;background-color:var(--r-body);border-radius:12px 12px 0 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s .1s,transform .2s .1s,visibility .01s .2s .1s;z-index:1000}@media screen and (width >= 768px){.r-modal{top:10%;left:50%;bottom:auto;transform:translateX(-50%) scale(0.95);max-width:480px;border-radius:12px}}.r-modal._visible{opacity:1;visibility:visible;transition:opacity .2s .1s,transform .2s .1s;pointer-events:all}@media screen and (width >= 768px){.r-modal._visible{transform:translateX(-50%) scale(1)}}.copy-button{position:relative;padding:8px;background:none;color:var(--r-neutral-700);background-color:var(--r-neutral-100);border:0;border-radius:6px;cursor:pointer;font:inherit;transition:color .2s,background-color .2s}.copy-button-success{opacity:0;transform:scale(0.7);transition:.2s}.copy-button-base{transition:.2s}.copy-button:hover{color:var(--r-neutral-950);background-color:var(--r-neutral-200)}.copy-button:active,.copy-button._active{color:var(--r-success)}.copy-button:active .copy-button-success,.copy-button._active .copy-button-success{opacity:1;transform:scale(1)}.copy-button:active .copy-button-base,.copy-button._active .copy-button-base{opacity:0;transform:scale(0.7)}.copy-text{position:relative;cursor:pointer;background:none;border:0;padding:0;font:inherit}.copy-text:hover{color:var(--r-neutral-950)}.copy-text::after{content:"";position:absolute;bottom:-2px;left:0;width:100%;height:1px;background:linear-gradient(to right, currentColor 30%, transparent 0%, transparent 80%, currentColor 80%) repeat-x 0px/8px;transition:background .2s}.copy-text:active,.copy-text._active{color:var(--r-success)}.r-content-link{text-decoration:none;color:var(--r-link)}.r-content-link:hover{color:var(--r-link-hovered)}.r-content-link:active{color:var(--r-link-active)}.r-content-link-external{position:relative;vertical-align:text-top;display:inline-block;margin-left:-4px;margin-right:2px;width:6px;height:6px}.r-content-link-external::after{content:"";position:absolute;top:0;right:0;width:100%;height:100%;border-top:1px solid currentColor;border-right:1px solid currentColor}.r-content-link-external::before{content:"";position:absolute;top:0;right:0;width:3px;height:3px;background-color:currentColor;border-radius:0 0 0 4px}.r-ol{padding-inline-start:0;list-style-position:inside;margin-block-start:1em;margin-block-end:1em}.r-li{line-height:1.8;margin-block-start:6px;margin-block-end:6px}.r-li>.r-ul,.r-li>.r-ol{padding-inline-start:20px;margin-block-start:6px;margin-block-end:6px}.r-ul{padding-inline-start:0;list-style-position:inside;margin-block-start:1em;margin-block-end:1em}.r-table{min-width:100%;text-align:left;border-collapse:collapse}.r-td{padding:6px 12px;border-bottom:1px solid var(--r-neutral-400);border-collapse:collapse}.r-th{padding:6px 12px;border-top:1px solid var(--r-neutral-500);border-bottom:1px solid var(--r-neutral-500);border-collapse:collapse}.r-thead{background-color:var(--r-neutral-100)}.r-task-li.r-task-li{margin-block-start:2px;margin-block-end:2px}.r-task-label{cursor:pointer;display:block;width:100%;padding-top:2px;padding-bottom:2px}.r-task-label:hover .r-task-checkbox{filter:brightness(0.8)}.r-task-checkbox{cursor:pointer;width:18px;height:18px;inset:-4px;margin-inline-end:8px;vertical-align:middle}.r-task-label-text{vertical-align:middle}.r-task-ol{list-style:none}.r-task-ul{list-style:none}.r-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0);opacity:0;visibility:hidden;pointer-events:none;backdrop-filter:blur(1px);transition:background .05s,opacity .2s,visibility .01s .15s;z-index:100}.r-backdrop._visible{opacity:1;background:rgba(0,0,0,.3);visibility:visible;transition:background .05s,opacity .2s;pointer-events:all}.r-tooltip{font-family:var(--monospace-font, monospace, monospace);opacity:0;position:absolute;background:var(--r-neutral-200);width:max-content;padding:6px 12px;border-radius:4px;max-width:200px;transform:translateY(80%);transition:transform .2s,opacity .2s}.r-tooltip._bottom-start{bottom:-8px;left:0}.r-tooltip._bottom-end{bottom:-8px;right:0}.r-tooltip._visible{opacity:1;transform:translateY(100%)}
|
|
1
|
+
:root{overflow:hidden;--rb-neutral-50: #f8fafc;--rb-neutral-100: #f1f5f9;--rb-neutral-200: #e2e8f0;--rb-neutral-300: #cbd5e1;--rb-neutral-400: #94a3b8;--rb-neutral-500: #64748b;--rb-neutral-600: #475569;--rb-neutral-700: #334155;--rb-neutral-800: #1e293b;--rb-neutral-900: #0f172a;--rb-neutral-950: #020617;--rb-primary-50: #fff7ed;--rb-primary-100: #ffedd5;--rb-primary-200: #fed7aa;--rb-primary-300: #fdba74;--rb-primary-400: #fb923c;--rb-primary-500: #f97316;--rb-primary-600: #ea580c;--rb-primary-700: #c2410c;--rb-primary-800: #9a3412;--rb-primary-900: #7c2d12;--rb-primary-950: #27130d;--rb-secondary-50: #eff6ff;--rb-secondary-100: #dbeafe;--rb-secondary-200: #bfdbfe;--rb-secondary-300: #93c5fd;--rb-secondary-400: #60a5fa;--rb-secondary-500: #3b82f6;--rb-secondary-600: #2563eb;--rb-secondary-700: #1d4ed8;--rb-secondary-800: #1e40af;--rb-secondary-900: #1e3a8a;--rb-secondary-950: #172554;--rb-body-50: #ffffff;--rb-body-950: #00020a}body{--header-height: 60px;position:relative;padding:0;margin:0;accent-color:var(--r-primary-600, #ea580c);box-sizing:border-box;background-color:var(--r-body);color:var(--r-neutral-950);height:100vh;overflow:hidden auto;scroll-padding-top:calc(var(--header-height) + 20px);scrollbar-color:var(--r-neutral-400) var(--r-neutral-200);white-space:pre-wrap}@media screen and (width < 768px){body{scroll-padding-top:calc(var(--header-height) + 60px)}}@media screen and (width > 1180px){body{scroll-behavior:smooth;scrollbar-gutter:stable}}*,*:before,*:after{box-sizing:inherit}@media(prefers-reduced-motion: reduce){*,::before,::after{animation-delay:-1ms !important;animation-duration:1ms !important;animation-iteration-count:1 !important;background-attachment:initial !important;scroll-behavior:auto !important;transition-duration:1ms !important;transition-delay:-1ms !important}}svg{display:block}@media screen and (width < 768px){.body-mobile-lock{overflow:hidden}}@media screen and (width < 1024px){.body-tablet-lock{overflow:hidden}}.body-lock{overflow:hidden}.theme-light{color-scheme:light;--r-body: var(--rb-body-50);--r-neutral-50: var(--rb-neutral-50, #f8fafc);--r-neutral-100: var(--rb-neutral-100, #f1f5f9);--r-neutral-200: var(--rb-neutral-200, #e2e8f0);--r-neutral-300: var(--rb-neutral-300, #cbd5e1);--r-neutral-400: var(--rb-neutral-400, #94a3b8);--r-neutral-500: var(--rb-neutral-500, #64748b);--r-neutral-600: var(--rb-neutral-600, #475569);--r-neutral-700: var(--rb-neutral-700, #334155);--r-neutral-800: var(--rb-neutral-800, #1e293b);--r-neutral-900: var(--rb-neutral-900, #0f172a);--r-neutral-950: var(--rb-neutral-950, #020617);--r-primary-50: var(--rb-primary-50, #fff7ed);--r-primary-100: var(--rb-primary-100, #ffedd5);--r-primary-200: var(--rb-primary-200, #fed7aa);--r-primary-300: var(--rb-primary-300, #fdba74);--r-primary-400: var(--rb-primary-400, #fb923c);--r-primary-500: var(--rb-primary-500, #f97316);--r-primary-600: var(--rb-primary-600, #ea580c);--r-primary-700: var(--rb-primary-700, #c2410c);--r-primary-800: var(--rb-primary-800, #9a3412);--r-primary-900: var(--rb-primary-900, #7c2d12);--r-primary-950: var(--rb-primary-950, #27130d);--r-secondary-50: var(--rb-secondary-50, #eff6ff);--r-secondary-100: var(--rb-secondary-100, #dbeafe);--r-secondary-200: var(--rb-secondary-200, #bfdbfe);--r-secondary-300: var(--rb-secondary-300, #93c5fd);--r-secondary-400: var(--rb-secondary-400, #60a5fa);--r-secondary-500: var(--rb-secondary-500, #3b82f6);--r-secondary-600: var(--rb-secondary-600, #2563eb);--r-secondary-700: var(--rb-secondary-700, #1d4ed8);--r-secondary-800: var(--rb-secondary-800, #1e40af);--r-secondary-900: var(--rb-secondary-900, #1e3a8a);--r-secondary-950: var(--rb-secondary-950, #172554);--r-success: #15803d;--r-note: #0e7490;--r-tip: #047857;--r-important: #a21caf;--r-warning: #b45309;--r-caution: #b91c1c;--r-link: var(--r-secondary-600);--r-link-hovered: var(--r-secondary-800);--r-link-active: var(--r-primary-700);--r-cl-1: #f9826c;--r-cl-2: var(--r-neutral-100);--r-cl-3: #e1e4e8;--r-cl-4: #2f363d;--r-cl-5: #959da5;--r-cl-6: #2188ff;--r-cl-7: #dbedff;--r-cl-8: #005cc5;--r-cl-9: #586069;--r-cl-10: #6a737d;--r-cl-11: #fafbfc;--r-cl-12: #159739;--r-cl-13: #138934;--r-cl-14: #1b1f23;--r-cl-15: #d1d5da;--r-cl-16: #34d05822;--r-cl-17: #d73a4922;--r-cl-18: #ffdf5d;--r-cl-19: #ffdf5d66;--r-cl-20: #28a74525;--r-cl-21: #d1d5da11;--r-cl-22: #24292e;--r-cl-23: #0366d611;--r-cl-24: #f6f8fa;--r-cl-25: #0366d625;--r-cl-26: #34d05840;--r-cl-27: #34d05800;--r-cl-28: #ffd33d33;--r-cl-29: #24943e99;--r-cl-30: #24943e50;--r-cl-31: #be5007;--r-cl-32: #5a32a3;--r-cl-33: #044289;--r-cl-34: #cb2431;--r-cl-35: #28a745;--r-cl-36: #cc2536;--r-cl-37: #d7dbe0;--r-cl-38: #eff2f6;--r-cl-39: #1b1f234d;--r-cl-40: #f9c513;--r-cl-41: #444d56;--r-cl-42: #e2e5e9;--r-cl-43: #cce5ff;--r-cl-44: #ebf0f4;--r-cl-45: #e8eaed;--r-cl-46: #6a737d33;--r-cl-47: #959da588;--r-cl-48: #959da533;--r-cl-49: #959da544;--r-cl-50: #0366d6;--r-cl-51: #3192aa;--r-cl-52: #22863a;--r-cl-53: #b08800;--r-cl-54: #1b7c83;--r-cl-55: #dbab09;--r-cl-56: #6f42c1;--r-cl-57: #b31d28;--r-cl-58: #032f62;--r-cl-59: #b31d28;--r-cl-60: #ffeef0;--r-cl-61: #f0fff4;--r-cl-62: #ffebda}.theme-dark{color-scheme:dark;--r-body: var(--rb-body-950);--r-neutral-50: var(--rb-neutral-950, #020617);--r-neutral-100: var(--rb-neutral-900, #0f172a);--r-neutral-200: var(--rb-neutral-800, #1e293b);--r-neutral-300: var(--rb-neutral-700, #334155);--r-neutral-400: var(--rb-neutral-600, #475569);--r-neutral-500: var(--rb-neutral-500, #64748b);--r-neutral-600: var(--rb-neutral-400, #94a3b8);--r-neutral-700: var(--rb-neutral-300, #cbd5e1);--r-neutral-800: var(--rb-neutral-200, #e2e8f0);--r-neutral-900: var(--rb-neutral-100, #f1f5f9);--r-neutral-950: var(--rb-neutral-50, #f8fafc);--r-primary-50: var(--rb-primary-950, #27130d);--r-primary-100: var(--rb-primary-900, #7c2d12);--r-primary-200: var(--rb-primary-800, #9a3412);--r-primary-300: var(--rb-primary-700, #c2410c);--r-primary-400: var(--rb-primary-600, #ea580c);--r-primary-500: var(--rb-primary-500, #f97316);--r-primary-600: var(--rb-primary-400, #fb923c);--r-primary-700: var(--rb-primary-300, #fdba74);--r-primary-800: var(--rb-primary-200, #fed7aa);--r-primary-900: var(--rb-primary-100, #ffedd5);--r-primary-950: var(--rb-primary-50, #fff7ed);--r-secondary-50: var(--rb-secondary-950, #172554);--r-secondary-100: var(--rb-secondary-900, #1e3a8a);--r-secondary-200: var(--rb-secondary-800, #1e40af);--r-secondary-300: var(--rb-secondary-700, #1d4ed8);--r-secondary-400: var(--rb-secondary-600, #2563eb);--r-secondary-500: var(--rb-secondary-500, #3b82f6);--r-secondary-600: var(--rb-secondary-400, #60a5fa);--r-secondary-700: var(--rb-secondary-300, #93c5fd);--r-secondary-800: var(--rb-secondary-200, #bfdbfe);--r-secondary-900: var(--rb-secondary-100, #dbeafe);--r-secondary-950: var(--rb-secondary-50, #eff6ff);--r-success: #86efac;--r-note: #22d3ee;--r-tip: #34d399;--r-important: #e879f9;--r-warning: #fbbf24;--r-caution: #f87171;--r-link: var(--r-secondary-500);--r-link-hovered: var(--r-secondary-800);--r-link-active: var(--r-primary-700);--r-cl-1: #f9826c;--r-cl-2: var(--r-neutral-100);--r-cl-3: #444d56;--r-cl-4: #e1e4e8;--r-cl-5: #959da5;--r-cl-6: #0366d6;--r-cl-7: #1d2d3e;--r-cl-8: #79b8ff;--r-cl-9: #d1d5da;--r-cl-10: #9ba3ac;--r-cl-11: #24292e;--r-cl-12: #176f2c;--r-cl-13: #22863a;--r-cl-14: #fff;--r-cl-15: #586069;--r-cl-16: #28a74530;--r-cl-17: #d73a4930;--r-cl-18: #ffd33d44;--r-cl-19: #ffd33d22;--r-cl-20: #2b6a3033;--r-cl-21: #58606915;--r-cl-22: #e1e4e8;--r-cl-23: #3392ff22;--r-cl-24: #2f363d;--r-cl-25: #3392ff44;--r-cl-26: #17e5e650;--r-cl-27: #17e5e600;--r-cl-28: #c6902625;--r-cl-29: #17e5e699;--r-cl-30: #17e5e666;--r-cl-31: #ffab70;--r-cl-32: #b392f0;--r-cl-33: #c8e1ff;--r-cl-34: #f97583;--r-cl-35: #34d058;--r-cl-36: #f97583;--r-cl-37: #444d56;--r-cl-38: #2f363d;--r-cl-39: #444d56;--r-cl-40: #ffea7f;--r-cl-41: #d1d5da;--r-cl-42: #39414a;--r-cl-43: #044289;--r-cl-44: #282e34;--r-cl-45: #282e34;--r-cl-47: #6a737d88;--r-cl-48: #6a737d33;--r-cl-49: #6a737d44;--r-cl-50: #79b8ff;--r-cl-51: #56d4dd;--r-cl-52: #85e89d;--r-cl-53: #ffea7f;--r-cl-54: #39c5cf;--r-cl-55: #ffea7f;--r-cl-56: #b392f0;--r-cl-57: #fdaeba;--r-cl-58: #dbedff;--r-cl-59: #fdaeb7;--r-cl-60: #86181d;--r-cl-61: #144620;--r-cl-62: #c24e00}.r-footer{border-top:1px solid var(--r-neutral-300);padding-top:24px;padding-bottom:24px}.r-footer-row{display:flex;justify-content:space-between;align-items:center;gap:32px}.r-footer-additional{margin-top:32px;justify-content:flex-end}.r-copyright{color:var(--r-neutral-800)}.r-powered{font-size:14px;display:block;color:var(--r-neutral-600)}.r-powered-link{font-weight:600;text-decoration:none;color:var(--r-neutral-950)}.r-powered-link:hover{color:var(--r-primary-900)}.r-docs-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}@media screen and (width >= 768px){.r-docs-container{display:grid;justify-content:center;column-gap:32px;grid-template-areas:"sidebar breadcrumbs" "sidebar contents" "sidebar content" "sidebar pagination";grid-template-columns:1fr calc(100% - 248px);grid-template-rows:auto auto 1fr auto}}@media screen and (width >= 1180px){.r-docs-container{column-gap:40px;grid-template-areas:"sidebar breadcrumbs contents" "sidebar content contents" "sidebar pagination contents";grid-template-columns:1fr 640px 1fr;grid-template-rows:auto 1fr auto}}.r-header{position:sticky;background-color:var(--r-body);top:0;border-bottom:1px solid var(--r-neutral-300);height:60px;z-index:1000}.r-header-body{height:100%;display:flex;justify-content:space-between;align-items:center;gap:24px}.r-header-logo{display:block;margin-right:24px;color:var(--r-neutral-700);transition:color .2s}.r-header-logo:hover,.r-header-logo:focus{color:var(--r-neutral-950)}.r-header-nav{display:flex;flex-direction:column;gap:12px 16px}@media screen and (width >= 1024px){.r-header-nav{flex-direction:row}}.r-header-link{color:var(--r-neutral-600);text-decoration:none;padding:4px 0;transition:color .2s}.r-header-link:hover,.r-header-link:focus-visible{color:var(--r-neutral-950)}.r-header-link._target{color:var(--r-primary-800)}.r-header-link._target:hover,.r-header-link._target:focus-visible{color:var(--r-primary-700)}.r-header-actions{display:flex;flex-direction:column-reverse;gap:16px;align-items:stretch}@media screen and (width >= 1024px){.r-header-actions{flex-direction:row;align-items:center;gap:28px}}.r-header-sections{display:flex;align-items:center;gap:12px}@media screen and (width < 768px){.r-header-sections .r-dropdown{flex:1}}@media screen and (width < 768px){.r-header-sections .r-dropdown-drop{max-width:none;width:100%;left:0}}.r-blog-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}@media screen and (width >= 1180px){.r-blog-container{display:grid;justify-content:space-between;column-gap:40px;grid-template-areas:"breadcrumbs contents" "content contents" "pagination contents";grid-template-columns:760px 220px;grid-template-rows:auto 1fr auto}}.r-page-container{min-height:calc(100vh - var(--header-height));overflow-wrap:break-word}.keylink-to-content{position:absolute !important;top:8px;left:12px;z-index:1001}.keylink-to-navigation{margin-top:-40px}.r-article{padding:20px 0 80px;grid-area:content}@media screen and (width >= 1180px){.r-article{padding:32px 0 80px}}.r-article>*:first-child{margin-top:0}.r-checkbox{cursor:pointer;width:20px;height:20px;margin:4px;vertical-align:middle}.r-label{cursor:pointer}.r-task-ol,.r-task-ul{list-style:none}.r-task-label{display:block;width:100%;padding-top:2px;padding-bottom:2px}.r-task-label:hover .r-checkbox{filter:brightness(0.8)}.r-task-li.r-task-li{margin-block-start:2px;margin-block-end:2px}.r-label-text{vertical-align:middle}.r-sidebar{grid-area:sidebar}@media screen and (width < 768px){.r-sidebar{position:sticky;width:calc(100% + 24px);top:var(--header-height);left:0;margin:0 -12px;background-color:var(--r-body);border-bottom:1px solid var(--r-neutral-200);z-index:10;opacity:.98;padding:0;overflow:auto}}.r-sidebar-top-mock{grid-row-start:1;grid-column-start:1}@media screen and (width < 768px){.r-sidebar:not(._opened) .r-sidebar-nav{display:none}}@media screen and (width < 768px){.r-sidebar._opened{height:calc(100vh - var(--header-height))}}.r-sidebar-drop{margin-top:-4px;padding-top:4px}.r-sidebar-sublist{position:relative;padding-top:2px}.r-sidebar-sublist:hover::before{background-color:var(--r-primary-800);transition-delay:initial}.r-sidebar-sublist::before{content:"";position:absolute;top:0;left:-12px;right:0;height:2px;border-bottom-left-radius:2px;background-color:var(--r-neutral-200);z-index:1;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-nav{padding:32px 4px 32px 2px}@media screen and (width < 768px){.r-sidebar-nav{padding:12px}}@media screen and (width >= 768px){.r-sidebar-nav{position:sticky;top:var(--header-height);overflow:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);scrollbar-gutter:stable;max-height:calc(100vh - var(--header-height))}}@media screen and (width < 768px){.r-sidebar-space{display:block;height:40px}}.r-sidebar-btn{position:sticky;top:0;display:flex;width:100%;font-size:14px;border:0;padding:12px;background:none;cursor:pointer;color:var(--r-neutral-800);background-color:var(--r-body);z-index:1}@media screen and (width >= 768px){.r-sidebar-btn{display:none}}.r-sidebar-chevron{display:inline;margin-right:6px;transition:transform .2s}.r-sidebar._opened .r-sidebar-chevron{transform:rotate(90deg)}.r-sidebar-list{color:var(--r-neutral-700);list-style:none;padding:0;margin:0;font-size:14px}.r-sidebar-drop[open]::details-content{height:var(--drop-height, auto)}.r-sidebar-drop::details-content{height:0;overflow:hidden;transition:height .3s,content-visibility .3s allow-discrete}.r-sidebar-sublist{margin-left:12px}.r-sidebar-sublist .r-sidebar-link{position:relative;border-top-left-radius:0;border-bottom-left-radius:0}.r-sidebar-sublist .r-sidebar-link::before{content:"";position:absolute;left:0;top:-1px;width:2px;height:calc(100% + 4px);background-color:var(--r-neutral-200);transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-li{position:relative;padding-top:2px;padding-bottom:2px;line-height:1.5}.r-sidebar-li._separator{background:var(--r-neutral-200);padding:1px}.r-sidebar-li._droppable>a{padding-right:32px}.r-sidebar-li-d0{margin-left:-8px}.r-sidebar-p{margin:0;padding:4px 10px}.r-sidebar-heading{color:var(--r-neutral-900);font-weight:600;margin-block-end:4px}.r-sidebar-heading:not(:first-child){margin-block-start:12px}.r-sidebar-link{display:block;padding:4px 10px;color:inherit;border-bottom:2px solid rgba(0,0,0,0);border-radius:2px;text-decoration:none;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s,color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-link._target{color:var(--r-primary-950);background-color:var(--r-neutral-50)}.r-sidebar-link:hover{color:var(--r-primary-800);background-color:var(--r-neutral-100);transition-delay:initial}.r-sidebar-link:hover::before{background-color:currentColor;transition-delay:initial}.r-sidebar-link._active{color:var(--r-primary-700);background-color:var(--r-neutral-50)}.r-sidebar-link._active::before{background-color:currentColor}.r-sidebar-drop-btn{position:absolute;right:3px;top:5px;border-radius:4px;padding:4px;background-color:var(--r-neutral-200);list-style:none;cursor:pointer;transition:background-color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s,color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-sidebar-drop-btn:hover{background-color:var(--r-neutral-300);color:var(--r-primary-500);transition-delay:initial}.r-sidebar-drop-btn::before{content:"";position:absolute;inset:-4px}.r-sidebar-drop-btn::-webkit-details-marker{display:none}.r-sidebar-drop-icon{display:block;transition:transform .2s}.r-sidebar-drop[open]>.r-sidebar-drop-btn>.r-sidebar-drop-icon{transform:rotate(90deg)}.r-container{max-width:1180px;padding-right:12px;padding-left:12px;margin-right:auto;margin-left:auto}.r-theme-switcher{position:relative;display:flex;gap:4px;width:108px;height:36px;padding:2px;background-color:var(--r-neutral-950);border-radius:14px}.r-theme-switcher::before{content:"";position:absolute;display:block;height:32px;width:32px;top:2px;left:2px;background-color:var(--r-body);border-radius:12px;transition:left .2s}.r-theme-switcher-btn{padding:8px;background:none;border:0;border-radius:12px;cursor:pointer;color:var(--r-neutral-50);fill:var(--r-neutral-950);z-index:1;transition:color .2s .1s,fill .2s}.r-theme-switcher-btn:hover{color:var(--r-neutral-50);fill:var(--r-neutral-50)}.theme-dark:not(.theme-system) .r-theme-switcher::before{left:2px}.theme-dark:not(.theme-system) .r-theme-switcher-btn__dark{color:var(--r-neutral-950);pointer-events:none}.theme-system .r-theme-switcher::before{left:38px}.theme-system .r-theme-switcher-btn__system{color:var(--r-neutral-950);pointer-events:none}.theme-light:not(.theme-system) .r-theme-switcher::before{left:74px}.theme-light:not(.theme-system) .r-theme-switcher-btn__light{color:var(--r-neutral-950);pointer-events:none}.r-header-menu{display:flex;justify-content:flex-end;order:1}@media screen and (width >= 1024px){.r-header-menu{flex:1;order:unset}}.r-header-menu._opened .r-header-responsive{display:flex}.r-header-responsive{display:none;justify-content:flex-end;flex:1;gap:24px;z-index:1}@media screen and (width < 1024px){.r-header-responsive{flex-direction:column-reverse;padding:12px;background-color:var(--r-body);position:fixed;top:60px;right:0;bottom:0;left:0}}@media screen and (width >= 1024px){.r-header-responsive{display:flex;justify-content:space-between;align-items:center}}.r-header-burger{position:relative;display:flex;align-items:center;justify-content:center;height:32px;width:32px;cursor:pointer;background:none;border:none}@media screen and (width >= 1024px){.r-header-burger{display:none}}.r-burger-line{display:block;width:20px;height:1.5px;position:absolute;background-color:var(--r-neutral-700);margin:auto;transition:transform .3s}.r-burger-line._top{transform:translateY(-3px)}.r-header-menu._opened .r-burger-line._top{transform:translateY(0) rotate(45deg);margin-top:0}.r-burger-line._bottom{transform:translateY(3px)}.r-header-menu._opened .r-burger-line._bottom{transform:translateY(0) rotate(-45deg);margin-top:0}.r-search-btn{position:relative;border-radius:6px;background-color:var(--r-neutral-100);color:var(--r-neutral-600);padding:8px 20px;border:1px solid var(--r-neutral-200);width:100%;text-align:left;cursor:text}@media screen and (width >= 768px){.r-search-btn{width:220px;padding:8px 96px 8px 20px}}.r-search-btn:hover{border-color:var(--r-neutral-600)}.r-search-btn:hover .r-search-kbd{color:var(--r-neutral-950)}.r-search-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.r-search-kbd{display:none;position:absolute;right:6px;top:50%;transform:translateY(-50%)}@media screen and (width >= 768px){.r-search-kbd{display:flex}}.r-search-popup-header{position:relative;border-bottom:1px solid var(--r-neutral-200)}.r-search-input{border-radius:12px 12px 0 0;background-color:var(--r-neutral-50);padding:16px 20px;border:none;border-bottom:2px solid var(--r-neutral-300);width:100%;font-size:16px}@media screen and (width >= 768px){.r-search-input{padding:16px 72px 16px 20px}}.r-search-input:hover{border-bottom-color:var(--r-primary-800)}.r-search-input:focus{outline:none;border-bottom-color:var(--r-primary-600)}.r-search-input::placeholder{color:var(--r-neutral-500)}.r-search-popup-kbd{color:var(--r-neutral-600);right:20px}.r-search-results{padding:12px 8px 8px;max-height:min(400px,100vh - 200px);overflow-y:auto;list-style:none;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);margin:0}.r-search-item{display:block;text-decoration:none;color:var(--r-neutral-700);padding:8px 12px;border:1px solid var(--r-neutral-100);border-radius:6px;width:100%;margin-top:6px}.r-search-item:hover,.r-search-item:focus{color:var(--r-neutral-950);background-color:var(--r-neutral-50)}.r-search-item-title{margin:0}.r-search-item-desc{font-size:14px;color:var(--r-neutral-600);margin:12px 0 0}.r-dropdown{position:relative;color:var(--r-neutral-600);transition:color .2s .1s}.r-dropdown:hover,.r-dropdown:focus-within{color:var(--r-neutral-950)}.r-dropdown:hover .r-dropdown-drop,.r-dropdown:focus-within .r-dropdown-drop{visibility:visible;pointer-events:all;transform:translateY(20px);opacity:1}.r-dropdown:hover .r-dropdown-chevron,.r-dropdown:focus-within .r-dropdown-chevron{transform:rotate(180deg)}.r-dropdown-summary{display:flex;justify-content:space-between;align-items:center;width:100%;position:relative;color:inherit;cursor:pointer;padding:10px 4px;font-size:16px;border:0;background:none;z-index:1}.r-dropdown-chevron{margin-left:6px;transition:transform .3s .1s}.r-dropdown-drop{list-style:none;position:absolute;top:16px;left:-12px;visibility:hidden;pointer-events:none;opacity:0;transition:transform .3s .1s,opacity .3s .1s,visibility .3s .1s;background-color:var(--r-neutral-50);border:1px solid var(--r-neutral-100);border-radius:8px;margin:0;padding:2px 6px;min-width:120px;max-width:180px}.r-dropdown-link{display:block;width:100%;text-decoration:none;color:var(--r-neutral-700);padding:4px 8px;margin-top:4px;margin-bottom:4px;border-radius:4px;transition:background-color .2s}.r-dropdown-link:hover{color:var(--r-neutral-900);background-color:var(--r-neutral-100)}.r-dropdown-link._active{color:var(--r-primary-700)}.r-header-social{display:flex;flex:1;justify-content:flex-end}@media screen and (width >= 1024px){.r-header-social{flex:none;justify-content:unset}}.r-header-social-git{color:var(--r-neutral-700);transition:color .2s}.r-header-social-git:hover,.r-header-social-git:focus{color:var(--r-neutral-950)}.r-keylink{display:block;position:relative;padding:8px 12px;border:2px solid var(--r-neutral-500);border-radius:6px;text-decoration:none;background:var(--r-body)}.r-keylink:not(:focus){width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important;user-select:none;pointer-events:none}.r-breadcrumbs{grid-area:breadcrumbs;list-style:none;margin:0;padding:20px 0 0;line-height:2}@media screen and (width >= 768px){.r-breadcrumbs{padding:32px 0 0}}.r-breadcrumb{display:inline}.r-breadcrumb._previous::after{content:"/";font-weight:600;margin-inline:8px}.r-breadcrumb-link{color:var(--r-neutral-700);text-decoration:none}.r-breadcrumb-link:hover{color:var(--r-primary-800)}.r-breadcrumb-link,.r-breadcrumb-title{display:inline;padding:6px 0;margin:0}.r-breadcrumb-title{color:var(--r-neutral-950);font-weight:600}.r-contents{grid-area:contents}.r-contents-sticky{position:sticky;top:var(--header-height);width:100%}@media screen and (width >= 1180px){.r-contents-sticky{padding:0 12px;max-height:calc(100vh - var(--header-height));overflow:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0);scrollbar-gutter:stable}}.r-contents-control{display:contents;visibility:hidden}@media screen and (width >= 1180px){.r-contents-control{pointer-events:none}}@media screen and (width < 1180px){.r-contents-control:checked+.r-contents-details .r-contents-list{visibility:visible;height:var(--drop-height, auto)}}@media screen and (width < 1180px){.r-contents-control:checked+.r-contents-details .r-contents-title{color:var(--r-neutral-800)}}.r-contents-control:checked+.r-contents-details .r-contents-chevron{transform:rotate(180deg)}.r-contents-list{overflow:hidden;transition:height .3s allow-discrete,visibility .3s allow-discrete}@media screen and (width < 1180px){.r-contents-list{visibility:hidden;height:0}}.r-contents-list-content{padding:2px}@media screen and (width < 1180px){.r-contents-details{background:var(--r-neutral-100);border-radius:4px}}.r-contents-title{display:block;position:sticky;top:0;cursor:pointer;margin-top:20px;padding:12px;color:var(--r-neutral-600);z-index:1}@media screen and (width < 1180px){.r-contents-title{display:flex;align-items:center;justify-content:space-between}}@media screen and (width >= 1180px){.r-contents-title{color:var(--r-neutral-900);background:var(--r-body);font-weight:600;margin-top:0;padding:32px 0 12px;cursor:auto}}@media screen and (width < 1180px){.r-contents-title:hover{color:var(--r-neutral-900)}}.r-contents-chevron{display:inline;vertical-align:middle;margin-left:8px;transition:transform .2s}@media screen and (width >= 1180px){.r-contents-chevron{display:none}}.r-contents-link{display:block;position:relative;color:var(--r-neutral-600);text-decoration:none;padding-top:4px;padding-bottom:4px;padding-left:12px;margin-bottom:8px;font-size:14px;line-height:1.5;transition:color .2s cubic-bezier(0, 0.66, 0.58, 1) .05s}.r-contents-link.r-contents-link:hover{color:var(--r-primary-800);transition-delay:initial}.r-contents-link::before,.r-contents-link::after{content:"";display:block;position:absolute;top:-4px;left:0;height:calc(100% + 8px);border-style:solid;border-width:0 2px 0 0;border-color:var(--r-primary-800)}.r-contents-link::before{border-color:var(--r-neutral-200)}.r-contents-link::after{mask-image:linear-gradient(135deg, #000 50%, transparent 50%);mask-repeat:no-repeat;mask-size:200% 200%;mask-position:100% 100%}.r-contents-link._nested{margin-left:16px}.r-contents-link._nested::before,.r-contents-link._nested::after{left:-16px;width:18px}.r-contents-link:not(._nested)+.r-contents-link._nested::before,.r-contents-link:not(._nested)+.r-contents-link._nested::after{border-top-width:2px}.r-contents-link._nested+.r-contents-link:not(._nested)::before,.r-contents-link._nested+.r-contents-link:not(._nested)::after{width:18px;border-width:2px 0 0 2px}.r-contents-link._nested+.r-contents-link:not(._nested)::after{mask-image:linear-gradient(45deg, transparent 50%, #000 50%);mask-position:0 100% !important}.r-contents-link._nested+.r-contents-link._passed:not(._nested)::after{mask-position:100% 0 !important}@media screen and (width >= 1180px){.r-contents-link._passed{color:var(--r-neutral-800)}}@media screen and (width >= 1180px){.r-contents-link._passed::after{mask-position:0 0 !important}}@media screen and (width >= 1180px){.r-contents-link._active{color:var(--r-primary-800)}}.r-contents-link._active::after,.r-contents-link._active+.r-contents-link::after{transition:mask-position .3s}.r-contents-actions{position:sticky;bottom:0;padding-top:2px;padding-bottom:2px;margin-top:20px;background-color:var(--r-body)}@media screen and (width < 1180px){.r-contents-actions{display:none}}.r-contents-git{display:block;width:100%;position:relative;color:var(--r-neutral-600);text-decoration:none;padding-top:10px;padding-bottom:10px;font-size:14px;font-weight:600}.r-contents-git:hover{color:var(--r-neutral-900)}.r-pagination{grid-area:pagination;display:grid;grid-template-columns:repeat(auto-fit, minmax(148px, 1fr));gap:16px;margin-bottom:80px}.r-pagination-item{position:relative;padding-top:8px;padding-bottom:8px;text-decoration:none;font-size:14px;color:var(--r-neutral-700)}.r-pagination-item:hover{color:var(--r-neutral-900)}.r-pagination-item._prev{padding-left:32px}.r-pagination-item._next{text-align:right;padding-right:32px}.r-pagination-text{display:block;line-height:2}.r-pagination-title{font-weight:600;font-size:18px;color:var(--r-neutral-950)}.r-pagination-icon{position:absolute;top:50%;transform:translateY(-50%);transition:transform .2s;margin:-4px}.r-pagination-icon._prev{left:0}.r-pagination-item:hover .r-pagination-icon._prev{transform:translate(-4px, -50%)}@media screen and (width >= 1180px){.r-pagination-item:hover .r-pagination-icon._prev{transform:translate(-8px, -50%)}}.r-pagination-icon._next{right:0}.r-pagination-item:hover .r-pagination-icon._next{transform:translate(4px, -50%)}@media screen and (width >= 1180px){.r-pagination-item:hover .r-pagination-icon._next{transform:translate(8px, -50%)}}.r-last-modified{color:var(--r-neutral-700);margin-block-start:16px}.r-external-mark{position:relative;vertical-align:text-top;display:inline-block;margin-left:-4px;margin-right:2px;width:6px;height:6px}.r-external-mark::after{content:"";position:absolute;top:0;right:0;width:100%;height:100%;border-top:1px solid currentColor;border-right:1px solid currentColor}.r-external-mark::before{content:"";position:absolute;top:0;right:0;width:3px;height:3px;background-color:currentColor;border-radius:0 0 0 4px}.r-anchor-heading:hover .r-anchor-heading-link{visibility:visible;opacity:1}.r-anchor-heading-link{visibility:hidden;opacity:0;transition:opacity .3s allow-discrete;padding-inline:8px;margin-inline-start:-4px;color:var(--r-neutral-600);text-decoration:none}.r-anchor-heading-link:hover{color:var(--r-link-base-hovered)}.r-anchor-heading-link::after{content:"#"}.r-code-section{position:relative;margin-block-start:1.5em;margin-block-end:1.75em}.r-code-section-header{font-family:var(--monospace-font, monospace, monospace);display:flex;justify-content:space-between;align-items:center;border-top-left-radius:6px;border-top-right-radius:6px;padding:6px 20px;background-color:var(--r-neutral-100);border:1px solid var(--r-neutral-300);color:var(--r-neutral-700)}.r-code-section-header+.r-code-section-block{border-top-left-radius:0;border-top-right-radius:0;border-top:0;margin-block-start:0;margin-block-end:0}.r-code-section:hover .r-code-section-copy{opacity:.9}.r-code-section-copy.r-code-section-copy{position:absolute;right:9px;top:9px;opacity:0;transition:opacity .2s,color .2s,background-color .2s}.r-code-section-copy.r-code-section-copy:hover,.r-code-section-copy.r-code-section-copy._active{opacity:1}.r-code-section-filename{font-family:var(--monospace-font, monospace, monospace)}.r-block{width:100%;overflow:auto;margin-block-start:12px;margin-block-end:12px;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0)}.r-code-span{font-family:var(--monospace-font, monospace, monospace);background-color:var(--r-neutral-100);border-radius:4px;padding:2px 6px;font-size:16px}.r-code-span+.r-content-link-external{margin-left:-12px}.r-blockquote{background-color:var(--r-neutral-100);padding:8px 12px 8px 20px;border-left:6px solid var(--r-neutral-600);border-top-right-radius:2px;border-bottom-right-radius:2px;font:inherit;margin-inline:0;margin-block-start:1em;margin-block-end:1em}.r-blockquote-title{font-weight:600}.r-blockquote-icon{display:inline-block;vertical-align:middle;margin-top:-2px;margin-right:8px}.r-blockquote-note{border-left-color:var(--r-note)}.r-blockquote-note .r-blockquote-title{color:var(--r-note)}.r-blockquote-tip{border-left-color:var(--r-tip)}.r-blockquote-tip .r-blockquote-title{color:var(--r-tip)}.r-blockquote-important{border-left-color:var(--r-important)}.r-blockquote-important .r-blockquote-title{color:var(--r-important)}.r-blockquote-warning{border-left-color:var(--r-warning)}.r-blockquote-warning .r-blockquote-title{color:var(--r-warning)}.r-blockquote-caution{border-left-color:var(--r-caution)}.r-blockquote-caution .r-blockquote-title{color:var(--r-caution)}.r-h1{font-size:32px;line-height:1.4;margin-block-start:.67em;margin-block-end:.67em}.r-h2{font-size:26px;line-height:1.4;margin-block-start:.83em;margin-block-end:.83em}.r-h3{font-size:22px;line-height:1.4;margin-block-start:1em;margin-block-end:1em}.r-h4{font-size:20px;line-height:1.4;margin-block-start:1.33em;margin-block-end:1.33em}.r-h5{font-size:18px;line-height:1.4;margin-block-start:1.5em;margin-block-end:1.5em}.r-h6{font-size:16px;line-height:1.4;margin-block-start:1.8em;margin-block-end:1.8em}.r-code-block{font-family:var(--monospace-font, monospace, monospace);font-size:16px;line-height:1.33;border-radius:6px;padding:16px 20px;margin-block-start:1.5em;margin-block-end:1.75em;color:var(--r-primary-800);background-color:var(--r-neutral-50);border:1px solid var(--r-neutral-300);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--r-neutral-200) rgba(0,0,0,0)}.r-img{max-width:100%}.r-p{line-height:1.8;margin-block-start:1em;margin-block-end:1em}.r-tabs{margin-block-start:1.5em;margin-block-end:1.75em}.r-tab-list{position:relative;z-index:1}.r-tab-list .r-code-section,.r-tab-list .r-code-block,.r-tab-list .r-code-section-header{margin-block-start:0;margin-block-end:0;border-top-left-radius:0;border-top-right-radius:0;background-color:var(--r-neutral-50)}.r-tabs-header{display:flex}.r-tab-header{cursor:pointer;border:1px solid var(--r-neutral-300);color:var(--r-neutral-600);border-bottom:0;margin-bottom:-1px;background-color:var(--r-body);border-top-left-radius:4px;border-top-right-radius:4px;padding:8px 20px}.r-tab-header:hover{background-color:var(--r-neutral-50);color:var(--r-primary-600)}.r-tab-header-code{font-family:var(--monospace-font, monospace, monospace)}.r-modal{position:fixed;left:0;bottom:0;width:100%;background-color:var(--r-body);border-radius:12px 12px 0 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s .1s,transform .2s .1s,visibility .01s .2s .1s;z-index:1000}@media screen and (width >= 768px){.r-modal{top:10%;left:50%;bottom:auto;transform:translateX(-50%) scale(0.95);max-width:480px;border-radius:12px}}.r-modal._visible{opacity:1;visibility:visible;transition:opacity .2s .1s,transform .2s .1s;pointer-events:all}@media screen and (width >= 768px){.r-modal._visible{transform:translateX(-50%) scale(1)}}.r-kbd-key{background-color:var(--r-neutral-200);font-size:12px;border-radius:4px;padding:5px 8px;min-width:24px;text-align:center}.r-kbd-container{display:flex;gap:4px;font-size:14px;cursor:pointer}.r-kbd-container:hover{color:var(--r-neutral-950)}.copy-button{position:relative;padding:8px;background:none;color:var(--r-neutral-700);background-color:var(--r-neutral-100);border:0;border-radius:6px;cursor:pointer;font:inherit;transition:color .2s,background-color .2s}.copy-button-success{opacity:0;transform:scale(0.7);transition:.2s}.copy-button-base{transition:.2s}.copy-button:hover{color:var(--r-neutral-950);background-color:var(--r-neutral-200)}.copy-button:active,.copy-button._active{color:var(--r-success)}.copy-button:active .copy-button-success,.copy-button._active .copy-button-success{opacity:1;transform:scale(1)}.copy-button:active .copy-button-base,.copy-button._active .copy-button-base{opacity:0;transform:scale(0.7)}.copy-text{position:relative;cursor:pointer;background:none;border:0;padding:0;font:inherit}.copy-text:hover{color:var(--r-neutral-950)}.copy-text::after{content:"";position:absolute;bottom:-2px;left:0;width:100%;height:1px;background:linear-gradient(to right, currentColor 30%, transparent 0%, transparent 80%, currentColor 80%) repeat-x 0px/8px;transition:background .2s}.copy-text:active,.copy-text._active{color:var(--r-success)}.r-content-link{text-decoration:none;color:var(--r-link)}.r-content-link:hover{color:var(--r-link-hovered)}.r-content-link:active{color:var(--r-link-active)}.r-content-link-external{position:relative;vertical-align:text-top;display:inline-block;margin-left:-4px;margin-right:2px;width:6px;height:6px}.r-content-link-external::after{content:"";position:absolute;top:0;right:0;width:100%;height:100%;border-top:1px solid currentColor;border-right:1px solid currentColor}.r-content-link-external::before{content:"";position:absolute;top:0;right:0;width:3px;height:3px;background-color:currentColor;border-radius:0 0 0 4px}.r-li{line-height:1.8;margin-block-start:6px;margin-block-end:6px}.r-li>.r-ul,.r-li>.r-ol{padding-inline-start:20px;margin-block-start:6px;margin-block-end:6px}.r-ol{padding-inline-start:0;list-style-position:inside;margin-block-start:1em;margin-block-end:1em}.r-ul{padding-inline-start:0;list-style-position:inside;margin-block-start:1em;margin-block-end:1em}.r-table{min-width:100%;text-align:left;border-collapse:collapse}.r-td{padding:6px 12px;border-bottom:1px solid var(--r-neutral-400);border-collapse:collapse}.r-th{padding:6px 12px;border-top:1px solid var(--r-neutral-500);border-bottom:1px solid var(--r-neutral-500);border-collapse:collapse}.r-thead{background-color:var(--r-neutral-100)}.r-task-li.r-task-li{margin-block-start:2px;margin-block-end:2px}.r-task-label{cursor:pointer;display:block;width:100%;padding-top:2px;padding-bottom:2px}.r-task-label:hover .r-task-checkbox{filter:brightness(0.8)}.r-task-checkbox{cursor:pointer;width:18px;height:18px;inset:-4px;margin-inline-end:8px;vertical-align:middle}.r-task-label-text{vertical-align:middle}.r-task-ol{list-style:none}.r-task-ul{list-style:none}.r-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0);opacity:0;visibility:hidden;pointer-events:none;backdrop-filter:blur(1px);transition:background .05s,opacity .2s,visibility .01s .15s;z-index:100}.r-backdrop._visible{opacity:1;background:rgba(0,0,0,.3);visibility:visible;transition:background .05s,opacity .2s;pointer-events:all}.r-tooltip{font-family:var(--monospace-font, monospace, monospace);opacity:0;position:absolute;background:var(--r-neutral-200);width:max-content;padding:6px 12px;border-radius:4px;max-width:200px;transform:translateY(80%);transition:transform .2s,opacity .2s}.r-tooltip._bottom-start{bottom:-8px;left:0}.r-tooltip._bottom-end{bottom:-8px;right:0}.r-tooltip._visible{opacity:1;transform:translateY(100%)}
|
|
2
2
|
|
|
3
3
|
/*# sourceMappingURL=styles.css.map */
|
package/lib/styles.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["stdin","file:///home/runner/work/robindoc/robindoc/packages/robindoc/src/assets/_vars.scss"],"names":[],"mappings":"AAEA,MACE,gBAEA,yBACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,yBACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,2BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,sBACA,uBAGF,KACE,sBACA,kBACA,UACA,SACA,2CACA,sBACA,+BACA,2BACA,aACA,qBACA,qDACA,0DACA,qBAEA,kCAfF,KAgBI,sDAGF,mCAnBF,KAoBI,uBACA,yBAIJ,mBAGE,mBAGF,uCACE,mBAGE,gCACA,kCACA,uCACA,yCACA,gCACA,mCACA,kCAIJ,IACE,cAIA,kCADF,kBAEI,iBAKF,mCADF,kBAEI,iBAIJ,WACE,gBAGF,aACE,mBACA,4BACA,8CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,8CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,kDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,qBACA,kBACA,iBACA,uBACA,qBACA,qBACA,iCACA,yCACA,sCAGA,kBACA,+BACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,mBACA,qBACA,qBACA,qBACA,mBACA,qBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBAGF,YACE,kBACA,6BACA,+CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,+CACA,+CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,+CACA,mDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,mDACA,qBACA,kBACA,iBACA,uBACA,qBACA,qBACA,iCACA,yCACA,sCAGA,kBACA,+BACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,gBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,qBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBAIF,UACE,gBACA,+BACA,MACA,6CACA,YACA,aAGF,eACE,YACA,aACA,8BACA,mBACA,SAGF,eACE,cACA,kBACA,2BACA,qBAEA,0CAEE,2BAIJ,cACE,aACA,sBACA,cAEA,oCALF,cAMI,oBAIJ,eACE,2BACA,qBACA,cACA,qBAEA,kDAEE,2BAIJ,uBACE,2BAEA,kEAEE,2BAIJ,kBACE,aACA,8BACA,SACA,oBAEA,oCANF,kBAOI,mBACA,mBACA,UAIJ,mBACE,aACA,mBACA,SAGE,kCADF,+BAEI,QAKF,kCADF,oCAEI,eACA,WACA,QAMN,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["stdin","file:///home/runner/work/robindoc/robindoc/packages/robindoc/src/assets/_vars.scss"],"names":[],"mappings":"AAEA,MACE,gBAEA,yBACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,yBACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,0BACA,2BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,4BACA,sBACA,uBAGF,KACE,sBACA,kBACA,UACA,SACA,2CACA,sBACA,+BACA,2BACA,aACA,qBACA,qDACA,0DACA,qBAEA,kCAfF,KAgBI,sDAGF,mCAnBF,KAoBI,uBACA,yBAIJ,mBAGE,mBAGF,uCACE,mBAGE,gCACA,kCACA,uCACA,yCACA,gCACA,mCACA,kCAIJ,IACE,cAIA,kCADF,kBAEI,iBAKF,mCADF,kBAEI,iBAIJ,WACE,gBAGF,aACE,mBACA,4BACA,8CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,8CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,kDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,qBACA,kBACA,iBACA,uBACA,qBACA,qBACA,iCACA,yCACA,sCAGA,kBACA,+BACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,mBACA,qBACA,qBACA,qBACA,mBACA,qBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBAGF,YACE,kBACA,6BACA,+CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,+CACA,+CACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,gDACA,+CACA,mDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,oDACA,mDACA,qBACA,kBACA,iBACA,uBACA,qBACA,qBACA,iCACA,yCACA,sCAGA,kBACA,+BACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,gBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,qBACA,mBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,qBACA,qBACA,qBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBAIF,UACE,0CACA,iBACA,oBAGF,cACE,aACA,8BACA,mBACA,SAGF,qBACE,gBACA,yBAGF,aACE,2BAGF,WACE,eACA,cACA,2BAGF,gBACE,gBACA,qBACA,2BAEA,sBACE,2BAKJ,kBACE,8CACA,yBAEA,mCAJF,kBAKI,aACA,uBACA,gBACA,oGACA,6CACA,uCAGF,oCAbF,kBAcI,gBACA,4GACA,oCACA,kCAKJ,UACE,gBACA,+BACA,MACA,6CACA,YACA,aAGF,eACE,YACA,aACA,8BACA,mBACA,SAGF,eACE,cACA,kBACA,2BACA,qBAEA,0CAEE,2BAIJ,cACE,aACA,sBACA,cAEA,oCALF,cAMI,oBAIJ,eACE,2BACA,qBACA,cACA,qBAEA,kDAEE,2BAIJ,uBACE,2BAEA,kEAEE,2BAIJ,kBACE,aACA,8BACA,SACA,oBAEA,oCANF,kBAOI,mBACA,mBACA,UAIJ,mBACE,aACA,mBACA,SAGE,kCADF,+BAEI,QAKF,kCADF,oCAEI,eACA,WACA,QAMN,kBACE,8CACA,yBAEA,oCAJF,kBAKI,aACA,8BACA,gBACA,oFACA,kCACA,kCAKJ,kBACE,8CACA,yBAEF,oBACE,6BACA,QACA,UACA,aAEF,uBACE,iBAIF,WACE,oBACA,kBAEA,oCAJF,WAKI,qBAGF,yBACE,aAIJ,YACE,eACA,WACA,YACA,WACA,sBAGF,SACE,eAGF,sBAEE,gBAGF,cACE,cACA,WACA,gBACA,mBAGE,gCACE,uBAKN,qBACE,uBACA,qBAGF,cACE,sBAIF,WACE,kBAEA,kCAHF,WAII,gBACA,wBACA,yBACA,OACA,eACA,+BACA,6CACA,WACA,YACA,UACA,eAIJ,oBACE,iBACA,oBAIA,kCADF,wCAEI,cAKF,kCADF,mBAEI,2CAIJ,gBACE,gBACA,gBAGF,mBACE,kBACA,gBAEA,iCACE,sCACA,yBAIJ,2BACE,WACA,kBACA,MACA,WACA,QACA,WACA,8BACA,sCACA,UACA,oEAGF,eACE,0BAEA,kCAHF,eAII,cAGF,mCAPF,eAQI,gBACA,yBACA,cACA,qBACA,mDACA,wBACA,+CAKF,kCADF,iBAEI,cACA,aAIJ,eACE,gBACA,MACA,aACA,WACA,eACA,SACA,aACA,gBACA,eACA,2BACA,+BACA,UAEA,mCAdF,eAeI,cAIJ,mBACE,eACA,iBACA,yBAGF,sCACE,wBAGF,gBACE,2BACA,gBACA,UACA,SACA,eAGF,uCACE,gCAGF,iCACE,SACA,gBACA,WACE,iDAIJ,mBACE,iBAGF,mCACE,kBACA,yBACA,4BAEA,2CACE,WACA,kBACA,OACA,SACA,UACA,wBACA,sCACA,oEAIJ,cACE,kBACA,gBACA,mBACA,gBAGF,yBACE,gCACA,YAGF,2BACE,mBAGF,iBACE,iBAGF,aACE,SACA,iBAGF,mBACE,2BACA,gBACA,qBAEA,qCACE,wBAIJ,gBACE,cACA,iBACA,cACA,sCACA,kBACA,qBACA,WACE,uGAIJ,wBACE,2BACA,qCAGF,sBACE,2BACA,sCACA,yBAEA,8BACE,8BACA,yBAIJ,wBACE,2BACA,qCAEA,gCACE,8BAIJ,oBACE,kBACA,UACA,QACA,kBACA,YACA,sCACA,gBACA,eACA,WACE,uGAGF,0BACE,sCACA,2BACA,yBAGF,4BACE,WACA,kBACA,WAGF,4CACE,aAIJ,qBACE,cACA,yBAGF,+DACE,wBAIF,aACE,UCp0BG,ODq0BH,mBACA,kBACA,kBACA,iBAIF,kBACE,kBACA,aACA,QACA,YACA,YACA,YACA,sCACA,mBAEA,0BACE,WACA,kBACA,cACA,YACA,WACA,QACA,SACA,+BACA,mBACA,oBAIJ,sBACE,YACA,gBACA,SACA,mBACA,eACA,0BACA,0BACA,UACA,WACE,uBAGF,4BACE,0BACA,yBAIJ,yDACE,SAGF,2DACE,2BACA,oBAGF,wCACE,UAGF,4CACE,2BACA,oBAGF,0DACE,UAGF,6DACE,2BACA,oBAIF,eACE,aACA,yBACA,QAEA,oCALF,eAMI,OACA,aAIJ,4CACE,aAGF,qBACE,aACA,yBACA,OACA,SACA,UAEA,mCAPF,qBAQI,8BACA,aACA,+BACA,eACA,SACA,QACA,SACA,QAGF,oCAlBF,qBAmBI,aACA,8BACA,oBAIJ,iBACE,kBACA,aACA,mBACA,uBACA,YACA,WACA,eACA,gBACA,YAEA,oCAXF,iBAYI,cAIJ,eACE,cACA,WACA,aACA,kBACA,sCACA,YACA,yBAGF,oBACE,2BAGF,2CACE,sCACA,aAGF,uBACE,0BAGF,8CACE,uCACA,aAIF,cACE,kBACA,kBACA,sCACA,2BACA,iBACA,sCACA,WACA,gBACA,YAEA,mCAXF,cAYI,YACA,2BAGF,oBACE,kCAEA,kCACE,2BAKN,gBACE,cACA,gBACA,uBACA,mBAGF,cACE,aACA,kBACA,UACA,QACA,2BAEA,mCAPF,cAQI,cAIJ,uBACE,kBACA,6CAGF,gBACE,4BACA,qCACA,kBACA,YACA,6CACA,WACA,eAEA,mCATF,gBAUI,6BAGF,sBACE,yCAGF,sBACE,aACA,yCAGF,6BACE,2BAIJ,oBACE,2BACA,WAGF,kBACE,qBACA,oCACA,gBACA,gBACA,qBACA,mDACA,SAGF,eACE,cACA,qBACA,2BACA,iBACA,sCACA,kBACA,WACA,eAEA,0CAEE,2BACA,qCAIJ,qBACE,SAGF,oBACE,eACA,2BACA,gBAIF,YACE,kBACA,2BACA,yBAEA,2CAEE,2BAEA,6EACE,mBACA,mBACA,2BACA,UAGF,mFACE,yBAKN,oBACE,aACA,8BACA,mBACA,WACA,kBACA,cACA,eACA,iBACA,eACA,SACA,gBACA,UAGF,oBACE,gBACA,6BAGF,iBACE,gBACA,kBACA,SACA,WACA,kBACA,oBACA,UACA,WACE,qDAGF,qCACA,sCACA,kBACA,SACA,gBACA,gBACA,gBAGF,iBACE,cACA,WACA,qBACA,2BACA,gBACA,eACA,kBACA,kBACA,gCAEA,uBACE,2BACA,sCAIJ,yBACE,2BAIF,iBACE,aACA,OACA,yBAEA,oCALF,iBAMI,UACA,uBAIJ,qBACE,2BACA,qBAEA,sDAEE,2BAGJ,WACE,cACA,kBACA,iBACA,sCACA,kBACA,qBACA,yBAGF,uBACE,qBACA,sBACA,qBACA,2BACA,yCACA,oBACA,iBACA,oBAIF,eACE,sBACA,gBACA,SACA,iBACA,cAEA,mCAPF,eAQI,kBAIJ,cACE,eAIA,+BACE,YACA,gBACA,kBAIJ,mBACE,2BACA,qBAEA,yBACE,2BAIJ,uCAEE,eACA,cACA,SAGF,oBACE,2BACA,gBAIF,YACE,mBAGF,mBACE,gBACA,yBACA,WAEA,oCALF,mBAMI,eACA,8CACA,cACA,qBACA,mDACA,yBAIJ,oBACE,iBACA,kBAEA,oCAJF,oBAKI,qBAMA,mCADF,iEAEI,mBACA,iCAKF,mCADF,kEAEI,4BAIJ,oEACE,yBAIJ,iBACE,gBACA,WACE,wDAGF,mCANF,iBAOI,kBACA,UAIJ,yBACE,YAIA,mCADF,oBAEI,gCACA,mBAIJ,kBACE,cACA,gBACA,MACA,eACA,gBACA,aACA,2BACA,UAEA,mCAVF,kBAWI,aACA,mBACA,+BAGF,oCAhBF,kBAiBI,2BACA,yBACA,gBACA,aACA,oBACA,aAIA,mCADF,wBAEI,4BAKN,oBACE,eACA,sBACA,gBACA,yBAEA,oCANF,oBAOI,cAIJ,iBACE,cACA,kBACA,2BACA,qBACA,gBACA,mBACA,kBACA,kBACA,eACA,gBACA,yDAEA,uCACE,2BACA,yBAGF,iDAEE,WACA,cACA,kBACA,SACA,OACA,wBACA,mBACA,uBACA,kCAGF,yBACE,kCAGF,wBACE,8DACA,sBACA,oBACA,wBAIJ,yBACE,iBAEA,iEAEE,WACA,WAKF,+HAEE,qBAKF,+HAEE,WACA,yBAEF,+DACE,6DACA,gCAKF,uEACE,gCAKF,oCADF,yBAEI,4BAIA,oCADF,gCAEI,8BAMJ,oCADF,yBAEI,4BAGF,iFAEE,6BAIJ,oBACE,gBACA,SACA,gBACA,mBACA,gBACA,+BAEA,mCARF,oBASI,cAIJ,gBACE,cACA,WACA,kBACA,2BACA,qBACA,iBACA,oBACA,eACA,gBAEA,sBACE,2BAKJ,cACE,qBACA,aACA,2DACA,SACA,mBAGF,mBACE,kBACA,gBACA,mBACA,qBACA,eACA,2BAEA,yBACE,2BAIJ,yBACE,kBAGF,yBACE,iBACA,mBAGF,mBACE,cACA,cAGF,oBACE,gBACA,eACA,2BAGF,mBACE,kBACA,QACA,2BACA,yBACA,YAGF,yBACE,OAEA,kDACE,gCAEA,oCAHF,kDAII,iCAKN,yBACE,QAEA,kDACE,+BAEA,oCAHF,kDAII,gCAMN,iBACE,2BACA,wBAEF,iBACE,kBACA,wBACA,qBACA,iBACA,iBACA,UACA,WAEA,wBACE,WACA,kBACA,MACA,QACA,WACA,YACA,kCACA,oCAGF,yBACE,WACA,kBACA,MACA,QACA,UACA,WACA,8BACA,wBAMF,+CACE,mBACA,UAIJ,uBACE,kBACA,UACA,sCACA,mBACA,yBACA,2BACA,qBAEA,6BACE,iCAGF,8BACE,YAGJ,gBACE,kBACA,yBACA,wBAGF,uBACE,wDACA,aACA,8BACA,mBACA,2BACA,4BACA,iBACA,sCACA,sCACA,2BAGF,6CACE,yBACA,0BACA,aACA,qBACA,mBAGF,2CACE,WAGF,yCACE,kBACA,UACA,QACA,UACA,WACE,2CAIF,gGAEE,UAIJ,yBACE,wDAEF,SACE,WACA,cACA,wBACA,sBACA,qBACA,mDAEF,aACE,wDACA,sCACA,kBACA,gBACA,eAGF,sCACE,kBAEF,cACE,sCACA,0BACA,2CACA,4BACA,+BACA,aACA,gBACA,uBACA,qBAGF,oBACE,gBAGF,mBACE,qBACA,sBACA,gBACA,iBAGF,mBACE,gCAEA,uCACE,oBAIJ,kBACE,+BAEA,sCACE,mBAIJ,wBACE,qCAEA,4CACE,yBAIJ,sBACE,mCAEA,0CACE,uBAIJ,sBACE,mCAEA,0CACE,uBAKJ,MACE,eACA,gBACA,yBACA,uBAGF,MACE,eACA,gBACA,yBACA,uBAGF,MACE,eACA,gBACA,uBACA,qBAGF,MACE,eACA,gBACA,0BACA,wBAGF,MACE,eACA,gBACA,yBACA,uBAGF,MACE,eACA,gBACA,yBACA,uBAEF,cACE,wDACA,eACA,iBACA,kBACA,kBACA,yBACA,wBACA,2BACA,qCACA,sCACA,gBACA,qBACA,mDAEF,OACE,eAEF,KACE,gBACA,uBACA,qBAEF,QACE,yBACA,wBAGF,YACE,kBACA,UAGF,yFAGE,qBACA,mBACA,yBACA,0BACA,qCAGF,eACE,aAGF,cACE,eACA,sCACA,2BACA,gBACA,mBACA,+BACA,2BACA,4BACA,iBAEA,oBACE,qCACA,2BAIJ,mBACE,wDAIF,SACE,eACA,OACA,SACA,WACA,+BACA,4BACA,UACA,kBACA,oBACA,WACE,0DAGF,aAEA,mCAhBF,SAiBI,QACA,SACA,YACA,uCACA,gBACA,oBAIJ,kBACE,UACA,mBACA,WACE,kCAEF,mBAEA,mCARF,kBASI,qCAKJ,WACE,sCACA,eACA,kBACA,gBACA,eACA,kBAIF,iBACE,aACA,QACA,eACA,eAEA,uBACE,2BAGJ,aACE,kBACA,YACA,gBACA,2BACA,sCACA,SACA,kBACA,eACA,aACA,WACE,+BAIJ,qBACE,UACA,qBAEA,eAGF,kBACE,eAGF,mBACE,2BACA,sCAGF,yCAEE,uBAEA,mFACE,UACA,mBAGF,6EACE,UACA,qBAGJ,WACE,kBACA,eACA,gBACA,SACA,UACA,aAEA,iBACE,2BAGF,kBACE,WACA,kBACA,YACA,OACA,WACA,WACA,2HAQA,0BAIJ,qCAEE,uBAEF,gBACE,qBACA,oBAEA,sBACE,4BAGF,uBACE,2BAIJ,yBACE,kBACA,wBACA,qBACA,iBACA,iBACA,UACA,WAEA,gCACE,WACA,kBACA,MACA,QACA,WACA,YACA,kCACA,oCAGF,iCACE,WACA,kBACA,MACA,QACA,UACA,WACA,8BACA,wBAGJ,MACE,gBACA,uBACA,qBAGF,wBAEE,0BACA,uBACA,qBAEF,MACE,uBACA,2BACA,uBACA,qBAEF,MACE,uBACA,2BACA,uBACA,qBAEF,SACE,eACA,gBACA,yBAEF,MACE,iBACA,6CACA,yBAEF,MACE,iBACA,0CACA,6CACA,yBAEF,SACE,sCAEF,qBACE,uBACA,qBAGF,cACE,eACA,cACA,WACA,gBACA,mBAGE,qCACE,uBAKN,iBACE,eACA,WACA,YACA,WACA,sBACA,sBAGF,mBACE,sBAEF,WACE,gBAEF,WACE,gBAEF,YACE,eACA,MACA,QACA,SACA,OACA,yBACA,UACA,kBACA,oBACA,0BACA,WACE,iDAGF,YAGF,qBACE,UACA,0BACA,mBACA,WACE,4BAEF,mBAEF,WACE,wDACA,UACA,kBACA,gCACA,kBACA,iBACA,kBACA,gBACA,0BACA,WACE,0BAGF,yBACE,YACA,OAGF,uBACE,YACA,QAIJ,oBACE,UACA","file":"styles.css"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robindoc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
"assets"
|
|
14
14
|
],
|
|
15
15
|
"keywords": [
|
|
16
|
-
"documentation"
|
|
16
|
+
"documentation",
|
|
17
|
+
"genearation",
|
|
18
|
+
"SSG",
|
|
19
|
+
"next.js",
|
|
20
|
+
"RSC",
|
|
21
|
+
"docs",
|
|
22
|
+
"markdown"
|
|
17
23
|
],
|
|
18
24
|
"repository": {
|
|
19
25
|
"type": "git",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-meta.d.ts","sourceRoot":"","sources":["../../../src/core/utils/get-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,KAAK,cAAc,GACb;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GAC7D;IAAE,GAAG,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,eAAO,MAAM,OAAO,SAAgB,cAAc,oCA+BjD,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import t from"gray-matter";import{lexer as r}from"marked";import{set as o}from"dot-prop";import{loadContent as e}from"./load-content.js";const n=async n=>{const{uri:i,provider:a,content:c}=n,{data:d}=i?await e(i,a):{data:c};if(!d)throw new Error("Robindoc: Please provide content or valid uri");const{content:p,data:s}=t(d),m=r(p),l=Object.entries(m.links).reduce(((t,r)=>{const[e,n]=r,i=e.startsWith("robin.")&&e.replace("robin.",""),a=n.title;return a&&i&&o(t,i,a),t}),s);if(!l.title){const t=m.find((t=>"heading"===t.type&&1===t.depth));t?.text&&(l.title=t.text)}return l};export{n as getMeta};
|
|
2
|
-
//# sourceMappingURL=get-meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-meta.js","sources":["../../../src/core/utils/get-meta.ts"],"sourcesContent":["import { type BaseProvider } from \"../providers/base\";\nimport matter from \"gray-matter\";\nimport { lexer, Tokens } from \"marked\";\nimport { set } from \"dot-prop\";\nimport { loadContent } from \"./load-content\";\n\ntype GetMetaOptions =\n | { uri: string; provider?: BaseProvider; content?: undefined }\n | { uri?: undefined; provider?: undefined; content: string };\n\nexport const getMeta = async (opts: GetMetaOptions) => {\n const { uri, provider, content } = opts;\n const { data } = uri ? await loadContent(uri, provider) : { data: content };\n\n if (!data) {\n throw new Error(\"Robindoc: Please provide content or valid uri\");\n }\n\n const { content: matterContent, data: matterData } = matter(data);\n const tree = lexer(matterContent);\n\n const robinData = Object.entries(tree.links).reduce<Record<string, string>>((acc, cur) => {\n const [key, value] = cur;\n const metaKey = key.startsWith(\"robin.\") && key.replace(\"robin.\", \"\");\n const content = value.title;\n\n if (content && metaKey) {\n set(acc, metaKey, content);\n }\n\n return acc;\n }, matterData);\n\n if (!robinData.title) {\n const pageHeading = tree.find((el) => el.type === \"heading\" && el.depth === 1) as Tokens.Heading | undefined;\n if (pageHeading?.text) {\n robinData.title = pageHeading.text;\n }\n }\n\n return robinData;\n};\n"],"names":["getMeta","async","opts","uri","provider","content","data","loadContent","Error","matterContent","matterData","matter","tree","lexer","robinData","Object","entries","links","reduce","acc","cur","key","value","metaKey","startsWith","replace","title","set","pageHeading","find","el","type","depth","text"],"mappings":"+IAUaA,EAAUC,MAAOC,IAC1B,MAAMC,IAAEA,EAAGC,SAAEA,EAAQC,QAAEA,GAAYH,GAC7BI,KAAEA,GAASH,QAAYI,EAAYJ,EAAKC,GAAY,CAAEE,KAAMD,GAElE,IAAKC,EACD,MAAM,IAAIE,MAAM,iDAGpB,MAAQH,QAASI,EAAeH,KAAMI,GAAeC,EAAOL,GACtDM,EAAOC,EAAMJ,GAEbK,EAAYC,OAAOC,QAAQJ,EAAKK,OAAOC,QAA+B,CAACC,EAAKC,KAC9E,MAAOC,EAAKC,GAASF,EACfG,EAAUF,EAAIG,WAAW,WAAaH,EAAII,QAAQ,SAAU,IAC5DpB,EAAUiB,EAAMI,MAMtB,OAJIrB,GAAWkB,GACXI,EAAIR,EAAKI,EAASlB,GAGfc,CAAG,GACXT,GAEH,IAAKI,EAAUY,MAAO,CAClB,MAAME,EAAchB,EAAKiB,MAAMC,GAAmB,YAAZA,EAAGC,MAAmC,IAAbD,EAAGE,QAC9DJ,GAAaK,OACbnB,EAAUY,MAAQE,EAAYK,KAErC,CAED,OAAOnB,CAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-data.d.ts","sourceRoot":"","sources":["../../../src/core/utils/git-data.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,MAAM;;;;;;;;;CAQxC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-data.js","sources":["../../../src/core/utils/git-data.ts"],"sourcesContent":["export const detectGitType = (uri: string) => {\n if (uri.match(/^https?:\\/\\/github.com/)) {\n return { name: \"GitHub\", key: \"github\" } as const;\n } else if (uri.match(/^https?:\\/\\/gitlab.com/)) {\n return { name: \"GitLab\", key: \"gitlab\" } as const;\n } else {\n return { name: \"Git\", key: \"git\" } as const;\n }\n};\n"],"names":["detectGitType","uri","match","name","key"],"mappings":"AAAa,MAAAA,EAAiBC,GACtBA,EAAIC,MAAM,0BACH,CAAEC,KAAM,SAAUC,IAAK,UACvBH,EAAIC,MAAM,0BACV,CAAEC,KAAM,SAAUC,IAAK,UAEvB,CAAED,KAAM,MAAOC,IAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-store.d.ts","sourceRoot":"","sources":["../../../src/core/utils/tabs-store.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAa,MAAM,OAAO,MAAM,SAKnD,CAAC;AAEF,eAAO,MAAM,SAAS,YAErB,CAAC;AAEF,eAAO,MAAM,MAAM,YAAa,MAAM,kBAIrC,CAAC;AAEF,eAAO,MAAM,OAAO,kBAInB,CAAC"}
|