robindoc 3.6.5 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/lib/client.d.ts +6 -0
  2. package/lib/client.d.ts.map +1 -1
  3. package/lib/components/blocks/anchor-heading/index.d.ts +1 -2
  4. package/lib/components/blocks/anchor-heading/index.d.ts.map +1 -1
  5. package/lib/components/blocks/anchor-heading/index.js.map +1 -1
  6. package/lib/components/elements/article/document.d.ts +6 -10
  7. package/lib/components/elements/article/document.d.ts.map +1 -1
  8. package/lib/components/elements/article/document.js +1 -1
  9. package/lib/components/elements/article/document.js.map +1 -1
  10. package/lib/components/elements/article/index.d.ts +13 -13
  11. package/lib/components/elements/article/index.d.ts.map +1 -1
  12. package/lib/components/elements/article/index.js +1 -1
  13. package/lib/components/elements/article/index.js.map +1 -1
  14. package/lib/components/elements/article/tags.d.ts +30 -0
  15. package/lib/components/elements/article/tags.d.ts.map +1 -0
  16. package/lib/components/elements/article/tags.js +2 -0
  17. package/lib/components/elements/article/tags.js.map +1 -0
  18. package/lib/components/elements/blog-container/index.d.ts +6 -0
  19. package/lib/components/elements/blog-container/index.d.ts.map +1 -1
  20. package/lib/components/elements/blog-container/index.js.map +1 -1
  21. package/lib/components/elements/docs-container/index.d.ts +6 -0
  22. package/lib/components/elements/docs-container/index.d.ts.map +1 -1
  23. package/lib/components/elements/docs-container/index.js.map +1 -1
  24. package/lib/components/elements/footer/index.d.ts +5 -0
  25. package/lib/components/elements/footer/index.d.ts.map +1 -1
  26. package/lib/components/elements/footer/index.js.map +1 -1
  27. package/lib/components/elements/header/index.d.ts +6 -0
  28. package/lib/components/elements/header/index.d.ts.map +1 -1
  29. package/lib/components/elements/header/index.js.map +1 -1
  30. package/lib/components/elements/keylink-to-content/index.d.ts +6 -0
  31. package/lib/components/elements/keylink-to-content/index.d.ts.map +1 -1
  32. package/lib/components/elements/keylink-to-content/index.js.map +1 -1
  33. package/lib/components/elements/keylink-to-navigation/index.d.ts +6 -0
  34. package/lib/components/elements/keylink-to-navigation/index.d.ts.map +1 -1
  35. package/lib/components/elements/keylink-to-navigation/index.js.map +1 -1
  36. package/lib/components/elements/page-container/index.d.ts +6 -0
  37. package/lib/components/elements/page-container/index.d.ts.map +1 -1
  38. package/lib/components/elements/page-container/index.js.map +1 -1
  39. package/lib/components/elements/robin-provider/index.d.ts +16 -0
  40. package/lib/components/elements/robin-provider/index.d.ts.map +1 -1
  41. package/lib/components/elements/robin-provider/index.js.map +1 -1
  42. package/lib/components/elements/sidebar/index.d.ts +6 -0
  43. package/lib/components/elements/sidebar/index.d.ts.map +1 -1
  44. package/lib/components/elements/sidebar/index.js.map +1 -1
  45. package/lib/components/ui/block/index.d.ts +1 -2
  46. package/lib/components/ui/block/index.d.ts.map +1 -1
  47. package/lib/components/ui/block/index.js.map +1 -1
  48. package/lib/components/ui/blockquote/index.d.ts +1 -2
  49. package/lib/components/ui/blockquote/index.d.ts.map +1 -1
  50. package/lib/components/ui/blockquote/index.js.map +1 -1
  51. package/lib/components/ui/code-span/index.d.ts +1 -2
  52. package/lib/components/ui/code-span/index.d.ts.map +1 -1
  53. package/lib/components/ui/code-span/index.js.map +1 -1
  54. package/lib/components/ui/del/index.d.ts +1 -2
  55. package/lib/components/ui/del/index.d.ts.map +1 -1
  56. package/lib/components/ui/del/index.js.map +1 -1
  57. package/lib/components/ui/em/index.d.ts +1 -2
  58. package/lib/components/ui/em/index.d.ts.map +1 -1
  59. package/lib/components/ui/em/index.js.map +1 -1
  60. package/lib/components/ui/heading/index.d.ts +1 -2
  61. package/lib/components/ui/heading/index.d.ts.map +1 -1
  62. package/lib/components/ui/heading/index.js.map +1 -1
  63. package/lib/components/ui/hr/index.d.ts +1 -2
  64. package/lib/components/ui/hr/index.d.ts.map +1 -1
  65. package/lib/components/ui/hr/index.js.map +1 -1
  66. package/lib/components/ui/list/list-item/index.d.ts +1 -2
  67. package/lib/components/ui/list/list-item/index.d.ts.map +1 -1
  68. package/lib/components/ui/list/list-item/index.js.map +1 -1
  69. package/lib/components/ui/list/unordered-list/index.d.ts +1 -2
  70. package/lib/components/ui/list/unordered-list/index.d.ts.map +1 -1
  71. package/lib/components/ui/list/unordered-list/index.js.map +1 -1
  72. package/lib/components/ui/paragraph/index.d.ts +1 -2
  73. package/lib/components/ui/paragraph/index.d.ts.map +1 -1
  74. package/lib/components/ui/paragraph/index.js.map +1 -1
  75. package/lib/components/ui/strong/index.d.ts +1 -2
  76. package/lib/components/ui/strong/index.d.ts.map +1 -1
  77. package/lib/components/ui/strong/index.js.map +1 -1
  78. package/lib/components/ui/table/table/index.d.ts +1 -2
  79. package/lib/components/ui/table/table/index.d.ts.map +1 -1
  80. package/lib/components/ui/table/table/index.js.map +1 -1
  81. package/lib/components/ui/table/tbody/index.d.ts +1 -2
  82. package/lib/components/ui/table/tbody/index.d.ts.map +1 -1
  83. package/lib/components/ui/table/tbody/index.js.map +1 -1
  84. package/lib/components/ui/table/td/index.d.ts +1 -2
  85. package/lib/components/ui/table/td/index.d.ts.map +1 -1
  86. package/lib/components/ui/table/td/index.js.map +1 -1
  87. package/lib/components/ui/table/th/index.d.ts +1 -2
  88. package/lib/components/ui/table/th/index.d.ts.map +1 -1
  89. package/lib/components/ui/table/th/index.js.map +1 -1
  90. package/lib/components/ui/table/thead/index.d.ts +1 -3
  91. package/lib/components/ui/table/thead/index.d.ts.map +1 -1
  92. package/lib/components/ui/table/thead/index.js.map +1 -1
  93. package/lib/components/ui/table/tr/index.d.ts +2 -2
  94. package/lib/components/ui/table/tr/index.d.ts.map +1 -1
  95. package/lib/components/ui/table/tr/index.js.map +1 -1
  96. package/lib/components/ui/task-list/task-list-item/index.d.ts +1 -2
  97. package/lib/components/ui/task-list/task-list-item/index.d.ts.map +1 -1
  98. package/lib/components/ui/task-list/task-list-item/index.js.map +1 -1
  99. package/lib/components/ui/task-list/task-unordered-list/index.d.ts +1 -2
  100. package/lib/components/ui/task-list/task-unordered-list/index.d.ts.map +1 -1
  101. package/lib/components/ui/task-list/task-unordered-list/index.js.map +1 -1
  102. package/lib/core/providers/file-system.js +1 -1
  103. package/lib/core/providers/file-system.js.map +1 -1
  104. package/lib/core/types/initialize.d.ts +12 -0
  105. package/lib/core/types/initialize.d.ts.map +1 -1
  106. package/lib/core/utils/initialize-robindoc.d.ts +14 -0
  107. package/lib/core/utils/initialize-robindoc.d.ts.map +1 -1
  108. package/lib/core/utils/initialize-robindoc.js.map +1 -1
  109. package/lib/styles.css +351 -323
  110. package/package.json +2 -2
package/lib/client.d.ts CHANGED
@@ -1,2 +1,8 @@
1
+ /**
2
+ * Navigation context for custom navigation implementations.
3
+ * Provides access to pathname hook and Link component.
4
+ *
5
+ * @see {@link https://robindoc.com/docs/customization/elements Elements customization}
6
+ */
1
7
  export { NavigationContext } from "./components/stores/navigation/contexts";
2
8
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import React from "react";
2
2
  import "./anchor-heading.scss";
3
- interface AnchorHeadingProps extends React.PropsWithChildren {
3
+ export interface AnchorHeadingProps extends React.PropsWithChildren {
4
4
  id: string;
5
5
  component: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
6
6
  }
7
7
  export declare const AnchorHeading: React.FC<AnchorHeadingProps>;
8
- export {};
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/anchor-heading/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B,UAAU,kBAAmB,SAAQ,KAAK,CAAC,iBAAiB;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACtD;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAStD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/blocks/anchor-heading/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,iBAAiB;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACtD;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAStD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/blocks/anchor-heading/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { useHeadingRegister } from \"@src/components/stores/contents/use-heading-register\";\nimport { Heading } from \"@src/components/ui/heading\";\n\nimport \"./anchor-heading.scss\";\n\ninterface AnchorHeadingProps extends React.PropsWithChildren {\n id: string;\n component: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n}\n\nexport const AnchorHeading: React.FC<AnchorHeadingProps> = ({ component: Component, id, children }) => {\n const register = useHeadingRegister();\n\n return (\n <Heading component={Component} id={id} className=\"r-anchor-heading\" ref={register}>\n {children}&nbsp;\n <a href={`#${id}`} className=\"r-anchor-heading-link\" />\n </Heading>\n );\n};\n"],"names":["AnchorHeading","component","Component","id","children","register","useHeadingRegister","React","createElement","Heading","className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["\"use client\";\n\nimport React from \"react\";\nimport { useHeadingRegister } from \"@src/components/stores/contents/use-heading-register\";\nimport { Heading } from \"@src/components/ui/heading\";\n\nimport \"./anchor-heading.scss\";\n\nexport interface AnchorHeadingProps extends React.PropsWithChildren {\n id: string;\n component: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n}\n\nexport const AnchorHeading: React.FC<AnchorHeadingProps> = ({ component: Component, id, children }) => {\n const register = useHeadingRegister();\n\n return (\n <Heading component={Component} id={id} className=\"r-anchor-heading\" ref={register}>\n {children}&nbsp;\n <a href={`#${id}`} className=\"r-anchor-heading-link\" />\n </Heading>\n );\n};\n"],"names":["AnchorHeading","component","Component","id","children","register","useHeadingRegister","React","createElement","Heading","className","ref","href"],"mappings":";4JAaO,MAAMA,CAAAA,CAA8C,CAAA,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAWC,CAAAA,CAAWC,KAAIC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACpF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,EAAWC,CAAAA,CAAAA,CAAAA,CAEjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACIC,EAAAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAACC,CAAAA,EAAQR,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAWC,EAAWC,CAAAA,CAAAA,CAAIA,CAAAA,CAAIO,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmBC,IAAKN,CAAAA,CAAAA,CACpED,CAAAA,KACDG,CAAAA,CAAAC,cAAA,CAAA,CAAA,CAAA,CAAA,CAAGI,KAAM,CAAA,CAAA,CAAA,CAAIT,CAAAA,CAAAA,CAAAA,CAAMO,UAAU,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1,15 +1,11 @@
1
- import { type BaseProvider } from "../../../core/providers/base";
2
- import { type Components } from "../../../core/types/content";
3
1
  import { type TokensList } from "marked";
4
2
  import React from "react";
3
+ import { type BaseProvider } from "../../../core/providers/base";
4
+ import { type Components } from "../../../core/types/content";
5
5
  import { type PagesType } from "./types";
6
6
  import { type AnchorData } from "./utils";
7
- interface DocumentJSXProps extends Omit<ContentProps, "tokens" | "headings"> {
8
- raw: string;
9
- pages?: PagesType;
10
- }
11
- export declare const DocumentJSX: React.FC<DocumentJSXProps>;
12
- export type ContentProps = {
7
+ import { DEFAULT_TAGS } from "./tags";
8
+ export type DocumentProps = {
13
9
  pathname: string;
14
10
  components?: Components;
15
11
  config?: {
@@ -21,7 +17,7 @@ export type ContentProps = {
21
17
  headings: AnchorData[];
22
18
  subtree?: boolean;
23
19
  pages?: PagesType;
20
+ tags?: Partial<typeof DEFAULT_TAGS>;
24
21
  };
25
- export declare const Document: React.FC<ContentProps>;
26
- export {};
22
+ export declare const Document: React.FC<DocumentProps>;
27
23
  //# sourceMappingURL=document.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/article/document.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,YAAY,EAAE,qCAAiC;AAC7D,OAAO,EAAE,KAAK,U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AAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAQH,KAAK,UAAU,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA+DtC,MAAM,MAAM,aAAa,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,YAAY,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmU5C,CAAC"}
@@ -1,2 +1,2 @@
1
- import{AnchorHeading as e}from"../../blocks/anchor-heading/index.js";import{CodeSection as t}from"../../blocks/code-section/index.js";import{NavContentLink as n}from"../../blocks/nav-content-link/index.js";import{Block as r}from"../../ui/block/index.js";import{Blockquote as o}from"../../ui/blockquote/index.js";import{CodeBlock as a}from"../../ui/code-block/index.js";import{CodeSpan as s}from"../../ui/code-span/index.js";import{Del as i}from"../../ui/del/index.js";import{Em as l}from"../../ui/em/index.js";import{Heading as m}from"../../ui/heading/index.js";import{Hr as c}from"../../ui/hr/index.js";import{Img as u}from"../../ui/img/index.js";import{ListItem as p}from"../../ui/list/list-item/index.js";import{OrderedList as d}from"../../ui/list/ordered-list/index.js";import{UnorderedList as k}from"../../ui/list/unordered-list/index.js";import{Paragraph as f}from"../../ui/paragraph/index.js";import{Strong as h}from"../../ui/strong/index.js";import{Table as E}from"../../ui/table/table/index.js";import{Tbody as x}from"../../ui/table/tbody/index.js";import{Td as y}from"../../ui/table/td/index.js";import{Th as b}from"../../ui/table/th/index.js";import{Thead as g}from"../../ui/table/thead/index.js";import{Tr as w}from"../../ui/table/tr/index.js";import{Tabs as j}from"../../ui/tabs/index.js";import{TaskListItem as $}from"../../ui/task-list/task-list-item/index.js";import{TaskOrderedList as v}from"../../ui/task-list/task-ordered-list/index.js";import{TaskUnorderedList as A}from"../../ui/task-list/task-unordered-list/index.js";import N,{Text as T,domToReact as C,attributesToProps as U}from"html-react-parser";import D from"react";import{isNewCodeToken as F,validateComponentName as P,parseCodeLang as S,formatId as W,parseBlockqoute as q,formatLinkHref as z,parseMarkdown as I}from"./utils.js";const K=({raw:e,components:t,...r})=>{const o={replace(e){if(e instanceof T&&e.data){const{headings:n,tokens:o}=I(e.data);return D.createElement(O,{headings:n,tokens:o,components:t,subtree:!0,...r})}if(!("name"in e))return D.createElement(D.Fragment,null);if("a"===e.name&&"attribs"in e){const{href:t,external:a}=z(e.attribs.href,r.pathname,r.pages);return""===t?C(e.children,o):D.createElement(n,{...U(e.attribs),href:t,external:a},C(e.children,o))}if(!P(e.name))return e;if(!t||!(e.name in t))return console.warn(`Unknown component: "${e.name}"`),D.createElement(D.Fragment,null);const a="attribs"in e?U(e.attribs):{},s=t[e.name],i="children"in e?e.children:null;return D.createElement(s,{...a},i?C(i,o):null)},htmlparser2:{lowerCaseTags:!1,lowerCaseAttributeNames:!1}};return N(e,o)},O=({pathname:N,components:T,uri:C,targetProvider:U,tokens:I,headings:O,config:R={},subtree:Z,pages:B})=>{const{publicDirs:G}=R;let H=null,J={};const L=[],M=({token:I})=>{if(!I)return null;if(F(I,J)){const e=J;J={};const t=Object.keys(e).sort().join("-"),n=L.includes(t);return n||L.push(t),D.createElement(D.Fragment,null,D.createElement(j,{type:"code",tabsData:e,insertStyles:!n,blockKey:t}),D.createElement(M,{token:I}))}if(H){if(Array.isArray(I)||"html"!==I.type||"\x3c!---/robin--\x3e"!==I.raw.trim())return"dummy"===H.type||(Array.isArray(I)?H.childTokens.push(...I):H.childTokens.push(I)),null;{if("dummy"===H.type)return H=null,null;const{componentName:e,childTokens:t,props:n}=H,r=T[e];return H=null,D.createElement(r,{...n},D.createElement(M,{token:t}))}}if(Array.isArray(I))return I.map((e,t)=>D.createElement(M,{token:e,key:e.raw+t}));switch(I.type){case"heading":const j=`h${I.depth}`,F=O.find(e=>e.token===I);return F?.id?D.createElement(e,{component:j,id:F.id},I.tokens?D.createElement(M,{token:I.tokens}):I.raw):D.createElement(m,{component:j,id:1===I.depth?"main-content":void 0},I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"table":return D.createElement(r,null,D.createElement(E,null,D.createElement(g,null,D.createElement(w,null,I.header.map((e,t)=>D.createElement(b,{key:e.text+t,align:e.align},e.tokens?D.createElement(M,{token:e.tokens}):e.text)))),D.createElement(x,null,I.rows.map((e,t)=>D.createElement(w,{key:t},e.map((e,t)=>D.createElement(y,{key:e.text+t,align:e.align},e.tokens?D.createElement(M,{token:e.tokens}):e.text)))))));case"link":const{href:L,external:Q}=z(I.href,N,B);return""===L?I.tokens?D.createElement(M,{token:I.tokens}):I.raw:D.createElement(n,{href:L,external:Q},I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"space":case"def":case"br":case"checkbox":return null;case"hr":return D.createElement(c,null);case"image":return D.createElement(u,{src:I.href,publicDirs:G,provider:U,uri:C,alt:I.title||""});case"paragraph":return Z?I.tokens?D.createElement(M,{token:I.tokens}):I.raw:I.tokens?.some(e=>"html"===e.type)&&I.tokens?.every(e=>"html"===e.type||"text"===e.type||"\n"===e.raw)?D.createElement(M,{token:{...I,type:"html"}}):D.createElement(f,null,I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"strong":return D.createElement(h,null,I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"del":return D.createElement(i,null,I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"em":return D.createElement(l,null,I.tokens?D.createElement(M,{token:I.tokens}):I.raw);case"blockquote":const{token:V,type:X}=q(I);return D.createElement(o,{type:X},V.tokens?D.createElement(M,{token:V.tokens}):V.raw);case"codespan":const Y=I.raw.replace(/^`|`$/g,""),_=Y.match(/(.+){:([a-zA-Z]+)}$/);if(_){const[,e,t]=_;return D.createElement(a,{code:e,lang:t,inline:!0})}return D.createElement(s,{code:Y});case"code":const{lang:ee,configuration:te}=S(I.lang);if(te.switcher&&ee){const e="string"==typeof te.tab?W(te.tab):ee;if(J[e]={tabName:(te.tab||ee).toString(),element:D.createElement(t,{lang:ee,code:I.text,...te})},"string"==typeof te.clone){te.clone.split(",").forEach(e=>{const[n,r,o]=e.split("|"),a="string"==typeof r?W(r):n;J[a]={tabName:(r||n).toString(),element:D.createElement(t,{lang:n,code:I.text,...te,filename:o||te.filename})}})}return null}return D.createElement(t,{lang:ee,code:I.text,...te});case"escape":return I.text;case"list":if(I.items.every(e=>e.task)){const e=I.ordered?v:A;return D.createElement(e,{start:I.start},I.items.map((e,t)=>D.createElement($,{key:e.raw+t,defaultChecked:e.checked},e.tokens?D.createElement(M,{token:e.tokens}):e.raw)))}const ne=I.ordered?d:k;return D.createElement(ne,{start:I.start},I.items.map((e,t)=>D.createElement(p,{key:e.raw+t},e.tokens?D.createElement(M,{token:e.tokens}):e.raw)));case"html":const re=I.raw.trim();if(re.startsWith("\x3c!---robin")&&re.endsWith("--\x3e")){const e=re.endsWith("/--\x3e"),t=re.match(/<!---robin ([\w]+)/)?.[1];if(!t)return e||(H={type:"dummy"}),null;if(!P(t))return console.warn(`"${t}" is using incorrect casing. Use PascalCase for Robin components`),e||(H={type:"dummy"}),null;if(!T||!(t in T))return console.warn(`Unknown component: "${t}"`),e||(H={type:"dummy"}),null;const n=re.split(/\r?\n/).slice(1,-1).reduce((e,t)=>{const[n,r,o]=t.match(/^([\w]+)(?:="(.+)")?$/)||[];return n?(e[r]=o??!0,e):(console.warn(`Invalid component attribute: "${t}"`),e)},{});if(e){const e=T[t];return D.createElement(e,{...n})}return H={props:n,componentName:t,childTokens:[],type:"base"},null}return D.createElement(K,{raw:I.raw,components:T,config:R,targetProvider:U,pathname:N,uri:C,pages:B});case"text":return"tokens"in I?D.createElement(M,{token:I.tokens||[]}):I.raw;default:return!I.type&&"raw"in I?I.raw:(console.warn(`Unknown token ${I.type}`,I),null)}};return I.push({type:"text",raw:""}),D.createElement(M,{token:I})};export{O as Document,K as DocumentJSX};
1
+ import e from"react";import t,{Text as n,domToReact as r,attributesToProps as a}from"html-react-parser";import{isNewCodeToken as o,validateComponentName as l,parseCodeLang as s,formatId as c,parseBlockqoute as m,formatLinkHref as i,parseMarkdown as u}from"./utils.js";import{DEFAULT_TAGS as k}from"./tags.js";const p=({raw:o,components:s,tags:c,...m})=>{const k={replace(t){if(t instanceof n&&t.data){const{headings:n,tokens:r}=u(t.data);return e.createElement(d,{headings:n,tokens:r,components:s,tags:c,subtree:!0,...m})}if(!("name"in t))return e.createElement(e.Fragment,null);if("a"===t.name&&"attribs"in t){const{href:n,external:o}=i(t.attribs.href,m.pathname,m.pages);return""===n?r(t.children,k):e.createElement(c.ContentLink,{...a(t.attribs),href:n,external:o},r(t.children,k))}if(!l(t.name))return t;if(!s||!(t.name in s))return console.warn(`Unknown component: "${t.name}"`),e.createElement(e.Fragment,null);const o="attribs"in t?a(t.attribs):{},p=s[t.name],E="children"in t?t.children:null;return e.createElement(p,{...o},E?r(E,k):null)},htmlparser2:{lowerCaseTags:!1,lowerCaseAttributeNames:!1}};return t(o,k)},d=({pathname:t,components:n,tags:r={},uri:a,targetProvider:u,tokens:d,headings:E,config:h={},subtree:g,pages:f})=>{const{publicDirs:y}=h,w={...k,...r};let b=null,x={};const T=[],C=({token:r})=>{if(!r)return null;if(o(r,x)){const t=x;x={};const n=Object.keys(t).sort().join("-"),a=T.includes(n);return a||T.push(n),e.createElement(e.Fragment,null,e.createElement(w.Tabs,{type:"code",tabsData:t,insertStyles:!a,blockKey:n}),e.createElement(C,{token:r}))}if(b){if(Array.isArray(r)||"html"!==r.type||"\x3c!---/robin--\x3e"!==r.raw.trim())return"dummy"===b.type||(Array.isArray(r)?b.childTokens.push(...r):b.childTokens.push(r)),null;{if("dummy"===b.type)return b=null,null;const{componentName:t,childTokens:r,props:a}=b,o=n[t];return b=null,e.createElement(o,{...a},e.createElement(C,{token:r}))}}if(Array.isArray(r))return r.map((t,n)=>e.createElement(C,{token:t,key:t.raw+n}));switch(r.type){case"heading":const o=`h${r.depth}`,k=E.find(e=>e.token===r);return k?.id?e.createElement(w.AnchorHeading,{component:o,id:k.id},r.tokens?e.createElement(C,{token:r.tokens}):r.raw):e.createElement(w.Heading,{component:o,id:1===r.depth?"main-content":void 0},r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"table":return e.createElement(w.Block,null,e.createElement(w.Table,null,e.createElement(w.Thead,null,e.createElement(w.Tr,null,r.header.map((t,n)=>e.createElement(w.Th,{key:t.text+n,align:t.align},t.tokens?e.createElement(C,{token:t.tokens}):t.text)))),e.createElement(w.Tbody,null,r.rows.map((t,n)=>e.createElement(w.Tr,{key:n},t.map((t,n)=>e.createElement(w.Td,{key:t.text+n,align:t.align},t.tokens?e.createElement(C,{token:t.tokens}):t.text)))))));case"link":const{href:d,external:T}=i(r.href,t,f);return""===d?r.tokens?e.createElement(C,{token:r.tokens}):r.raw:e.createElement(w.ContentLink,{href:d,external:T},r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"hr":return e.createElement(w.Hr,null);case"image":return e.createElement(w.Img,{src:r.href,publicDirs:y,provider:u,uri:a,alt:r.title||""});case"paragraph":return g?r.tokens?e.createElement(C,{token:r.tokens}):r.raw:r.tokens?.some(e=>"html"===e.type)&&r.tokens?.every(e=>"html"===e.type||"text"===e.type||"\n"===e.raw)?e.createElement(C,{token:{...r,type:"html"}}):e.createElement(w.Paragraph,null,r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"strong":return e.createElement(w.Strong,null,r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"del":return e.createElement(w.Del,null,r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"em":return e.createElement(w.Em,null,r.tokens?e.createElement(C,{token:r.tokens}):r.raw);case"blockquote":const{token:A,type:$}=m(r);return e.createElement(w.Blockquote,{type:$},A.tokens?e.createElement(C,{token:A.tokens}):A.raw);case"codespan":const L=r.raw.replace(/^`|`$/g,""),S=L.match(/(.+){:([a-zA-Z]+)}$/);if(S){const[,t,n]=S;return e.createElement(w.CodeBlock,{code:t,lang:n,inline:!0})}return e.createElement(w.CodeSpan,{code:L});case"code":const{lang:v,configuration:U}=s(r.lang);if(U.switcher&&v){const t="string"==typeof U.tab?c(U.tab):v;if(x[t]={tabName:(U.tab||v).toString(),element:e.createElement(w.CodeSection,{lang:v,code:r.text,...U})},"string"==typeof U.clone){U.clone.split(",").forEach(t=>{const[n,a,o]=t.split("|"),l="string"==typeof a?c(a):n;x[l]={tabName:(a||n).toString(),element:e.createElement(w.CodeSection,{lang:n,code:r.text,...U,filename:o||U.filename})}})}return null}return e.createElement(w.CodeSection,{lang:v,code:r.text,...U});case"escape":return r.text;case"list":if(r.items.every(e=>e.task)){const t=r.ordered?w.TaskOrderedList:w.TaskUnorderedList;return e.createElement(t,{start:r.start},r.items.map((t,n)=>e.createElement(w.TaskListItem,{key:t.raw+n,defaultChecked:t.checked},t.tokens?e.createElement(C,{token:t.tokens}):t.raw)))}const N=r.ordered?w.OrderedList:w.UnorderedList;return e.createElement(N,{start:r.start},r.items.map((t,n)=>e.createElement(w.ListItem,{key:t.raw+n},t.tokens?e.createElement(C,{token:t.tokens}):t.raw)));case"html":const j=r.raw.trim();if(j.startsWith("\x3c!---robin")&&j.endsWith("--\x3e")){const t=j.endsWith("/--\x3e"),r=j.match(/<!---robin ([\w]+)/)?.[1];if(!r)return t||(b={type:"dummy"}),null;if(!l(r))return console.warn(`"${r}" is using incorrect casing. Use PascalCase for Robin components`),t||(b={type:"dummy"}),null;if(!n||!(r in n))return console.warn(`Unknown component: "${r}"`),t||(b={type:"dummy"}),null;const a=j.split(/\r?\n/).slice(1,-1).reduce((e,t)=>{const[n,r,a]=t.match(/^([\w]+)(?:="(.+)")?$/)||[];return n?(e[r]=a??!0,e):(console.warn(`Invalid component attribute: "${t}"`),e)},{});if(t){const t=n[r];return e.createElement(t,{...a})}return b={props:a,componentName:r,childTokens:[],type:"base"},null}return e.createElement(p,{raw:r.raw,components:n,config:h,targetProvider:u,pathname:t,uri:a,pages:f,tags:w});case"text":return"tokens"in r?e.createElement(C,{token:r.tokens||[]}):r.raw;case"space":case"def":case"br":case"checkbox":return null;default:return!r.type&&"raw"in r?r.raw:(console.warn(`Unknown token ${r.type}`,r),null)}};return d.push({type:"text",raw:""}),e.createElement(C,{token:d})};export{d as Document};
2
2
  //# sourceMappingURL=document.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sources":["../../../../src/components/elements/article/document.tsx"],"sourcesContent":["import { AnchorHeading } from \"@src/components/blocks/anchor-heading\";\nimport { CodeSection } from \"@src/components/blocks/code-section\";\nimport { NavContentLink } from \"@src/components/blocks/nav-content-link\";\nimport { Block } from \"@src/components/ui/block\";\nimport { Blockquote } from \"@src/components/ui/blockquote\";\nimport { CodeBlock } from \"@src/components/ui/code-block\";\nimport { CodeSpan } from \"@src/components/ui/code-span\";\nimport { Del } from \"@src/components/ui/del\";\nimport { Em } from \"@src/components/ui/em\";\nimport { Heading } from \"@src/components/ui/heading\";\nimport { Hr } from \"@src/components/ui/hr\";\nimport { Img } from \"@src/components/ui/img\";\nimport { ListItem, OrderedList, UnorderedList } from \"@src/components/ui/list\";\nimport { Paragraph } from \"@src/components/ui/paragraph\";\nimport { Strong } from \"@src/components/ui/strong\";\nimport { Table, Tbody, Td, Th, Thead, Tr } from \"@src/components/ui/table\";\nimport { Tabs } from \"@src/components/ui/tabs\";\nimport { TaskListItem, TaskOrderedList, TaskUnorderedList } from \"@src/components/ui/task-list\";\nimport { type BaseProvider } from \"@src/core/providers/base\";\nimport { type Components, type RobinProps } from \"@src/core/types/content\";\nimport parse, { attributesToProps, DOMNode, domToReact, HTMLReactParserOptions, Text } from \"html-react-parser\";\nimport { type Token, type Tokens, type TokensList } from \"marked\";\nimport React from \"react\";\nimport { type BundledLanguage } from \"shiki\";\n\nimport { type PagesType } from \"./types\";\nimport {\n formatId,\n formatLinkHref,\n isNewCodeToken,\n parseBlockqoute,\n parseCodeLang,\n parseMarkdown,\n validateComponentName,\n type AnchorData,\n} from \"./utils\";\n\ninterface DocumentJSXProps extends Omit<ContentProps, \"tokens\" | \"headings\"> {\n raw: string;\n pages?: PagesType;\n}\n\nexport const DocumentJSX: React.FC<DocumentJSXProps> = ({ raw, components, ...baseProps }) => {\n const parseOptions: HTMLReactParserOptions = {\n replace(domNode) {\n if (domNode instanceof Text && domNode.data) {\n const { headings, tokens } = parseMarkdown(domNode.data);\n\n return <Document headings={headings} tokens={tokens} components={components} subtree {...baseProps} />;\n }\n\n if (!(\"name\" in domNode)) return <></>;\n\n if (domNode.name === \"a\" && \"attribs\" in domNode) {\n const { href, external } = formatLinkHref(domNode.attribs.href, baseProps.pathname, baseProps.pages);\n\n if (href === \"\") return domToReact(domNode.children as DOMNode[], parseOptions);\n\n return (\n <NavContentLink {...attributesToProps(domNode.attribs)} href={href} external={external}>\n {domToReact(domNode.children as DOMNode[], parseOptions)}\n </NavContentLink>\n );\n }\n\n if (!validateComponentName(domNode.name)) return domNode;\n\n if (!components || !(domNode.name in components)) {\n console.warn(`Unknown component: \"${domNode.name}\"`);\n return <></>;\n }\n\n const props = \"attribs\" in domNode ? attributesToProps(domNode.attribs) : {};\n const Component = components[domNode.name];\n const children = \"children\" in domNode ? domNode.children : null;\n\n return (\n <Component {...props}>{children ? domToReact(children as DOMNode[], parseOptions) : null}</Component>\n );\n },\n htmlparser2: {\n lowerCaseTags: false,\n lowerCaseAttributeNames: false,\n },\n };\n return parse(raw, parseOptions);\n};\n\nexport type ContentProps = {\n pathname: string;\n components?: Components;\n config?: {\n publicDirs?: string[];\n };\n uri?: string;\n targetProvider?: BaseProvider | null;\n tokens: TokensList;\n headings: AnchorData[];\n subtree?: boolean;\n pages?: PagesType;\n};\n\nexport const Document: React.FC<ContentProps> = ({\n pathname,\n components,\n uri,\n targetProvider,\n tokens,\n headings,\n config = {},\n subtree,\n pages,\n}) => {\n const { publicDirs } = config;\n\n let robin:\n | null\n | { props: RobinProps; childTokens: Token[]; componentName: string; type: \"base\" }\n | { type: \"dummy\" } = null;\n let codeQueue: { [lang: string]: { element: React.ReactNode; tabName: string } } = {};\n const insertedCodeKeys: string[] = [];\n const DocumentToken: React.FC<{ token: Token | Token[] }> = ({ token }) => {\n if (!token) return null;\n\n if (isNewCodeToken(token, codeQueue)) {\n const tabsData = codeQueue;\n codeQueue = {};\n const tabsKey = Object.keys(tabsData).sort().join(\"-\");\n const isInsertedKey = insertedCodeKeys.includes(tabsKey);\n if (!isInsertedKey) insertedCodeKeys.push(tabsKey);\n\n return (\n <>\n <Tabs type=\"code\" tabsData={tabsData} insertStyles={!isInsertedKey} blockKey={tabsKey} />\n <DocumentToken token={token} />\n </>\n );\n }\n\n if (robin) {\n if (!Array.isArray(token) && token.type === \"html\" && token.raw.trim() === \"<!---/robin-->\") {\n if (robin.type === \"dummy\") {\n robin = null;\n return null;\n }\n\n const { componentName, childTokens, props } = robin;\n const RobinComponent = components![componentName];\n robin = null;\n return (\n <RobinComponent {...props}>\n <DocumentToken token={childTokens} />\n </RobinComponent>\n );\n } else {\n if (robin.type === \"dummy\") return null;\n\n if (Array.isArray(token)) {\n robin.childTokens.push(...token);\n } else {\n robin.childTokens.push(token);\n }\n return null;\n }\n }\n\n if (Array.isArray(token)) {\n return token.map((t, index) => <DocumentToken token={t} key={(t as Tokens.Text).raw + index} />);\n }\n\n switch (token.type) {\n case \"heading\":\n const Component = `h${token.depth}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n const predefinedData = headings.find((heading) => heading.token === token);\n if (predefinedData?.id) {\n return (\n <AnchorHeading component={Component} id={predefinedData.id}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </AnchorHeading>\n );\n } else {\n return (\n <Heading component={Component} id={token.depth === 1 ? \"main-content\" : undefined}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </Heading>\n );\n }\n case \"table\":\n return (\n <Block>\n <Table>\n <Thead>\n <Tr>\n {token.header.map((t: Tokens.TableCell, index: number) => (\n <Th key={t.text + index} align={t.align}>\n {t.tokens ? <DocumentToken token={t.tokens} /> : t.text}\n </Th>\n ))}\n </Tr>\n </Thead>\n <Tbody>\n {token.rows.map((row: Tokens.TableCell[], rowIndex: number) => (\n <Tr key={rowIndex}>\n {row.map((elem, elemIndex) => (\n <Td key={elem.text + elemIndex} align={elem.align}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.text}\n </Td>\n ))}\n </Tr>\n ))}\n </Tbody>\n </Table>\n </Block>\n );\n case \"link\":\n const { href, external } = formatLinkHref(token.href, pathname, pages);\n\n if (href === \"\") return token.tokens ? <DocumentToken token={token.tokens} /> : token.raw;\n\n return (\n <NavContentLink href={href} external={external}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </NavContentLink>\n );\n case \"space\":\n return null;\n case \"hr\":\n return <Hr />;\n case \"image\":\n return (\n <Img\n src={token.href}\n publicDirs={publicDirs}\n provider={targetProvider}\n uri={uri}\n alt={token.title || \"\"}\n />\n );\n case \"paragraph\":\n if (subtree) return token.tokens ? <DocumentToken token={token.tokens} /> : token.raw;\n if (\n token.tokens?.some((t) => t.type === \"html\") &&\n token.tokens?.every((t) => t.type === \"html\" || t.type === \"text\" || t.raw === \"\\n\")\n ) {\n return <DocumentToken token={{ ...token, type: \"html\" }} />;\n }\n\n return <Paragraph>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Paragraph>;\n case \"strong\":\n return <Strong>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Strong>;\n case \"del\":\n return <Del>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Del>;\n case \"em\":\n return <Em>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Em>;\n case \"blockquote\":\n const { token: blockquoteToken, type } = parseBlockqoute(token);\n\n return (\n <Blockquote type={type}>\n {blockquoteToken.tokens ? (\n <DocumentToken token={blockquoteToken.tokens} />\n ) : (\n blockquoteToken.raw\n )}\n </Blockquote>\n );\n case \"codespan\":\n const inlineCode = token.raw.replace(/^`|`$/g, \"\");\n const hightlightMatch = inlineCode.match(/(.+){:([a-zA-Z]+)}$/);\n if (hightlightMatch) {\n const [, raw, lang] = hightlightMatch;\n return <CodeBlock code={raw} lang={lang as BundledLanguage} inline />;\n }\n\n return <CodeSpan code={inlineCode} />;\n case \"code\":\n const { lang, configuration } = parseCodeLang(token.lang);\n if (configuration.switcher && lang) {\n const tabKey = typeof configuration.tab === \"string\" ? formatId(configuration.tab) : lang;\n codeQueue[tabKey] = {\n tabName: (configuration.tab || lang).toString(),\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element: <CodeSection lang={lang as any} code={token.text} {...configuration} />,\n };\n\n if (typeof configuration.clone === \"string\") {\n const copies = configuration.clone.split(\",\");\n\n copies.forEach((copy) => {\n const [copyLang, copyTab, copyFileName] = copy.split(\"|\");\n const copyTabKey = typeof copyTab === \"string\" ? formatId(copyTab) : copyLang;\n\n codeQueue[copyTabKey] = {\n tabName: (copyTab || copyLang).toString(),\n element: (\n <CodeSection\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n lang={copyLang as any}\n code={token.text}\n {...configuration}\n filename={copyFileName || (configuration.filename as string)}\n />\n ),\n };\n });\n }\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return <CodeSection lang={lang as any} code={token.text} {...configuration} />;\n case \"escape\":\n return token.text;\n case \"list\":\n const isTaskList = token.items.every((i: Tokens.ListItem) => i.task);\n if (isTaskList) {\n const ListComponent = token.ordered ? TaskOrderedList : TaskUnorderedList;\n return (\n <ListComponent start={token.start}>\n {token.items.map((elem: Tokens.ListItem, index: number) => (\n <TaskListItem key={elem.raw + index} defaultChecked={elem.checked}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.raw}\n </TaskListItem>\n ))}\n </ListComponent>\n );\n }\n\n const ListComponent = token.ordered ? OrderedList : UnorderedList;\n return (\n <ListComponent start={token.start}>\n {token.items.map((elem: Tokens.ListItem, index: number) => (\n <ListItem key={elem.raw + index}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.raw}\n </ListItem>\n ))}\n </ListComponent>\n );\n case \"html\":\n const text = token.raw.trim();\n\n if (text.startsWith(\"<!---robin\") && text.endsWith(\"-->\")) {\n const selfClosed = text.endsWith(\"/-->\");\n const componentName = text.match(/<!---robin ([\\w]+)/)?.[1];\n\n if (!componentName) {\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n\n if (!validateComponentName(componentName)) {\n console.warn(\n `\"${componentName}\" is using incorrect casing. Use PascalCase for Robin components`,\n );\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n\n if (!components || !(componentName in components)) {\n console.warn(`Unknown component: \"${componentName}\"`);\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n const propRows = text.split(/\\r?\\n/).slice(1, -1);\n const props = propRows.reduce<{ [key: string]: string | true }>((acc, cur) => {\n const [_match, key, value] = cur.match(/^([\\w]+)(?:=\"(.+)\")?$/) || [];\n\n if (!_match) {\n console.warn(`Invalid component attribute: \"${cur}\"`);\n return acc;\n }\n\n acc[key] = value ?? true;\n return acc;\n }, {});\n\n if (selfClosed) {\n const Component = components[componentName as keyof typeof components];\n return <Component {...props} />;\n }\n\n robin = { props, componentName, childTokens: [], type: \"base\" };\n return null;\n }\n\n return (\n <DocumentJSX\n raw={token.raw}\n components={components}\n config={config}\n targetProvider={targetProvider}\n pathname={pathname}\n uri={uri}\n pages={pages}\n />\n );\n case \"text\":\n if (\"tokens\" in token) {\n return <DocumentToken token={token.tokens || []} />;\n }\n return token.raw;\n // Definitions should not be rendered, they are used only as comments or meta data\n case \"def\":\n return null;\n // br are inserted between elements. In our case, sufficient indentation is set everywhere, so we ignore them\n case \"br\":\n return null;\n // checkbox are rendered as part of the task list item, so we ignore them\n case \"checkbox\":\n return null;\n default:\n if (!token.type && \"raw\" in token) return token.raw;\n\n console.warn(`Unknown token ${token.type}`, token);\n return null;\n }\n };\n\n tokens.push({ type: \"text\", raw: \"\" });\n return <DocumentToken token={tokens} />;\n};\n"],"names":["DocumentJSX","raw","components","baseProps","parseOptions","replace","domNode","Text","data","headings","tokens","parseMarkdown","React","Document","subtree","name","href","external","formatLinkHref","attribs","pathname","pages","domToReact","children","createElement","NavContentLink","attributesToProps","validateComponentName","console","warn","props","Component","htmlparser2","lowerCaseTags","lowerCaseAttributeNames","parse","uri","targetProvider","config","publicDirs","robin","codeQueue","insertedCodeKeys","DocumentToken","token","isNewCodeToken","tabsData","tabsKey","Object","keys","sort","join","isInsertedKey","includes","push","Fragment","Tabs","type","insertStyles","blockKey","Array","isArray","trim","childTokens","componentName","RobinComponent","map","t","index","key","depth","predefinedData","find","heading","id","AnchorHeading","component","Heading","undefined","Block","Table","Thead","Tr","header","Th","text","align","Tbody","rows","row","rowIndex","elem","elemIndex","Td","Hr","Img","src","provider","alt","title","some","every","Paragraph","Strong","Del","Em","blockquoteToken","parseBlockqoute","Blockquote","inlineCode","hightlightMatch","match","lang","CodeBlock","code","inline","CodeSpan","configuration","parseCodeLang","switcher","tabKey","tab","formatId","tabName","toString","element","CodeSection","clone","split","forEach","copy","copyLang","copyTab","copyFileName","copyTabKey","filename","items","i","task","ListComponent","ordered","TaskOrderedList","TaskUnorderedList","start","TaskListItem","defaultChecked","checked","OrderedList","UnorderedList","ListItem","startsWith","endsWith","selfClosed","slice","reduce","acc","cur","_match","value"],"mappings":"gxDA0CO,MAAMA,EAA0C,EAAGC,MAAKC,gBAAeC,MAC1E,MAAMC,EAAuC,CACzC,OAAAC,CAAQC,GACJ,GAAIA,aA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AAY7B,EAAW8D,GAC7B,OAAOpD,EAAAY,cAACO,EAAS,IAAKD,GAC1B,CAGA,OADAU,EAAQ,CAAEV,QAAOkC,gBAAeD,YAAa,GAAIN,KAAM,QAChD,IACX,CAEA,OACI7C,EAAAY,cAACxB,EAAW,CACRC,IAAK2C,EAAM3C,IACXC,WAAYA,EACZoC,OAAQA,EACRD,eAAgBA,EAChBjB,SAAUA,EACVgB,IAAKA,EACLf,MAAOA,IAGnB,IAAK,OACD,MAAI,WAAYuB,EACLhC,EAAAY,cAACmB,EAAa,CAACC,MAAOA,EAAMlC,QAAU,KAE1CkC,EAAM3C,IAUjB,QACI,OAAK2C,EAAMa,MAAQ,QAASb,EAAcA,EAAM3C,KAEhD2B,QAAQC,KAAK,iBAAiBe,EAAMa,OAAQb,GACrC,QAKnB,OADAlC,EAAO4C,KAAK,CAAEG,KAAM,OAAQxD,IAAK,KAC1BW,gBAAC+B,EAAa,CAACC,MAAOlC"}
1
+ {"version":3,"file":"document.js","sources":["../../../../src/components/elements/article/document.tsx"],"sourcesContent":["import { type Token, type Tokens, type TokensList } from \"marked\";\nimport { type BundledLanguage } from \"shiki\";\nimport React from \"react\";\nimport parse, { attributesToProps, DOMNode, domToReact, HTMLReactParserOptions, Text } from \"html-react-parser\";\n\nimport { type BaseProvider } from \"@src/core/providers/base\";\nimport { type Components, type RobinProps } from \"@src/core/types/content\";\n\nimport { type PagesType } from \"./types\";\nimport {\n formatId,\n formatLinkHref,\n isNewCodeToken,\n parseBlockqoute,\n parseCodeLang,\n parseMarkdown,\n validateComponentName,\n type AnchorData,\n} from \"./utils\";\nimport { DEFAULT_TAGS } from \"./tags\";\n\ninterface DocumentJSXProps extends Omit<DocumentProps, \"tokens\" | \"headings\"> {\n raw: string;\n pages?: PagesType;\n tags: typeof DEFAULT_TAGS;\n}\n\nconst DocumentJSX: React.FC<DocumentJSXProps> = ({ raw, components, tags: Tags, ...baseProps }) => {\n const parseOptions: HTMLReactParserOptions = {\n replace(domNode) {\n if (domNode instanceof Text && domNode.data) {\n const { headings, tokens } = parseMarkdown(domNode.data);\n\n return (\n <Document\n headings={headings}\n tokens={tokens}\n components={components}\n tags={Tags}\n subtree\n {...baseProps}\n />\n );\n }\n\n if (!(\"name\" in domNode)) return <></>;\n\n if (domNode.name === \"a\" && \"attribs\" in domNode) {\n const { href, external } = formatLinkHref(domNode.attribs.href, baseProps.pathname, baseProps.pages);\n\n if (href === \"\") return domToReact(domNode.children as DOMNode[], parseOptions);\n\n return (\n <Tags.ContentLink {...attributesToProps(domNode.attribs)} href={href} external={external}>\n {domToReact(domNode.children as DOMNode[], parseOptions)}\n </Tags.ContentLink>\n );\n }\n\n if (!validateComponentName(domNode.name)) return domNode;\n\n if (!components || !(domNode.name in components)) {\n console.warn(`Unknown component: \"${domNode.name}\"`);\n return <></>;\n }\n\n const props = \"attribs\" in domNode ? attributesToProps(domNode.attribs) : {};\n const Component = components[domNode.name];\n const children = \"children\" in domNode ? domNode.children : null;\n\n return (\n <Component {...props}>{children ? domToReact(children as DOMNode[], parseOptions) : null}</Component>\n );\n },\n htmlparser2: {\n lowerCaseTags: false,\n lowerCaseAttributeNames: false,\n },\n };\n return parse(raw, parseOptions);\n};\n\nexport type DocumentProps = {\n pathname: string;\n components?: Components;\n config?: {\n publicDirs?: string[];\n };\n uri?: string;\n targetProvider?: BaseProvider | null;\n tokens: TokensList;\n headings: AnchorData[];\n subtree?: boolean;\n pages?: PagesType;\n tags?: Partial<typeof DEFAULT_TAGS>;\n};\n\nexport const Document: React.FC<DocumentProps> = ({\n pathname,\n components,\n tags: userTags = {},\n uri,\n targetProvider,\n tokens,\n headings,\n config = {},\n subtree,\n pages,\n}) => {\n const { publicDirs } = config;\n const Tags = { ...DEFAULT_TAGS, ...userTags };\n\n let robin:\n | null\n | { props: RobinProps; childTokens: Token[]; componentName: string; type: \"base\" }\n | { type: \"dummy\" } = null;\n let codeQueue: { [lang: string]: { element: React.ReactNode; tabName: string } } = {};\n const insertedCodeKeys: string[] = [];\n const DocumentToken: React.FC<{ token: Token | Token[] }> = ({ token }) => {\n if (!token) return null;\n\n if (isNewCodeToken(token, codeQueue)) {\n const tabsData = codeQueue;\n codeQueue = {};\n const tabsKey = Object.keys(tabsData).sort().join(\"-\");\n const isInsertedKey = insertedCodeKeys.includes(tabsKey);\n if (!isInsertedKey) insertedCodeKeys.push(tabsKey);\n\n return (\n <>\n <Tags.Tabs type=\"code\" tabsData={tabsData} insertStyles={!isInsertedKey} blockKey={tabsKey} />\n <DocumentToken token={token} />\n </>\n );\n }\n\n if (robin) {\n if (!Array.isArray(token) && token.type === \"html\" && token.raw.trim() === \"<!---/robin-->\") {\n if (robin.type === \"dummy\") {\n robin = null;\n return null;\n }\n\n const { componentName, childTokens, props } = robin;\n const RobinComponent = components![componentName];\n robin = null;\n return (\n <RobinComponent {...props}>\n <DocumentToken token={childTokens} />\n </RobinComponent>\n );\n } else {\n if (robin.type === \"dummy\") return null;\n\n if (Array.isArray(token)) {\n robin.childTokens.push(...token);\n } else {\n robin.childTokens.push(token);\n }\n return null;\n }\n }\n\n if (Array.isArray(token)) {\n return token.map((t, index) => <DocumentToken token={t} key={(t as Tokens.Text).raw + index} />);\n }\n\n switch (token.type) {\n case \"heading\":\n const Component = `h${token.depth}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n const predefinedData = headings.find((heading) => heading.token === token);\n if (predefinedData?.id) {\n return (\n <Tags.AnchorHeading component={Component} id={predefinedData.id}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </Tags.AnchorHeading>\n );\n }\n\n return (\n <Tags.Heading component={Component} id={token.depth === 1 ? \"main-content\" : undefined}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </Tags.Heading>\n );\n case \"table\":\n return (\n <Tags.Block>\n <Tags.Table>\n <Tags.Thead>\n <Tags.Tr>\n {token.header.map((t: Tokens.TableCell, index: number) => (\n <Tags.Th key={t.text + index} align={t.align}>\n {t.tokens ? <DocumentToken token={t.tokens} /> : t.text}\n </Tags.Th>\n ))}\n </Tags.Tr>\n </Tags.Thead>\n <Tags.Tbody>\n {token.rows.map((row: Tokens.TableCell[], rowIndex: number) => (\n <Tags.Tr key={rowIndex}>\n {row.map((elem, elemIndex) => (\n <Tags.Td key={elem.text + elemIndex} align={elem.align}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.text}\n </Tags.Td>\n ))}\n </Tags.Tr>\n ))}\n </Tags.Tbody>\n </Tags.Table>\n </Tags.Block>\n );\n case \"link\":\n const { href, external } = formatLinkHref(token.href, pathname, pages);\n\n if (href === \"\") return token.tokens ? <DocumentToken token={token.tokens} /> : token.raw;\n\n return (\n <Tags.ContentLink href={href} external={external}>\n {token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}\n </Tags.ContentLink>\n );\n case \"hr\":\n return <Tags.Hr />;\n case \"image\":\n return (\n <Tags.Img\n src={token.href}\n publicDirs={publicDirs}\n provider={targetProvider}\n uri={uri}\n alt={token.title || \"\"}\n />\n );\n case \"paragraph\":\n if (subtree) return token.tokens ? <DocumentToken token={token.tokens} /> : token.raw;\n if (\n token.tokens?.some((t) => t.type === \"html\") &&\n token.tokens?.every((t) => t.type === \"html\" || t.type === \"text\" || t.raw === \"\\n\")\n ) {\n return <DocumentToken token={{ ...token, type: \"html\" }} />;\n }\n\n return (\n <Tags.Paragraph>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Tags.Paragraph>\n );\n case \"strong\":\n return <Tags.Strong>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Tags.Strong>;\n case \"del\":\n return <Tags.Del>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Tags.Del>;\n case \"em\":\n return <Tags.Em>{token.tokens ? <DocumentToken token={token.tokens} /> : token.raw}</Tags.Em>;\n case \"blockquote\":\n const { token: blockquoteToken, type } = parseBlockqoute(token);\n\n return (\n <Tags.Blockquote type={type}>\n {blockquoteToken.tokens ? (\n <DocumentToken token={blockquoteToken.tokens} />\n ) : (\n blockquoteToken.raw\n )}\n </Tags.Blockquote>\n );\n case \"codespan\":\n const inlineCode = token.raw.replace(/^`|`$/g, \"\");\n const hightlightMatch = inlineCode.match(/(.+){:([a-zA-Z]+)}$/);\n if (hightlightMatch) {\n const [, raw, lang] = hightlightMatch;\n return <Tags.CodeBlock code={raw} lang={lang as BundledLanguage} inline />;\n }\n\n return <Tags.CodeSpan code={inlineCode} />;\n case \"code\":\n const { lang, configuration } = parseCodeLang(token.lang);\n if (configuration.switcher && lang) {\n const tabKey = typeof configuration.tab === \"string\" ? formatId(configuration.tab) : lang;\n codeQueue[tabKey] = {\n tabName: (configuration.tab || lang).toString(),\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element: <Tags.CodeSection lang={lang as any} code={token.text} {...configuration} />,\n };\n\n if (typeof configuration.clone === \"string\") {\n const copies = configuration.clone.split(\",\");\n\n copies.forEach((copy) => {\n const [copyLang, copyTab, copyFileName] = copy.split(\"|\");\n const copyTabKey = typeof copyTab === \"string\" ? formatId(copyTab) : copyLang;\n\n codeQueue[copyTabKey] = {\n tabName: (copyTab || copyLang).toString(),\n element: (\n <Tags.CodeSection\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n lang={copyLang as any}\n code={token.text}\n {...configuration}\n filename={copyFileName || (configuration.filename as string)}\n />\n ),\n };\n });\n }\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return <Tags.CodeSection lang={lang as any} code={token.text} {...configuration} />;\n case \"escape\":\n return token.text;\n case \"list\":\n const isTaskList = token.items.every((i: Tokens.ListItem) => i.task);\n if (isTaskList) {\n const ListComponent = token.ordered ? Tags.TaskOrderedList : Tags.TaskUnorderedList;\n return (\n <ListComponent start={token.start}>\n {token.items.map((elem: Tokens.ListItem, index: number) => (\n <Tags.TaskListItem key={elem.raw + index} defaultChecked={elem.checked}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.raw}\n </Tags.TaskListItem>\n ))}\n </ListComponent>\n );\n }\n\n const ListComponent = token.ordered ? Tags.OrderedList : Tags.UnorderedList;\n return (\n <ListComponent start={token.start}>\n {token.items.map((elem: Tokens.ListItem, index: number) => (\n <Tags.ListItem key={elem.raw + index}>\n {elem.tokens ? <DocumentToken token={elem.tokens} /> : elem.raw}\n </Tags.ListItem>\n ))}\n </ListComponent>\n );\n case \"html\":\n const text = token.raw.trim();\n\n if (text.startsWith(\"<!---robin\") && text.endsWith(\"-->\")) {\n const selfClosed = text.endsWith(\"/-->\");\n const componentName = text.match(/<!---robin ([\\w]+)/)?.[1];\n\n if (!componentName) {\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n\n if (!validateComponentName(componentName)) {\n console.warn(\n `\"${componentName}\" is using incorrect casing. Use PascalCase for Robin components`,\n );\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n\n if (!components || !(componentName in components)) {\n console.warn(`Unknown component: \"${componentName}\"`);\n if (!selfClosed) robin = { type: \"dummy\" };\n return null;\n }\n const propRows = text.split(/\\r?\\n/).slice(1, -1);\n const props = propRows.reduce<{ [key: string]: string | true }>((acc, cur) => {\n const [_match, key, value] = cur.match(/^([\\w]+)(?:=\"(.+)\")?$/) || [];\n\n if (!_match) {\n console.warn(`Invalid component attribute: \"${cur}\"`);\n return acc;\n }\n\n acc[key] = value ?? true;\n return acc;\n }, {});\n\n if (selfClosed) {\n const Component = components[componentName as keyof typeof components];\n return <Component {...props} />;\n }\n\n robin = { props, componentName, childTokens: [], type: \"base\" };\n return null;\n }\n\n return (\n <DocumentJSX\n raw={token.raw}\n components={components}\n config={config}\n targetProvider={targetProvider}\n pathname={pathname}\n uri={uri}\n pages={pages}\n tags={Tags}\n />\n );\n case \"text\":\n if (\"tokens\" in token) {\n return <DocumentToken token={token.tokens || []} />;\n }\n return token.raw;\n case \"space\":\n return null;\n // Definitions should not be rendered, they are used only as comments or meta data\n case \"def\":\n return null;\n // br are inserted between elements. In our case, sufficient indentation is set everywhere, so we ignore them\n case \"br\":\n return null;\n // checkbox are rendered as part of the task list item, so we ignore them\n case \"checkbox\":\n return null;\n default:\n if (!token.type && \"raw\" in token) return token.raw;\n\n console.warn(`Unknown token ${token.type}`, token);\n return null;\n }\n };\n\n tokens.push({ type: \"text\", raw: \"\" });\n return <DocumentToken token={tokens} />;\n};\n"],"names":["DocumentJSX","raw","components","tags","Tags","baseProps","parseOptions","replace","domNode","Text","data","headings","tokens","parseMarkdown","React","createElement","Document","subtree","name","href","external","formatLinkHref","attribs","pathname","pages","domToReact","children","ContentLink","attributesToProps","validateComponentName","console","warn","props","Component","htmlparser2","lowerCaseTags","lowerCaseAttributeNames","parse","userTags","uri","targetProvider","config","publicDirs","DEFAULT_TAGS","robin","codeQueue","insertedCodeKeys","DocumentToken","token","isNewCodeToken","tabsData","tabsKey","Object","keys","sort","join","isInsertedKey","includes","push","Fragment","Tabs","type","insertStyles","blockKey","Array","isArray","trim","childTokens","componentName","RobinComponent","map","t","index","key","depth","predefinedData","find","heading","id","AnchorHeading","component","Heading","undefined","Block","Table","Thead","Tr","header","Th","text","align","Tbody","rows","row","rowIndex","elem","elemIndex","Td","Hr","Img","src","provider","alt","title","some","every","Paragraph","Strong","Del","Em","blockquoteToken","parseBlockqoute","Blockquote","inlineCode","hightlightMatch","match","lang","CodeBlock","code","inline","CodeSpan","configuration","parseCodeLang","switcher","tabKey","tab","formatId","tabName","toString","element","CodeSection","clone","split","forEach","copy","copyLang","copyTab","copyFileName","copyTabKey","filename","items","i","task","ListComponent","ordered","TaskOrderedList","TaskUnorderedList","start","TaskListItem","defaultChecked","checked","OrderedList","UnorderedList","ListItem","startsWith","endsWith","selfClosed","slice","reduce","acc","cur","_match","value"],"mappings":"qTA2BA,MAAMA,EAA0C,EAAGC,MAAKC,aAAYC,KAAMC,KAASC,MAC/E,MAAMC,EAAuC,CACzC,OAAAC,CAAQC,GACJ,GAAIA,aAAmBC,GAAQD,EAAQE,KAAM,CACzC,MAAMC,SAAEA,EAAQC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,GAEnE,OAAK8C,GAKLF,EAAItF,GAAOyF,IAAS,EACbH,IALHjI,QAAQC,KAAK,iCAAiCiI,MACvCD,IAKZ,CAAA,GAEH,GAAIH,EAAY,CACZ,MAAM3H,EAAY/B,EAAWkE,GAC7B,OAAOtD,EAAAC,cAACkB,EAAS,IAAKD,GAC1B,CAGA,OADAY,EAAQ,CAAEZ,QAAOoC,gBAAeD,YAAa,GAAIN,KAAM,QAChD,IACX,CAEA,OACI/C,EAAAC,cAACf,EAAW,CACRC,IAAK+C,EAAM/C,IACXC,WAAYA,EACZuC,OAAQA,EACRD,eAAgBA,EAChBjB,SAAUA,EACVgB,IAAKA,EACLf,MAAOA,EACPrB,KAAMC,IAGlB,IAAK,OACD,MAAI,WAAY4C,EACLlC,EAAAC,cAACgC,EAAa,CAACC,MAAOA,EAAMpC,QAAU,KAE1CoC,EAAM/C,IACjB,IAAK,QAGL,IAAK,MAGL,IAAK,KAGL,IAAK,WACD,OAAO,KACX,QACI,OAAK+C,EAAMa,MAAQ,QAASb,EAAcA,EAAM/C,KAEhD6B,QAAQC,KAAK,iBAAiBiB,EAAMa,OAAQb,GACrC,QAKnB,OADApC,EAAO8C,KAAK,CAAEG,KAAM,OAAQ5D,IAAK,KAC1Ba,gBAACiC,EAAa,CAACC,MAAOpC"}
@@ -1,22 +1,13 @@
1
- import "./article.scss";
2
1
  import React from "react";
3
- import { type Components } from "../../../core/types/content";
4
2
  import { type BaseProvider } from "../../../core/providers/base";
5
3
  import { type ContentsProps } from "../../blocks/contents";
6
4
  import { type BreadcrumbsProps } from "../../blocks/breadcrumbs";
7
5
  import { type PaginationProps } from "../../blocks/pagination";
8
- export type ContentProps = {
6
+ import { type DocumentProps } from "./document";
7
+ import "./article.scss";
8
+ type ArticleContentProps = Pick<DocumentProps, "pathname" | "components" | "config" | "pages" | "tags"> & {
9
9
  title: string;
10
- components?: Components;
11
- config?: {
12
- publicDirs?: string[];
13
- };
14
10
  provider?: BaseProvider;
15
- pathname: string;
16
- pages?: {
17
- clientPath: string;
18
- origPath: string;
19
- }[];
20
11
  translations?: {
21
12
  /** Last modified on */
22
13
  lastModifiedOn?: string;
@@ -28,6 +19,15 @@ export type ContentProps = {
28
19
  uri: string;
29
20
  content?: undefined;
30
21
  });
31
- export type ArticleProps = Partial<PaginationProps> & Partial<BreadcrumbsProps> & Omit<ContentsProps, "headings"> & ContentProps;
22
+ export type ArticleProps = Partial<PaginationProps> & Partial<BreadcrumbsProps> & Omit<ContentsProps, "headings"> & ArticleContentProps;
23
+ /**
24
+ * Article component for rendering markdown content.
25
+ * Handles parsing, rendering, and all page features (breadcrumbs, TOC, pagination).
26
+ *
27
+ * @see {@link https://robindoc.com/docs/customization/elements/page Page customization}
28
+ * @see {@link https://robindoc.com/docs/customization/tags Tags customization}
29
+ * @see {@link https://robindoc.com/docs/structure/data-source Data sources}
30
+ */
32
31
  export declare const Article: React.FC<ArticleProps>;
32
+ export {};
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/article/index.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,oCAAgC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAE,qCAAiC;AAG7D,OAAO,EAAY,KAAK,aAAa,EAAE,8BAAwC;AAC/E,OAAO,EAAe,KAAK,gBAAgB,EAAE,iCAA2C;AACxF,OAAO,EAAc,KAAK,eAAe,EAAE,gCAA0C;AAKrF,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IAC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KAC3B,CAAC;CACL,GAAG,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,GAC/C,OAAO,CAAC,gBAAgB,CAAC,GACzB,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAC/B,mBAAmB,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAuD1C,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"react";import{loadContent as t}from"../../../core/utils/load-content.js";import{ContentsProvider as r}from"../../stores/contents/provider.js";import{Contents as o}from"../../blocks/contents/index.js";import{Breadcrumbs as i}from"../../blocks/breadcrumbs/index.js";import{Pagination as n}from"../../blocks/pagination/index.js";import{parseMarkdown as a}from"./utils.js";import{Document as s}from"./document.js";import{LastModified as d}from"../../blocks/last-modified/index.js";const m=async({components:m,content:c,uri:l,config:p={},provider:f,hideContents:g,editUri:u,pathname:v,title:b,breadcrumbs:h,prev:E,next:j,pages:x=[],translations:k})=>{const{lastModifiedOn:w="Last modified on",editOnService:P,onThisPage:O}=k||{},{data:U,provider:C}=c||!l?{data:c,provider:null}:await t(l,f);if(!U)throw new Error("Robindoc: Please provide content or valid uri");const{headings:L,tokens:M}=a(U),S=l&&C&&await C.getEditUri(l),T=l&&C&&await C.getLastModifiedDate(l);return e.createElement(r,null,h&&h.length>0&&e.createElement(i,{breadcrumbs:h,title:b}),e.createElement(o,{editUri:null===u?null:u||S,hideContents:g,headings:L,translations:{editOnService:P,onThisPage:O}}),e.createElement("div",{className:"r-article"},e.createElement(s,{headings:L,tokens:M,pages:x,components:m,config:p,targetProvider:C,pathname:v,uri:l}),T&&e.createElement(d,{date:T},w)),(E||j)&&e.createElement(n,{prev:E,next:j}))};export{m as Article};
1
+ import e from"react";import{loadContent as t}from"../../../core/utils/load-content.js";import{ContentsProvider as r}from"../../stores/contents/provider.js";import{Contents as o}from"../../blocks/contents/index.js";import{Breadcrumbs as i}from"../../blocks/breadcrumbs/index.js";import{Pagination as n}from"../../blocks/pagination/index.js";import{LastModified as a}from"../../blocks/last-modified/index.js";import{Document as s}from"./document.js";import{parseMarkdown as d}from"./utils.js";const m=async({components:m,tags:c,content:l,uri:p,config:f={},provider:g,hideContents:u,editUri:v,pathname:b,title:h,breadcrumbs:E,prev:j,next:x,pages:k=[],translations:w})=>{const{lastModifiedOn:P="Last modified on",editOnService:O,onThisPage:U}=w||{},{data:C,provider:L}=l||!p?{data:l,provider:null}:await t(p,g);if(!C)throw new Error("Robindoc: Please provide content or valid uri");const{headings:M,tokens:S}=d(C),T=p&&L&&await L.getEditUri(p),y=p&&L&&await L.getLastModifiedDate(p);return e.createElement(r,null,E&&E.length>0&&e.createElement(i,{breadcrumbs:E,title:h}),e.createElement(o,{editUri:null===v?null:v||T,hideContents:u,headings:M,translations:{editOnService:O,onThisPage:U}}),e.createElement("div",{className:"r-article"},e.createElement(s,{headings:M,tokens:S,pages:k,components:m,config:f,targetProvider:L,pathname:b,uri:p,tags:c}),y&&e.createElement(a,{date:y},P)),(j||x)&&e.createElement(n,{prev:j,next:x}))};export{m as Article};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/elements/article/index.tsx"],"sourcesContent":["import \"./article.scss\";\nimport React from \"react\";\n\nimport { type Components } from \"@src/core/types/content\";\nimport { type BaseProvider } from \"@src/core/providers/base\";\nimport { loadContent } from \"@src/core/utils/load-content\";\nimport { ContentsProvider } from \"@src/components/stores/contents/provider\";\nimport { Contents, type ContentsProps } from \"@src/components/blocks/contents\";\nimport { Breadcrumbs, type BreadcrumbsProps } from \"@src/components/blocks/breadcrumbs\";\nimport { Pagination, type PaginationProps } from \"@src/components/blocks/pagination\";\nimport { parseMarkdown } from \"./utils\";\nimport { Document } from \"./document\";\nimport { LastModified } from \"@src/components/blocks/last-modified\";\n\nexport type ContentProps = {\n title: string;\n components?: Components;\n config?: {\n publicDirs?: string[];\n };\n provider?: BaseProvider;\n pathname: string;\n pages?: { clientPath: string; origPath: string }[];\n translations?: {\n /** Last modified on */\n lastModifiedOn?: string;\n };\n} & ({ content: string; uri?: undefined } | { uri: string; content?: undefined });\n\nexport type ArticleProps = Partial<PaginationProps> &\n Partial<BreadcrumbsProps> &\n Omit<ContentsProps, \"headings\"> &\n ContentProps;\n\nexport const Article: React.FC<ArticleProps> = async ({\n components,\n content,\n uri,\n config = {},\n provider,\n hideContents,\n editUri: editUriProp,\n pathname,\n title,\n breadcrumbs,\n prev,\n next,\n pages = [],\n translations,\n}) => {\n const { lastModifiedOn = \"Last modified on\", editOnService, onThisPage } = translations || {};\n const { data, provider: targetProvider } =\n content || !uri ? { data: content, provider: null } : await loadContent(uri, provider);\n\n if (!data) {\n throw new Error(\"Robindoc: Please provide content or valid uri\");\n }\n\n const { headings, tokens } = parseMarkdown(data);\n const editUri = uri && targetProvider && (await targetProvider.getEditUri(uri));\n const lastModified = uri && targetProvider && (await targetProvider.getLastModifiedDate(uri));\n\n return (\n <ContentsProvider>\n {breadcrumbs && breadcrumbs.length > 0 && <Breadcrumbs breadcrumbs={breadcrumbs} title={title} />}\n <Contents\n editUri={editUriProp === null ? null : editUriProp || editUri}\n hideContents={hideContents}\n headings={headings}\n translations={{ editOnService, onThisPage }}\n />\n <div className=\"r-article\">\n <Document\n headings={headings}\n tokens={tokens}\n pages={pages}\n components={components}\n config={config}\n targetProvider={targetProvider}\n pathname={pathname}\n uri={uri}\n />\n {lastModified && <LastModified date={lastModified}>{lastModifiedOn}</LastModified>}\n </div>\n {(prev || next) && <Pagination prev={prev} next={next} />}\n </ContentsProvider>\n );\n};\n"],"names":["Article","async","components","content","uri","config","provider","hideContents","editUri","editUriProp","pathname","title","breadcrumbs","prev","next","pages","translations","lastModifiedOn","editOnService","onThisPage","data","targetProvider","loadContent","Error","headings","tokens","parseMarkdown","getEditUri","lastModified","getLastModifiedDate","React","ContentsProvider","length","createElement","Breadcrumbs","Contents","className","Document","LastModified","date","Pagination"],"mappings":"2eAkCO,MAAMA,EAAkCC,OAC3CC,aACAC,UACAC,MACAC,SAAS,CAAA,EACTC,WACAC,eACAC,QAASC,EACTC,WACAC,QACAC,cACAC,OACAC,OACAC,QAAQ,GACRC,mBAEA,MAAMC,eAAEA,EAAiB,mBAAkBC,cAAEA,EAAaC,WAAEA,GAAeH,GAAgB,CAAA,GACrFI,KAAEA,EAAMd,SAAUe,GACpBlB,IAAYC,EAAM,CAAEgB,KAAMjB,EAASG,SAAU,YAAegB,EAAYlB,EAAKE,GAEjF,IAAKc,EACD,MAAM,IAAIG,MAAM,iDAGpB,MAAMC,SAAEA,EAAQC,OAAEA,GAAWC,EAAcN,GACrCZ,EAAUJ,GAAOiB,SAAyBA,EAAeM,WAAWvB,GACpEwB,EAAexB,GAAOiB,SAAyBA,EAAeQ,oBAAoBzB,GAExF,OACI0B,gBAACC,EAAgB,KACZnB,GAAeA,EAAYoB,OAAS,GAAKF,EAAAG,cAACC,EAAW,CAACtB,YAAaA,EAAaD,MAAOA,IACxFmB,EAAAG,cAACE,EAAQ,CACL3B,QAAyB,OAAhBC,EAAuB,KAAOA,GAAeD,EACtDD,aAAcA,EACdiB,SAAUA,EACVR,aAAc,CAAEE,gBAAeC,gBAEnCW,EAAAG,cAAA,MAAA,CAAKG,UAAU,aACXN,EAAAG,cAACI,EAAQ,CACLb,SAAUA,EACVC,OAAQA,EACRV,MAAOA,EACPb,WAAYA,EACZG,OAAQA,EACRgB,eAAgBA,EAChBX,SAAUA,EACVN,IAAKA,IAERwB,GAAgBE,EAAAG,cAACK,EAAY,CAACC,KAAMX,GAAeX,KAEtDJ,GAAQC,IAASgB,EAAAG,cAACO,EAAU,CAAC3B,KAAMA,EAAMC,KAAMA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/elements/article/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { type BaseProvider } from \"@src/core/providers/base\";\nimport { loadContent } from \"@src/core/utils/load-content\";\nimport { ContentsProvider } from \"@src/components/stores/contents/provider\";\nimport { Contents, type ContentsProps } from \"@src/components/blocks/contents\";\nimport { Breadcrumbs, type BreadcrumbsProps } from \"@src/components/blocks/breadcrumbs\";\nimport { Pagination, type PaginationProps } from \"@src/components/blocks/pagination\";\nimport { LastModified } from \"@src/components/blocks/last-modified\";\nimport { Document, type DocumentProps } from \"./document\";\nimport { parseMarkdown } from \"./utils\";\n\nimport \"./article.scss\";\n\ntype ArticleContentProps = Pick<DocumentProps, \"pathname\" | \"components\" | \"config\" | \"pages\" | \"tags\"> & {\n title: string;\n provider?: BaseProvider;\n translations?: {\n /** Last modified on */\n lastModifiedOn?: string;\n };\n} & ({ content: string; uri?: undefined } | { uri: string; content?: undefined });\n\nexport type ArticleProps = Partial<PaginationProps> &\n Partial<BreadcrumbsProps> &\n Omit<ContentsProps, \"headings\"> &\n ArticleContentProps;\n\n/**\n * Article component for rendering markdown content.\n * Handles parsing, rendering, and all page features (breadcrumbs, TOC, pagination).\n *\n * @see {@link https://robindoc.com/docs/customization/elements/page Page customization}\n * @see {@link https://robindoc.com/docs/customization/tags Tags customization}\n * @see {@link https://robindoc.com/docs/structure/data-source Data sources}\n */\nexport const Article: React.FC<ArticleProps> = async ({\n components,\n tags,\n content,\n uri,\n config = {},\n provider,\n hideContents,\n editUri: editUriProp,\n pathname,\n title,\n breadcrumbs,\n prev,\n next,\n pages = [],\n translations,\n}) => {\n const { lastModifiedOn = \"Last modified on\", editOnService, onThisPage } = translations || {};\n const { data, provider: targetProvider } =\n content || !uri ? { data: content, provider: null } : await loadContent(uri, provider);\n\n if (!data) {\n throw new Error(\"Robindoc: Please provide content or valid uri\");\n }\n\n const { headings, tokens } = parseMarkdown(data);\n const editUri = uri && targetProvider && (await targetProvider.getEditUri(uri));\n const lastModified = uri && targetProvider && (await targetProvider.getLastModifiedDate(uri));\n\n return (\n <ContentsProvider>\n {breadcrumbs && breadcrumbs.length > 0 && <Breadcrumbs breadcrumbs={breadcrumbs} title={title} />}\n <Contents\n editUri={editUriProp === null ? null : editUriProp || editUri}\n hideContents={hideContents}\n headings={headings}\n translations={{ editOnService, onThisPage }}\n />\n <div className=\"r-article\">\n <Document\n headings={headings}\n tokens={tokens}\n pages={pages}\n components={components}\n config={config}\n targetProvider={targetProvider}\n pathname={pathname}\n uri={uri}\n tags={tags}\n />\n {lastModified && <LastModified date={lastModified}>{lastModifiedOn}</LastModified>}\n </div>\n {(prev || next) && <Pagination prev={prev} next={next} />}\n </ContentsProvider>\n );\n};\n"],"names":["Article","async","components","tags","content","uri","config","provider","hideContents","editUri","editUriProp","pathname","title","breadcrumbs","prev","next","pages","translations","lastModifiedOn","editOnService","onThisPage","data","targetProvider","loadContent","Error","headings","tokens","parseMarkdown","getEditUri","lastModified","getLastModifiedDate","React","ContentsProvider","length","createElement","Breadcrumbs","Contents","className","Document","LastModified","date","Pagination"],"mappings":"ifAoCaA,EAAkCC,OAC3CC,aACAC,OACAC,UACAC,MACAC,SAAS,GACTC,WACAC,eACAC,QAASC,EACTC,WACAC,QACAC,cACAC,OACAC,OACAC,QAAQ,GACRC,mBAEA,MAAMC,eAAEA,EAAiB,mBAAkBC,cAAEA,EAAaC,WAAEA,GAAeH,GAAgB,CAAA,GACrFI,KAAEA,EAAMd,SAAUe,GACpBlB,IAAYC,EAAM,CAAEgB,KAAMjB,EAASG,SAAU,YAAegB,EAAYlB,EAAKE,GAEjF,IAAKc,EACD,MAAM,IAAIG,MAAM,iDAGpB,MAAMC,SAAEA,EAAQC,OAAEA,GAAWC,EAAcN,GACrCZ,EAAUJ,GAAOiB,SAAyBA,EAAeM,WAAWvB,GACpEwB,EAAexB,GAAOiB,SAAyBA,EAAeQ,oBAAoBzB,GAExF,OACI0B,gBAACC,EAAgB,KACZnB,GAAeA,EAAYoB,OAAS,GAAKF,EAAAG,cAACC,EAAW,CAACtB,YAAaA,EAAaD,MAAOA,IACxFmB,EAAAG,cAACE,EAAQ,CACL3B,QAAyB,OAAhBC,EAAuB,KAAOA,GAAeD,EACtDD,aAAcA,EACdiB,SAAUA,EACVR,aAAc,CAAEE,gBAAeC,gBAEnCW,EAAAG,cAAA,MAAA,CAAKG,UAAU,aACXN,EAAAG,cAACI,EAAQ,CACLb,SAAUA,EACVC,OAAQA,EACRV,MAAOA,EACPd,WAAYA,EACZI,OAAQA,EACRgB,eAAgBA,EAChBX,SAAUA,EACVN,IAAKA,EACLF,KAAMA,IAET0B,GAAgBE,EAAAG,cAACK,EAAY,CAACC,KAAMX,GAAeX,KAEtDJ,GAAQC,IAASgB,EAAAG,cAACO,EAAU,CAAC3B,KAAMA,EAAMC,KAAMA"}
@@ -0,0 +1,30 @@
1
+ export declare const DEFAULT_TAGS: {
2
+ Heading: import("react").ForwardRefExoticComponent<import("../../ui/heading").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
3
+ AnchorHeading: import("react").FC<import("../../blocks/anchor-heading").AnchorHeadingProps>;
4
+ ContentLink: import("react").FC<import("../../ui/content-link").ContentLinkProps>;
5
+ Block: import("react").FC<import("react").PropsWithChildren<import("../../ui/block").BlockProps>>;
6
+ Table: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").TableProps>>;
7
+ Thead: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").TheadProps>>;
8
+ Tr: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").TrProps>>;
9
+ Th: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").ThProps>>;
10
+ Tbody: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").TbodyProps>>;
11
+ Td: import("react").FC<import("react").PropsWithChildren<import("../../ui/table").TdProps>>;
12
+ CodeBlock: import("react").FC<import("../../ui/code-block").CodeBlockProps>;
13
+ CodeSpan: import("react").FC<import("../../ui/code-span").CodeSpanProps>;
14
+ Del: import("react").FC<import("react").PropsWithChildren<import("../../ui/del").DelProps>>;
15
+ Em: import("react").FC<import("react").PropsWithChildren<import("../../ui/em").EmProps>>;
16
+ Hr: import("react").FC<import("react").PropsWithChildren<import("../../ui/hr").HrProps>>;
17
+ Img: import("react").FC<import("../../ui/img").ImgProps>;
18
+ ListItem: import("react").FC<import("react").PropsWithChildren<import("../../ui/list").ListItemProps>>;
19
+ OrderedList: import("react").FC<import("react").PropsWithChildren<import("../../ui/list").OrderedListProps>>;
20
+ UnorderedList: import("react").FC<import("react").PropsWithChildren<import("../../ui/list").UnorderedListProps>>;
21
+ Paragraph: import("react").FC<import("react").PropsWithChildren<import("../../ui/paragraph").ParagraphProps>>;
22
+ Strong: import("react").FC<import("react").PropsWithChildren<import("../../ui/strong").StrongProps>>;
23
+ TaskListItem: import("react").FC<import("react").PropsWithChildren<import("../../ui/task-list").TaskListItemProps>>;
24
+ TaskOrderedList: import("react").FC<import("react").PropsWithChildren<import("../../ui/list").OrderedListProps>>;
25
+ TaskUnorderedList: import("react").FC<import("react").PropsWithChildren<import("../../ui/task-list").TaskUnorderedListProps>>;
26
+ Tabs: import("react").FC<import("../../ui/tabs").TabsProps>;
27
+ CodeSection: import("react").FC<import("../../blocks/code-section").CodeSectionProps>;
28
+ Blockquote: import("react").FC<import("react").PropsWithChildren<import("../../ui/blockquote").BlockquoteProps>>;
29
+ };
30
+ //# sourceMappingURL=tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/article/tags.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{AnchorHeading as i}from"../../blocks/anchor-heading/index.js";import{CodeSection as o}from"../../blocks/code-section/index.js";import{NavContentLink as r}from"../../blocks/nav-content-link/index.js";import{Block as t}from"../../ui/block/index.js";import{Blockquote as e}from"../../ui/blockquote/index.js";import{CodeBlock as s}from"../../ui/code-block/index.js";import{CodeSpan as m}from"../../ui/code-span/index.js";import{Del as d}from"../../ui/del/index.js";import{Em as n}from"../../ui/em/index.js";import{Heading as a}from"../../ui/heading/index.js";import{Hr as p}from"../../ui/hr/index.js";import{Img as l}from"../../ui/img/index.js";import{ListItem as u}from"../../ui/list/list-item/index.js";import{OrderedList as x}from"../../ui/list/ordered-list/index.js";import{UnorderedList as f}from"../../ui/list/unordered-list/index.js";import{Paragraph as j}from"../../ui/paragraph/index.js";import{Strong as k}from"../../ui/strong/index.js";import{Table as b}from"../../ui/table/table/index.js";import{Tbody as c}from"../../ui/table/tbody/index.js";import{Td as h}from"../../ui/table/td/index.js";import{Th as g}from"../../ui/table/th/index.js";import{Thead as T}from"../../ui/table/thead/index.js";import{Tr as L}from"../../ui/table/tr/index.js";import{Tabs as C}from"../../ui/tabs/index.js";import{TaskListItem as B}from"../../ui/task-list/task-list-item/index.js";import{TaskOrderedList as H}from"../../ui/task-list/task-ordered-list/index.js";import{TaskUnorderedList as I}from"../../ui/task-list/task-unordered-list/index.js";const S={Heading:a,AnchorHeading:i,ContentLink:r,Block:t,Table:b,Thead:T,Tr:L,Th:g,Tbody:c,Td:h,CodeBlock:s,CodeSpan:m,Del:d,Em:n,Hr:p,Img:l,ListItem:u,OrderedList:x,UnorderedList:f,Paragraph:j,Strong:k,TaskListItem:B,TaskOrderedList:H,TaskUnorderedList:I,Tabs:C,CodeSection:o,Blockquote:e};export{S as DEFAULT_TAGS};
2
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sources":["../../../../src/components/elements/article/tags.tsx"],"sourcesContent":["import { AnchorHeading } from \"@src/components/blocks/anchor-heading\";\nimport { CodeSection } from \"@src/components/blocks/code-section\";\nimport { NavContentLink } from \"@src/components/blocks/nav-content-link\";\nimport { Block } from \"@src/components/ui/block\";\nimport { Blockquote } from \"@src/components/ui/blockquote\";\nimport { CodeBlock } from \"@src/components/ui/code-block\";\nimport { CodeSpan } from \"@src/components/ui/code-span\";\nimport { Del } from \"@src/components/ui/del\";\nimport { Em } from \"@src/components/ui/em\";\nimport { Heading } from \"@src/components/ui/heading\";\nimport { Hr } from \"@src/components/ui/hr\";\nimport { Img } from \"@src/components/ui/img\";\nimport { ListItem, OrderedList, UnorderedList } from \"@src/components/ui/list\";\nimport { Paragraph } from \"@src/components/ui/paragraph\";\nimport { Strong } from \"@src/components/ui/strong\";\nimport { Table, Tbody, Td, Th, Thead, Tr } from \"@src/components/ui/table\";\nimport { Tabs } from \"@src/components/ui/tabs\";\nimport { TaskListItem, TaskOrderedList, TaskUnorderedList } from \"@src/components/ui/task-list\";\n\nexport const DEFAULT_TAGS = {\n Heading,\n AnchorHeading,\n ContentLink: NavContentLink,\n Block,\n Table,\n Thead,\n Tr,\n Th,\n Tbody,\n Td,\n CodeBlock,\n CodeSpan,\n Del,\n Em,\n Hr,\n Img,\n ListItem,\n OrderedList,\n UnorderedList,\n Paragraph,\n Strong,\n TaskListItem,\n TaskOrderedList,\n TaskUnorderedList,\n Tabs,\n CodeSection,\n Blockquote,\n};\n"],"names":["DEFAULT_TAGS","Heading","AnchorHeading","ContentLink","NavContentLink","Block","Table","Thead","Tr","Th","Tbody","Td","CodeBlock","CodeSpan","Del","Em","Hr","Img","ListItem","OrderedList","UnorderedList","Paragraph","Strong","TaskListItem","TaskOrderedList","TaskUnorderedList","Tabs","CodeSection","Blockquote"],"mappings":"ogDAmBO,MAAMA,EAAe,CACxBC,UACAC,gBACAC,YAAaC,EACbC,QACAC,QACAC,QACAC,KACAC,KACAC,QACAC,KACAC,YACAC,WACAC,MACAC,KACAC,KACAC,MACAC,WACAC,cACAC,gBACAC,YACAC,SACAC,eACAC,kBACAC,oBACAC,OACAC,cACAC"}
@@ -1,4 +1,10 @@
1
1
  import React from "react";
2
2
  import "./blog-container.scss";
3
+ /**
4
+ * Container component for blog layout.
5
+ * Provides proper styling and structure for blog pages.
6
+ *
7
+ * @see {@link https://robindoc.com/docs/customization/elements/containers Containers}
8
+ */
3
9
  export declare const BlogContainer: React.FC<React.PropsWithChildren>;
4
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/blog-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAM3D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/blog-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAM3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/elements/blog-container/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./blog-container.scss\";\n\nexport const BlogContainer: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Container component=\"main\" className=\"r-blog-container\">\n {children}\n </Container>\n );\n};\n"],"names":["BlogContainer","children","React","createElement","Container","component","className"],"mappings":"mFAMaA,EAAmD,EAAGC,cAE3DC,EAAAC,cAACC,EAAS,CAACC,UAAU,OAAOC,UAAU,oBACjCL"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/elements/blog-container/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./blog-container.scss\";\n\n/**\n * Container component for blog layout.\n * Provides proper styling and structure for blog pages.\n *\n * @see {@link https://robindoc.com/docs/customization/elements/containers Containers}\n */\nexport const BlogContainer: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Container component=\"main\" className=\"r-blog-container\">\n {children}\n </Container>\n );\n};\n"],"names":["BlogContainer","children","React","createElement","Container","component","className"],"mappings":"mFAYaA,EAAmD,EAAGC,cAE3DC,EAAAC,cAACC,EAAS,CAACC,UAAU,OAAOC,UAAU,oBACjCL"}
@@ -1,4 +1,10 @@
1
1
  import React from "react";
2
2
  import "./docs-container.scss";
3
+ /**
4
+ * Container component for documentation layout.
5
+ * Provides proper styling and structure for docs pages.
6
+ *
7
+ * @see {@link https://robindoc.com/docs/customization/elements/containers Containers}
8
+ */
3
9
  export declare const DocsContainer: React.FC<React.PropsWithChildren>;
4
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/docs-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAM3D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/docs-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAM3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/elements/docs-container/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./docs-container.scss\";\n\nexport const DocsContainer: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Container component=\"main\" className=\"r-docs-container\">\n {children}\n </Container>\n );\n};\n"],"names":["DocsContainer","children","React","createElement","Container","component","className"],"mappings":"mFAMaA,EAAmD,EAAGC,cAE3DC,EAAAC,cAACC,EAAS,CAACC,UAAU,OAAOC,UAAU,oBACjCL"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/elements/docs-container/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./docs-container.scss\";\n\n/**\n * Container component for documentation layout.\n * Provides proper styling and structure for docs pages.\n *\n * @see {@link https://robindoc.com/docs/customization/elements/containers Containers}\n */\nexport const DocsContainer: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Container component=\"main\" className=\"r-docs-container\">\n {children}\n </Container>\n );\n};\n"],"names":["DocsContainer","children","React","createElement","Container","component","className"],"mappings":"mFAYaA,EAAmD,EAAGC,cAE3DC,EAAAC,cAACC,EAAS,CAACC,UAAU,OAAOC,UAAU,oBACjCL"}
@@ -4,5 +4,10 @@ export type FooterProps = {
4
4
  copyright: string;
5
5
  hidePoweredBy?: boolean;
6
6
  };
7
+ /**
8
+ * Footer component for documentation site.
9
+ *
10
+ * @see {@link https://robindoc.com/docs/customization/elements/footer Footer customization}
11
+ */
7
12
  export declare const Footer: React.FC<FooterProps>;
8
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwBxC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwBxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/elements/footer/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ThemeSwitcher } from \"@src/components/blocks/theme-switcher\";\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./footer.scss\";\n\nexport type FooterProps = {\n copyright: string;\n hidePoweredBy?: boolean;\n};\n\nexport const Footer: React.FC<FooterProps> = ({ copyright, hidePoweredBy }) => (\n <footer className=\"r-footer\">\n <Container className=\"r-footer-container\">\n <div className=\"r-footer-row\">\n <div className=\"r-copyright\">{copyright}</div>\n <ThemeSwitcher />\n </div>\n {!hidePoweredBy && (\n <div className=\"r-footer-row r-footer-additional\">\n <div className=\"r-powered\">\n Powered by{\" \"}\n <a\n href=\"https://robindoc.com\"\n className=\"r-powered-link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n ROBINDOC\n </a>\n </div>\n </div>\n )}\n </Container>\n </footer>\n);\n"],"names":["Footer","copyright","hidePoweredBy","React","createElement","className","Container","ThemeSwitcher","href","target","rel"],"mappings":"kJAYO,MAAMA,EAAgC,EAAGC,YAAWC,mBACvDC,EAAAC,cAAA,SAAA,CAAQC,UAAU,YACdF,EAAAC,cAACE,EAAS,CAACD,UAAU,sBACjBF,EAAAC,cAAA,MAAA,CAAKC,UAAU,gBACXF,EAAAC,cAAA,MAAA,CAAKC,UAAU,eAAeJ,GAC9BE,EAAAC,cAACG,UAEHL,GACEC,EAAAC,cAAA,MAAA,CAAKC,UAAU,oCACXF,EAAAC,cAAA,MAAA,CAAKC,UAAU,0BACA,IACXF,EAAAC,cAAA,IAAA,CACII,KAAK,uBACLH,UAAU,iBACVI,OAAO,SACPC,IAAI,uBAAqB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/elements/footer/index.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ThemeSwitcher } from \"@src/components/blocks/theme-switcher\";\nimport { Container } from \"@src/components/ui/container\";\n\nimport \"./footer.scss\";\n\nexport type FooterProps = {\n copyright: string;\n hidePoweredBy?: boolean;\n};\n\n/**\n * Footer component for documentation site.\n *\n * @see {@link https://robindoc.com/docs/customization/elements/footer Footer customization}\n */\nexport const Footer: React.FC<FooterProps> = ({ copyright, hidePoweredBy }) => (\n <footer className=\"r-footer\">\n <Container className=\"r-footer-container\">\n <div className=\"r-footer-row\">\n <div className=\"r-copyright\">{copyright}</div>\n <ThemeSwitcher />\n </div>\n {!hidePoweredBy && (\n <div className=\"r-footer-row r-footer-additional\">\n <div className=\"r-powered\">\n Powered by{\" \"}\n <a\n href=\"https://robindoc.com\"\n className=\"r-powered-link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n ROBINDOC\n </a>\n </div>\n </div>\n )}\n </Container>\n </footer>\n);\n"],"names":["Footer","copyright","hidePoweredBy","React","createElement","className","Container","ThemeSwitcher","href","target","rel"],"mappings":"kJAiBO,MAAMA,EAAgC,EAAGC,YAAWC,mBACvDC,EAAAC,cAAA,SAAA,CAAQC,UAAU,YACdF,EAAAC,cAACE,EAAS,CAACD,UAAU,sBACjBF,EAAAC,cAAA,MAAA,CAAKC,UAAU,gBACXF,EAAAC,cAAA,MAAA,CAAKC,UAAU,eAAeJ,GAC9BE,EAAAC,cAACG,UAEHL,GACEC,EAAAC,cAAA,MAAA,CAAKC,UAAU,oCACXF,EAAAC,cAAA,MAAA,CAAKC,UAAU,0BACA,IACXF,EAAAC,cAAA,IAAA,CACII,KAAK,uBACLH,UAAU,iBACVI,OAAO,SACPC,IAAI,uBAAqB"}
@@ -26,6 +26,12 @@ export type HeaderProps = {
26
26
  versions?: SectionType;
27
27
  locales?: SectionType;
28
28
  } & HeaderMenuProps & SearchProps;
29
+ /**
30
+ * Header component for documentation site navigation.
31
+ *
32
+ * @see {@link https://robindoc.com/docs/customization/elements/header Header customization}
33
+ * @see {@link https://robindoc.com/docs/customization/search Search integration}
34
+ */
29
35
  export declare const Header: React.FC<HeaderProps>;
30
36
  export {};
31
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,KAAK,eAAe,EAAE,iCAA2C;AACtF,OAAO,EAAU,KAAK,WAAW,EAAE,4BAAsC;AAMzE,KAAK,aAAa,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,KAAK,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ,GAAG,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAA;KAAE,CAAC;IACxD,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;CACzB,GAAG,eAAe,GACf,WAAW,CAAC;AAEhB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WA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