@hyperbook/markdown 0.30.0 → 0.31.0
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/dist/assets/directive-alert/style.css +24 -71
- package/dist/index.js +8 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--alert-color: var(--color-nav-border);
|
|
3
|
+
--alert-content: "";
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.directive-alert>p {
|
|
2
7
|
margin-bottom: 0;
|
|
3
8
|
}
|
|
@@ -15,97 +20,45 @@
|
|
|
15
20
|
position: relative;
|
|
16
21
|
border-left-width: 4px;
|
|
17
22
|
border-left-style: solid;
|
|
23
|
+
background-color: var(--color-nav);
|
|
24
|
+
border-left-color: var(--alert-color);
|
|
25
|
+
border-left-style: solid;
|
|
26
|
+
border-left-width: 4px;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
.directive-alert::before {
|
|
29
|
+
.directive-alert.icon::before {
|
|
21
30
|
border-radius: 100%;
|
|
22
31
|
font-size: 14px;
|
|
23
32
|
font-weight: 700;
|
|
24
|
-
left: -
|
|
25
|
-
line-height: 20px;
|
|
33
|
+
left: -14px;
|
|
26
34
|
display: flex;
|
|
27
35
|
align-items: center;
|
|
28
36
|
justify-content: center;
|
|
29
37
|
position: absolute;
|
|
30
|
-
height:
|
|
31
|
-
width:
|
|
32
|
-
|
|
33
|
-
top: 12px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.directive-alert.success {
|
|
37
|
-
border-left-style: solid;
|
|
38
|
-
border-left-width: 4px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.directive-alert.success::before {
|
|
42
|
-
content: "✓";
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.directive-alert.info {
|
|
46
|
-
border-left-style: solid;
|
|
47
|
-
border-left-width: 4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.directive-alert.info::before {
|
|
51
|
-
content: "i";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.directive-alert.warn {
|
|
55
|
-
border-left-style: solid;
|
|
56
|
-
border-left-width: 4px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.directive-alert.warn::before {
|
|
60
|
-
content: "!";
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.directive-alert.error {
|
|
64
|
-
border-left-style: solid;
|
|
65
|
-
border-left-width: 4px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.directive-alert.error::before {
|
|
69
|
-
content: "x";
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.directive-alert {
|
|
73
|
-
background-color: var(--color-nav);
|
|
74
|
-
border-left-color: var(--color-nav-border);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.directive-alert::before {
|
|
38
|
+
height: 24px;
|
|
39
|
+
width: 24px;
|
|
40
|
+
top: 8px;
|
|
78
41
|
color: #fff;
|
|
42
|
+
content: var(--alert-content);
|
|
43
|
+
background-color: var(--alert-color);
|
|
79
44
|
}
|
|
80
45
|
|
|
81
46
|
.directive-alert.success {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.directive-alert.success::before {
|
|
86
|
-
background-color: #00c851;
|
|
47
|
+
--alert-color: #00c851;
|
|
48
|
+
--alert-content: "✓";
|
|
87
49
|
}
|
|
88
50
|
|
|
89
51
|
.directive-alert.info {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.directive-alert.info::before {
|
|
94
|
-
background-color: #33b5e5;
|
|
52
|
+
--alert-color: #33b5e5;
|
|
53
|
+
--alert-content: "i";
|
|
95
54
|
}
|
|
96
55
|
|
|
97
56
|
.directive-alert.warn {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
.directive-alert.warn::before {
|
|
102
|
-
background-color: #f0b429;
|
|
57
|
+
--alert-color: #f0b429;
|
|
58
|
+
--alert-content: "!";
|
|
103
59
|
}
|
|
104
60
|
|
|
105
61
|
.directive-alert.error {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.directive-alert.error::before {
|
|
110
|
-
background-color: #ef4e4e;
|
|
62
|
+
--alert-color: #ef4e4e;
|
|
63
|
+
--alert-content: "x";
|
|
111
64
|
}
|
package/dist/index.js
CHANGED
|
@@ -63991,10 +63991,16 @@ var remarkDirectiveAlert_default = (ctx) => () => {
|
|
|
63991
63991
|
const data = node3.data || (node3.data = {});
|
|
63992
63992
|
expectContainerDirective(node3, file, name);
|
|
63993
63993
|
registerDirective(file, name, [], ["style.css"], []);
|
|
63994
|
-
const
|
|
63994
|
+
const color2 = node3.attributes?.color;
|
|
63995
|
+
const content5 = node3.attributes?.label;
|
|
63996
|
+
const type = Object.keys(node3.attributes || {}).join(" ").trim();
|
|
63997
|
+
const icon = content5 || type;
|
|
63998
|
+
delete node3.attributes?.color;
|
|
63999
|
+
delete node3.attributes?.label;
|
|
63995
64000
|
data.hName = "div";
|
|
63996
64001
|
data.hProperties = {
|
|
63997
|
-
class:
|
|
64002
|
+
class: `directive-alert ${type} ${icon ? "icon" : ""}`.trim(),
|
|
64003
|
+
style: `${color2 ? `--alert-color: ${color2};` : ""} ${content5 ? `--alert-content: '${content5}';` : ""}`
|
|
63998
64004
|
};
|
|
63999
64005
|
}
|
|
64000
64006
|
});
|