@acmekit/docs-ui 2.13.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Items-YPPZD6C6.mjs +312 -0
- package/dist/chunk-JD7BP7O5.mjs +13144 -0
- package/dist/index.d.mts +1550 -0
- package/dist/index.d.ts +1550 -0
- package/dist/index.js +15218 -0
- package/dist/index.mjs +366 -0
- package/package.json +58 -0
- package/src/components/Badge/index.tsx +74 -0
- package/src/components/BadgesList/index.tsx +18 -0
- package/src/components/BetaBadge/index.tsx +24 -0
- package/src/components/Bordered/index.tsx +21 -0
- package/src/components/BorderedIcon/index.tsx +60 -0
- package/src/components/Breadcrumbs/index.tsx +83 -0
- package/src/components/Button/index.tsx +100 -0
- package/src/components/Card/Layout/Default/index.tsx +124 -0
- package/src/components/Card/Layout/Filler/index.tsx +30 -0
- package/src/components/Card/Layout/Large/index.tsx +88 -0
- package/src/components/Card/Layout/Mini/index.tsx +142 -0
- package/src/components/Card/index.tsx +50 -0
- package/src/components/CardList/index.tsx +40 -0
- package/src/components/ChildDocs/index.tsx +9 -0
- package/src/components/CodeBlock/Actions/AskAi/index.tsx +10 -0
- package/src/components/CodeBlock/Actions/Copy/index.tsx +59 -0
- package/src/components/CodeBlock/Actions/index.tsx +137 -0
- package/src/components/CodeBlock/Collapsible/Button/index.tsx +58 -0
- package/src/components/CodeBlock/Collapsible/Fade/index.tsx +55 -0
- package/src/components/CodeBlock/Collapsible/Lines/index.tsx +22 -0
- package/src/components/CodeBlock/Header/Wrapper/index.tsx +46 -0
- package/src/components/CodeBlock/Header/index.tsx +67 -0
- package/src/components/CodeBlock/Inline/index.tsx +20 -0
- package/src/components/CodeBlock/Line/index.tsx +331 -0
- package/src/components/CodeBlock/index.tsx +510 -0
- package/src/components/CodeMdx/index.tsx +45 -0
- package/src/components/CodeTabs/Item/index.tsx +67 -0
- package/src/components/CodeTabs/index.tsx +319 -0
- package/src/components/ContentMenu/Actions/index.tsx +7 -0
- package/src/components/ContentMenu/Products/index.tsx +64 -0
- package/src/components/ContentMenu/Toc/index.tsx +148 -0
- package/src/components/ContentMenu/Version/index.tsx +77 -0
- package/src/components/ContentMenu/index.tsx +31 -0
- package/src/components/CopyButton/index.tsx +76 -0
- package/src/components/Details/Summary/index.tsx +75 -0
- package/src/components/Details/index.tsx +98 -0
- package/src/components/DetailsList/index.tsx +32 -0
- package/src/components/DottedSeparator/index.tsx +30 -0
- package/src/components/EditButton/index.tsx +32 -0
- package/src/components/EditDate/index.tsx +33 -0
- package/src/components/ErrorPage/Icon/index.tsx +428 -0
- package/src/components/ErrorPage/index.tsx +32 -0
- package/src/components/Feedback/Solutions/index.tsx +105 -0
- package/src/components/Feedback/index.tsx +304 -0
- package/src/components/Footer/index.tsx +23 -0
- package/src/components/Heading/H1/index.tsx +21 -0
- package/src/components/Heading/H2/index.tsx +47 -0
- package/src/components/Heading/H3/index.tsx +42 -0
- package/src/components/Heading/H4/index.tsx +14 -0
- package/src/components/Heading/index.tsx +4 -0
- package/src/components/IconHeadline/index.tsx +15 -0
- package/src/components/Icons/AiAssistant/index.tsx +462 -0
- package/src/components/Icons/ArrowRightDown/index.tsx +30 -0
- package/src/components/Icons/BundledProduct/index.tsx +72 -0
- package/src/components/Icons/CalendarRefresh/index.tsx +70 -0
- package/src/components/Icons/ChefHat/index.tsx +65 -0
- package/src/components/Icons/CircleDottedLine/index.tsx +60 -0
- package/src/components/Icons/CloudSolid/index.tsx +47 -0
- package/src/components/Icons/ColoredAcmeKit/index.tsx +13 -0
- package/src/components/Icons/DecisionProcess/index.tsx +58 -0
- package/src/components/Icons/Erp/index.tsx +92 -0
- package/src/components/Icons/Github/index.tsx +22 -0
- package/src/components/Icons/House/index.tsx +23 -0
- package/src/components/Icons/ImageBinary/index.tsx +69 -0
- package/src/components/Icons/Kapa/index.tsx +22 -0
- package/src/components/Icons/Markdown/index.tsx +25 -0
- package/src/components/Icons/NavigationDropdown/Admin/index.tsx +33 -0
- package/src/components/Icons/NavigationDropdown/Doc/index.tsx +41 -0
- package/src/components/Icons/NavigationDropdown/DocV1/index.tsx +37 -0
- package/src/components/Icons/NavigationDropdown/Modules/index.tsx +33 -0
- package/src/components/Icons/NavigationDropdown/Resources/index.tsx +37 -0
- package/src/components/Icons/NavigationDropdown/Store/index.tsx +37 -0
- package/src/components/Icons/NavigationDropdown/Ui/index.tsx +37 -0
- package/src/components/Icons/NavigationDropdown/User/index.tsx +37 -0
- package/src/components/Icons/PuzzleColored/index.tsx +35 -0
- package/src/components/Icons/QuestionMark/index.tsx +23 -0
- package/src/components/Icons/Restock/index.tsx +55 -0
- package/src/components/Icons/ScrollText/index.tsx +68 -0
- package/src/components/Icons/ShadedBg/index.tsx +334 -0
- package/src/components/Icons/Shop/index.tsx +68 -0
- package/src/components/Icons/SidebarLeft/index.tsx +42 -0
- package/src/components/Icons/StripeColored/index.tsx +60 -0
- package/src/components/Icons/ThumbDown/index.tsx +23 -0
- package/src/components/Icons/ThumbUp/index.tsx +23 -0
- package/src/components/Icons/WindowPaintbrush/index.tsx +57 -0
- package/src/components/Icons/index.tsx +20 -0
- package/src/components/InlineCode/index.tsx +42 -0
- package/src/components/InlineIcon/index.tsx +21 -0
- package/src/components/InlineThemeImage/index.tsx +14 -0
- package/src/components/Input/Search/index.tsx +64 -0
- package/src/components/Input/Text/index.tsx +39 -0
- package/src/components/Kbd/index.tsx +33 -0
- package/src/components/Label/index.tsx +19 -0
- package/src/components/Link/index.tsx +67 -0
- package/src/components/LinkButton/index.tsx +43 -0
- package/src/components/Loading/Dots/index.tsx +16 -0
- package/src/components/Loading/Spinner/index.tsx +19 -0
- package/src/components/Loading/index.tsx +43 -0
- package/src/components/MDXComponents/index.tsx +209 -0
- package/src/components/MainNav/DesktopMenu/ThemeMenu/index.tsx +76 -0
- package/src/components/MainNav/DesktopMenu/index.tsx +100 -0
- package/src/components/MainNav/Items/Dropdown/index.tsx +88 -0
- package/src/components/MainNav/Items/Link/index.tsx +34 -0
- package/src/components/MainNav/Items/index.tsx +61 -0
- package/src/components/MainNav/MobileMenu/Main/index.tsx +67 -0
- package/src/components/MainNav/MobileMenu/SubMenu/index.tsx +77 -0
- package/src/components/MainNav/MobileMenu/index.tsx +103 -0
- package/src/components/MainNav/Version/index.tsx +33 -0
- package/src/components/MainNav/index.tsx +153 -0
- package/src/components/MarkdownContent/index.tsx +41 -0
- package/src/components/Menu/Action/index.tsx +43 -0
- package/src/components/Menu/Divider/index.tsx +35 -0
- package/src/components/Menu/Dropdown/index.tsx +78 -0
- package/src/components/Menu/Item/index.tsx +36 -0
- package/src/components/Menu/SubMenu/index.tsx +47 -0
- package/src/components/Menu/index.tsx +44 -0
- package/src/components/Modal/Footer/index.tsx +29 -0
- package/src/components/Modal/Header/index.tsx +33 -0
- package/src/components/Modal/index.tsx +124 -0
- package/src/components/Note/Layout/index.tsx +139 -0
- package/src/components/Note/Types/checks.tsx +7 -0
- package/src/components/Note/Types/default.tsx +7 -0
- package/src/components/Note/Types/error.tsx +7 -0
- package/src/components/Note/Types/soon.tsx +7 -0
- package/src/components/Note/Types/sucess.tsx +7 -0
- package/src/components/Note/Types/warning.tsx +7 -0
- package/src/components/Note/index.tsx +32 -0
- package/src/components/Notices/DeprecatedNotice/index.tsx +33 -0
- package/src/components/Notices/ExpandableNotice/index.tsx +36 -0
- package/src/components/Notices/FeatureFlagNotice/index.tsx +36 -0
- package/src/components/Notices/VersionNotice/index.tsx +37 -0
- package/src/components/Notification/Item/Layout/Default/index.tsx +89 -0
- package/src/components/Notification/Item/index.tsx +88 -0
- package/src/components/Notification/index.tsx +65 -0
- package/src/components/Pagination/Card/index.tsx +80 -0
- package/src/components/Pagination/index.tsx +35 -0
- package/src/components/Prerequisites/Item/index.tsx +43 -0
- package/src/components/Prerequisites/index.tsx +94 -0
- package/src/components/RadioItem/index.tsx +38 -0
- package/src/components/Rating/index.tsx +133 -0
- package/src/components/RootProviders/index.tsx +31 -0
- package/src/components/Select/Badge/index.tsx +122 -0
- package/src/components/Select/Dropdown/index.tsx +188 -0
- package/src/components/Select/Input/index.tsx +123 -0
- package/src/components/Select/index.ts +13 -0
- package/src/components/Sidebar/Child/index.tsx +43 -0
- package/src/components/Sidebar/Item/Category/index.tsx +151 -0
- package/src/components/Sidebar/Item/Link/index.tsx +174 -0
- package/src/components/Sidebar/Item/Sidebar/index.tsx +67 -0
- package/src/components/Sidebar/Item/SubCategory/index.tsx +83 -0
- package/src/components/Sidebar/Item/index.tsx +41 -0
- package/src/components/Sidebar/Top/MobileClose/index.tsx +21 -0
- package/src/components/Sidebar/Top/index.tsx +33 -0
- package/src/components/Sidebar/index.tsx +153 -0
- package/src/components/SourceCodeLink/index.tsx +37 -0
- package/src/components/SplitLists/index.tsx +58 -0
- package/src/components/Table/index.tsx +87 -0
- package/src/components/Tabs/index.tsx +106 -0
- package/src/components/TextArea/index.tsx +30 -0
- package/src/components/ThemeImage/index.tsx +26 -0
- package/src/components/Toggle/index.tsx +28 -0
- package/src/components/Tooltip/index.tsx +65 -0
- package/src/components/TypeList/Items/index.tsx +337 -0
- package/src/components/TypeList/index.tsx +63 -0
- package/src/components/WideSection/index.tsx +25 -0
- package/src/components/ZoomImg/index.tsx +17 -0
- package/src/components/index.ts +75 -0
- package/src/constants.tsx +261 -0
- package/src/global-config.ts +11 -0
- package/src/hooks/index.ts +14 -0
- package/src/hooks/use-active-on-scroll/index.tsx +223 -0
- package/src/hooks/use-click-outside/index.tsx +37 -0
- package/src/hooks/use-collapsible/index.tsx +128 -0
- package/src/hooks/use-collapsible-code-lines/index.tsx +149 -0
- package/src/hooks/use-copy/index.tsx +28 -0
- package/src/hooks/use-heading-url/index.tsx +32 -0
- package/src/hooks/use-is-external-link/index.tsx +19 -0
- package/src/hooks/use-keyboard-shortcut/index.tsx +71 -0
- package/src/hooks/use-mutation-observer/index.ts +32 -0
- package/src/hooks/use-page-scroll-manager/index.tsx +82 -0
- package/src/hooks/use-resize-observer/index.ts +20 -0
- package/src/hooks/use-scroll-utils/index.tsx +372 -0
- package/src/hooks/use-select/index.tsx +99 -0
- package/src/hooks/use-tabs/index.tsx +94 -0
- package/src/index.ts +8 -0
- package/src/layouts/barebone.tsx +18 -0
- package/src/layouts/index.ts +4 -0
- package/src/layouts/main-content.tsx +86 -0
- package/src/layouts/root.tsx +43 -0
- package/src/layouts/tight.tsx +29 -0
- package/src/layouts/wide.tsx +25 -0
- package/src/providers/AiAssistant/index.tsx +65 -0
- package/src/providers/BrowserProvider/index.tsx +40 -0
- package/src/providers/ColorMode/index.tsx +73 -0
- package/src/providers/Layout/index.tsx +52 -0
- package/src/providers/MainNav/index.tsx +134 -0
- package/src/providers/Mobile/index.tsx +62 -0
- package/src/providers/Modal/index.tsx +52 -0
- package/src/providers/Notification/index.tsx +149 -0
- package/src/providers/Pagination/index.tsx +230 -0
- package/src/providers/Search/index.tsx +91 -0
- package/src/providers/Sidebar/index.tsx +745 -0
- package/src/providers/SiteConfig/index.tsx +70 -0
- package/src/providers/index.ts +13 -0
- package/src/types/config.ts +34 -0
- package/src/types/frontmatter.ts +23 -0
- package/src/types/general.ts +1 -0
- package/src/types/index.ts +9 -0
- package/src/types/menu.ts +40 -0
- package/src/types/navigation-dropdown.ts +16 -0
- package/src/types/navigation.ts +21 -0
- package/src/types/sidebar.ts +109 -0
- package/src/types/toc.ts +19 -0
- package/src/types/ui.ts +9 -0
- package/src/utils/array-same-elms.ts +10 -0
- package/src/utils/capitalize.ts +3 -0
- package/src/utils/check-sidebar-item-visibility.ts +47 -0
- package/src/utils/decode-str.ts +8 -0
- package/src/utils/dom-utils.ts +29 -0
- package/src/utils/event-parser.ts +54 -0
- package/src/utils/get-link-with-base-path.ts +3 -0
- package/src/utils/get-navbar-items.ts +55 -0
- package/src/utils/get-scrolled-top.ts +8 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/is-elm-window.ts +3 -0
- package/src/utils/is-in-view.ts +10 -0
- package/src/utils/os-browser-utils.ts +39 -0
- package/src/utils/set-obj-value.ts +38 -0
- package/src/utils/sidebar-utils.ts +129 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CopyButton,
|
|
3
|
+
DeprecatedNotice,
|
|
4
|
+
Details,
|
|
5
|
+
DetailsSummary,
|
|
6
|
+
ExpandableNotice,
|
|
7
|
+
FeatureFlagNotice,
|
|
8
|
+
InlineCode,
|
|
9
|
+
MDXComponents,
|
|
10
|
+
MarkdownContent,
|
|
11
|
+
VersionNotice,
|
|
12
|
+
decodeStr,
|
|
13
|
+
isInView,
|
|
14
|
+
useIsBrowser,
|
|
15
|
+
useSiteConfig
|
|
16
|
+
} from "./chunk-JD7BP7O5.mjs";
|
|
17
|
+
|
|
18
|
+
// src/components/TypeList/Items/index.tsx
|
|
19
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
20
|
+
import clsx from "clsx";
|
|
21
|
+
import {
|
|
22
|
+
ArrowDownLeftMini,
|
|
23
|
+
ArrowsPointingOutMini,
|
|
24
|
+
FlagMini,
|
|
25
|
+
Link,
|
|
26
|
+
TriangleRightMini
|
|
27
|
+
} from "@acmekit/icons";
|
|
28
|
+
import { useLocation } from "react-router-dom";
|
|
29
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
+
var TypeListItem = ({
|
|
31
|
+
typeItem,
|
|
32
|
+
level = 1,
|
|
33
|
+
expandUrl,
|
|
34
|
+
elementKey,
|
|
35
|
+
sectionTitle,
|
|
36
|
+
referenceType = "method",
|
|
37
|
+
openedLevel = 0
|
|
38
|
+
}) => {
|
|
39
|
+
const { isBrowser } = useIsBrowser();
|
|
40
|
+
const { pathname } = useLocation();
|
|
41
|
+
const {
|
|
42
|
+
config: { baseUrl, basePath }
|
|
43
|
+
} = useSiteConfig();
|
|
44
|
+
const siteUrl = `${baseUrl}${basePath}`;
|
|
45
|
+
const groupName = useMemo(() => {
|
|
46
|
+
switch (level) {
|
|
47
|
+
case 1:
|
|
48
|
+
return "group/typeOne";
|
|
49
|
+
case 2:
|
|
50
|
+
return "group/typeTwo";
|
|
51
|
+
case 3:
|
|
52
|
+
return "group/typeThree";
|
|
53
|
+
case 4:
|
|
54
|
+
return "group/typeFour";
|
|
55
|
+
}
|
|
56
|
+
}, [level]);
|
|
57
|
+
const borderForGroupName = useMemo(() => {
|
|
58
|
+
switch (level) {
|
|
59
|
+
case 1:
|
|
60
|
+
return "group-open/typeOne:border-solid group-open/typeOne:border-0 group-open/typeOne:border-b";
|
|
61
|
+
case 2:
|
|
62
|
+
return "group-open/typeTwo:border-solid group-open/typeTwo:border-0 group-open/typeTwo:border-b";
|
|
63
|
+
case 3:
|
|
64
|
+
return "group-open/typeThree:border-solid group-open/typeThree:border-0 group-open/typeThree:border-b";
|
|
65
|
+
case 4:
|
|
66
|
+
return "group-open/typeFour:border-solid group-open/typeFour:border-0 group-open/typeFour:border-b";
|
|
67
|
+
}
|
|
68
|
+
}, [level]);
|
|
69
|
+
const rotateForGroupName = useMemo(() => {
|
|
70
|
+
switch (level) {
|
|
71
|
+
case 1:
|
|
72
|
+
return "group-open/typeOne:rotate-90";
|
|
73
|
+
case 2:
|
|
74
|
+
return "group-open/typeTwo:rotate-90";
|
|
75
|
+
case 3:
|
|
76
|
+
return "group-open/typeThree:rotate-90";
|
|
77
|
+
case 4:
|
|
78
|
+
return "group-open/typeFour:rotate-90";
|
|
79
|
+
}
|
|
80
|
+
}, [level]);
|
|
81
|
+
function getItemClassNames(details = true) {
|
|
82
|
+
return clsx(
|
|
83
|
+
"odd:[&:not(:first-child):not(:last-child)]:!border-y last:not(:first-child):!border-t",
|
|
84
|
+
"first:!border-t-0 first:not(:last-child):!border-b last:!border-b-0 even:!border-y-0",
|
|
85
|
+
details && groupName,
|
|
86
|
+
!details && borderForGroupName
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
const formatId = (str) => {
|
|
90
|
+
return str.replaceAll(" ", "_");
|
|
91
|
+
};
|
|
92
|
+
const typeId = useMemo(() => {
|
|
93
|
+
return sectionTitle ? `#${formatId(sectionTitle)}-${formatId(
|
|
94
|
+
typeItem.name
|
|
95
|
+
)}-${level}-${elementKey}` : "";
|
|
96
|
+
}, [sectionTitle, typeItem, elementKey]);
|
|
97
|
+
const typePath = useMemo(() => `${pathname}${typeId}`, [pathname, typeId]);
|
|
98
|
+
const typeUrl = useMemo(() => `${siteUrl}${typePath}`, [siteUrl, typePath]);
|
|
99
|
+
const ref = useRef(null);
|
|
100
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!typeId.length || !isBrowser) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const shouldScroll = window.location.hash === typeId;
|
|
106
|
+
if (shouldScroll && !isSelected && ref.current && !isInView(ref.current)) {
|
|
107
|
+
ref.current.scrollIntoView({
|
|
108
|
+
block: "center"
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
setIsSelected(shouldScroll);
|
|
112
|
+
}, [typeId, isBrowser]);
|
|
113
|
+
function getSummary(item, nested = true) {
|
|
114
|
+
return /* @__PURE__ */ jsx(
|
|
115
|
+
DetailsSummary,
|
|
116
|
+
{
|
|
117
|
+
subtitle: item.description || item.defaultValue || item.example ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
item.description && /* @__PURE__ */ jsx(
|
|
119
|
+
MarkdownContent,
|
|
120
|
+
{
|
|
121
|
+
allowedElements: [
|
|
122
|
+
"a",
|
|
123
|
+
"strong",
|
|
124
|
+
"code",
|
|
125
|
+
"ul",
|
|
126
|
+
"ol",
|
|
127
|
+
"li",
|
|
128
|
+
"br"
|
|
129
|
+
],
|
|
130
|
+
unwrapDisallowed: true,
|
|
131
|
+
components: {
|
|
132
|
+
...MDXComponents,
|
|
133
|
+
ol: (props) => (
|
|
134
|
+
// @ts-expect-error Not recognized as a JSX element
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
MDXComponents.ol,
|
|
137
|
+
{
|
|
138
|
+
...props,
|
|
139
|
+
className: clsx(props.className, "mt-docs_1.5")
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
),
|
|
143
|
+
li: (props) => (
|
|
144
|
+
// @ts-expect-error Not recognized as a JSX element
|
|
145
|
+
/* @__PURE__ */ jsx(
|
|
146
|
+
MDXComponents.li,
|
|
147
|
+
{
|
|
148
|
+
...props,
|
|
149
|
+
className: clsx(
|
|
150
|
+
props.className,
|
|
151
|
+
"!text-acmekit-fg-subtle"
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
},
|
|
157
|
+
children: item.description
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
item.defaultValue && /* @__PURE__ */ jsxs("p", { className: "mt-0.5 mb-0", children: [
|
|
161
|
+
"Default: ",
|
|
162
|
+
/* @__PURE__ */ jsx(InlineCode, { children: item.defaultValue })
|
|
163
|
+
] }),
|
|
164
|
+
item.example && /* @__PURE__ */ jsxs("div", { className: "mt-0.5", children: [
|
|
165
|
+
"Example: ",
|
|
166
|
+
/* @__PURE__ */ jsx(InlineCode, { children: item.example })
|
|
167
|
+
] })
|
|
168
|
+
] }) : void 0,
|
|
169
|
+
expandable: (item.children?.length || 0) > 0,
|
|
170
|
+
hideExpandableIcon: true,
|
|
171
|
+
className: clsx(
|
|
172
|
+
getItemClassNames(false),
|
|
173
|
+
"py-1 pr-1",
|
|
174
|
+
level === 1 && "pl-1",
|
|
175
|
+
level === 2 && "pl-3",
|
|
176
|
+
level === 3 && "pl-[120px]",
|
|
177
|
+
level === 4 && "pl-[160px]",
|
|
178
|
+
!nested && "cursor-auto",
|
|
179
|
+
isSelected && "animate-flash animate-bg-surface"
|
|
180
|
+
),
|
|
181
|
+
onClick: (e) => {
|
|
182
|
+
const targetElm = e.target;
|
|
183
|
+
if (targetElm.tagName.toLowerCase() === "a") {
|
|
184
|
+
window.location.href = targetElm.getAttribute("href") || window.location.href;
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
summaryRef: !nested ? ref : void 0,
|
|
189
|
+
id: !nested && typeId ? typeId : "",
|
|
190
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-0.5", children: [
|
|
191
|
+
nested && /* @__PURE__ */ jsx(
|
|
192
|
+
TriangleRightMini,
|
|
193
|
+
{
|
|
194
|
+
className: clsx(
|
|
195
|
+
"text-acmekit-fg-subtle transition-transform",
|
|
196
|
+
rotateForGroupName
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
!nested && level > 1 && /* @__PURE__ */ jsx(
|
|
201
|
+
ArrowDownLeftMini,
|
|
202
|
+
{
|
|
203
|
+
className: clsx("text-acmekit-fg-subtle flip-y")
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
level === 1 && typeId.length > 0 && /* @__PURE__ */ jsx(
|
|
207
|
+
CopyButton,
|
|
208
|
+
{
|
|
209
|
+
text: typeUrl,
|
|
210
|
+
onCopy: (e) => {
|
|
211
|
+
e.preventDefault();
|
|
212
|
+
e.stopPropagation();
|
|
213
|
+
},
|
|
214
|
+
children: /* @__PURE__ */ jsx(
|
|
215
|
+
Link,
|
|
216
|
+
{
|
|
217
|
+
className: clsx(
|
|
218
|
+
"text-acmekit-fg-interactive hover:text-acmekit-fg-interactive-hover"
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-0.75 flex-wrap flex-1", children: [
|
|
225
|
+
/* @__PURE__ */ jsx(InlineCode, { "data-testid": "type-name", children: decodeStr(item.name) }),
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
"span",
|
|
228
|
+
{
|
|
229
|
+
className: "font-monospace text-compact-small-plus text-acmekit-fg-subtle",
|
|
230
|
+
"data-testid": "type-type",
|
|
231
|
+
children: /* @__PURE__ */ jsx(MarkdownContent, { allowedElements: ["a"], unwrapDisallowed: true, children: item.type })
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
item.optional === true && /* @__PURE__ */ jsx(
|
|
235
|
+
"span",
|
|
236
|
+
{
|
|
237
|
+
className: clsx(
|
|
238
|
+
"text-compact-x-small-plus",
|
|
239
|
+
"text-acmekit-tag-blue-text"
|
|
240
|
+
),
|
|
241
|
+
"data-testid": "type-optional",
|
|
242
|
+
children: "Optional"
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
item.featureFlag && /* @__PURE__ */ jsx(
|
|
246
|
+
FeatureFlagNotice,
|
|
247
|
+
{
|
|
248
|
+
featureFlag: item.featureFlag,
|
|
249
|
+
type: "type",
|
|
250
|
+
badgeClassName: "!p-0 leading-none",
|
|
251
|
+
badgeContent: /* @__PURE__ */ jsx(FlagMini, { className: "!text-acmekit-tag-green-text" })
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
item.expandable && /* @__PURE__ */ jsx(
|
|
255
|
+
ExpandableNotice,
|
|
256
|
+
{
|
|
257
|
+
type: referenceType,
|
|
258
|
+
link: expandUrl || "#",
|
|
259
|
+
badgeClassName: "!p-docs_0.25 block leading-none",
|
|
260
|
+
badgeContent: /* @__PURE__ */ jsx(ArrowsPointingOutMini, {})
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
item.since && /* @__PURE__ */ jsx(
|
|
264
|
+
VersionNotice,
|
|
265
|
+
{
|
|
266
|
+
version: item.since,
|
|
267
|
+
badgeClassName: "!p-0 leading-none"
|
|
268
|
+
}
|
|
269
|
+
),
|
|
270
|
+
item.deprecated?.is_deprecated && /* @__PURE__ */ jsx(DeprecatedNotice, { description: item.deprecated?.description })
|
|
271
|
+
] })
|
|
272
|
+
] })
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
277
|
+
(typeItem.children?.length || 0) > 0 && /* @__PURE__ */ jsx(
|
|
278
|
+
Details,
|
|
279
|
+
{
|
|
280
|
+
summaryElm: getSummary(typeItem),
|
|
281
|
+
className: clsx(getItemClassNames()),
|
|
282
|
+
heightAnimation: true,
|
|
283
|
+
id: typeId ? typeId : "",
|
|
284
|
+
openInitial: openedLevel >= level,
|
|
285
|
+
children: typeItem.children && /* @__PURE__ */ jsx(
|
|
286
|
+
TypeListItems,
|
|
287
|
+
{
|
|
288
|
+
types: typeItem.children,
|
|
289
|
+
level: level + 1,
|
|
290
|
+
expandUrl
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
(typeItem.children?.length || 0) === 0 && getSummary(typeItem, false)
|
|
296
|
+
] });
|
|
297
|
+
};
|
|
298
|
+
var TypeListItems = ({ types, ...rest }) => {
|
|
299
|
+
return /* @__PURE__ */ jsx("div", { children: types.map((typeItem, key) => /* @__PURE__ */ jsx(
|
|
300
|
+
TypeListItem,
|
|
301
|
+
{
|
|
302
|
+
typeItem,
|
|
303
|
+
elementKey: key,
|
|
304
|
+
...rest
|
|
305
|
+
},
|
|
306
|
+
key
|
|
307
|
+
)) });
|
|
308
|
+
};
|
|
309
|
+
var Items_default = TypeListItems;
|
|
310
|
+
export {
|
|
311
|
+
Items_default as default
|
|
312
|
+
};
|