hyperbook 0.54.0 → 0.56.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.
@@ -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,54 @@
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;
27
+
28
+ a,
29
+ strong {
30
+ color: var(--alert-color);
31
+ }
32
+
33
+ :first-child {
34
+ margin-top: 0;
35
+ }
18
36
  }
19
37
 
20
- .directive-alert::before {
38
+ .directive-alert.icon::before {
21
39
  border-radius: 100%;
22
40
  font-size: 14px;
23
41
  font-weight: 700;
24
- left: -12px;
25
- line-height: 20px;
42
+ left: -14px;
26
43
  display: flex;
27
44
  align-items: center;
28
45
  justify-content: center;
29
46
  position: absolute;
30
- height: 20px;
31
- width: 20px;
32
- text-align: center;
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 {
47
+ height: 24px;
48
+ width: 24px;
49
+ top: 8px;
78
50
  color: #fff;
51
+ content: var(--alert-content);
52
+ background-color: var(--alert-color);
79
53
  }
80
54
 
81
55
  .directive-alert.success {
82
- border-left-color: #00c851;
83
- }
84
-
85
- .directive-alert.success::before {
86
- background-color: #00c851;
56
+ --alert-color: #00c851;
57
+ --alert-content: "✓";
87
58
  }
88
59
 
89
60
  .directive-alert.info {
90
- border-left-color: #33b5e5;
91
- }
92
-
93
- .directive-alert.info::before {
94
- background-color: #33b5e5;
61
+ --alert-color: #33b5e5;
62
+ --alert-content: "i";
95
63
  }
96
64
 
97
65
  .directive-alert.warn {
98
- border-left-color: #f0b429;
99
- }
100
-
101
- .directive-alert.warn::before {
102
- background-color: #f0b429;
66
+ --alert-color: #f0b429;
67
+ --alert-content: "!";
103
68
  }
104
69
 
105
70
  .directive-alert.error {
106
- border-left-color: #ef4e4e;
107
- }
108
-
109
- .directive-alert.error::before {
110
- background-color: #ef4e4e;
71
+ --alert-color: #ef4e4e;
72
+ --alert-content: "x";
111
73
  }
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 type = Object.keys(node3.attributes || {}).join(" ");
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: ("directive-alert " + type).trim()
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.54.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"}}');
188023
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.56.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.54.0",
3
+ "version": "0.56.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.30.0",
57
+ "@hyperbook/markdown": "0.32.0",
58
58
  "@hyperbook/types": "0.15.2"
59
59
  },
60
60
  "scripts": {