robindoc 3.6.4 → 3.7.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.
Files changed (131) 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/blocks/preferences-detector/index.d.ts +3 -0
  7. package/lib/components/blocks/preferences-detector/index.d.ts.map +1 -0
  8. package/lib/components/blocks/preferences-detector/index.js +3 -0
  9. package/lib/components/blocks/preferences-detector/index.js.map +1 -0
  10. package/lib/components/blocks/theme-switcher/index.js +1 -1
  11. package/lib/components/blocks/theme-switcher/index.js.map +1 -1
  12. package/lib/components/elements/article/document.d.ts +6 -10
  13. package/lib/components/elements/article/document.d.ts.map +1 -1
  14. package/lib/components/elements/article/document.js +1 -1
  15. package/lib/components/elements/article/document.js.map +1 -1
  16. package/lib/components/elements/article/index.d.ts +13 -13
  17. package/lib/components/elements/article/index.d.ts.map +1 -1
  18. package/lib/components/elements/article/index.js +1 -1
  19. package/lib/components/elements/article/index.js.map +1 -1
  20. package/lib/components/elements/article/tags.d.ts +30 -0
  21. package/lib/components/elements/article/tags.d.ts.map +1 -0
  22. package/lib/components/elements/article/tags.js +2 -0
  23. package/lib/components/elements/article/tags.js.map +1 -0
  24. package/lib/components/elements/blog-container/index.d.ts +6 -0
  25. package/lib/components/elements/blog-container/index.d.ts.map +1 -1
  26. package/lib/components/elements/blog-container/index.js.map +1 -1
  27. package/lib/components/elements/docs-container/index.d.ts +6 -0
  28. package/lib/components/elements/docs-container/index.d.ts.map +1 -1
  29. package/lib/components/elements/docs-container/index.js.map +1 -1
  30. package/lib/components/elements/footer/index.d.ts +5 -0
  31. package/lib/components/elements/footer/index.d.ts.map +1 -1
  32. package/lib/components/elements/footer/index.js.map +1 -1
  33. package/lib/components/elements/header/index.d.ts +6 -0
  34. package/lib/components/elements/header/index.d.ts.map +1 -1
  35. package/lib/components/elements/header/index.js.map +1 -1
  36. package/lib/components/elements/keylink-to-content/index.d.ts +6 -0
  37. package/lib/components/elements/keylink-to-content/index.d.ts.map +1 -1
  38. package/lib/components/elements/keylink-to-content/index.js.map +1 -1
  39. package/lib/components/elements/keylink-to-navigation/index.d.ts +6 -0
  40. package/lib/components/elements/keylink-to-navigation/index.d.ts.map +1 -1
  41. package/lib/components/elements/keylink-to-navigation/index.js.map +1 -1
  42. package/lib/components/elements/page-container/index.d.ts +6 -0
  43. package/lib/components/elements/page-container/index.d.ts.map +1 -1
  44. package/lib/components/elements/page-container/index.js.map +1 -1
  45. package/lib/components/elements/robin-provider/index.d.ts +16 -0
  46. package/lib/components/elements/robin-provider/index.d.ts.map +1 -1
  47. package/lib/components/elements/robin-provider/index.js +1 -1
  48. package/lib/components/elements/robin-provider/index.js.map +1 -1
  49. package/lib/components/elements/sidebar/index.d.ts +6 -0
  50. package/lib/components/elements/sidebar/index.d.ts.map +1 -1
  51. package/lib/components/elements/sidebar/index.js.map +1 -1
  52. package/lib/components/ui/block/index.d.ts +1 -2
  53. package/lib/components/ui/block/index.d.ts.map +1 -1
  54. package/lib/components/ui/block/index.js.map +1 -1
  55. package/lib/components/ui/blockquote/index.d.ts +1 -2
  56. package/lib/components/ui/blockquote/index.d.ts.map +1 -1
  57. package/lib/components/ui/blockquote/index.js.map +1 -1
  58. package/lib/components/ui/code-span/index.d.ts +1 -2
  59. package/lib/components/ui/code-span/index.d.ts.map +1 -1
  60. package/lib/components/ui/code-span/index.js +1 -1
  61. package/lib/components/ui/code-span/index.js.map +1 -1
  62. package/lib/components/ui/del/index.d.ts +1 -2
  63. package/lib/components/ui/del/index.d.ts.map +1 -1
  64. package/lib/components/ui/del/index.js.map +1 -1
  65. package/lib/components/ui/em/index.d.ts +1 -2
  66. package/lib/components/ui/em/index.d.ts.map +1 -1
  67. package/lib/components/ui/em/index.js.map +1 -1
  68. package/lib/components/ui/heading/index.d.ts +1 -2
  69. package/lib/components/ui/heading/index.d.ts.map +1 -1
  70. package/lib/components/ui/heading/index.js.map +1 -1
  71. package/lib/components/ui/hr/index.d.ts +1 -2
  72. package/lib/components/ui/hr/index.d.ts.map +1 -1
  73. package/lib/components/ui/hr/index.js.map +1 -1
  74. package/lib/components/ui/list/list-item/index.d.ts +1 -2
  75. package/lib/components/ui/list/list-item/index.d.ts.map +1 -1
  76. package/lib/components/ui/list/list-item/index.js.map +1 -1
  77. package/lib/components/ui/list/unordered-list/index.d.ts +1 -2
  78. package/lib/components/ui/list/unordered-list/index.d.ts.map +1 -1
  79. package/lib/components/ui/list/unordered-list/index.js.map +1 -1
  80. package/lib/components/ui/paragraph/index.d.ts +1 -2
  81. package/lib/components/ui/paragraph/index.d.ts.map +1 -1
  82. package/lib/components/ui/paragraph/index.js.map +1 -1
  83. package/lib/components/ui/strong/index.d.ts +1 -2
  84. package/lib/components/ui/strong/index.d.ts.map +1 -1
  85. package/lib/components/ui/strong/index.js.map +1 -1
  86. package/lib/components/ui/table/table/index.d.ts +1 -2
  87. package/lib/components/ui/table/table/index.d.ts.map +1 -1
  88. package/lib/components/ui/table/table/index.js.map +1 -1
  89. package/lib/components/ui/table/tbody/index.d.ts +1 -2
  90. package/lib/components/ui/table/tbody/index.d.ts.map +1 -1
  91. package/lib/components/ui/table/tbody/index.js.map +1 -1
  92. package/lib/components/ui/table/td/index.d.ts +2 -2
  93. package/lib/components/ui/table/td/index.d.ts.map +1 -1
  94. package/lib/components/ui/table/td/index.js +1 -1
  95. package/lib/components/ui/table/td/index.js.map +1 -1
  96. package/lib/components/ui/table/th/index.d.ts +2 -2
  97. package/lib/components/ui/table/th/index.d.ts.map +1 -1
  98. package/lib/components/ui/table/th/index.js +1 -1
  99. package/lib/components/ui/table/th/index.js.map +1 -1
  100. package/lib/components/ui/table/thead/index.d.ts +1 -2
  101. package/lib/components/ui/table/thead/index.d.ts.map +1 -1
  102. package/lib/components/ui/table/thead/index.js.map +1 -1
  103. package/lib/components/ui/table/tr/index.d.ts +1 -2
  104. package/lib/components/ui/table/tr/index.d.ts.map +1 -1
  105. package/lib/components/ui/table/tr/index.js.map +1 -1
  106. package/lib/components/ui/task-list/task-list-item/index.d.ts +1 -2
  107. package/lib/components/ui/task-list/task-list-item/index.d.ts.map +1 -1
  108. package/lib/components/ui/task-list/task-list-item/index.js.map +1 -1
  109. package/lib/components/ui/task-list/task-unordered-list/index.d.ts +1 -2
  110. package/lib/components/ui/task-list/task-unordered-list/index.d.ts.map +1 -1
  111. package/lib/components/ui/task-list/task-unordered-list/index.js.map +1 -1
  112. package/lib/core/helpers/tabs.d.ts +2 -0
  113. package/lib/core/helpers/tabs.d.ts.map +1 -0
  114. package/lib/core/helpers/tabs.js +2 -0
  115. package/lib/core/helpers/tabs.js.map +1 -0
  116. package/lib/core/helpers/theme.d.ts +2 -0
  117. package/lib/core/helpers/theme.d.ts.map +1 -0
  118. package/lib/core/helpers/theme.js +2 -0
  119. package/lib/core/helpers/theme.js.map +1 -0
  120. package/lib/core/types/initialize.d.ts +13 -0
  121. package/lib/core/types/initialize.d.ts.map +1 -1
  122. package/lib/core/utils/initialize-robindoc.d.ts +20 -0
  123. package/lib/core/utils/initialize-robindoc.d.ts.map +1 -1
  124. package/lib/core/utils/initialize-robindoc.js +1 -1
  125. package/lib/core/utils/initialize-robindoc.js.map +1 -1
  126. package/lib/styles.css +328 -304
  127. package/package.json +2 -3
  128. package/lib/components/blocks/theme-detector/index.d.ts +0 -3
  129. package/lib/components/blocks/theme-detector/index.d.ts.map +0 -1
  130. package/lib/components/blocks/theme-detector/index.js +0 -3
  131. package/lib/components/blocks/theme-detector/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ui/heading/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./heading.scss\";\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n component: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n className?: string;\n}\n\nexport const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(\n ({ component: Component, className, ...props }, ref) => {\n return <Component className={clsx(`r-h r-${Component}`, className)} {...props} ref={ref} />;\n },\n);\n"],"names":["Heading","React","forwardRef","component","Component","className","props","ref","createElement","clsx"],"mappings":"+CAUaA,EAAUC,EAAMC,WACzB,EAAGC,UAAWC,EAAWC,eAAcC,GAASC,IACrCN,EAAAO,cAACJ,EAAS,CAACC,UAAWI,EAAK,SAASL,IAAaC,MAAgBC,EAAOC,IAAKA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ui/heading/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./heading.scss\";\n\nexport interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n component: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n className?: string;\n}\n\nexport const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(\n ({ component: Component, className, ...props }, ref) => {\n return <Component className={clsx(`r-h r-${Component}`, className)} {...props} ref={ref} />;\n },\n);\n"],"names":["Heading","React","forwardRef","component","Component","className","props","ref","createElement","clsx"],"mappings":"+CAUaA,EAAUC,EAAMC,WACzB,EAAGC,UAAWC,EAAWC,eAAcC,GAASC,IACrCN,EAAAO,cAACJ,EAAS,CAACC,UAAWI,EAAK,SAASL,IAAaC,MAAgBC,EAAOC,IAAKA"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- interface HrProps {
2
+ export interface HrProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const Hr: React.FC<React.PropsWithChildren<HrProps>>;
6
- export {};
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/hr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/hr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,OAAO;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ui/hr/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface HrProps {\n className?: string;\n}\n\nexport const Hr: React.FC<React.PropsWithChildren<HrProps>> = ({ className, children }) => {\n return <hr className={clsx(\"r-hr\", className)}>{children}</hr>;\n};\n"],"names":["Hr","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ui/hr/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nexport interface HrProps {\n className?: string;\n}\n\nexport const Hr: React.FC<React.PropsWithChildren<HrProps>> = ({ className, children }) => {\n return <hr className={clsx(\"r-hr\", className)}>{children}</hr>;\n};\n"],"names":["Hr","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./list-item.scss";
3
- interface ListItemProps {
3
+ export interface ListItemProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const ListItem: React.FC<React.PropsWithChildren<ListItemProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/list/list-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,kBAAkB,CAAC;AAE1B,UAAU,aAAa;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAErE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/list/list-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAErE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/list/list-item/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./list-item.scss\";\n\ninterface ListItemProps {\n className?: string;\n}\n\nexport const ListItem: React.FC<React.PropsWithChildren<ListItemProps>> = ({ className, children }) => {\n return <li className={clsx(\"r-li\", className)}>{children}</li>;\n};\n"],"names":["ListItem","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAA6D,EAAGC,YAAWC,cAC7EC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/list/list-item/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./list-item.scss\";\n\nexport interface ListItemProps {\n className?: string;\n}\n\nexport const ListItem: React.FC<React.PropsWithChildren<ListItemProps>> = ({ className, children }) => {\n return <li className={clsx(\"r-li\", className)}>{children}</li>;\n};\n"],"names":["ListItem","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAA6D,EAAGC,YAAWC,cAC7EC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./unordered-list.scss";
3
- interface UnorderedListProps {
3
+ export interface UnorderedListProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const UnorderedList: React.FC<React.PropsWithChildren<UnorderedListProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/list/unordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,uBAAuB,CAAC;AAE/B,UAAU,kBAAkB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAE/E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/list/unordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAE/E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/list/unordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./unordered-list.scss\";\n\ninterface UnorderedListProps {\n className?: string;\n}\n\nexport const UnorderedList: React.FC<React.PropsWithChildren<UnorderedListProps>> = ({ className, children }) => {\n return <ul className={clsx(\"r-ul\", className)}>{children}</ul>;\n};\n"],"names":["UnorderedList","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuE,EAAGC,YAAWC,cACvFC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/list/unordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./unordered-list.scss\";\n\nexport interface UnorderedListProps {\n className?: string;\n}\n\nexport const UnorderedList: React.FC<React.PropsWithChildren<UnorderedListProps>> = ({ className, children }) => {\n return <ul className={clsx(\"r-ul\", className)}>{children}</ul>;\n};\n"],"names":["UnorderedList","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuE,EAAGC,YAAWC,cACvFC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./paragraph.scss";
3
- interface ParagraphProps {
3
+ export interface ParagraphProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const Paragraph: React.FC<React.PropsWithChildren<ParagraphProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/paragraph/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAEvE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/paragraph/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAEvE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ui/paragraph/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./paragraph.scss\";\n\ninterface ParagraphProps {\n className?: string;\n}\n\nexport const Paragraph: React.FC<React.PropsWithChildren<ParagraphProps>> = ({ className, children }) => {\n return <p className={clsx(\"r-p\", className)}>{children}</p>;\n};\n"],"names":["Paragraph","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAA+D,EAAGC,YAAWC,cAC/EC,EAAAC,cAAA,IAAA,CAAGH,UAAWI,EAAK,MAAOJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ui/paragraph/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./paragraph.scss\";\n\nexport interface ParagraphProps {\n className?: string;\n}\n\nexport const Paragraph: React.FC<React.PropsWithChildren<ParagraphProps>> = ({ className, children }) => {\n return <p className={clsx(\"r-p\", className)}>{children}</p>;\n};\n"],"names":["Paragraph","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAA+D,EAAGC,YAAWC,cAC/EC,EAAAC,cAAA,IAAA,CAAGH,UAAWI,EAAK,MAAOJ,IAAaC"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- interface StrongProps {
2
+ export interface StrongProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const Strong: React.FC<React.PropsWithChildren<StrongProps>>;
6
- export {};
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/strong/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAEjE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/strong/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAEjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/ui/strong/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface StrongProps {\n className?: string;\n}\n\nexport const Strong: React.FC<React.PropsWithChildren<StrongProps>> = ({ className, children }) => {\n return <strong className={clsx(\"r-strong\", className)}>{children}</strong>;\n};\n"],"names":["Strong","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAyD,EAAGC,YAAWC,cACzEC,EAAAC,cAAA,SAAA,CAAQH,UAAWI,EAAK,WAAYJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ui/strong/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nexport interface StrongProps {\n className?: string;\n}\n\nexport const Strong: React.FC<React.PropsWithChildren<StrongProps>> = ({ className, children }) => {\n return <strong className={clsx(\"r-strong\", className)}>{children}</strong>;\n};\n"],"names":["Strong","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAyD,EAAGC,YAAWC,cACzEC,EAAAC,cAAA,SAAA,CAAQH,UAAWI,EAAK,WAAYJ,IAAaC"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./table.scss";
3
- interface TableProps {
3
+ export interface TableProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const Table: React.FC<React.PropsWithChildren<TableProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,UAAU;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/table/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./table.scss\";\n\ninterface TableProps {\n className?: string;\n}\n\nexport const Table: React.FC<React.PropsWithChildren<TableProps>> = ({ className, children }) => {\n return <table className={clsx(\"r-table\", className)}>{children}</table>;\n};\n"],"names":["Table","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/table/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./table.scss\";\n\nexport interface TableProps {\n className?: string;\n}\n\nexport const Table: React.FC<React.PropsWithChildren<TableProps>> = ({ className, children }) => {\n return <table className={clsx(\"r-table\", className)}>{children}</table>;\n};\n"],"names":["Table","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- interface TbodyProps {
2
+ export interface TbodyProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const Tbody: React.FC<React.PropsWithChildren<TbodyProps>>;
6
- export {};
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface TbodyProps {\n className?: string;\n}\n\nexport const Tbody: React.FC<React.PropsWithChildren<TbodyProps>> = ({ className, children }) => {\n return <tbody className={clsx(\"r-tbody\", className)}>{children}</tbody>;\n};\n"],"names":["Tbody","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nexport interface TbodyProps {\n className?: string;\n}\n\nexport const Tbody: React.FC<React.PropsWithChildren<TbodyProps>> = ({ className, children }) => {\n return <tbody className={clsx(\"r-tbody\", className)}>{children}</tbody>;\n};\n"],"names":["Tbody","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import "./td.scss";
3
- interface TdProps {
3
+ export interface TdProps {
4
4
  className?: string;
5
+ align?: "left" | "center" | "right" | null;
5
6
  }
6
7
  export declare const Td: React.FC<React.PropsWithChildren<TdProps>>;
7
- export {};
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/td/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/td/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,MAAM,WAAW,OAAO;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;CAC9C;AAQD,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"clsx";const t=({className:t,children:c})=>e.createElement("td",{className:r("r-td",t)},c);export{t as Td};
1
+ import t from"react";import r from"clsx";const e={left:"r-td_left",center:"r-td_center",right:"r-td_right"},c=({className:c,children:l,align:a})=>t.createElement("td",{className:r("r-td",c,a&&e[a])},l);export{c as Td};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/td/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./td.scss\";\n\ninterface TdProps {\n className?: string;\n}\n\nexport const Td: React.FC<React.PropsWithChildren<TdProps>> = ({ className, children }) => {\n return <td className={clsx(\"r-td\", className)}>{children}</td>;\n};\n"],"names":["Td","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/td/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./td.scss\";\n\nexport interface TdProps {\n className?: string;\n align?: \"left\" | \"center\" | \"right\" | null;\n}\n\nconst ALIGN_CLASSES = {\n left: \"r-td_left\",\n center: \"r-td_center\",\n right: \"r-td_right\",\n};\n\nexport const Td: React.FC<React.PropsWithChildren<TdProps>> = ({ className, children, align }) => {\n return <td className={clsx(\"r-td\", className, align && ALIGN_CLASSES[align])}>{children}</td>;\n};\n"],"names":["ALIGN_CLASSES","left","center","right","Td","className","children","align","React","clsx"],"mappings":"yCAUA,MAAMA,EAAgB,CAClBC,KAAM,YACNC,OAAQ,cACRC,MAAO,cAGEC,EAAiD,EAAGC,YAAWC,WAAUC,WAC3EC,sBAAIH,UAAWI,EAAK,OAAQJ,EAAWE,GAASP,EAAcO,KAAUD"}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import "./th.scss";
3
- interface ThProps {
3
+ export interface ThProps {
4
4
  className?: string;
5
+ align?: "left" | "center" | "right" | null;
5
6
  }
6
7
  export declare const Th: React.FC<React.PropsWithChildren<ThProps>>;
7
- export {};
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/th/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/th/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,MAAM,WAAW,OAAO;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;CAC9C;AAQD,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"clsx";const t=({className:t,children:c})=>e.createElement("th",{className:r("r-th",t)},c);export{t as Th};
1
+ import t from"react";import r from"clsx";const e={left:"r-th_left",center:"r-th_center",right:"r-th_right"},c=({className:c,children:h,align:l})=>t.createElement("th",{className:r("r-th",c,l&&e[l])},h);export{c as Th};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/th/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./th.scss\";\n\ninterface ThProps {\n className?: string;\n}\n\nexport const Th: React.FC<React.PropsWithChildren<ThProps>> = ({ className, children }) => {\n return <th className={clsx(\"r-th\", className)}>{children}</th>;\n};\n"],"names":["Th","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/th/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./th.scss\";\n\nexport interface ThProps {\n className?: string;\n align?: \"left\" | \"center\" | \"right\" | null;\n}\n\nconst ALIGN_CLASSES = {\n left: \"r-th_left\",\n center: \"r-th_center\",\n right: \"r-th_right\",\n};\n\nexport const Th: React.FC<React.PropsWithChildren<ThProps>> = ({ className, children, align }) => {\n return <th className={clsx(\"r-th\", className, align && ALIGN_CLASSES[align])}>{children}</th>;\n};\n"],"names":["ALIGN_CLASSES","left","center","right","Th","className","children","align","React","clsx"],"mappings":"yCAUA,MAAMA,EAAgB,CAClBC,KAAM,YACNC,OAAQ,cACRC,MAAO,cAGEC,EAAiD,EAAGC,YAAWC,WAAUC,WAC3EC,sBAAIH,UAAWI,EAAK,OAAQJ,EAAWE,GAASP,EAAcO,KAAUD"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./thead.scss";
3
- interface TheadProps {
3
+ export interface TheadProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const Thead: React.FC<React.PropsWithChildren<TheadProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,UAAU;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./thead.scss\";\n\ninterface TheadProps {\n className?: string;\n}\n\nexport const Thead: React.FC<React.PropsWithChildren<TheadProps>> = ({ className, children }) => {\n return <thead className={clsx(\"r-thead\", className)}>{children}</thead>;\n};\n"],"names":["Thead","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./thead.scss\";\n\nexport interface TheadProps {\n className?: string;\n}\n\nexport const Thead: React.FC<React.PropsWithChildren<TheadProps>> = ({ className, children }) => {\n return <thead className={clsx(\"r-thead\", className)}>{children}</thead>;\n};\n"],"names":["Thead","className","children","React","createElement","clsx"],"mappings":"yCASO,MAAMA,EAAuD,EAAGC,YAAWC,cACvEC,EAAAC,cAAA,QAAA,CAAOH,UAAWI,EAAK,UAAWJ,IAAaC"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- interface TrProps {
2
+ export interface TrProps {
3
3
  className?: string;
4
4
  }
5
5
  export declare const Tr: React.FC<React.PropsWithChildren<TrProps>>;
6
- export {};
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,OAAO;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface TrProps {\n className?: string;\n}\n\nexport const Tr: React.FC<React.PropsWithChildren<TrProps>> = ({ className, children }) => {\n return <tr className={clsx(\"r-tr\", className)}>{children}</tr>;\n};\n"],"names":["Tr","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nexport interface TrProps {\n className?: string;\n}\n\nexport const Tr: React.FC<React.PropsWithChildren<TrProps>> = ({ className, children }) => {\n return <tr className={clsx(\"r-tr\", className)}>{children}</tr>;\n};\n"],"names":["Tr","className","children","React","createElement","clsx"],"mappings":"yCAOO,MAAMA,EAAiD,EAAGC,YAAWC,cACjEC,EAAAC,cAAA,KAAA,CAAIH,UAAWI,EAAK,OAAQJ,IAAaC"}
@@ -1,9 +1,8 @@
1
1
  import React from "react";
2
2
  import "./task-list-item.scss";
3
- interface TaskListItemProps {
3
+ export interface TaskListItemProps {
4
4
  className?: string;
5
5
  defaultChecked?: boolean;
6
6
  }
7
7
  export declare const TaskListItem: React.FC<React.PropsWithChildren<TaskListItemProps>>;
8
- export {};
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,uBAAuB,CAAC;AAE/B,UAAU,iBAAiB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAa7E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAa7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { ListItem } from \"../../list\";\n\nimport \"./task-list-item.scss\";\n\ninterface TaskListItemProps {\n className?: string;\n defaultChecked?: boolean;\n}\n\nexport const TaskListItem: React.FC<React.PropsWithChildren<TaskListItemProps>> = ({\n className,\n defaultChecked,\n children,\n}) => {\n return (\n <ListItem className={clsx(\"r-task-li\", className)}>\n <label className=\"r-task-label\">\n <input type=\"checkbox\" defaultChecked={defaultChecked} className=\"r-task-checkbox\" />\n <span className=\"r-task-label-text\">{children}</span>\n </label>\n </ListItem>\n );\n};\n"],"names":["TaskListItem","className","defaultChecked","children","React","createElement","ListItem","clsx","type"],"mappings":"kGAYO,MAAMA,EAAqE,EAC9EC,YACAC,iBACAC,cAGIC,EAAAC,cAACC,EAAQ,CAACL,UAAWM,EAAK,YAAaN,IACnCG,EAAAC,cAAA,QAAA,CAAOJ,UAAU,gBACbG,EAAAC,cAAA,QAAA,CAAOG,KAAK,WAAWN,eAAgBA,EAAgBD,UAAU,oBACjEG,EAAAC,cAAA,OAAA,CAAMJ,UAAU,qBAAqBE"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { ListItem } from \"../../list\";\n\nimport \"./task-list-item.scss\";\n\nexport interface TaskListItemProps {\n className?: string;\n defaultChecked?: boolean;\n}\n\nexport const TaskListItem: React.FC<React.PropsWithChildren<TaskListItemProps>> = ({\n className,\n defaultChecked,\n children,\n}) => {\n return (\n <ListItem className={clsx(\"r-task-li\", className)}>\n <label className=\"r-task-label\">\n <input type=\"checkbox\" defaultChecked={defaultChecked} className=\"r-task-checkbox\" />\n <span className=\"r-task-label-text\">{children}</span>\n </label>\n </ListItem>\n );\n};\n"],"names":["TaskListItem","className","defaultChecked","children","React","createElement","ListItem","clsx","type"],"mappings":"kGAYO,MAAMA,EAAqE,EAC9EC,YACAC,iBACAC,cAGIC,EAAAC,cAACC,EAAQ,CAACL,UAAWM,EAAK,YAAaN,IACnCG,EAAAC,cAAA,QAAA,CAAOJ,UAAU,gBACbG,EAAAC,cAAA,QAAA,CAAOG,KAAK,WAAWN,eAAgBA,EAAgBD,UAAU,oBACjEG,EAAAC,cAAA,OAAA,CAAMJ,UAAU,qBAAqBE"}
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
2
  import "./task-unordered-list.scss";
3
- interface TaskUnorderedListProps {
3
+ export interface TaskUnorderedListProps {
4
4
  className?: string;
5
5
  }
6
6
  export declare const TaskUnorderedList: React.FC<React.PropsWithChildren<TaskUnorderedListProps>>;
7
- export {};
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,4BAA4B,CAAC;AAEpC,UAAU,sBAAsB;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAKvF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,4BAA4B,CAAC;AAEpC,MAAM,WAAW,sBAAsB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAKvF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { UnorderedList } from \"../../list\";\n\nimport \"./task-unordered-list.scss\";\n\ninterface TaskUnorderedListProps {\n className?: string;\n}\n\nexport const TaskUnorderedList: React.FC<React.PropsWithChildren<TaskUnorderedListProps>> = ({\n className,\n children,\n}) => {\n return <UnorderedList className={clsx(\"r-task-ul\", className)}>{children}</UnorderedList>;\n};\n"],"names":["TaskUnorderedList","className","children","React","createElement","UnorderedList","clsx"],"mappings":"4GAWO,MAAMA,EAA+E,EACxFC,YACAC,cAEOC,EAAAC,cAACC,EAAa,CAACJ,UAAWK,EAAK,YAAaL,IAAaC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { UnorderedList } from \"../../list\";\n\nimport \"./task-unordered-list.scss\";\n\nexport interface TaskUnorderedListProps {\n className?: string;\n}\n\nexport const TaskUnorderedList: React.FC<React.PropsWithChildren<TaskUnorderedListProps>> = ({\n className,\n children,\n}) => {\n return <UnorderedList className={clsx(\"r-task-ul\", className)}>{children}</UnorderedList>;\n};\n"],"names":["TaskUnorderedList","className","children","React","createElement","UnorderedList","clsx"],"mappings":"4GAWO,MAAMA,EAA+E,EACxFC,YACAC,cAEOC,EAAAC,cAACC,EAAa,CAACJ,UAAWK,EAAK,YAAaL,IAAaC"}
@@ -0,0 +1,2 @@
1
+ export declare const getTabs: () => string[];
2
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/tabs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,gBAInB,CAAC"}
@@ -0,0 +1,2 @@
1
+ const t=()=>{const t=localStorage.getItem("r-tabs");return t?.split(";").filter(t=>t&&/[\w-]+=[\w]+/.test(t))||[]};export{t as getTabs};
2
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["../../../src/core/helpers/tabs.ts"],"sourcesContent":["export const getTabs = () => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && /[\\w-]+=[\\w]+/.test(item)) || [];\n return items;\n};\n"],"names":["getTabs","store","localStorage","getItem","split","filter","item","test"],"mappings":"AAAO,MAAMA,EAAU,KACnB,MAAMC,EAAQC,aAAaC,QAAQ,UAEnC,OADcF,GAAOG,MAAM,KAAKC,OAAQC,GAASA,GAAQ,eAAeC,KAAKD,KAAU"}
@@ -0,0 +1,2 @@
1
+ export declare const getTheme: () => string;
2
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/theme.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,cAMpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ const t=()=>{const t=localStorage.getItem("r-theme");return t&&["light","dark"].includes(t)?t:"system"};export{t as getTheme};
2
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sources":["../../../src/core/helpers/theme.ts"],"sourcesContent":["export const getTheme = () => {\n const userTheme = localStorage.getItem(\"r-theme\");\n if (userTheme && [\"light\", \"dark\"].includes(userTheme)) {\n return userTheme;\n }\n return \"system\";\n};\n"],"names":["getTheme","userTheme","localStorage","getItem","includes"],"mappings":"AAAO,MAAMA,EAAW,KACpB,MAAMC,EAAYC,aAAaC,QAAQ,WACvC,OAAIF,GAAa,CAAC,QAAS,QAAQG,SAASH,GACjCA,EAEJ"}
@@ -1,7 +1,20 @@
1
1
  import { type Structure } from "./structure";
2
+ /**
3
+ * Structure template for documentation initialization.
4
+ * Can be a static structure object or an async function that returns one.
5
+ *
6
+ * @see {@link https://robindoc.com/docs/structure/structure Structure documentation}
7
+ */
2
8
  export type StructureTemplate = Structure | (() => Structure | Promise<Structure>);
9
+ /**
10
+ * Initialization options for Robindoc.
11
+ */
3
12
  export type Options = {
13
+ /** Custom error handler. Receives HTTP status code and message, returns React node or null. */
4
14
  processError?: (status: number, statusText: string) => void | null | never;
15
+ /** Array of regex patterns to validate pathnames. Only matching paths will be processed. */
5
16
  matcher?: string[];
17
+ /** Enable caching of structure data. Defaults to false (revalidates on each request). */
18
+ cache?: boolean;
6
19
  };
7
20
  //# sourceMappingURL=initialize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../src/core/types/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAEnF,MAAM,MAAM,OAAO,GAAG;IAClB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC3E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../src/core/types/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC3E,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yFAAyF;IACzF,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -1,11 +1,27 @@
1
1
  import React from "react";
2
+ import { type TreeItem } from "../../components/elements/sidebar/types";
2
3
  import { type ArticleProps as ArticlePropsBase } from "../../components/elements/article";
3
4
  import { type SidebarProps as SidebarPropsBase } from "../../components/elements/sidebar";
4
5
  import { type StructureTemplate, type Options } from "../types/initialize";
6
+ import { type Pages } from "../types/content";
5
7
  type PageProps = Omit<Partial<ArticlePropsBase>, "uri" | "content" | "provider" | "pathname" | "pages"> & {
6
8
  pathname: string;
7
9
  };
8
10
  type SidebarProps = Omit<SidebarPropsBase, "tree">;
11
+ /**
12
+ * Initializes Robindoc and returns components for rendering documentation pages.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * export const { Page, Sidebar } = initializeRobindoc({
17
+ * configuration: { sourceRoot: "./docs" },
18
+ * items: "auto"
19
+ * });
20
+ * ```
21
+ *
22
+ * @see {@link https://robindoc.com/docs/getting-started/initialization Initialization guide}
23
+ * @see {@link https://robindoc.com/docs/structure/structure Structure configuration}
24
+ */
9
25
  export declare const initializeRobindoc: (structureTemplate: StructureTemplate, options?: Options) => {
10
26
  Page: React.FC<PageProps>;
11
27
  Sidebar: React.FC<SidebarProps>;
@@ -16,6 +32,10 @@ export declare const initializeRobindoc: (structureTemplate: StructureTemplate,
16
32
  raw: string;
17
33
  } | null>;
18
34
  getPageInstruction: (pathname: string) => Promise<import("../types/content").Page | null>;
35
+ revalidate: (background?: boolean) => Promise<{
36
+ pages: Pages;
37
+ tree: TreeItem[];
38
+ }>;
19
39
  };
20
40
  export {};
21
41
  //# 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;AAE1B,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AACjH,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AAEjH,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAO3E,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;AAenD,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,iBAAiB,EAAE,UAAS,OAAY;;;sBA0D3D,CAAC,SAAS,MAAM,wBACnC,MAAM,qBACI,CAAC;4BAiBc,MAAM;4BAwBN,MAAM;;;;mCAuBC,MAAM;CAqBrD,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,EAAE,KAAK,QAAQ,EAAE,gDAA+C;AACvE,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AACjH,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AAEjH,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAO9C,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;AAiBnD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,iBAAiB,EAAE,UAAS,OAAY;;;sBAwF3D,CAAC,SAAS,MAAM,wBACnC,MAAM,qBACI,CAAC;4BA+Bc,MAAM;4BA+BN,MAAM;;;;mCA4BC,MAAM;8BA2BX,OAAO;eA5ON,KAAK;cAAQ,QAAQ,EAAE;;CA4PlE,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"react";import{Article as t}from"../../components/elements/article/index.js";import{Sidebar as e}from"../../components/elements/sidebar/index.js";import{parseStructure as o}from"./parse-structure.js";import{getConfiguration as s}from"./get-configuration.js";import{getMetadata as n}from"./get-metadata.js";import{normalizePathname as a,removeTrailingSlash as c}from"./path-tools.js";import{loadContent as i}from"./load-content.js";const p=(p,u={})=>{const l=(async r=>{let t;t="function"==typeof r?await r():r;const e=s(t.configuration||{});return o(t.items||[],e)})(p),m=u.matcher?.map(r=>new RegExp(`^${r.replace(/^\^|\$$/g,"")}$`));return{Page:async({pathname:e,...o})=>{const s=a(e);if(m&&!m.every(r=>r.test(e))){const r=`Pathname "${s}" doesn't pass matcher rules check`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const{pages:n}=await l,c=n[s];if(!c){const r=`Can not find data for "${s}". Please check structure`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const i=Object.keys(n),p=i.indexOf(s),f=i[p-1],h=p<i.length-1&&i[p+1],d=f&&{pathname:f,title:n[f].title},g=h&&{pathname:h,title:n[h].title},w=c.crumbs.map(r=>({title:n[r].title,pathname:r})),E=Object.entries(n).reduce((r,[t,{origPath:e}])=>(e&&r.push({clientPath:t,origPath:e}),r),[]);return r.createElement(t,{pathname:s,provider:c.configuration.provider,uri:c.uri,title:c.title,breadcrumbs:w,prev:d||void 0,next:g||void 0,pages:E,...o})},Sidebar:async t=>{const{tree:o}=await l;return r.createElement(e,{tree:o,...t})},getStaticParams:async(r="",t="segments")=>{const{pages:e}=await l,o=Object.keys(e),s=c(r);return o.reduce((r,e)=>e.startsWith(s)?(r.push({[t]:e.substring(s.length+1).split("/")}),r):r,[])},getMetadata:async r=>{const t=a(r);if(m&&!m.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const{pages:e}=await l,o=e[t];if(!o){const r=`Can not find data for "${t}". Please check structure`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}return await n({uri:o.uri,provider:o.configuration.provider})},getPageData:async r=>{const t=a(r);if(m&&!m.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const{pages:e}=await l,o=e[t];if(!o){const r=`Can not find data for "${t}". Please check structure`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const s=o.title,{data:n}=await i(o.uri,o.configuration.provider);return{title:s,raw:n}},getPageInstruction:async r=>{const t=a(r);if(m&&!m.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}const{pages:e}=await l,o=e[t];if(!o){const r=`Can not find data for "${t}". Please check structure`;if(u.processError)return u.processError(404,r)||null;throw new Error(r)}return o}}};export{p as initializeRobindoc};
1
+ import r from"react";import{Article as t}from"../../components/elements/article/index.js";import{Sidebar as e}from"../../components/elements/sidebar/index.js";import{parseStructure as a}from"./parse-structure.js";import{getConfiguration as o}from"./get-configuration.js";import{getMetadata as s}from"./get-metadata.js";import{normalizePathname as n,removeTrailingSlash as c}from"./path-tools.js";import{loadContent as i}from"./load-content.js";const u=async r=>{let t;t="function"==typeof r?await r():r;const e=o(t.configuration||{});return a(t.items||[],e)},p=(a,o={})=>{let p=u(a).then(r=>(p=r,r));const l=o.matcher?.map(r=>new RegExp(`^${r.replace(/^\^|\$$/g,"")}$`)),h=async r=>{if("then"in p)return p;if(r){const r=await u(a);p=r}else p=u(a).then(r=>(p=r,r));return p};return{Page:async({pathname:e,...a})=>{const s=n(e);if(l&&!l.every(r=>r.test(e))){const r=`Pathname "${s}" doesn't pass matcher rules check`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}o.cache||await h(!0);const{pages:c}=await p,i=c[s];if(!i){const r=`Can not find data for "${s}". Please check structure`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}const u=Object.keys(c),m=u.indexOf(s),f=u[m-1],w=m<u.length-1&&u[m+1],d=f&&{pathname:f,title:c[f].title},g=w&&{pathname:w,title:c[w].title},E=i.crumbs.map(r=>({title:c[r].title,pathname:r})),y=Object.entries(c).reduce((r,[t,{origPath:e}])=>(e&&r.push({clientPath:t,origPath:e}),r),[]);return r.createElement(t,{pathname:s,provider:i.configuration.provider,uri:i.uri,title:i.title,breadcrumbs:E,prev:d||void 0,next:g||void 0,pages:y,...a})},Sidebar:async t=>{o.cache||await h(!0);const{tree:a}=await p;return r.createElement(e,{tree:a,...t})},getStaticParams:async(r="",t="segments")=>{o.cache||await h(!0);const{pages:e}=await p,a=Object.keys(e),s=c(r);return a.reduce((r,e)=>e.startsWith(s)?(r.push({[t]:e.substring(s.length+1).split("/")}),r):r,[])},getMetadata:async r=>{const t=n(r);if(l&&!l.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}o.cache||await h(!0);const{pages:e}=await p,a=e[t];if(!a){const r=`Can not find data for "${t}". Please check structure`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}return await s({uri:a.uri,provider:a.configuration.provider})},getPageData:async r=>{const t=n(r);if(l&&!l.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}o.cache||await h(!0);const{pages:e}=await p,a=e[t];if(!a){const r=`Can not find data for "${t}". Please check structure`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}const s=a.title,{data:c}=await i(a.uri,a.configuration.provider);return{title:s,raw:c}},getPageInstruction:async r=>{const t=n(r);if(l&&!l.every(t=>t.test(r))){const r=`Pathname "${t}" doesn't pass matcher rules check`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}o.cache||await h(!0);const{pages:e}=await p,a=e[t];if(!a){const r=`Can not find data for "${t}". Please check structure`;if(o.processError)return o.processError(404,r)||null;throw new Error(r)}return a},revalidate:h}};export{p 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\";\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 StructureTemplate, type Options } from \"../types/initialize\";\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: StructureTemplate) => {\n let structure;\n if (typeof structureTemplate === \"function\") {\n structure = await structureTemplate();\n } else {\n structure = structureTemplate;\n }\n\n const configuration = getConfiguration(structure.configuration || {});\n\n return parseStructure(structure.items || [], configuration);\n};\n\nexport const initializeRobindoc = (structureTemplate: StructureTemplate, options: Options = {}) => {\n const structureParsedPromise = loadStructure(structureTemplate);\n const matchingRules = options.matcher?.map((rule) => new RegExp(`^${rule.replace(/^\\^|\\$$/g, \"\")}$`));\n\n const Page: React.FC<PageProps> = async ({ pathname, ...props }) => {\n const pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\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 pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\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 pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\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 pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n return pageInstruction;\n };\n\n return { Page, Sidebar, getStaticParams, getMetadata, getPageData, getPageInstruction };\n};\n"],"names":["initializeRobindoc","structureTemplate","options","structureParsedPromise","async","structure","configuration","getConfiguration","parseStructure","items","loadStructure","matchingRules","matcher","map","rule","RegExp","replace","Page","pathname","props","pathnameNormalized","normalizePathname","every","test","errorMessage","processError","Error","pages","pageInstruction","paths","Object","keys","targetPageIndex","indexOf","prevPagePathname","nextPagePathname","length","prev","title","next","breadcrumbs","crumbs","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","getPage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rBD,SAAUxB,EAAgBtB,cAAc8C,YAgDMmB,YA3ClCnE,MAAOc,IACvB,MAAME,EAAqBC,EAAkBH,GAC7C,GAAIP,IAAkBA,EAAcW,MAAOR,GAASA,EAAKS,KAAKL,IAAY,CACtE,MAAMM,EAAe,aAAaJ,sCAClC,GAAIlB,EAAQuB,aAAc,OAAOvB,EAAQuB,aAAa,IAAKD,IAAiB,KAC5E,MAAM,IAAIE,MAAMF,EACpB,CAEA,MAAMG,MAAEA,SAAgBxB,EAClByB,EAAkBD,EAAMP,GAE9B,IAAKQ,EAAiB,CAClB,MAAMJ,EAAe,0BAA0BJ,6BAC/C,GAAIlB,EAAQuB,aAAc,OAAOvB,EAAQuB,aAAa,IAAKD,IAAiB,KAC5E,MAAM,IAAIE,MAAMF,EACpB,CAEA,MAAMc,EAAQV,EAAgBU,OACxBkC,KAAEA,SAAeC,EAAY7C,EAAgByB,IAAKzB,EAAgBtB,cAAc8C,UAEtF,MAAO,CAAEd,QAAOoC,IAAKF,IAuB0CG,mBApBxCvE,MAAOc,IAC9B,MAAME,EAAqBC,EAAkBH,GAC7C,GAAIP,IAAkBA,EAAcW,MAAOR,GAASA,EAAKS,KAAKL,IAAY,CACtE,MAAMM,EAAe,aAAaJ,sCAClC,GAAIlB,EAAQuB,aAAc,OAAOvB,EAAQuB,aAAa,IAAKD,IAAiB,KAC5E,MAAM,IAAIE,MAAMF,EACpB,CAEA,MAAMG,MAAEA,SAAgBxB,EAClByB,EAAkBD,EAAMP,GAE9B,IAAKQ,EAAiB,CAClB,MAAMJ,EAAe,0BAA0BJ,6BAC/C,GAAIlB,EAAQuB,aAAc,OAAOvB,EAAQuB,aAAa,IAAKD,IAAiB,KAC5E,MAAM,IAAIE,MAAMF,EACpB,CAEA,OAAOI"}
1
+ {"version":3,"file":"initialize-robindoc.js","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { type TreeItem } from \"@src/components/elements/sidebar/types\";\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 StructureTemplate, type Options } from \"../types/initialize\";\nimport { type Pages } from \"../types/content\";\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\ntype StructureParsedData = Promise<{ pages: Pages; tree: TreeItem[] }> | { pages: Pages; tree: TreeItem[] };\n\nconst loadStructure = async (structureTemplate: StructureTemplate) => {\n let structure;\n if (typeof structureTemplate === \"function\") {\n structure = await structureTemplate();\n } else {\n structure = structureTemplate;\n }\n\n const configuration = getConfiguration(structure.configuration || {});\n\n return parseStructure(structure.items || [], configuration);\n};\n\n/**\n * Initializes Robindoc and returns components for rendering documentation pages.\n *\n * @example\n * ```ts\n * export const { Page, Sidebar } = initializeRobindoc({\n * configuration: { sourceRoot: \"./docs\" },\n * items: \"auto\"\n * });\n * ```\n *\n * @see {@link https://robindoc.com/docs/getting-started/initialization Initialization guide}\n * @see {@link https://robindoc.com/docs/structure/structure Structure configuration}\n */\nexport const initializeRobindoc = (structureTemplate: StructureTemplate, options: Options = {}) => {\n let structureParsedPromise: StructureParsedData = loadStructure(structureTemplate).then((data) => {\n structureParsedPromise = data;\n return data;\n });\n const matchingRules = options.matcher?.map((rule) => new RegExp(`^${rule.replace(/^\\^|\\$$/g, \"\")}$`));\n\n /**\n * Renders a documentation page for the given pathname.\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 */\n const Page: React.FC<PageProps> = async ({ pathname, ...props }) => {\n const pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n if (!options.cache) await revalidate(true);\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\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 /**\n * Renders the navigation sidebar based on the documentation structure.\n *\n * @see {@link https://robindoc.com/docs/customization/elements Elements customization}\n */\n const Sidebar: React.FC<SidebarProps> = async (props) => {\n if (!options.cache) await revalidate(true);\n\n const { tree } = await structureParsedPromise;\n\n return <SidebarBase tree={tree} {...props} />;\n };\n\n /**\n * Generates static params for dynamic routes.\n *\n * @example\n * ```ts\n * export async function generateStaticParams() {\n * return await getStaticParams(\"/docs\");\n * }\n * ```\n *\n * @see {@link https://robindoc.com/docs/customization/tools/get-static-params getStaticParams}\n */\n const getStaticParams = async <T extends string = \"segments\">(\n prefix: string = \"\",\n segmentsParamKey: T = \"segments\" as T,\n ) => {\n if (!options.cache) await revalidate(true);\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 /**\n * Generates page metadata.\n *\n * @example\n * ```ts\n * export async function generateMetadata({ params }) {\n * return await getMetadata(`/docs/${params.segments.join(\"/\")}`);\n * }\n * ```\n *\n * @see {@link https://robindoc.com/docs/customization/tools/get-metadata getMetadata}\n */\n const getMetadata = async (pathname: string) => {\n const pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n if (!options.cache) await revalidate(true);\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n const metadata = await getMetadataBase({\n uri: pageInstruction.uri,\n provider: pageInstruction.configuration.provider,\n });\n return metadata;\n };\n\n /**\n * Retrieves raw page data (title and markdown content).\n *\n * @see {@link https://robindoc.com/docs/customization/tools/get-page-data getPageData}\n */\n const getPageData = async (pathname: string) => {\n const pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n if (!options.cache) await revalidate(true);\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\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 /**\n * Retrieves the page instruction object for a given pathname.\n */\n const getPageInstruction = async (pathname: string) => {\n const pathnameNormalized = normalizePathname(pathname);\n if (matchingRules && !matchingRules.every((rule) => rule.test(pathname))) {\n const errorMessage = `Pathname \"${pathnameNormalized}\" doesn't pass matcher rules check`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n if (!options.cache) await revalidate(true);\n\n const { pages } = await structureParsedPromise;\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n const errorMessage = `Can not find data for \"${pathnameNormalized}\". Please check structure`;\n if (options.processError) return options.processError(404, errorMessage) || null;\n throw new Error(errorMessage);\n }\n\n return pageInstruction;\n };\n\n /**\n * Manually revalidates the cached documentation structure.\n *\n * @see {@link https://robindoc.com/docs/customization/tools/revalidate revalidate}\n */\n const revalidate = async (background?: boolean) => {\n if (\"then\" in structureParsedPromise) return structureParsedPromise;\n\n if (background) {\n const newData = await loadStructure(structureTemplate);\n structureParsedPromise = newData;\n } else {\n structureParsedPromise = loadStructure(structureTemplate).then((data) => {\n structureParsedPromise = data;\n return data;\n });\n }\n return structureParsedPromise;\n };\n\n return { Page, Sidebar, getStaticParams, getMetadata, getPageData, getPageInstruction, revalidate };\n};\n"],"names":["loadStructure","async","structureTemplate","structure","configuration","getConfiguration","parseStructure","items","initializeRobindoc","options","structureParsedPromise","then","data","matchingRules","matcher","map","rule","RegExp","replace","revalidate","background","newData","Page","pathname","props","pathnameNormalized","normalizePathname","every","test","errorMessage","processError","Error","cache","pages","pageInstruction","paths","Object","keys","targetPageIndex","indexOf","prevPagePathname","nextPagePathname","length","prev","title","next","breadcrumbs","crumbs","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","loadContent","raw","getPageInstruction"],"mappings":"4bAsBA,MAAMA,EAAgBC,MAAOC,IACzB,IAAIC,EAEAA,EAD6B,mBAAtBD,QACWA,IAENA,EAGhB,MAAME,EAAgBC,EAAiBF,EAAUC,eAAiB,CAAA,GAElE,OAAOE,EAAeH,EAAUI,OAAS,GAAIH,IAiBpCI,EAAqB,CAACN,EAAsCO,EAAmB,MACxF,IAAIC,EAA8CV,EAAcE,GAAmBS,KAAMC,IACrFF,EAAyBE,EAClBA,IAEX,MAAMC,EAAgBJ,EAAQK,SAASC,IAAKC,GAAS,IAAIC,OAAO,IAAID,EAAKE,QAAQ,WAAY,SA0MvFC,EAAalB,MAAOmB,IACtB,GAAI,SAAUV,EAAwB,OAAOA,EAE7C,GAAIU,EAAY,CACZ,MAAMC,QAAgBrB,EAAcE,GACpCQ,EAAyBW,CAC7B,MACIX,EAAyBV,EAAcE,GAAmBS,KAAMC,IAC5DF,EAAyBE,EAClBA,IAGf,OAAOF,GAGX,MAAO,CAAEY,KAjNyBrB,OAASsB,cAAaC,MACpD,MAAMC,EAAqBC,EAAkBH,GAC7C,GAAIV,IAAkBA,EAAcc,MAAOX,GAASA,EAAKY,KAAKL,IAAY,CACtE,MAAMM,EAAe,aAAaJ,sCAClC,GAAIhB,EAAQqB,aAAc,OAAOrB,EAAQqB,aAAa,IAAKD,IAAiB,KAC5E,MAAM,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