@brillout/docpress 0.1.8 → 0.1.10

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 (140) hide show
  1. package/{src/css/Inter-Var.ttf → dist/Inter-Var-IOAEQULN.ttf} +0 -0
  2. package/{src/components/Sponsors/companyLogos/ccoli.svg → dist/ccoli-CHW3TQKS.svg} +0 -0
  3. package/{src/icons/changelog.svg → dist/changelog-IPI5F42D.svg} +0 -0
  4. package/{src/navigation/navigation-fullscreen/chevron.svg → dist/chevron-K3WPYLOP.svg} +0 -0
  5. package/{src/components/features/chevron.svg → dist/chevron-R2IYJD62.svg} +0 -0
  6. package/dist/chunk-3NFN2KUH.js +1 -0
  7. package/dist/chunk-3NFN2KUH.js.map +1 -0
  8. package/dist/chunk-G2KXEHNF.js +56 -0
  9. package/dist/chunk-G2KXEHNF.js.map +1 -0
  10. package/dist/{cli/chunk-KZROB63P.js → chunk-G6OTZHVA.js} +2 -1
  11. package/dist/chunk-G6OTZHVA.js.map +1 -0
  12. package/dist/chunk-JKLALMFU.js +103 -0
  13. package/dist/chunk-JKLALMFU.js.map +1 -0
  14. package/dist/chunk-OEVBWUR6.js +92 -0
  15. package/dist/chunk-OEVBWUR6.js.map +1 -0
  16. package/dist/chunk-TTLAZ2T2.js +8 -0
  17. package/dist/chunk-TTLAZ2T2.js.map +1 -0
  18. package/dist/chunk-UCY72YQS.js +178 -0
  19. package/dist/chunk-UCY72YQS.js.map +1 -0
  20. package/dist/cli/index.d.ts +1 -0
  21. package/dist/cli/index.js +4 -2
  22. package/dist/cli/index.js.map +1 -0
  23. package/{src/navigation/navigation-fullscreen/close.svg → dist/close-IQXTDOHV.svg} +0 -0
  24. package/{src/utils/Emoji/compass.svg → dist/compass-2RWQU3E4.svg} +0 -0
  25. package/{src/components/Sponsors/companyLogos/contra.svg → dist/contra-WLZBOPBV.svg} +0 -0
  26. package/dist/{cli/devServer.js → devServer-UEJORYCC.js} +3 -1
  27. package/dist/devServer-UEJORYCC.js.map +1 -0
  28. package/{src/icons/discord.svg → dist/discord-JD33TUSF.svg} +0 -0
  29. package/{src/utils/Emoji/engine.png → dist/engine-6Q6VSCVA.png} +0 -0
  30. package/{src/icons/github.svg → dist/github-P5ZSKN2N.svg} +0 -0
  31. package/{src/icons/heart.svg → dist/heart-OINVKOXO.svg} +0 -0
  32. package/dist/index.css +121 -0
  33. package/dist/index.css.map +1 -0
  34. package/dist/index.d.ts +135 -0
  35. package/dist/index.js +488 -0
  36. package/dist/index.js.map +1 -0
  37. package/{src/components/Sponsors/label.svg → dist/label-MP75CTIA.svg} +0 -0
  38. package/{src/utils/Emoji/mechanical-arm.svg → dist/mechanical-arm-TR7IQQMG.svg} +0 -0
  39. package/{src/components/Sponsors/medalBronze.svg → dist/medalBronze-CO4CTUR4.svg} +0 -0
  40. package/{src/components/Sponsors/medalGold.svg → dist/medalGold-UP6A73FL.svg} +0 -0
  41. package/{src/components/Sponsors/medalSilver.svg → dist/medalSilver-FAPGGOBN.svg} +0 -0
  42. package/{src/components/Sponsors/companyLogos/mfqs.svg → dist/mfqs-2EAEE7N6.svg} +0 -0
  43. package/{src/utils/Emoji/road-fork.svg → dist/road-fork-3WZLW3HB.svg} +0 -0
  44. package/{src/utils/Emoji/shield.svg → dist/shield-CU45RG5C.svg} +0 -0
  45. package/{src → dist/src}/components/features/FeatureList.css +2 -7
  46. package/dist/src/components/features/FeatureList.css.map +1 -0
  47. package/dist/src/components/features/FeatureList.d.ts +13 -0
  48. package/dist/src/components/features/FeatureList.js +8 -0
  49. package/dist/src/components/features/FeatureList.js.map +1 -0
  50. package/dist/src/components/features/initFeatureList.d.ts +3 -0
  51. package/dist/src/components/features/initFeatureList.js +60 -0
  52. package/dist/src/components/features/initFeatureList.js.map +1 -0
  53. package/dist/src/renderer/_default.page.client.css +272 -0
  54. package/dist/src/renderer/_default.page.client.css.map +1 -0
  55. package/dist/src/renderer/_default.page.client.d.ts +1 -0
  56. package/dist/src/renderer/_default.page.client.js +182 -0
  57. package/dist/src/renderer/_default.page.client.js.map +1 -0
  58. package/dist/src/renderer/_default.page.server.css +312 -0
  59. package/dist/src/renderer/_default.page.server.css.map +1 -0
  60. package/dist/src/renderer/_default.page.server.d.ts +22 -0
  61. package/dist/src/renderer/_default.page.server.js +602 -0
  62. package/dist/src/renderer/_default.page.server.js.map +1 -0
  63. package/{src/icons/twitter.svg → dist/twitter-I7DXDN3J.svg} +0 -0
  64. package/{src/utils/Emoji/typescript.svg → dist/typescript-ALIPKLRM.svg} +0 -0
  65. package/package.json +25 -17
  66. package/vite.config.ts +10 -4
  67. package/cli.mjs +0 -2
  68. package/dist/cli/configFile.js +0 -6
  69. package/src/MobileHeader.tsx +0 -68
  70. package/src/PageLayout.css +0 -41
  71. package/src/PageLayout.tsx +0 -37
  72. package/src/algolia/DocSearch.css +0 -29
  73. package/src/algolia/DocSearch.ts +0 -37
  74. package/src/autoScrollNav.ts +0 -22
  75. package/src/components/CodeBlock.tsx +0 -22
  76. package/src/components/DocLink.tsx +0 -108
  77. package/src/components/EditPageNote.tsx +0 -18
  78. package/src/components/HorizontalLine.tsx +0 -20
  79. package/src/components/ImportMeta.tsx +0 -11
  80. package/src/components/Info.tsx +0 -12
  81. package/src/components/Link.tsx +0 -18
  82. package/src/components/Note.tsx +0 -31
  83. package/src/components/P.css +0 -8
  84. package/src/components/P.tsx +0 -8
  85. package/src/components/ReadingRecommendation.tsx +0 -53
  86. package/src/components/RepoLink.tsx +0 -24
  87. package/src/components/Sponsors/companyLogos/ccoli-logo.svg +0 -1
  88. package/src/components/Sponsors/companyLogos/ccoli-text.svg +0 -1
  89. package/src/components/Sponsors/label.draft.svg +0 -108
  90. package/src/components/Sponsors.tsx +0 -243
  91. package/src/components/features/FeatureList.tsx +0 -114
  92. package/src/components/features/initFeatureList.ts +0 -66
  93. package/src/components/index.ts +0 -13
  94. package/src/config/Config.ts +0 -30
  95. package/src/config/getConfig.ts +0 -18
  96. package/src/config/resolveConfig/resolveHeading.ts +0 -0
  97. package/src/config/resolvePageContext.ts +0 -157
  98. package/src/css/button.css +0 -7
  99. package/src/css/code/block.css +0 -36
  100. package/src/css/code/inline.css +0 -27
  101. package/src/css/code.css +0 -20
  102. package/src/css/colorize-on-hover.css +0 -29
  103. package/src/css/font.css +0 -19
  104. package/src/css/heading.css +0 -25
  105. package/src/css/index.css +0 -10
  106. package/src/css/link.css +0 -17
  107. package/src/css/note.css +0 -26
  108. package/src/css/reset.css +0 -12
  109. package/src/css/table.css +0 -14
  110. package/src/css/tooltip.css +0 -11
  111. package/src/headings.ts +0 -201
  112. package/src/index.ts +0 -3
  113. package/src/installSectionUrlHashs.ts +0 -50
  114. package/src/navigation/Navigation-highlight.css +0 -41
  115. package/src/navigation/Navigation-items.css +0 -122
  116. package/src/navigation/Navigation-layout.css +0 -118
  117. package/src/navigation/Navigation.client.old.ts +0 -303
  118. package/src/navigation/Navigation.client.ts +0 -19
  119. package/src/navigation/Navigation.css +0 -12
  120. package/src/navigation/Navigation.tsx +0 -229
  121. package/src/navigation/NavigationHeader.tsx +0 -97
  122. package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.css +0 -32
  123. package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx +0 -44
  124. package/src/navigation/navigation-fullscreen/initNavigationFullscreen.ts +0 -115
  125. package/src/parseEmojis.ts +0 -33
  126. package/src/renderer/_default.page.client.ts +0 -7
  127. package/src/renderer/_default.page.server.tsx +0 -69
  128. package/src/renderer/usePageContext.tsx +0 -25
  129. package/src/types.ts +0 -2
  130. package/src/utils/Emoji/Emoji.ts +0 -216
  131. package/src/utils/Emoji/assets.ts +0 -9
  132. package/src/utils/Emoji/index.ts +0 -1
  133. package/src/utils/Emoji/mountain.svg +0 -1
  134. package/src/utils/assert.ts +0 -39
  135. package/src/utils/determineSectionUrlHash.ts +0 -35
  136. package/src/utils/filter.ts +0 -12
  137. package/src/utils/index.ts +0 -6
  138. package/src/utils/isBrowser.ts +0 -5
  139. package/src/utils/jsxToTextContent.ts +0 -11
  140. package/src/utils/objectAssign.ts +0 -9
@@ -1,66 +0,0 @@
1
- import { assert } from '../../utils'
2
-
3
- addTwitterWidgets()
4
- addFeatureClickHandlers()
5
- window.__docpress_hydrationFinished = true
6
-
7
- function addTwitterWidgets() {
8
- loadScript('https://platform.twitter.com/widgets.js')
9
- }
10
-
11
- function addFeatureClickHandlers() {
12
- const featureEls: HTMLElement[] = Array.from(
13
- document.getElementById('features')!.querySelectorAll('.feature.has-learn-more')
14
- )
15
- featureEls.forEach((featureEl) => {
16
- featureEl.onclick = () => {
17
- expandLearnMore(featureEl)
18
- }
19
- })
20
- }
21
-
22
- function expandLearnMore(featureEl: HTMLElement) {
23
- const featureId = featureEl.id
24
- assert(featureId.startsWith('feature-'), { featureId })
25
- const featureName = featureId.slice('feature-'.length)
26
-
27
- const selectedClass = 'selected'
28
- const learnId = 'learn-more-' + featureName
29
- const learnEl = document.getElementById(learnId)
30
- assert(learnEl, { learnId })
31
-
32
- const isExpanded = featureEl.classList.contains(selectedClass)
33
-
34
- if (!isExpanded) {
35
- const rowEl = featureEl.parentNode as HTMLElement
36
- if (getComputedStyle(rowEl, 'display') === 'grid') {
37
- ;[
38
- ...(rowEl.querySelectorAll('.learn-more') as any as HTMLElement[]),
39
- ...(rowEl.querySelectorAll('.feature') as any as HTMLElement[])
40
- ].forEach((el) => {
41
- el.classList.remove(selectedClass)
42
- })
43
- }
44
- }
45
-
46
- ;[featureEl, learnEl].forEach((el) => {
47
- el.classList.toggle(selectedClass)
48
- })
49
- }
50
-
51
- function loadScript(scriptUrl: string): void {
52
- assert(scriptUrl.startsWith('https://'))
53
- const scriptEl = document.createElement('script')
54
- scriptEl.src = scriptUrl
55
- scriptEl.async = true
56
- scriptEl.setAttribute('charset', 'utf-8')
57
- document.getElementsByTagName('head')[0].appendChild(scriptEl)
58
- }
59
-
60
- function getComputedStyle(el: HTMLElement, styleProp: string) {
61
- return window.document.defaultView!.getComputedStyle(el).getPropertyValue(styleProp)
62
- }
63
-
64
- declare global {
65
- var __docpress_hydrationFinished: undefined | true
66
- }
@@ -1,13 +0,0 @@
1
- export * from '../utils/Emoji'
2
- export * from './Link'
3
- export * from './DocLink'
4
- export * from './RepoLink'
5
- export * from './P'
6
- export * from './Info'
7
- export * from './ReadingRecommendation'
8
- export * from './Note'
9
- export * from './ImportMeta'
10
- export * from './features/FeatureList'
11
- export * from './HorizontalLine'
12
- export * from './Sponsors'
13
- export * from './CodeBlock'
@@ -1,30 +0,0 @@
1
- export type { Config }
2
-
3
- import type { HeadingDefinition, HeadingWithoutLink } from '../headings'
4
-
5
- type Config = {
6
- projectInfo: {
7
- githubRepository: string
8
- githubIssues: string
9
- projectName: string
10
- projectNameJsx?: JSX.Element
11
- projectVersion: string
12
- discordInvite: string
13
- twitterProfile: string
14
- }
15
- faviconUrl: string
16
- algolia: null | {
17
- appId: string
18
- apiKey: string
19
- indexName: string
20
- }
21
- headings: HeadingDefinition[]
22
- headingsWithoutLink: HeadingWithoutLink[]
23
- navHeaderMobile: React.ReactNode
24
- navHeader: React.ReactNode
25
- titleNormalCase: boolean
26
- tagline: string
27
- websiteUrl: string
28
- bannerUrl?: string
29
- twitterHandle: string
30
- }
@@ -1,18 +0,0 @@
1
- export { getConfig }
2
- import { assert, assertUsage } from '../utils'
3
- import { Config } from './Config'
4
-
5
- function getConfig(): Config {
6
- // We use `@ts-ignore` because the DocPress user most likely didn't add `vite/client` in his `tsconfig.json`.
7
- // @ts-ignore
8
- const globResult = import.meta.glob('/**/docpress.config.*([a-zA-Z0-9])', { eager: true })
9
- const files = Object.keys(globResult)
10
- assertUsage(files.length >= 1, 'No DocPress config file found `docpress.config.(js|ts|tsx|...)`')
11
- assertUsage(
12
- files.length === 1,
13
- `Found multiple \`docpress.config.js\` files: ${files.map((f) => `\`${f}\``).join(', ')}. Define only one instead.`
14
- )
15
- const config = (Object.values(globResult)[0] as any).default as Config
16
- assert(config)
17
- return config
18
- }
File without changes
@@ -1,157 +0,0 @@
1
- import { assert, jsxToTextContent, objectAssign } from '../utils'
2
- import { getHeadings, HeadingWithoutLink, parseTitle } from '../headings'
3
- import type { Heading } from '../headings'
4
- import type { PageContextBuiltIn } from 'vite-plugin-ssr'
5
- import type { MarkdownHeading } from '../../vite.config/markdownHeadings'
6
- import type { Config } from './Config'
7
- import { getConfig } from './getConfig'
8
-
9
- export { resolvePageContext }
10
- export type { PageContextOriginal }
11
- export type { PageContextResolved }
12
- export type { Heading }
13
-
14
- type ReactComponent = () => JSX.Element
15
- type Exports = {
16
- headings?: MarkdownHeading[]
17
- }
18
- type PageContextOriginal = PageContextBuiltIn & {
19
- Page: ReactComponent
20
- exports: Exports
21
- }
22
- type PageContextResolved = ReturnType<typeof resolvePageContext>
23
-
24
- function resolvePageContext(pageContext: PageContextOriginal) {
25
- const config = getConfig()
26
- const { headings, headingsWithoutLink } = getHeadings(config)
27
- const activeHeading = findActiveHeading(headings, headingsWithoutLink, pageContext)
28
- const headingsWithSubHeadings = getHeadingsWithSubHeadings(headings, pageContext, activeHeading)
29
- const { title, isLandingPage, pageTitle, isDetachedPage } = getMetaData(
30
- headingsWithoutLink,
31
- activeHeading,
32
- pageContext,
33
- config
34
- )
35
- const { faviconUrl, algolia, tagline, twitterHandle, bannerUrl, websiteUrl } = config
36
- const pageContextResolved = {}
37
- objectAssign(pageContextResolved, {
38
- ...pageContext,
39
- meta: {
40
- title,
41
- faviconUrl,
42
- twitterHandle,
43
- bannerUrl,
44
- websiteUrl,
45
- tagline,
46
- algolia
47
- },
48
- headings,
49
- headingsWithSubHeadings,
50
- isLandingPage,
51
- isDetachedPage,
52
- pageTitle,
53
- config
54
- })
55
- return pageContextResolved
56
- }
57
-
58
- function getMetaData(
59
- headingsWithoutLink: HeadingWithoutLink[],
60
- activeHeading: Heading | null,
61
- pageContext: { urlOriginal: string; exports: Exports },
62
- config: Config
63
- ) {
64
- const url = pageContext.urlOriginal
65
-
66
- let title: string
67
- let pageTitle: string | JSX.Element | null
68
- let isDetachedPage: boolean
69
- if (activeHeading) {
70
- title = activeHeading.titleDocument || jsxToTextContent(activeHeading.title)
71
- pageTitle = activeHeading.title
72
- isDetachedPage = false
73
- } else {
74
- pageTitle = headingsWithoutLink.find((h) => h.url === url)!.title
75
- title = jsxToTextContent(pageTitle)
76
- isDetachedPage = true
77
- }
78
-
79
- const isLandingPage = url === '/'
80
- if (!isLandingPage) {
81
- title += ' | ' + config.projectInfo.projectName
82
- }
83
-
84
- if (isLandingPage) {
85
- pageTitle = null
86
- }
87
-
88
- return { title, isLandingPage, pageTitle, isDetachedPage }
89
- }
90
-
91
- function findActiveHeading(
92
- headings: Heading[],
93
- headingsWithoutLink: HeadingWithoutLink[],
94
- pageContext: { urlOriginal: string; exports: Exports }
95
- ): Heading | null {
96
- let activeHeading: Heading | null = null
97
- assert(pageContext.urlOriginal)
98
- const pageUrl = pageContext.urlOriginal
99
- headings.forEach((heading) => {
100
- if (heading.url === pageUrl) {
101
- activeHeading = heading
102
- assert(heading.level === 2, { pageUrl, heading })
103
- }
104
- })
105
- const debugInfo = {
106
- msg: 'Heading not found for url: ' + pageUrl,
107
- urls: headings.map((h) => h.url),
108
- url: pageUrl
109
- }
110
- assert(activeHeading || headingsWithoutLink.find(({ url }) => pageUrl === url), debugInfo)
111
- return activeHeading
112
- }
113
-
114
- function getHeadingsWithSubHeadings(
115
- headings: Heading[],
116
- pageContext: { exports: Exports; urlOriginal: string },
117
- activeHeading: Heading | null
118
- ): Heading[] {
119
- const headingsWithSubHeadings = headings.slice()
120
- if (activeHeading === null) return headingsWithSubHeadings
121
- const activeHeadingIdx = headingsWithSubHeadings.indexOf(activeHeading)
122
- assert(activeHeadingIdx >= 0)
123
- const pageHeadings = pageContext.exports.headings || []
124
- pageHeadings.forEach((pageHeading, i) => {
125
- const title = parseTitle(pageHeading.title)
126
- const url = '#' + pageHeading.id
127
- assert(
128
- pageHeading.headingLevel !== 3,
129
- 'Wrong page heading level `' +
130
- pageHeading.headingLevel +
131
- '` (it should be `<h2>`) for sub-heading `' +
132
- pageHeading.title +
133
- '` of page `' +
134
- pageContext.urlOriginal +
135
- '`.'
136
- )
137
- if (pageHeading.headingLevel === 2) {
138
- const heading: Heading = {
139
- url,
140
- title,
141
- parentHeadings: [activeHeading, ...activeHeading.parentHeadings],
142
- titleInNav: title,
143
- level: 3
144
- }
145
- headingsWithSubHeadings.splice(activeHeadingIdx + 1 + i, 0, heading)
146
- }
147
- })
148
-
149
- if (activeHeading?.sectionTitles) {
150
- activeHeading.sectionTitles.forEach((sectionTitle) => {
151
- const pageHeadingTitles = pageHeadings.map((h) => h.title)
152
- assert(pageHeadingTitles.includes(sectionTitle), { pageHeadingTitles, sectionTitle })
153
- })
154
- }
155
-
156
- return headingsWithSubHeadings
157
- }
@@ -1,7 +0,0 @@
1
- button,
2
- a.button {
3
- background-color: #fafafa;
4
- border: 1px solid #aaa;
5
- border-radius: 5px;
6
- cursor: pointer;
7
- }
@@ -1,36 +0,0 @@
1
- pre > code {
2
- padding: 16px !important;
3
- }
4
- @media screen and (max-width: 900px) {
5
- pre > code {
6
- font-size: 0.7em;
7
- }
8
- }
9
- pre {
10
- display: grid;
11
- }
12
- pre > code {
13
- padding-right: 0px !important;
14
- overflow-x: auto;
15
- }
16
-
17
- @media screen and (max-width: 1139px) {
18
- pre > code {
19
- font-size: 0.95em;
20
- }
21
- }
22
- @media screen and (max-width: 1040px) {
23
- pre > code {
24
- font-size: 0.8em;
25
- }
26
- }
27
- @media screen and (max-width: 940px) {
28
- pre > code {
29
- font-size: 0.7em;
30
- }
31
- }
32
-
33
- pre > code {
34
- display: reset;
35
- word-break: reset;
36
- }
@@ -1,27 +0,0 @@
1
- code {
2
- padding: 2px 5px;
3
- }
4
-
5
- /*
6
- * Line breaks in `<code>`:
7
- * - Avoid them on desktop
8
- * - Allow them on mobile
9
- * - Allo them for `<code long>`
10
- */
11
- code {
12
- display: inline-block;
13
- }
14
- @media screen and (max-width: 500px) {
15
- code {
16
- word-break: break-word;
17
- display: inline;
18
- }
19
- }
20
- .inline-code-break code {
21
- display: inline;
22
- word-break: break-word;
23
- }
24
- code.long {
25
- word-break: break-word;
26
- display: inline;
27
- }
package/src/css/code.css DELETED
@@ -1,20 +0,0 @@
1
- @import './code/inline.css';
2
- @import './code/block.css';
3
-
4
- code {
5
- /*
6
- background-color: #f4f4f4;
7
- 0.043137255 = 1 - (#f4 / #ff)
8
- */
9
- background-color: rgba(0, 0, 0, 0.043137255);
10
- border-radius: 4px;
11
- }
12
-
13
- /* Inline */
14
- code {
15
- font-size: 1.1em;
16
- }
17
- /* Block */
18
- pre > code {
19
- font-size: 1em;
20
- }
@@ -1,29 +0,0 @@
1
- .colorize-on-hover,
2
- .colorize-on-hover [class^='decolorize-'],
3
- .colorize-on-hover [class*=' decolorize-'] {
4
- transition: filter 0.3s ease-in-out;
5
- }
6
- .colorize-on-hover:hover,
7
- .colorize-on-hover:hover [class^='decolorize-'],
8
- .colorize-on-hover:hover [class*=' decolorize-'] {
9
- filter: grayscale(0) opacity(1) !important;
10
- }
11
-
12
- .decolorize-7 {
13
- filter: grayscale(1) opacity(0.7);
14
- }
15
- .decolorize-6 {
16
- filter: grayscale(1) opacity(0.6);
17
- }
18
- .decolorize-5 {
19
- filter: grayscale(1) opacity(0.5);
20
- }
21
- .decolorize-4 {
22
- filter: grayscale(1) opacity(0.4);
23
- }
24
-
25
- /*
26
- * Twitter opacity(0.7): #ababab > #868686
27
- * == Following computation does NOT work ==
28
- * Discord opacity(0.7): #6c6c6c > (0.7 * (#fff - #ababab) = #868686 = x * (#fff - #6c6c6c) <=> x = 0.7 * ((#fff - #ababab) / (#fff - #6c6c6c)) = 0.7 * ((255 - 171) / (255 - 108)) = 0.4)
29
- */
package/src/css/font.css DELETED
@@ -1,19 +0,0 @@
1
- body {
2
- font-family: 'Inter';
3
- }
4
- button {
5
- font-family: inherit;
6
- }
7
- body {
8
- --color-text: #323d48;
9
- color: var(--color-text);
10
- line-height: 1.5;
11
- }
12
-
13
- @font-face {
14
- font-family: 'Inter';
15
- font-weight: 100 900;
16
- font-stretch: 75% 125%;
17
- font-style: oblique 0deg 12deg;
18
- src: url('./Inter-Var.ttf') format('truetype-variations');
19
- }
@@ -1,25 +0,0 @@
1
- .doc-page h2 {
2
- margin-top: 50px;
3
- margin-bottom: 16px;
4
- }
5
- .doc-page h2[id] {
6
- cursor: pointer;
7
- position: relative;
8
- padding-left: 20px;
9
- margin-left: -20px;
10
- }
11
- .doc-page h2[id]:hover::before {
12
- content: '#';
13
- position: absolute;
14
- left: calc(-1 * (0.75em - 20px));
15
- color: #aaa;
16
- }
17
-
18
- .doc-page h1 + h2 {
19
- margin-top: 0;
20
- }
21
-
22
- .doc-page h4 {
23
- margin-top: 32px;
24
- margin-bottom: 16px;
25
- }
package/src/css/index.css DELETED
@@ -1,10 +0,0 @@
1
- @import './reset.css';
2
- @import './colorize-on-hover.css';
3
- @import './heading.css';
4
- @import './button.css';
5
- @import './link.css';
6
- @import './font.css';
7
- @import './code.css';
8
- @import './note.css';
9
- @import './table.css';
10
- @import './tooltip.css';
package/src/css/link.css DELETED
@@ -1,17 +0,0 @@
1
- /*
2
- :root {
3
- --link-color: #4747ff;
4
- }
5
- */
6
-
7
- a {
8
- /*
9
- color: inherit;
10
- color: var(--link-color);
11
- */
12
- color: #4747ff;
13
- text-decoration: none;
14
- }
15
- a > button {
16
- color: var(--color-text);
17
- }
package/src/css/note.css DELETED
@@ -1,26 +0,0 @@
1
- blockquote {
2
- --color: 0, 0, 0;
3
- --color-strengh-bg: 0.7;
4
- --color-strengh-border: 1.5;
5
- border-left: 8px solid rgba(var(--color), calc(0.06 * var(--color-strengh-border)));
6
- background-color: rgba(var(--color), calc(0.03 * var(--color-strengh-bg)));
7
- margin-left: 0;
8
- padding: 4px 16px;
9
- }
10
- blockquote.error {
11
- --color-strengh-bg: 1.7;
12
- --color-strengh-border: 6;
13
- --color: 190, 25, 49;
14
- }
15
- blockquote.warning {
16
- --color-strengh-bg: 4;
17
- --color-strengh-border: 8;
18
- --color: 255, 204, 50;
19
- }
20
- blockquote > p:first-child::before,
21
- /* blockquote > p:first-of-type::before, */
22
- blockquote > div.paragraph:first-child::before {
23
- font-family: emoji;
24
- content: 'ℹ️';
25
- margin-right: 4px;
26
- }
package/src/css/reset.css DELETED
@@ -1,12 +0,0 @@
1
- * {
2
- box-sizing: border-box;
3
- }
4
- body {
5
- margin: 0;
6
- }
7
-
8
- /* Avoid tweet embeds to overflow the body width.
9
- * Settings `overflow: hidden` to a container doesn't work (This is a CSS bug?) */
10
- iframe {
11
- max-width: 100%;
12
- }
package/src/css/table.css DELETED
@@ -1,14 +0,0 @@
1
- table th {
2
- background-color: #f7f7f7;
3
- }
4
- table {
5
- border-collapse: collapse;
6
- }
7
- table td,
8
- table th {
9
- padding: 8px;
10
- border: 1px solid #ccc;
11
- }
12
- table th {
13
- text-align: left;
14
- }
@@ -1,11 +0,0 @@
1
- @import 'balloon-css';
2
-
3
- :root {
4
- --balloon-color: #444;
5
- --balloon-move: 2px;
6
- --balloon-font-size: 14px;
7
- --balloon-border-radius: 5px;
8
- }
9
- [aria-label][data-balloon-pos]:after {
10
- font-family: 'Inter';
11
- }