@vxrn/mdx 1.2.6 → 1.2.8
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/package.json +2 -3
- package/dist/index.native.js +0 -417
- package/dist/index.native.js.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/mdx",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"// 👋 note - import === require here, mdx-bundler is cjs only must await import() this package": "./",
|
|
10
10
|
"import": "./dist/index.js",
|
|
11
11
|
"require": "./dist/index.js",
|
|
12
|
-
"react-native": "./dist/index.native.js",
|
|
13
12
|
"default": "./dist/index.native.js"
|
|
14
13
|
}
|
|
15
14
|
},
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
"dist"
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
|
-
"build": "tamagui-build --bundle --bundle-modules",
|
|
23
|
+
"build": "tamagui-build --skip-native --bundle --bundle-modules",
|
|
25
24
|
"clean": "tamagui-build clean",
|
|
26
25
|
"clean:build": "tamagui-build clean:build",
|
|
27
26
|
"lint": "biome check src",
|
package/dist/index.native.js
DELETED
|
@@ -1,417 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name in all)
|
|
12
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
13
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
25
|
-
mod
|
|
26
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/mdx-bundler/dist/dirname-messed-up.cjs
|
|
29
|
-
var require_dirname_messed_up = __commonJS({
|
|
30
|
-
"../../node_modules/mdx-bundler/dist/dirname-messed-up.cjs"(exports, module2) {
|
|
31
|
-
"use strict";
|
|
32
|
-
module2.exports = !__dirname.includes("mdx-bundler");
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// ../../node_modules/mdx-bundler/dist/index.js
|
|
37
|
-
var require_dist = __commonJS({
|
|
38
|
-
"../../node_modules/mdx-bundler/dist/index.js"(exports) {
|
|
39
|
-
"use strict";
|
|
40
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
41
|
-
Object.defineProperty(exports, "__esModule", {
|
|
42
|
-
value: !0
|
|
43
|
-
});
|
|
44
|
-
exports.bundleMDX = bundleMDX2;
|
|
45
|
-
var _fs = _interopRequireDefault(require("fs")), _path = _interopRequireDefault(require("path")), _string_decoder = require("string_decoder"), _grayMatter = _interopRequireDefault(require("gray-matter")), esbuild = _interopRequireWildcard(require("esbuild-wasm")), _nodeResolve = require("@esbuild-plugins/node-resolve"), _esbuildPluginGlobalExternals = require("@fal-works/esbuild-plugin-global-externals"), _uuid = require("uuid"), _dirnameMessedUp = _interopRequireDefault(require_dirname_messed_up());
|
|
46
|
-
function _getRequireWildcardCache(e) {
|
|
47
|
-
if (typeof WeakMap != "function") return null;
|
|
48
|
-
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
|
49
|
-
return (_getRequireWildcardCache = function(e2) {
|
|
50
|
-
return e2 ? t : r;
|
|
51
|
-
})(e);
|
|
52
|
-
}
|
|
53
|
-
function _interopRequireWildcard(e, r) {
|
|
54
|
-
if (!r && e && e.__esModule) return e;
|
|
55
|
-
if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
|
|
56
|
-
var t = _getRequireWildcardCache(r);
|
|
57
|
-
if (t && t.has(e)) return t.get(e);
|
|
58
|
-
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
59
|
-
for (var u in e) if (u !== "default" && {}.hasOwnProperty.call(e, u)) {
|
|
60
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
61
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
62
|
-
}
|
|
63
|
-
return n.default = e, t && t.set(e, n), n;
|
|
64
|
-
}
|
|
65
|
-
var {
|
|
66
|
-
readFile,
|
|
67
|
-
unlink
|
|
68
|
-
} = _fs.default.promises;
|
|
69
|
-
async function bundleMDX2({
|
|
70
|
-
file,
|
|
71
|
-
source,
|
|
72
|
-
files = {},
|
|
73
|
-
mdxOptions = (options) => options,
|
|
74
|
-
esbuildOptions = (options) => options,
|
|
75
|
-
globals = {},
|
|
76
|
-
cwd = _path.default.join(process.cwd(), "__mdx_bundler_fake_dir__"),
|
|
77
|
-
grayMatterOptions = (options) => options,
|
|
78
|
-
bundleDirectory,
|
|
79
|
-
bundlePath
|
|
80
|
-
}) {
|
|
81
|
-
_dirnameMessedUp.default;
|
|
82
|
-
let [{
|
|
83
|
-
default: mdxESBuild
|
|
84
|
-
}, {
|
|
85
|
-
default: remarkFrontmatter
|
|
86
|
-
}, {
|
|
87
|
-
default: remarkMdxFrontmatter
|
|
88
|
-
}] = await Promise.all([import("@mdx-js/esbuild"), import("remark-frontmatter"), import("remark-mdx-frontmatter")]), code, entryPath, matter2, absoluteFiles = {}, isWriting = typeof bundleDirectory == "string";
|
|
89
|
-
if (typeof bundleDirectory != typeof bundlePath)
|
|
90
|
-
throw new Error("When using `bundleDirectory` or `bundlePath` the other must be set.");
|
|
91
|
-
function isVFile(vfile) {
|
|
92
|
-
return typeof vfile == "object" && vfile !== null && "value" in vfile;
|
|
93
|
-
}
|
|
94
|
-
if (typeof source == "string")
|
|
95
|
-
matter2 = (0, _grayMatter.default)(source, grayMatterOptions({})), entryPath = _path.default.join(cwd, `./_mdx_bundler_entry_point-${(0, _uuid.v4)()}.mdx`), absoluteFiles[entryPath] = source;
|
|
96
|
-
else if (isVFile(source)) {
|
|
97
|
-
let value = String(source.value);
|
|
98
|
-
matter2 = (0, _grayMatter.default)(value, grayMatterOptions({})), entryPath = source.path ? _path.default.isAbsolute(source.path) ? source.path : _path.default.join(source.cwd, source.path) : _path.default.join(cwd, `./_mdx_bundler_entry_point-${(0, _uuid.v4)()}.mdx`), absoluteFiles[entryPath] = value;
|
|
99
|
-
} else if (typeof file == "string")
|
|
100
|
-
matter2 = _grayMatter.default.read(file, grayMatterOptions({})), entryPath = file;
|
|
101
|
-
else
|
|
102
|
-
throw new Error("`source` or `file` must be defined");
|
|
103
|
-
for (let [filepath, fileCode] of Object.entries(files))
|
|
104
|
-
absoluteFiles[_path.default.join(cwd, filepath)] = fileCode;
|
|
105
|
-
let inMemoryPlugin = {
|
|
106
|
-
name: "inMemory",
|
|
107
|
-
setup(build) {
|
|
108
|
-
build.onResolve({
|
|
109
|
-
filter: /.*/
|
|
110
|
-
}, ({
|
|
111
|
-
path: filePath,
|
|
112
|
-
importer
|
|
113
|
-
}) => {
|
|
114
|
-
if (filePath === entryPath)
|
|
115
|
-
return {
|
|
116
|
-
path: filePath,
|
|
117
|
-
pluginData: {
|
|
118
|
-
inMemory: !0,
|
|
119
|
-
contents: absoluteFiles[filePath]
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
let modulePath = _path.default.resolve(_path.default.dirname(importer), filePath);
|
|
123
|
-
if (modulePath in absoluteFiles)
|
|
124
|
-
return {
|
|
125
|
-
path: modulePath,
|
|
126
|
-
pluginData: {
|
|
127
|
-
inMemory: !0,
|
|
128
|
-
contents: absoluteFiles[modulePath]
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
for (let ext of [".js", ".ts", ".jsx", ".tsx", ".json", ".mdx"]) {
|
|
132
|
-
let fullModulePath = `${modulePath}${ext}`;
|
|
133
|
-
if (fullModulePath in absoluteFiles)
|
|
134
|
-
return {
|
|
135
|
-
path: fullModulePath,
|
|
136
|
-
pluginData: {
|
|
137
|
-
inMemory: !0,
|
|
138
|
-
contents: absoluteFiles[fullModulePath]
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
return {};
|
|
143
|
-
}), build.onLoad({
|
|
144
|
-
filter: /.*/
|
|
145
|
-
}, async ({
|
|
146
|
-
path: filePath,
|
|
147
|
-
pluginData
|
|
148
|
-
}) => {
|
|
149
|
-
if (pluginData === void 0 || !pluginData.inMemory)
|
|
150
|
-
return null;
|
|
151
|
-
let fileType = (_path.default.extname(filePath) || ".jsx").slice(1), contents = absoluteFiles[filePath];
|
|
152
|
-
if (fileType === "mdx") return null;
|
|
153
|
-
let loader;
|
|
154
|
-
return build.initialOptions.loader && build.initialOptions.loader[`.${fileType}`] ? loader = build.initialOptions.loader[`.${fileType}`] : loader = /** @type import('esbuild').Loader */
|
|
155
|
-
fileType, {
|
|
156
|
-
contents,
|
|
157
|
-
loader
|
|
158
|
-
};
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}, buildOptions = esbuildOptions({
|
|
162
|
-
entryPoints: [entryPath],
|
|
163
|
-
write: isWriting,
|
|
164
|
-
outdir: isWriting ? bundleDirectory : void 0,
|
|
165
|
-
publicPath: isWriting ? bundlePath : void 0,
|
|
166
|
-
absWorkingDir: cwd,
|
|
167
|
-
define: {
|
|
168
|
-
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV ?? "production")
|
|
169
|
-
},
|
|
170
|
-
plugins: [
|
|
171
|
-
(0, _esbuildPluginGlobalExternals.globalExternals)({
|
|
172
|
-
...globals,
|
|
173
|
-
react: {
|
|
174
|
-
varName: "React",
|
|
175
|
-
type: "cjs"
|
|
176
|
-
},
|
|
177
|
-
"react-dom": {
|
|
178
|
-
varName: "ReactDOM",
|
|
179
|
-
type: "cjs"
|
|
180
|
-
},
|
|
181
|
-
"react/jsx-runtime": {
|
|
182
|
-
varName: "_jsx_runtime",
|
|
183
|
-
type: "cjs"
|
|
184
|
-
}
|
|
185
|
-
}),
|
|
186
|
-
// eslint-disable-next-line new-cap
|
|
187
|
-
(0, _nodeResolve.NodeResolvePlugin)({
|
|
188
|
-
extensions: [".js", ".ts", ".jsx", ".tsx"],
|
|
189
|
-
resolveOptions: {
|
|
190
|
-
basedir: cwd
|
|
191
|
-
}
|
|
192
|
-
}),
|
|
193
|
-
inMemoryPlugin,
|
|
194
|
-
mdxESBuild(mdxOptions({
|
|
195
|
-
remarkPlugins: [remarkFrontmatter, [remarkMdxFrontmatter, {
|
|
196
|
-
name: "frontmatter"
|
|
197
|
-
}]]
|
|
198
|
-
}, matter2.data))
|
|
199
|
-
],
|
|
200
|
-
bundle: !0,
|
|
201
|
-
format: "iife",
|
|
202
|
-
globalName: "Component",
|
|
203
|
-
minify: !0
|
|
204
|
-
}, matter2.data), bundled = await esbuild.build(buildOptions);
|
|
205
|
-
if (bundled.outputFiles)
|
|
206
|
-
code = new _string_decoder.StringDecoder("utf8").write(Buffer.from(bundled.outputFiles[0].contents));
|
|
207
|
-
else if (buildOptions.outdir && buildOptions.write) {
|
|
208
|
-
let entryFile = (
|
|
209
|
-
/** @type {{entryPoints: string[]}} */
|
|
210
|
-
buildOptions.entryPoints[0]
|
|
211
|
-
), fileName = _path.default.basename(entryFile).replace(/\.[^/.]+$/, ".js");
|
|
212
|
-
code = (await readFile(_path.default.join(buildOptions.outdir, fileName))).toString(), await unlink(_path.default.join(buildOptions.outdir, fileName));
|
|
213
|
-
} else
|
|
214
|
-
throw new Error("You must either specify `write: false` or `write: true` and `outdir: '/path'` in your esbuild options");
|
|
215
|
-
return {
|
|
216
|
-
code: `${code};return Component;`,
|
|
217
|
-
frontmatter: matter2.data,
|
|
218
|
-
errors: bundled.errors,
|
|
219
|
-
matter: matter2
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
// src/index.ts
|
|
226
|
-
var index_exports = {};
|
|
227
|
-
__export(index_exports, {
|
|
228
|
-
createCodeHighlighter: () => createCodeHighlighter,
|
|
229
|
-
getAllFrontmatter: () => getAllFrontmatter,
|
|
230
|
-
getAllVersionsFromPath: () => getAllVersionsFromPath,
|
|
231
|
-
getMDX: () => getMDX,
|
|
232
|
-
getMDXBySlug: () => getMDXBySlug
|
|
233
|
-
});
|
|
234
|
-
module.exports = __toCommonJS(index_exports);
|
|
235
|
-
|
|
236
|
-
// src/getAllFrontmatter.tsx
|
|
237
|
-
var import_node_fs = __toESM(require("node:fs")), import_node_path = __toESM(require("node:path")), import_fast_glob = __toESM(require("fast-glob")), import_gray_matter = __toESM(require("gray-matter")), import_reading_time = __toESM(require("reading-time"));
|
|
238
|
-
|
|
239
|
-
// src/getHeadings.ts
|
|
240
|
-
var getTitle = (source) => source.replace(/^#+\s+/, "").replace(/<.*>/, " "), getHeadings = (source) => source.split(`
|
|
241
|
-
`).filter((x) => x.startsWith("#")).map((x) => ({
|
|
242
|
-
title: getTitle(x),
|
|
243
|
-
priority: x.trim().split(" ")[0].length,
|
|
244
|
-
id: `#${getTitle(x).replace(/\s+/g, "-").toLowerCase()}`
|
|
245
|
-
}));
|
|
246
|
-
|
|
247
|
-
// src/getAllFrontmatter.tsx
|
|
248
|
-
var getAllFrontmatter = (fromPath) => import_fast_glob.default.sync(`${fromPath}/**/*.mdx`).map((filePath) => {
|
|
249
|
-
let source = import_node_fs.default.readFileSync(import_node_path.default.join(filePath), "utf8"), { data, content } = (0, import_gray_matter.default)(source), slug = filePath.replace(`${fromPath.replaceAll("\\", "/")}/`, "").replace(".mdx", "");
|
|
250
|
-
return {
|
|
251
|
-
...data,
|
|
252
|
-
slug,
|
|
253
|
-
headings: getHeadings(source),
|
|
254
|
-
readingTime: (0, import_reading_time.default)(content)
|
|
255
|
-
};
|
|
256
|
-
}).sort((a, b) => Number(new Date(b.publishedAt || "")) - Number(new Date(a.publishedAt || "")));
|
|
257
|
-
|
|
258
|
-
// src/getMDX.ts
|
|
259
|
-
var import_mdx_bundler = __toESM(require_dist()), import_reading_time2 = __toESM(require("reading-time")), import_rehype_autolink_headings = __toESM(require("rehype-autolink-headings")), import_rehype_slug = __toESM(require("rehype-slug"));
|
|
260
|
-
|
|
261
|
-
// src/rehypeHighlightCode.tsx
|
|
262
|
-
var import_hast_util_to_string = require("hast-util-to-string"), import_parse_numeric_range = __toESM(require("parse-numeric-range")), import_refractor = require("refractor"), import_tsx = __toESM(require("refractor/lang/tsx.js")), import_unist_util_visit = __toESM(require("unist-util-visit"));
|
|
263
|
-
|
|
264
|
-
// src/rehypeLine.tsx
|
|
265
|
-
var import_hast_util_to_html = require("hast-util-to-html"), import_rehype_parse = __toESM(require("rehype-parse")), import_unified = require("unified"), lineNumberify = function lineNumberify2(ast, lineNum = 1) {
|
|
266
|
-
let lineNumber = lineNum;
|
|
267
|
-
return ast.reduce(
|
|
268
|
-
(result, node) => {
|
|
269
|
-
if (node.type === "text") {
|
|
270
|
-
if (node.value.indexOf(`
|
|
271
|
-
`) === -1)
|
|
272
|
-
return node.lineNumber = lineNumber, result.nodes.push(node), result;
|
|
273
|
-
let lines = node.value.split(`
|
|
274
|
-
`);
|
|
275
|
-
for (let i = 0; i < lines.length; i++)
|
|
276
|
-
i !== 0 && ++lineNumber, !(i === lines.length - 1 && lines[i].length === 0) && result.nodes.push({
|
|
277
|
-
type: "text",
|
|
278
|
-
value: i === lines.length - 1 ? lines[i] : `${lines[i]}
|
|
279
|
-
`,
|
|
280
|
-
lineNumber
|
|
281
|
-
});
|
|
282
|
-
return result.lineNumber = lineNumber, result;
|
|
283
|
-
}
|
|
284
|
-
if (node.children) {
|
|
285
|
-
node.lineNumber = lineNumber;
|
|
286
|
-
let processed = lineNumberify2(node.children, lineNumber);
|
|
287
|
-
return node.children = processed.nodes, result.lineNumber = processed.lineNumber, result.nodes.push(node), result;
|
|
288
|
-
}
|
|
289
|
-
return result.nodes.push(node), result;
|
|
290
|
-
},
|
|
291
|
-
{ nodes: [], lineNumber }
|
|
292
|
-
);
|
|
293
|
-
}, wrapLines = function(ast, linesToHighlight) {
|
|
294
|
-
let highlightAll = linesToHighlight.length === 1 && linesToHighlight[0] === 0, allLines = Array.from(new Set(ast.map((x) => x.lineNumber))), i = 0;
|
|
295
|
-
return allLines.reduce((nodes, marker) => {
|
|
296
|
-
let line = marker, children = [];
|
|
297
|
-
for (; i < ast.length; i++) {
|
|
298
|
-
if (ast[i].lineNumber < line) {
|
|
299
|
-
nodes.push(ast[i]);
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
if (ast[i].lineNumber === line) {
|
|
303
|
-
children.push(ast[i]);
|
|
304
|
-
continue;
|
|
305
|
-
}
|
|
306
|
-
if (ast[i].lineNumber > line)
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
return nodes.push({
|
|
310
|
-
type: "element",
|
|
311
|
-
tagName: "div",
|
|
312
|
-
properties: {
|
|
313
|
-
dataLine: line,
|
|
314
|
-
className: "highlight-line",
|
|
315
|
-
dataHighlighted: linesToHighlight.includes(line) || highlightAll ? "true" : "false"
|
|
316
|
-
},
|
|
317
|
-
children,
|
|
318
|
-
lineNumber: line
|
|
319
|
-
}), nodes;
|
|
320
|
-
}, []);
|
|
321
|
-
}, MULTILINE_TOKEN_SPAN = /<span class="token ([^"]+)">[^<]*\n[^<]*<\/span>/g, applyMultilineFix = (ast) => {
|
|
322
|
-
let html = (0, import_hast_util_to_html.toHtml)(ast);
|
|
323
|
-
return html = html.replace(
|
|
324
|
-
MULTILINE_TOKEN_SPAN,
|
|
325
|
-
(match, token) => match.replace(/\n/g, `</span>
|
|
326
|
-
<span class="token ${token}">`)
|
|
327
|
-
), (0, import_unified.unified)().use(import_rehype_parse.default, { emitParseErrors: !0, fragment: !0 }).parse(html).children;
|
|
328
|
-
};
|
|
329
|
-
function rehypeHighlightLine(ast, lines) {
|
|
330
|
-
let formattedAst = applyMultilineFix(ast), numbered = lineNumberify(formattedAst).nodes;
|
|
331
|
-
return wrapLines(numbered, lines);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// src/rehypeWord.tsx
|
|
335
|
-
var import_hast_util_to_html2 = require("hast-util-to-html"), import_rehype_parse2 = __toESM(require("rehype-parse")), import_unified2 = require("unified"), CALLOUT = /__(.*?)__/g, rehypeHighlightWord = (code) => {
|
|
336
|
-
let result = (0, import_hast_util_to_html2.toHtml)(code).replace(CALLOUT, (_, text) => `<span class="highlight-word">${text}</span>`);
|
|
337
|
-
return (0, import_unified2.unified)().use(import_rehype_parse2.default, { emitParseErrors: !0, fragment: !0 }).parse(result).children;
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
// src/rehypeHighlightCode.tsx
|
|
341
|
-
import_refractor.refractor.register(import_tsx.default);
|
|
342
|
-
var rehypeHighlightCode = (options = {}) => {
|
|
343
|
-
return (tree) => {
|
|
344
|
-
(0, import_unist_util_visit.default)(tree, "element", visitor);
|
|
345
|
-
};
|
|
346
|
-
function visitor(node, index, parent) {
|
|
347
|
-
if (!parent || parent.tagName !== "pre" || node.tagName !== "code" || !node.properties.className)
|
|
348
|
-
return;
|
|
349
|
-
let [_, lang] = node.properties.className[0].split("-"), codeString = (0, import_hast_util_to_string.toString)(node), result = import_refractor.refractor.highlight(codeString, lang), linesToHighlight = (0, import_parse_numeric_range.default)(node.properties.line || "0");
|
|
350
|
-
result = rehypeHighlightLine(result, linesToHighlight), node.children = rehypeHighlightWord(result);
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
// src/rehypeMetaAttribute.tsx
|
|
355
|
-
var import_unist_util_visit2 = __toESM(require("unist-util-visit")), re = /\b([-\w]+)(?:=(?:"([^"]*)"|'([^']*)'|([^"'\s]+)))?/g, rehypeMetaAttribute_default = (options = {}) => {
|
|
356
|
-
return (tree) => {
|
|
357
|
-
(0, import_unist_util_visit2.default)(tree, "element", onelement);
|
|
358
|
-
};
|
|
359
|
-
function onelement(node) {
|
|
360
|
-
let match;
|
|
361
|
-
if (node.tagName === "code" && node.data && node.data.meta)
|
|
362
|
-
for (re.lastIndex = 0; match = re.exec(node.data.meta); )
|
|
363
|
-
node.properties[match[1]] = match[2] || match[3] || match[4] || "";
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// src/getMDX.ts
|
|
368
|
-
async function getMDX(source, extraPlugins) {
|
|
369
|
-
let { frontmatter, code } = await (0, import_mdx_bundler.bundleMDX)({
|
|
370
|
-
source,
|
|
371
|
-
mdxOptions(options) {
|
|
372
|
-
let plugins = [
|
|
373
|
-
...extraPlugins || [],
|
|
374
|
-
...options.rehypePlugins ?? [],
|
|
375
|
-
rehypeMetaAttribute_default,
|
|
376
|
-
rehypeHighlightCode,
|
|
377
|
-
import_rehype_autolink_headings.default,
|
|
378
|
-
import_rehype_slug.default
|
|
379
|
-
];
|
|
380
|
-
return options.rehypePlugins = plugins, options;
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
return {
|
|
384
|
-
frontmatter: {
|
|
385
|
-
...frontmatter,
|
|
386
|
-
headings: getHeadings(source),
|
|
387
|
-
readingTime: (0, import_reading_time2.default)(code)
|
|
388
|
-
},
|
|
389
|
-
code
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
// src/getMDXBySlug.tsx
|
|
394
|
-
var import_node_fs2 = __toESM(require("node:fs")), import_node_path2 = __toESM(require("node:path")), import_compare_versions = __toESM(require("compare-versions"));
|
|
395
|
-
var getMDXBySlug = async (basePath, slug, extraPlugins) => {
|
|
396
|
-
let mdxPath = slug;
|
|
397
|
-
if (!slug.includes(".") && basePath.includes("components")) {
|
|
398
|
-
let versions = getAllVersionsFromPath(import_node_path2.default.join(basePath, slug));
|
|
399
|
-
mdxPath += `/${versions[0]}`;
|
|
400
|
-
}
|
|
401
|
-
let filePath = import_node_path2.default.join(basePath, `${mdxPath}.mdx`), source = import_node_fs2.default.readFileSync(filePath, "utf8");
|
|
402
|
-
return await getMDX(source, extraPlugins);
|
|
403
|
-
};
|
|
404
|
-
function getAllVersionsFromPath(fromPath) {
|
|
405
|
-
return import_node_fs2.default.existsSync(fromPath) ? import_node_fs2.default.readdirSync(fromPath).map((fileName) => fileName.replace(".mdx", "")).sort(import_compare_versions.default).reverse() : [];
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
// src/highlightCode.tsx
|
|
409
|
-
var import_hast_util_to_html3 = require("hast-util-to-html"), import_parse_numeric_range2 = __toESM(require("parse-numeric-range")), import_refractor2 = require("refractor"), import_css = __toESM(require("refractor/lang/css.js")), import_tsx2 = __toESM(require("refractor/lang/tsx.js"));
|
|
410
|
-
var highlighter;
|
|
411
|
-
function createCodeHighlighter() {
|
|
412
|
-
return highlighter || (import_refractor2.refractor.register(import_tsx2.default), import_refractor2.refractor.register(import_css.default), highlighter = function(source, language, line = "0") {
|
|
413
|
-
let result = import_refractor2.refractor.highlight(source, language);
|
|
414
|
-
return result = rehypeHighlightLine(result, (0, import_parse_numeric_range2.default)(line)), result = rehypeHighlightWord(result), result = (0, import_hast_util_to_html3.toHtml)(result), result;
|
|
415
|
-
}, highlighter);
|
|
416
|
-
}
|
|
417
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.native.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/mdx-bundler/dist/dirname-messed-up.cjs", "../../../node_modules/mdx-bundler/dist/index.js", "../src/index.ts", "../src/getAllFrontmatter.tsx", "../src/getHeadings.ts", "../src/getMDX.ts", "../src/rehypeHighlightCode.tsx", "../src/rehypeLine.tsx", "../src/rehypeWord.tsx", "../src/rehypeMetaAttribute.tsx", "../src/getMDXBySlug.tsx", "../src/highlightCode.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,uEAAAA,SAAA;AAAA;AAKA,IAAAA,QAAO,UAAU,CAAC,UAAU,SAAS,aAAa;AAAA;AAAA;;;ACLlD;AAAA;AAAA;AAEA,QAAI,yBAAyB,QAAQ,8CAA8C;AACnF,WAAO,eAAe,SAAS,cAAc;AAAA,MAC3C,OAAO;AAAA,IACT,CAAC;AACD,YAAQ,YAAYC;AACpB,QAAI,MAAM,uBAAuB,QAAQ,IAAI,CAAC,GAC1C,QAAQ,uBAAuB,QAAQ,MAAM,CAAC,GAC9C,kBAAkB,QAAQ,gBAAgB,GAC1C,cAAc,uBAAuB,QAAQ,aAAa,CAAC,GAC3D,UAAU,wBAAwB,QAAQ,cAAS,CAAC,GACpD,eAAe,QAAQ,+BAA+B,GACtD,gCAAgC,QAAQ,4CAA4C,GACpF,QAAQ,QAAQ,MAAM,GACtB,mBAAm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,gBAAAC,QAAG,aAAa,UAAU,MAAM;AAE/C,SADe,MAAM,OAAO,QAAQ,YAAY;AAElD;AAEO,SAAS,uBAAuB,UAA4B;AACjE,SAAK,gBAAAA,QAAG,WAAW,QAAQ,IACpB,gBAAAA,QACJ,YAAY,QAAQ,EACpB,IAAI,CAAC,aAAa,SAAS,QAAQ,QAAQ,EAAE,CAAC,EAC9C,KAAK,wBAAAC,OAAe,EACpB,QAAQ,IAL0B,CAAC;AAMxC;;;AChCA,IAAAC,4BAAuB,8BACvBC,8BAAwB,yCACxBC,oBAA0B,sBAC1B,aAAgB,2CAChBC,cAAgB;AAKhB,IAAI;AAEG,SAAS,wBAAwB;AACtC,SAAI,gBAEJ,4BAAU,SAAS,YAAAC,OAAG,GACtB,4BAAU,SAAS,WAAAC,OAAG,GAEtB,cAAc,SAAoB,QAAQ,UAAU,OAAO,KAAK;AAC9D,QAAI,SAAc,4BAAU,UAAU,QAAQ,QAAQ;AACtD,oBAAS,oBAAoB,YAAQ,4BAAAC,SAAY,IAAI,CAAC,GACtD,SAAS,oBAAoB,MAAM,GACnC,aAAS,kCAAO,MAAM,GACf;AAAA,EACT,GAEO;AACT;",
|
|
5
|
-
"names": ["module", "bundleMDX", "e", "matter", "glob", "fs", "path", "matter", "readingTime", "import_reading_time", "lineNumberify", "parse", "import_hast_util_to_html", "import_rehype_parse", "import_unified", "parse", "tsx", "visit", "rangeParser", "import_unist_util_visit", "visit", "rehypeAutolinkHeadings", "rehypeSlug", "readingTime", "import_node_fs", "import_node_path", "path", "fs", "compareVersions", "import_hast_util_to_html", "import_parse_numeric_range", "import_refractor", "import_tsx", "tsx", "css", "rangeParser"]
|
|
6
|
-
}
|