hyperbook 0.86.0 → 0.86.1
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.
|
@@ -26,7 +26,7 @@ hyperbook.embed.consent = (function () {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function loadContent(wrapper) {
|
|
29
|
-
var banner = wrapper.querySelector(".directive-embed
|
|
29
|
+
var banner = wrapper.querySelector(".directive-embed .consent-banner");
|
|
30
30
|
if (banner) {
|
|
31
31
|
banner.remove();
|
|
32
32
|
}
|
|
@@ -55,9 +55,9 @@ hyperbook.embed.consent = (function () {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
var btn = wrapper.querySelector(".directive-embed
|
|
58
|
+
var btn = wrapper.querySelector(".directive-embed .consent-accept-btn");
|
|
59
59
|
var checkbox = wrapper.querySelector(
|
|
60
|
-
".directive-embed
|
|
60
|
+
".directive-embed .consent-always-checkbox"
|
|
61
61
|
);
|
|
62
62
|
if (btn) {
|
|
63
63
|
btn.addEventListener("click", async function () {
|
|
@@ -67,7 +67,7 @@ hyperbook.embed.consent = (function () {
|
|
|
67
67
|
loadContent(wrapper);
|
|
68
68
|
if (checkbox && checkbox.checked) {
|
|
69
69
|
document
|
|
70
|
-
.querySelectorAll(".directive-embed
|
|
70
|
+
.querySelectorAll(".directive-embed .consent")
|
|
71
71
|
.forEach(function (el) {
|
|
72
72
|
var elSrc = el.getAttribute("data-consent-src");
|
|
73
73
|
if (getDomain(elSrc) === domain) {
|
|
@@ -81,7 +81,7 @@ hyperbook.embed.consent = (function () {
|
|
|
81
81
|
|
|
82
82
|
function init(root) {
|
|
83
83
|
var wrappers = root.querySelectorAll
|
|
84
|
-
? root.querySelectorAll(".directive-embed
|
|
84
|
+
? root.querySelectorAll(".directive-embed .consent")
|
|
85
85
|
: [];
|
|
86
86
|
wrappers.forEach(function (w) {
|
|
87
87
|
initWrapper(w);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
position: relative;
|
|
4
4
|
overflow: hidden;
|
|
5
|
-
background-color: white;
|
|
6
5
|
border-radius: 8px;
|
|
7
6
|
border-style: solid;
|
|
8
7
|
border-width: 2px;
|
|
@@ -22,46 +21,44 @@
|
|
|
22
21
|
position: absolute;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
.directive-embed
|
|
24
|
+
.directive-embed .consent {
|
|
26
25
|
position: absolute;
|
|
27
26
|
top: 0;
|
|
28
27
|
left: 0;
|
|
29
28
|
width: 100%;
|
|
30
29
|
height: 100%;
|
|
30
|
+
padding: 24px;
|
|
31
|
+
overflow: auto;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
.directive-embed
|
|
34
|
+
.directive-embed .consent iframe[data-consent-src] {
|
|
34
35
|
display: none;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.directive-embed
|
|
38
|
+
.directive-embed .consent-banner {
|
|
38
39
|
display: flex;
|
|
39
40
|
flex-direction: column;
|
|
40
41
|
align-items: center;
|
|
41
42
|
justify-content: center;
|
|
42
43
|
gap: 12px;
|
|
43
|
-
padding: 24px;
|
|
44
|
-
background-color: var(--color-background-tinted, #f5f5f5);
|
|
45
44
|
border-radius: 8px;
|
|
46
45
|
text-align: center;
|
|
47
|
-
height: 100%;
|
|
48
46
|
box-sizing: border-box;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
.directive-embed
|
|
49
|
+
.directive-embed .consent-banner-text {
|
|
52
50
|
font-size: 0.95em;
|
|
53
51
|
line-height: 1.5;
|
|
54
52
|
color: var(--color-text, #333);
|
|
55
53
|
max-width: 600px;
|
|
56
54
|
}
|
|
57
55
|
|
|
58
|
-
.directive-embed
|
|
56
|
+
.directive-embed .consent-banner-url {
|
|
59
57
|
font-size: 0.85em;
|
|
60
|
-
color: var(--color-text-muted, #666);
|
|
61
58
|
word-break: break-all;
|
|
62
59
|
}
|
|
63
60
|
|
|
64
|
-
.directive-embed
|
|
61
|
+
.directive-embed .consent-always-label {
|
|
65
62
|
display: flex;
|
|
66
63
|
align-items: center;
|
|
67
64
|
gap: 6px;
|
|
@@ -70,23 +67,22 @@
|
|
|
70
67
|
cursor: pointer;
|
|
71
68
|
}
|
|
72
69
|
|
|
73
|
-
.directive-embed
|
|
70
|
+
.directive-embed .consent-always-checkbox {
|
|
74
71
|
cursor: pointer;
|
|
75
|
-
margin: 0!important;
|
|
76
72
|
vertical-align: middle;
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
.directive-embed
|
|
75
|
+
.directive-embed .consent-accept-btn {
|
|
80
76
|
padding: 8px 24px;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
border:
|
|
77
|
+
color: var(--color-brand);
|
|
78
|
+
background: none;
|
|
79
|
+
border: 1px solid var(--color-brand);
|
|
84
80
|
border-radius: 4px;
|
|
85
81
|
cursor: pointer;
|
|
86
82
|
font-size: 0.95em;
|
|
87
83
|
}
|
|
88
84
|
|
|
89
|
-
.directive-embed
|
|
85
|
+
.directive-embed .consent-accept-btn:hover {
|
|
90
86
|
opacity: 0.9;
|
|
91
87
|
}
|
|
92
88
|
|
|
@@ -20,7 +20,7 @@ hyperbook.youtube.consent = (function () {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function loadContent(wrapper) {
|
|
23
|
-
var banner = wrapper.querySelector(".directive-youtube
|
|
23
|
+
var banner = wrapper.querySelector(".directive-youtube .consent-banner");
|
|
24
24
|
if (banner) {
|
|
25
25
|
banner.remove();
|
|
26
26
|
}
|
|
@@ -45,9 +45,9 @@ hyperbook.youtube.consent = (function () {
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
var btn = wrapper.querySelector(".directive-youtube
|
|
48
|
+
var btn = wrapper.querySelector(".directive-youtube .consent-accept-btn");
|
|
49
49
|
var checkbox = wrapper.querySelector(
|
|
50
|
-
".directive-youtube
|
|
50
|
+
".directive-youtube .consent-always-checkbox"
|
|
51
51
|
);
|
|
52
52
|
if (btn) {
|
|
53
53
|
btn.addEventListener("click", async function () {
|
|
@@ -57,7 +57,7 @@ hyperbook.youtube.consent = (function () {
|
|
|
57
57
|
loadContent(wrapper);
|
|
58
58
|
if (checkbox && checkbox.checked) {
|
|
59
59
|
document
|
|
60
|
-
.querySelectorAll(".directive-youtube
|
|
60
|
+
.querySelectorAll(".directive-youtube .consent")
|
|
61
61
|
.forEach(function (el) {
|
|
62
62
|
loadContent(el);
|
|
63
63
|
});
|
|
@@ -68,7 +68,7 @@ hyperbook.youtube.consent = (function () {
|
|
|
68
68
|
|
|
69
69
|
function init(root) {
|
|
70
70
|
var wrappers = root.querySelectorAll
|
|
71
|
-
? root.querySelectorAll(".directive-youtube
|
|
71
|
+
? root.querySelectorAll(".directive-youtube .consent")
|
|
72
72
|
: [];
|
|
73
73
|
wrappers.forEach(function (w) {
|
|
74
74
|
initWrapper(w);
|
|
@@ -14,41 +14,40 @@
|
|
|
14
14
|
height: 100%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.directive-youtube
|
|
17
|
+
.directive-youtube .consent {
|
|
18
18
|
position: absolute;
|
|
19
19
|
top: 0;
|
|
20
20
|
left: 0;
|
|
21
21
|
width: 100%;
|
|
22
22
|
height: 100%;
|
|
23
|
+
padding: 24px;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
border: 2px solid var(--color-brand, #333);
|
|
26
|
+
border-radius: 8px;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
.directive-youtube
|
|
29
|
+
.directive-youtube .consent iframe[data-consent-src] {
|
|
26
30
|
display: none;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
.directive-youtube
|
|
33
|
+
.directive-youtube .consent-banner {
|
|
30
34
|
display: flex;
|
|
31
35
|
flex-direction: column;
|
|
32
36
|
align-items: center;
|
|
33
37
|
justify-content: center;
|
|
34
38
|
gap: 12px;
|
|
35
|
-
padding: 24px;
|
|
36
|
-
background-color: var(--color-background-tinted, #f5f5f5);
|
|
37
|
-
border: 2px solid var(--color-brand, #333);
|
|
38
|
-
border-radius: 8px;
|
|
39
39
|
text-align: center;
|
|
40
|
-
height: 100%;
|
|
41
40
|
box-sizing: border-box;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
.directive-youtube
|
|
43
|
+
.directive-youtube .consent-banner-text {
|
|
45
44
|
font-size: 0.95em;
|
|
46
45
|
line-height: 1.5;
|
|
47
46
|
color: var(--color-text, #333);
|
|
48
47
|
max-width: 600px;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
.directive-youtube
|
|
50
|
+
.directive-youtube .consent-always-label {
|
|
52
51
|
display: flex;
|
|
53
52
|
align-items: center;
|
|
54
53
|
gap: 6px;
|
|
@@ -57,23 +56,23 @@
|
|
|
57
56
|
cursor: pointer;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
.directive-youtube
|
|
59
|
+
.directive-youtube .consent-always-checkbox {
|
|
61
60
|
cursor: pointer;
|
|
62
61
|
margin: 0!important;
|
|
63
62
|
vertical-align: middle;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
.directive-youtube
|
|
65
|
+
.directive-youtube .consent-accept-btn {
|
|
67
66
|
padding: 8px 24px;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
border:
|
|
67
|
+
color: var(--color-brand);
|
|
68
|
+
background: none;
|
|
69
|
+
border: 1px solid var(--color-brand);
|
|
71
70
|
border-radius: 4px;
|
|
72
71
|
cursor: pointer;
|
|
73
72
|
font-size: 0.95em;
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
.directive-youtube
|
|
75
|
+
.directive-youtube .consent-accept-btn:hover {
|
|
77
76
|
opacity: 0.9;
|
|
78
77
|
}
|
|
79
78
|
|
package/dist/index.js
CHANGED
|
@@ -174627,18 +174627,18 @@ var remarkDirectiveYoutube_default = (ctx) => () => {
|
|
|
174627
174627
|
type: "element",
|
|
174628
174628
|
tagName: "div",
|
|
174629
174629
|
properties: {
|
|
174630
|
-
class: "
|
|
174630
|
+
class: "consent"
|
|
174631
174631
|
},
|
|
174632
174632
|
children: [
|
|
174633
174633
|
{
|
|
174634
174634
|
type: "element",
|
|
174635
174635
|
tagName: "div",
|
|
174636
|
-
properties: { class: "
|
|
174636
|
+
properties: { class: "consent-banner" },
|
|
174637
174637
|
children: [
|
|
174638
174638
|
{
|
|
174639
174639
|
type: "element",
|
|
174640
174640
|
tagName: "p",
|
|
174641
|
-
properties: { class: "
|
|
174641
|
+
properties: { class: "consent-banner-text" },
|
|
174642
174642
|
children: [
|
|
174643
174643
|
{
|
|
174644
174644
|
type: "text",
|
|
@@ -174649,7 +174649,7 @@ var remarkDirectiveYoutube_default = (ctx) => () => {
|
|
|
174649
174649
|
{
|
|
174650
174650
|
type: "element",
|
|
174651
174651
|
tagName: "p",
|
|
174652
|
-
properties: { class: "
|
|
174652
|
+
properties: { class: "consent-banner-text" },
|
|
174653
174653
|
children: [
|
|
174654
174654
|
{
|
|
174655
174655
|
type: "text",
|
|
@@ -174660,14 +174660,14 @@ var remarkDirectiveYoutube_default = (ctx) => () => {
|
|
|
174660
174660
|
{
|
|
174661
174661
|
type: "element",
|
|
174662
174662
|
tagName: "label",
|
|
174663
|
-
properties: { class: "
|
|
174663
|
+
properties: { class: "consent-always-label" },
|
|
174664
174664
|
children: [
|
|
174665
174665
|
{
|
|
174666
174666
|
type: "element",
|
|
174667
174667
|
tagName: "input",
|
|
174668
174668
|
properties: {
|
|
174669
174669
|
type: "checkbox",
|
|
174670
|
-
class: "
|
|
174670
|
+
class: "consent-always-checkbox"
|
|
174671
174671
|
},
|
|
174672
174672
|
children: []
|
|
174673
174673
|
},
|
|
@@ -174680,7 +174680,7 @@ var remarkDirectiveYoutube_default = (ctx) => () => {
|
|
|
174680
174680
|
{
|
|
174681
174681
|
type: "element",
|
|
174682
174682
|
tagName: "button",
|
|
174683
|
-
properties: { class: "
|
|
174683
|
+
properties: { class: "consent-accept-btn" },
|
|
174684
174684
|
children: [
|
|
174685
174685
|
{ type: "text", value: i18n.get("consent-youtube-accept") }
|
|
174686
174686
|
]
|
|
@@ -180549,19 +180549,19 @@ var remarkDirectiveEmbed_default = (ctx) => () => {
|
|
|
180549
180549
|
type: "element",
|
|
180550
180550
|
tagName: "div",
|
|
180551
180551
|
properties: {
|
|
180552
|
-
class: "
|
|
180552
|
+
class: "consent",
|
|
180553
180553
|
"data-consent-src": src
|
|
180554
180554
|
},
|
|
180555
180555
|
children: [
|
|
180556
180556
|
{
|
|
180557
180557
|
type: "element",
|
|
180558
180558
|
tagName: "div",
|
|
180559
|
-
properties: { class: "
|
|
180559
|
+
properties: { class: "consent-banner" },
|
|
180560
180560
|
children: [
|
|
180561
180561
|
{
|
|
180562
180562
|
type: "element",
|
|
180563
180563
|
tagName: "p",
|
|
180564
|
-
properties: { class: "
|
|
180564
|
+
properties: { class: "consent-banner-text" },
|
|
180565
180565
|
children: [
|
|
180566
180566
|
{
|
|
180567
180567
|
type: "text",
|
|
@@ -180607,7 +180607,7 @@ var remarkDirectiveEmbed_default = (ctx) => () => {
|
|
|
180607
180607
|
type: "element",
|
|
180608
180608
|
tagName: "label",
|
|
180609
180609
|
properties: {
|
|
180610
|
-
class: "
|
|
180610
|
+
class: "consent-always-label"
|
|
180611
180611
|
},
|
|
180612
180612
|
children: [
|
|
180613
180613
|
{
|
|
@@ -180615,7 +180615,7 @@ var remarkDirectiveEmbed_default = (ctx) => () => {
|
|
|
180615
180615
|
tagName: "input",
|
|
180616
180616
|
properties: {
|
|
180617
180617
|
type: "checkbox",
|
|
180618
|
-
class: "
|
|
180618
|
+
class: "consent-always-checkbox"
|
|
180619
180619
|
},
|
|
180620
180620
|
children: []
|
|
180621
180621
|
},
|
|
@@ -180629,7 +180629,7 @@ var remarkDirectiveEmbed_default = (ctx) => () => {
|
|
|
180629
180629
|
type: "element",
|
|
180630
180630
|
tagName: "button",
|
|
180631
180631
|
properties: {
|
|
180632
|
-
class: "
|
|
180632
|
+
class: "consent-accept-btn"
|
|
180633
180633
|
},
|
|
180634
180634
|
children: [
|
|
180635
180635
|
{
|
|
@@ -201024,7 +201024,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
|
|
|
201024
201024
|
/***/ ((module) => {
|
|
201025
201025
|
|
|
201026
201026
|
"use strict";
|
|
201027
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.86.
|
|
201027
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.86.1","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":">=18"},"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 --external favicons --external sharp && node postbuild.mjs"},"dependencies":{"favicons":"^7.2.0"},"devDependencies":{"create-hyperbook":"workspace:*","@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"}}');
|
|
201028
201028
|
|
|
201029
201029
|
/***/ })
|
|
201030
201030
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyperbook",
|
|
3
|
-
"version": "0.86.
|
|
3
|
+
"version": "0.86.1",
|
|
4
4
|
"author": "Mike Barkmin",
|
|
5
5
|
"homepage": "https://github.com/openpatch/hyperbook#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"tar": "7.4.3",
|
|
57
57
|
"update-check": "1.5.4",
|
|
58
58
|
"ws": "^8.18.0",
|
|
59
|
+
"@hyperbook/markdown": "0.58.1",
|
|
59
60
|
"@hyperbook/fs": "0.24.2",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"@hyperbook/types": "0.22.1"
|
|
61
|
+
"@hyperbook/types": "0.22.1",
|
|
62
|
+
"create-hyperbook": "0.3.5"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"version": "pnpm build",
|