@vxrn/mdx 1.1.416 → 1.1.418
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/index.js +7 -13
- package/dist/index.js.map +3 -3
- package/dist/index.native.js +7 -23
- package/dist/index.native.js.map +3 -3
- package/package.json +18 -17
package/dist/index.js
CHANGED
|
@@ -7604,13 +7604,13 @@ function isNode(value) {
|
|
|
7604
7604
|
return !!(value && typeof value == "object" && "type" in value);
|
|
7605
7605
|
}
|
|
7606
7606
|
|
|
7607
|
-
// ../../node_modules/
|
|
7607
|
+
// ../../node_modules/hast-util-heading-rank/lib/index.js
|
|
7608
7608
|
function headingRank(node) {
|
|
7609
7609
|
let name = node && node.type === "element" && node.tagName.toLowerCase() || "", code = name.length === 2 && name.charCodeAt(0) === 104 ? name.charCodeAt(1) : 0;
|
|
7610
7610
|
return code > 48 && code < 55 ? code - 48 : null;
|
|
7611
7611
|
}
|
|
7612
7612
|
|
|
7613
|
-
// ../../node_modules/
|
|
7613
|
+
// ../../node_modules/hast-util-is-element/index.js
|
|
7614
7614
|
var convertElement = (
|
|
7615
7615
|
/**
|
|
7616
7616
|
* @type {(
|
|
@@ -7913,12 +7913,6 @@ function slug(value, maintainCase) {
|
|
|
7913
7913
|
return typeof value != "string" ? "" : (maintainCase || (value = value.toLowerCase()), value.replace(regex, "").replace(/ /g, "-"));
|
|
7914
7914
|
}
|
|
7915
7915
|
|
|
7916
|
-
// ../../node_modules/rehype-slug/node_modules/hast-util-heading-rank/lib/index.js
|
|
7917
|
-
function headingRank2(node) {
|
|
7918
|
-
let name = node && node.type === "element" && node.tagName.toLowerCase() || "", code = name.length === 2 && name.charCodeAt(0) === 104 ? name.charCodeAt(1) : 0;
|
|
7919
|
-
return code > 48 && code < 55 ? code - 48 : null;
|
|
7920
|
-
}
|
|
7921
|
-
|
|
7922
7916
|
// ../../node_modules/hast-util-to-string/index.js
|
|
7923
7917
|
function toString(node) {
|
|
7924
7918
|
return "children" in node ? all(node) : "value" in node ? node.value : "";
|
|
@@ -8086,7 +8080,7 @@ function rehypeSlug(options2 = {}) {
|
|
|
8086
8080
|
let prefix = options2.prefix || "";
|
|
8087
8081
|
return (tree) => {
|
|
8088
8082
|
slugs.reset(), visit2(tree, "element", (node) => {
|
|
8089
|
-
|
|
8083
|
+
headingRank(node) && node.properties && !hasProperty(node, "id") && (node.properties.id = prefix + slugs.slug(toString(node)));
|
|
8090
8084
|
});
|
|
8091
8085
|
};
|
|
8092
8086
|
}
|
|
@@ -12825,7 +12819,7 @@ function camelcase($0) {
|
|
|
12825
12819
|
// ../../node_modules/property-information/index.js
|
|
12826
12820
|
var html2 = merge([xml, xlink, xmlns, aria, html], "html"), svg2 = merge([xml, xlink, xmlns, aria, svg], "svg");
|
|
12827
12821
|
|
|
12828
|
-
// ../../node_modules/
|
|
12822
|
+
// ../../node_modules/hast-util-parse-selector/lib/index.js
|
|
12829
12823
|
var search = /[#.]/g;
|
|
12830
12824
|
function parseSelector(selector, defaultTagName) {
|
|
12831
12825
|
let value = selector || "", props = {}, start = 0, previous, tagName;
|
|
@@ -16088,7 +16082,7 @@ function tsx(Prism2) {
|
|
|
16088
16082
|
// src/rehypeHighlightCode.tsx
|
|
16089
16083
|
var import_unist_util_visit3 = __toESM(require_unist_util_visit());
|
|
16090
16084
|
|
|
16091
|
-
// ../../node_modules/
|
|
16085
|
+
// ../../node_modules/html-void-elements/index.js
|
|
16092
16086
|
var htmlVoidElements = [
|
|
16093
16087
|
"area",
|
|
16094
16088
|
"base",
|
|
@@ -16840,7 +16834,7 @@ function all2(parent) {
|
|
|
16840
16834
|
// ../../node_modules/rehype-parse/lib/index.js
|
|
16841
16835
|
var import_parser = __toESM(require_parser(), 1);
|
|
16842
16836
|
|
|
16843
|
-
// ../../node_modules/
|
|
16837
|
+
// ../../node_modules/vfile-location/lib/index.js
|
|
16844
16838
|
function location(file) {
|
|
16845
16839
|
let value = String(file), indices = [], search2 = /\r?\n|\r/g;
|
|
16846
16840
|
for (; search2.test(value); )
|
|
@@ -16880,7 +16874,7 @@ var webNamespaces = {
|
|
|
16880
16874
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
16881
16875
|
};
|
|
16882
16876
|
|
|
16883
|
-
// ../../node_modules/
|
|
16877
|
+
// ../../node_modules/hast-util-from-parse5/lib/index.js
|
|
16884
16878
|
var own10 = {}.hasOwnProperty, proto = Object.prototype;
|
|
16885
16879
|
function fromParse5(tree, options2) {
|
|
16886
16880
|
let options_ = options2 || {}, settings, file;
|