mintlify 1.1.6 → 1.1.8
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/CONTRIBUTING.md +5 -0
- package/bin/index.js +1 -8
- package/bin/index.js.map +1 -1
- package/bin/local-preview/injectNav.js +94 -0
- package/bin/local-preview/injectNav.js.map +1 -0
- package/bin/mint/client/.babel-plugin-macrosrc.json +5 -0
- package/bin/mint/client/.babelrc +4 -0
- package/bin/mint/client/.editorconfig +12 -0
- package/bin/mint/client/.eslintrc.json +7 -0
- package/bin/mint/client/.prettierignore +4 -0
- package/bin/mint/client/.prettierrc +14 -0
- package/bin/mint/client/.vscode/launch.json +28 -0
- package/bin/mint/client/README.md +44 -0
- package/bin/mint/client/jest.config.ts +195 -0
- package/bin/mint/client/next-env.d.ts +4 -0
- package/bin/mint/client/next.config.js +152 -0
- package/bin/mint/client/package.json +139 -0
- package/bin/mint/client/postcss.config.cjs +9 -0
- package/bin/mint/client/prebuild/faviconConfig.js +35 -0
- package/bin/mint/client/prebuild/getOpenApiContext.js +53 -0
- package/bin/mint/client/prebuild/index.js +117 -0
- package/bin/mint/client/prebuild/injectNav.js +115 -0
- package/bin/mint/client/prebuild/slugToTitle.js +7 -0
- package/bin/mint/client/rehype/withApiComponents.js +60 -0
- package/bin/mint/client/rehype/withCodeBlocks.js +54 -0
- package/bin/mint/client/rehype/withLayouts.js +113 -0
- package/bin/mint/client/rehype/withLinkRoles.js +13 -0
- package/bin/mint/client/rehype/withRawComponents.js +13 -0
- package/bin/mint/client/rehype/withStaticProps.js +25 -0
- package/bin/mint/client/rehype/withSyntaxHighlighting.js +60 -0
- package/bin/mint/client/remark/utils.js +369 -0
- package/bin/mint/client/remark/withFrames.js +55 -0
- package/bin/mint/client/remark/withImportsInjected.js +36 -0
- package/bin/mint/client/remark/withNextLinks.js +37 -0
- package/bin/mint/client/remark/withTableOfContents.js +71 -0
- package/bin/mint/client/scripts/local.js +177 -0
- package/bin/mint/client/sentry.client.config.js +15 -0
- package/bin/mint/client/sentry.properties +4 -0
- package/bin/mint/client/sentry.server.config.js +15 -0
- package/bin/mint/client/src/analytics/AbstractAnalyticsImplementation.ts +50 -0
- package/bin/mint/client/src/analytics/AnalyticsContext.ts +5 -0
- package/bin/mint/client/src/analytics/AnalyticsMediator.ts +101 -0
- package/bin/mint/client/src/analytics/FakeAnalyticsMediator.ts +9 -0
- package/bin/mint/client/src/analytics/GA4Script.tsx +33 -0
- package/bin/mint/client/src/analytics/implementations/amplitude.ts +26 -0
- package/bin/mint/client/src/analytics/implementations/fathom.ts +38 -0
- package/bin/mint/client/src/analytics/implementations/ga4.ts +33 -0
- package/bin/mint/client/src/analytics/implementations/hotjar.ts +53 -0
- package/bin/mint/client/src/analytics/implementations/mixpanel-browser.d.ts +1 -0
- package/bin/mint/client/src/analytics/implementations/mixpanel.ts +52 -0
- package/bin/mint/client/src/analytics/implementations/posthog.ts +37 -0
- package/bin/mint/client/src/components/Accordion/Accordion.tsx +43 -0
- package/bin/mint/client/src/components/Accordion/index.ts +4 -0
- package/bin/mint/client/src/components/ApiExample.tsx +9 -0
- package/bin/mint/client/src/components/Card.tsx +51 -0
- package/bin/mint/client/src/components/CodeGroup.tsx +132 -0
- package/bin/mint/client/src/components/Editor.tsx +12 -0
- package/bin/mint/client/src/components/Expandable.tsx +40 -0
- package/bin/mint/client/src/components/Heading.tsx +84 -0
- package/bin/mint/client/src/components/Param.tsx +56 -0
- package/bin/mint/client/src/components/Request.tsx +19 -0
- package/bin/mint/client/src/components/ResponseField.tsx +33 -0
- package/bin/mint/client/src/components/TabBar.tsx +61 -0
- package/bin/mint/client/src/config.ts +115 -0
- package/bin/mint/client/src/css/bar-of-progress.css +10 -0
- package/bin/mint/client/src/css/base.css +29 -0
- package/bin/mint/client/src/css/font-awesome.css +7 -0
- package/bin/mint/client/src/css/fonts.css +44 -0
- package/bin/mint/client/src/css/main.css +11 -0
- package/bin/mint/client/src/css/prism.css +270 -0
- package/bin/mint/client/src/css/utilities.css +43 -0
- package/bin/mint/client/src/enums/components.ts +8 -0
- package/bin/mint/client/src/fonts/FiraCode-VF.woff +0 -0
- package/bin/mint/client/src/fonts/FiraCode-VF.woff2 +0 -0
- package/bin/mint/client/src/fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bin/mint/client/src/fonts/IBMPlexMono-SemiBold.ttf +0 -0
- package/bin/mint/client/src/fonts/Inter-italic-latin.var.woff2 +0 -0
- package/bin/mint/client/src/fonts/Inter-roman-latin.var.woff2 +0 -0
- package/bin/mint/client/src/fonts/Pally-Variable.ttf +0 -0
- package/bin/mint/client/src/fonts/SourceSansPro-Regular.otf +0 -0
- package/bin/mint/client/src/fonts/SourceSerifPro-Regular.ttf +0 -0
- package/bin/mint/client/src/fonts/Synonym-Variable.ttf +0 -0
- package/bin/mint/client/src/fonts/Ubuntu-Mono-bold.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular.module.css +11 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold.module.css +11 -0
- package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/Pally-Variable.module.css +11 -0
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular.module.css +11 -0
- package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/Synonym-Variable.module.css +11 -0
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular.module.css +11 -0
- package/bin/mint/client/src/hooks/useActionKey.ts +20 -0
- package/bin/mint/client/src/hooks/useIsomorphicLayoutEffect.ts +3 -0
- package/bin/mint/client/src/hooks/useMedia.ts +27 -0
- package/bin/mint/client/src/hooks/usePrevNext.ts +34 -0
- package/bin/mint/client/src/hooks/useTop.ts +15 -0
- package/bin/mint/client/src/icons/CopyToClipboard.tsx +33 -0
- package/bin/mint/client/src/index.d.ts +1 -0
- package/bin/mint/client/src/layouts/ApiSupplemental.tsx +173 -0
- package/bin/mint/client/src/layouts/ContentsLayout.tsx +256 -0
- package/bin/mint/client/src/layouts/DocumentationLayout.tsx +44 -0
- package/bin/mint/client/src/layouts/OpenApiContent.tsx +301 -0
- package/bin/mint/client/src/layouts/SidebarLayout.tsx +412 -0
- package/bin/mint/client/src/layouts/UserFeedback.tsx +73 -0
- package/bin/mint/client/src/layouts/getGroupsInDivision.ts +25 -0
- package/bin/mint/client/src/layouts/isPathInGroupPages.ts +10 -0
- package/bin/mint/client/src/metadata.ts +58 -0
- package/bin/mint/client/src/nav.json +219 -0
- package/bin/mint/client/src/openapi.ts +3 -0
- package/bin/mint/client/src/pages/404.tsx +73 -0
- package/bin/mint/client/src/pages/_app.tsx +138 -0
- package/bin/mint/client/src/pages/_document.tsx +57 -0
- package/bin/mint/client/src/pages/api/issue.ts +10 -0
- package/bin/mint/client/src/pages/api/name.ts +8 -0
- package/bin/mint/client/src/pages/api/request.ts +31 -0
- package/bin/mint/client/src/pages/api/suggest.ts +10 -0
- package/bin/mint/client/src/pages/api/syntax-highlighted-json.ts +13 -0
- package/bin/mint/client/src/pages/api/utils.ts +6 -0
- package/bin/mint/client/src/pages/index.tsx +31 -0
- package/bin/mint/client/src/ui/Api.tsx +359 -0
- package/bin/mint/client/src/ui/Footer.tsx +124 -0
- package/bin/mint/client/src/ui/Header.tsx +370 -0
- package/bin/mint/client/src/ui/Logo.tsx +55 -0
- package/bin/mint/client/src/ui/PageHeader.tsx +51 -0
- package/bin/mint/client/src/ui/Search.tsx +386 -0
- package/bin/mint/client/src/ui/ThemeToggle.tsx +285 -0
- package/bin/mint/client/src/ui/Title.tsx +22 -0
- package/bin/mint/client/src/ui/TopLevelLink.tsx +122 -0
- package/bin/mint/client/src/utils/api.ts +252 -0
- package/bin/mint/client/src/utils/brands.ts +217 -0
- package/bin/mint/client/src/utils/castArray.ts +3 -0
- package/bin/mint/client/src/utils/childrenArray.ts +3 -0
- package/bin/mint/client/src/utils/fit.ts +27 -0
- package/bin/mint/client/src/utils/fontAwesome.ts +577 -0
- package/bin/mint/client/src/utils/getAnalyticsConfig.ts +14 -0
- package/bin/mint/client/src/utils/getLogoHref.ts +9 -0
- package/bin/mint/client/src/utils/getOpenApiContext.ts +26 -0
- package/bin/mint/client/src/utils/importAll.ts +6 -0
- package/bin/mint/client/src/utils/isObject.ts +3 -0
- package/bin/mint/client/src/utils/kebabToTitleCase.ts +3 -0
- package/bin/mint/client/src/utils/loadImage.ts +8 -0
- package/bin/mint/client/src/utils/slugToTitle.ts +7 -0
- package/bin/mint/client/src/utils/wait.ts +5 -0
- package/bin/mint/client/tailwind.config.cjs +323 -0
- package/bin/mint/client/test/test.test.ts +5 -0
- package/bin/mint/client/tsconfig.json +36 -0
- package/bin/mint/client/yarn.lock +9702 -0
- package/bin/scraping/detectFramework.js +12 -3
- package/bin/scraping/detectFramework.js.map +1 -1
- package/bin/scraping/scrapeFileGettingFileNameFromUrl.js +2 -2
- package/bin/scraping/scrapeFileGettingFileNameFromUrl.js.map +1 -1
- package/bin/scraping/scrapeGettingFileNameFromUrl.js +3 -3
- package/bin/scraping/scrapeGettingFileNameFromUrl.js.map +1 -1
- package/bin/scraping/scrapePage.js +2 -2
- package/bin/scraping/scrapePage.js.map +1 -1
- package/bin/scraping/scrapePageCommands.js +6 -6
- package/bin/scraping/scrapePageCommands.js.map +1 -1
- package/bin/scraping/scrapeSection.js +2 -2
- package/bin/scraping/scrapeSection.js.map +1 -1
- package/bin/scraping/scrapeSectionCommands.js +8 -7
- package/bin/scraping/scrapeSectionCommands.js.map +1 -1
- package/bin/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.js +36 -0
- package/bin/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.js.map +1 -0
- package/bin/scraping/site-scrapers/links-per-group/getLinksRecursively.js +38 -0
- package/bin/scraping/site-scrapers/links-per-group/getLinksRecursively.js.map +1 -0
- package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js +14 -8
- package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeDocusaurusSection.js +4 -29
- package/bin/scraping/site-scrapers/scrapeDocusaurusSection.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeGitBookPage.js +2 -1
- package/bin/scraping/site-scrapers/scrapeGitBookPage.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeGitBookSection.js +7 -5
- package/bin/scraping/site-scrapers/scrapeGitBookSection.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeReadMePage.js +2 -1
- package/bin/scraping/site-scrapers/scrapeReadMePage.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeReadMeSection.js +3 -3
- package/bin/scraping/site-scrapers/scrapeReadMeSection.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -16
- package/src/scraping/detectFramework.ts +13 -3
- package/src/scraping/scrapeFileGettingFileNameFromUrl.ts +5 -2
- package/src/scraping/scrapeGettingFileNameFromUrl.ts +5 -1
- package/src/scraping/scrapePage.ts +6 -3
- package/src/scraping/scrapePageCommands.ts +10 -6
- package/src/scraping/scrapeSection.ts +9 -2
- package/src/scraping/scrapeSectionCommands.ts +24 -7
- package/src/scraping/site-scrapers/links-per-group/getDocusaurusLinksPerGroup.ts +46 -0
- package/src/scraping/site-scrapers/{getLinksRecursively.ts → links-per-group/getLinksRecursively.ts} +0 -0
- package/src/scraping/site-scrapers/scrapeDocusaurusPage.ts +20 -8
- package/src/scraping/site-scrapers/scrapeDocusaurusSection.ts +9 -33
- package/src/scraping/site-scrapers/scrapeGitBookPage.ts +2 -1
- package/src/scraping/site-scrapers/scrapeGitBookSection.ts +9 -5
- package/src/scraping/site-scrapers/scrapeReadMePage.ts +2 -1
- package/src/scraping/site-scrapers/scrapeReadMeSection.ts +4 -2
- package/bin/local-preview/helper-commands/cleanCommand.js +0 -8
- package/bin/local-preview/helper-commands/cleanCommand.js.map +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
2
|
+
const svgToDataUri = require('mini-svg-data-uri');
|
|
3
|
+
const { default: flattenColorPalette } = require('tailwindcss/lib/util/flattenColorPalette');
|
|
4
|
+
const config = require('./src/mint.json');
|
|
5
|
+
|
|
6
|
+
const ctaColors = {};
|
|
7
|
+
config?.anchors?.forEach((anchor, i) => {
|
|
8
|
+
if (anchor.color) {
|
|
9
|
+
ctaColors[`anchor-${i}`] = anchor.color.toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
content: [
|
|
15
|
+
'./src/**/*.{js,jsx,ts,tsx,mdx,html}',
|
|
16
|
+
'./remark/**/*.js',
|
|
17
|
+
'./rehype/**/*.js',
|
|
18
|
+
'./src/mint.json',
|
|
19
|
+
],
|
|
20
|
+
darkMode: 'class',
|
|
21
|
+
theme: {
|
|
22
|
+
screens: {
|
|
23
|
+
sm: '640px',
|
|
24
|
+
md: '768px',
|
|
25
|
+
lg: '1024px',
|
|
26
|
+
xl: '1280px',
|
|
27
|
+
'2xl': '1536px',
|
|
28
|
+
},
|
|
29
|
+
aspectRatio: {
|
|
30
|
+
auto: 'auto',
|
|
31
|
+
square: '1 / 1',
|
|
32
|
+
video: '16 / 9',
|
|
33
|
+
1: '1',
|
|
34
|
+
2: '2',
|
|
35
|
+
3: '3',
|
|
36
|
+
4: '4',
|
|
37
|
+
5: '5',
|
|
38
|
+
6: '6',
|
|
39
|
+
7: '7',
|
|
40
|
+
8: '8',
|
|
41
|
+
9: '9',
|
|
42
|
+
10: '10',
|
|
43
|
+
11: '11',
|
|
44
|
+
12: '12',
|
|
45
|
+
13: '13',
|
|
46
|
+
14: '14',
|
|
47
|
+
15: '15',
|
|
48
|
+
16: '16',
|
|
49
|
+
},
|
|
50
|
+
extend: {
|
|
51
|
+
colors: {
|
|
52
|
+
code: {
|
|
53
|
+
highlight: 'rgb(125 211 252 / 0.1)',
|
|
54
|
+
},
|
|
55
|
+
primary: config?.colors?.primary ?? '#a888ff',
|
|
56
|
+
'primary-light': config?.colors?.light ?? '#c4b5fd',
|
|
57
|
+
'primary-dark': config?.colors?.dark ?? '#7c3aed',
|
|
58
|
+
'primary-ultralight': config?.colors?.ultraLight ?? '#ddd6fe',
|
|
59
|
+
'primary-ultradark': config?.colors?.ultraDark ?? '#5b21b6',
|
|
60
|
+
'background-light': config?.colors?.background?.light ?? '#ffffff',
|
|
61
|
+
'background-dark': config?.colors?.background?.dark ?? '#0C1322',
|
|
62
|
+
...ctaColors,
|
|
63
|
+
},
|
|
64
|
+
typography: (theme) => ({
|
|
65
|
+
DEFAULT: {
|
|
66
|
+
css: {
|
|
67
|
+
maxWidth: 'none',
|
|
68
|
+
color: theme('colors.slate.700'),
|
|
69
|
+
hr: {
|
|
70
|
+
borderColor: theme('colors.slate.100'),
|
|
71
|
+
marginTop: '3em',
|
|
72
|
+
marginBottom: '3em',
|
|
73
|
+
},
|
|
74
|
+
'h1, h2, h3': {
|
|
75
|
+
letterSpacing: '-0.025em',
|
|
76
|
+
},
|
|
77
|
+
h2: {
|
|
78
|
+
marginBottom: `${16 / 24}em`,
|
|
79
|
+
},
|
|
80
|
+
h3: {
|
|
81
|
+
marginTop: '2.4em',
|
|
82
|
+
lineHeight: '1.4',
|
|
83
|
+
},
|
|
84
|
+
h4: {
|
|
85
|
+
marginTop: '2em',
|
|
86
|
+
fontSize: '1.125em',
|
|
87
|
+
},
|
|
88
|
+
'h1 small, h2 small, h3 small, h4 small': {
|
|
89
|
+
fontFamily: theme('fontFamily.mono').join(', '),
|
|
90
|
+
color: theme('colors.slate.500'),
|
|
91
|
+
fontWeight: 500,
|
|
92
|
+
},
|
|
93
|
+
'h2 small': {
|
|
94
|
+
fontSize: theme('fontSize.lg')[0],
|
|
95
|
+
...theme('fontSize.lg')[1],
|
|
96
|
+
},
|
|
97
|
+
'h3 small': {
|
|
98
|
+
fontSize: theme('fontSize.base')[0],
|
|
99
|
+
...theme('fontSize.base')[1],
|
|
100
|
+
},
|
|
101
|
+
'h4 small': {
|
|
102
|
+
fontSize: theme('fontSize.sm')[0],
|
|
103
|
+
...theme('fontSize.sm')[1],
|
|
104
|
+
},
|
|
105
|
+
'h1, h2, h3, h4': {
|
|
106
|
+
'scroll-margin-top': 'var(--scroll-mt)',
|
|
107
|
+
},
|
|
108
|
+
ul: {
|
|
109
|
+
listStyleType: 'none',
|
|
110
|
+
paddingLeft: 0,
|
|
111
|
+
},
|
|
112
|
+
'ul > li': {
|
|
113
|
+
position: 'relative',
|
|
114
|
+
paddingLeft: '1.75em',
|
|
115
|
+
},
|
|
116
|
+
'ul > li::before': {
|
|
117
|
+
content: '""',
|
|
118
|
+
width: '0.75em',
|
|
119
|
+
height: '0.125em',
|
|
120
|
+
position: 'absolute',
|
|
121
|
+
top: 'calc(0.875em - 0.0625em)',
|
|
122
|
+
left: 0,
|
|
123
|
+
borderRadius: '999px',
|
|
124
|
+
backgroundColor: theme('colors.slate.300'),
|
|
125
|
+
},
|
|
126
|
+
a: {
|
|
127
|
+
fontWeight: theme('fontWeight.semibold'),
|
|
128
|
+
textDecoration: 'none',
|
|
129
|
+
borderBottom: `1px solid ${theme('colors.primary-light')}`,
|
|
130
|
+
},
|
|
131
|
+
'a:hover': {
|
|
132
|
+
borderBottomWidth: '2px',
|
|
133
|
+
},
|
|
134
|
+
'a code': {
|
|
135
|
+
color: 'inherit',
|
|
136
|
+
fontWeight: 'inherit',
|
|
137
|
+
},
|
|
138
|
+
strong: {
|
|
139
|
+
color: theme('colors.slate.900'),
|
|
140
|
+
fontWeight: theme('fontWeight.semibold'),
|
|
141
|
+
},
|
|
142
|
+
'a strong': {
|
|
143
|
+
color: 'inherit',
|
|
144
|
+
fontWeight: 'inherit',
|
|
145
|
+
},
|
|
146
|
+
kbd: {
|
|
147
|
+
background: theme('colors.slate.100'),
|
|
148
|
+
borderWidth: '1px',
|
|
149
|
+
borderColor: theme('colors.slate.200'),
|
|
150
|
+
padding: '0.125em 0.25em',
|
|
151
|
+
color: theme('colors.slate.700'),
|
|
152
|
+
fontWeight: 500,
|
|
153
|
+
fontSize: '0.875em',
|
|
154
|
+
fontVariantLigatures: 'none',
|
|
155
|
+
borderRadius: '4px',
|
|
156
|
+
margin: '0 1px',
|
|
157
|
+
},
|
|
158
|
+
code: {
|
|
159
|
+
fontWeight: theme('fontWeight.medium'),
|
|
160
|
+
fontVariantLigatures: 'none',
|
|
161
|
+
},
|
|
162
|
+
pre: {
|
|
163
|
+
color: theme('colors.slate.50'),
|
|
164
|
+
borderRadius: theme('borderRadius.xl'),
|
|
165
|
+
padding: theme('padding.5'),
|
|
166
|
+
boxShadow: theme('boxShadow.md'),
|
|
167
|
+
display: 'flex',
|
|
168
|
+
marginTop: `${20 / 14}em`,
|
|
169
|
+
marginBottom: `${32 / 14}em`,
|
|
170
|
+
},
|
|
171
|
+
'p + pre': {
|
|
172
|
+
marginTop: `${-4 / 14}em`,
|
|
173
|
+
},
|
|
174
|
+
'pre + pre': {
|
|
175
|
+
marginTop: `${-16 / 14}em`,
|
|
176
|
+
},
|
|
177
|
+
'pre code': {
|
|
178
|
+
flex: 'none',
|
|
179
|
+
minWidth: '100%',
|
|
180
|
+
},
|
|
181
|
+
table: {
|
|
182
|
+
fontSize: theme('fontSize.sm')[0],
|
|
183
|
+
lineHeight: theme('fontSize.sm')[1].lineHeight,
|
|
184
|
+
},
|
|
185
|
+
thead: {
|
|
186
|
+
color: theme('colors.slate.700'),
|
|
187
|
+
borderBottomColor: theme('colors.slate.200'),
|
|
188
|
+
},
|
|
189
|
+
'thead th': {
|
|
190
|
+
paddingTop: 0,
|
|
191
|
+
fontWeight: theme('fontWeight.semibold'),
|
|
192
|
+
},
|
|
193
|
+
'tbody tr': {
|
|
194
|
+
borderBottomColor: theme('colors.slate.100'),
|
|
195
|
+
},
|
|
196
|
+
'tbody tr:last-child': {
|
|
197
|
+
borderBottomWidth: '1px',
|
|
198
|
+
},
|
|
199
|
+
'tbody code': {
|
|
200
|
+
fontSize: theme('fontSize.xs')[0],
|
|
201
|
+
},
|
|
202
|
+
'figure figcaption': {
|
|
203
|
+
textAlign: 'center',
|
|
204
|
+
fontStyle: 'italic',
|
|
205
|
+
},
|
|
206
|
+
'figure > figcaption': {
|
|
207
|
+
marginTop: `${12 / 14}em`,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
dark: {
|
|
212
|
+
css: {
|
|
213
|
+
color: theme('colors.slate.400'),
|
|
214
|
+
'h1, h2, h3, h4, thead th': {
|
|
215
|
+
color: theme('colors.slate.200'),
|
|
216
|
+
},
|
|
217
|
+
'h1 small, h2 small, h3 small, h4 small': {
|
|
218
|
+
color: theme('colors.slate.400'),
|
|
219
|
+
},
|
|
220
|
+
kbd: {
|
|
221
|
+
background: theme('colors.slate.700'),
|
|
222
|
+
borderColor: theme('colors.slate.600'),
|
|
223
|
+
color: theme('colors.slate.200'),
|
|
224
|
+
},
|
|
225
|
+
code: {
|
|
226
|
+
color: theme('colors.slate.200'),
|
|
227
|
+
},
|
|
228
|
+
hr: {
|
|
229
|
+
borderColor: theme('colors.slate.200'),
|
|
230
|
+
opacity: '0.05',
|
|
231
|
+
},
|
|
232
|
+
pre: {
|
|
233
|
+
boxShadow: 'inset 0 0 0 1px rgb(255 255 255 / 0.1)',
|
|
234
|
+
},
|
|
235
|
+
a: {
|
|
236
|
+
color: theme('colors.white'),
|
|
237
|
+
borderBottomColor: theme('colors.primary-light'),
|
|
238
|
+
},
|
|
239
|
+
strong: {
|
|
240
|
+
color: theme('colors.slate.200'),
|
|
241
|
+
},
|
|
242
|
+
thead: {
|
|
243
|
+
color: theme('colors.slate.300'),
|
|
244
|
+
borderBottomColor: 'rgb(148 163 184 / 0.2)',
|
|
245
|
+
},
|
|
246
|
+
'tbody tr': {
|
|
247
|
+
borderBottomColor: 'rgb(148 163 184 / 0.1)',
|
|
248
|
+
},
|
|
249
|
+
blockQuote: {
|
|
250
|
+
color: theme('colors.white'),
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
}),
|
|
255
|
+
fontFamily: {
|
|
256
|
+
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
|
257
|
+
mono: ['Fira Code VF', ...defaultTheme.fontFamily.mono],
|
|
258
|
+
source: ['Source Sans Pro', ...defaultTheme.fontFamily.sans],
|
|
259
|
+
'ubuntu-mono': ['Ubuntu Mono', ...defaultTheme.fontFamily.mono],
|
|
260
|
+
},
|
|
261
|
+
spacing: {
|
|
262
|
+
18: '4.5rem',
|
|
263
|
+
full: '100%',
|
|
264
|
+
},
|
|
265
|
+
maxWidth: {
|
|
266
|
+
'8xl': '90rem',
|
|
267
|
+
},
|
|
268
|
+
keyframes: {
|
|
269
|
+
'flash-code': {
|
|
270
|
+
'0%': { backgroundColor: 'rgb(125 211 252 / 0.1)' },
|
|
271
|
+
'100%': { backgroundColor: 'transparent' },
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
animation: {
|
|
275
|
+
'flash-code': 'flash-code 1s forwards',
|
|
276
|
+
'flash-code-slow': 'flash-code 2s forwards',
|
|
277
|
+
},
|
|
278
|
+
backgroundImage: (theme) => ({
|
|
279
|
+
squiggle: `url("${svgToDataUri(
|
|
280
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 3" enable-background="new 0 0 6 3" width="6" height="3" fill="${theme(
|
|
281
|
+
'colors.yellow.400'
|
|
282
|
+
)}"><polygon points="5.5,0 2.5,3 1.1,3 4.1,0"/><polygon points="4,0 6,2 6,0.6 5.4,0"/><polygon points="0,2 1,3 2.4,3 0,0.6"/></svg>`
|
|
283
|
+
)}")`,
|
|
284
|
+
}),
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
plugins: [
|
|
288
|
+
require('@tailwindcss/line-clamp'),
|
|
289
|
+
require('@tailwindcss/typography'),
|
|
290
|
+
require('@tailwindcss/aspect-ratio'),
|
|
291
|
+
function ({ addVariant }) {
|
|
292
|
+
addVariant(
|
|
293
|
+
'supports-backdrop-blur',
|
|
294
|
+
'@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0))'
|
|
295
|
+
);
|
|
296
|
+
addVariant('supports-scrollbars', '@supports selector(::-webkit-scrollbar)');
|
|
297
|
+
addVariant('children', '& > *');
|
|
298
|
+
addVariant('scrollbar', '&::-webkit-scrollbar');
|
|
299
|
+
addVariant('scrollbar-track', '&::-webkit-scrollbar-track');
|
|
300
|
+
addVariant('scrollbar-thumb', '&::-webkit-scrollbar-thumb');
|
|
301
|
+
},
|
|
302
|
+
function ({ matchUtilities, theme }) {
|
|
303
|
+
matchUtilities(
|
|
304
|
+
{
|
|
305
|
+
'bg-grid': (value) => ({
|
|
306
|
+
backgroundImage: `url("${svgToDataUri(
|
|
307
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="${value}"><path d="M0 .5H31.5V32"/></svg>`
|
|
308
|
+
)}")`,
|
|
309
|
+
}),
|
|
310
|
+
},
|
|
311
|
+
{ values: flattenColorPalette(theme('backgroundColor')), type: 'color' }
|
|
312
|
+
);
|
|
313
|
+
|
|
314
|
+
matchUtilities(
|
|
315
|
+
{
|
|
316
|
+
highlight: (value) => ({ boxShadow: `inset 0 1px 0 0 ${value}` }),
|
|
317
|
+
},
|
|
318
|
+
{ values: flattenColorPalette(theme('backgroundColor')), type: 'color' }
|
|
319
|
+
);
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
safelist: ['ml-8', 'ml-12', 'ml-16'],
|
|
323
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "preserve",
|
|
16
|
+
"incremental": true,
|
|
17
|
+
"baseUrl": ".",
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": ["src/*"]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"next-env.d.ts",
|
|
24
|
+
"./src/index.d.ts",
|
|
25
|
+
"**/*.tsx",
|
|
26
|
+
"**/*.jsx",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
"next.config.js",
|
|
30
|
+
"prebuild/index.js",
|
|
31
|
+
"remark/withImportsInjected.js",
|
|
32
|
+
"rehype/withLinkRoles.js",
|
|
33
|
+
"tailwind.config.js"
|
|
34
|
+
],
|
|
35
|
+
"exclude": ["node_modules"]
|
|
36
|
+
}
|