@brillout/docpress 0.6.13 → 0.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Note.css +16 -0
- package/components/Note.tsx +13 -2
- package/components/ReadingRecommendation.tsx +1 -0
- package/css/heading.css +4 -0
- package/package.json +6 -6
- package/utils/Emoji/Emoji.ts +1 -5
- package/utils/Emoji/assets.ts +1 -2
- package/utils/Emoji/road-fork.svg +0 -17
package/components/Note.css
CHANGED
|
@@ -18,6 +18,22 @@ blockquote.note-color-yellow {
|
|
|
18
18
|
--color-strengh-border: 8;
|
|
19
19
|
--color: 255, 204, 50;
|
|
20
20
|
}
|
|
21
|
+
blockquote.note-color-green {
|
|
22
|
+
--color-strengh-bg: 4;
|
|
23
|
+
--color-strengh-border: 4;
|
|
24
|
+
--color: 000, 204, 50;
|
|
25
|
+
border-left-color: rgb(0, 179, 0, 0.3);
|
|
26
|
+
background-color: rgb(0, 179, 0, 0.08);
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
blockquote.note-color-pink {
|
|
30
|
+
--color-strengh-bg: 4;
|
|
31
|
+
--color-strengh-border: 4;
|
|
32
|
+
--color: 000, 204, 50;
|
|
33
|
+
border-left-color: rgb(255, 0, 100, 0.3);
|
|
34
|
+
background-color: rgb(255, 0, 100, 0.1);
|
|
35
|
+
}
|
|
36
|
+
*/
|
|
21
37
|
.blockquote-content {
|
|
22
38
|
display: inline;
|
|
23
39
|
}
|
package/components/Note.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Warning }
|
|
2
2
|
export { Construction }
|
|
3
|
+
export { Contribution }
|
|
3
4
|
export { Danger }
|
|
4
5
|
export { NoteWithoutIcon }
|
|
5
6
|
export { NoteWithCustomIcon }
|
|
@@ -23,6 +24,9 @@ function Warning({ children }: { children: React.ReactNode }) {
|
|
|
23
24
|
function Construction({ children }: { children: React.ReactNode }) {
|
|
24
25
|
return <NoteGeneric type="construction">{children}</NoteGeneric>
|
|
25
26
|
}
|
|
27
|
+
function Contribution({ children }: { children: React.ReactNode }) {
|
|
28
|
+
return <NoteGeneric type="contribution">{children}</NoteGeneric>
|
|
29
|
+
}
|
|
26
30
|
function Danger({ children }: { children: React.ReactNode }) {
|
|
27
31
|
return <NoteGeneric type="danger">{children}</NoteGeneric>
|
|
28
32
|
}
|
|
@@ -38,10 +42,12 @@ function NoteWithCustomIcon({ icon, children }: { children: React.ReactNode; ico
|
|
|
38
42
|
function NoteGeneric({
|
|
39
43
|
type,
|
|
40
44
|
icon,
|
|
45
|
+
iconMargin,
|
|
41
46
|
children,
|
|
42
47
|
}: {
|
|
43
48
|
icon?: null | CustomIcon
|
|
44
|
-
|
|
49
|
+
iconMargin?: null | number
|
|
50
|
+
type?: 'danger' | 'warning' | 'construction' | 'contribution'
|
|
45
51
|
children: React.ReactNode
|
|
46
52
|
}) {
|
|
47
53
|
assert(icon === null || icon || type, { icon, type })
|
|
@@ -64,6 +70,11 @@ function NoteGeneric({
|
|
|
64
70
|
icon = ':construction:'
|
|
65
71
|
classColor = 'note-color-yellow'
|
|
66
72
|
}
|
|
73
|
+
if (type === 'contribution') {
|
|
74
|
+
icon = '💚'
|
|
75
|
+
classColor = 'note-color-green'
|
|
76
|
+
iconMargin = 2
|
|
77
|
+
}
|
|
67
78
|
assert(icon)
|
|
68
79
|
assert(classColor)
|
|
69
80
|
className = `${className} ${classColor}`
|
|
@@ -71,7 +82,7 @@ function NoteGeneric({
|
|
|
71
82
|
return (
|
|
72
83
|
<blockquote className={className}>
|
|
73
84
|
<div style={{ marginBottom: 20 }} />
|
|
74
|
-
{icon} <div className="blockquote-content">{children}</div>
|
|
85
|
+
{icon}<span style={{width: iconMargin ?? undefined, display: 'inline-block'}}></span> <div className="blockquote-content">{children}</div>
|
|
75
86
|
<div style={{ marginTop: 20 }} />
|
|
76
87
|
</blockquote>
|
|
77
88
|
)
|
package/css/heading.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"// Build vite.config.ts and +config.ts": "",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@types/node": "*",
|
|
33
33
|
"@types/react": "*",
|
|
34
34
|
"@types/react-dom": "*",
|
|
35
|
-
"react": "
|
|
36
|
-
"react-dom": "
|
|
35
|
+
"react": ">=18.0.0",
|
|
36
|
+
"react-dom": ">=18.0.0",
|
|
37
37
|
"typescript": "*",
|
|
38
|
-
"vike": "
|
|
39
|
-
"vite": "
|
|
38
|
+
"vike": ">=0.4.167",
|
|
39
|
+
"vite": ">=5.2.0"
|
|
40
40
|
},
|
|
41
41
|
"exports": {
|
|
42
42
|
"./renderer/onRenderHtml": "./renderer/onRenderHtml.tsx",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react": "^18.2.0",
|
|
78
78
|
"react-dom": "^18.2.0",
|
|
79
79
|
"typescript": "^5.4.3",
|
|
80
|
-
"vike": "^0.4.
|
|
80
|
+
"vike": "^0.4.174",
|
|
81
81
|
"vite": "^5.2.2"
|
|
82
82
|
},
|
|
83
83
|
"repository": "https://github.com/brillout/docpress",
|
package/utils/Emoji/Emoji.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { assert } from '../assert'
|
|
3
3
|
|
|
4
|
-
import { iconMechanicalArm, iconCompass,
|
|
4
|
+
import { iconMechanicalArm, iconCompass, iconShield, iconTypescript, iconEngine } from './assets'
|
|
5
5
|
|
|
6
6
|
export { Emoji }
|
|
7
7
|
export type { EmojiName }
|
|
@@ -26,7 +26,6 @@ type EmojiName =
|
|
|
26
26
|
| 'dizzy'
|
|
27
27
|
| 'sparkles'
|
|
28
28
|
| 'writing-hang'
|
|
29
|
-
| 'road-fork'
|
|
30
29
|
| 'engine'
|
|
31
30
|
| 'red-circle'
|
|
32
31
|
| 'sparkling-heart'
|
|
@@ -89,9 +88,6 @@ function Emoji({ name, style }: { name: EmojiName; style?: React.CSSProperties }
|
|
|
89
88
|
// https://icon-sets.iconify.design/noto/shield/
|
|
90
89
|
(name === 'shield' && Img(iconShield)) ||
|
|
91
90
|
// ***
|
|
92
|
-
// Custom
|
|
93
|
-
(name === 'road-fork' && Img(iconRoadFork, '1.4em')) ||
|
|
94
|
-
// ***
|
|
95
91
|
// U+270D
|
|
96
92
|
// https://emojipedia.org/writing-hand/
|
|
97
93
|
// https://www.unicompat.com/270D => 93.8%
|
package/utils/Emoji/assets.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import iconMechanicalArm from './mechanical-arm.svg'
|
|
2
2
|
//import iconMountain from './mountain.svg'
|
|
3
3
|
import iconCompass from './compass.svg'
|
|
4
|
-
import iconRoadFork from './road-fork.svg'
|
|
5
4
|
import iconShield from './shield.svg'
|
|
6
5
|
import iconTypescript from './typescript.svg'
|
|
7
6
|
import iconEngine from './engine.png'
|
|
8
7
|
|
|
9
|
-
export { iconMechanicalArm, iconCompass,
|
|
8
|
+
export { iconMechanicalArm, iconCompass, iconShield, iconTypescript, iconEngine }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
-
<svg width="487.56" height="484.09" version="1.1" viewBox="0 0 487.56 484.09" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
4
|
-
<metadata>
|
|
5
|
-
<rdf:RDF>
|
|
6
|
-
<cc:Work rdf:about="">
|
|
7
|
-
<dc:format>image/svg+xml</dc:format>
|
|
8
|
-
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
|
9
|
-
<dc:title/>
|
|
10
|
-
</cc:Work>
|
|
11
|
-
</rdf:RDF>
|
|
12
|
-
</metadata>
|
|
13
|
-
<path d="m482.68 248.19c1.2439-1.5861 1.2085-1.6214-0.37756-0.37756-1.6658 1.3064-2.1955 2.1276-1.3724 2.1276 0.20765 0 0.99515-0.7875 1.75-1.75z"/>
|
|
14
|
-
<path d="m486.68 244.19c1.2439-1.5861 1.2085-1.6214-0.37756-0.37756-1.6658 1.3064-2.1955 2.1276-1.3724 2.1276 0.20765 0 0.99515-0.7875 1.75-1.75z"/>
|
|
15
|
-
<path d="m247.42 474.17c2.8185-1.2899 25.113-23.215 75.476-74.228 39.312-39.819 87.237-88.253 106.5-107.63 39.149-39.385 41.06-41.824 40.23-51.353-0.26767-3.0733-1.2636-7.1233-2.2131-9s-17.761-19.607-37.36-39.401c-19.598-19.794-52.958-53.542-74.133-74.997-96.779-98.055-104.54-105.75-108.5-107.6-5.1002-2.3843-11.892-2.3865-17-0.0055-3.9548 1.8434-8.8989 6.7455-104.48 103.59-20.085 20.351-53.896 54.551-75.135 76s-39.375 40.485-40.303 42.302c-3.7569 7.3558-3.0617 16.444 1.7574 22.976 1.2591 1.7066 35.089 36.317 75.177 76.911 132.68 134.35 138.77 140.43 142.99 142.39 5.0756 2.3728 11.867 2.3885 17 0.0393z" fill="#fcb714" stroke="#000" stroke-width="23.679"/>
|
|
16
|
-
<path d="m219.09 282.89c-4.0367-13.001-11.907-25.342-22.59-35.421-7.839-7.396-22.642-17.061-23.783-15.528-0.17973 0.24149-1.7743 7.1558-3.5435 15.365l-3.2168 14.926-3.5852-3.2694c-48.105-43.867-69.248-63.877-68.356-64.69 1.6551-1.5099 91.839-29.402 92.601-28.64 0.36214 0.36213-0.92831 7.6875-2.8676 16.279-1.9393 8.5912-3.3666 15.676-3.1718 15.744 6.9672 2.4303 26.283 13.741 33.175 19.426 8.4568 6.9756 21.03 20.689 24.466 26.685 1.2973 2.2636 1.5974 2.1875 3.8469-0.97471 12.275-17.255 27.561-30.663 44.569-39.093 6.5682-3.2556 12.102-5.9748 12.296-6.0428 0.19483-0.0679-1.2325-7.1527-3.1718-15.744-1.9394-8.5911-3.2235-15.923-2.8537-16.293 0.77891-0.77893 90.923 27.131 92.607 28.672 0.89233 0.81692-52.476 51.326-68.304 64.644l-3.6976 3.1113-3.1964-14.833c-1.758-8.1582-3.3615-15.049-3.5632-15.312-0.20177-0.26354-4.0381 1.4776-8.5252 3.8692-15.965 8.5093-32.067 28.563-37.842 47.129-3.6379 22.651-2.3162 36.651-3.7002 79.93l-0.37063 33.564h-33.168c-1.6004-73.949-0.48835-86.769-4.0563-113.5z" stroke-width="1.3841"/>
|
|
17
|
-
</svg>
|