@brillout/docpress 0.6.14 → 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.
@@ -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
  }
@@ -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
- type?: 'danger' | 'warning' | 'construction'
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.6.14",
3
+ "version": "0.6.15",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "// Build vite.config.ts and +config.ts": "",