@brillout/docpress 0.1.20 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/bin.js +1 -1
  2. package/{src/css/Inter-Var.ttf → dist/Inter-Var-IOAEQULN.ttf} +0 -0
  3. package/{src/components/Sponsors/companyLogos/ccoli.svg → dist/ccoli-CHW3TQKS.svg} +0 -0
  4. package/{src/icons/changelog.svg → dist/changelog-IPI5F42D.svg} +0 -0
  5. package/{src/navigation/navigation-fullscreen/chevron.svg → dist/chevron-K3WPYLOP.svg} +0 -0
  6. package/{src/components/features/chevron.svg → dist/chevron-R2IYJD62.svg} +0 -0
  7. package/dist/chunk-7HKDCMSZ.js +154 -0
  8. package/dist/chunk-7HKDCMSZ.js.map +1 -0
  9. package/dist/chunk-C3OIVLKV.js +75 -0
  10. package/dist/chunk-C3OIVLKV.js.map +1 -0
  11. package/dist/chunk-G2A5MZJA.js +48 -0
  12. package/dist/chunk-G2A5MZJA.js.map +1 -0
  13. package/dist/chunk-H5CO4N2X.js +174 -0
  14. package/dist/chunk-H5CO4N2X.js.map +1 -0
  15. package/dist/chunk-TTLAZ2T2.js +8 -0
  16. package/dist/chunk-TTLAZ2T2.js.map +1 -0
  17. package/dist/{chunk-ZYYJWJMY.js → chunk-XUTBTIEE.js} +15 -42
  18. package/dist/chunk-XUTBTIEE.js.map +1 -0
  19. package/dist/cli/index.d.ts +1 -0
  20. package/dist/cli/index.js +35 -0
  21. package/dist/cli/index.js.map +1 -0
  22. package/{src/navigation/navigation-fullscreen/close.svg → dist/close-IQXTDOHV.svg} +0 -0
  23. package/{src/utils/Emoji/compass.svg → dist/compass-2RWQU3E4.svg} +0 -0
  24. package/{src → dist}/components/features/FeatureList.css +2 -7
  25. package/dist/components/features/FeatureList.css.map +1 -0
  26. package/dist/components/features/FeatureList.d.ts +13 -0
  27. package/dist/components/features/FeatureList.js +8 -0
  28. package/dist/components/features/FeatureList.js.map +1 -0
  29. package/dist/components/features/initFeatureList.d.ts +3 -0
  30. package/dist/components/features/initFeatureList.js +60 -0
  31. package/dist/components/features/initFeatureList.js.map +1 -0
  32. package/{src/components/Sponsors/companyLogos/contra.svg → dist/contra-WLZBOPBV.svg} +0 -0
  33. package/dist/{devServer-J2XJQJGT.js → devServer-534L4U45.js} +5 -2
  34. package/dist/{devServer-J2XJQJGT.js.map → devServer-534L4U45.js.map} +1 -1
  35. package/{src/icons/discord.svg → dist/discord-JD33TUSF.svg} +0 -0
  36. package/{src/utils/Emoji/engine.png → dist/engine-6Q6VSCVA.png} +0 -0
  37. package/{src/icons/github.svg → dist/github-P5ZSKN2N.svg} +0 -0
  38. package/{src/icons/heart.svg → dist/heart-OINVKOXO.svg} +0 -0
  39. package/dist/index.css +121 -0
  40. package/dist/index.css.map +1 -0
  41. package/dist/index.d.ts +136 -0
  42. package/dist/index.js +459 -26
  43. package/dist/index.js.map +1 -1
  44. package/{src/components/Sponsors/label.svg → dist/label-MP75CTIA.svg} +0 -0
  45. package/{src/utils/Emoji/mechanical-arm.svg → dist/mechanical-arm-TR7IQQMG.svg} +0 -0
  46. package/{src/components/Sponsors/medalBronze.svg → dist/medalBronze-CO4CTUR4.svg} +0 -0
  47. package/{src/components/Sponsors/medalGold.svg → dist/medalGold-UP6A73FL.svg} +0 -0
  48. package/{src/components/Sponsors/medalSilver.svg → dist/medalSilver-FAPGGOBN.svg} +0 -0
  49. package/{src/components/Sponsors/companyLogos/mfqs.svg → dist/mfqs-2EAEE7N6.svg} +0 -0
  50. package/dist/renderer/_default.page.client.css +264 -0
  51. package/dist/renderer/_default.page.client.css.map +1 -0
  52. package/dist/renderer/_default.page.client.d.ts +1 -0
  53. package/dist/renderer/_default.page.client.js +180 -0
  54. package/dist/renderer/_default.page.client.js.map +1 -0
  55. package/dist/renderer/_default.page.server.css +312 -0
  56. package/dist/renderer/_default.page.server.css.map +1 -0
  57. package/dist/renderer/_default.page.server.d.ts +22 -0
  58. package/dist/renderer/_default.page.server.js +591 -0
  59. package/dist/renderer/_default.page.server.js.map +1 -0
  60. package/{src/utils/Emoji/road-fork.svg → dist/road-fork-3WZLW3HB.svg} +0 -0
  61. package/{src/utils/Emoji/shield.svg → dist/shield-CU45RG5C.svg} +0 -0
  62. package/{src/icons/twitter.svg → dist/twitter-I7DXDN3J.svg} +0 -0
  63. package/{src/utils/Emoji/typescript.svg → dist/typescript-ALIPKLRM.svg} +0 -0
  64. package/package.json +12 -9
  65. package/dist/chunk-ZYYJWJMY.js.map +0 -1
  66. package/src/MobileHeader.tsx +0 -68
  67. package/src/PageLayout.css +0 -41
  68. package/src/PageLayout.tsx +0 -37
  69. package/src/algolia/DocSearch.css +0 -29
  70. package/src/algolia/DocSearch.ts +0 -37
  71. package/src/autoScrollNav.ts +0 -22
  72. package/src/cli/devServer.ts +0 -31
  73. package/src/cli/index.ts +0 -29
  74. package/src/components/CodeBlock.tsx +0 -22
  75. package/src/components/DocLink.tsx +0 -108
  76. package/src/components/EditPageNote.tsx +0 -18
  77. package/src/components/HorizontalLine.tsx +0 -20
  78. package/src/components/ImportMeta.tsx +0 -11
  79. package/src/components/Info.tsx +0 -12
  80. package/src/components/Link.tsx +0 -18
  81. package/src/components/Note.tsx +0 -31
  82. package/src/components/P.css +0 -8
  83. package/src/components/P.tsx +0 -8
  84. package/src/components/ReadingRecommendation.tsx +0 -53
  85. package/src/components/RepoLink.tsx +0 -24
  86. package/src/components/Sponsors/companyLogos/ccoli-logo.svg +0 -1
  87. package/src/components/Sponsors/companyLogos/ccoli-text.svg +0 -1
  88. package/src/components/Sponsors/label.draft.svg +0 -108
  89. package/src/components/Sponsors.tsx +0 -242
  90. package/src/components/features/FeatureList.tsx +0 -114
  91. package/src/components/features/initFeatureList.ts +0 -66
  92. package/src/components/index.ts +0 -13
  93. package/src/config/Config.ts +0 -30
  94. package/src/config/getConfig.ts +0 -18
  95. package/src/config/resolveConfig/resolveHeading.ts +0 -0
  96. package/src/config/resolvePageContext.ts +0 -157
  97. package/src/css/button.css +0 -7
  98. package/src/css/code/block.css +0 -36
  99. package/src/css/code/inline.css +0 -27
  100. package/src/css/code.css +0 -20
  101. package/src/css/colorize-on-hover.css +0 -29
  102. package/src/css/font.css +0 -19
  103. package/src/css/heading.css +0 -25
  104. package/src/css/index.css +0 -11
  105. package/src/css/link.css +0 -17
  106. package/src/css/note.css +0 -26
  107. package/src/css/reset.css +0 -12
  108. package/src/css/table.css +0 -14
  109. package/src/css/tooltip.css +0 -11
  110. package/src/headings.ts +0 -200
  111. package/src/index.ts +0 -3
  112. package/src/installSectionUrlHashs.ts +0 -50
  113. package/src/markdownHeadingsVitePlugin.ts +0 -128
  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 -228
  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 -4
  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/client.ts +0 -2
  136. package/src/utils/crawlAllFiles.ts +0 -17
  137. package/src/utils/determineSectionUrlHash.ts +0 -35
  138. package/src/utils/filesystemPathHandling.ts +0 -42
  139. package/src/utils/filter.ts +0 -12
  140. package/src/utils/isBrowser.ts +0 -5
  141. package/src/utils/jsxToTextContent.ts +0 -11
  142. package/src/utils/objectAssign.ts +0 -9
  143. package/src/utils/server.ts +0 -8
  144. package/src/vite.config.ts +0 -44
@@ -1,44 +0,0 @@
1
- export { NavigationFullscreenButton }
2
- export { NavigationFullscreenClose }
3
-
4
- import React from 'react'
5
- import './NavigationFullscreenButton.css'
6
- import closeIcon from './close.svg'
7
-
8
- function NavigationFullscreenButton() {
9
- return (
10
- <>
11
- <a id="navigation-fullscreen-button">
12
- <div
13
- style={{
14
- position: 'fixed',
15
- cursor: 'pointer',
16
- height: '100vh',
17
- width: 20,
18
- overflow: 'hidden'
19
- }}
20
- >
21
- <div></div>
22
- </div>
23
- <div
24
- style={{ position: 'fixed', height: '100vh', width: 20 }}
25
- aria-label="Press <Esc>"
26
- data-balloon-pos="right"
27
- ></div>
28
- </a>
29
- </>
30
- )
31
- }
32
-
33
- function NavigationFullscreenClose() {
34
- return (
35
- <a
36
- id="navigation-fullscreen-close"
37
- style={{ position: 'fixed', top: 11, right: 15, zIndex: 10 }}
38
- aria-label="Press <Esc>"
39
- data-balloon-pos="left"
40
- >
41
- <img src={closeIcon} height={50} width={50} style={{ display: 'block' }} />
42
- </a>
43
- )
44
- }
@@ -1,115 +0,0 @@
1
- export { initNavigationFullscreen }
2
-
3
- import { assert } from '../../utils/client'
4
-
5
- let scrollPositionBeforeToggle: number = 0
6
-
7
- function initNavigationFullscreen() {
8
- updateColumnWidth()
9
- window.addEventListener('resize', updateColumnWidth, { passive: true })
10
- document.getElementById('navigation-fullscreen-button')!.onclick = toggleNavExpend
11
- document.getElementById('navigation-fullscreen-close')!.onclick = toggleNavExpend
12
- document.addEventListener(
13
- // We don't use keydown to not interfere with user pressing `<Esc>` for closing the browser's `<Ctrl-F>` search diablog, see https://stackoverflow.com/questions/66595035/how-to-detect-escape-key-if-search-bar-of-browser-is-open
14
- 'keydown',
15
- (ev) => {
16
- if (ev.key === 'Escape') toggleNavExpend()
17
- },
18
- false
19
- )
20
- }
21
-
22
- function toggleNavExpend() {
23
- const navContainer = document.getElementById('navigation-container')!
24
- const scrollPos = navContainer.scrollTop
25
- document.documentElement.classList.toggle('navigation-fullscreen')
26
- if (scrollPositionBeforeToggle !== undefined) {
27
- navContainer.scrollTop = scrollPositionBeforeToggle
28
- }
29
- scrollPositionBeforeToggle = scrollPos
30
- }
31
-
32
- function updateColumnWidth() {
33
- const navMinWidth = 299
34
- const navH1Groups = Array.from(document.querySelectorAll('.nav-h1-group'))
35
- const numberOfColumnsMax = navH1Groups.length
36
-
37
- const widthAvailable = getViewportWidth()
38
- const numberOfColumns = Math.max(1, Math.min(numberOfColumnsMax, Math.floor(widthAvailable / navMinWidth)))
39
-
40
- let columns = navH1Groups.map((navH1Group) => {
41
- const column = [
42
- {
43
- element: navH1Group,
44
- elementHeight: navH1Group.children.length
45
- }
46
- ]
47
- return column
48
- })
49
-
50
- mergeColumns(columns, numberOfColumns)
51
-
52
- const navContent = document.getElementById('navigation-content')!
53
-
54
- Array.from(navContent.children).forEach((child) => {
55
- assert(child.className === 'nav-column')
56
- })
57
- navContent.innerHTML = ''
58
-
59
- columns.forEach((column) => {
60
- const columnEl = document.createElement('div')
61
- columnEl.className = 'nav-column'
62
- column.forEach(({ element }) => {
63
- columnEl.appendChild(element)
64
- })
65
- navContent.appendChild(columnEl)
66
- })
67
-
68
- const navItemMaxWidth = 350
69
- navContent.style.maxWidth = `${numberOfColumns * navItemMaxWidth}px`
70
- }
71
- function getViewportWidth(): number {
72
- // `window.innerWidth` inlcudes scrollbar width: https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
73
- return document.documentElement.clientWidth
74
- }
75
-
76
- function mergeColumns<T>(columns: { element: T; elementHeight: number }[][], maxNumberOfColumns: number) {
77
- assert(columns.length > 0)
78
- assert(maxNumberOfColumns > 0)
79
- if (columns.length <= maxNumberOfColumns) {
80
- return columns
81
- }
82
-
83
- let mergeCandidate = {
84
- i: -1,
85
- mergeHeight: Infinity
86
- }
87
- for (let i = 0; i <= columns.length - 2; i++) {
88
- const column1 = columns[i + 0]
89
- const column2 = columns[i + 1]
90
- const column1Height = sum(column1.map((c) => c.elementHeight))
91
- const column2Height = sum(column2.map((c) => c.elementHeight))
92
- const mergeHeight = column1Height + column2Height
93
- if (mergeCandidate.mergeHeight > mergeHeight) {
94
- mergeCandidate = {
95
- i,
96
- mergeHeight
97
- }
98
- }
99
- }
100
-
101
- {
102
- const { i } = mergeCandidate
103
- assert(-1 < i && i < columns.length - 1, { i, columnsLength: columns.length, maxNumberOfColumns })
104
- columns[i] = [...columns[i], ...columns[i + 1]]
105
- columns.splice(i + 1, 1)
106
- }
107
-
108
- mergeColumns(columns, maxNumberOfColumns)
109
- }
110
-
111
- function sum(arr: number[]): number {
112
- let total = 0
113
- arr.forEach((n) => (total += n))
114
- return total
115
- }
@@ -1,33 +0,0 @@
1
- export { parseEmojis }
2
-
3
- import twemoji from 'twemoji'
4
-
5
- const emojiList = {
6
- // https://emojipedia.org/no-entry/
7
- ':no_entry:': 0x26d4,
8
- // https://emojipedia.org/warning/
9
- ':warning:': 0x26a0,
10
- // https://emojipedia.org/trophy/
11
- ':trophy:': 0x1f3c6
12
- /*
13
- // https://emojipedia.org/red-heart/
14
- ':heart:': 0x2764,
15
- */
16
- }
17
-
18
- function parseEmojis(html: string) {
19
- Object.entries(emojiList).forEach(([shortcode, codepoint]) => {
20
- if (!html.includes(shortcode)) {
21
- return
22
- }
23
- const emojiStr = twemoji.convert.fromCodePoint(codepoint as any)
24
- let emojiImg: any = twemoji.parse(emojiStr, {
25
- folder: 'svg',
26
- ext: '.svg'
27
- })
28
- const style = 'height: 1.275em; width: 1.275em; vertical-align: -20%'
29
- emojiImg = emojiImg.replace('<img class="emoji" ', `<img style="${style}" `)
30
- html = html.split(shortcode).join(emojiImg)
31
- })
32
- return html
33
- }
@@ -1,4 +0,0 @@
1
- import '../css/index.css'
2
- import '../autoScrollNav'
3
- import '../installSectionUrlHashs'
4
- import '../navigation/Navigation.client'
@@ -1,69 +0,0 @@
1
- import ReactDOMServer from 'react-dom/server'
2
- import React from 'react'
3
- import { escapeInject, dangerouslySkipEscape } from 'vite-plugin-ssr'
4
- import { PageLayout } from '../PageLayout'
5
- import { resolvePageContext, PageContextOriginal } from '../config/resolvePageContext'
6
- import { getDocSearchJS, getDocSearchCSS } from '../algolia/DocSearch'
7
- import { parseEmojis } from '../parseEmojis'
8
- import { assert } from '../utils/server'
9
-
10
- export { render }
11
-
12
- async function render(pageContextOriginal: PageContextOriginal) {
13
- const { Page } = pageContextOriginal
14
- const pageContextResolved = resolvePageContext(pageContextOriginal)
15
-
16
- const page = (
17
- <PageLayout pageContext={pageContextResolved}>
18
- <Page />
19
- </PageLayout>
20
- )
21
-
22
- const descriptionTag = pageContextResolved.isLandingPage
23
- ? dangerouslySkipEscape(`<meta name="description" content="${pageContextResolved.meta.tagline}" />`)
24
- : ''
25
-
26
- const docSearchJS = getDocSearchJS(pageContextResolved)
27
- const docSearchCSS = getDocSearchCSS(pageContextResolved)
28
-
29
- let pageHtml = ReactDOMServer.renderToString(page)
30
- pageHtml = parseEmojis(pageHtml)
31
-
32
- return escapeInject`<!DOCTYPE html>
33
- <html>
34
- <head>
35
- <meta charset="UTF-8" />
36
- <link rel="icon" href="${pageContextResolved.meta.faviconUrl}" />
37
- <title>${pageContextResolved.meta.title}</title>
38
- ${descriptionTag}
39
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
40
- ${docSearchCSS}
41
- ${getOpenGraphTags(pageContextOriginal.urlPathname, pageContextResolved.meta)}
42
- </head>
43
- <body>
44
- <div id="page-view">${dangerouslySkipEscape(pageHtml)}</div>
45
- ${docSearchJS}
46
- </body>
47
- </html>`
48
- }
49
-
50
- function getOpenGraphTags(
51
- url: string,
52
- meta: { title: string; tagline: string; websiteUrl: string; twitterHandle: string; bannerUrl?: string }
53
- ) {
54
- const { title, tagline, websiteUrl, twitterHandle, bannerUrl } = meta
55
-
56
- assert(url.startsWith('/'))
57
- if (url !== '/' || !bannerUrl) return ''
58
-
59
- // See view-source:https://vitejs.dev/
60
- return escapeInject`
61
- <meta property="og:type" content="website">
62
- <meta property="og:title" content="${title}">
63
- <meta property="og:image" content="${bannerUrl}">
64
- <meta property="og:url" content="${websiteUrl}">
65
- <meta property="og:description" content="${tagline}">
66
- <meta name="twitter:card" content="summary_large_image">
67
- <meta name="twitter:site" content="${twitterHandle}">
68
- `
69
- }
@@ -1,25 +0,0 @@
1
- // `usePageContext` allows us to access `pageContext` in any React component.
2
- // More infos: https://vite-plugin-ssr.com/pageContext-anywhere
3
-
4
- import React, { useContext } from 'react'
5
- import type { PageContextResolved } from '../config/resolvePageContext'
6
-
7
- export { PageContextProvider }
8
- export { usePageContext }
9
-
10
- const Context = React.createContext<PageContextResolved>(undefined as any)
11
-
12
- function PageContextProvider({
13
- pageContext,
14
- children
15
- }: {
16
- pageContext: PageContextResolved
17
- children: React.ReactNode
18
- }) {
19
- return <Context.Provider value={pageContext}>{children}</Context.Provider>
20
- }
21
-
22
- function usePageContext(): PageContextResolved {
23
- const pageContext = useContext(Context)
24
- return pageContext
25
- }
package/src/types.ts DELETED
@@ -1,2 +0,0 @@
1
- export type { Config } from './config/Config'
2
- export type { HeadingDefinition, HeadingWithoutLink } from './headings'
@@ -1,216 +0,0 @@
1
- import React from 'react'
2
- import { assert } from '../assert'
3
-
4
- import { iconMechanicalArm, iconCompass, iconRoadFork, iconShield, iconTypescript, iconEngine } from './assets'
5
-
6
- export { Emoji }
7
- export type { EmojiName }
8
-
9
- type EmojiName =
10
- | 'warning'
11
- | 'typescript'
12
- | 'shield'
13
- | 'mechanical-arm'
14
- | 'mountain'
15
- | 'rocket'
16
- | 'wrench'
17
- | 'compass'
18
- | 'seedling'
19
- | 'books'
20
- | 'plug'
21
- | 'earth'
22
- | 'gear'
23
- | 'red-heart'
24
- | 'high-voltage'
25
- | 'gem-stone'
26
- | 'dizzy'
27
- | 'sparkles'
28
- | 'writing-hang'
29
- | 'road-fork'
30
- | 'engine'
31
- | 'red-circle'
32
- | 'sparkling-heart'
33
- | 'gift'
34
- | 'package'
35
- | 'info'
36
- | 'lab'
37
- | 'trophy'
38
-
39
- function Emoji({ name, style }: { name: EmojiName; style?: React.CSSProperties }): JSX.Element {
40
- const emoji =
41
- // ***
42
- // U+26A0
43
- // https://emojipedia.org/warning/
44
- // https://www.unicompat.com/26A0 => 94.1%
45
- // https://www.unicompat.com/26A0-FE0F => 92.4%
46
- // https://www.unicompat.com/2697 => 94.1%
47
- (name === 'warning' && Unicode(0x26a0, { fontFamily: 'emoji' })) ||
48
- // ***
49
- // U+2697
50
- // https://emojipedia.org/alembic/
51
- // https://www.unicompat.com/2697 => 94.1%
52
- (name === 'lab' && Unicode(0x2697)) ||
53
- // ***
54
- // U+2139
55
- // https://emojipedia.org/information/
56
- // https://www.unicompat.com/2139 => 94.8%
57
- // https://www.unicompat.com/2139-FE0F => 92.4%
58
- (name === 'info' && Unicode(0x2139, { fontFamily: 'emoji' })) ||
59
- // ***
60
- // U+1F4E6
61
- // https://emojipedia.org/package/
62
- // https://www.unicompat.com/1F4E6 => 94.1%
63
- (name === 'package' && Unicode(0x1f4e6)) ||
64
- // ***
65
- // U+1F381
66
- // https://emojipedia.org/wrapped-gift/
67
- // https://www.unicompat.com/1F381 => 94.1%
68
- (name === 'gift' && Unicode(0x1f381)) ||
69
- // ***
70
- // U+1F496
71
- // https://emojipedia.org/sparkling-heart/
72
- // https://www.unicompat.com/1F496 => 94.1%
73
- (name === 'sparkling-heart' && Unicode(0x1f496)) ||
74
- // ***
75
- // U+2B55
76
- // https://emojipedia.org/hollow-red-circle/
77
- // https://www.unicompat.com/2B55 => 94.1%
78
- (name === 'red-circle' && Unicode(0x2b55)) ||
79
- // ***
80
- (name === 'engine' && Img(iconEngine)) ||
81
- // ***
82
- // https://www.typescriptlang.org/branding/
83
- (name === 'typescript' && Img(iconTypescript)) ||
84
- // ***
85
- // U+FE0F
86
- // https://emojipedia.org/shield/
87
- // https://www.unicompat.com/FE0F => 46.5%
88
- // https://icon-sets.iconify.design/noto/shield/
89
- (name === 'shield' && Img(iconShield)) ||
90
- // ***
91
- // Custom
92
- (name === 'road-fork' && Img(iconRoadFork, '1.4em')) ||
93
- // ***
94
- // U+270D
95
- // https://emojipedia.org/writing-hand/
96
- // https://www.unicompat.com/270D => 93.8%
97
- (name === 'writing-hang' && Unicode(0x270d)) ||
98
- // ***
99
- // U+1F4AB
100
- // https://emojipedia.org/dizzy/
101
- // https://www.unicompat.com/1F4AB => 94.1%
102
- (name === 'dizzy' && Unicode(0x1f4ab)) ||
103
- // ***
104
- // U+1F9BE
105
- // https://iconify.design/icon-sets/noto/mechanical-arm.html
106
- // https://emojipedia.org/mechanical-arm/
107
- // https://www.unicompat.com/1f9be => 65.5%
108
- (name === 'mechanical-arm' && Img(iconMechanicalArm)) ||
109
- // ***
110
- // U+1F680
111
- // https://www.unicompat.com/1F680 => 94.1
112
- (name === 'rocket' && Unicode(0x1f680)) ||
113
- // ***
114
- // U+1F527
115
- // https://emojipedia.org/wrench/
116
- // https://www.unicompat.com/1F527 => 94.1%
117
- (name === 'wrench' && Unicode(0x1f527)) ||
118
- // ***
119
- // U+1F9ED
120
- // https://iconify.design/icon-sets/noto/compass.html
121
- // https://www.unicompat.com/1F9ED => 67.1%
122
- (name === 'compass' && Img(iconCompass, '1.4em')) ||
123
- // ***
124
- // U+1F331
125
- // https://www.unicompat.com/1F331 => 94.1%
126
- (name === 'seedling' && Unicode(0x1f331)) ||
127
- // ***
128
- // U+1F4DA
129
- // https://www.unicompat.com/1F4DA => 94.1%
130
- (name === 'books' && Unicode(0x1f4da)) ||
131
- // ***
132
- // U+1F50C
133
- // https://www.unicompat.com/1F50C => 94.1%
134
- (name === 'plug' && Unicode(0x1f50c)) ||
135
- // ***
136
- // U+1F30D
137
- // https://www.unicompat.com/1F30D => 88.8%
138
- (name === 'earth' && Unicode(0x1f30d)) ||
139
- // ***
140
- // U+2699
141
- // https://www.unicompat.com/2699 => 94.1%
142
- (name === 'gear' && Unicode(0x2699)) ||
143
- // ***
144
- // U+2764
145
- // https://emojipedia.org/red-heart/
146
- // https://www.unicompat.com/2764 => 94.4%
147
- // https://www.unicompat.com/2764-FE0F => 92.4%
148
- (name === 'red-heart' && Unicode(0x2764, { fontFamily: 'emoji' })) ||
149
- // U+26A1
150
- // https://www.unicompat.com/26A1 => 94.1%
151
- (name === 'high-voltage' && Unicode(0x26a1)) ||
152
- // U+2728
153
- // https://emojipedia.org/sparkles/
154
- // https://www.unicompat.com/2728 => 94.1%
155
- (name === 'sparkles' && Unicode(0x2728)) ||
156
- // ***
157
- // U+1F48E
158
- // https://emojipedia.org/gem-stone/
159
- // https://www.unicompat.com/1F48E => 94.1%
160
- (name === 'gem-stone' && Unicode(0x1f48e)) ||
161
- // ***
162
- // 0x1F3C6
163
- // https://emojipedia.org/trophy/
164
- // https://www.unicompat.com/1F3C6 => 94.1%
165
- (name === 'trophy' && Unicode(0x1f3c6)) ||
166
- false
167
- /* ======= Unused ========
168
- // ***
169
- // U+1FAA8
170
- // https://emojipedia.org/rock/
171
- // https://www.unicompat.com/1faa8 => 20.7%
172
- //
173
- // ***
174
- // U+26F0
175
- // https://emojipedia.org/mountain/
176
- // https://iconify.design/icon-sets/noto/mountain.html
177
- // https://www.unicompat.com/26F0 => 89.3%
178
- (name === 'mountain' && Img(iconMountain)) ||
179
- //
180
- // ***
181
- // U+2194
182
- // https://emojipedia.org/left-right-arrow/
183
- // https://www.unicompat.com/2194 => 95.0%
184
- // Couldn't manage to show colored version
185
- (name === 'left-right-arrow' && Unicode(0x2194)) ||
186
- (name === 'left-right-arrow' && Unicode(0x2194, { fontFamily: 'reset' })) ||
187
- (name === 'left-right-arrow' && Unicode(0xFE0F)) ||
188
- (name === 'left-right-arrow' && Unicode(0xFE0F, { fontFamily: 'reset' })) ||
189
- ======================== */
190
-
191
- assert(emoji, { name })
192
-
193
- return emoji
194
-
195
- function Unicode(codePoint: number, styleAddendum?: React.CSSProperties) {
196
- const text = String.fromCodePoint(codePoint)
197
- if (style || styleAddendum) {
198
- return React.createElement('span', { style: { ...style, ...styleAddendum } }, text)
199
- } else {
200
- return React.createElement(React.Fragment, null, text)
201
- }
202
- }
203
-
204
- function Img(imgSrc: string, width: string = '1.15em') {
205
- const props = {
206
- src: imgSrc,
207
- style: {
208
- verticalAlign: 'text-top',
209
- fontSize: '1em',
210
- width,
211
- ...style
212
- }
213
- }
214
- return React.createElement('img', props)
215
- }
216
- }
@@ -1,9 +0,0 @@
1
- import iconMechanicalArm from './mechanical-arm.svg'
2
- //import iconMountain from './mountain.svg'
3
- import iconCompass from './compass.svg'
4
- import iconRoadFork from './road-fork.svg'
5
- import iconShield from './shield.svg'
6
- import iconTypescript from './typescript.svg'
7
- import iconEngine from './engine.png'
8
-
9
- export { iconMechanicalArm, iconCompass, iconRoadFork, iconShield, iconTypescript, iconEngine }
@@ -1 +0,0 @@
1
- export * from './Emoji'
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 128 128"><linearGradient id="IconifyId-17a99f60578-807714-36" x1="43.401" x2="66.946" y1="35.388" y2="110.95" gradientUnits="userSpaceOnUse"><stop stop-color="#607D8B" offset="0"/><stop stop-color="#57727F" offset=".4"/><stop stop-color="#455A64" offset="1"/></linearGradient><path d="M119.04 73.55c-1.44-2.68-2.99-4.84-4.61-6.24v-.01c-.06-.06-.13-.1-.19-.16c-.13-.11-.26-.22-.39-.31c-.23-.17-.46-.33-.69-.47c-.44-.26-.87-.55-1.29-.85c-.12-.08-.24-.17-.35-.26c-7.1-5.26-12.5-15.94-16.52-22.86c-1.83-3.78-3.65-6.46-5.44-6.46c-.37 0-.81.19-1.29.48c-1.06.63-2.39 1.94-3.93 3.78c-5.27-3.29-5.44-20.97-10.08-20.97c-2.3 0-4.09-6.19-6.35-10.67c-.01-.01-.01-.02-.02-.03c-.17.21-.17.21 0 0c-.32-.63-.64-1.22-.98-1.76c-.67-1.08-1.39-1.93-2.18-2.39c-.39-.23-.8-.36-1.24-.37c-.82-.02-1.75.5-2.76 1.43c-.76.7-1.57 1.62-2.4 2.73c-.56.74-1.13 1.55-1.71 2.43c-.29.44-.58.89-.87 1.36c-.59.93-1.18 1.92-1.78 2.95c-5.95 10.28-12.1 24.38-13.87 26.26c-.51.54-1.02.95-1.55 1.27c-1.57.97-3.21 1.12-4.77 1.25c-.7.06-1.38.1-2.03.22c-1.03.18-2.02.58-2.94 1.18c-.46.3-.9.65-1.31 1.05c-.21.2-.41.41-.6.64c-.19.22-.38.46-.56.71c-.19.26-.38.53-.57.81c-.05.07-.1.15-.15.23c-.15.22-.3.44-.45.68l-.15.24c-.16.25-.33.52-.5.78l-.11.17c-.18.3-.37.6-.55.92c-.02.04-.04.07-.06.11c-.17.28-.34.57-.5.86c-4.43 7.69-9.74 19.58-14.49 31.05A62.077 62.077 0 0 0 4 107.28V116h120V93.87c0-7.07-1.6-14.1-4.96-20.32zm-31.23-8.47c-.1.17-.18.32-.28.48c.1-.16.18-.31.28-.48zm-.39 41.54c-.8.92-1.59 1.87-2.38 2.8c.8-.94 1.58-1.88 2.38-2.8c.38-.43.74-.86 1.1-1.28c-.35.42-.72.84-1.1 1.28zm.06-30.55zm5-31.33c-.09-.37-.18-.74-.28-1.1c.1.36.19.73.28 1.1l.12.51l-.12-.51zm6.58 43.57c.11-.53.17-1.02.19-1.49c-.02.47-.09.96-.19 1.49z" fill="url(#IconifyId-17a99f60578-807714-36)"/><path d="M91.45 101.77c-1.18 1.5-2.52 3.12-4.02 4.85c-.8.92-1.59 1.87-2.38 2.8c.79-.93 1.58-1.88 2.38-2.8c1.5-1.73 2.84-3.35 4.02-4.85z" fill="none"/><path d="M99.25 86.15c-.02-.44-.07-.85-.16-1.24c.09.39.15.8.16 1.24z" fill="none"/><path d="M98.19 82.86z" fill="none"/><path d="M99.06 88.31c.11-.53.17-1.02.19-1.49c-.02.47-.09.96-.19 1.49z" fill="none"/><path d="M97.85 91.87c.45-.99.79-1.9 1.01-2.74c-.23.83-.56 1.74-1.01 2.74z" fill="none"/><path d="M91.45 101.77c3.15-4.01 5.2-7.25 6.4-9.9c-1.21 2.65-3.25 5.89-6.4 9.9z" fill="none"/><linearGradient id="IconifyId-17a99f60578-807714-37" x1="27.284" x2="48.617" y1="52.926" y2="122.26" gradientTransform="matrix(-1 0 0 1 128 0)" gradientUnits="userSpaceOnUse"><stop stop-color="#78909C" offset="0"/><stop stop-color="#6C8490" offset=".427"/><stop stop-color="#546E7A" offset="1"/></linearGradient><path d="M79.6 116c1.79-2.21 3.6-4.41 5.45-6.58A306.38 306.38 0 0 0 79.6 116z" fill="url(#IconifyId-17a99f60578-807714-37)"/><linearGradient id="IconifyId-17a99f60578-807714-38" x1="52.004" x2="45.004" y1="58.942" y2="118.44" gradientTransform="matrix(-1 0 0 1 128 0)" gradientUnits="userSpaceOnUse"><stop stop-color="#546E7A" offset="0"/><stop stop-color="#4C636E" offset=".37"/><stop stop-color="#37474F" offset="1"/></linearGradient><path d="M79.6 116c1.79-2.21 3.6-4.41 5.45-6.58A306.38 306.38 0 0 0 79.6 116z" fill="url(#IconifyId-17a99f60578-807714-38)"/><linearGradient id="IconifyId-17a99f60578-807714-39" x1="59.148" x2="59.148" y1="3" y2="74.391" gradientTransform="matrix(-1 0 0 1 128 0)" gradientUnits="userSpaceOnUse"><stop stop-color="#E1F5FE" offset="0"/><stop stop-color="#D5F1FD" offset=".351"/><stop stop-color="#B4E5FC" offset=".991"/><stop stop-color="#B3E5FC" offset="1"/></linearGradient><path d="M23.78 51.4c.02-.04.04-.07.06-.11c.19-.31.37-.62.55-.92l.11-.17c.17-.27.33-.53.5-.78l.15-.24c.15-.23.3-.46.45-.68c.05-.07.1-.15.15-.23c.19-.28.38-.55.57-.81c.18-.25.37-.48.56-.71c.19-.22.4-.44.6-.64c.41-.4.85-.75 1.31-1.05c.92-.6 1.91-1 2.94-1.18c.66-.11 1.34-.16 2.03-.22c1.57-.12 3.2-.28 4.77-1.25c.52-.32 1.04-.74 1.55-1.27c1.77-1.88 7.92-15.98 13.87-26.26c.6-1.03 1.19-2.02 1.78-2.95c.29-.47.59-.92.87-1.36c.58-.88 1.15-1.69 1.71-2.43c.84-1.1 1.64-2.03 2.4-2.73c1.04-.91 1.97-1.43 2.78-1.41c.43.01.84.14 1.24.37c.79.46 1.51 1.32 2.18 2.39c.34.54.66 1.13.98 1.76c-.17.21-.17.21 0 0c.01.01.01.02.02.03c2.26 4.49 4.05 10.67 6.35 10.67c4.64 0 4.81 17.69 10.08 20.97c1.53-1.84 2.86-3.15 3.93-3.78c.48-.29.92-.48 1.29-.48c1.79 0 3.61 2.68 5.44 6.46c4.33 7.44 10.24 19.25 18.17 23.97c.43.26.85.57 1.27.93c-1.52 3.03-4.15 6.24-8.18 4.92c-7-2.3-10.45.11-14.01 4.71c-.4.51-.83.89-1.29 1.19c-3.63 2.4-8.84-1.37-10.88-2.8c-2.26-1.58-10.08-3.49-17.11-.59c-.02.01-.25.09-.34.13c-7.12 3.1-11.6-6.89-11.14-17.91s-5.4-9.87-9.07-7.12c-2.83 2.12-13.96 2.88-19.14 2.44c.16-.29.33-.57.5-.86z" fill="url(#IconifyId-17a99f60578-807714-39)"/><radialGradient id="IconifyId-17a99f60578-807714-40" cx="96.5" cy="50" r="37.832" gradientUnits="userSpaceOnUse"><stop stop-color="#546E7A" offset="0"/><stop stop-color="#4C636E" offset=".37"/><stop stop-color="#37474F" offset="1"/></radialGradient><path d="M85.04 109.42c.79-.93 1.58-1.88 2.38-2.8c1.51-1.73 2.84-3.34 4.02-4.85c3.15-4.01 5.2-7.25 6.4-9.9c.45-.99.79-1.9 1.01-2.74c.08-.28.14-.55.2-.81c.11-.53.17-1.02.19-1.49c.01-.23.01-.46 0-.68c-.02-.44-.07-.85-.16-1.24a6.04 6.04 0 0 0-.9-2.05c-.21-.3-.44-.58-.7-.85c-.77-.8-1.72-1.45-2.77-2.03c-.52-.29-1.06-.57-1.61-.83c-.72-.35-1.45-.69-2.16-1.03c-.36-.17-.72-.35-1.06-.53a15.107 15.107 0 0 1-1.32-.76c-.38-.24-.76-.49-1.09-.76c-.41-.34-.78-.7-1.09-1.1c-.21-.27-.39-.55-.54-.85a5.002 5.002 0 0 1-.47-1.49c-.11-.73-.07-1.55.15-2.49c.08-.33.18-.67.3-1.03c.1-.31.24-.63.37-.96c.02-.04.03-.08.05-.13c.33-.76.76-1.58 1.28-2.46c.1-.16.17-.31.28-.48c.56-.91 1.07-1.8 1.53-2.68c.69-1.31 1.27-2.57 1.74-3.79c.32-.81.59-1.61.82-2.38c.09-.31.18-.62.26-.92c.12-.45.23-.9.32-1.34c.23-1.1.37-2.16.45-3.17a21.958 21.958 0 0 0 .01-2.91c-.04-.62-.11-1.21-.2-1.79c-.05-.29-.1-.57-.15-.85l-.12-.51c-.09-.37-.18-.74-.28-1.1c-.23-.78-.5-1.51-.8-2.2c-.2-.46-.41-.9-.63-1.32s-.45-.82-.69-1.2s-.48-.74-.72-1.09c-.36-.51-.73-.98-1.09-1.41c.48-.29.92-.48 1.29-.48c1.79 0 3.61 2.68 5.44 6.46C99 49.32 104.4 60 111.5 65.26l.35.26c.43.3.85.59 1.29.85c.23.14.46.3.69.47c.13.1.26.21.39.31c.06.05.13.1.19.16v.01c1.63 1.41 3.17 3.57 4.61 6.24C122.4 79.77 124 86.8 124 93.87V116H79.6c1.78-2.21 3.6-4.41 5.44-6.58z" fill="url(#IconifyId-17a99f60578-807714-40)"/><radialGradient id="IconifyId-17a99f60578-807714-41" cx="51.5" cy="10.75" r="83.563" gradientUnits="userSpaceOnUse"><stop stop-color="#90A4AE" offset="0"/><stop stop-color="#849AA5" offset=".226"/><stop stop-color="#65818E" offset=".633"/><stop stop-color="#607D8B" offset=".686"/><stop stop-color="#5F7C8A" offset=".697"/><stop stop-color="#57717E" offset=".848"/><stop stop-color="#546E7A" offset="1"/></radialGradient><path d="M8.79 83.31c4.75-11.46 10.06-23.36 14.49-31.05c.17-.29.34-.58.5-.86c.02-.04.04-.07.06-.11c.19-.31.37-.62.55-.92l.11-.17c.17-.27.33-.53.5-.78l.15-.24c.15-.23.3-.46.45-.68c.05-.07.1-.15.15-.23c.19-.28.38-.55.57-.81c.18-.25.37-.48.56-.71c.19-.22.4-.44.6-.64c.41-.4.85-.75 1.31-1.05c.92-.6 1.91-1 2.94-1.18c.66-.11 1.34-.16 2.03-.22c1.57-.12 3.2-.28 4.77-1.25c.52-.32 1.04-.74 1.55-1.27c1.77-1.88 7.92-15.98 13.87-26.26c.6-1.03 1.19-2.02 1.78-2.95c.29-.47.59-.92.87-1.36c.58-.88 1.15-1.69 1.71-2.43c.84-1.1 1.64-2.03 2.4-2.73c1.04-.91 1.97-1.43 2.78-1.41c.43.01.84.14 1.24.37c.79.46 1.51 1.32 2.18 2.39c.34.54.66 1.13.98 1.76c-.17.21-.17.21 0 0c.01.01.01.02.02.03c-11.53 13.77-9.16 27.69-5.53 38.75c.41.5.8 1 1.16 1.53c1.82 2.67 3.09 5.71 5.52 7.93c.85.78 1.8 1.41 2.8 1.96c6.06-9.67 12.36-18.36 12.48-18.53c1.53-1.84 2.86-3.15 3.93-3.78a20.635 20.635 0 0 1 1.81 2.5c.24.38.47.78.69 1.2s.43.86.63 1.32c.3.69.57 1.42.8 2.2c.1.36.2.72.28 1.1l.12.51c.06.28.11.56.15.85a19.982 19.982 0 0 1 .24 2.73c.01.64 0 1.29-.05 1.97c-.07 1.01-.22 2.07-.45 3.17c-.09.44-.2.89-.32 1.34c-.08.3-.16.61-.26.92c-.23.77-.51 1.57-.82 2.38a37.81 37.81 0 0 1-1.74 3.79c-.46.87-.97 1.76-1.53 2.68c-.1.17-.18.32-.28.48c-.52.88-.95 1.7-1.28 2.46c-.02.04-.03.08-.05.13a12.777 12.777 0 0 0-.67 1.99c-.22.94-.26 1.76-.15 2.49c.03.18.06.36.11.53c.09.34.21.66.36.96s.33.58.54.85c.31.4.68.76 1.09 1.1c.33.27.71.52 1.09.76c.12.07.23.15.35.22c.31.19.64.36.97.54c.35.18.7.36 1.06.53c.71.34 1.44.68 2.16 1.03c.55.27 1.09.54 1.61.83c1.04.58 2 1.23 2.77 2.03c.26.27.49.55.7.85c.42.6.73 1.28.9 2.05c.09.39.14.8.16 1.24c.01.22.01.44 0 .68c-.02.47-.09.96-.19 1.49c-.05.26-.12.53-.2.81c-.23.84-.56 1.75-1.01 2.74c-1.2 2.65-3.25 5.89-6.4 9.9c-1.18 1.5-2.52 3.12-4.02 4.85c-.8.92-1.59 1.87-2.38 2.8c-1.84 2.17-3.66 4.37-5.45 6.58H4v-8.72c0-8.22 1.64-16.36 4.79-23.96z" fill="url(#IconifyId-17a99f60578-807714-41)"/><linearGradient id="IconifyId-17a99f60578-807714-42" x1="63.668" x2="74.418" y1="21.399" y2="55.899" gradientUnits="userSpaceOnUse"><stop stop-color="#607D8B" offset="0"/><stop stop-color="#57727F" offset=".4"/><stop stop-color="#455A64" offset="1"/></linearGradient><path d="M64.87 69.15c-.43.58-1.35.18-1.2-.53c.93-4.67 2.28-11.36.08-17.38c-4.22-11.58-8.79-27.23 4.15-42.69c2.26 4.49 4.05 10.67 6.35 10.67c4.64 0 4.81 17.69 10.08 20.97c-.14.21-14.5 22.18-19.46 28.96z" fill="url(#IconifyId-17a99f60578-807714-42)"/><linearGradient id="IconifyId-17a99f60578-807714-43" x1="64" x2="64" y1="105.17" y2="83.076" gradientUnits="userSpaceOnUse"><stop stop-color="#37474F" offset="0"/><stop stop-color="#37474F" stop-opacity="0" offset="1"/></linearGradient><path d="M119.04 73.55c-1.44-2.68-2.99-4.84-4.61-6.24v-.01c-.06-.06-.13-.1-.19-.16c-.13-.11-.26-.22-.39-.31c-.23-.17-.46-.33-.69-.47c-.44-.26-.87-.55-1.29-.85c-.12-.08-.24-.17-.35-.26c-7.1-5.26-12.5-15.94-16.52-22.86c-1.83-3.78-3.65-6.46-5.44-6.46c-.37 0-.81.19-1.29.48c-1.06.63-2.39 1.94-3.93 3.78c-.12.17-6.42 8.85-12.48 18.53c-.99-.56-1.94-1.18-2.8-1.96c-2.43-2.22-3.7-5.26-5.52-7.93c-.36-.53-.76-1.04-1.16-1.53c-3.64-11.06-6-24.98 5.53-38.75c-.01-.01-.01-.02-.02-.03c-.17.21-.17.21 0 0c-.32-.63-.64-1.22-.98-1.76c-.67-1.08-1.39-1.93-2.18-2.39c-.39-.23-.8-.36-1.24-.37c-.82-.02-1.75.5-2.76 1.43c-.76.7-1.57 1.62-2.4 2.73c-.56.74-1.13 1.55-1.71 2.43c-.29.44-.58.89-.87 1.36c-.59.93-1.18 1.92-1.78 2.95c-5.95 10.28-12.1 24.38-13.87 26.26c-.51.54-1.02.95-1.55 1.27c-1.57.97-3.21 1.12-4.77 1.25c-.7.06-1.38.1-2.03.22c-1.03.18-2.02.58-2.94 1.18c-.46.3-.9.65-1.31 1.05c-.21.2-.41.41-.6.64c-.19.22-.38.46-.56.71c-.19.26-.38.53-.57.81c-.05.07-.1.15-.15.23c-.15.22-.3.44-.45.68l-.15.24c-.16.25-.33.52-.5.78l-.11.17c-.18.3-.37.6-.55.92c-.02.04-.04.07-.06.11c-.17.28-.34.57-.5.86c-4.43 7.69-9.74 19.58-14.49 31.05A62.077 62.077 0 0 0 4 107.28V116h120V93.87c0-7.07-1.6-14.1-4.96-20.32zm-31.23-8.47c-.1.17-.18.32-.28.48c.1-.16.18-.31.28-.48zm-.39 41.54c-.8.92-1.59 1.87-2.38 2.8c.8-.94 1.58-1.88 2.38-2.8c.38-.43.74-.86 1.1-1.28c-.35.42-.72.84-1.1 1.28zm.06-30.55zm5-31.33c-.09-.37-.18-.74-.28-1.1c.1.36.19.73.28 1.1l.12.51l-.12-.51zm6.58 43.57c.11-.53.17-1.02.19-1.49c-.02.47-.09.96-.19 1.49z" fill="url(#IconifyId-17a99f60578-807714-43)" opacity=".7"/><path d="M63.42 7.12c.19.18.51.53.93 1.2c.05.09.17.36.24.52c.19.42.45 1.01.87 1.53c.5 1.03.98 2.16 1.46 3.27c1.89 4.39 3.53 8.21 6.84 8.56c.82 1.09 1.83 4.9 2.45 7.24c1.42 5.36 2.89 10.9 6.4 13.21l.03.03l.14.08l.03.02l.01.01l2.17 1.32l1.65-1.99c1.49-1.8 2.41-2.6 2.89-2.95c.47.48 1.38 1.67 2.76 4.53l.05.1l.06.1c.55.94 1.12 1.95 1.72 3.01c4 7.06 8.97 15.84 15.61 20.75c.13.1.27.2.4.29c.56.4 1.04.71 1.49.98c.12.07.26.17.44.3c.07.05.13.11.2.16l.06.05c.02.02.04.04.06.05l.08.07c1.27 1.1 2.59 2.92 3.94 5.4c3.01 5.58 4.6 12.11 4.6 18.89V113H7v-5.72c0-7.84 1.53-15.51 4.56-22.81c5.74-13.85 10.56-24.18 14.32-30.7l.42-.72c.02-.04.04-.07.07-.11l.14-.24c.15-.25.3-.5.45-.74l.07-.11l.04-.06c.16-.25.31-.5.47-.74l.01-.05l.11-.17c.14-.22.28-.43.42-.63l.07-.1l.08-.11c.18-.26.35-.5.52-.74c.13-.18.27-.35.41-.51s.28-.31.42-.45c.28-.27.57-.51.88-.71c.57-.38 1.18-.62 1.8-.73c.48-.08 1.04-.13 1.63-.17l.13-.01c1.64-.13 3.88-.31 6.11-1.69c.77-.48 1.49-1.07 2.15-1.77c1.14-1.21 2.62-4.14 5.84-10.64c2.45-4.94 5.5-11.09 8.44-16.17c.6-1.03 1.18-1.99 1.72-2.86c.28-.45.56-.88.84-1.3c.56-.84 1.1-1.61 1.6-2.27c.76-1 1.44-1.78 2.04-2.33c.29-.26.5-.42.66-.52M63.45 4c-.81 0-1.72.52-2.72 1.43c-.76.7-1.57 1.62-2.4 2.73c-.56.74-1.13 1.55-1.71 2.43c-.29.44-.58.89-.87 1.36c-.59.93-1.18 1.92-1.78 2.95c-5.95 10.28-12.1 24.38-13.87 26.26c-.51.54-1.02.95-1.55 1.27c-1.57.97-3.21 1.12-4.77 1.25c-.7.06-1.38.1-2.03.22c-1.03.18-2.02.58-2.94 1.18c-.46.3-.9.65-1.31 1.05c-.21.2-.41.41-.6.64c-.19.22-.38.46-.56.71c-.19.26-.38.53-.57.81c-.05.07-.1.15-.15.23c-.15.22-.3.44-.45.68l-.15.24c-.16.25-.33.52-.5.78l-.11.17c-.18.3-.37.6-.55.92c-.02.04-.04.07-.06.11c-.17.28-.34.57-.5.86c-4.43 7.69-9.74 19.58-14.49 31.05A62.077 62.077 0 0 0 4 107.28V116h120V93.87c0-7.07-1.6-14.1-4.96-20.32c-1.44-2.68-2.99-4.84-4.61-6.24v-.01c-.06-.06-.13-.1-.19-.16c-.13-.11-.26-.22-.39-.31c-.23-.17-.46-.33-.69-.47c-.44-.26-.87-.55-1.29-.85c-.12-.08-.24-.17-.35-.26c-7.1-5.26-12.5-15.94-16.52-22.86c-1.83-3.78-3.65-6.46-5.44-6.46c-.37 0-.81.19-1.29.48c-1.06.63-2.39 1.94-3.93 3.78c-5.27-3.29-5.44-20.97-10.08-20.97c-2.3 0-4.09-6.19-6.35-10.67c-.01-.01-.01-.02-.02-.03c-.01.01-.02.02-.04.02c-.19 0-.63-1.28-.94-1.78c-.67-1.08-1.39-1.93-2.18-2.39c-.39-.23-.8-.36-1.24-.37h-.04z" fill="#424242" opacity=".2"/><path d="M37.32 53.83c.07-.46-.57-.66-.77-.24c-2.66 5.64-13.77 22.19-17.77 29.25c-.39.69.44 1.42 1.07.95c1.93-1.43 5.72-4.78 5.93-5.78c.3-1.43 2.96-5.44 3.81-6.7c.17-.24.34-.48.52-.71l3.49-4.39c.68-.86 1.17-1.85 1.42-2.92l2.3-9.46z" fill="#eee" opacity=".2"/><path d="M49.45 42.23c.16-.34-.24-.67-.54-.45l-3.66 2.62c-.26.27-.45.6-.53.97l-2.87 11.42c0 .45.63.54.76.11l6.84-14.67z" fill="#eee" opacity=".2"/><path d="M61.64 72.67c.15-.41-.39-.7-.65-.35c-3.42 4.6-16.44 17.5-21.32 23.14c-.48.55.14 1.36.8 1.05c2-.94 6.02-3.27 6.39-4.14c.53-1.24 3.65-4.36 4.65-5.34c.19-.19.39-.37.6-.54l3.94-3.32c.77-.65 1.39-1.46 1.81-2.37l3.78-8.13z" fill="#eee" opacity=".2"/><path d="M45.2 82.13c.27-.21.09-.64-.25-.59l-4.1.58c-.33.11-.62.3-.84.57l-7.2 8.09c-.19.36.29.71.57.41l11.82-9.06z" fill="#eee" opacity=".2"/><path d="M109.19 86.06c.24.25.65-.04.49-.35c-2.17-4.11-7.06-18.14-9.48-23.69c-.24-.54-1.04-.37-1.04.22c-.01 1.79.29 5.55.79 6.12c.72.82 1.92 4.2 2.29 5.27c.07.21.13.41.19.63l1.06 4.04c.21.79.58 1.52 1.1 2.15l4.6 5.61z" fill="#424242" opacity=".2"/><path d="M109.32 71.78c-.07-.27.17-.27.4-.01l3.91 4.77c.31.26.58.64.72 1l3.16 8.4l-2.88-4.43c-.13-.2-.33-.26-.31-.09l.76 6.36c.02.28-.38.05-1.08-.27l-4.68-15.73z" fill="#424242" opacity=".2"/><path d="M86.41 46.15c.16-.19.46-.11.51.13l.71 4.17c.16.26.17.58.02.84l-3.47 6.13l.29-3.63c.01-.17-.18-.26-.31-.15l-4.71 4.12c-.23.17-.53-.09-1.13-.52l8.09-11.09z" fill="#424242" opacity=".2"/><path d="M65.54 18.5c-.07-.28.17-.28.41-.01l4.03 4.92c.32.27.6.66.74 1.03l3.26 8.66l-2.97-4.57c-.14-.21-.34-.27-.32-.09l.79 6.56c.02.28-.39.05-1.12-.28L65.54 18.5z" fill="#424242" opacity=".2"/><linearGradient id="IconifyId-17a99f60578-807714-44" x1="64" x2="64" y1="99" y2="123.52" gradientUnits="userSpaceOnUse"><stop stop-color="#4CAF50" offset="0"/><stop stop-color="#48A84C" offset=".267"/><stop stop-color="#3B933F" offset=".667"/><stop stop-color="#2E7D32" offset="1"/></linearGradient><path d="M124 92.57c0-1.9-2-3.16-3.7-2.32c-4.06 2-7.41 5.21-9.59 9.17c-.59.69-1.07 1.52-1.42 2.51c-.02.07-.05.14-.07.21c-.17.51-.7.78-1.23.65c-.32-.08-.64-.12-.98-.12c-1.34 0-2.57.63-3.57 1.7c-.71.76-1.91.79-2.73.15a12.53 12.53 0 0 0-7.69-2.64c-2.2 0-4.27.58-6.08 1.58c-.87.48-1.95.18-2.54-.62c-3.56-4.84-9.18-7.98-15.52-7.98c-4.8 0-9.18 1.8-12.58 4.77c-.38.34-.94.34-1.33.01c-.9-.78-1.95-1.23-3.08-1.23c-1.1 0-2.13.43-3.01 1.17c-.34.29-.82.3-1.2.06a13.87 13.87 0 0 0-7.54-2.23c-3.9 0-7.42 1.62-9.99 4.23c-.39.4-1.02.37-1.43-.02c-.95-.92-2.1-1.47-3.34-1.47c-1.36 0-2.61.65-3.61 1.74c-.39.43-1.06.47-1.45.05c-3.57-3.84-8.59-6.24-14.15-6.22C4.96 95.76 4 96.77 4 97.98V124h120V92.57z" fill="url(#IconifyId-17a99f60578-807714-44)"/><path d="M121 93.26V121H7V98.77c4.23.2 8.16 2.04 11.13 5.24c.74.8 1.79 1.26 2.88 1.26c1.12 0 2.21-.48 2.97-1.31c.32-.35.83-.77 1.4-.77c.4 0 .83.21 1.25.62a4.04 4.04 0 0 0 2.82 1.15c1.07 0 2.08-.42 2.83-1.18c2.12-2.15 4.91-3.34 7.85-3.34c2.09 0 4.13.61 5.91 1.75c.66.42 1.42.65 2.19.65c.94 0 1.84-.33 2.56-.93c.37-.31.74-.47 1.08-.47c.36 0 .74.17 1.12.5c.73.63 1.66.98 2.62.98c.97 0 1.91-.35 2.65-1c2.97-2.6 6.74-4.03 10.6-4.03c5.17 0 9.95 2.46 13.1 6.75c.96 1.3 2.48 2.08 4.07 2.08c.82 0 1.64-.21 2.35-.61c1.44-.8 2.99-1.2 4.62-1.2c2.13 0 4.15.7 5.86 2.01c.9.69 2.02 1.07 3.15 1.07c1.37 0 2.69-.57 3.61-1.55c.32-.34.82-.75 1.38-.75c.09 0 .18.01.27.03c.32.08.64.11.96.11c1.73 0 3.26-1.1 3.81-2.73l.06-.18c.21-.6.5-1.12.87-1.55l.2-.24l.15-.27a19.17 19.17 0 0 1 7.68-7.6m.42-3.27c-.37 0-.76.08-1.12.27c-4.06 2-7.41 5.21-9.59 9.17c-.59.69-1.07 1.52-1.42 2.51c-.02.07-.05.14-.07.21a1 1 0 0 1-.97.69c-.09 0-.17-.01-.26-.03c-.32-.08-.64-.12-.98-.12c-1.34 0-2.57.63-3.57 1.7c-.38.4-.89.6-1.42.6c-.46 0-.93-.15-1.31-.45a12.53 12.53 0 0 0-7.69-2.64c-2.2 0-4.27.58-6.08 1.58c-.28.16-.59.23-.9.23c-.63 0-1.25-.31-1.65-.85c-3.56-4.84-9.18-7.98-15.52-7.98c-4.8 0-9.18 1.8-12.58 4.77a.99.99 0 0 1-1.33.01c-.9-.78-1.95-1.23-3.08-1.23c-1.1 0-2.13.43-3.01 1.17c-.18.15-.4.23-.63.23c-.2 0-.39-.06-.57-.17a13.87 13.87 0 0 0-7.54-2.23c-3.9 0-7.42 1.62-9.99 4.23c-.19.19-.44.29-.69.29c-.26 0-.53-.1-.74-.3c-.95-.92-2.1-1.47-3.34-1.47c-1.36 0-2.61.65-3.61 1.74c-.21.22-.49.34-.77.34c-.25 0-.5-.1-.68-.3c-3.55-3.83-8.54-6.22-14.08-6.22h-.08C4.96 95.76 4 96.77 4 97.98V124h120V92.57c0-1.49-1.23-2.58-2.58-2.58z" fill="#424242" opacity=".2"/><path d="M50.2 106.91c3.02.93 4.54 3.57 4.13 6.64c-.28 2.14 3.07 2.2 3.35.08c.19-1.41.04-2.77-.37-4.01c4.74-.01 8.82 2.53 10.88 6.87c.93 1.95 3.87.36 2.95-1.59c-2.62-5.52-8.29-8.93-14.39-8.62c-.44.02-.79.19-1.06.43a9.616 9.616 0 0 0-4.57-3.02c-2.05-.64-2.98 2.58-.92 3.22z" fill="#424242" opacity=".2"/><path d="M106.05 111.43c2.1.71 3.11 2.58 2.77 4.72c-.24 1.49 2.1 1.59 2.34.12c.16-.98.08-1.93-.18-2.81c3.31.08 6.12 1.93 7.48 5c.61 1.38 2.7.32 2.09-1.05c-1.73-3.91-5.63-6.4-9.9-6.29c-.31.01-.56.12-.75.28a6.692 6.692 0 0 0-3.14-2.19c-1.43-.49-2.14 1.74-.71 2.22z" fill="#424242" opacity=".2"/><path d="M24.03 109.78c-4.55.1-8.07 2.94-9.2 7.37c-.47 1.84-3.33 1.16-2.87-.68c1.45-5.68 6.11-9.5 11.99-9.63c1.9-.04 1.98 2.9.08 2.94z" fill="#424242" opacity=".2"/></svg>
@@ -1,39 +0,0 @@
1
- export { assert }
2
- export { assertUsage }
3
-
4
- function assert(condition: unknown, debugInfo?: unknown): asserts condition {
5
- if (condition) {
6
- return
7
- }
8
- const hasDebugInfo = debugInfo !== undefined
9
- if (hasDebugInfo) {
10
- console.log(debugInfo)
11
- if (typeof debugInfo === 'object') {
12
- debugInfo = JSON.stringify(debugInfo)
13
- }
14
- }
15
- let errMsg = '[DocPress] Bug. Contact DocPress maintainer.'
16
- if (hasDebugInfo) {
17
- errMsg += ' Debug info: ' + String(debugInfo)
18
- }
19
- const err = new Error(errMsg)
20
- if (isBrowserAndDev()) {
21
- alert(err.stack)
22
- }
23
- throw err
24
- }
25
-
26
- function assertUsage(condition: unknown, msg: string): asserts condition {
27
- if (condition) {
28
- return
29
- }
30
- const err = new Error('[DocPress][Wrong Usage] ' + msg)
31
- if (isBrowserAndDev()) {
32
- alert(err.stack)
33
- }
34
- throw err
35
- }
36
-
37
- function isBrowserAndDev() {
38
- return typeof window !== 'undefined' && window?.location?.port !== ''
39
- }
@@ -1,2 +0,0 @@
1
- export * from './assert'
2
- export * from './isBrowser'
@@ -1,17 +0,0 @@
1
- export { crawlAllFiles }
2
-
3
- import path from 'path'
4
- import { promises as fsp } from 'fs'
5
- import { toPosixPath } from './filesystemPathHandling'
6
-
7
- // Adapted from https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search/45130990#45130990
8
- async function crawlAllFiles(dir: string): Promise<string[]> {
9
- const dirFiles = await fsp.readdir(dir, { withFileTypes: true })
10
- const allFiles = await Promise.all(
11
- dirFiles.map((file) => {
12
- const filePath = path.resolve(dir, file.name)
13
- return file.isDirectory() ? crawlAllFiles(filePath) : filePath
14
- })
15
- )
16
- return allFiles.flat().map(toPosixPath)
17
- }