@hyperbook/markdown 0.27.0 → 0.28.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.
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.directive-multievent table {
|
|
2
|
+
width: auto;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.directive-multievent table td {
|
|
6
|
+
display: table-cell;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.directive-multievent {
|
|
11
|
+
|
|
12
|
+
.MECheckbox:not(first-child),
|
|
13
|
+
.MERadio:not(first-child) {
|
|
14
|
+
margin-left: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.MECheckbox,
|
|
18
|
+
.MERadio {
|
|
19
|
+
margin-right: 4px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.MeChLabel~.MECheckbox,
|
|
23
|
+
.MeRaLabel~.MERadio {
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.MeChLabel~.MECheckbox:not(first-child),
|
|
28
|
+
.MeRaLabel~.MERadio:not(first-child) {
|
|
29
|
+
margin-left: 4px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
table.MultiKwrTable,
|
|
33
|
+
table.MultiEvSuchTable {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
border: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
table.MultiKwrTable *,
|
|
39
|
+
table.MultiEvSuchTable * {
|
|
40
|
+
line-height: 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.MultiKwrTable tr,
|
|
44
|
+
.MultiEvSuchTable tr {
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
border: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.MultiKwrTable td,
|
|
50
|
+
.MultiEvSuchTable td {
|
|
51
|
+
padding: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -75776,10 +75776,92 @@ var remarkDirectiveJSXGraph_default = (ctx) => () => {
|
|
|
75776
75776
|
};
|
|
75777
75777
|
};
|
|
75778
75778
|
|
|
75779
|
+
// src/remarkDirectiveMultievent.ts
|
|
75780
|
+
var remarkDirectiveMultievent_default = (ctx) => () => {
|
|
75781
|
+
const name = "multievent";
|
|
75782
|
+
return (tree, file) => {
|
|
75783
|
+
visit(tree, function(node3) {
|
|
75784
|
+
if (isDirective(node3)) {
|
|
75785
|
+
if (node3.name !== name) return;
|
|
75786
|
+
const data = node3.data || (node3.data = {});
|
|
75787
|
+
expectContainerDirective(node3, file, name);
|
|
75788
|
+
registerDirective(file, name, ["multievent.js"], ["style.css"]);
|
|
75789
|
+
data.hName = "div";
|
|
75790
|
+
data.hProperties = {
|
|
75791
|
+
class: "directive-multievent multievent"
|
|
75792
|
+
};
|
|
75793
|
+
}
|
|
75794
|
+
});
|
|
75795
|
+
};
|
|
75796
|
+
};
|
|
75797
|
+
|
|
75798
|
+
// src/remarkSubSup.ts
|
|
75799
|
+
function supersub() {
|
|
75800
|
+
return (tree) => {
|
|
75801
|
+
visit(tree, ["text"], (node3, i, parent) => {
|
|
75802
|
+
if (node3.type !== "text") {
|
|
75803
|
+
return;
|
|
75804
|
+
}
|
|
75805
|
+
const { value } = node3;
|
|
75806
|
+
const values = value.split(/\^/);
|
|
75807
|
+
if (values.length === 1 || values.length % 2 === 0) {
|
|
75808
|
+
return;
|
|
75809
|
+
}
|
|
75810
|
+
const children = values.map(
|
|
75811
|
+
(str, i2) => i2 % 2 === 0 ? {
|
|
75812
|
+
type: "text",
|
|
75813
|
+
value: str
|
|
75814
|
+
} : {
|
|
75815
|
+
type: "superscript",
|
|
75816
|
+
data: {
|
|
75817
|
+
hName: "sup"
|
|
75818
|
+
},
|
|
75819
|
+
children: [
|
|
75820
|
+
{
|
|
75821
|
+
type: "text",
|
|
75822
|
+
value: str
|
|
75823
|
+
}
|
|
75824
|
+
]
|
|
75825
|
+
}
|
|
75826
|
+
);
|
|
75827
|
+
parent.children.splice(i, 1, ...children);
|
|
75828
|
+
});
|
|
75829
|
+
visit(tree, ["text"], (node3, i, parent) => {
|
|
75830
|
+
if (node3.type !== "text") {
|
|
75831
|
+
return;
|
|
75832
|
+
}
|
|
75833
|
+
const { value } = node3;
|
|
75834
|
+
const values = value.split(/\_/);
|
|
75835
|
+
if (values.length === 1 || values.length % 2 === 0) {
|
|
75836
|
+
return;
|
|
75837
|
+
}
|
|
75838
|
+
const children = values.map(
|
|
75839
|
+
(str, i2) => i2 % 2 === 0 ? {
|
|
75840
|
+
type: "text",
|
|
75841
|
+
value: str
|
|
75842
|
+
} : {
|
|
75843
|
+
type: "subscript",
|
|
75844
|
+
data: {
|
|
75845
|
+
hName: "sub"
|
|
75846
|
+
},
|
|
75847
|
+
children: [
|
|
75848
|
+
{
|
|
75849
|
+
type: "text",
|
|
75850
|
+
value: str
|
|
75851
|
+
}
|
|
75852
|
+
]
|
|
75853
|
+
}
|
|
75854
|
+
);
|
|
75855
|
+
parent.children.splice(i, 1, ...children);
|
|
75856
|
+
});
|
|
75857
|
+
};
|
|
75858
|
+
}
|
|
75859
|
+
|
|
75779
75860
|
// src/process.ts
|
|
75780
75861
|
var remark = (ctx) => {
|
|
75781
75862
|
i18n.init(ctx.config.language || "en");
|
|
75782
75863
|
const remarkPlugins = [
|
|
75864
|
+
supersub,
|
|
75783
75865
|
remarkRemoveComments,
|
|
75784
75866
|
remarkGemoji,
|
|
75785
75867
|
remarkDirective,
|
|
@@ -75816,6 +75898,7 @@ var remark = (ctx) => {
|
|
|
75816
75898
|
remarkDirectiveWebide_default(ctx),
|
|
75817
75899
|
remarkDirectiveH5P_default(ctx),
|
|
75818
75900
|
remarkDirectiveJSXGraph_default(ctx),
|
|
75901
|
+
remarkDirectiveMultievent_default(ctx),
|
|
75819
75902
|
remarkCode_default(ctx),
|
|
75820
75903
|
remarkMath,
|
|
75821
75904
|
/* needs to be last directive */
|