@xyd-js/components 0.1.0-xyd.7 → 0.1.0-xyd.94

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 (251) hide show
  1. package/.idea/git_toolbox_blame.xml +6 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/.idea/xyd-components.iml +12 -0
  5. package/CHANGELOG.md +718 -0
  6. package/LICENSE +21 -0
  7. package/TODO.md +1 -0
  8. package/content.ts +0 -2
  9. package/dist/CTABanner-Bc77pnms.js +2 -0
  10. package/dist/CTABanner-Bc77pnms.js.map +1 -0
  11. package/dist/CTABanner-DzO62aGj.js +2 -0
  12. package/dist/CTABanner-DzO62aGj.js.map +1 -0
  13. package/dist/CodeSample-BWPDgd2G.js +2 -0
  14. package/dist/CodeSample-BWPDgd2G.js.map +1 -0
  15. package/dist/CodeSample-DLnR-knP.js +2 -0
  16. package/dist/CodeSample-DLnR-knP.js.map +1 -0
  17. package/dist/HomeView-C8QlNdKh.js +2 -0
  18. package/dist/HomeView-C8QlNdKh.js.map +1 -0
  19. package/dist/HomeView-ZAP5saNy.js +2 -0
  20. package/dist/HomeView-ZAP5saNy.js.map +1 -0
  21. package/dist/Icon-BESh23UN.js +2 -0
  22. package/dist/Icon-BESh23UN.js.map +1 -0
  23. package/dist/Icon-xNucOqd2.js +2 -0
  24. package/dist/Icon-xNucOqd2.js.map +1 -0
  25. package/dist/Text-CfN9RkYA.js +2 -0
  26. package/dist/Text-CfN9RkYA.js.map +1 -0
  27. package/dist/Text-DKycD2zu.js +2 -0
  28. package/dist/Text-DKycD2zu.js.map +1 -0
  29. package/dist/Update-0XruJHjj.js +2 -0
  30. package/dist/Update-0XruJHjj.js.map +1 -0
  31. package/dist/Update-DKOAw8p9.js +2 -0
  32. package/dist/Update-DKOAw8p9.js.map +1 -0
  33. package/dist/VideoGuide-BUyomFVz.js +2 -0
  34. package/dist/VideoGuide-BUyomFVz.js.map +1 -0
  35. package/dist/VideoGuide-B_iUKKv7.js +2 -0
  36. package/dist/VideoGuide-B_iUKKv7.js.map +1 -0
  37. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js +4 -0
  38. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js.map +1 -0
  39. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js +4 -0
  40. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js.map +1 -0
  41. package/dist/brand.d.ts +9 -9
  42. package/dist/brand.js +1 -1
  43. package/dist/brand.js.map +1 -1
  44. package/dist/coder/themes/cosmo-light.js.map +1 -1
  45. package/dist/coder.d.ts +29 -9
  46. package/dist/coder.js +1 -1
  47. package/dist/coder.js.map +1 -1
  48. package/dist/content.d.ts +268 -204
  49. package/dist/content.js +1 -1
  50. package/dist/content.js.map +1 -1
  51. package/dist/index.css +267 -216
  52. package/dist/layouts.d.ts +20 -21
  53. package/dist/layouts.js +1 -1
  54. package/dist/layouts.js.map +1 -1
  55. package/dist/pages.js +1 -1
  56. package/dist/pages.js.map +1 -1
  57. package/dist/system.d.ts +10 -0
  58. package/dist/system.js +2 -0
  59. package/dist/system.js.map +1 -0
  60. package/dist/tslib.es6-DyL9kPq9.js +2 -0
  61. package/dist/{tslib.es6-DDIOdJiV.js.map → tslib.es6-DyL9kPq9.js.map} +1 -1
  62. package/dist/tslib.es6-Hqk-Mdr9.js +2 -0
  63. package/dist/{tslib.es6-DUrRPhZd.js.map → tslib.es6-Hqk-Mdr9.js.map} +1 -1
  64. package/dist/views.js +1 -1
  65. package/dist/writer.d.ts +411 -78
  66. package/dist/writer.js +1 -1
  67. package/dist/writer.js.map +1 -1
  68. package/docs/.nojekyll +1 -0
  69. package/docs/assets/hierarchy.js +1 -0
  70. package/docs/assets/highlight.css +22 -0
  71. package/docs/assets/icons.js +18 -0
  72. package/docs/assets/icons.svg +1 -0
  73. package/docs/assets/main.js +60 -0
  74. package/docs/assets/navigation.js +1 -0
  75. package/docs/assets/search.js +1 -0
  76. package/docs/assets/style.css +1640 -0
  77. package/docs/functions/GuideCard.html +6 -0
  78. package/docs/hierarchy.html +1 -0
  79. package/docs/index.html +2 -0
  80. package/docs/interfaces/GuideCardProps.html +18 -0
  81. package/docs/modules.html +1 -0
  82. package/index.ts +0 -1
  83. package/package.json +13 -18
  84. package/project.json +677 -0
  85. package/rollup.config.js +32 -3
  86. package/src/brand/Button/Button.styles.tsx +28 -0
  87. package/src/brand/Button/Button.tsx +3 -35
  88. package/src/brand/CTABanner/CTABanner.styles.tsx +80 -0
  89. package/src/brand/CTABanner/CTABanner.tsx +34 -112
  90. package/src/brand/Footer/Footer.styles.tsx +18 -0
  91. package/src/brand/Footer/Footer.tsx +4 -24
  92. package/src/brand/TODO.md +1 -0
  93. package/src/coder/Code/Code.styles.tsx +134 -35
  94. package/src/coder/Code/Code.tsx +131 -40
  95. package/src/coder/Code/CodeLoader.tsx +4 -4
  96. package/src/coder/Code/annotations.tsx +28 -8
  97. package/src/coder/Code/highlight.ts +38 -0
  98. package/src/coder/Code/index.ts +2 -1
  99. package/src/coder/CodeCopy/{CodeCopy.style.tsx → CodeCopy.styles.tsx} +6 -6
  100. package/src/coder/CodeCopy/CodeCopy.tsx +6 -6
  101. package/src/coder/CodeSample/CodeSample.tsx +83 -27
  102. package/src/coder/CodeTabs/CodeTabs.styles.tsx +99 -78
  103. package/src/coder/CodeTabs/CodeTabs.tsx +71 -56
  104. package/src/coder/CodeTheme/CodeTheme.tsx +89 -49
  105. package/src/coder/CodeTheme/index.ts +0 -1
  106. package/src/coder/CoderProvider.tsx +26 -0
  107. package/src/coder/index.ts +8 -4
  108. package/src/content/ContentDecoator.styles.tsx +113 -0
  109. package/src/content/ContentDecorator.tsx +17 -0
  110. package/src/content/GridDecorator.styles.tsx +67 -0
  111. package/src/content/GridDecorator.tsx +21 -0
  112. package/src/content/ReactContent.tsx +575 -0
  113. package/src/content/index.ts +10 -2
  114. package/src/icons/index.ts +0 -0
  115. package/src/kit/Loader/Loader.styles.tsx +53 -0
  116. package/src/kit/Loader/Loader.tsx +22 -0
  117. package/src/kit/TODO.md +2 -0
  118. package/src/kit/index.ts +1 -0
  119. package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +263 -278
  120. package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +173 -96
  121. package/src/layouts/LayoutPrimary/index.ts +0 -2
  122. package/src/layouts/index.ts +0 -7
  123. package/src/pages/HomePage/HomePage.styles.tsx +16 -0
  124. package/src/pages/HomePage/HomePage.tsx +7 -21
  125. package/src/pages/TODO.md +1 -0
  126. package/src/system/SearchButton/SearchButton.styles.tsx +86 -0
  127. package/src/system/SearchButton/SearchButton.tsx +116 -0
  128. package/src/system/SearchButton/index.ts +1 -0
  129. package/src/system/index.ts +1 -0
  130. package/src/utils/useStyle.ts +19 -0
  131. package/src/views/HomeView/HomeView.styles.tsx +37 -0
  132. package/src/views/HomeView/HomeView.tsx +5 -45
  133. package/src/views/TODO.md +1 -0
  134. package/src/writer/Anchor/Anchor.styles.tsx +11 -0
  135. package/src/writer/Anchor/Anchor.tsx +51 -0
  136. package/src/writer/Anchor/index.tsx +1 -0
  137. package/src/writer/Badge/Badge.styles.tsx +39 -28
  138. package/src/writer/Badge/Badge.tsx +37 -20
  139. package/src/writer/Banner/Banner.styles.tsx +91 -0
  140. package/src/writer/Banner/Banner.tsx +70 -0
  141. package/src/writer/Banner/index.ts +1 -0
  142. package/src/writer/Blockquote/Blockquote.styles.tsx +4 -4
  143. package/src/writer/Blockquote/Blockquote.tsx +6 -3
  144. package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +22 -21
  145. package/src/writer/Breadcrumbs/Breadcrumbs.tsx +19 -13
  146. package/src/writer/Button/Button.styles.tsx +137 -0
  147. package/src/writer/Button/Button.tsx +75 -0
  148. package/src/writer/Button/index.ts +2 -0
  149. package/src/writer/Callout/Callout.styles.tsx +29 -40
  150. package/src/writer/Callout/Callout.tsx +31 -16
  151. package/src/writer/Card/Card.styles.tsx +47 -0
  152. package/src/writer/Card/Card.tsx +69 -0
  153. package/src/writer/Card/index.ts +1 -0
  154. package/src/writer/Code/Code.styles.tsx +10 -11
  155. package/src/writer/Code/Code.tsx +7 -4
  156. package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +172 -0
  157. package/src/writer/ColorSchemeButton/index.ts +1 -0
  158. package/src/writer/Details/Details.styles.tsx +84 -84
  159. package/src/writer/Details/Details.tsx +71 -51
  160. package/src/writer/Example/index.tsx +5 -0
  161. package/src/writer/GuideCard/GuideCard.styles.tsx +108 -107
  162. package/src/writer/GuideCard/GuideCard.tsx +72 -37
  163. package/src/writer/Heading/Heading.styles.tsx +69 -49
  164. package/src/writer/Heading/Heading.tsx +92 -22
  165. package/src/writer/Hr/Hr.styles.tsx +5 -5
  166. package/src/writer/Hr/Hr.tsx +3 -6
  167. package/src/writer/Icon/Icon.tsx +48 -0
  168. package/src/writer/Icon/index.ts +1 -0
  169. package/src/writer/Image/Image.styles.tsx +9 -0
  170. package/src/writer/Image/Image.tsx +19 -0
  171. package/src/writer/Image/index.ts +1 -0
  172. package/src/writer/List/List.styles.tsx +47 -0
  173. package/src/writer/List/List.tsx +29 -0
  174. package/src/writer/List/index.ts +4 -0
  175. package/src/writer/NavLinks/NavLinks.styles.ts +23 -24
  176. package/src/writer/NavLinks/NavLinks.tsx +66 -19
  177. package/src/writer/Pre/Pre.styles.tsx +5 -5
  178. package/src/writer/Pre/Pre.tsx +4 -3
  179. package/src/writer/Steps/Steps.styles.tsx +14 -12
  180. package/src/writer/Steps/Steps.tsx +39 -10
  181. package/src/writer/Table/Table.styles.tsx +62 -30
  182. package/src/writer/Table/Table.tsx +121 -11
  183. package/src/writer/Table/index.ts +0 -11
  184. package/src/writer/Tabs/Tabs.styles.tsx +63 -70
  185. package/src/writer/Tabs/Tabs.tsx +31 -29
  186. package/src/writer/Text/Text.styles.tsx +66 -0
  187. package/src/writer/Text/Text.tsx +79 -0
  188. package/src/writer/Text/index.ts +3 -0
  189. package/src/writer/TocCard/TocCard.module.css +44 -0
  190. package/src/writer/TocCard/TocCard.tsx +42 -0
  191. package/src/writer/TocCard/index.ts +3 -0
  192. package/src/writer/UnderlineNav/Tabs.tsx +51 -0
  193. package/src/writer/UnderlineNav/TabsPrimary.styles.tsx +184 -0
  194. package/src/writer/UnderlineNav/TabsPrimary.tsx +209 -0
  195. package/src/writer/UnderlineNav/TabsSecondary.styles.tsx +77 -0
  196. package/src/writer/UnderlineNav/TabsSecondary.tsx +171 -0
  197. package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +181 -45
  198. package/src/writer/UnderlineNav/UnderlineNav.tsx +258 -23
  199. package/src/writer/UnderlineNav/index.ts +2 -1
  200. package/src/writer/UnderlineNav/useValueChange.ts +60 -0
  201. package/src/writer/Update/Update.styles.tsx +33 -0
  202. package/src/writer/Update/Update.tsx +37 -0
  203. package/src/writer/Update/index.ts +1 -0
  204. package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
  205. package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
  206. package/src/writer/VideoGuide/index.ts +1 -0
  207. package/src/writer/index.ts +23 -1
  208. package/tsconfig.json +11 -6
  209. package/types.d.ts +50 -0
  210. package/writer.ts +1 -1
  211. package/dist/CTABanner-BrdYlhnD.js +0 -2
  212. package/dist/CTABanner-BrdYlhnD.js.map +0 -1
  213. package/dist/CTABanner-XQNnnpUx.js +0 -2
  214. package/dist/CTABanner-XQNnnpUx.js.map +0 -1
  215. package/dist/CodeSample-Cp42Adjc.js +0 -2
  216. package/dist/CodeSample-Cp42Adjc.js.map +0 -1
  217. package/dist/CodeSample-DxPp80ID.js +0 -2
  218. package/dist/CodeSample-DxPp80ID.js.map +0 -1
  219. package/dist/HomeView-BN9mZXh9.js +0 -2
  220. package/dist/HomeView-BN9mZXh9.js.map +0 -1
  221. package/dist/HomeView-BVaaV0uE.js +0 -2
  222. package/dist/HomeView-BVaaV0uE.js.map +0 -1
  223. package/dist/UnderlineNav-Bs7Ot9Ch.js +0 -2
  224. package/dist/UnderlineNav-Bs7Ot9Ch.js.map +0 -1
  225. package/dist/UnderlineNav-C2aEVraN.js +0 -2
  226. package/dist/UnderlineNav-C2aEVraN.js.map +0 -1
  227. package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js +0 -2
  228. package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js.map +0 -1
  229. package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js +0 -2
  230. package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js.map +0 -1
  231. package/dist/index-BVUz77Tm.js +0 -2
  232. package/dist/index-BVUz77Tm.js.map +0 -1
  233. package/dist/index-jxd3nv2J.js +0 -2
  234. package/dist/index-jxd3nv2J.js.map +0 -1
  235. package/dist/tslib.es6-DDIOdJiV.js +0 -2
  236. package/dist/tslib.es6-DUrRPhZd.js +0 -2
  237. package/src/content/Anchor/Anchor.tsx +0 -63
  238. package/src/content/Anchor/index.tsx +0 -3
  239. package/src/content/Content/Content.tsx +0 -21
  240. package/src/content/Content/index.tsx +0 -3
  241. package/src/content/Content.tsx +0 -180
  242. package/src/content/Subtitle/Subtitle.tsx +0 -21
  243. package/src/content/Subtitle/index.tsx +0 -3
  244. package/src/layouts/Layout.styles.tsx +0 -151
  245. package/src/layouts/Layout.tsx +0 -121
  246. package/src/ui/Loader/Loader.styles.tsx +0 -52
  247. package/src/ui/Loader/Loader.tsx +0 -26
  248. package/src/ui/index.ts +0 -1
  249. package/src/writer/Icon/index.tsx +0 -355
  250. package/src/writer/Table/TableV2.styles.tsx +0 -117
  251. package/src/writer/Table/TableV2.tsx +0 -83
package/dist/content.d.ts CHANGED
@@ -1,144 +1,233 @@
1
- import React from 'react';
1
+ import React, { ReactElement } from 'react';
2
+ import { Settings } from '@xyd-js/core';
2
3
  import { Theme } from '@code-hike/lighter';
3
-
4
- interface TableV2Props {
5
- children: React.ReactNode;
6
- className?: string;
7
- }
8
- declare function TableV2({ children, className }: TableV2Props): React.JSX.Element;
9
- declare namespace TableV2 {
10
- var Head: ({ children }: TableHeadProps) => React.JSX.Element;
11
- var Th: ({ children, numeric }: TableThProps) => React.JSX.Element;
12
- var Tr: ({ children }: TableTrProps) => React.JSX.Element;
13
- var Td: ({ children, numeric, muted }: TableTdProps) => React.JSX.Element;
14
- var Cell: ({ children }: TableCellProps) => React.JSX.Element;
15
- var ModelCell: ({ children }: TableModelCellProps) => React.JSX.Element;
16
- }
17
- interface TableHeadProps {
18
- children: React.ReactNode;
19
- }
20
- interface TableThProps {
21
- children: React.ReactNode;
22
- numeric?: boolean;
23
- }
24
- interface TableTrProps {
25
- children: React.ReactNode;
26
- }
27
- interface TableTdProps {
28
- children: React.ReactNode;
29
- numeric?: boolean;
30
- muted?: boolean;
31
- }
32
- interface TableCellProps {
33
- children: React.ReactNode;
34
- }
35
- interface TableModelCellProps {
36
- children: React.ReactNode;
37
- }
4
+ import { HighlightedCode } from 'codehike/code';
38
5
 
39
6
  interface BadgeProps {
40
- children: React.ReactNode;
41
- size?: "sm";
42
- kind?: "warning" | "info";
7
+ /**
8
+ * The class name of the badge.
9
+ */
10
+ className?: string;
11
+ /**
12
+ * The children of the badge.
13
+ */
14
+ children?: React.ReactNode;
15
+ /**
16
+ * The size of the badge.
17
+ */
18
+ size?: "sm" | "xs";
19
+ /**
20
+ * The kind of the badge.
21
+ */
22
+ kind?: "warning" | "info" | "default";
43
23
  }
44
- declare function Badge({ children, size, kind }: BadgeProps): React.JSX.Element;
24
+ /**
25
+ * Badge component is used to display a badge.
26
+ *
27
+ * @group Components
28
+ */
29
+ declare function Badge({ className, children, size, kind }: BadgeProps): React.JSX.Element;
45
30
 
46
- interface BlockquoteProps {
47
- children: React.ReactNode;
31
+ interface ButtonProps {
32
+ children?: React.ReactNode;
33
+ kind?: "primary" | "secondary" | "tertiary" | undefined;
34
+ theme?: "ghost";
35
+ size?: "sm" | "md" | "lg";
36
+ className?: string;
37
+ onClick?: () => void;
38
+ disabled?: boolean;
39
+ icon?: React.ReactElement;
40
+ iconPosition?: "left" | "right";
41
+ href?: string;
48
42
  }
49
- declare function Blockquote({ children }: BlockquoteProps): React.JSX.Element;
43
+ declare function Button({ children, kind, theme, size, className, onClick, disabled, icon, iconPosition, href }: ButtonProps): React.JSX.Element;
50
44
 
45
+ /**
46
+ * Props for the Callout component
47
+ */
51
48
  interface CalloutProps {
49
+ /** Additional CSS class name to be applied to the callout */
50
+ className?: string;
51
+ /** Content to be displayed inside the callout */
52
52
  children: React.ReactNode;
53
53
  }
54
- declare function Callout({ children }: CalloutProps): React.JSX.Element;
54
+ /**
55
+ * A Callout component that displays important information or notices in a visually distinct way.
56
+ * It includes an info icon and a message area for content.
57
+ *
58
+ * @category Component
59
+ */
60
+ declare function Callout({ className, children }: CalloutProps): React.JSX.Element;
55
61
 
56
- interface CodeProps {
57
- children: React.ReactNode;
58
- }
59
- declare function Code({ children }: CodeProps): React.JSX.Element;
62
+ declare function ColorSchemeButton(): React.JSX.Element;
60
63
 
64
+ /**
65
+ * Base interface for all Details component variants
66
+ */
61
67
  interface BaseDetailsProps {
68
+ /** Content to be displayed inside the details element */
62
69
  children: React.ReactNode;
70
+ /** Label text displayed in the summary */
63
71
  label: string;
64
- icon?: React.SVGProps<SVGSVGElement>;
72
+ /** Optional icon element to be displayed in the summary */
73
+ icon?: React.ReactElement;
74
+ /** Optional CSS class name for custom styling */
75
+ className?: string;
65
76
  }
77
+ /**
78
+ * Props for the tertiary variant of the Details component
79
+ */
66
80
  interface TertiaryDetailsProps extends BaseDetailsProps {
81
+ /** Specifies the tertiary variant */
67
82
  kind: "tertiary";
83
+ /** Title text or element displayed in the summary */
68
84
  title: string | React.ReactNode;
69
85
  }
86
+ /**
87
+ * Props for the secondary variant of the Details component
88
+ */
70
89
  interface SecondaryDetailsProps extends BaseDetailsProps {
90
+ /** Specifies the secondary variant */
71
91
  kind: "secondary";
92
+ /** Title text or element displayed in the summary */
72
93
  title: string | React.ReactNode;
73
94
  }
95
+ /**
96
+ * Props for the primary variant of the Details component
97
+ */
74
98
  interface PrimaryDetailsProps extends BaseDetailsProps {
99
+ /** Specifies the primary variant (default) */
75
100
  kind?: "primary";
76
101
  }
102
+ /** Union type of all possible Details component variants */
77
103
  type DetailsProps = PrimaryDetailsProps | SecondaryDetailsProps | TertiaryDetailsProps;
78
- declare function Details(props: DetailsProps): React.JSX.Element;
104
+ /**
105
+ * A collapsible details component that supports three variants: primary, secondary, and tertiary.
106
+ * Each variant has a different visual style and structure.
107
+ *
108
+ * @param props - The component props
109
+ * @returns A details element with collapsible content
110
+ *
111
+ * @category Component
112
+ */
113
+ declare function Details(props: DetailsProps): React.ReactElement;
79
114
 
80
- interface GuideCardProps {
81
- children: React.ReactNode;
82
- href: string;
83
- title: string;
84
- icon?: React.ReactNode;
85
- kind?: "secondary";
86
- size?: "sm" | "md";
87
- }
88
- declare function GuideCard({ children, href, icon, title, kind, size, }: GuideCardProps): React.JSX.Element;
89
- declare namespace GuideCard {
90
- var List: ({ children }: {
91
- children: React.ReactNode;
92
- }) => React.JSX.Element;
93
- }
94
-
95
- interface HrProps {
96
- children: React.ReactNode;
115
+ interface IconProps {
116
+ name: string;
117
+ size?: number;
118
+ color?: string;
97
119
  }
98
- declare function Hr({ children }: HrProps): React.JSX.Element;
99
-
100
- declare function IconSessionReplay(): React.JSX.Element;
101
- declare function IconMetrics(): React.JSX.Element;
102
- declare function IconFunnels(): React.JSX.Element;
103
- declare function IconCode(): React.JSX.Element;
104
- declare function IconCustomEvent(): React.JSX.Element;
105
- declare function IconAlert(): React.JSX.Element;
106
- declare function IconBrowser(): React.JSX.Element;
107
- declare function IconREST(): React.JSX.Element;
108
- declare function IconGraphQL(): React.JSX.Element;
109
- declare function IconWebhooks(): React.JSX.Element;
110
- declare function IconJSBrowser(): React.JSX.Element;
111
- declare function IconJSNode(): React.JSX.Element;
112
- declare function IconStorybook(): React.JSX.Element;
113
- declare function IconReactRouter(): React.JSX.Element;
114
- declare function IconNextJS(): React.JSX.Element;
115
- declare function IconAppTemplate(): React.JSX.Element;
116
- declare function IconQuote(): React.JSX.Element;
120
+ declare function Icon(props: IconProps): ReactElement | null;
117
121
 
122
+ /**
123
+ * Props for the Steps component
124
+ */
118
125
  interface StepsProps {
126
+ /** Content to be rendered inside the steps list */
119
127
  children: React.ReactNode;
128
+ /** Optional CSS class name to be applied to the steps container */
129
+ className?: string;
120
130
  }
121
- declare function Steps({ children }: StepsProps): React.JSX.Element;
131
+ /**
132
+ * Steps component that renders a numbered list of steps or stages.
133
+ * Use this component to display a sequence of steps in a process or workflow.
134
+ *
135
+ * @category Component
136
+ */
137
+ declare function Steps({ children, className }: StepsProps): React.JSX.Element;
122
138
  declare namespace Steps {
123
- var Item: ({ children }: StepsItemProps) => React.JSX.Element;
139
+ var Item: ({ children, className }: StepsItemProps) => React.JSX.Element;
124
140
  }
141
+ /**
142
+ * Props for the Steps.Item component
143
+ */
125
144
  interface StepsItemProps {
145
+ /** Content to be rendered inside the step item */
126
146
  children: React.ReactNode;
147
+ /** Optional CSS class name to be applied to the step item */
148
+ className?: string;
127
149
  }
128
150
 
129
- interface TabsProps {
151
+ /**
152
+ * Props for the Table component
153
+ */
154
+ interface TableProps {
155
+ /** The content to be rendered inside the table */
130
156
  children: React.ReactNode;
131
- items: string[];
132
- tabIndex?: number;
157
+ /** Optional CSS class name to be applied to the table */
158
+ className?: string;
133
159
  }
134
- declare function Tabs({ children, items, tabIndex }: TabsProps): React.JSX.Element;
135
- declare namespace Tabs {
136
- var Content: ({ children, value }: {
137
- children: any;
138
- value: any;
139
- }) => React.JSX.Element;
160
+ /**
161
+ * A table component that provides a structured way to display tabular data.
162
+ * It supports custom styling through className prop and can contain various table elements.
163
+ *
164
+ * @category Component
165
+ */
166
+ declare function Table({ children, className }: TableProps): React.JSX.Element;
167
+ declare namespace Table {
168
+ var Head: ({ children }: TableHeadProps) => React.JSX.Element;
169
+ var Th: ({ children, numeric }: TableThProps) => React.JSX.Element;
170
+ var Tr: ({ children }: TableTrProps) => React.JSX.Element;
171
+ var Body: ({ children }: TableBodyProps) => React.JSX.Element;
172
+ var Td: ({ children, numeric, muted }: TableTdProps) => React.JSX.Element;
173
+ var Cell: ({ children }: TableCellProps) => React.JSX.Element;
174
+ }
175
+ /**
176
+ * Props for the TableHead component
177
+ */
178
+ interface TableHeadProps {
179
+ /** The content to be rendered inside the table header */
180
+ children: React.ReactNode;
181
+ }
182
+ /**
183
+ * Props for the TableTh component
184
+ */
185
+ interface TableThProps {
186
+ /** The content to be rendered inside the table header cell */
187
+ children: React.ReactNode;
188
+ /** Whether the cell content should be right-aligned (for numeric values) */
189
+ numeric?: boolean;
190
+ }
191
+ /**
192
+ * Props for the TableTr component
193
+ */
194
+ interface TableTrProps {
195
+ /** The content to be rendered inside the table row */
196
+ children: React.ReactNode;
197
+ }
198
+ /**
199
+ * Props for the TableBody component
200
+ */
201
+ interface TableBodyProps {
202
+ /** The content to be rendered inside the table body */
203
+ children: React.ReactNode;
204
+ }
205
+ /**
206
+ * Props for the TableTd component
207
+ */
208
+ interface TableTdProps {
209
+ /** The content to be rendered inside the table cell */
210
+ children: React.ReactNode;
211
+ /** Whether the cell content should be right-aligned (for numeric values) */
212
+ numeric?: boolean;
213
+ /** Whether the cell should have a muted appearance */
214
+ muted?: boolean;
215
+ }
216
+ /**
217
+ * Props for the TableCell component
218
+ */
219
+ interface TableCellProps {
220
+ /** The content to be rendered inside the table cell */
221
+ children: React.ReactNode;
140
222
  }
141
223
 
224
+ interface UpdateProps {
225
+ children: React.ReactNode;
226
+ version: string;
227
+ date?: string;
228
+ }
229
+ declare function Update(props: UpdateProps): React.JSX.Element;
230
+
142
231
  interface CodeThemeBlockProps {
143
232
  /** This is the raw code. May include annotation comments. */
144
233
  value: string;
@@ -146,145 +235,120 @@ interface CodeThemeBlockProps {
146
235
  lang: string;
147
236
  /** Metadata string (the content after the language name in a markdown codeblock). */
148
237
  meta: string;
238
+ /** The highlighted code. */
239
+ highlighted?: HighlightedCode;
149
240
  }
150
241
 
151
242
  interface CodeSampleProps {
152
243
  name: string;
153
244
  description: string;
154
- codeblocks: CodeThemeBlockProps[];
245
+ codeblocks?: CodeThemeBlockProps[];
246
+ theme?: Theme;
155
247
  size?: "full";
248
+ lineNumbers?: boolean;
249
+ descriptionHead?: string;
250
+ descriptionContent?: string | React.ReactNode;
251
+ descriptionIcon?: string;
156
252
  kind?: "secondary";
157
- theme?: Theme;
253
+ controlByMeta?: boolean;
158
254
  }
159
255
  declare function CodeSample(props: CodeSampleProps): React.JSX.Element;
160
256
 
161
- interface ContentProps {
162
- children: React.ReactNode;
257
+ interface ReactContentOptions {
258
+ Link?: React.ElementType;
259
+ components?: {
260
+ [component: string]: (props: any) => React.JSX.Element | null;
261
+ };
262
+ useLocation?: () => {
263
+ search: string;
264
+ };
265
+ useNavigate?: (to: any) => void;
266
+ useNavigation?: () => any;
163
267
  }
164
- declare function Content({ children }: ContentProps): React.JSX.Element;
165
-
166
- interface SubtitleProps {
167
- children: React.ReactNode;
268
+ declare class ReactContent {
269
+ protected settings?: Settings | undefined;
270
+ protected options?: ReactContentOptions | undefined;
271
+ constructor(settings?: Settings | undefined, options?: ReactContentOptions | undefined);
272
+ components(): {
273
+ [component: string]: (props: any) => React.JSX.Element | null;
274
+ };
275
+ noop(): {
276
+ React: typeof NoopReactComponent;
277
+ Steps: typeof NoopComponent;
278
+ UnderlineNav: typeof NoopComponent;
279
+ Tabs: typeof NoopComponent;
280
+ GuideCard: typeof NoopComponent;
281
+ Table: typeof NoopComponent;
282
+ };
168
283
  }
169
- declare function Subtitle({ children }: SubtitleProps): React.JSX.Element;
170
-
171
- declare function content(): {
172
- DirectiveCodeSample: (props: any) => React.JSX.Element;
173
- CodeSample: typeof CodeSample;
174
- IconSessionReplay: typeof IconSessionReplay;
175
- IconMetrics: typeof IconMetrics;
176
- IconFunnels: typeof IconFunnels;
177
- IconCode: typeof IconCode;
178
- IconCustomEvent: typeof IconCustomEvent;
179
- IconAlert: typeof IconAlert;
180
- IconBrowser: typeof IconBrowser;
181
- IconREST: typeof IconREST;
182
- IconGraphQL: typeof IconGraphQL;
183
- IconWebhooks: typeof IconWebhooks;
184
- IconJSBrowser: typeof IconJSBrowser;
185
- IconJSNode: typeof IconJSNode;
186
- IconStorybook: typeof IconStorybook;
187
- IconReactRouter: typeof IconReactRouter;
188
- IconNextJS: typeof IconNextJS;
189
- IconAppTemplate: typeof IconAppTemplate;
190
- IconQuote: typeof IconQuote;
191
- Content: typeof Content;
192
- Subtitle: typeof Subtitle;
193
- Callout: typeof Callout;
194
- Details: typeof Details;
195
- GuideCard: typeof GuideCard;
196
- Steps: typeof Steps;
197
- Tabs: typeof Tabs;
198
- Table: typeof TableV2;
199
- Badge: typeof Badge;
200
- h1: (props: any) => React.JSX.Element;
201
- h2: (props: any) => React.JSX.Element;
202
- h3: (props: any) => React.JSX.Element;
203
- h4: (props: any) => React.JSX.Element;
204
- h5: (props: any) => React.JSX.Element;
205
- h6: (props: any) => React.JSX.Element;
206
- p: (props: any) => React.JSX.Element;
207
- ul: (props: any) => React.JSX.Element;
208
- ol: (props: any) => React.JSX.Element;
209
- li: (props: any) => React.JSX.Element;
210
- table: typeof TableV2;
211
- tr: ({ children }: TableTrProps) => React.JSX.Element;
212
- th: ({ children, numeric }: TableThProps) => React.JSX.Element;
213
- td: (props: any) => React.JSX.Element;
214
- code: typeof Code;
215
- pre: (props: any) => React.JSX.Element;
216
- details: typeof Details;
217
- blockquote: typeof Blockquote;
218
- hr: typeof Hr;
219
- a: ({ href, className, ...props }: {
220
- [x: string]: any;
221
- href?: string | undefined;
222
- className?: string | undefined;
223
- }) => React.JSX.Element;
224
- };
225
- declare function stdContent(): {
284
+ declare function NoopComponent(): null;
285
+ declare namespace NoopComponent {
286
+ var Item: () => null;
287
+ var Content: () => null;
288
+ var List: () => null;
289
+ var Head: () => null;
290
+ var Td: () => null;
291
+ var Tr: () => null;
292
+ var Th: () => null;
293
+ var Cell: () => null;
294
+ }
295
+ declare function NoopReactComponent(): null;
296
+ declare namespace NoopReactComponent {
297
+ var Fragment: React.ExoticComponent<React.FragmentProps>;
298
+ }
299
+ declare function stdContent(this: ReactContent): {
226
300
  h1: (props: any) => React.JSX.Element;
227
301
  h2: (props: any) => React.JSX.Element;
228
302
  h3: (props: any) => React.JSX.Element;
229
303
  h4: (props: any) => React.JSX.Element;
230
304
  h5: (props: any) => React.JSX.Element;
231
- h6: (props: any) => React.JSX.Element;
232
305
  p: (props: any) => React.JSX.Element;
233
306
  ul: (props: any) => React.JSX.Element;
234
307
  ol: (props: any) => React.JSX.Element;
235
308
  li: (props: any) => React.JSX.Element;
236
- table: typeof TableV2;
237
- tr: ({ children }: TableTrProps) => React.JSX.Element;
238
- th: ({ children, numeric }: TableThProps) => React.JSX.Element;
309
+ table: (props: any) => React.JSX.Element;
310
+ tr: (props: any) => React.JSX.Element;
311
+ th: (props: any) => React.JSX.Element;
239
312
  td: (props: any) => React.JSX.Element;
240
- code: typeof Code;
241
- pre: (props: any) => React.JSX.Element;
242
- details: typeof Details;
243
- blockquote: typeof Blockquote;
244
- hr: typeof Hr;
245
- a: ({ href, className, ...props }: {
246
- [x: string]: any;
247
- href?: string | undefined;
248
- className?: string | undefined;
249
- }) => React.JSX.Element;
313
+ code: (props: any) => React.JSX.Element;
314
+ pre: any;
315
+ details: (props: any) => React.JSX.Element;
316
+ blockquote: (props: any) => React.JSX.Element;
317
+ hr: (props: any) => React.JSX.Element;
318
+ a: (props: any) => React.JSX.Element;
319
+ br: (props: any) => React.JSX.Element;
320
+ img: (props: any) => React.JSX.Element;
321
+ React: typeof NoopReactComponent;
250
322
  };
251
323
  declare function writerContent(): {
252
324
  Callout: typeof Callout;
253
325
  Details: typeof Details;
254
- GuideCard: typeof GuideCard;
326
+ GuideCard: any;
255
327
  Steps: typeof Steps;
256
- Tabs: typeof Tabs;
257
- Table: typeof TableV2;
328
+ Tabs: any;
329
+ Table: typeof Table;
258
330
  Badge: typeof Badge;
259
- };
260
- declare function directiveContent(): {
261
- DirectiveCodeSample: (props: any) => React.JSX.Element;
262
- };
263
- declare function helperContent(): {
264
- Content: typeof Content;
265
- Subtitle: typeof Subtitle;
331
+ Button: typeof Button;
332
+ UnderlineNav: any;
333
+ Subtitle(props: any): React.JSX.Element;
334
+ Update: typeof Update;
335
+ Card: any;
336
+ ColorSchemeButton: typeof ColorSchemeButton;
266
337
  };
267
338
  declare function iconContent(): {
268
- IconSessionReplay: typeof IconSessionReplay;
269
- IconMetrics: typeof IconMetrics;
270
- IconFunnels: typeof IconFunnels;
271
- IconCode: typeof IconCode;
272
- IconCustomEvent: typeof IconCustomEvent;
273
- IconAlert: typeof IconAlert;
274
- IconBrowser: typeof IconBrowser;
275
- IconREST: typeof IconREST;
276
- IconGraphQL: typeof IconGraphQL;
277
- IconWebhooks: typeof IconWebhooks;
278
- IconJSBrowser: typeof IconJSBrowser;
279
- IconJSNode: typeof IconJSNode;
280
- IconStorybook: typeof IconStorybook;
281
- IconReactRouter: typeof IconReactRouter;
282
- IconNextJS: typeof IconNextJS;
283
- IconAppTemplate: typeof IconAppTemplate;
284
- IconQuote: typeof IconQuote;
339
+ Icon: typeof Icon;
285
340
  };
286
341
  declare function coderContent(): {
287
342
  CodeSample: typeof CodeSample;
288
343
  };
344
+ declare function directiveContent(this: ReactContent): {
345
+ DirectiveCodeGroup: (props: any) => React.JSX.Element;
346
+ };
347
+
348
+ interface ContentDecoratorProps {
349
+ children: React.ReactNode;
350
+ metaComponent?: string;
351
+ }
352
+ declare function ContentDecorator({ children, metaComponent }: ContentDecoratorProps): React.JSX.Element;
289
353
 
290
- export { content as MDX, coderContent, content as default, directiveContent, helperContent, iconContent, stdContent, writerContent };
354
+ export { ContentDecorator, ReactContent, coderContent, directiveContent, iconContent, stdContent, writerContent };
package/dist/content.js CHANGED
@@ -1,2 +1,2 @@
1
- import{b as e}from"./_rollupPluginBabelHelpers-DsEzE6Ab.js";import{_ as n}from"./tslib.es6-DUrRPhZd.js";import t,{forwardRef as r}from"react";import{H as a,C as i,D as c,B as s,a as l,b as o,c as u,I as d,d as m,e as h,f,g as v,h as p,i as b,j as g,k as E,l as j,m as O,n as I,o as S,p as N,q as C,r as k,s as T}from"./index-BVUz77Tm.js";import"@radix-ui/react-icons";import{T as w,a as x,S as z,G as B}from"./UnderlineNav-C2aEVraN.js";import{c as y}from"./CodeSample-DxPp80ID.js";import"@code-hike/lighter";import"@radix-ui/react-tabs";import"lucide-react";import"./coder/themes/cosmo-light.js";var D="h1seqss5";function J(e){var n=e.children;return t.createElement("div",{className:D},n)}var R="hmi9h9e";function q(e){var n=e.children;return t.createElement("div",{className:R},n)}var A="htyux6",G=r((function(e,n){var r=e.href,a=void 0===r?"":r,i=e.children;return e.newWindow?t.createElement("a",{ref:n,to:a,href:a,target:"_blank",rel:"noreferrer",className:A},i):t.createElement("a",{ref:n,to:a,href:a,className:A},i)}));G.displayName="Anchor";var W=/https?:\/\//,_=function(e){var r=e.href,a=void 0===r?"":r;e.className;var i=n(e,["href","className"]);return t.createElement(G,Object.assign({href:a,newWindow:W.test(a)},i))};function H(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M()),Q()),L()),P()),U()),F())}function M(){return e(e(e(e(e(e(e({h1:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children},e)))},h2:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children,size:2},e)))},h3:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children,size:3},e)))},h4:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children,size:4},e)))},h5:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children,size:5},e)))},h6:function(e){return t.createElement("div",null,t.createElement(a,Object.assign({id:e.children,size:6},e)))},p:function(e){return t.createElement("p",Object.assign({},e))},ul:function(e){return t.createElement("ul",Object.assign({},e),e.children)},ol:function(e){return t.createElement("ol",Object.assign({},e),e.children)},li:function(e){return t.createElement("li",Object.assign({},e),e.children)},table:w,tr:w.Tr,th:w.Th,td:w.Td},"td",(function(e){return t.createElement(w.Td,Object.assign({},e),t.createElement(w.Cell,null,e.children))})),"code",i),"pre",(function(e){var n,r,a,i,c,s,l=((null===(r=null===(n=null==e?void 0:e.children)||void 0===n?void 0:n.props)||void 0===r?void 0:r.className)||"").replace("language-","");return t.createElement(y,{name:l,description:null===(i=null===(a=null==e?void 0:e.children)||void 0===a?void 0:a.props)||void 0===i?void 0:i.meta,codeblocks:[{value:null===(s=null===(c=null==e?void 0:e.children)||void 0===c?void 0:c.props)||void 0===s?void 0:s.children,lang:l,meta:l}],size:"full"})})),"details",c),"blockquote",s),"hr",l),"a",_)}function Q(){return{Callout:u,Details:c,GuideCard:B,Steps:z,Tabs:x,Table:w,Badge:o}}function F(){return{DirectiveCodeSample:function(e){return t.createElement(y,Object.assign({},e,{codeblocks:JSON.parse(e.codeblocks)}))}}}function L(){return{Content:J,Subtitle:q}}function P(){return{IconSessionReplay:T,IconMetrics:k,IconFunnels:C,IconCode:N,IconCustomEvent:S,IconAlert:I,IconBrowser:O,IconREST:j,IconGraphQL:E,IconWebhooks:g,IconJSBrowser:b,IconJSNode:p,IconStorybook:v,IconReactRouter:f,IconNextJS:h,IconAppTemplate:m,IconQuote:d}}function U(){return{CodeSample:y}}export{H as MDX,U as coderContent,H as default,F as directiveContent,L as helperContent,P as iconContent,M as stdContent,Q as writerContent};
1
+ import{c as n,_ as e,d as t,a as i,e as r}from"./_rollupPluginBabelHelpers-DZ-ucadG.js";import{a as o}from"./tslib.es6-Hqk-Mdr9.js";import l,{useRef as a,useState as c,useEffect as s,createContext as u,useContext as d,useMemo as v}from"react";import{T as h,L as m,a as f,G as p,B as g,S as b,A as j,b as E}from"./VideoGuide-BUyomFVz.js";import{I as O,H as w,B as C,D as y,C as k,a as L,U as S,b as I,c as T,d as x,e as N}from"./Update-0XruJHjj.js";import{I as U}from"./Icon-xNucOqd2.js";import{T as A}from"./Text-DKycD2zu.js";import{c as H}from"./CodeSample-DLnR-knP.js";import"@code-hike/lighter";import"radix-ui";import"lucide-react";import"./coder/themes/cosmo-light.js";var R="g1wc20vm";function B(n){var e=n.children,t=n.cols;return l.createElement("xyd-grid-decorator",{className:R,"data-cols":t},e)}var G=function(){return n(function n(e,i){t(this,n),this.settings=e,this.options=i},[{key:"components",value:function(){var n,e=this,t=[F,z,Q,X,Y,Z].map(function(n){return n.bind(e)}).reduce(function(n,e){return Object.assign(Object.assign({},n),e())},{});return Object.assign(Object.assign({},t),(null===(n=this.options)||void 0===n?void 0:n.components)||{})}},{key:"noop",value:function(){var n,t=this.components(),i=[].concat(e(Object.keys(t)),e(Object.keys((null===(n=this.options)||void 0===n?void 0:n.components)||{}))).reduce(function(n,e){return n[e]=function(){return null},n},{}),r={Steps:V,UnderlineNav:V,Tabs:V,GuideCard:V,Table:V};return Object.assign(Object.assign(Object.assign({},i),r),{React:D})}}])}();function V(){return null}function D(){return null}function F(){var n=this,e=$.bind(this),t=P.bind(this);return{h1:function(n){return l.createElement(t,Object.assign({depth:1},n,{noanchor:!0}))},h2:function(n){return l.createElement(t,Object.assign({depth:2},n))},h3:function(n){return l.createElement(t,Object.assign({depth:3},n))},h4:function(n){return l.createElement(t,Object.assign({depth:4},n))},h5:function(n){return l.createElement(t,Object.assign({depth:5},n))},p:function(n){return l.createElement(A,Object.assign({},n))},ul:function(n){return l.createElement(m,Object.assign({},n),n.children)},ol:function(n){return l.createElement(f,Object.assign({},n),n.children)},li:function(n){return l.createElement(m.Item,Object.assign({},n),n.children)},table:function(n){return l.createElement(h,Object.assign({},n))},tr:function(n){return l.createElement(h.Tr,Object.assign({},n))},th:function(n){return l.createElement(h.Th,Object.assign({},n))},td:function(n){return l.createElement(h.Td,Object.assign({},n),l.createElement(h.Cell,null,n.children))},code:function(n){return l.createElement(k,Object.assign({},n))},pre:e,details:function(n){return l.createElement(y,Object.assign({},n))},blockquote:function(n){return l.createElement(C,Object.assign({},n))},hr:function(n){return l.createElement(w,Object.assign({},n))},a:function(e){var t;return l.createElement(en,Object.assign({},e,{as:null===(t=null==n?void 0:n.options)||void 0===t?void 0:t.Link}))},br:function(n){return l.createElement("br",null)},img:function(n){return l.createElement(O,Object.assign({},n))},React:D}}function P(n){var e,t=n.id,r=n.depth,o=n.children,u=n.label,d=n.subtitle,v=n.noanchor,h=n.style,m=null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.useNavigation(),f=a(null),p=c(!1),g=i(p,2),b=g[0],j=g[1];function E(n){var e=window.location.hash==="#".concat(t);j(e)}return s(function(){window.addEventListener("replaceState",E);var n=window.location.hash==="#".concat(t);return j(n),n&&f.current&&"loading"!==(null==m?void 0:m.state)&&f.current.scrollIntoView(),function(){window.removeEventListener("replaceState",E)}},[]),l.createElement(x,{ref:f,id:t,size:r,active:b,onClick:function(){var n,e=new URL(window.location.href);e.hash=t,history.replaceState(null,"",e),null===(n=document.querySelector("#".concat(t)))||void 0===n||n.scrollIntoView()},label:u,subtitle:d,noanchor:v,style:h},o)}function z(){var n=W.bind(this);n.List=p.List;var e=_.bind(this);return e.Content=K.bind(this),e.Item=M.bind(this),e.Item.displayName="UnderlineNav.Item",{Callout:T,Details:y,GuideCard:n,Steps:b,Tabs:e,Table:h,Badge:I,Button:g,UnderlineNav:e,Subtitle:function(n){var e,t,i=null===(t=null===(e=null==n?void 0:n.children)||void 0===e?void 0:e.props)||void 0===t?void 0:t.children;return l.createElement(x,Object.assign({size:4,kind:"muted"},n),i)},Update:S,Card:q.bind(this),ColorSchemeButton:L}}function W(n){var e;return l.createElement(p,Object.assign({},n,{as:null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.Link}))}function q(n){var e;return l.createElement(N,Object.assign({},n,{link:null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.Link}))}V.Item=function(){return null},V.Content=function(){return null},V.List=function(){return null},V.Head=function(){return null},V.Td=function(){return null},V.Tr=function(){return null},V.Th=function(){return null},V.Cell=function(){return null},D.Fragment=l.Fragment;var J=u({value:"",onChange:function(n){}});function _(n){var e=c(n.value),t=i(e,2),r=t[0],o=t[1];return l.createElement(J,{value:{value:r,onChange:o}},l.createElement(E,Object.assign({},n,{value:r,onChange:function(n){o(n)}})))}function K(n){var e,t,i=d(J).onChange,r=null===(t=null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.useLocation)||void 0===t?void 0:t.call(e),o=null==r?void 0:r.search,a=new URLSearchParams(o),c=new URLSearchParams(n.value),u=!0,v=!0;return c.forEach(function(n,e){var t=a.get(e);t!==n&&(u=!1),t||(v=!1)}),s(function(){u&&i(n.value)},[u]),v||(u=void 0),l.createElement(E.Content,Object.assign({},n,{defaultActive:u}))}function M(n){var e,t,i,r=d(J).onChange,o=null===(t=null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.useLocation)||void 0===t?void 0:t.call(e),a=null==o?void 0:o.search,c=new URLSearchParams(a),u=new URLSearchParams(n.value),v=!0;return u.forEach(function(n,e){c.get(e)!==n&&(v=!1)}),s(function(){v&&r(n.value)},[v]),l.createElement(E.Item,Object.assign({},n,{as:null===(i=null==this?void 0:this.options)||void 0===i?void 0:i.Link,defaultActive:v}))}function Q(){return{Icon:U}}function X(){return{CodeSample:H}}function Y(){var n=this;return{DirectiveCodeGroup:function(e){var t,i,r;return l.createElement(H,Object.assign({},e,{theme:(null===(r=null===(i=null===(t=n.settings)||void 0===t?void 0:t.theme)||void 0===i?void 0:i.coder)||void 0===r?void 0:r.syntaxHighlight)||void 0,codeblocks:JSON.parse(e.codeblocks)}))}}}function Z(){return{GridDecorator:B}}function $(n){var e,t,i,r,o,a,c,s,u,d=void 0;if(n.highlighted)try{var h=JSON.parse(n.highlighted);h&&(d=h)}catch(n){console.error("Error parsing highlighted code",n)}var m,f=((null===(t=null===(e=null==n?void 0:n.children)||void 0===e?void 0:e.props)||void 0===t?void 0:t.className)||"").replace("language-",""),p=void 0;if(null==n?void 0:n.descriptionContent){var g=function(n){var e=tn(n);if(!tn)return{};return{component:null==e?void 0:e.default}}(null==n?void 0:n.descriptionContent);if(null==g?void 0:g.component){var b=(m=null==g?void 0:g.component,v(function(){return m||null},[m]));p=l.createElement(b,{components:this.components()})}}return l.createElement(H,{theme:(null===(o=null===(r=null===(i=this.settings)||void 0===i?void 0:i.theme)||void 0===r?void 0:r.coder)||void 0===o?void 0:o.syntaxHighlight)||void 0,name:f,description:null===(c=null===(a=null==n?void 0:n.children)||void 0===a?void 0:a.props)||void 0===c?void 0:c.meta,codeblocks:[{value:null===(u=null===(s=null==n?void 0:n.children)||void 0===s?void 0:s.props)||void 0===u?void 0:u.children,lang:f,meta:f,highlighted:d}],lineNumbers:null==n?void 0:n.lineNumbers,size:null==n?void 0:n.size,descriptionHead:null==n?void 0:n.descriptionHead,descriptionContent:p,descriptionIcon:null==n?void 0:n.descriptionIcon})}var nn=/https?:\/\//;function en(n){var e=n.href,t=void 0===e?"":e,i=n.as,r=n.newWindow,a=n.children,c=o(n,["href","as","newWindow","children"]),s=i||j;return l.createElement(s,Object.assign({href:t,newWindow:r||nn.test(t)},c),a)}function tn(n){var t={Fragment:l.Fragment,jsxs:rn,jsx:rn,jsxDEV:rn};return r(Function,e(Object.keys(t)).concat([n]))(t)}var rn=function(n,e){var t,i=function(n){return n.map(function(n,e){return l.isValidElement(n)&&!n.key?l.cloneElement(n,{key:"mdx-".concat(e)}):Array.isArray(n)?i(n):n})};return t=e&&e.children?Array.isArray(e.children)?i(e.children):l.isValidElement(e.children)&&!e.children.key?l.cloneElement(e.children,{key:"mdx-child"}):e.children:[],l.createElement(n,Object.assign(Object.assign({},e),{children:t}))},on="ca1c472";function ln(n){var e=n.children,t=n.metaComponent;return l.createElement("xyd-content-decorator",{className:on,"meta-component":t||void 0},e)}export{ln as ContentDecorator,G as ReactContent,X as coderContent,Y as directiveContent,Q as iconContent,F as stdContent,z as writerContent};
2
2
  //# sourceMappingURL=content.js.map