@hyperbook/markdown 0.12.2 → 0.13.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.
- package/dist/assets/client.js +4 -1
- package/dist/index.js +22 -10
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/assets/client.js
CHANGED
|
@@ -50,7 +50,10 @@ var hyperbook = (function () {
|
|
|
50
50
|
ecl: "M",
|
|
51
51
|
});
|
|
52
52
|
qrcodeEl.innerHTML = qrcode.svg();
|
|
53
|
-
urlEl
|
|
53
|
+
for (let urlEl of urlEls[0].children) {
|
|
54
|
+
const href = urlEl.getAttribute("data-href");
|
|
55
|
+
urlEl.innerHTML = `${window.location.origin}${href}`;
|
|
56
|
+
}
|
|
54
57
|
|
|
55
58
|
qrCodeDialog.showModal();
|
|
56
59
|
}
|
package/dist/index.js
CHANGED
|
@@ -72072,6 +72072,26 @@ var rehypeQrCode_default = (ctx) => () => {
|
|
|
72072
72072
|
if (!qrcode || !ctx.navigation.current?.href) {
|
|
72073
72073
|
return;
|
|
72074
72074
|
}
|
|
72075
|
+
const urls = [
|
|
72076
|
+
{
|
|
72077
|
+
type: "element",
|
|
72078
|
+
tagName: "div",
|
|
72079
|
+
properties: {
|
|
72080
|
+
"data-href": `${ctx.makeUrl(ctx.navigation.current?.href || "", "public")}`
|
|
72081
|
+
},
|
|
72082
|
+
children: []
|
|
72083
|
+
}
|
|
72084
|
+
];
|
|
72085
|
+
if (ctx.navigation.current.permaid) {
|
|
72086
|
+
urls.push({
|
|
72087
|
+
type: "element",
|
|
72088
|
+
tagName: "div",
|
|
72089
|
+
properties: {
|
|
72090
|
+
"data-href": `${ctx.makeUrl(["/", "@", ctx.navigation.current.permaid || ""], "public")}`
|
|
72091
|
+
},
|
|
72092
|
+
children: []
|
|
72093
|
+
});
|
|
72094
|
+
}
|
|
72075
72095
|
const qrcodeDialog = [
|
|
72076
72096
|
{
|
|
72077
72097
|
type: "element",
|
|
@@ -72133,15 +72153,7 @@ var rehypeQrCode_default = (ctx) => () => {
|
|
|
72133
72153
|
properties: {
|
|
72134
72154
|
class: "url"
|
|
72135
72155
|
},
|
|
72136
|
-
children:
|
|
72137
|
-
{
|
|
72138
|
-
type: "text",
|
|
72139
|
-
value: `${ctx.makeUrl(
|
|
72140
|
-
ctx.navigation.current?.href || "",
|
|
72141
|
-
"public"
|
|
72142
|
-
)}`
|
|
72143
|
-
}
|
|
72144
|
-
]
|
|
72156
|
+
children: urls
|
|
72145
72157
|
}
|
|
72146
72158
|
]
|
|
72147
72159
|
},
|
|
@@ -72184,7 +72196,6 @@ var remark = (ctx) => {
|
|
|
72184
72196
|
remarkHeadings_default(ctx),
|
|
72185
72197
|
remarkImage_default(ctx),
|
|
72186
72198
|
remarkGfm,
|
|
72187
|
-
remarkCode_default(ctx),
|
|
72188
72199
|
remarkDirectiveTerm_default(ctx),
|
|
72189
72200
|
remarkDirectiveEmbed_default(ctx),
|
|
72190
72201
|
remarkDirectiveArchive_default(ctx),
|
|
@@ -72207,6 +72218,7 @@ var remark = (ctx) => {
|
|
|
72207
72218
|
remarkDirectiveExcalidraw_default(ctx),
|
|
72208
72219
|
remarkDirectiveStruktog_default(ctx),
|
|
72209
72220
|
remarkCollectHeadings_default(ctx),
|
|
72221
|
+
remarkCode_default(ctx),
|
|
72210
72222
|
remarkMath,
|
|
72211
72223
|
remarkGemoji,
|
|
72212
72224
|
remarkUnwrapImages,
|