@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.
Files changed (236) hide show
  1. package/dist/Items-YPPZD6C6.mjs +312 -0
  2. package/dist/chunk-JD7BP7O5.mjs +13144 -0
  3. package/dist/index.d.mts +1550 -0
  4. package/dist/index.d.ts +1550 -0
  5. package/dist/index.js +15218 -0
  6. package/dist/index.mjs +366 -0
  7. package/package.json +58 -0
  8. package/src/components/Badge/index.tsx +74 -0
  9. package/src/components/BadgesList/index.tsx +18 -0
  10. package/src/components/BetaBadge/index.tsx +24 -0
  11. package/src/components/Bordered/index.tsx +21 -0
  12. package/src/components/BorderedIcon/index.tsx +60 -0
  13. package/src/components/Breadcrumbs/index.tsx +83 -0
  14. package/src/components/Button/index.tsx +100 -0
  15. package/src/components/Card/Layout/Default/index.tsx +124 -0
  16. package/src/components/Card/Layout/Filler/index.tsx +30 -0
  17. package/src/components/Card/Layout/Large/index.tsx +88 -0
  18. package/src/components/Card/Layout/Mini/index.tsx +142 -0
  19. package/src/components/Card/index.tsx +50 -0
  20. package/src/components/CardList/index.tsx +40 -0
  21. package/src/components/ChildDocs/index.tsx +9 -0
  22. package/src/components/CodeBlock/Actions/AskAi/index.tsx +10 -0
  23. package/src/components/CodeBlock/Actions/Copy/index.tsx +59 -0
  24. package/src/components/CodeBlock/Actions/index.tsx +137 -0
  25. package/src/components/CodeBlock/Collapsible/Button/index.tsx +58 -0
  26. package/src/components/CodeBlock/Collapsible/Fade/index.tsx +55 -0
  27. package/src/components/CodeBlock/Collapsible/Lines/index.tsx +22 -0
  28. package/src/components/CodeBlock/Header/Wrapper/index.tsx +46 -0
  29. package/src/components/CodeBlock/Header/index.tsx +67 -0
  30. package/src/components/CodeBlock/Inline/index.tsx +20 -0
  31. package/src/components/CodeBlock/Line/index.tsx +331 -0
  32. package/src/components/CodeBlock/index.tsx +510 -0
  33. package/src/components/CodeMdx/index.tsx +45 -0
  34. package/src/components/CodeTabs/Item/index.tsx +67 -0
  35. package/src/components/CodeTabs/index.tsx +319 -0
  36. package/src/components/ContentMenu/Actions/index.tsx +7 -0
  37. package/src/components/ContentMenu/Products/index.tsx +64 -0
  38. package/src/components/ContentMenu/Toc/index.tsx +148 -0
  39. package/src/components/ContentMenu/Version/index.tsx +77 -0
  40. package/src/components/ContentMenu/index.tsx +31 -0
  41. package/src/components/CopyButton/index.tsx +76 -0
  42. package/src/components/Details/Summary/index.tsx +75 -0
  43. package/src/components/Details/index.tsx +98 -0
  44. package/src/components/DetailsList/index.tsx +32 -0
  45. package/src/components/DottedSeparator/index.tsx +30 -0
  46. package/src/components/EditButton/index.tsx +32 -0
  47. package/src/components/EditDate/index.tsx +33 -0
  48. package/src/components/ErrorPage/Icon/index.tsx +428 -0
  49. package/src/components/ErrorPage/index.tsx +32 -0
  50. package/src/components/Feedback/Solutions/index.tsx +105 -0
  51. package/src/components/Feedback/index.tsx +304 -0
  52. package/src/components/Footer/index.tsx +23 -0
  53. package/src/components/Heading/H1/index.tsx +21 -0
  54. package/src/components/Heading/H2/index.tsx +47 -0
  55. package/src/components/Heading/H3/index.tsx +42 -0
  56. package/src/components/Heading/H4/index.tsx +14 -0
  57. package/src/components/Heading/index.tsx +4 -0
  58. package/src/components/IconHeadline/index.tsx +15 -0
  59. package/src/components/Icons/AiAssistant/index.tsx +462 -0
  60. package/src/components/Icons/ArrowRightDown/index.tsx +30 -0
  61. package/src/components/Icons/BundledProduct/index.tsx +72 -0
  62. package/src/components/Icons/CalendarRefresh/index.tsx +70 -0
  63. package/src/components/Icons/ChefHat/index.tsx +65 -0
  64. package/src/components/Icons/CircleDottedLine/index.tsx +60 -0
  65. package/src/components/Icons/CloudSolid/index.tsx +47 -0
  66. package/src/components/Icons/ColoredAcmeKit/index.tsx +13 -0
  67. package/src/components/Icons/DecisionProcess/index.tsx +58 -0
  68. package/src/components/Icons/Erp/index.tsx +92 -0
  69. package/src/components/Icons/Github/index.tsx +22 -0
  70. package/src/components/Icons/House/index.tsx +23 -0
  71. package/src/components/Icons/ImageBinary/index.tsx +69 -0
  72. package/src/components/Icons/Kapa/index.tsx +22 -0
  73. package/src/components/Icons/Markdown/index.tsx +25 -0
  74. package/src/components/Icons/NavigationDropdown/Admin/index.tsx +33 -0
  75. package/src/components/Icons/NavigationDropdown/Doc/index.tsx +41 -0
  76. package/src/components/Icons/NavigationDropdown/DocV1/index.tsx +37 -0
  77. package/src/components/Icons/NavigationDropdown/Modules/index.tsx +33 -0
  78. package/src/components/Icons/NavigationDropdown/Resources/index.tsx +37 -0
  79. package/src/components/Icons/NavigationDropdown/Store/index.tsx +37 -0
  80. package/src/components/Icons/NavigationDropdown/Ui/index.tsx +37 -0
  81. package/src/components/Icons/NavigationDropdown/User/index.tsx +37 -0
  82. package/src/components/Icons/PuzzleColored/index.tsx +35 -0
  83. package/src/components/Icons/QuestionMark/index.tsx +23 -0
  84. package/src/components/Icons/Restock/index.tsx +55 -0
  85. package/src/components/Icons/ScrollText/index.tsx +68 -0
  86. package/src/components/Icons/ShadedBg/index.tsx +334 -0
  87. package/src/components/Icons/Shop/index.tsx +68 -0
  88. package/src/components/Icons/SidebarLeft/index.tsx +42 -0
  89. package/src/components/Icons/StripeColored/index.tsx +60 -0
  90. package/src/components/Icons/ThumbDown/index.tsx +23 -0
  91. package/src/components/Icons/ThumbUp/index.tsx +23 -0
  92. package/src/components/Icons/WindowPaintbrush/index.tsx +57 -0
  93. package/src/components/Icons/index.tsx +20 -0
  94. package/src/components/InlineCode/index.tsx +42 -0
  95. package/src/components/InlineIcon/index.tsx +21 -0
  96. package/src/components/InlineThemeImage/index.tsx +14 -0
  97. package/src/components/Input/Search/index.tsx +64 -0
  98. package/src/components/Input/Text/index.tsx +39 -0
  99. package/src/components/Kbd/index.tsx +33 -0
  100. package/src/components/Label/index.tsx +19 -0
  101. package/src/components/Link/index.tsx +67 -0
  102. package/src/components/LinkButton/index.tsx +43 -0
  103. package/src/components/Loading/Dots/index.tsx +16 -0
  104. package/src/components/Loading/Spinner/index.tsx +19 -0
  105. package/src/components/Loading/index.tsx +43 -0
  106. package/src/components/MDXComponents/index.tsx +209 -0
  107. package/src/components/MainNav/DesktopMenu/ThemeMenu/index.tsx +76 -0
  108. package/src/components/MainNav/DesktopMenu/index.tsx +100 -0
  109. package/src/components/MainNav/Items/Dropdown/index.tsx +88 -0
  110. package/src/components/MainNav/Items/Link/index.tsx +34 -0
  111. package/src/components/MainNav/Items/index.tsx +61 -0
  112. package/src/components/MainNav/MobileMenu/Main/index.tsx +67 -0
  113. package/src/components/MainNav/MobileMenu/SubMenu/index.tsx +77 -0
  114. package/src/components/MainNav/MobileMenu/index.tsx +103 -0
  115. package/src/components/MainNav/Version/index.tsx +33 -0
  116. package/src/components/MainNav/index.tsx +153 -0
  117. package/src/components/MarkdownContent/index.tsx +41 -0
  118. package/src/components/Menu/Action/index.tsx +43 -0
  119. package/src/components/Menu/Divider/index.tsx +35 -0
  120. package/src/components/Menu/Dropdown/index.tsx +78 -0
  121. package/src/components/Menu/Item/index.tsx +36 -0
  122. package/src/components/Menu/SubMenu/index.tsx +47 -0
  123. package/src/components/Menu/index.tsx +44 -0
  124. package/src/components/Modal/Footer/index.tsx +29 -0
  125. package/src/components/Modal/Header/index.tsx +33 -0
  126. package/src/components/Modal/index.tsx +124 -0
  127. package/src/components/Note/Layout/index.tsx +139 -0
  128. package/src/components/Note/Types/checks.tsx +7 -0
  129. package/src/components/Note/Types/default.tsx +7 -0
  130. package/src/components/Note/Types/error.tsx +7 -0
  131. package/src/components/Note/Types/soon.tsx +7 -0
  132. package/src/components/Note/Types/sucess.tsx +7 -0
  133. package/src/components/Note/Types/warning.tsx +7 -0
  134. package/src/components/Note/index.tsx +32 -0
  135. package/src/components/Notices/DeprecatedNotice/index.tsx +33 -0
  136. package/src/components/Notices/ExpandableNotice/index.tsx +36 -0
  137. package/src/components/Notices/FeatureFlagNotice/index.tsx +36 -0
  138. package/src/components/Notices/VersionNotice/index.tsx +37 -0
  139. package/src/components/Notification/Item/Layout/Default/index.tsx +89 -0
  140. package/src/components/Notification/Item/index.tsx +88 -0
  141. package/src/components/Notification/index.tsx +65 -0
  142. package/src/components/Pagination/Card/index.tsx +80 -0
  143. package/src/components/Pagination/index.tsx +35 -0
  144. package/src/components/Prerequisites/Item/index.tsx +43 -0
  145. package/src/components/Prerequisites/index.tsx +94 -0
  146. package/src/components/RadioItem/index.tsx +38 -0
  147. package/src/components/Rating/index.tsx +133 -0
  148. package/src/components/RootProviders/index.tsx +31 -0
  149. package/src/components/Select/Badge/index.tsx +122 -0
  150. package/src/components/Select/Dropdown/index.tsx +188 -0
  151. package/src/components/Select/Input/index.tsx +123 -0
  152. package/src/components/Select/index.ts +13 -0
  153. package/src/components/Sidebar/Child/index.tsx +43 -0
  154. package/src/components/Sidebar/Item/Category/index.tsx +151 -0
  155. package/src/components/Sidebar/Item/Link/index.tsx +174 -0
  156. package/src/components/Sidebar/Item/Sidebar/index.tsx +67 -0
  157. package/src/components/Sidebar/Item/SubCategory/index.tsx +83 -0
  158. package/src/components/Sidebar/Item/index.tsx +41 -0
  159. package/src/components/Sidebar/Top/MobileClose/index.tsx +21 -0
  160. package/src/components/Sidebar/Top/index.tsx +33 -0
  161. package/src/components/Sidebar/index.tsx +153 -0
  162. package/src/components/SourceCodeLink/index.tsx +37 -0
  163. package/src/components/SplitLists/index.tsx +58 -0
  164. package/src/components/Table/index.tsx +87 -0
  165. package/src/components/Tabs/index.tsx +106 -0
  166. package/src/components/TextArea/index.tsx +30 -0
  167. package/src/components/ThemeImage/index.tsx +26 -0
  168. package/src/components/Toggle/index.tsx +28 -0
  169. package/src/components/Tooltip/index.tsx +65 -0
  170. package/src/components/TypeList/Items/index.tsx +337 -0
  171. package/src/components/TypeList/index.tsx +63 -0
  172. package/src/components/WideSection/index.tsx +25 -0
  173. package/src/components/ZoomImg/index.tsx +17 -0
  174. package/src/components/index.ts +75 -0
  175. package/src/constants.tsx +261 -0
  176. package/src/global-config.ts +11 -0
  177. package/src/hooks/index.ts +14 -0
  178. package/src/hooks/use-active-on-scroll/index.tsx +223 -0
  179. package/src/hooks/use-click-outside/index.tsx +37 -0
  180. package/src/hooks/use-collapsible/index.tsx +128 -0
  181. package/src/hooks/use-collapsible-code-lines/index.tsx +149 -0
  182. package/src/hooks/use-copy/index.tsx +28 -0
  183. package/src/hooks/use-heading-url/index.tsx +32 -0
  184. package/src/hooks/use-is-external-link/index.tsx +19 -0
  185. package/src/hooks/use-keyboard-shortcut/index.tsx +71 -0
  186. package/src/hooks/use-mutation-observer/index.ts +32 -0
  187. package/src/hooks/use-page-scroll-manager/index.tsx +82 -0
  188. package/src/hooks/use-resize-observer/index.ts +20 -0
  189. package/src/hooks/use-scroll-utils/index.tsx +372 -0
  190. package/src/hooks/use-select/index.tsx +99 -0
  191. package/src/hooks/use-tabs/index.tsx +94 -0
  192. package/src/index.ts +8 -0
  193. package/src/layouts/barebone.tsx +18 -0
  194. package/src/layouts/index.ts +4 -0
  195. package/src/layouts/main-content.tsx +86 -0
  196. package/src/layouts/root.tsx +43 -0
  197. package/src/layouts/tight.tsx +29 -0
  198. package/src/layouts/wide.tsx +25 -0
  199. package/src/providers/AiAssistant/index.tsx +65 -0
  200. package/src/providers/BrowserProvider/index.tsx +40 -0
  201. package/src/providers/ColorMode/index.tsx +73 -0
  202. package/src/providers/Layout/index.tsx +52 -0
  203. package/src/providers/MainNav/index.tsx +134 -0
  204. package/src/providers/Mobile/index.tsx +62 -0
  205. package/src/providers/Modal/index.tsx +52 -0
  206. package/src/providers/Notification/index.tsx +149 -0
  207. package/src/providers/Pagination/index.tsx +230 -0
  208. package/src/providers/Search/index.tsx +91 -0
  209. package/src/providers/Sidebar/index.tsx +745 -0
  210. package/src/providers/SiteConfig/index.tsx +70 -0
  211. package/src/providers/index.ts +13 -0
  212. package/src/types/config.ts +34 -0
  213. package/src/types/frontmatter.ts +23 -0
  214. package/src/types/general.ts +1 -0
  215. package/src/types/index.ts +9 -0
  216. package/src/types/menu.ts +40 -0
  217. package/src/types/navigation-dropdown.ts +16 -0
  218. package/src/types/navigation.ts +21 -0
  219. package/src/types/sidebar.ts +109 -0
  220. package/src/types/toc.ts +19 -0
  221. package/src/types/ui.ts +9 -0
  222. package/src/utils/array-same-elms.ts +10 -0
  223. package/src/utils/capitalize.ts +3 -0
  224. package/src/utils/check-sidebar-item-visibility.ts +47 -0
  225. package/src/utils/decode-str.ts +8 -0
  226. package/src/utils/dom-utils.ts +29 -0
  227. package/src/utils/event-parser.ts +54 -0
  228. package/src/utils/get-link-with-base-path.ts +3 -0
  229. package/src/utils/get-navbar-items.ts +55 -0
  230. package/src/utils/get-scrolled-top.ts +8 -0
  231. package/src/utils/index.ts +13 -0
  232. package/src/utils/is-elm-window.ts +3 -0
  233. package/src/utils/is-in-view.ts +10 -0
  234. package/src/utils/os-browser-utils.ts +39 -0
  235. package/src/utils/set-obj-value.ts +38 -0
  236. package/src/utils/sidebar-utils.ts +129 -0
@@ -0,0 +1,428 @@
1
+ import React from "react"
2
+
3
+ export const ErrorPageIcon = () => {
4
+ return (
5
+ <svg
6
+ width="135"
7
+ height="147"
8
+ viewBox="0 0 135 147"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <path
13
+ d="M134.25 128.75V139.5C134.25 143.228 131.228 146.25 127.5 146.25H7.5C3.77208 146.25 0.75 143.228 0.75 139.5V128.75H134.25Z"
14
+ className="fill-acmekit-bg-base-hover"
15
+ />
16
+ <path
17
+ d="M134.25 128.75V139.5C134.25 143.228 131.228 146.25 127.5 146.25H7.5C3.77208 146.25 0.75 143.228 0.75 139.5V128.75H134.25Z"
18
+ className="stroke-acmekit-fg-subtle"
19
+ strokeWidth="1.5"
20
+ />
21
+ <rect
22
+ x="3.5"
23
+ y="129.5"
24
+ width="1.83"
25
+ height="16"
26
+ className="fill-acmekit-bg-switch-off-hover"
27
+ />
28
+ <rect
29
+ x="7.44281"
30
+ y="129.5"
31
+ width="1.83"
32
+ height="16"
33
+ className="fill-acmekit-bg-switch-off-hover"
34
+ />
35
+ <rect
36
+ x="11.3856"
37
+ y="129.5"
38
+ width="1.83"
39
+ height="16"
40
+ className="fill-acmekit-bg-switch-off-hover"
41
+ />
42
+ <rect
43
+ x="15.3284"
44
+ y="129.5"
45
+ width="1.83"
46
+ height="16"
47
+ className="fill-acmekit-bg-switch-off-hover"
48
+ />
49
+ <rect
50
+ x="19.2712"
51
+ y="129.5"
52
+ width="1.83"
53
+ height="16"
54
+ className="fill-acmekit-bg-switch-off-hover"
55
+ />
56
+ <rect
57
+ x="23.2141"
58
+ y="129.5"
59
+ width="1.83"
60
+ height="16"
61
+ className="fill-acmekit-bg-switch-off-hover"
62
+ />
63
+ <rect
64
+ x="27.1569"
65
+ y="129.5"
66
+ width="1.83"
67
+ height="16"
68
+ className="fill-acmekit-bg-switch-off-hover"
69
+ />
70
+ <rect
71
+ x="31.0997"
72
+ y="129.5"
73
+ width="1.83"
74
+ height="16"
75
+ className="fill-acmekit-bg-switch-off-hover"
76
+ />
77
+ <rect
78
+ x="35.0425"
79
+ y="129.5"
80
+ width="1.83"
81
+ height="16"
82
+ className="fill-acmekit-bg-switch-off-hover"
83
+ />
84
+ <rect
85
+ x="38.9853"
86
+ y="129.5"
87
+ width="1.83"
88
+ height="16"
89
+ className="fill-acmekit-bg-switch-off-hover"
90
+ />
91
+ <rect
92
+ x="42.9281"
93
+ y="129.5"
94
+ width="1.83"
95
+ height="16"
96
+ className="fill-acmekit-bg-switch-off-hover"
97
+ />
98
+ <rect
99
+ x="46.8709"
100
+ y="129.5"
101
+ width="1.83"
102
+ height="16"
103
+ className="fill-acmekit-bg-switch-off-hover"
104
+ />
105
+ <rect
106
+ x="50.8137"
107
+ y="129.5"
108
+ width="1.83"
109
+ height="16"
110
+ className="fill-acmekit-bg-switch-off-hover"
111
+ />
112
+ <rect
113
+ x="54.7566"
114
+ y="129.5"
115
+ width="1.83"
116
+ height="16"
117
+ className="fill-acmekit-bg-switch-off-hover"
118
+ />
119
+ <rect
120
+ x="58.6994"
121
+ y="129.5"
122
+ width="1.83"
123
+ height="16"
124
+ className="fill-acmekit-bg-switch-off-hover"
125
+ />
126
+ <rect
127
+ x="62.6422"
128
+ y="129.5"
129
+ width="1.83"
130
+ height="16"
131
+ className="fill-acmekit-bg-switch-off-hover"
132
+ />
133
+ <rect
134
+ x="66.585"
135
+ y="129.5"
136
+ width="1.83"
137
+ height="16"
138
+ className="fill-acmekit-bg-switch-off-hover"
139
+ />
140
+ <rect
141
+ x="70.5278"
142
+ y="129.5"
143
+ width="1.83"
144
+ height="16"
145
+ className="fill-acmekit-bg-switch-off-hover"
146
+ />
147
+ <rect
148
+ x="74.4706"
149
+ y="129.5"
150
+ width="1.83"
151
+ height="16"
152
+ className="fill-acmekit-bg-switch-off-hover"
153
+ />
154
+ <rect
155
+ x="78.4135"
156
+ y="129.5"
157
+ width="1.83"
158
+ height="16"
159
+ className="fill-acmekit-bg-switch-off-hover"
160
+ />
161
+ <rect
162
+ x="82.3563"
163
+ y="129.5"
164
+ width="1.83"
165
+ height="16"
166
+ className="fill-acmekit-bg-switch-off-hover"
167
+ />
168
+ <rect
169
+ x="86.2991"
170
+ y="129.5"
171
+ width="1.83"
172
+ height="16"
173
+ className="fill-acmekit-bg-switch-off-hover"
174
+ />
175
+ <rect
176
+ x="90.2419"
177
+ y="129.5"
178
+ width="1.83"
179
+ height="16"
180
+ className="fill-acmekit-bg-switch-off-hover"
181
+ />
182
+ <rect
183
+ x="94.1847"
184
+ y="129.5"
185
+ width="1.83"
186
+ height="16"
187
+ className="fill-acmekit-bg-switch-off-hover"
188
+ />
189
+ <rect
190
+ x="98.1275"
191
+ y="129.5"
192
+ width="1.83"
193
+ height="16"
194
+ className="fill-acmekit-bg-switch-off-hover"
195
+ />
196
+ <rect
197
+ x="102.07"
198
+ y="129.5"
199
+ width="1.83"
200
+ height="16"
201
+ className="fill-acmekit-bg-switch-off-hover"
202
+ />
203
+ <rect
204
+ x="106.013"
205
+ y="129.5"
206
+ width="1.83"
207
+ height="16"
208
+ className="fill-acmekit-bg-switch-off-hover"
209
+ />
210
+ <rect
211
+ x="109.956"
212
+ y="129.5"
213
+ width="1.83"
214
+ height="16"
215
+ className="fill-acmekit-bg-switch-off-hover"
216
+ />
217
+ <rect
218
+ x="113.899"
219
+ y="129.5"
220
+ width="1.83"
221
+ height="16"
222
+ className="fill-acmekit-bg-switch-off-hover"
223
+ />
224
+ <rect
225
+ x="117.842"
226
+ y="129.5"
227
+ width="1.83"
228
+ height="16"
229
+ className="fill-acmekit-bg-switch-off-hover"
230
+ />
231
+ <rect
232
+ x="121.784"
233
+ y="129.5"
234
+ width="1.83"
235
+ height="16"
236
+ className="fill-acmekit-bg-switch-off-hover"
237
+ />
238
+ <rect
239
+ x="125.727"
240
+ y="129.5"
241
+ width="1.83"
242
+ height="16"
243
+ className="fill-acmekit-bg-switch-off-hover"
244
+ />
245
+ <rect
246
+ x="129.67"
247
+ y="129.5"
248
+ width="1.83"
249
+ height="16"
250
+ className="fill-acmekit-bg-switch-off-hover"
251
+ />
252
+ <path
253
+ d="M109.5 0.75C123.169 0.75 134.25 11.831 134.25 25.5V130.25H0.75V25.5C0.75 11.831 11.831 0.75 25.5 0.75H109.5Z"
254
+ className="fill-acmekit-bg-base stroke-acmekit-fg-subtle"
255
+ strokeWidth="1.5"
256
+ />
257
+ <rect
258
+ x="13.5"
259
+ y="113.5"
260
+ width="12"
261
+ height="4"
262
+ rx="2"
263
+ className="fill-acmekit-bg-switch-off-hover"
264
+ />
265
+ <rect
266
+ x="85.5"
267
+ y="101.5"
268
+ width="36"
269
+ height="4"
270
+ rx="2"
271
+ className="fill-acmekit-bg-switch-off-hover"
272
+ />
273
+ <rect
274
+ x="12.75"
275
+ y="12.75"
276
+ width="109.5"
277
+ height="77.5"
278
+ rx="12.75"
279
+ className="fill-acmekit-bg-base stroke-acmekit-bg-switch-off-hover"
280
+ strokeWidth="1.5"
281
+ />
282
+ <rect
283
+ x="18.75"
284
+ y="18.75"
285
+ width="97.5"
286
+ height="65.5"
287
+ rx="6.75"
288
+ className="fill-acmekit-bg-base-hover stroke-acmekit-fg-subtle"
289
+ strokeWidth="1.5"
290
+ />
291
+ <rect
292
+ x="18.75"
293
+ y="17.75"
294
+ width="97.5"
295
+ height="65.5"
296
+ rx="6.75"
297
+ className="fill-acmekit-bg-base-hover stroke-acmekit-fg-subtle"
298
+ strokeWidth="1.5"
299
+ />
300
+ <path
301
+ d="M99.0345 70.1379H96.9655C96.68 70.1379 96.4482 69.9062 96.4482 69.6207C96.4482 68.7641 97.1434 68.069 98 68.069C98.8565 68.069 99.5517 68.7641 99.5517 69.6207C99.5517 69.9062 99.32 70.1379 99.0345 70.1379Z"
302
+ className="fill-acmekit-fg-subtle"
303
+ />
304
+ <path
305
+ d="M98 73.5C102.142 73.5 105.5 70.1421 105.5 66C105.5 61.8579 102.142 58.5 98 58.5C93.8579 58.5 90.5 61.8579 90.5 66C90.5 70.1421 93.8579 73.5 98 73.5Z"
306
+ className="stroke-acmekit-fg-subtle"
307
+ strokeWidth="1.5"
308
+ strokeLinecap="round"
309
+ strokeLinejoin="round"
310
+ />
311
+ <path
312
+ d="M93.6035 64.1897L96.1897 66.7759"
313
+ className="stroke-acmekit-fg-subtle"
314
+ strokeWidth="1.5"
315
+ strokeLinecap="round"
316
+ strokeLinejoin="round"
317
+ />
318
+ <path
319
+ d="M96.1897 64.1897L93.6035 66.7759"
320
+ className="stroke-acmekit-fg-subtle"
321
+ strokeWidth="1.5"
322
+ strokeLinecap="round"
323
+ strokeLinejoin="round"
324
+ />
325
+ <path
326
+ d="M99.8104 64.1897L102.397 66.7759"
327
+ className="stroke-acmekit-fg-subtle"
328
+ strokeWidth="1.5"
329
+ strokeLinecap="round"
330
+ strokeLinejoin="round"
331
+ />
332
+ <path
333
+ d="M102.397 64.1897L99.8104 66.7759"
334
+ className="stroke-acmekit-fg-subtle"
335
+ strokeWidth="1.5"
336
+ strokeLinecap="round"
337
+ strokeLinejoin="round"
338
+ />
339
+ <rect
340
+ x="37.5"
341
+ y="37.5"
342
+ width="14"
343
+ height="3"
344
+ rx="1.5"
345
+ className="fill-acmekit-bg-switch-off-hover"
346
+ />
347
+ <rect
348
+ x="54.5"
349
+ y="37.5"
350
+ width="16"
351
+ height="3"
352
+ rx="1.5"
353
+ className="fill-acmekit-bg-switch-off-hover"
354
+ />
355
+ <rect
356
+ x="37.5"
357
+ y="69.5"
358
+ width="16"
359
+ height="3"
360
+ rx="1.5"
361
+ className="fill-acmekit-bg-switch-off-hover"
362
+ />
363
+ <rect
364
+ x="53.5"
365
+ y="53.5"
366
+ width="26"
367
+ height="3"
368
+ rx="1.5"
369
+ className="fill-acmekit-bg-switch-off-hover"
370
+ />
371
+ <rect
372
+ x="60.5"
373
+ y="45.5"
374
+ width="28"
375
+ height="3"
376
+ rx="1.5"
377
+ className="fill-acmekit-bg-switch-off-hover"
378
+ />
379
+ <rect
380
+ x="45.5"
381
+ y="45.5"
382
+ width="12"
383
+ height="3"
384
+ rx="1.5"
385
+ className="fill-acmekit-bg-switch-off-hover"
386
+ />
387
+ <rect
388
+ x="45.5"
389
+ y="61.5"
390
+ width="16"
391
+ height="3"
392
+ rx="1.5"
393
+ className="fill-acmekit-bg-switch-off-hover"
394
+ />
395
+ <rect
396
+ x="64.5"
397
+ y="61.5"
398
+ width="10"
399
+ height="3"
400
+ rx="1.5"
401
+ className="fill-acmekit-bg-switch-off-hover"
402
+ />
403
+ <rect
404
+ x="29.5"
405
+ y="29.5"
406
+ width="16"
407
+ height="3"
408
+ rx="1.5"
409
+ className="fill-acmekit-bg-switch-off-hover"
410
+ />
411
+ <rect
412
+ x="48.5"
413
+ y="29.5"
414
+ width="8"
415
+ height="3"
416
+ rx="1.5"
417
+ className="fill-acmekit-bg-switch-off-hover"
418
+ />
419
+ <rect
420
+ x="55.5"
421
+ y="68.5"
422
+ width="2"
423
+ height="5"
424
+ className="fill-acmekit-fg-subtle"
425
+ />
426
+ </svg>
427
+ )
428
+ }
@@ -0,0 +1,32 @@
1
+ import React from "react"
2
+ import { ErrorPageIcon } from "./Icon"
3
+ import { Link } from "react-router-dom"
4
+ import { Button } from "../Button"
5
+ import { GITHUB_ISSUES_LINK } from "../../constants"
6
+
7
+ export const ErrorPage = () => {
8
+ return (
9
+ <div className="w-full h-full bg-acmekit-bg-subtle flex items-center justify-center">
10
+ <div className="flex gap-docs_1.5 flex-col items-center justify-center w-fit max-w-lg">
11
+ <ErrorPageIcon />
12
+ <div className="flex flex-col items-center gap-docs_0.5">
13
+ <h1 className="text-acmekit-fg-base text-2xl">
14
+ Oops! Something went wrong.
15
+ </h1>
16
+ <span className="text-acmekit-fg-subtle txt-large-plus text-pretty text-center">
17
+ Don’t worry. Our team have automatically been notified of this issue
18
+ and they are working on it. Please try again later.
19
+ </span>
20
+ </div>
21
+ <div className="flex items-center justify-center gap-docs_0.75">
22
+ <Link to={GITHUB_ISSUES_LINK} target="_blank" rel="noreferrer">
23
+ <Button variant="secondary">Report issue</Button>
24
+ </Link>
25
+ <Link to="/">
26
+ <Button variant="primary">Go to homepage</Button>
27
+ </Link>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ )
32
+ }
@@ -0,0 +1,105 @@
1
+
2
+ import React, { useEffect, useState } from "react"
3
+ import { Link } from "../../../components/Link"
4
+ import { MDXComponents } from "../../../components/MDXComponents"
5
+
6
+ export type SolutionsProps = {
7
+ feedback: boolean
8
+ message?: string
9
+ }
10
+
11
+ export type GitHubSearchItem = {
12
+ url: string
13
+ html_url: string
14
+ title: string
15
+ [key: string]: unknown
16
+ }
17
+
18
+ const Ul = MDXComponents["ul"] as React.FC<
19
+ React.HTMLAttributes<HTMLUListElement>
20
+ >
21
+ const Li = MDXComponents["li"] as React.FC<React.HTMLAttributes<HTMLLIElement>>
22
+
23
+ export const Solutions = ({ feedback, message }: SolutionsProps) => {
24
+ const [possibleSolutionsQuery, setPossibleSolutionsQuery] =
25
+ useState<string>("")
26
+ const [possibleSolutions, setPossibleSolutions] = useState<
27
+ GitHubSearchItem[]
28
+ >([])
29
+
30
+ function constructQuery(searchQuery: string) {
31
+ return `${searchQuery} repo:acmekit/acmekit is:closed is:issue`
32
+ }
33
+
34
+ async function searchGitHub(query: string) {
35
+ return fetch(
36
+ `https://api.github.com/search/issues?q=${encodeURIComponent(query)}&sort=updated&per_page=3&advanced_search=true`,
37
+ {
38
+ headers: {
39
+ Accept: "application/vnd.github.v3+json",
40
+ },
41
+ }
42
+ ).then(async (res) => res.json() as Promise<{ items: GitHubSearchItem[] }>)
43
+ }
44
+
45
+ useEffect(() => {
46
+ if (!feedback) {
47
+ let query = constructQuery(
48
+ // Github does not allow queries longer than 256 characters
49
+ message ? message.substring(0, 256) : document.title
50
+ )
51
+ searchGitHub(query)
52
+ .then(async (result) => {
53
+ if (!result.items.length && message) {
54
+ query = constructQuery(document.title)
55
+ result = await searchGitHub(query)
56
+ }
57
+
58
+ setPossibleSolutionsQuery(query)
59
+ setPossibleSolutions(result.items)
60
+ })
61
+ .catch((err) => console.error(err))
62
+ } else {
63
+ setPossibleSolutionsQuery("")
64
+ setPossibleSolutions([])
65
+ }
66
+ }, [feedback, message])
67
+
68
+ return (
69
+ <>
70
+ {possibleSolutions.length > 0 && (
71
+ <div className="txt-medium">
72
+ <span className="my-docs_1 mx-0 inline-block">
73
+ If you faced a problem, here are some possible solutions from
74
+ GitHub:
75
+ </span>
76
+ <Ul>
77
+ {possibleSolutions.map((solution) => (
78
+ <Li key={solution.url} data-testid="solution-item">
79
+ <Link
80
+ href={solution.html_url}
81
+ target="_blank"
82
+ rel="noreferrer"
83
+ variant="content"
84
+ >
85
+ {solution.title}
86
+ </Link>
87
+ </Li>
88
+ ))}
89
+ </Ul>
90
+ <span>
91
+ Explore more issues in{" "}
92
+ <Link
93
+ href={`https://github.com/acmekit/acmekit/issues?q=${possibleSolutionsQuery}`}
94
+ target="_blank"
95
+ rel="noreferrer"
96
+ variant="content"
97
+ >
98
+ the GitHub repository
99
+ </Link>
100
+ </span>
101
+ </div>
102
+ )}
103
+ </>
104
+ )
105
+ }