zudoku 0.7.2-dev.0 → 0.7.2-dev.11

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 (138) hide show
  1. package/dist/cli/cli.js +3 -3
  2. package/dist/cli/cli.js.map +1 -1
  3. package/dist/cli/common/analytics/lib.js +1 -1
  4. package/dist/cli/common/analytics/lib.js.map +1 -1
  5. package/dist/cli/common/outdated.js +11 -20
  6. package/dist/cli/common/outdated.js.map +1 -1
  7. package/dist/cli/common/xdg/lib.d.ts +3 -3
  8. package/dist/cli/common/xdg/lib.js +3 -3
  9. package/dist/cli/common/xdg/lib.js.map +1 -1
  10. package/dist/cli/dev/handler.js +3 -12
  11. package/dist/cli/dev/handler.js.map +1 -1
  12. package/dist/config/validators/InputSidebarSchema.d.ts +0 -9
  13. package/dist/config/validators/InputSidebarSchema.js +0 -2
  14. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  15. package/dist/config/validators/SidebarSchema.d.ts +3 -9
  16. package/dist/config/validators/SidebarSchema.js +3 -7
  17. package/dist/config/validators/SidebarSchema.js.map +1 -1
  18. package/dist/config/validators/validate.d.ts +0 -115
  19. package/dist/config/validators/validate.js +0 -43
  20. package/dist/config/validators/validate.js.map +1 -1
  21. package/dist/lib/components/navigation/SidebarCategory.js +3 -5
  22. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  23. package/dist/lib/components/navigation/SidebarItem.js +2 -2
  24. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  25. package/dist/lib/ui/Button.d.ts +2 -2
  26. package/dist/vite/config.d.ts +3 -3
  27. package/dist/vite/config.js +22 -23
  28. package/dist/vite/config.js.map +1 -1
  29. package/dist/vite/config.test.js +4 -1
  30. package/dist/vite/config.test.js.map +1 -1
  31. package/dist/vite/dev-server.js +4 -1
  32. package/dist/vite/dev-server.js.map +1 -1
  33. package/dist/vite/plugin-sidebar.js +1 -10
  34. package/dist/vite/plugin-sidebar.js.map +1 -1
  35. package/dist/vite/plugin.js +0 -2
  36. package/dist/vite/plugin.js.map +1 -1
  37. package/dist/vite/prerender.js +0 -7
  38. package/dist/vite/prerender.js.map +1 -1
  39. package/lib/AuthenticationPlugin-DYnkydqa.js +55 -0
  40. package/lib/{AuthenticationPlugin-BMjOjKqE.js.map → AuthenticationPlugin-DYnkydqa.js.map} +1 -1
  41. package/lib/CategoryHeading-w2EW676o.js +10 -0
  42. package/lib/{CategoryHeading-BE8e6QdS.js.map → CategoryHeading-w2EW676o.js.map} +1 -1
  43. package/lib/DeveloperHint-D87KcpDW.js +16 -0
  44. package/lib/{DeveloperHint-Bl9gIdNI.js.map → DeveloperHint-D87KcpDW.js.map} +1 -1
  45. package/lib/ErrorPage-BdHAg3Rg.js +18 -0
  46. package/lib/{ErrorPage-CPR1XVKW.js.map → ErrorPage-BdHAg3Rg.js.map} +1 -1
  47. package/lib/Input-BmwltPfA.js +2214 -0
  48. package/lib/Input-BmwltPfA.js.map +1 -0
  49. package/lib/{Markdown-CCNihH_N.js → Markdown-BZUoEvL7.js} +3354 -3189
  50. package/lib/Markdown-BZUoEvL7.js.map +1 -0
  51. package/lib/MdxPage-E4NFxzHQ.js +183 -0
  52. package/lib/MdxPage-E4NFxzHQ.js.map +1 -0
  53. package/lib/OperationList-DVIuzHN7.js +628 -0
  54. package/lib/OperationList-DVIuzHN7.js.map +1 -0
  55. package/lib/Route-5sI-urRK.js +14 -0
  56. package/lib/{Route-xRJ9mJgH.js.map → Route-5sI-urRK.js.map} +1 -1
  57. package/lib/{SidebarBadge-2JcxswKF.js → SidebarBadge-6EEz-Bwe.js} +47 -47
  58. package/lib/{SidebarBadge-2JcxswKF.js.map → SidebarBadge-6EEz-Bwe.js.map} +1 -1
  59. package/lib/SlotletProvider-CNyl5wU0.js +262 -0
  60. package/lib/SlotletProvider-CNyl5wU0.js.map +1 -0
  61. package/lib/Spinner-B9eFggre.js +15 -0
  62. package/lib/Spinner-B9eFggre.js.map +1 -0
  63. package/lib/{ZudokuContext-JoyeA9dT.js → ZudokuContext-BHNQL3XO.js} +79 -78
  64. package/lib/{ZudokuContext-JoyeA9dT.js.map → ZudokuContext-BHNQL3XO.js.map} +1 -1
  65. package/lib/{_commonjsHelpers-BkfeUUK-.js → _commonjsHelpers-BVfed4GL.js} +3 -3
  66. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  67. package/lib/{index-BLvMkqjO.js → index-BGY8VjAV.js} +26 -26
  68. package/lib/{index-BLvMkqjO.js.map → index-BGY8VjAV.js.map} +1 -1
  69. package/lib/{index-G1-TGLO1.js → index-CbJpF8Yf.js} +8 -8
  70. package/lib/{index-G1-TGLO1.js.map → index-CbJpF8Yf.js.map} +1 -1
  71. package/lib/index-ChhUJhLT.js +1771 -0
  72. package/lib/index-ChhUJhLT.js.map +1 -0
  73. package/lib/{index-BF4cn28H.js → index-DdUotMOQ.js} +2196 -1953
  74. package/lib/index-DdUotMOQ.js.map +1 -0
  75. package/lib/jsx-runtime-B6kdoens.js +635 -0
  76. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  77. package/lib/{router-D2p7Olpn.js → router-BiRCp01d.js} +22 -22
  78. package/lib/{router-D2p7Olpn.js.map → router-BiRCp01d.js.map} +1 -1
  79. package/lib/{slugify-DbLhpSPt.js → slugify-CiPVjteN.js} +2 -2
  80. package/lib/{slugify-DbLhpSPt.js.map → slugify-CiPVjteN.js.map} +1 -1
  81. package/lib/{state-lIwt9isb.js → state-DsXXkBLH.js} +15 -15
  82. package/lib/{state-lIwt9isb.js.map → state-DsXXkBLH.js.map} +1 -1
  83. package/lib/{utils-B8R4grFM.js → utils-BPHLKjns.js} +153 -152
  84. package/lib/{utils-B8R4grFM.js.map → utils-BPHLKjns.js.map} +1 -1
  85. package/lib/zudoku.auth-auth0.js +21 -16
  86. package/lib/zudoku.auth-auth0.js.map +1 -1
  87. package/lib/zudoku.auth-clerk.js +37 -32
  88. package/lib/zudoku.auth-clerk.js.map +1 -1
  89. package/lib/zudoku.auth-openid.js +505 -485
  90. package/lib/zudoku.auth-openid.js.map +1 -1
  91. package/lib/zudoku.components.js +1782 -1574
  92. package/lib/zudoku.components.js.map +1 -1
  93. package/lib/zudoku.openapi-worker.js +2 -2
  94. package/lib/zudoku.plugin-api-keys.js +268 -153
  95. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  96. package/lib/zudoku.plugin-custom-page.js +6 -5
  97. package/lib/zudoku.plugin-custom-page.js.map +1 -1
  98. package/lib/zudoku.plugin-markdown.js +13 -12
  99. package/lib/zudoku.plugin-markdown.js.map +1 -1
  100. package/lib/zudoku.plugin-openapi.js +8 -8
  101. package/lib/zudoku.plugin-redirect.js +3 -3
  102. package/lib/zudoku.plugin-search-inkeep.js +21 -20
  103. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  104. package/package.json +4 -9
  105. package/src/lib/components/navigation/SidebarCategory.tsx +31 -43
  106. package/src/lib/components/navigation/SidebarItem.tsx +1 -2
  107. package/dist/lib/icons.d.ts +0 -1
  108. package/dist/lib/icons.js +0 -2
  109. package/dist/lib/icons.js.map +0 -1
  110. package/dist/vite/plugin-icons.d.ts +0 -3
  111. package/dist/vite/plugin-icons.js +0 -47
  112. package/dist/vite/plugin-icons.js.map +0 -1
  113. package/dist/vite/sitemap.d.ts +0 -19
  114. package/dist/vite/sitemap.js +0 -40
  115. package/dist/vite/sitemap.js.map +0 -1
  116. package/lib/AuthenticationPlugin-BMjOjKqE.js +0 -54
  117. package/lib/CategoryHeading-BE8e6QdS.js +0 -9
  118. package/lib/DeveloperHint-Bl9gIdNI.js +0 -12
  119. package/lib/ErrorPage-CPR1XVKW.js +0 -12
  120. package/lib/Input-BBlyeDuG.js +0 -2192
  121. package/lib/Input-BBlyeDuG.js.map +0 -1
  122. package/lib/Markdown-CCNihH_N.js.map +0 -1
  123. package/lib/MdxPage-BavkYqzi.js +0 -140
  124. package/lib/MdxPage-BavkYqzi.js.map +0 -1
  125. package/lib/OperationList-C6Ps2keZ.js +0 -460
  126. package/lib/OperationList-C6Ps2keZ.js.map +0 -1
  127. package/lib/Route-xRJ9mJgH.js +0 -13
  128. package/lib/SlotletProvider-CuB3Ts8r.js +0 -213
  129. package/lib/SlotletProvider-CuB3Ts8r.js.map +0 -1
  130. package/lib/Spinner-BlxzaFFF.js +0 -6
  131. package/lib/Spinner-BlxzaFFF.js.map +0 -1
  132. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  133. package/lib/index-BF4cn28H.js.map +0 -1
  134. package/lib/jsx-runtime-lNnQYwFN.js +0 -2403
  135. package/lib/jsx-runtime-lNnQYwFN.js.map +0 -1
  136. package/lib/zudoku.icons.js +0 -2
  137. package/lib/zudoku.icons.js.map +0 -1
  138. package/src/lib/icons.ts +0 -1
@@ -1,140 +0,0 @@
1
- import { A as w, u as k, a as A, H as T, b as P } from "./utils-B8R4grFM.js";
2
- import { L as E } from "./jsx-runtime-lNnQYwFN.js";
3
- import { C } from "./CategoryHeading-BE8e6QdS.js";
4
- import { u as H, a as m, P as S, H as u } from "./Markdown-CCNihH_N.js";
5
- import { s as I } from "./slugify-DbLhpSPt.js";
6
- import { ListTreeIcon as L } from "lucide-react";
7
- import { useRef as f, useState as _, useEffect as $ } from "react";
8
- const y = "data-active", v = ({
9
- item: a,
10
- children: e,
11
- className: t,
12
- isActive: c
13
- }) => /* @__PURE__ */ React.createElement(
14
- "li",
15
- {
16
- className: m(
17
- "truncate",
18
- c ? "text-primary" : "text-foreground/65 dark:text-foreground/75",
19
- t
20
- ),
21
- title: a.value
22
- },
23
- /* @__PURE__ */ React.createElement(
24
- w,
25
- {
26
- to: `#${a.id}`,
27
- [y]: a.id,
28
- className: m(
29
- c ? "text-primary" : "text-foreground/65 dark:text-foreground/75 hover:text-foreground"
30
- )
31
- },
32
- a.value
33
- ),
34
- e
35
- ), M = ({ entries: a }) => {
36
- const { activeAnchor: e } = H(), t = f(null), c = f(!1), [d, l] = _({
37
- top: 0,
38
- opacity: 0
39
- });
40
- return $(() => {
41
- if (!t.current) return;
42
- const r = t.current.querySelector(
43
- `[${y}='${e}']`
44
- );
45
- if (!r) {
46
- l({ top: 0, opacity: 0 });
47
- return;
48
- }
49
- const n = t.current.getBoundingClientRect().top, p = r.getBoundingClientRect().top;
50
- l({
51
- opacity: 1,
52
- top: `${p - n}px`
53
- }), !c.current && requestIdleCallback(() => {
54
- c.current = !0;
55
- });
56
- }, [e]), /* @__PURE__ */ React.createElement("aside", { className: "sticky scrollbar top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 font-medium mb-2" }, /* @__PURE__ */ React.createElement(L, { size: 16 }), "On this page"), /* @__PURE__ */ React.createElement("div", { className: "relative ms-2 ps-4" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 right-auto bg-border w-[2px]" }), /* @__PURE__ */ React.createElement(
57
- "div",
58
- {
59
- className: m(
60
- "absolute -left-px -translate-y-1 h-6 w-[4px] rounded bg-primary",
61
- c.current && "ease-out [transition:top_150ms,opacity_325ms]"
62
- ),
63
- style: d
64
- }
65
- ), /* @__PURE__ */ React.createElement(
66
- "ul",
67
- {
68
- ref: t,
69
- className: "relative font-medium list-none space-y-2"
70
- },
71
- a.map((r) => /* @__PURE__ */ React.createElement(
72
- v,
73
- {
74
- isActive: r.id === e,
75
- key: r.id,
76
- item: r,
77
- className: "pl-0"
78
- },
79
- r.children && /* @__PURE__ */ React.createElement("ul", { className: "list-none pl-4 pt-2 space-y-2" }, r.children.map((n) => /* @__PURE__ */ React.createElement(
80
- v,
81
- {
82
- item: n,
83
- isActive: n.id === e,
84
- key: n.id
85
- }
86
- )))
87
- ))
88
- )));
89
- }, j = {
90
- h2: ({ children: a, id: e }) => /* @__PURE__ */ React.createElement(u, { level: 2, id: e, registerSidebarAnchor: !0 }, a),
91
- h3: ({ children: a, id: e }) => /* @__PURE__ */ React.createElement(u, { level: 3, id: e, registerSidebarAnchor: !0 }, a)
92
- }, X = ({
93
- mdxComponent: a,
94
- frontmatter: e = {},
95
- defaultOptions: t,
96
- tableOfContents: c
97
- }) => {
98
- var x, R, h;
99
- const d = (x = k()) == null ? void 0 : x.categoryLabel, l = e.title, r = e.category ?? d, n = e.toc === !1 || (t == null ? void 0 : t.toc) === !1, p = ((R = c.find((s) => s.depth === 1)) == null ? void 0 : R.value) ?? l, b = e.disablePager ?? (t == null ? void 0 : t.disablePager) ?? !1, g = ((h = c.find((s) => s.depth === 1)) == null ? void 0 : h.children) ?? // if `title` is provided by frontmatter it does not appear in the table of contents
100
- c.filter((s) => s.depth === 2), N = !n && g.length > 0, { prev: o, next: i } = A();
101
- return /* @__PURE__ */ React.createElement("div", { className: "xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between" }, /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement("title", null, p)), /* @__PURE__ */ React.createElement(
102
- "div",
103
- {
104
- className: m(
105
- S,
106
- "max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]"
107
- )
108
- },
109
- /* @__PURE__ */ React.createElement("header", null, r && /* @__PURE__ */ React.createElement(C, null, r), l && /* @__PURE__ */ React.createElement(u, { level: 1, id: I(l, { lower: !0 }) }, l)),
110
- /* @__PURE__ */ React.createElement(
111
- a,
112
- {
113
- components: { ...P(), ...j }
114
- }
115
- ),
116
- !b && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("hr", null), /* @__PURE__ */ React.createElement("div", { className: "not-prose flex flex-wrap items-center justify-between gap-2 lg:gap-8" }, o ? /* @__PURE__ */ React.createElement(
117
- E,
118
- {
119
- to: o.id,
120
- className: "flex flex-col items-stretch gap-2 flex-1 min-w-max border rounded px-6 py-4 text-start hover:border-primary/85 transition shadow-sm hover:shadow-md",
121
- title: o.label
122
- },
123
- /* @__PURE__ */ React.createElement("div", { className: "text-sm text-muted-foreground" }, "← Previous page"),
124
- /* @__PURE__ */ React.createElement("div", { className: "text-lg text-primary truncate" }, o.label)
125
- ) : /* @__PURE__ */ React.createElement("div", { className: "flex-1" }), i ? /* @__PURE__ */ React.createElement(
126
- E,
127
- {
128
- to: i.id,
129
- className: "flex flex-col items-stretch gap-2 flex-1 min-w-max border rounded px-6 py-4 text-end hover:border-primary/85 transition shadow-sm hover:shadow-md",
130
- title: i.label
131
- },
132
- /* @__PURE__ */ React.createElement("div", { className: "text-sm text-muted-foreground" }, "Next page →"),
133
- /* @__PURE__ */ React.createElement("div", { className: "text-lg text-primary truncate" }, i.label)
134
- ) : /* @__PURE__ */ React.createElement("div", { className: "flex-1" })))
135
- ), /* @__PURE__ */ React.createElement("div", { className: "hidden xl:block" }, N && /* @__PURE__ */ React.createElement(M, { entries: g })));
136
- };
137
- export {
138
- X as MdxPage
139
- };
140
- //# sourceMappingURL=MdxPage-BavkYqzi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MdxPage-BavkYqzi.js","sources":["../src/lib/plugins/markdown/Toc.tsx","../src/lib/plugins/markdown/MdxPage.tsx"],"sourcesContent":["import type { TocEntry } from \"@stefanprobst/rehype-extract-toc\";\nimport { ListTreeIcon } from \"lucide-react\";\nimport {\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type PropsWithChildren,\n} from \"react\";\nimport { AnchorLink } from \"../../components/AnchorLink.js\";\nimport { useViewportAnchor } from \"../../components/context/ViewportAnchorContext.js\";\nimport { cn } from \"../../util/cn.js\";\n\nconst DATA_ANCHOR_ATTR = \"data-active\";\n\nconst TocItem = ({\n item,\n children,\n className,\n isActive,\n}: PropsWithChildren<{\n item: TocEntry;\n isActive: boolean;\n className?: string;\n}>) => {\n return (\n <li\n className={cn(\n \"truncate\",\n isActive\n ? \"text-primary\"\n : \"text-foreground/65 dark:text-foreground/75\",\n className,\n )}\n title={item.value}\n >\n <AnchorLink\n to={`#${item.id}`}\n {...{ [DATA_ANCHOR_ATTR]: item.id }}\n className={cn(\n isActive\n ? \"text-primary\"\n : \"text-foreground/65 dark:text-foreground/75 hover:text-foreground\",\n )}\n >\n {item.value}\n </AnchorLink>\n {children}\n </li>\n );\n};\n\nexport const Toc = ({ entries }: { entries: TocEntry[] }) => {\n const { activeAnchor } = useViewportAnchor();\n const listWrapperRef = useRef<HTMLUListElement>(null);\n const paintedOnce = useRef(false);\n const [indicatorStyle, setIndicatorStyles] = useState<CSSProperties>({\n top: 0,\n opacity: 0,\n });\n\n // synchronize active anchor indicator with the scroll position\n useEffect(() => {\n if (!listWrapperRef.current) return;\n\n const activeElement = listWrapperRef.current.querySelector(\n `[${DATA_ANCHOR_ATTR}='${activeAnchor}']`,\n );\n\n if (!activeElement) {\n setIndicatorStyles({ top: 0, opacity: 0 });\n return;\n }\n\n const topParent = listWrapperRef.current.getBoundingClientRect().top;\n const topElement = activeElement.getBoundingClientRect().top;\n\n setIndicatorStyles({\n opacity: 1,\n top: `${topElement - topParent}px`,\n });\n\n if (paintedOnce.current) return;\n\n // after all is painted, the indicator should animate\n requestIdleCallback(() => {\n paintedOnce.current = true;\n });\n }, [activeAnchor]);\n\n return (\n <aside className=\"sticky scrollbar top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm\">\n <div className=\"flex items-center gap-2 font-medium mb-2\">\n <ListTreeIcon size={16} />\n On this page\n </div>\n <div className=\"relative ms-2 ps-4\">\n <div className=\"absolute inset-0 right-auto bg-border w-[2px]\" />\n <div\n className={cn(\n \"absolute -left-px -translate-y-1 h-6 w-[4px] rounded bg-primary\",\n paintedOnce.current &&\n \"ease-out [transition:top_150ms,opacity_325ms]\",\n )}\n style={indicatorStyle}\n />\n <ul\n ref={listWrapperRef}\n className=\"relative font-medium list-none space-y-2\"\n >\n {entries.map((item) => (\n <TocItem\n isActive={item.id === activeAnchor}\n key={item.id}\n item={item}\n className=\"pl-0\"\n >\n {item.children && (\n <ul className=\"list-none pl-4 pt-2 space-y-2\">\n {item.children.map((child) => (\n <TocItem\n item={child}\n isActive={child.id === activeAnchor}\n key={child.id}\n />\n ))}\n </ul>\n )}\n </TocItem>\n ))}\n </ul>\n </div>\n </aside>\n );\n};\n","import { useMDXComponents } from \"@mdx-js/react\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { type PropsWithChildren } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { ProseClasses } from \"../../components/Markdown.js\";\nimport {\n useCurrentItem,\n usePrevNext,\n} from \"../../components/navigation/utils.js\";\nimport type { MdxComponentsType } from \"../../util/MdxComponents.js\";\nimport { cn } from \"../../util/cn.js\";\nimport slugify from \"../../util/slugify.js\";\nimport { Toc } from \"./Toc.js\";\nimport { MarkdownPluginDefaultOptions, MDXImport } from \"./index.js\";\n\nconst MarkdownHeadings = {\n h2: ({ children, id }) => (\n <Heading level={2} id={id} registerSidebarAnchor>\n {children}\n </Heading>\n ),\n h3: ({ children, id }) => (\n <Heading level={3} id={id} registerSidebarAnchor>\n {children}\n </Heading>\n ),\n} satisfies MdxComponentsType;\n\nexport const MdxPage = ({\n mdxComponent: MdxComponent,\n frontmatter = {},\n defaultOptions,\n tableOfContents,\n}: PropsWithChildren<\n Omit<MDXImport, \"default\"> & {\n mdxComponent: MDXImport[\"default\"];\n defaultOptions?: MarkdownPluginDefaultOptions;\n }\n>) => {\n const categoryTitle = useCurrentItem()?.categoryLabel;\n const title = frontmatter.title;\n const category = frontmatter.category ?? categoryTitle;\n const hideToc = frontmatter.toc === false || defaultOptions?.toc === false;\n const pageTitle =\n tableOfContents.find((item) => item.depth === 1)?.value ?? title;\n const hidePager =\n frontmatter.disablePager ?? defaultOptions?.disablePager ?? false;\n\n const tocEntries =\n tableOfContents.find((item) => item.depth === 1)?.children ??\n // if `title` is provided by frontmatter it does not appear in the table of contents\n tableOfContents.filter((item) => item.depth === 2);\n\n const showToc = !hideToc && tocEntries.length > 0;\n\n const { prev, next } = usePrevNext();\n\n return (\n <div className=\"xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between\">\n <Helmet>\n <title>{pageTitle}</title>\n </Helmet>\n <div\n className={cn(\n ProseClasses,\n \"max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]\",\n )}\n >\n <header>\n {category && <CategoryHeading>{category}</CategoryHeading>}\n {title && (\n <Heading level={1} id={slugify(title, { lower: true })}>\n {title}\n </Heading>\n )}\n </header>\n <MdxComponent\n components={{ ...useMDXComponents(), ...MarkdownHeadings }}\n />\n {!hidePager && (\n <>\n <hr />\n <div className=\"not-prose flex flex-wrap items-center justify-between gap-2 lg:gap-8\">\n {prev ? (\n <Link\n to={prev.id}\n className=\"flex flex-col items-stretch gap-2 flex-1 min-w-max border rounded px-6 py-4 text-start hover:border-primary/85 transition shadow-sm hover:shadow-md\"\n title={prev.label}\n >\n <div className=\"text-sm text-muted-foreground\">\n ← Previous page\n </div>\n <div className=\"text-lg text-primary truncate\">\n {prev.label}\n </div>\n </Link>\n ) : (\n <div className=\"flex-1\" />\n )}\n {next ? (\n <Link\n to={next.id}\n className=\"flex flex-col items-stretch gap-2 flex-1 min-w-max border rounded px-6 py-4 text-end hover:border-primary/85 transition shadow-sm hover:shadow-md\"\n title={next.label}\n >\n <div className=\"text-sm text-muted-foreground\">\n Next page →\n </div>\n <div className=\"text-lg text-primary truncate\">\n {next.label}\n </div>\n </Link>\n ) : (\n <div className=\"flex-1\" />\n )}\n </div>\n </>\n )}\n </div>\n <div className=\"hidden xl:block\">\n {showToc && <Toc entries={tocEntries} />}\n </div>\n </div>\n );\n};\n"],"names":["DATA_ANCHOR_ATTR","TocItem","item","children","className","isActive","cn","AnchorLink","Toc","entries","activeAnchor","useViewportAnchor","listWrapperRef","useRef","paintedOnce","indicatorStyle","setIndicatorStyles","useState","useEffect","activeElement","topParent","topElement","ListTreeIcon","child","MarkdownHeadings","id","Heading","MdxPage","MdxComponent","frontmatter","defaultOptions","tableOfContents","categoryTitle","_a","useCurrentItem","title","category","hideToc","pageTitle","_b","hidePager","tocEntries","_c","showToc","prev","next","usePrevNext","Helmet","ProseClasses","CategoryHeading","slugify","useMDXComponents","Link"],"mappings":"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"}
@@ -1,460 +0,0 @@
1
- import { C as v } from "./CategoryHeading-BE8e6QdS.js";
2
- import { D as w } from "./DeveloperHint-Bl9gIdNI.js";
3
- import { E as P } from "./ErrorPage-CPR1XVKW.js";
4
- import { I as f, M as p, H as E, a as d, P as u, S as A } from "./Markdown-CCNihH_N.js";
5
- import { CheckIcon as j, CopyIcon as T, ChevronDownIcon as L, CircleFadingPlusIcon as z, CircleDotIcon as $, CircleIcon as F, SquareMinusIcon as D, SquarePlusIcon as H, ListPlusIcon as B } from "lucide-react";
6
- import { useState as y, useCallback as M } from "react";
7
- import { C as G, a as m, b as Q, c as V, d as _, T as J, e as K, f as U, g as W, S as Z, h as S, u as X } from "./index-BF4cn28H.js";
8
- import { R as b, T as N, C, S as Y } from "./index-G1-TGLO1.js";
9
- import { u as ee } from "./urql-YhcsXYy8.js";
10
- import { B as te } from "./index-BLvMkqjO.js";
11
- function ae(t, e) {
12
- return e;
13
- }
14
- const ne = ({ url: t }) => {
15
- const [e, n] = y(!1);
16
- return /* @__PURE__ */ React.createElement("div", { className: "my-4 flex items-center justify-end gap-2 text-sm" }, /* @__PURE__ */ React.createElement("span", { className: "font-medium" }, "Endpoint:"), /* @__PURE__ */ React.createElement(f, { className: "p-1.5 flex gap-2.5 items-center text-xs" }, t, /* @__PURE__ */ React.createElement(
17
- "button",
18
- {
19
- onClick: () => {
20
- navigator.clipboard.writeText(t).then(() => {
21
- n(!0), setTimeout(() => n(!1), 2e3);
22
- });
23
- },
24
- type: "button"
25
- },
26
- e ? /* @__PURE__ */ React.createElement(j, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ React.createElement(T, { size: 14, strokeWidth: 1.3 })
27
- )));
28
- }, k = (t, e) => t.reduce(
29
- (n, r) => {
30
- const a = e(r);
31
- return n[a] || (n[a] = []), n[a].push(r), n;
32
- },
33
- {}
34
- ), re = (t, e) => t ? e(t) : void 0, h = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
35
- type: "string"
36
- }, ce = ({
37
- parameter: t,
38
- group: e,
39
- id: n
40
- }) => /* @__PURE__ */ React.createElement("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("code", null, e === "path" ? /* @__PURE__ */ React.createElement(
41
- G,
42
- {
43
- name: t.name,
44
- backgroundOpacity: "15%",
45
- slug: n + "-" + t.name.toLocaleLowerCase()
46
- }
47
- ) : t.name), t.required && /* @__PURE__ */ React.createElement("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg" }, "required"), h(t).type && /* @__PURE__ */ React.createElement("span", { className: "text-muted-foreground" }, h(t).type)), t.description && /* @__PURE__ */ React.createElement(
48
- p,
49
- {
50
- content: t.description,
51
- className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
52
- }
53
- )), se = ({
54
- group: t,
55
- parameters: e,
56
- id: n
57
- }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(E, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize" }, t === "header" ? "Headers" : `${t} Parameters`), /* @__PURE__ */ React.createElement(m, null, /* @__PURE__ */ React.createElement("ul", { className: "list-none m-0 px-0 divide-y " }, e.sort((r, a) => r.required === a.required ? 0 : r.required ? -1 : 1).map((r) => /* @__PURE__ */ React.createElement(
58
- ce,
59
- {
60
- key: `${r.name}-${r.in}`,
61
- parameter: r,
62
- id: n,
63
- group: t
64
- }
65
- ))))), le = (t) => Object.entries(t), oe = {
66
- AND: /* @__PURE__ */ React.createElement(z, { size: 16, className: "fill-card" }),
67
- OR: /* @__PURE__ */ React.createElement($, { size: 16, className: "fill-card" }),
68
- ONE: /* @__PURE__ */ React.createElement(F, { size: 14, className: "fill-card" })
69
- }, ie = {
70
- AND: "text-green-500 dark:text-green-300/60",
71
- OR: "text-blue-400 dark:text-blue-500",
72
- ONE: "text-purple-500 dark:text-purple-300/60"
73
- }, me = ({
74
- type: t,
75
- isOpen: e,
76
- className: n
77
- }) => /* @__PURE__ */ React.createElement(
78
- "div",
79
- {
80
- className: d(
81
- ie[t],
82
- "relative text-sm flex py-2",
83
- "before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
84
- n
85
- )
86
- },
87
- /* @__PURE__ */ React.createElement("div", { className: "-translate-x-[7px] flex gap-1 items-center" }, oe[t], /* @__PURE__ */ React.createElement(
88
- "div",
89
- {
90
- className: d(
91
- "translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
92
- !e && "-rotate-90"
93
- )
94
- },
95
- /* @__PURE__ */ React.createElement(L, { size: 16 })
96
- ))
97
- ), pe = (t) => {
98
- const [e, n] = y(!0);
99
- return /* @__PURE__ */ React.createElement(
100
- b,
101
- {
102
- open: e,
103
- onOpenChange: () => n((r) => !r),
104
- className: "group"
105
- },
106
- /* @__PURE__ */ React.createElement(N, null, /* @__PURE__ */ React.createElement(me, { type: t.type, isOpen: e })),
107
- !e && /* @__PURE__ */ React.createElement("div", { className: "wavy-line bg-border translate-y-1" }),
108
- /* @__PURE__ */ React.createElement(C, null, /* @__PURE__ */ React.createElement(g, { schema: t.schema, level: t.level + 1 }))
109
- );
110
- }, de = {
111
- AND: "All of",
112
- OR: "Any of",
113
- ONE: "One of"
114
- }, ue = ({
115
- schemas: t,
116
- type: e,
117
- isOpen: n,
118
- level: r,
119
- toggleOpen: a
120
- }) => /* @__PURE__ */ React.createElement(b, { open: n, onOpenChange: a, asChild: !0 }, /* @__PURE__ */ React.createElement(m, { className: "px-6" }, /* @__PURE__ */ React.createElement(N, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5" }, n ? /* @__PURE__ */ React.createElement(D, { size: 14 }) : /* @__PURE__ */ React.createElement(H, { size: 14 }), /* @__PURE__ */ React.createElement("span", null, de[e])), /* @__PURE__ */ React.createElement(C, { className: "pb-4" }, t.map((c, l) => (
121
- // eslint-disable-next-line react/no-array-index-key
122
- /* @__PURE__ */ React.createElement(
123
- pe,
124
- {
125
- key: l,
126
- type: e,
127
- schema: c,
128
- level: r
129
- }
130
- )
131
- ))))), Re = (t) => t.type === "object" || t.type === "array" && typeof t.items == "object" && (!t.items.type || t.items.type === "object"), x = (t) => !!(t.oneOf ?? t.allOf ?? t.anyOf), Ee = {
132
- allOf: "AND",
133
- anyOf: "OR",
134
- oneOf: "ONE"
135
- }, I = ({
136
- schema: t,
137
- level: e
138
- }) => {
139
- const [n, r] = y(!0), a = M(() => r((c) => !c), []);
140
- for (const [c, l] of le(Ee))
141
- if (t[c])
142
- return /* @__PURE__ */ React.createElement(
143
- ue,
144
- {
145
- schemas: t[c],
146
- type: l,
147
- isOpen: n,
148
- toggleOpen: a,
149
- level: e
150
- }
151
- );
152
- }, ge = ({
153
- name: t,
154
- schema: e,
155
- group: n,
156
- level: r,
157
- defaultOpen: a = !1,
158
- showCollapseButton: c = !0
159
- }) => {
160
- const [l, R] = y(a);
161
- return /* @__PURE__ */ React.createElement("li", { className: "p-4 bg-border/20 hover:bg-border/30" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1 justify-between text-sm" }, /* @__PURE__ */ React.createElement("div", { className: "flex gap-2 items-center" }, /* @__PURE__ */ React.createElement("code", null, t), /* @__PURE__ */ React.createElement("span", { className: "text-muted-foreground" }, e.type === "array" && e.items.type ? /* @__PURE__ */ React.createElement("span", null, e.items.type, "[]") : Array.isArray(e.type) ? /* @__PURE__ */ React.createElement("span", null, e.type.join(" | ")) : /* @__PURE__ */ React.createElement("span", null, e.type)), n === "optional" && /* @__PURE__ */ React.createElement("span", { className: "py-px px-1.5 font-medium border rounded-lg" }, "optional")), e.description && /* @__PURE__ */ React.createElement(
162
- p,
163
- {
164
- className: d(u, "text-sm leading-normal line-clamp-4"),
165
- content: e.description
166
- }
167
- ), (x(e) || Re(e)) && /* @__PURE__ */ React.createElement(
168
- b,
169
- {
170
- defaultOpen: a,
171
- open: l,
172
- onOpenChange: () => R(!l)
173
- },
174
- c && /* @__PURE__ */ React.createElement(N, { asChild: !0 }, /* @__PURE__ */ React.createElement(
175
- te,
176
- {
177
- variant: "outline",
178
- size: "sm",
179
- className: "mt-2 flex gap-1.5"
180
- },
181
- /* @__PURE__ */ React.createElement(B, { size: 18 }),
182
- l ? "Hide nested properties" : "Show nested properties"
183
- )),
184
- /* @__PURE__ */ React.createElement(C, null, /* @__PURE__ */ React.createElement("div", { className: "mt-2" }, x(e) ? /* @__PURE__ */ React.createElement(I, { schema: e, level: r + 1 }) : e.type === "object" ? /* @__PURE__ */ React.createElement(g, { schema: e, level: r + 1 }) : e.type === "array" && typeof e.items == "object" && /* @__PURE__ */ React.createElement(g, { schema: e.items, level: r + 1 })))
185
- )));
186
- }, g = ({
187
- schema: t,
188
- level: e = 0,
189
- defaultOpen: n = !1
190
- }) => {
191
- if (!t || Object.keys(t).length === 0)
192
- return /* @__PURE__ */ React.createElement(m, { className: "p-4" }, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground italic" }, "No response specified"));
193
- const r = (a, c) => {
194
- if (x(a))
195
- return /* @__PURE__ */ React.createElement(I, { schema: a, level: c });
196
- if (a.type === "array" && a.items) {
197
- const l = a.items;
198
- return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ React.createElement(m, { className: "p-4" }, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground" }, l.type, "[]"), a.description && /* @__PURE__ */ React.createElement(
199
- p,
200
- {
201
- className: d(
202
- u,
203
- "text-sm leading-normal line-clamp-4"
204
- ),
205
- content: a.description
206
- }
207
- )) : l.type === "object" ? /* @__PURE__ */ React.createElement(m, { className: "flex flex-col gap-2 bg-border/30 p-4" }, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground" }, "object[]"), r(l, c + 1)) : r(l, c + 1);
208
- }
209
- if (a.type === "object" && !a.properties)
210
- return /* @__PURE__ */ React.createElement(m, { className: "p-4 flex gap-2 items-center" }, "name" in a && /* @__PURE__ */ React.createElement(React.Fragment, null, a.name), /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground" }, "object"), a.description && /* @__PURE__ */ React.createElement(
211
- p,
212
- {
213
- className: d(
214
- u,
215
- "text-sm leading-normal line-clamp-4"
216
- ),
217
- content: a.description
218
- }
219
- ));
220
- if (a.properties) {
221
- const l = k(
222
- Object.entries(a.properties),
223
- ([i, s]) => {
224
- var o;
225
- return s.deprecated ? "deprecated" : (o = a.required) != null && o.includes(i) ? "required" : "optional";
226
- }
227
- ), R = ["required", "optional", "deprecated"];
228
- return /* @__PURE__ */ React.createElement(m, { className: "divide-y overflow-hidden" }, R.map(
229
- (i) => l[i] && /* @__PURE__ */ React.createElement("ul", { key: i, className: "divide-y" }, l[i].map(([s, o]) => /* @__PURE__ */ React.createElement(
230
- ge,
231
- {
232
- key: s,
233
- name: s,
234
- schema: o,
235
- group: i,
236
- level: c,
237
- defaultOpen: n
238
- }
239
- )))
240
- ));
241
- }
242
- return typeof a.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(a.type) ? /* @__PURE__ */ React.createElement(m, { className: "p-4" }, /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground" }, a.type), a.description && /* @__PURE__ */ React.createElement(
243
- p,
244
- {
245
- className: d(
246
- u,
247
- "text-sm leading-normal line-clamp-4"
248
- ),
249
- content: a.description
250
- }
251
- )) : a.additionalProperties ? /* @__PURE__ */ React.createElement(m, { className: "my-2" }, /* @__PURE__ */ React.createElement(Q, null, /* @__PURE__ */ React.createElement(V, null, "Additional Properties:")), /* @__PURE__ */ React.createElement(_, null, r(
252
- a.additionalProperties,
253
- c + 1
254
- ))) : null;
255
- };
256
- return r(t, e);
257
- }, ye = ["path", "query", "header", "cookie"], fe = ({
258
- operationFragment: t
259
- }) => {
260
- var l, R, i;
261
- const e = ae(xe, t), n = k(
262
- e.parameters ?? [],
263
- (s) => s.in
264
- ), r = e.responses.at(0), [a, c] = y(r == null ? void 0 : r.statusCode);
265
- return /* @__PURE__ */ React.createElement(
266
- "div",
267
- {
268
- key: e.operationId,
269
- className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16"
270
- },
271
- /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React.createElement(E, { level: 2, id: e.slug, registerSidebarAnchor: !0 }, e.summary), e.description && /* @__PURE__ */ React.createElement(
272
- p,
273
- {
274
- className: `${u} max-w-full prose-img:max-w-prose`,
275
- content: e.description
276
- }
277
- ), e.parameters && e.parameters.length > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, ye.flatMap(
278
- (s) => {
279
- var o;
280
- return (o = n[s]) != null && o.length ? /* @__PURE__ */ React.createElement(
281
- se,
282
- {
283
- key: s,
284
- id: e.slug,
285
- parameters: n[s],
286
- group: s
287
- }
288
- ) : [];
289
- }
290
- )), re((i = (R = (l = e.requestBody) == null ? void 0 : l.content) == null ? void 0 : R.at(0)) == null ? void 0 : i.schema, (s) => /* @__PURE__ */ React.createElement("div", { className: "mt-4 flex flex-col gap-4" }, /* @__PURE__ */ React.createElement(
291
- E,
292
- {
293
- level: 3,
294
- className: "capitalize",
295
- id: `${e.slug}/request-body`,
296
- registerSidebarAnchor: !0
297
- },
298
- "Request Body"
299
- ), /* @__PURE__ */ React.createElement(g, { schema: s }))), e.responses.length > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
300
- E,
301
- {
302
- level: 3,
303
- className: "capitalize mt-8 pt-8 border-t",
304
- id: `${e.slug}/responses`,
305
- registerSidebarAnchor: !0
306
- },
307
- "Responses"
308
- ), /* @__PURE__ */ React.createElement(
309
- J,
310
- {
311
- onValueChange: (s) => c(s),
312
- value: a
313
- },
314
- e.responses.length > 1 && /* @__PURE__ */ React.createElement(K, null, e.responses.map((s) => /* @__PURE__ */ React.createElement(
315
- U,
316
- {
317
- value: s.statusCode,
318
- key: s.statusCode,
319
- title: s.description
320
- },
321
- s.statusCode
322
- ))),
323
- /* @__PURE__ */ React.createElement("ul", { className: "list-none m-0 px-0" }, e.responses.map((s) => {
324
- var o, O;
325
- return /* @__PURE__ */ React.createElement(
326
- W,
327
- {
328
- value: s.statusCode,
329
- key: s.statusCode
330
- },
331
- /* @__PURE__ */ React.createElement(
332
- g,
333
- {
334
- schema: (O = (o = s.content) == null ? void 0 : o.find((q) => q.schema)) == null ? void 0 : O.schema
335
- }
336
- )
337
- );
338
- }))
339
- ))),
340
- /* @__PURE__ */ React.createElement(
341
- Z,
342
- {
343
- selectedResponse: a,
344
- onSelectResponse: c,
345
- operation: e
346
- }
347
- )
348
- );
349
- }, xe = S(
350
- /* GraphQL */
351
- `
352
- fragment OperationsFragment on OperationItem {
353
- slug
354
- summary
355
- method
356
- description
357
- operationId
358
- contentTypes
359
- path
360
- parameters {
361
- name
362
- in
363
- description
364
- required
365
- schema
366
- style
367
- examples {
368
- name
369
- description
370
- externalValue
371
- value
372
- summary
373
- }
374
- }
375
- requestBody {
376
- content {
377
- mediaType
378
- encoding {
379
- name
380
- }
381
- schema
382
- }
383
- description
384
- required
385
- }
386
- responses {
387
- statusCode
388
- links
389
- description
390
- content {
391
- mediaType
392
- encoding {
393
- name
394
- }
395
- schema
396
- }
397
- }
398
- }
399
- `
400
- ), be = S(
401
- /* GraphQL */
402
- `
403
- query AllOperations($input: JSON!, $type: SchemaType!) {
404
- schema(input: $input, type: $type) {
405
- description
406
- title
407
- url
408
- version
409
- tags {
410
- name
411
- description
412
- operations {
413
- slug
414
- ...OperationsFragment
415
- }
416
- }
417
- }
418
- }
419
- `
420
- ), Ne = { suspense: !0 }, Ae = () => {
421
- var a;
422
- const { type: t, input: e } = X(), [n] = ee({
423
- query: be,
424
- variables: { type: t, input: e },
425
- context: Ne
426
- }), r = (a = n.error) == null ? void 0 : a.graphQLErrors.at(0);
427
- return r ? /* @__PURE__ */ React.createElement(
428
- P,
429
- {
430
- category: "Error",
431
- title: "Schema cannot be displayed",
432
- message: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(w, { className: "mb-4" }, "Check your configuration value ", /* @__PURE__ */ React.createElement(f, null, "apis.type"), " ", "and ", /* @__PURE__ */ React.createElement(f, null, "apis.input"), " in the Zudoku config."), "An error occurred while trying to fetch the API reference:", /* @__PURE__ */ React.createElement(A, { code: r.toString(), language: "plain" }))
433
- }
434
- ) : n.data ? /* @__PURE__ */ React.createElement("div", { className: "pt-[--padding-content-top]" }, /* @__PURE__ */ React.createElement(
435
- "div",
436
- {
437
- className: d(u, "mb-16 max-w-full prose-img:max-w-prose")
438
- },
439
- /* @__PURE__ */ React.createElement(v, null, "Overview"),
440
- /* @__PURE__ */ React.createElement(E, { level: 1, id: "description", registerSidebarAnchor: !0 }, n.data.schema.title),
441
- /* @__PURE__ */ React.createElement(p, { content: n.data.schema.description ?? "" })
442
- ), /* @__PURE__ */ React.createElement("hr", null), /* @__PURE__ */ React.createElement(ne, { url: n.data.schema.url }), n.data.schema.tags.filter((c) => c.operations.length > 0).map((c) => /* @__PURE__ */ React.createElement("div", { key: c.name }, c.name && /* @__PURE__ */ React.createElement(v, null, c.name), c.description && /* @__PURE__ */ React.createElement(
443
- p,
444
- {
445
- className: `${u} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
446
- content: c.description
447
- }
448
- ), /* @__PURE__ */ React.createElement("div", { className: "operation mb-12" }, /* @__PURE__ */ React.createElement(Y, null, c.operations.map((l) => /* @__PURE__ */ React.createElement(
449
- fe,
450
- {
451
- key: l.slug,
452
- operationFragment: l
453
- }
454
- ))))))) : null;
455
- };
456
- export {
457
- Ae as OperationList,
458
- xe as OperationsFragment
459
- };
460
- //# sourceMappingURL=OperationList-C6Ps2keZ.js.map