mintlify 1.1.5 → 1.1.7

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 (224) hide show
  1. package/CONTRIBUTING.md +5 -0
  2. package/bin/index.js +1 -8
  3. package/bin/index.js.map +1 -1
  4. package/bin/local-preview/index.js +4 -6
  5. package/bin/local-preview/index.js.map +1 -1
  6. package/bin/local-preview/injectNav.js +94 -0
  7. package/bin/local-preview/injectNav.js.map +1 -0
  8. package/bin/local-preview/utils/categorizeFiles.js +10 -3
  9. package/bin/local-preview/utils/categorizeFiles.js.map +1 -1
  10. package/bin/local-preview/utils/getOpenApiContext.js +21 -9
  11. package/bin/local-preview/utils/getOpenApiContext.js.map +1 -1
  12. package/bin/local-preview/utils/listener.js +3 -2
  13. package/bin/local-preview/utils/listener.js.map +1 -1
  14. package/bin/local-preview/utils/metadata.js +4 -8
  15. package/bin/local-preview/utils/metadata.js.map +1 -1
  16. package/bin/local-preview/utils/openApiCheck.js +3 -4
  17. package/bin/local-preview/utils/openApiCheck.js.map +1 -1
  18. package/bin/mint/client/.babel-plugin-macrosrc.json +5 -0
  19. package/bin/mint/client/.babelrc +4 -0
  20. package/bin/mint/client/.editorconfig +12 -0
  21. package/bin/mint/client/.eslintrc.json +7 -0
  22. package/bin/mint/client/.prettierignore +4 -0
  23. package/bin/mint/client/.prettierrc +14 -0
  24. package/bin/mint/client/.vscode/launch.json +28 -0
  25. package/bin/mint/client/README.md +44 -0
  26. package/bin/mint/client/jest.config.ts +195 -0
  27. package/bin/mint/client/next-env.d.ts +4 -0
  28. package/bin/mint/client/next.config.js +152 -0
  29. package/bin/mint/client/package.json +139 -0
  30. package/bin/mint/client/postcss.config.cjs +9 -0
  31. package/bin/mint/client/prebuild/faviconConfig.js +35 -0
  32. package/bin/mint/client/prebuild/getOpenApiContext.js +53 -0
  33. package/bin/mint/client/prebuild/index.js +117 -0
  34. package/bin/mint/client/prebuild/injectNav.js +115 -0
  35. package/bin/mint/client/prebuild/slugToTitle.js +7 -0
  36. package/bin/mint/client/rehype/withApiComponents.js +60 -0
  37. package/bin/mint/client/rehype/withCodeBlocks.js +54 -0
  38. package/bin/mint/client/rehype/withLayouts.js +113 -0
  39. package/bin/mint/client/rehype/withLinkRoles.js +13 -0
  40. package/bin/mint/client/rehype/withRawComponents.js +13 -0
  41. package/bin/mint/client/rehype/withStaticProps.js +25 -0
  42. package/bin/mint/client/rehype/withSyntaxHighlighting.js +60 -0
  43. package/bin/mint/client/remark/utils.js +369 -0
  44. package/bin/mint/client/remark/withFrames.js +55 -0
  45. package/bin/mint/client/remark/withImportsInjected.js +36 -0
  46. package/bin/mint/client/remark/withNextLinks.js +37 -0
  47. package/bin/mint/client/remark/withTableOfContents.js +71 -0
  48. package/bin/mint/client/scripts/local.js +177 -0
  49. package/bin/mint/client/sentry.client.config.js +15 -0
  50. package/bin/mint/client/sentry.properties +4 -0
  51. package/bin/mint/client/sentry.server.config.js +15 -0
  52. package/bin/mint/client/src/analytics/AbstractAnalyticsImplementation.ts +50 -0
  53. package/bin/mint/client/src/analytics/AnalyticsContext.ts +5 -0
  54. package/bin/mint/client/src/analytics/AnalyticsMediator.ts +101 -0
  55. package/bin/mint/client/src/analytics/FakeAnalyticsMediator.ts +9 -0
  56. package/bin/mint/client/src/analytics/GA4Script.tsx +33 -0
  57. package/bin/mint/client/src/analytics/implementations/amplitude.ts +26 -0
  58. package/bin/mint/client/src/analytics/implementations/fathom.ts +38 -0
  59. package/bin/mint/client/src/analytics/implementations/ga4.ts +33 -0
  60. package/bin/mint/client/src/analytics/implementations/hotjar.ts +53 -0
  61. package/bin/mint/client/src/analytics/implementations/mixpanel-browser.d.ts +1 -0
  62. package/bin/mint/client/src/analytics/implementations/mixpanel.ts +52 -0
  63. package/bin/mint/client/src/analytics/implementations/posthog.ts +37 -0
  64. package/bin/mint/client/src/components/Accordion/Accordion.tsx +43 -0
  65. package/bin/mint/client/src/components/Accordion/index.ts +4 -0
  66. package/bin/mint/client/src/components/ApiExample.tsx +9 -0
  67. package/bin/mint/client/src/components/Card.tsx +51 -0
  68. package/bin/mint/client/src/components/CodeGroup.tsx +132 -0
  69. package/bin/mint/client/src/components/Editor.tsx +12 -0
  70. package/bin/mint/client/src/components/Expandable.tsx +40 -0
  71. package/bin/mint/client/src/components/Heading.tsx +84 -0
  72. package/bin/mint/client/src/components/Param.tsx +56 -0
  73. package/bin/mint/client/src/components/Request.tsx +19 -0
  74. package/bin/mint/client/src/components/ResponseField.tsx +33 -0
  75. package/bin/mint/client/src/components/TabBar.tsx +61 -0
  76. package/bin/mint/client/src/config.ts +115 -0
  77. package/bin/mint/client/src/css/bar-of-progress.css +10 -0
  78. package/bin/mint/client/src/css/base.css +29 -0
  79. package/bin/mint/client/src/css/font-awesome.css +7 -0
  80. package/bin/mint/client/src/css/fonts.css +44 -0
  81. package/bin/mint/client/src/css/main.css +11 -0
  82. package/bin/mint/client/src/css/prism.css +270 -0
  83. package/bin/mint/client/src/css/utilities.css +43 -0
  84. package/bin/mint/client/src/enums/components.ts +8 -0
  85. package/bin/mint/client/src/fonts/FiraCode-VF.woff +0 -0
  86. package/bin/mint/client/src/fonts/FiraCode-VF.woff2 +0 -0
  87. package/bin/mint/client/src/fonts/IBMPlexMono-Regular.ttf +0 -0
  88. package/bin/mint/client/src/fonts/IBMPlexMono-SemiBold.ttf +0 -0
  89. package/bin/mint/client/src/fonts/Inter-italic-latin.var.woff2 +0 -0
  90. package/bin/mint/client/src/fonts/Inter-roman-latin.var.woff2 +0 -0
  91. package/bin/mint/client/src/fonts/Pally-Variable.ttf +0 -0
  92. package/bin/mint/client/src/fonts/SourceSansPro-Regular.otf +0 -0
  93. package/bin/mint/client/src/fonts/SourceSerifPro-Regular.ttf +0 -0
  94. package/bin/mint/client/src/fonts/Synonym-Variable.ttf +0 -0
  95. package/bin/mint/client/src/fonts/Ubuntu-Mono-bold.woff2 +0 -0
  96. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.woff2 +0 -0
  97. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.zopfli.woff +0 -0
  98. package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular.module.css +11 -0
  99. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.woff2 +0 -0
  100. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.zopfli.woff +0 -0
  101. package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold.module.css +11 -0
  102. package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.woff2 +0 -0
  103. package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.zopfli.woff +0 -0
  104. package/bin/mint/client/src/fonts/generated/Pally-Variable.module.css +11 -0
  105. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.woff2 +0 -0
  106. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.zopfli.woff +0 -0
  107. package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular.module.css +11 -0
  108. package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.woff2 +0 -0
  109. package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.zopfli.woff +0 -0
  110. package/bin/mint/client/src/fonts/generated/Synonym-Variable.module.css +11 -0
  111. package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.woff2 +0 -0
  112. package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.zopfli.woff +0 -0
  113. package/bin/mint/client/src/fonts/generated/TenorSans-Regular.module.css +11 -0
  114. package/bin/mint/client/src/hooks/useActionKey.ts +20 -0
  115. package/bin/mint/client/src/hooks/useIsomorphicLayoutEffect.ts +3 -0
  116. package/bin/mint/client/src/hooks/useMedia.ts +27 -0
  117. package/bin/mint/client/src/hooks/usePrevNext.ts +34 -0
  118. package/bin/mint/client/src/hooks/useTop.ts +15 -0
  119. package/bin/mint/client/src/icons/CopyToClipboard.tsx +33 -0
  120. package/bin/mint/client/src/index.d.ts +1 -0
  121. package/bin/mint/client/src/layouts/ApiSupplemental.tsx +173 -0
  122. package/bin/mint/client/src/layouts/ContentsLayout.tsx +256 -0
  123. package/bin/mint/client/src/layouts/DocumentationLayout.tsx +44 -0
  124. package/bin/mint/client/src/layouts/OpenApiContent.tsx +301 -0
  125. package/bin/mint/client/src/layouts/SidebarLayout.tsx +412 -0
  126. package/bin/mint/client/src/layouts/UserFeedback.tsx +73 -0
  127. package/bin/mint/client/src/layouts/getGroupsInDivision.ts +25 -0
  128. package/bin/mint/client/src/layouts/isPathInGroupPages.ts +10 -0
  129. package/bin/mint/client/src/metadata.ts +58 -0
  130. package/bin/mint/client/src/nav.json +219 -0
  131. package/bin/mint/client/src/openapi.ts +3 -0
  132. package/bin/mint/client/src/pages/404.tsx +73 -0
  133. package/bin/mint/client/src/pages/_app.tsx +138 -0
  134. package/bin/mint/client/src/pages/_document.tsx +57 -0
  135. package/bin/mint/client/src/pages/api/issue.ts +10 -0
  136. package/bin/mint/client/src/pages/api/name.ts +8 -0
  137. package/bin/mint/client/src/pages/api/request.ts +31 -0
  138. package/bin/mint/client/src/pages/api/suggest.ts +10 -0
  139. package/bin/mint/client/src/pages/api/syntax-highlighted-json.ts +13 -0
  140. package/bin/mint/client/src/pages/api/utils.ts +6 -0
  141. package/bin/mint/client/src/pages/index.tsx +31 -0
  142. package/bin/mint/client/src/ui/Api.tsx +359 -0
  143. package/bin/mint/client/src/ui/Footer.tsx +124 -0
  144. package/bin/mint/client/src/ui/Header.tsx +370 -0
  145. package/bin/mint/client/src/ui/Logo.tsx +55 -0
  146. package/bin/mint/client/src/ui/PageHeader.tsx +51 -0
  147. package/bin/mint/client/src/ui/Search.tsx +386 -0
  148. package/bin/mint/client/src/ui/ThemeToggle.tsx +285 -0
  149. package/bin/mint/client/src/ui/Title.tsx +22 -0
  150. package/bin/mint/client/src/ui/TopLevelLink.tsx +122 -0
  151. package/bin/mint/client/src/utils/api.ts +252 -0
  152. package/bin/mint/client/src/utils/brands.ts +217 -0
  153. package/bin/mint/client/src/utils/castArray.ts +3 -0
  154. package/bin/mint/client/src/utils/childrenArray.ts +3 -0
  155. package/bin/mint/client/src/utils/fit.ts +27 -0
  156. package/bin/mint/client/src/utils/fontAwesome.ts +577 -0
  157. package/bin/mint/client/src/utils/getAnalyticsConfig.ts +14 -0
  158. package/bin/mint/client/src/utils/getLogoHref.ts +9 -0
  159. package/bin/mint/client/src/utils/getOpenApiContext.ts +26 -0
  160. package/bin/mint/client/src/utils/importAll.ts +6 -0
  161. package/bin/mint/client/src/utils/isObject.ts +3 -0
  162. package/bin/mint/client/src/utils/kebabToTitleCase.ts +3 -0
  163. package/bin/mint/client/src/utils/loadImage.ts +8 -0
  164. package/bin/mint/client/src/utils/slugToTitle.ts +7 -0
  165. package/bin/mint/client/src/utils/wait.ts +5 -0
  166. package/bin/mint/client/tailwind.config.cjs +323 -0
  167. package/bin/mint/client/test/test.test.ts +5 -0
  168. package/bin/mint/client/tsconfig.json +36 -0
  169. package/bin/mint/client/yarn.lock +9702 -0
  170. package/bin/scraping/detectFramework.js +12 -3
  171. package/bin/scraping/detectFramework.js.map +1 -1
  172. package/bin/scraping/scrapeFileGettingFileNameFromUrl.js +2 -2
  173. package/bin/scraping/scrapeFileGettingFileNameFromUrl.js.map +1 -1
  174. package/bin/scraping/scrapeGettingFileNameFromUrl.js +3 -3
  175. package/bin/scraping/scrapeGettingFileNameFromUrl.js.map +1 -1
  176. package/bin/scraping/scrapePage.js +2 -2
  177. package/bin/scraping/scrapePage.js.map +1 -1
  178. package/bin/scraping/scrapePageCommands.js +6 -6
  179. package/bin/scraping/scrapePageCommands.js.map +1 -1
  180. package/bin/scraping/scrapeSection.js +2 -2
  181. package/bin/scraping/scrapeSection.js.map +1 -1
  182. package/bin/scraping/scrapeSectionCommands.js +8 -7
  183. package/bin/scraping/scrapeSectionCommands.js.map +1 -1
  184. package/bin/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.js +36 -0
  185. package/bin/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.js.map +1 -0
  186. package/bin/scraping/site-scrapers/links-per-group/getLinksRecursively.js +38 -0
  187. package/bin/scraping/site-scrapers/links-per-group/getLinksRecursively.js.map +1 -0
  188. package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js +14 -8
  189. package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js.map +1 -1
  190. package/bin/scraping/site-scrapers/scrapeDocusaurusSection.js +4 -29
  191. package/bin/scraping/site-scrapers/scrapeDocusaurusSection.js.map +1 -1
  192. package/bin/scraping/site-scrapers/scrapeGitBookPage.js +2 -1
  193. package/bin/scraping/site-scrapers/scrapeGitBookPage.js.map +1 -1
  194. package/bin/scraping/site-scrapers/scrapeGitBookSection.js +3 -3
  195. package/bin/scraping/site-scrapers/scrapeGitBookSection.js.map +1 -1
  196. package/bin/scraping/site-scrapers/scrapeReadMePage.js +2 -1
  197. package/bin/scraping/site-scrapers/scrapeReadMePage.js.map +1 -1
  198. package/bin/scraping/site-scrapers/scrapeReadMeSection.js +3 -3
  199. package/bin/scraping/site-scrapers/scrapeReadMeSection.js.map +1 -1
  200. package/package.json +1 -1
  201. package/src/index.ts +0 -16
  202. package/src/local-preview/index.ts +4 -6
  203. package/src/local-preview/utils/categorizeFiles.ts +12 -4
  204. package/src/local-preview/utils/getOpenApiContext.ts +27 -11
  205. package/src/local-preview/utils/listener.ts +9 -4
  206. package/src/local-preview/utils/metadata.ts +4 -8
  207. package/src/local-preview/utils/openApiCheck.ts +4 -5
  208. package/src/scraping/detectFramework.ts +13 -3
  209. package/src/scraping/scrapeFileGettingFileNameFromUrl.ts +5 -2
  210. package/src/scraping/scrapeGettingFileNameFromUrl.ts +5 -1
  211. package/src/scraping/scrapePage.ts +6 -3
  212. package/src/scraping/scrapePageCommands.ts +10 -6
  213. package/src/scraping/scrapeSection.ts +9 -2
  214. package/src/scraping/scrapeSectionCommands.ts +24 -7
  215. package/src/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.ts +46 -0
  216. package/src/scraping/site-scrapers/{getLinksRecursively.ts → links-per-group/getLinksRecursively.ts} +0 -0
  217. package/src/scraping/site-scrapers/scrapeDocusaurusPage.ts +20 -8
  218. package/src/scraping/site-scrapers/scrapeDocusaurusSection.ts +9 -33
  219. package/src/scraping/site-scrapers/scrapeGitBookPage.ts +2 -1
  220. package/src/scraping/site-scrapers/scrapeGitBookSection.ts +5 -3
  221. package/src/scraping/site-scrapers/scrapeReadMePage.ts +2 -1
  222. package/src/scraping/site-scrapers/scrapeReadMeSection.ts +4 -2
  223. package/bin/local-preview/helper-commands/cleanCommand.js +0 -8
  224. package/bin/local-preview/helper-commands/cleanCommand.js.map +0 -1
@@ -0,0 +1,29 @@
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
+ }
@@ -0,0 +1,7 @@
1
+ .fa-primary {
2
+ opacity: 0.4;
3
+ }
4
+
5
+ .fa-secondary {
6
+ opacity: 0.9;
7
+ }
@@ -0,0 +1,44 @@
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
+ }
@@ -0,0 +1,11 @@
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';
@@ -0,0 +1,270 @@
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
+ }
@@ -0,0 +1,43 @@
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
+ }
@@ -0,0 +1,8 @@
1
+ export enum Component {
2
+ ParamField = 'ParamField',
3
+ Expandable = 'Expandable',
4
+ ResponseExample = 'ResponseExample',
5
+ RequestExample = 'RequestExample',
6
+ // Depreciated
7
+ Param = 'Param',
8
+ }
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,11 @@
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;}
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,11 @@
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;}
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,20 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ import { useEffect, useLayoutEffect } from 'react'
2
+
3
+ export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
@@ -0,0 +1,27 @@
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
+ }
@@ -0,0 +1,34 @@
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
+ }
@@ -0,0 +1,15 @@
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
+ }