mintlify 1.2.0 → 2.0.1

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 (240) hide show
  1. package/CONTRIBUTING.md +2 -0
  2. package/README.md +1 -1
  3. package/bin/index.js +0 -2
  4. package/bin/index.js.map +1 -1
  5. package/bin/local-preview/index.js +12 -60
  6. package/bin/local-preview/index.js.map +1 -1
  7. package/bin/local-preview/listener/categorizeFiles.js +47 -0
  8. package/bin/local-preview/listener/categorizeFiles.js.map +1 -0
  9. package/bin/local-preview/listener/generate.js +89 -0
  10. package/bin/local-preview/listener/generate.js.map +1 -0
  11. package/bin/local-preview/listener/index.js +135 -0
  12. package/bin/local-preview/listener/index.js.map +1 -0
  13. package/bin/local-preview/listener/update.js +41 -0
  14. package/bin/local-preview/listener/update.js.map +1 -0
  15. package/bin/local-preview/listener/utils/createPage.js +167 -0
  16. package/bin/local-preview/listener/utils/createPage.js.map +1 -0
  17. package/bin/local-preview/listener/utils/fileIsMdxOrMd.js +12 -0
  18. package/bin/local-preview/listener/utils/fileIsMdxOrMd.js.map +1 -0
  19. package/bin/local-preview/listener/utils/getOpenApiContext.js +57 -0
  20. package/bin/local-preview/listener/utils/getOpenApiContext.js.map +1 -0
  21. package/bin/local-preview/listener/utils/mintConfigFile.js +22 -0
  22. package/bin/local-preview/listener/utils/mintConfigFile.js.map +1 -0
  23. package/bin/local-preview/listener/utils/toTitleCase.js +36 -0
  24. package/bin/local-preview/listener/utils/toTitleCase.js.map +1 -0
  25. package/bin/local-preview/listener/utils/types.js +2 -0
  26. package/bin/local-preview/listener/utils/types.js.map +1 -0
  27. package/bin/local-preview/listener/utils.js +62 -0
  28. package/bin/local-preview/listener/utils.js.map +1 -0
  29. package/bin/scraping/detectFramework.js +1 -1
  30. package/bin/scraping/detectFramework.js.map +1 -1
  31. package/bin/scraping/scrapePageCommands.js +2 -2
  32. package/bin/scraping/scrapePageCommands.js.map +1 -1
  33. package/bin/scraping/site-scrapers/alternateGroupTitle.js +1 -1
  34. package/bin/scraping/site-scrapers/alternateGroupTitle.js.map +1 -1
  35. package/bin/scraping/site-scrapers/openNestedDocusaurusMenus.js +3 -3
  36. package/bin/scraping/site-scrapers/openNestedDocusaurusMenus.js.map +1 -1
  37. package/bin/scraping/site-scrapers/openNestedGitbookMenus.js +1 -2
  38. package/bin/scraping/site-scrapers/openNestedGitbookMenus.js.map +1 -1
  39. package/bin/util.js +40 -1
  40. package/bin/util.js.map +1 -1
  41. package/package.json +12 -5
  42. package/src/index.ts +0 -2
  43. package/src/local-preview/index.ts +14 -74
  44. package/src/local-preview/listener/categorizeFiles.ts +55 -0
  45. package/src/local-preview/listener/generate.ts +110 -0
  46. package/src/local-preview/listener/index.ts +169 -0
  47. package/src/local-preview/listener/update.ts +45 -0
  48. package/src/local-preview/listener/utils/createPage.ts +211 -0
  49. package/src/local-preview/listener/utils/fileIsMdxOrMd.ts +11 -0
  50. package/src/local-preview/{utils → listener/utils}/getOpenApiContext.ts +0 -0
  51. package/src/local-preview/listener/utils/mintConfigFile.ts +28 -0
  52. package/src/local-preview/listener/utils/toTitleCase.ts +40 -0
  53. package/src/local-preview/listener/utils/types.ts +1 -0
  54. package/src/local-preview/listener/utils.ts +69 -0
  55. package/src/scraping/scrapePageCommands.ts +2 -2
  56. package/src/util.ts +54 -1
  57. package/tsconfig.json +6 -5
  58. package/bin/local-preview/categorizeFiles.js +0 -56
  59. package/bin/local-preview/categorizeFiles.js.map +0 -1
  60. package/bin/local-preview/getOpenApiContext.js +0 -46
  61. package/bin/local-preview/getOpenApiContext.js.map +0 -1
  62. package/bin/local-preview/helper-commands/clearCommand.js +0 -27
  63. package/bin/local-preview/helper-commands/clearCommand.js.map +0 -1
  64. package/bin/local-preview/injectFavicons.js +0 -72
  65. package/bin/local-preview/injectFavicons.js.map +0 -1
  66. package/bin/local-preview/injectNav.js +0 -94
  67. package/bin/local-preview/injectNav.js.map +0 -1
  68. package/bin/local-preview/listener.js +0 -112
  69. package/bin/local-preview/listener.js.map +0 -1
  70. package/bin/local-preview/metadata.js +0 -121
  71. package/bin/local-preview/metadata.js.map +0 -1
  72. package/bin/local-preview/mintConfigFile.js +0 -43
  73. package/bin/local-preview/mintConfigFile.js.map +0 -1
  74. package/bin/local-preview/openApiCheck.js +0 -16
  75. package/bin/local-preview/openApiCheck.js.map +0 -1
  76. package/bin/local-preview/slugToTitle.js +0 -8
  77. package/bin/local-preview/slugToTitle.js.map +0 -1
  78. package/bin/mint/client/.babel-plugin-macrosrc.json +0 -5
  79. package/bin/mint/client/.babelrc +0 -4
  80. package/bin/mint/client/.editorconfig +0 -12
  81. package/bin/mint/client/.eslintrc.json +0 -7
  82. package/bin/mint/client/.prettierignore +0 -4
  83. package/bin/mint/client/.prettierrc +0 -14
  84. package/bin/mint/client/.vscode/launch.json +0 -28
  85. package/bin/mint/client/README.md +0 -44
  86. package/bin/mint/client/jest.config.ts +0 -195
  87. package/bin/mint/client/next-env.d.ts +0 -4
  88. package/bin/mint/client/next.config.js +0 -152
  89. package/bin/mint/client/package.json +0 -139
  90. package/bin/mint/client/postcss.config.cjs +0 -9
  91. package/bin/mint/client/prebuild/faviconConfig.js +0 -35
  92. package/bin/mint/client/prebuild/getOpenApiContext.js +0 -53
  93. package/bin/mint/client/prebuild/index.js +0 -117
  94. package/bin/mint/client/prebuild/injectNav.js +0 -115
  95. package/bin/mint/client/prebuild/slugToTitle.js +0 -7
  96. package/bin/mint/client/rehype/withApiComponents.js +0 -60
  97. package/bin/mint/client/rehype/withCodeBlocks.js +0 -54
  98. package/bin/mint/client/rehype/withLayouts.js +0 -113
  99. package/bin/mint/client/rehype/withLinkRoles.js +0 -13
  100. package/bin/mint/client/rehype/withRawComponents.js +0 -13
  101. package/bin/mint/client/rehype/withStaticProps.js +0 -25
  102. package/bin/mint/client/rehype/withSyntaxHighlighting.js +0 -60
  103. package/bin/mint/client/remark/utils.js +0 -369
  104. package/bin/mint/client/remark/withFrames.js +0 -55
  105. package/bin/mint/client/remark/withImportsInjected.js +0 -36
  106. package/bin/mint/client/remark/withNextLinks.js +0 -37
  107. package/bin/mint/client/remark/withTableOfContents.js +0 -71
  108. package/bin/mint/client/scripts/local.js +0 -177
  109. package/bin/mint/client/sentry.client.config.js +0 -15
  110. package/bin/mint/client/sentry.properties +0 -4
  111. package/bin/mint/client/sentry.server.config.js +0 -15
  112. package/bin/mint/client/src/analytics/AbstractAnalyticsImplementation.ts +0 -50
  113. package/bin/mint/client/src/analytics/AnalyticsContext.ts +0 -5
  114. package/bin/mint/client/src/analytics/AnalyticsMediator.ts +0 -101
  115. package/bin/mint/client/src/analytics/FakeAnalyticsMediator.ts +0 -9
  116. package/bin/mint/client/src/analytics/GA4Script.tsx +0 -33
  117. package/bin/mint/client/src/analytics/implementations/amplitude.ts +0 -26
  118. package/bin/mint/client/src/analytics/implementations/fathom.ts +0 -38
  119. package/bin/mint/client/src/analytics/implementations/ga4.ts +0 -33
  120. package/bin/mint/client/src/analytics/implementations/hotjar.ts +0 -53
  121. package/bin/mint/client/src/analytics/implementations/mixpanel-browser.d.ts +0 -1
  122. package/bin/mint/client/src/analytics/implementations/mixpanel.ts +0 -52
  123. package/bin/mint/client/src/analytics/implementations/posthog.ts +0 -37
  124. package/bin/mint/client/src/components/Accordion/Accordion.tsx +0 -43
  125. package/bin/mint/client/src/components/Accordion/index.ts +0 -4
  126. package/bin/mint/client/src/components/ApiExample.tsx +0 -9
  127. package/bin/mint/client/src/components/Card.tsx +0 -51
  128. package/bin/mint/client/src/components/CodeGroup.tsx +0 -132
  129. package/bin/mint/client/src/components/Editor.tsx +0 -12
  130. package/bin/mint/client/src/components/Expandable.tsx +0 -40
  131. package/bin/mint/client/src/components/Heading.tsx +0 -84
  132. package/bin/mint/client/src/components/Param.tsx +0 -56
  133. package/bin/mint/client/src/components/Request.tsx +0 -19
  134. package/bin/mint/client/src/components/ResponseField.tsx +0 -33
  135. package/bin/mint/client/src/components/TabBar.tsx +0 -61
  136. package/bin/mint/client/src/config.ts +0 -115
  137. package/bin/mint/client/src/css/bar-of-progress.css +0 -10
  138. package/bin/mint/client/src/css/base.css +0 -29
  139. package/bin/mint/client/src/css/font-awesome.css +0 -7
  140. package/bin/mint/client/src/css/fonts.css +0 -44
  141. package/bin/mint/client/src/css/main.css +0 -11
  142. package/bin/mint/client/src/css/prism.css +0 -270
  143. package/bin/mint/client/src/css/utilities.css +0 -43
  144. package/bin/mint/client/src/enums/components.ts +0 -8
  145. package/bin/mint/client/src/fonts/FiraCode-VF.woff +0 -0
  146. package/bin/mint/client/src/fonts/FiraCode-VF.woff2 +0 -0
  147. package/bin/mint/client/src/fonts/IBMPlexMono-Regular.ttf +0 -0
  148. package/bin/mint/client/src/fonts/IBMPlexMono-SemiBold.ttf +0 -0
  149. package/bin/mint/client/src/fonts/Inter-italic-latin.var.woff2 +0 -0
  150. package/bin/mint/client/src/fonts/Inter-roman-latin.var.woff2 +0 -0
  151. package/bin/mint/client/src/fonts/Pally-Variable.ttf +0 -0
  152. package/bin/mint/client/src/fonts/SourceSansPro-Regular.otf +0 -0
  153. package/bin/mint/client/src/fonts/SourceSerifPro-Regular.ttf +0 -0
  154. package/bin/mint/client/src/fonts/Synonym-Variable.ttf +0 -0
  155. package/bin/mint/client/src/fonts/Ubuntu-Mono-bold.woff2 +0 -0
  156. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.woff2 +0 -0
  157. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.zopfli.woff +0 -0
  158. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular.module.css +0 -11
  159. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.woff2 +0 -0
  160. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.zopfli.woff +0 -0
  161. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold.module.css +0 -11
  162. package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.woff2 +0 -0
  163. package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.zopfli.woff +0 -0
  164. package/bin/mint/client/src/fonts/generated/Pally-Variable.module.css +0 -11
  165. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.woff2 +0 -0
  166. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.zopfli.woff +0 -0
  167. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular.module.css +0 -11
  168. package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.woff2 +0 -0
  169. package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.zopfli.woff +0 -0
  170. package/bin/mint/client/src/fonts/generated/Synonym-Variable.module.css +0 -11
  171. package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.woff2 +0 -0
  172. package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.zopfli.woff +0 -0
  173. package/bin/mint/client/src/fonts/generated/TenorSans-Regular.module.css +0 -11
  174. package/bin/mint/client/src/hooks/useActionKey.ts +0 -20
  175. package/bin/mint/client/src/hooks/useIsomorphicLayoutEffect.ts +0 -3
  176. package/bin/mint/client/src/hooks/useMedia.ts +0 -27
  177. package/bin/mint/client/src/hooks/usePrevNext.ts +0 -34
  178. package/bin/mint/client/src/hooks/useTop.ts +0 -15
  179. package/bin/mint/client/src/icons/CopyToClipboard.tsx +0 -33
  180. package/bin/mint/client/src/index.d.ts +0 -1
  181. package/bin/mint/client/src/layouts/ApiSupplemental.tsx +0 -173
  182. package/bin/mint/client/src/layouts/ContentsLayout.tsx +0 -256
  183. package/bin/mint/client/src/layouts/DocumentationLayout.tsx +0 -44
  184. package/bin/mint/client/src/layouts/OpenApiContent.tsx +0 -301
  185. package/bin/mint/client/src/layouts/SidebarLayout.tsx +0 -412
  186. package/bin/mint/client/src/layouts/UserFeedback.tsx +0 -73
  187. package/bin/mint/client/src/layouts/getGroupsInDivision.ts +0 -25
  188. package/bin/mint/client/src/layouts/isPathInGroupPages.ts +0 -10
  189. package/bin/mint/client/src/metadata.ts +0 -58
  190. package/bin/mint/client/src/nav.json +0 -219
  191. package/bin/mint/client/src/openapi.ts +0 -3
  192. package/bin/mint/client/src/pages/404.tsx +0 -73
  193. package/bin/mint/client/src/pages/_app.tsx +0 -138
  194. package/bin/mint/client/src/pages/_document.tsx +0 -57
  195. package/bin/mint/client/src/pages/api/issue.ts +0 -10
  196. package/bin/mint/client/src/pages/api/name.ts +0 -8
  197. package/bin/mint/client/src/pages/api/request.ts +0 -31
  198. package/bin/mint/client/src/pages/api/suggest.ts +0 -10
  199. package/bin/mint/client/src/pages/api/syntax-highlighted-json.ts +0 -13
  200. package/bin/mint/client/src/pages/api/utils.ts +0 -6
  201. package/bin/mint/client/src/pages/index.tsx +0 -31
  202. package/bin/mint/client/src/ui/Api.tsx +0 -359
  203. package/bin/mint/client/src/ui/Footer.tsx +0 -124
  204. package/bin/mint/client/src/ui/Header.tsx +0 -370
  205. package/bin/mint/client/src/ui/Logo.tsx +0 -55
  206. package/bin/mint/client/src/ui/PageHeader.tsx +0 -51
  207. package/bin/mint/client/src/ui/Search.tsx +0 -386
  208. package/bin/mint/client/src/ui/ThemeToggle.tsx +0 -285
  209. package/bin/mint/client/src/ui/Title.tsx +0 -22
  210. package/bin/mint/client/src/ui/TopLevelLink.tsx +0 -122
  211. package/bin/mint/client/src/utils/api.ts +0 -252
  212. package/bin/mint/client/src/utils/brands.ts +0 -217
  213. package/bin/mint/client/src/utils/castArray.ts +0 -3
  214. package/bin/mint/client/src/utils/childrenArray.ts +0 -3
  215. package/bin/mint/client/src/utils/fit.ts +0 -27
  216. package/bin/mint/client/src/utils/fontAwesome.ts +0 -577
  217. package/bin/mint/client/src/utils/getAnalyticsConfig.ts +0 -14
  218. package/bin/mint/client/src/utils/getLogoHref.ts +0 -9
  219. package/bin/mint/client/src/utils/getOpenApiContext.ts +0 -26
  220. package/bin/mint/client/src/utils/importAll.ts +0 -6
  221. package/bin/mint/client/src/utils/isObject.ts +0 -3
  222. package/bin/mint/client/src/utils/kebabToTitleCase.ts +0 -3
  223. package/bin/mint/client/src/utils/loadImage.ts +0 -8
  224. package/bin/mint/client/src/utils/slugToTitle.ts +0 -7
  225. package/bin/mint/client/src/utils/wait.ts +0 -5
  226. package/bin/mint/client/tailwind.config.cjs +0 -323
  227. package/bin/mint/client/test/test.test.ts +0 -5
  228. package/bin/mint/client/tsconfig.json +0 -36
  229. package/bin/mint/client/yarn.lock +0 -9702
  230. package/bin/scraping/site-scrapers/getLinksRecursively.js +0 -38
  231. package/bin/scraping/site-scrapers/getLinksRecursively.js.map +0 -1
  232. package/src/init-command/index.ts +0 -59
  233. package/src/init-command/templates.ts +0 -52
  234. package/src/local-preview/utils/categorizeFiles.ts +0 -82
  235. package/src/local-preview/utils/injectFavicons.ts +0 -76
  236. package/src/local-preview/utils/listener.ts +0 -124
  237. package/src/local-preview/utils/metadata.ts +0 -151
  238. package/src/local-preview/utils/mintConfigFile.ts +0 -48
  239. package/src/local-preview/utils/openApiCheck.ts +0 -18
  240. package/src/local-preview/utils/slugToTitle.ts +0 -7
@@ -1,29 +0,0 @@
1
- @tailwind base;
2
-
3
- .dark {
4
- color-scheme: dark;
5
- }
6
-
7
- html {
8
- height: 100%;
9
- font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
10
- }
11
-
12
- body {
13
- min-height: 100%;
14
- }
15
-
16
- abbr[title] {
17
- text-decoration: none;
18
- }
19
-
20
- select::-ms-expand {
21
- display: none;
22
- }
23
-
24
- select {
25
- -webkit-appearance: none;
26
- -moz-appearance: none;
27
- text-indent: 1px;
28
- text-overflow: '';
29
- }
@@ -1,7 +0,0 @@
1
- .fa-primary {
2
- opacity: 0.4;
3
- }
4
-
5
- .fa-secondary {
6
- opacity: 0.9;
7
- }
@@ -1,44 +0,0 @@
1
- @font-face {
2
- font-family: 'Inter var';
3
- font-weight: 100 900;
4
- font-display: block;
5
- font-style: normal;
6
- font-named-instance: 'Regular';
7
- src: url('../fonts/Inter-roman-latin.var.woff2') format('woff2');
8
- }
9
-
10
- @font-face {
11
- font-family: 'Inter var';
12
- font-weight: 100 900;
13
- font-display: block;
14
- font-style: italic;
15
- font-named-instance: 'Italic';
16
- src: url('../fonts/Inter-italic-latin.var.woff2') format('woff2');
17
- }
18
-
19
- @font-face {
20
- font-family: 'Fira Code VF';
21
- font-weight: 300 700;
22
- font-style: normal;
23
- src: url('../fonts/FiraCode-VF.woff2') format('woff2-variations'),
24
- url('../fonts/FiraCode-VF.woff') format('woff-variations');
25
- }
26
-
27
- .font-mono {
28
- font-variant-ligatures: none;
29
- }
30
-
31
- @font-face {
32
- font-family: 'Source Sans Pro';
33
- font-style: normal;
34
- font-weight: 400;
35
- font-display: swap;
36
- src: url('../fonts/SourceSansPro-Regular.otf') format('opentype');
37
- }
38
-
39
- @font-face {
40
- font-family: 'Ubuntu Mono';
41
- font-weight: 700;
42
- font-style: normal;
43
- src: url('../fonts/Ubuntu-Mono-bold.woff2') format('woff2');
44
- }
@@ -1,11 +0,0 @@
1
- @import "../../node_modules/@mintlify/components/dist/main.css";
2
- @import 'base.css';
3
-
4
- /*! purgecss start ignore */
5
- @import 'prism.css';
6
- @import 'bar-of-progress.css';
7
- /*! purgecss end ignore */
8
-
9
- @import 'tailwindcss/components';
10
- @import 'utilities.css';
11
- @import 'font-awesome.css';
@@ -1,270 +0,0 @@
1
- /*********************************************************
2
- * Tokens
3
- */
4
- .namespace {
5
- opacity: 0.7;
6
- }
7
-
8
- .token.doctype .token.doctype-tag {
9
- color: #569cd6;
10
- }
11
-
12
- .token.doctype .token.name {
13
- color: #9cdcfe;
14
- }
15
-
16
- .token.comment,
17
- .token.prolog {
18
- color: #6a9955;
19
- }
20
-
21
- .token.punctuation,
22
- .language-html .language-css .token.punctuation,
23
- .language-html .language-javascript .token.punctuation {
24
- color: #d4d4d4;
25
- }
26
-
27
- .token.property,
28
- .token.tag,
29
- .token.boolean,
30
- .token.number,
31
- .token.constant,
32
- .token.symbol,
33
- .token.inserted,
34
- .token.unit {
35
- color: #b5cea8;
36
- }
37
-
38
- .token.selector,
39
- .token.attr-name,
40
- .token.string,
41
- .token.char,
42
- .token.builtin,
43
- .token.deleted {
44
- color: #ce9178;
45
- }
46
-
47
- .language-css .token.string.url {
48
- text-decoration: underline;
49
- }
50
-
51
- .token.operator,
52
- .token.entity {
53
- color: #d4d4d4;
54
- }
55
-
56
- .token.operator.arrow {
57
- color: #569cd6;
58
- }
59
-
60
- .token.atrule {
61
- color: #ce9178;
62
- }
63
-
64
- .token.atrule .token.rule {
65
- color: #c586c0;
66
- }
67
-
68
- .token.atrule .token.url {
69
- color: #9cdcfe;
70
- }
71
-
72
- .token.atrule .token.url .token.function {
73
- color: #dcdcaa;
74
- }
75
-
76
- .token.atrule .token.url .token.punctuation {
77
- color: #d4d4d4;
78
- }
79
-
80
- .token.keyword {
81
- color: #569cd6;
82
- }
83
-
84
- .token.keyword.module,
85
- .token.keyword.control-flow {
86
- color: #c586c0;
87
- }
88
-
89
- .token.function,
90
- .token.function .token.maybe-class-name {
91
- color: #dcdcaa;
92
- }
93
-
94
- .token.regex {
95
- color: #d16969;
96
- }
97
-
98
- .token.important {
99
- color: #569cd6;
100
- }
101
-
102
- .token.italic {
103
- font-style: italic;
104
- }
105
-
106
- .token.constant {
107
- color: #9cdcfe;
108
- }
109
-
110
- .token.class-name,
111
- .token.maybe-class-name {
112
- color: #4ec9b0;
113
- }
114
-
115
- .token.console {
116
- color: #9cdcfe;
117
- }
118
-
119
- .token.parameter {
120
- color: #9cdcfe;
121
- }
122
-
123
- .token.interpolation {
124
- color: #9cdcfe;
125
- }
126
-
127
- .token.punctuation.interpolation-punctuation {
128
- color: #569cd6;
129
- }
130
-
131
- .token.boolean {
132
- color: #569cd6;
133
- }
134
-
135
- .token.property,
136
- .token.variable,
137
- .token.imports .token.maybe-class-name,
138
- .token.exports .token.maybe-class-name {
139
- color: #9cdcfe;
140
- }
141
-
142
- .token.selector {
143
- color: #d7ba7d;
144
- }
145
-
146
- .token.escape {
147
- color: #d7ba7d;
148
- }
149
-
150
- .token.tag {
151
- color: #569cd6;
152
- }
153
-
154
- .token.tag .token.punctuation {
155
- color: #808080;
156
- }
157
-
158
- .token.cdata {
159
- color: #808080;
160
- }
161
-
162
- .token.attr-name {
163
- color: #9cdcfe;
164
- }
165
-
166
- .token.attr-value,
167
- .token.attr-value .token.punctuation {
168
- color: #ce9178;
169
- }
170
-
171
- .token.attr-value .token.punctuation.attr-equals {
172
- color: #d4d4d4;
173
- }
174
-
175
- .token.entity {
176
- color: #569cd6;
177
- }
178
-
179
- .token.namespace {
180
- color: #4ec9b0;
181
- }
182
-
183
- .token.operator {
184
- @apply text-slate-400;
185
- }
186
-
187
- /*********************************************************
188
- * Language Specific
189
- */
190
-
191
- pre[class*='language-javascript'],
192
- code[class*='language-javascript'],
193
- pre[class*='language-jsx'],
194
- code[class*='language-jsx'],
195
- pre[class*='language-typescript'],
196
- code[class*='language-typescript'],
197
- pre[class*='language-tsx'],
198
- code[class*='language-tsx'] {
199
- color: #9cdcfe;
200
- }
201
-
202
- pre[class*='language-css'],
203
- code[class*='language-css'] {
204
- color: #ce9178;
205
- }
206
-
207
- pre[class*='language-html'],
208
- code[class*='language-html'] {
209
- color: #d4d4d4;
210
- }
211
-
212
- .language-regex .token.anchor {
213
- color: #dcdcaa;
214
- }
215
-
216
- .language-html .token.punctuation {
217
- color: #808080;
218
- }
219
-
220
- /* Used for API response */
221
- span.language-json .token.punctuation {
222
- @apply text-slate-600 dark:text-slate-300;
223
- }
224
-
225
- span.language-json .token.property {
226
- @apply text-sky-600 dark:text-[#9cdcfe];
227
- }
228
-
229
- span.language-json .token.string {
230
- @apply text-amber-600 dark:text-[#ce9178];
231
- }
232
-
233
- span.language-json .token.number {
234
- @apply text-green-600 dark:text-[#b5cea8];
235
- }
236
-
237
- /*********************************************************
238
- * Line highlighting
239
- */
240
- pre[class*='language-'] > code[class*='language-'] {
241
- position: relative;
242
- z-index: 1;
243
- }
244
-
245
- .line-highlight.line-highlight {
246
- background: #f7ebc6;
247
- box-shadow: inset 5px 0 0 #f7d87c;
248
- z-index: 0;
249
- }
250
-
251
- pre[class^='language-diff-'] {
252
- @apply flex px-9;
253
- }
254
-
255
- pre[class^='language-diff-'] > code {
256
- @apply flex-none min-w-full;
257
- }
258
-
259
- pre[class^='language-diff-'] > code {
260
- @apply flex-none min-w-full;
261
- }
262
-
263
- :not(pre) > code {
264
- @apply rounded-sm px-1 bg-slate-200/60 dark:bg-slate-700/60;
265
- }
266
-
267
- :not(pre) > code:before,
268
- :not(pre) > code:after {
269
- content: none !important;
270
- }
@@ -1,43 +0,0 @@
1
- @tailwind utilities;
2
-
3
- .scrollbar-none {
4
- scrollbar-width: none;
5
- &::-webkit-scrollbar {
6
- display: none !important;
7
- }
8
- }
9
-
10
- .bg-checkered {
11
- background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23F0F0F0' d='M0 0h8v8H0zm8 8h8v8H8z'/%3E%3C/svg%3E");
12
- background-size: 16px 16px;
13
- }
14
-
15
- .code-highlight {
16
- border-radius: 0.25rem;
17
- padding: 0.125rem 0.1875rem;
18
- margin: 0 -0.1875rem;
19
- }
20
-
21
- .dragging-ew,
22
- .dragging-ew * {
23
- cursor: ew-resize !important;
24
- user-select: none !important;
25
- }
26
-
27
- .mono-active > div:not(.not-mono) > span {
28
- color: theme('colors.slate.600');
29
- }
30
-
31
- .mono > div > span {
32
- transition-duration: 0.5s;
33
- transition-property: background-color, border-color, color, fill, stroke;
34
- }
35
-
36
- .changing-theme,
37
- .changing-theme * {
38
- transition: none !important;
39
- }
40
-
41
- input[type='checkbox'] {
42
- margin: 0 !important;
43
- }
@@ -1,8 +0,0 @@
1
- export enum Component {
2
- ParamField = 'ParamField',
3
- Expandable = 'Expandable',
4
- ResponseExample = 'ResponseExample',
5
- RequestExample = 'RequestExample',
6
- // Depreciated
7
- Param = 'Param',
8
- }
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: IBMPlexMono-Regular;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: IBMPlexMono-Regular;
9
- src: url(IBMPlexMono-Regular-subset.woff2) format("woff2"), url(IBMPlexMono-Regular-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+2C,U+2E,U+41-43,U+46,U+49,U+4B-4F,U+53-55,U+58,U+61-65,U+67-69,U+6C-76;
11
- }
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: IBMPlexMono-SemiBold;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: IBMPlexMono-SemiBold;
9
- src: url(IBMPlexMono-SemiBold-subset.woff2) format("woff2"), url(IBMPlexMono-SemiBold-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+24,U+2E,U+30,U+38,U+39,U+41,U+42,U+44,U+47,U+4E,U+4F,U+52-55,U+57,U+59,U+65,U+68,U+6F,U+72,U+74;
11
- }
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: Pally-Variable;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: Pally-Variable;
9
- src: url(Pally-Variable-subset.woff2) format("woff2"), url(Pally-Variable-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+24,U+2C,U+2E,U+30,U+33,U+39,U+41-43,U+46,U+49-4D,U+53,U+55,U+58,U+61-65,U+67-69,U+6B-77,U+79;
11
- font-weight: 400 700;}
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: SourceSerifPro-Regular;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: SourceSerifPro-Regular;
9
- src: url(SourceSerifPro-Regular-subset.woff2) format("woff2"), url(SourceSerifPro-Regular-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+2C,U+2E,U+41-44,U+49,U+4A,U+4C,U+53,U+55,U+61-65,U+67-69,U+6B-76,U+79;
11
- }
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: Synonym-Variable;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: Synonym-Variable;
9
- src: url(Synonym-Variable-subset.woff2) format("woff2"), url(Synonym-Variable-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+24,U+2C,U+2E,U+30,U+33,U+35,U+41-44,U+46,U+47,U+49,U+4B-4F,U+53-55,U+57-59,U+61,U+63-65,U+67-69,U+6C-76;
11
- font-weight: 400 700;}
@@ -1,11 +0,0 @@
1
- .font {
2
- font-family: TenorSans-Regular;
3
- }
4
-
5
- /* This file was automatically generated by GlyphHanger 4.0.1 */
6
-
7
- @font-face {
8
- font-family: TenorSans-Regular;
9
- src: url(TenorSans-Regular-subset.woff2) format("woff2"), url(TenorSans-Regular-subset.zopfli.woff) format("woff");
10
- unicode-range: U+20,U+24,U+2E,U+30,U+36,U+46,U+49,U+4A,U+53,U+54,U+61,U+63,U+65,U+69,U+6B,U+6E,U+6F,U+72-75,U+79;
11
- }
@@ -1,20 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
-
3
- const ACTION_KEY_DEFAULT = ['Ctrl ', 'Control'];
4
- const ACTION_KEY_APPLE = ['⌘', 'Command'];
5
-
6
- export function useActionKey() {
7
- let [actionKey, setActionKey] = useState<string[]>();
8
-
9
- useEffect(() => {
10
- if (typeof navigator !== 'undefined') {
11
- if (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) {
12
- setActionKey(ACTION_KEY_APPLE);
13
- } else {
14
- setActionKey(ACTION_KEY_DEFAULT);
15
- }
16
- }
17
- }, []);
18
-
19
- return actionKey;
20
- }
@@ -1,3 +0,0 @@
1
- import { useEffect, useLayoutEffect } from 'react'
2
-
3
- export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
@@ -1,27 +0,0 @@
1
- // https://github.com/streamich/react-use/blob/master/src/useMedia.ts
2
- import { useState, useEffect } from 'react';
3
-
4
- export function useMedia(query: string, defaultState = false) {
5
- const [state, setState] = useState(defaultState);
6
-
7
- useEffect(() => {
8
- let mounted = true;
9
- const mql = window.matchMedia(query);
10
- const onChange = () => {
11
- if (!mounted) {
12
- return;
13
- }
14
- setState(!!mql.matches);
15
- };
16
-
17
- mql.addListener(onChange);
18
- setState(mql.matches);
19
-
20
- return () => {
21
- mounted = false;
22
- mql.removeListener(onChange);
23
- };
24
- }, [query]);
25
-
26
- return state;
27
- }
@@ -1,34 +0,0 @@
1
- import { useRouter } from 'next/router';
2
- import { useContext } from 'react';
3
-
4
- import { SidebarContext } from '@/layouts/SidebarLayout';
5
- import { PageContext, GroupPage, isGroup, flattenGroupPages } from '@/metadata';
6
-
7
- const getFirstNonGroupPage = (groupPage?: GroupPage): PageContext | null => {
8
- if (groupPage == null) {
9
- return null;
10
- }
11
-
12
- if (isGroup(groupPage)) {
13
- return getFirstNonGroupPage(groupPage.pages[0]);
14
- }
15
-
16
- return groupPage;
17
- };
18
-
19
- export function usePrevNext() {
20
- let router = useRouter();
21
- let { nav } = useContext(SidebarContext);
22
- let pages: PageContext[] = nav.reduce(
23
- (acc: PageContext[], currentGroup: { pages: PageContext[] }) => {
24
- return acc.concat(...flattenGroupPages(currentGroup.pages));
25
- },
26
- []
27
- );
28
-
29
- let pageIndex = pages.findIndex((page) => page?.href === router.pathname);
30
- return {
31
- prev: pageIndex > -1 ? getFirstNonGroupPage(pages[pageIndex - 1]) : undefined,
32
- next: pageIndex > -1 ? getFirstNonGroupPage(pages[pageIndex + 1]) : undefined,
33
- };
34
- }
@@ -1,15 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
- import { Rect } from 'react-use-rect';
3
-
4
- export function useTop(rect: Rect | null) {
5
- let [top, setTop] = useState<number>();
6
- let rectTop = rect ? rect.top : undefined;
7
- useEffect(() => {
8
- if (typeof rectTop === 'undefined') return;
9
- let newTop = rectTop + window.pageYOffset;
10
- if (newTop !== top) {
11
- setTop(newTop);
12
- }
13
- }, [rectTop, top]);
14
- return top;
15
- }