@hyperbook/markdown 0.17.0 → 0.18.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/shell.css +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/assets/shell.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -63162,7 +63162,15 @@ var remarkDirectiveTabs_default = (ctx) => () => {
|
|
|
63162
63162
|
let first = true;
|
|
63163
63163
|
node3.children.filter(isDirective).forEach((node4) => {
|
|
63164
63164
|
expectContainerDirective(node4, file, "tab");
|
|
63165
|
-
let { title, id: tabId = hash(node4) } = node4.attributes || {};
|
|
63165
|
+
let { title = "", id: tabId = hash(node4) } = node4.attributes || {};
|
|
63166
|
+
let tree2 = remark(ctx).parse(title);
|
|
63167
|
+
remarkGemoji()(tree2);
|
|
63168
|
+
let hastTree = toHast(tree2);
|
|
63169
|
+
if (hastTree.type === "root" && hastTree.children[0]?.type === "element" && hastTree.children[0]?.tagName === "p") {
|
|
63170
|
+
hastTree = hastTree.children[0];
|
|
63171
|
+
hastTree.tagName = "span";
|
|
63172
|
+
}
|
|
63173
|
+
console.log(JSON.stringify(hastTree, null, 2));
|
|
63166
63174
|
tabTitleElements.push({
|
|
63167
63175
|
type: "element",
|
|
63168
63176
|
tagName: "button",
|
|
@@ -63171,12 +63179,7 @@ var remarkDirectiveTabs_default = (ctx) => () => {
|
|
|
63171
63179
|
"data-tabs-id": tabsId,
|
|
63172
63180
|
class: "tab" + (first ? " active" : "")
|
|
63173
63181
|
},
|
|
63174
|
-
children: [
|
|
63175
|
-
{
|
|
63176
|
-
type: "text",
|
|
63177
|
-
value: title || ""
|
|
63178
|
-
}
|
|
63179
|
-
]
|
|
63182
|
+
children: hastTree.children || []
|
|
63180
63183
|
});
|
|
63181
63184
|
tabContentElements.push({
|
|
63182
63185
|
type: "element",
|
|
@@ -64122,8 +64125,10 @@ var makeRootCssElement = ({
|
|
|
64122
64125
|
let rootCss = `
|
|
64123
64126
|
html,
|
|
64124
64127
|
body {
|
|
64125
|
-
overflow
|
|
64128
|
+
overflow: hidden;
|
|
64126
64129
|
margin: 0;
|
|
64130
|
+
height: 100dvh;
|
|
64131
|
+
width: 100dvw;
|
|
64127
64132
|
}
|
|
64128
64133
|
|
|
64129
64134
|
body {
|
|
@@ -72462,6 +72467,7 @@ var remarkDirectiveGeogebra_default = (ctx) => () => {
|
|
|
72462
72467
|
var remark = (ctx) => {
|
|
72463
72468
|
const remarkPlugins = [
|
|
72464
72469
|
remarkRemoveComments,
|
|
72470
|
+
remarkGemoji,
|
|
72465
72471
|
remarkDirective,
|
|
72466
72472
|
dist_default,
|
|
72467
72473
|
remarkDirectivePagelist_default(ctx),
|
|
@@ -72493,7 +72499,6 @@ var remark = (ctx) => {
|
|
|
72493
72499
|
remarkDirectiveGeogebra_default(ctx),
|
|
72494
72500
|
remarkCode_default(ctx),
|
|
72495
72501
|
remarkMath,
|
|
72496
|
-
remarkGemoji,
|
|
72497
72502
|
remarkUnwrapImages,
|
|
72498
72503
|
/* needs to be last directive */
|
|
72499
72504
|
remarkDirectiveProtect_default(ctx),
|