@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,18 +0,0 @@
1
- import React from 'react'
2
- import { DocLink } from './DocLink'
3
- import { isRepoLink, RepoLink } from './RepoLink'
4
-
5
- export { Link }
6
-
7
- function Link(props: {
8
- href: string
9
- text?: string | JSX.Element
10
- noBreadcrumb?: true
11
- doNotInferSectionTitle?: true
12
- }) {
13
- if (isRepoLink(props.href)) {
14
- return <RepoLink path={props.href} text={props.text} />
15
- } else {
16
- return <DocLink {...props} />
17
- }
18
- }
@@ -1,31 +0,0 @@
1
- export { Note }
2
-
3
- import React from 'react'
4
- import { assert } from '../utils'
5
-
6
- function Note({
7
- type,
8
- icon,
9
- children
10
- }: {
11
- icon: JSX.Element | string
12
- type?: 'error' | 'warning'
13
- children: JSX.Element
14
- }) {
15
- assert(type === undefined || ['error', 'warning'].includes(type))
16
- if (!icon) {
17
- if (type === 'error') {
18
- icon = ':no_entry:'
19
- }
20
- if (type === 'warning') {
21
- icon = ':warning:'
22
- }
23
- }
24
- return (
25
- <blockquote className={type}>
26
- <div style={{ marginBottom: 20 }} />
27
- {icon} {children}
28
- <div style={{ marginTop: 20 }} />
29
- </blockquote>
30
- )
31
- }
@@ -1,8 +0,0 @@
1
- /* Copied from Chrome's user agent stylesheet */
2
- div.paragraph {
3
- display: block;
4
- margin-block-start: 1em;
5
- margin-block-end: 1em;
6
- margin-inline-start: 0px;
7
- margin-inline-end: 0px;
8
- }
@@ -1,8 +0,0 @@
1
- import React from 'react'
2
- import './P.css'
3
-
4
- export { P }
5
-
6
- function P(props: React.HTMLProps<HTMLDivElement>) {
7
- return <div {...props} className={'paragraph'} />
8
- }
@@ -1,53 +0,0 @@
1
- import React from 'react'
2
- import { Info } from './Info'
3
- import { Link } from './Link'
4
-
5
- export { ReadingRecommendation }
6
-
7
- function ReadingRecommendation({ tour, links }: { tour?: true; links: string[] }) {
8
- const multiple = links.length + (tour ? 1 : 0) > 1
9
- return (
10
- <Info>
11
- {multiple ? ' ' : ''}
12
- <b>Reading Recommendation{multiple ? '.' : ': '}</b>
13
- {(() => {
14
- if (!multiple) {
15
- const link = tour ? <TourLink /> : <Link href={links[0]} />
16
- return (
17
- <>
18
- {link}
19
- {'.'}
20
- </>
21
- )
22
- }
23
- return (
24
- <ul
25
- style={{
26
- marginLeft: 18,
27
- marginTop: 11
28
- }}
29
- >
30
- {tour && (
31
- <li>
32
- <TourLink />
33
- </li>
34
- )}
35
- {links.map((link, i) => (
36
- <li key={i}>
37
- <Link href={link} />
38
- </li>
39
- ))}
40
- </ul>
41
- )
42
- })()}
43
- </Info>
44
- )
45
- }
46
-
47
- function TourLink() {
48
- return (
49
- <>
50
- <Link href={'/react-tour'} noBreadcrumb={true} /> or <Link href={'/vue-tour'} noBreadcrumb={true} />
51
- </>
52
- )
53
- }
@@ -1,24 +0,0 @@
1
- import React from 'react'
2
- import { assert } from '../utils'
3
- import { usePageContext } from '../renderer/usePageContext'
4
-
5
- export { RepoLink }
6
- export { isRepoLink }
7
-
8
- function isRepoLink(href: string) {
9
- return ['/examples/', '/docs/', '/boilerplates/', '.github/'].some((start) => href.startsWith(start))
10
- }
11
-
12
- function RepoLink({ path, text, editMode }: { path: string; text?: string | JSX.Element; editMode?: true }) {
13
- const pageContext = usePageContext()
14
- assert(isRepoLink(path), { path })
15
- text = text || path
16
- if (!path.startsWith('/')) {
17
- path = '/' + path
18
- }
19
- const viewMode = (editMode && 'edit') || (path.endsWith('/') && 'tree') || 'blob'
20
- const { githubRepository } = pageContext.config.projectInfo
21
- assert(githubRepository.startsWith('https://github.com/'))
22
- const href = `${githubRepository}/${viewMode}/main${path}`
23
- return <a href={href}>{text}</a>
24
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 156.62 156.96"><path d="M156.62 78.65c0-12.01-8.81-22.1-20.27-24.12 6.68-9.55 5.74-22.49-2.84-31.08-8.27-8.57-21.41-9.52-31.02-2.88C100.6 8.95 90.44-.01 78.32-.01S56.22 8.8 54.2 20.26c-9.55-6.68-22.49-5.74-31.08 2.84-8.71 8.71-9.56 22.19-2.31 31.33C9.08 56.24 0 66.45 0 78.65s8.83 21.91 20.32 24.05c-6.73 9.56-5.81 22.54 2.79 31.15 8.6 8.3 21.58 9.18 31.14 3.19 2.16 11.3 12.16 19.93 24.05 19.93s22.2-9.17 24.15-20.78c9.39 6.86 22.74 5.98 31.39-2.67 8.51-8.51 9.51-21.3 3.03-30.83 11.21-2.23 19.74-12.19 19.74-24.02Z" style="fill: rgb(117, 50, 168);"></path><path class="logo_svg__cls-1" fill="white" d="M61.33 72.59c.2-2.08 2.06-3.61 4.15-3.61h3.12c1.67 0 2.7-1.88 1.75-3.25-2.01-2.91-5.38-4.8-9.2-4.74-6.07.09-10.84 5.29-10.84 11.36v12.27c0 6.06 4.74 11.25 10.79 11.36s11.21-4.85 11.21-11v-3.96c0-2.23-1.81-4.04-4.04-4.04h-2.96c-2.34 0-4.21-2.01-3.98-4.39ZM95.33 72.59c.2-2.08 2.06-3.61 4.15-3.61h3.12c1.67 0 2.7-1.88 1.75-3.25-2.01-2.91-5.38-4.8-9.2-4.74-6.07.09-10.84 5.29-10.84 11.36v12.27c0 6.06 4.74 11.25 10.79 11.36s11.21-4.85 11.21-11v-3.96c0-2.23-1.81-4.04-4.04-4.04h-2.96c-2.34 0-4.21-2.01-3.98-4.39Z"></path></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 366.81 127.09"><path fill="rgb(16, 24, 32)" d="M138 127.09a50.79 50.79 0 0 1-19.75-3.65 43 43 0 0 1-14.94-10.19 47 47 0 0 1-9.54-14.86 48.21 48.21 0 0 1 2.41-40.51 43.6 43.6 0 0 1 16.4-16.73q10.65-6.28 25.25-6.29t25.07 6.36a44.36 44.36 0 0 1 7 5.26 9 9 0 0 1-3.53 15.1l-3.51 1.07a10.47 10.47 0 0 1-10.37-2.41 19.48 19.48 0 0 0-4.23-3.13 21.52 21.52 0 0 0-10.64-2.67 22.56 22.56 0 0 0-11.94 3.29 22.79 22.79 0 0 0-8.5 9.27 29.85 29.85 0 0 0-3.09 13.9 28.79 28.79 0 0 0 3.17 13.73 24.89 24.89 0 0 0 8.5 9.43 21.35 21.35 0 0 0 11.86 3.46 22.14 22.14 0 0 0 7.81-1.38 22.61 22.61 0 0 0 6.61-3.78c.4-.32.77-.66 1.12-1a10.1 10.1 0 0 1 10-2.4l3.12 1a9.31 9.31 0 0 1 3.72 15.69l-.12.11a43.46 43.46 0 0 1-13.88 8.33 50.78 50.78 0 0 1-18 3ZM47.57 127.09a50.82 50.82 0 0 1-19.75-3.65 43 43 0 0 1-14.94-10.19 47.8 47.8 0 0 1-7.13-55.37 43.63 43.63 0 0 1 16.41-16.73q10.64-6.28 25.24-6.29t25.08 6.36a44.36 44.36 0 0 1 7 5.26A9 9 0 0 1 76 61.58l-3.5 1.07a10.49 10.49 0 0 1-10.4-2.41 19.42 19.42 0 0 0-4.22-3.13 21.59 21.59 0 0 0-10.65-2.67 22.59 22.59 0 0 0-11.94 3.29 22.86 22.86 0 0 0-8.5 9.27 29.85 29.85 0 0 0-3.09 13.9 28.8 28.8 0 0 0 3.18 13.73 24.89 24.89 0 0 0 8.5 9.43 21.34 21.34 0 0 0 11.85 3.46 22.19 22.19 0 0 0 7.82-1.38 22.61 22.61 0 0 0 6.61-3.78c.39-.32.76-.66 1.12-1a10.08 10.08 0 0 1 10-2.4l3.12 1a9.3 9.3 0 0 1 3.64 15.74l-.12.11a43.35 43.35 0 0 1-13.91 8.33 50.74 50.74 0 0 1-17.94 2.95ZM227.72 127.09a50.84 50.84 0 0 1-19.72-3.65 42.76 42.76 0 0 1-14.85-10.1 45.4 45.4 0 0 1-9.36-14.78 47.41 47.41 0 0 1-3.27-17.49 47.89 47.89 0 0 1 3.27-17.67 45.4 45.4 0 0 1 9.36-14.78A42.76 42.76 0 0 1 208 38.52a50.84 50.84 0 0 1 19.76-3.66 50.15 50.15 0 0 1 19.66 3.66A43.62 43.62 0 0 1 271.6 63.4a49.09 49.09 0 0 1 3.18 17.67 48.6 48.6 0 0 1-3.18 17.49 44.37 44.37 0 0 1-9.28 14.78 42.67 42.67 0 0 1-14.85 10.1 50.82 50.82 0 0 1-19.75 3.65Zm-23.53-46a29.53 29.53 0 0 0 3.09 13.74 23.7 23.7 0 0 0 8.41 9.35 22.08 22.08 0 0 0 12 3.37 21.34 21.34 0 0 0 11.85-3.46 25 25 0 0 0 8.5-9.43 28.8 28.8 0 0 0 3.18-13.73 28.93 28.93 0 0 0-3.18-13.65 24.18 24.18 0 0 0-8.5-9.43 22.55 22.55 0 0 0-23.88.08 24.27 24.27 0 0 0-8.41 9.43 29.51 29.51 0 0 0-3.06 13.7ZM294.62 0a18.06 18.06 0 0 1 18.06 18.06v78.77q0 6.21 2.06 8.36a7.48 7.48 0 0 0 5.67 2.15 24.64 24.64 0 0 0 5.67-.68h.06a5 5 0 0 1 6.1 4l1.39 7.87a5 5 0 0 1-3.3 5.56 49.5 49.5 0 0 1-6.83 1.8 59.09 59.09 0 0 1-11.16 1.2q-10.83 0-16.75-5.76t-5.92-16.45V5a5 5 0 0 1 4.95-5ZM343.79 11.42A11.42 11.42 0 0 1 355.21 0h.18a11.42 11.42 0 0 1 11.42 11.42 11.42 11.42 0 0 1-11.42 11.42h-.18a11.42 11.42 0 0 1-11.42-11.42Zm0 109V40.33a5 5 0 0 1 5-4.95 18.07 18.07 0 0 1 18.06 18.06v67a5 5 0 0 1-5 5h-13.1a5 5 0 0 1-4.96-5.02Z"></path></svg>
@@ -1,108 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- width="210mm"
13
- height="297mm"
14
- viewBox="0 0 210 297"
15
- version="1.1"
16
- id="svg8"
17
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
18
- sodipodi:docname="label.draft.svg">
19
- <defs
20
- id="defs2" />
21
- <sodipodi:namedview
22
- id="base"
23
- pagecolor="#ffffff"
24
- bordercolor="#666666"
25
- borderopacity="1.0"
26
- inkscape:pageopacity="0.0"
27
- inkscape:pageshadow="2"
28
- inkscape:zoom="0.9899495"
29
- inkscape:cx="461.6406"
30
- inkscape:cy="96.846632"
31
- inkscape:document-units="mm"
32
- inkscape:current-layer="layer1"
33
- showgrid="false"
34
- inkscape:window-width="1366"
35
- inkscape:window-height="736"
36
- inkscape:window-x="0"
37
- inkscape:window-y="16"
38
- inkscape:window-maximized="1" />
39
- <metadata
40
- id="metadata5">
41
- <rdf:RDF>
42
- <cc:Work
43
- rdf:about="">
44
- <dc:format>image/svg+xml</dc:format>
45
- <dc:type
46
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47
- <dc:title></dc:title>
48
- </cc:Work>
49
- </rdf:RDF>
50
- </metadata>
51
- <g
52
- inkscape:label="Layer 1"
53
- inkscape:groupmode="layer"
54
- id="layer1">
55
- <path
56
- style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
57
- d="m 51.40476,117.83928 13.530744,-23.435929 0.01098,0.0063 v 0"
58
- id="path815"
59
- inkscape:connector-curvature="0" />
60
- <path
61
- style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
62
- d="M 78.309972,119.26576 90.337099,96.280583 h 32.339611"
63
- id="path817"
64
- inkscape:connector-curvature="0"
65
- sodipodi:nodetypes="ccc" />
66
- <path
67
- style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
68
- d="M 71.815475,146.56548 H 85.96596 c 0.676332,-0.0209 3.30147,-0.005 3.934153,-0.83721 0.426501,-0.36462 1.272256,-1.92024 1.602106,-2.49156 l 4.177131,-7.23501 c 0,0 0.679705,-1.34341 1.817605,-2.11076 0.472523,-0.30451 3.063205,-0.4009 3.063205,-0.4009 h 13.21067"
69
- id="path819"
70
- inkscape:connector-curvature="0"
71
- sodipodi:nodetypes="cccccccc" />
72
- <path
73
- sodipodi:nodetypes="cccccccc"
74
- inkscape:connector-curvature="0"
75
- id="path859"
76
- d="m 145.52085,146.56548 h -14.15049 c -0.67633,-0.0209 -3.30147,-0.005 -3.93415,-0.83721 -0.4265,-0.36462 -1.27226,-1.92024 -1.60211,-2.49156 l -4.17713,-7.23501 c 0,0 -0.67971,-1.34341 -1.81761,-2.11076 -0.47252,-0.30451 -3.0632,-0.4009 -3.0632,-0.4009 h -13.21068"
77
- style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
78
- <path
79
- sodipodi:nodetypes="ccccccccc"
80
- inkscape:connector-curvature="0"
81
- id="path967"
82
- d="m 118.49554,172.57638 -47.05804,0 h 10.748698 c 0.676332,-0.0209 3.30147,-0.005 3.934153,-0.83721 0.426501,-0.36462 1.272256,-1.92024 1.602106,-2.49156 l 4.177131,-7.23501 c 0,0 0.679705,-1.34341 1.817605,-2.11076 0.472523,-0.30451 3.063205,-0.4009 3.063205,-0.4009 l 22.282102,0"
83
- style="fill:none;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
84
- <path
85
- style="fill:#f0f0f0;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
86
- d="M 365.78516 702.83789 C 365.78516 702.83789 355.99294 703.20261 354.20703 704.35352 C 349.90631 707.25374 347.33789 712.33203 347.33789 712.33203 L 331.54883 739.67578 C 330.30215 741.8351 327.10611 747.71566 325.49414 749.09375 C 323.1029 752.23911 313.18122 752.17882 310.625 752.25781 L 392.14258 752.25781 L 447.85742 752.25781 L 529.375 752.25781 C 526.81879 752.17882 516.89709 752.23911 514.50586 749.09375 C 512.89389 747.71566 509.69785 741.8351 508.45117 739.67578 L 492.66211 712.33203 C 492.66211 712.33203 490.09369 707.25374 485.79297 704.35352 C 484.00707 703.20261 474.2168 702.83789 474.2168 702.83789 L 450 702.83789 L 390 702.83789 L 365.78516 702.83789 z "
87
- transform="scale(0.26458333)"
88
- id="path977" />
89
- <path
90
- id="path982"
91
- d="m 96.780656,212.41754 c 0,0 -2.590858,0.0965 -3.06338,0.40101 -1.137899,0.76735 -1.81746,2.11098 -1.81746,2.11098 l -4.177523,7.2347 c -0.32985,0.57132 -1.175469,2.12722 -1.60197,2.49184 -0.632682,0.83221 -3.257793,0.81625 -3.934126,0.83715 h 21.568193 30.61622 21.56819 c -0.67633,-0.0209 -3.30145,-0.005 -3.93413,-0.83715 -0.4265,-0.36462 -1.27212,-1.92052 -1.60197,-2.49184 l -4.17752,-7.2347 c 0,0 -0.67956,-1.34363 -1.81746,-2.11098 -0.47252,-0.30452 -3.06286,-0.40101 -3.06286,-0.40101 h -6.40736 -31.75 z"
92
- style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
93
- inkscape:connector-curvature="0"
94
- sodipodi:nodetypes="ccccccccccccccccc" />
95
- <path
96
- sodipodi:nodetypes="ccccccccccccccccc"
97
- inkscape:connector-curvature="0"
98
- style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
99
- d="m 96.780656,244.16756 c 0,0 -2.590858,0.0965 -3.06338,0.40101 -1.137899,0.76735 -1.81746,2.11098 -1.81746,2.11098 l -4.177523,7.2347 c -0.32985,0.57132 -1.175469,2.12722 -1.60197,2.49184 -0.632682,0.83221 -3.257793,0.81625 -3.934126,0.83715 h 21.568193 25.32455 21.56819 c -0.67633,-0.0209 -3.30145,-0.005 -3.93413,-0.83715 -0.4265,-0.36462 -1.27212,-1.92052 -1.60197,-2.49184 l -4.17752,-7.2347 c 0,0 -0.67956,-1.34363 -1.81746,-2.11098 -0.47252,-0.30452 -3.06286,-0.40101 -3.06286,-0.40101 h -6.40736 -26.45833 z"
100
- id="path984" />
101
- <path
102
- id="path878"
103
- d="m 103.72033,265.33423 c 0,0 -2.25707,0.0965 -2.66872,0.40101 -0.9913,0.76735 -1.583315,2.11098 -1.583315,2.11098 l -3.639329,7.2347 c -0.287355,0.57132 -1.024032,2.12722 -1.395586,2.49184 -0.551173,0.83221 -2.838088,0.81625 -3.427289,0.83715 h 18.789539 22.06196 18.78954 c -0.5892,-0.0209 -2.87612,-0.005 -3.42729,-0.83715 -0.37156,-0.36462 -1.10823,-1.92052 -1.39559,-2.49184 l -3.63932,-7.2347 c 0,0 -0.59202,-1.34363 -1.58332,-2.11098 -0.41164,-0.30452 -2.66827,-0.40101 -2.66827,-0.40101 h -5.58189 -23.04968 z"
104
- style="fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:0.24695262px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
105
- inkscape:connector-curvature="0"
106
- sodipodi:nodetypes="ccccccccccccccccc" />
107
- </g>
108
- </svg>
@@ -1,243 +0,0 @@
1
- import React from 'react'
2
- import iconHeart from '../icons/heart.svg'
3
- import { usePageContext } from '../renderer/usePageContext'
4
- import { assert } from '../utils'
5
- import ccoliLogo from './Sponsors/companyLogos/ccoli.svg'
6
- import contraLogo from './Sponsors/companyLogos/contra.svg'
7
- import mfqsLogo from './Sponsors/companyLogos/mfqs.svg'
8
- import medalGold from './Sponsors/medalGold.svg'
9
- import medalSilver from './Sponsors/medalSilver.svg'
10
- import medalBronze from './Sponsors/medalBronze.svg'
11
- import labelBgImg from './Sponsors/label.svg'
12
- import { Emoji } from '../utils/Emoji'
13
-
14
- export { Sponsors }
15
-
16
- type Plan = 'FREE_SLOT' | 'bronze' | 'silver' | 'gold' | 'platinum'
17
-
18
- type SponsorCompany = {
19
- companyName: string
20
- companyLogo: string
21
- website: string
22
- plan: Plan
23
- }
24
- type SponsorIndividual = {
25
- username: string
26
- }
27
- type Sponsor = SponsorCompany | SponsorIndividual
28
-
29
- const sponsors: Sponsor[] = [
30
- {
31
- companyName: 'Contra',
32
- companyLogo: contraLogo,
33
- plan: 'gold',
34
- website: 'https://contra.com'
35
- },
36
- {
37
- companyName: 'ccoli',
38
- companyLogo: ccoliLogo,
39
- plan: 'silver',
40
- website: 'https://ccoli.co'
41
- },
42
- {
43
- companyName: 'My Favorite Quilt Store',
44
- companyLogo: mfqsLogo,
45
- plan: 'bronze',
46
- website: 'https://myfavoritequiltstore.com'
47
- },
48
- {
49
- username: 'spacedawwwg'
50
- },
51
- {
52
- username: 'codthing'
53
- },
54
- {
55
- username: 'Junaidhkn'
56
- },
57
- {
58
- username: 'zgfdev'
59
- }
60
- ]
61
-
62
- function Sponsors() {
63
- const pageContext = usePageContext()
64
- const { projectInfo } = pageContext.config
65
- return (
66
- <div style={{ textAlign: 'center', marginTop: 19 }}>
67
- <a
68
- className="button"
69
- href="https://github.com/sponsors/brillout"
70
- style={{
71
- color: 'inherit',
72
- display: 'inline-flex',
73
- alignItems: 'center',
74
- padding: '5px 10px',
75
- marginBottom: 10
76
- }}
77
- >
78
- <img src={iconHeart} height={22} /> <span style={{ marginLeft: 7, fontSize: '1.07em' }}>Sponsor</span>
79
- </a>
80
- <div></div>
81
- <div style={{ maxWidth: 400, display: 'inline-block', marginTop: 12, marginBottom: 12 }}>
82
- {projectInfo.projectNameJsx || projectInfo.projectName} is free and open source, made possible by wonderful
83
- sponsors.
84
- </div>
85
- <div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', alignItems: 'end' }}>
86
- {sponsors.map((sponsor, i) => (
87
- <SponsorDiv sponsor={sponsor} key={i} />
88
- ))}
89
- </div>
90
- </div>
91
- )
92
- }
93
-
94
- function SponsorDiv({ sponsor }: { sponsor: Sponsor }) {
95
- let imgSrc: string
96
- let imgAlt: string | undefined
97
- let width: number
98
- let height: number
99
- let website: string
100
- let padding: number
101
- let backgroundColor = '#f0f0f0'
102
- let label: null | JSX.Element = null
103
- if ('username' in sponsor) {
104
- website = `https://github.com/${sponsor.username}`
105
- imgSrc = `https://github.com/${sponsor.username}.png?size=30`
106
- width = 30
107
- height = 30
108
- padding = 0
109
- backgroundColor = 'none'
110
- } else {
111
- imgSrc = sponsor.companyLogo
112
- website = sponsor.website
113
- const size = getSize(sponsor.plan)
114
- width = size.width
115
- height = size.height
116
- padding = size.padding
117
- imgAlt = sponsor.companyName
118
- label = <Label sponsor={sponsor} />
119
- }
120
- const marginWidth = 5
121
- return (
122
- <a
123
- href={website}
124
- style={{
125
- margin: `10px ${marginWidth}px`
126
- }}
127
- >
128
- {label}
129
- <div
130
- style={{
131
- backgroundColor,
132
- borderRadius: 7,
133
- overflow: 'hidden',
134
- width,
135
- maxWidth: `calc(100vw - 2 * var(--main-view-padding) - 2 * ${marginWidth}px)`,
136
- height,
137
- display: 'flex',
138
- alignItems: 'center',
139
- flexDirection: 'column',
140
- justifyContent: 'center'
141
- }}
142
- >
143
- <img
144
- style={{ width: `calc(100% - ${padding}px)`, height: height - padding, zIndex: 2 }}
145
- src={imgSrc}
146
- alt={imgAlt}
147
- />
148
- </div>
149
- </a>
150
- )
151
- }
152
-
153
- function Label({ sponsor }: { sponsor: Sponsor }) {
154
- assert(!('username' in sponsor))
155
- const labelBg = getLabelBg(sponsor)
156
- const labelIcon = getLabelIcon(sponsor)
157
- const labelText = getLabelText(sponsor)
158
- return (
159
- <div
160
- style={{
161
- top: 0,
162
- display: 'flex',
163
- justifyContent: 'center',
164
- alignItems: 'center',
165
- position: 'relative',
166
- paddingBottom: 1
167
- }}
168
- >
169
- {labelBg}
170
- {labelIcon}
171
- {labelText}
172
- </div>
173
- )
174
- }
175
-
176
- function getLabelBg(sponsor: SponsorCompany) {
177
- const height = sponsor.plan === 'platinum' ? 32 : 24
178
- return <img src={labelBgImg} style={{ height, position: 'absolute', bottom: 0, zIndex: -1 }} />
179
- }
180
-
181
- function getLabelText(sponsor: SponsorCompany) {
182
- if (sponsor.plan === 'platinum') {
183
- return <></>
184
- }
185
- const letterSpacing = ['bronze', 'silver', 'gold'].includes(sponsor.plan) ? 1 : undefined
186
- return (
187
- <>
188
- {' '}
189
- <span
190
- style={{
191
- zIndex: 1,
192
- fontSize: '0.82em',
193
- position: 'relative',
194
- top: 0,
195
- fontWeight: 500,
196
- color: '#666',
197
- letterSpacing
198
- }}
199
- >
200
- {capitalizeFirstLetter(sponsor.plan)}
201
- </span>
202
- </>
203
- )
204
- }
205
-
206
- function getLabelIcon(sponsor: SponsorCompany) {
207
- let medalSrc: string
208
- if (sponsor.plan === 'platinum') {
209
- return <Emoji name="trophy" style={{ fontSize: '1.3em' }} />
210
- } else if (sponsor.plan === 'gold') {
211
- medalSrc = medalGold
212
- } else if (sponsor.plan === 'silver') {
213
- medalSrc = medalSilver
214
- } else if (sponsor.plan === 'bronze') {
215
- medalSrc = medalBronze
216
- } else {
217
- assert(false)
218
- }
219
- return <img src={medalSrc} style={{ height: 15, zIndex: 1, marginRight: 5 }} />
220
- }
221
-
222
- function getSize(plan: Plan) {
223
- if (plan === 'platinum') {
224
- assert(false)
225
- }
226
- if (plan === 'gold') {
227
- return { width: 400, height: 150, padding: 95 }
228
- }
229
- if (plan === 'silver') {
230
- return { width: 300, height: 100, padding: 45 }
231
- }
232
- if (plan === 'bronze') {
233
- return { width: 200, height: 70, padding: 30 }
234
- }
235
- if (plan === 'FREE_SLOT') {
236
- return { width: 150, height: 40, padding: 15 }
237
- }
238
- assert(false)
239
- }
240
-
241
- function capitalizeFirstLetter(word: string): string {
242
- return word[0].toUpperCase() + word.slice(1)
243
- }
@@ -1,114 +0,0 @@
1
- import React from 'react'
2
- import './FeatureList.css'
3
- import iconChevron from './chevron.svg'
4
-
5
- export { FeatureList }
6
-
7
- type FeatureProps = {
8
- title: React.ReactNode
9
- desc: React.ReactNode
10
- learnMore?: React.ReactNode
11
- isSecondaryFeature?: true
12
- }
13
-
14
- function FeatureList({ features }: { features: FeatureProps[] }) {
15
- const numberOfFeatures = features.length
16
- const numberOfRows = Math.ceil(numberOfFeatures / 2)
17
- return (
18
- <div id="features">
19
- {Array.from({ length: numberOfRows }, (_, i) => {
20
- const feature1Id = 2 * i + 0
21
- const feature2Id = 2 * i + 1
22
- const feature1 = features[feature1Id]
23
- const feature2 = features[feature2Id]
24
- const className = ['features-row', feature2 ? '' : 'single-column'].filter(Boolean).join(' ')
25
- return (
26
- <div className={className} key={i}>
27
- <Feature {...{ ...feature1, featureId: feature1Id }} />
28
- {feature2 && <Feature {...{ ...feature2, featureId: feature2Id }} />}
29
- </div>
30
- )
31
- })}
32
- </div>
33
- )
34
- }
35
-
36
- function Feature({ title, desc, learnMore, isSecondaryFeature, featureId }: FeatureProps & { featureId: number }) {
37
- const name = `feature-${featureId}`
38
- const rightSide = featureId % 2 === 1
39
- return (
40
- <>
41
- <FeatureHead name={name} hasLearnMore={!!learnMore} isSecondaryFeature={isSecondaryFeature}>
42
- {' '}
43
- <h2>{title}</h2>
44
- {desc}
45
- </FeatureHead>
46
- {!!learnMore && (
47
- <LearnMore name={name} rightSide={rightSide}>
48
- {learnMore}
49
- </LearnMore>
50
- )}
51
- </>
52
- )
53
- }
54
-
55
- function FeatureHead({
56
- children,
57
- name,
58
- hasLearnMore,
59
- isSecondaryFeature,
60
- className = ''
61
- }: {
62
- className?: string
63
- name?: string
64
- hasLearnMore?: boolean
65
- isSecondaryFeature?: true
66
- children: any
67
- }) {
68
- return (
69
- <summary
70
- className={[
71
- className,
72
- 'feature',
73
- 'colorize-on-hover',
74
- hasLearnMore && 'has-learn-more',
75
- isSecondaryFeature && 'secondary-feature'
76
- ]
77
- .filter(Boolean)
78
- .join(' ')}
79
- id={name && `feature-${name}`}
80
- style={{ cursor: (hasLearnMore && 'pointer') || undefined }}
81
- >
82
- {children}
83
- {hasLearnMore && (
84
- <div style={{ textAlign: 'center', marginTop: '1em' }}>
85
- <button
86
- type="button"
87
- style={{
88
- textAlign: 'center',
89
- padding: '0 7px',
90
- paddingTop: 3,
91
- paddingBottom: 1,
92
- display: 'inline-block',
93
- fontSize: '10px',
94
- textTransform: 'uppercase',
95
- letterSpacing: '1px',
96
- fontWeight: 600
97
- }}
98
- >
99
- <span className="decolorize-5">Learn more</span>
100
- <br />
101
- <img className="decolorize-4 chevron" src={iconChevron} height="7" style={{ marginTop: 2 }} />
102
- </button>
103
- </div>
104
- )}
105
- </summary>
106
- )
107
- }
108
- function LearnMore({ children, name, rightSide }: { name: string; children: any; rightSide: boolean }) {
109
- return (
110
- <aside className={'learn-more ' + (rightSide ? 'right-side' : '')} id={`learn-more-${name}`}>
111
- {children}
112
- </aside>
113
- )
114
- }