hyperbook 0.54.0 → 0.55.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 +9 -3
- package/package.json +2 -2
|
@@ -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
|
@@ -173437,10 +173437,16 @@ var remarkDirectiveAlert_default = (ctx) => () => {
|
|
|
173437
173437
|
const data = node3.data || (node3.data = {});
|
|
173438
173438
|
expectContainerDirective(node3, file, name);
|
|
173439
173439
|
registerDirective(file, name, [], ["style.css"], []);
|
|
173440
|
-
const
|
|
173440
|
+
const color2 = node3.attributes?.color;
|
|
173441
|
+
const content5 = node3.attributes?.label;
|
|
173442
|
+
const type = Object.keys(node3.attributes || {}).join(" ").trim();
|
|
173443
|
+
const icon = content5 || type;
|
|
173444
|
+
delete node3.attributes?.color;
|
|
173445
|
+
delete node3.attributes?.label;
|
|
173441
173446
|
data.hName = "div";
|
|
173442
173447
|
data.hProperties = {
|
|
173443
|
-
class:
|
|
173448
|
+
class: `directive-alert ${type} ${icon ? "icon" : ""}`.trim(),
|
|
173449
|
+
style: `${color2 ? `--alert-color: ${color2};` : ""} ${content5 ? `--alert-content: '${content5}';` : ""}`
|
|
173444
173450
|
};
|
|
173445
173451
|
}
|
|
173446
173452
|
});
|
|
@@ -188014,7 +188020,7 @@ pako/dist/pako.esm.mjs:
|
|
|
188014
188020
|
//# sourceMappingURL=index.js.map
|
|
188015
188021
|
|
|
188016
188022
|
;// CONCATENATED MODULE: ./package.json
|
|
188017
|
-
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.
|
|
188023
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.55.0","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=12.22.0"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ --no-cache --no-source-map-register && node postbuild.mjs"},"devDependencies":{"@hyperbook/fs":"workspace:*","@hyperbook/markdown":"workspace:*","@hyperbook/types":"workspace:*","@pnpm/exportable-manifest":"1000.0.6","@types/archiver":"6.0.3","@types/async-retry":"1.4.9","@types/cross-spawn":"6.0.6","@types/lunr":"^2.3.7","@types/prompts":"2.4.9","@types/tar":"6.1.13","@types/ws":"^8.5.14","@vercel/ncc":"0.38.3","archiver":"7.0.1","async-retry":"1.3.3","chalk":"5.4.1","chokidar":"4.0.3","commander":"12.1.0","cpy":"11.1.0","cross-spawn":"7.0.6","domutils":"^3.2.2","extract-zip":"^2.0.1","got":"12.6.0","htmlparser2":"^10.0.0","lunr":"^2.3.9","lunr-languages":"^1.14.0","mime":"^4.0.6","prompts":"2.4.2","rimraf":"6.0.1","tar":"7.4.3","update-check":"1.5.4","ws":"^8.18.0"}}');
|
|
188018
188024
|
;// CONCATENATED MODULE: ./build.ts
|
|
188019
188025
|
|
|
188020
188026
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyperbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"author": "Mike Barkmin",
|
|
5
5
|
"homepage": "https://github.com/openpatch/hyperbook#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"update-check": "1.5.4",
|
|
55
55
|
"ws": "^8.18.0",
|
|
56
56
|
"@hyperbook/fs": "0.18.3",
|
|
57
|
-
"@hyperbook/markdown": "0.
|
|
57
|
+
"@hyperbook/markdown": "0.31.0",
|
|
58
58
|
"@hyperbook/types": "0.15.2"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|