@docubook/core 2.0.0-beta.0 → 2.0.0-beta.2

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.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { Node } from \"unist\";\n\nexport interface ElementNode extends Node {\n type: string;\n tagName?: string;\n properties?: Record<string, unknown> & {\n className?: string[] | string;\n raw?: string;\n };\n data?: Record<string, unknown>;\n children?: Node[];\n raw?: string;\n language?: string;\n codeTitle?: string;\n}\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/** Parse both `dd-MM-yyyy` and ISO 8601 date strings into a Date object. */\nexport function parseDate(dateStr: string): Date {\n if (/^\\d{4}-/.test(dateStr)) return new Date(dateStr);\n const [day, month, year] = dateStr.split(\"-\").map(Number);\n return new Date(year, month - 1, day);\n}\n\nexport function stringToDate(date: string | Date) {\n return date instanceof Date ? date : parseDate(date);\n}\n\n/** Format date to long format (e.g. \"Thursday, April 5, 2026\") */\nexport function formatDate(dateStrOrDate: string | Date): string {\n const date = stringToDate(dateStrOrDate);\n return date.toLocaleDateString(\"en-US\", {\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n}\n\n/** Format date to short format (e.g. \"Apr 5, 2026\") */\nexport function formatDate2(dateStrOrDate: string | Date): string {\n const date = stringToDate(dateStrOrDate);\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n\nexport function toIsoDateOnly(dateStrOrDate: string | Date): string {\n const date = stringToDate(dateStrOrDate);\n return date.toISOString().slice(0, 10);\n}\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAiBjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAGO,SAAS,UAAU,SAAuB;AAC/C,MAAI,UAAU,KAAK,OAAO,EAAG,QAAO,IAAI,KAAK,OAAO;AACpD,QAAM,CAAC,KAAK,OAAO,IAAI,IAAI,QAAQ,MAAM,GAAG,EAAE,IAAI,MAAM;AACxD,SAAO,IAAI,KAAK,MAAM,QAAQ,GAAG,GAAG;AACtC;AAEO,SAAS,aAAa,MAAqB;AAChD,SAAO,gBAAgB,OAAO,OAAO,UAAU,IAAI;AACrD;AAGO,SAAS,WAAW,eAAsC;AAC/D,QAAM,OAAO,aAAa,aAAa;AACvC,SAAO,KAAK,mBAAmB,SAAS;AAAA,IACtC,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EACP,CAAC;AACH;AAGO,SAAS,YAAY,eAAsC;AAChE,QAAM,OAAO,aAAa,aAAa;AACvC,SAAO,KAAK,mBAAmB,SAAS;AAAA,IACtC,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EACR,CAAC;AACH;AAEO,SAAS,cAAc,eAAsC;AAClE,QAAM,OAAO,aAAa,aAAa;AACvC,SAAO,KAAK,YAAY,EAAE,MAAM,GAAG,EAAE;AACvC;","names":[]}
@@ -1,188 +0,0 @@
1
- // src/mdx-compiler/serialize.ts
2
- import { compile } from "@mdx-js/mdx";
3
- import { VFile } from "vfile";
4
- import { matter } from "vfile-matter";
5
-
6
- // src/mdx-compiler/format-mdx-error.ts
7
- function createFormattedMDXError(error, _source) {
8
- return new Error(`[mdx] error compiling MDX:
9
- ${error?.message ?? error}`);
10
- }
11
-
12
- // src/mdx-compiler/plugins/remove-imports-exports.ts
13
- import { remove } from "unist-util-remove";
14
- function removeImportsExportsPlugin() {
15
- return (tree) => remove(tree, "mdxjsEsm");
16
- }
17
-
18
- // src/mdx-compiler/plugins/remove-javascript-expressions.ts
19
- import { visit, SKIP } from "unist-util-visit";
20
- var removeJavaScriptExpressions = () => {
21
- return (tree) => {
22
- visit(tree, (node, index, parent) => {
23
- if (node.type === "mdxFlowExpression" || node.type === "mdxTextExpression") {
24
- if (parent && typeof index === "number") {
25
- parent.children.splice(index, 1);
26
- return [SKIP, index];
27
- }
28
- }
29
- if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
30
- const el = node;
31
- if (el.attributes) {
32
- el.attributes = el.attributes.filter((attr) => {
33
- if (attr.type === "mdxJsxAttribute") {
34
- return attr.value === null || typeof attr.value === "string" || attr.value && attr.value.type !== "mdxJsxAttributeValueExpression";
35
- }
36
- return attr.type !== "mdxJsxExpressionAttribute";
37
- });
38
- }
39
- }
40
- });
41
- };
42
- };
43
-
44
- // src/mdx-compiler/plugins/remove-dangerous-javascript-expressions.ts
45
- var BLOCKED_GLOBALS = [
46
- // Code execution
47
- "eval",
48
- "Function",
49
- "AsyncFunction",
50
- "GeneratorFunction",
51
- // Module system
52
- "require",
53
- "module",
54
- "exports",
55
- "__dirname",
56
- "__filename",
57
- // Runtime
58
- "process",
59
- "global",
60
- "globalThis",
61
- "Reflect",
62
- // File system / network
63
- "child_process",
64
- "fs",
65
- "net",
66
- "http",
67
- "https",
68
- "vm",
69
- "worker_threads",
70
- // Browser-like (available in Node/Deno)
71
- "fetch",
72
- "setTimeout",
73
- "setInterval",
74
- "setImmediate",
75
- "queueMicrotask",
76
- "XMLHttpRequest"
77
- ];
78
- var BLOCKED_PROPERTIES = [
79
- "constructor",
80
- "prototype",
81
- "__proto__",
82
- "eval",
83
- "Reflect",
84
- "Function",
85
- "AsyncFunction",
86
- "GeneratorFunction",
87
- "require"
88
- ];
89
- function walk(node, blockedGlobals, blockedProperties) {
90
- if (!node || typeof node !== "object") return;
91
- if (node.type === "Identifier" && blockedGlobals.includes(node.name)) {
92
- const parent = node.parent;
93
- const isProperty = parent?.type === "MemberExpression" && parent.property === node && !parent.computed;
94
- const isParam = parent?.type === "FunctionDeclaration" || parent?.type === "FunctionExpression";
95
- if (!isProperty && !isParam) {
96
- throw new Error(`Security: Access to '${node.name}' is not allowed`);
97
- }
98
- }
99
- if (node.type === "CallExpression" && node.callee?.type === "Identifier" && blockedGlobals.includes(node.callee.name)) {
100
- throw new Error(`Security: ${node.callee.name}() calls are not allowed`);
101
- }
102
- if (node.type === "ImportExpression") {
103
- throw new Error("Security: Dynamic import() is not allowed");
104
- }
105
- if (node.type === "TaggedTemplateExpression" && node.tag?.type === "Identifier" && blockedGlobals.includes(node.tag.name)) {
106
- throw new Error(`Security: ${node.tag.name}\`...\` tagged template is not allowed`);
107
- }
108
- if (node.type === "CallExpression" && node.callee?.type === "MemberExpression" && node.callee.computed) {
109
- throw new Error("Security: Function calls via computed property access are not allowed");
110
- }
111
- if (node.type === "MemberExpression" && !node.computed) {
112
- const prop = node.property;
113
- if (prop?.type === "Identifier" && blockedProperties.includes(prop.name)) {
114
- throw new Error(`Security: .${prop.name} access is not allowed`);
115
- }
116
- }
117
- if (node.type === "NewExpression" && node.callee?.type === "Identifier" && blockedGlobals.includes(node.callee.name)) {
118
- throw new Error(`Security: new ${node.callee.name}() is not allowed`);
119
- }
120
- for (const key in node) {
121
- if (key === "parent" || key === "position") continue;
122
- const value = node[key];
123
- if (Array.isArray(value)) {
124
- value.forEach((child) => {
125
- if (child && typeof child === "object") walk(child, blockedGlobals, blockedProperties);
126
- });
127
- } else if (value && typeof value === "object") {
128
- walk(value, blockedGlobals, blockedProperties);
129
- }
130
- }
131
- }
132
- var CreateRemoveDangerousCallsPlugin = (blockedGlobals, blockedProperties) => {
133
- return () => (tree) => {
134
- walk(tree, blockedGlobals ?? BLOCKED_GLOBALS, blockedProperties ?? BLOCKED_PROPERTIES);
135
- return tree;
136
- };
137
- };
138
-
139
- // src/mdx-compiler/serialize.ts
140
- function getCompileOptions(mdxOptions = {}, rsc = false, blockJS = true, outputFormat = "function-body", format = "mdx") {
141
- const remarkPlugins = [
142
- ...mdxOptions?.remarkPlugins ?? [],
143
- removeImportsExportsPlugin,
144
- ...blockJS ? [removeJavaScriptExpressions] : [],
145
- // Defense-in-depth: audit remaining AST for dangerous patterns.
146
- CreateRemoveDangerousCallsPlugin()
147
- ];
148
- return {
149
- ...mdxOptions,
150
- remarkPlugins,
151
- rehypePlugins: mdxOptions?.rehypePlugins ?? [],
152
- format,
153
- outputFormat,
154
- providerImportSource: rsc ? void 0 : "@mdx-js/react",
155
- development: process.env.NODE_ENV !== "production"
156
- };
157
- }
158
- async function serialize(source, {
159
- scope = {},
160
- mdxOptions = {},
161
- parseFrontmatter = false,
162
- blockJS = true,
163
- outputFormat = "function-body",
164
- format = "mdx"
165
- } = {}, rsc = false) {
166
- const vfile = new VFile(source);
167
- if (parseFrontmatter) {
168
- matter(vfile, { strip: true });
169
- }
170
- let compiledSource;
171
- try {
172
- compiledSource = String(
173
- await compile(vfile, getCompileOptions(mdxOptions, rsc, blockJS, outputFormat, format))
174
- );
175
- } catch (error) {
176
- throw createFormattedMDXError(error, String(vfile));
177
- }
178
- return {
179
- compiledSource,
180
- frontmatter: vfile.data.matter ?? {},
181
- scope
182
- };
183
- }
184
-
185
- export {
186
- serialize
187
- };
188
- //# sourceMappingURL=chunk-J7CN2VUH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/mdx-compiler/serialize.ts","../src/mdx-compiler/format-mdx-error.ts","../src/mdx-compiler/plugins/remove-imports-exports.ts","../src/mdx-compiler/plugins/remove-javascript-expressions.ts","../src/mdx-compiler/plugins/remove-dangerous-javascript-expressions.ts"],"sourcesContent":["// MPL-2.0 — derived from next-mdx-remote (IBM). See LICENSE-MPL-2.0.\nimport { compile } from \"@mdx-js/mdx\";\nimport { VFile } from \"vfile\";\nimport { matter } from \"vfile-matter\";\nimport { createFormattedMDXError } from \"./format-mdx-error.js\";\nimport { removeImportsExportsPlugin } from \"./plugins/remove-imports-exports.js\";\nimport { removeJavaScriptExpressions } from \"./plugins/remove-javascript-expressions.js\";\nimport { CreateRemoveDangerousCallsPlugin } from \"./plugins/remove-dangerous-javascript-expressions.js\";\nimport type { Pluggable } from \"unified\";\n\n/** @internal — re-exported from unified. */\ntype RemarkPlugins = Pluggable[];\ntype RehypePlugins = Pluggable[];\n\nexport type { MDXRemoteSerializeResult } from \"./types\";\n\nexport type SerializeOptions = {\n scope?: Record<string, unknown>;\n mdxOptions?: {\n remarkPlugins?: RemarkPlugins;\n rehypePlugins?: RehypePlugins;\n };\n parseFrontmatter?: boolean;\n /**\n * MDX compile output shape.\n * - `\"function-body\"` (default): JS function body string for `<MDXRemote>`.\n * - `\"program\"`: full ESM module source (imports + `export default MDXContent`)\n * for static bundling / hydration without `new Function`.\n * @default \"function-body\"\n */\n outputFormat?: \"function-body\" | \"program\";\n /**\n * MDX input format.\n * - `\"mdx\"` (default): JSX tags are parsed and resolve via the components map.\n * - `\"md\"`: plain markdown — authored JSX tags are NOT parsed (dropped,\n * content kept as text). Markdown directives (`:::`/`::`/`::::`) still\n * work; this is the v2 authoring contract (no JSX tags).\n * @default \"mdx\"\n */\n format?: \"mdx\" | \"md\";\n /**\n * Strip JavaScript expressions from MDX (default: true).\n * When true, removes all `{expression}` and JSX attribute expression nodes\n * before compilation. When false, expressions are preserved but a\n * security sanitizer audits the AST for dangerous patterns.\n * @default true\n */\n blockJS?: boolean;\n};\n\nexport type SerializeResult = {\n compiledSource: string;\n frontmatter: Record<string, unknown>;\n scope: Record<string, unknown>;\n};\n\nfunction getCompileOptions(\n mdxOptions: SerializeOptions[\"mdxOptions\"] = {},\n rsc = false,\n blockJS = true,\n outputFormat: NonNullable<SerializeOptions[\"outputFormat\"]> = \"function-body\",\n format: NonNullable<SerializeOptions[\"format\"]> = \"mdx\"\n) {\n const remarkPlugins = [\n ...(mdxOptions?.remarkPlugins ?? []),\n removeImportsExportsPlugin,\n ...(blockJS ? [removeJavaScriptExpressions] : []),\n // Defense-in-depth: audit remaining AST for dangerous patterns.\n CreateRemoveDangerousCallsPlugin(),\n ];\n\n return {\n ...mdxOptions,\n remarkPlugins,\n rehypePlugins: mdxOptions?.rehypePlugins ?? [],\n format,\n outputFormat,\n providerImportSource: rsc ? undefined : \"@mdx-js/react\",\n development: process.env.NODE_ENV !== \"production\",\n };\n}\n\n/**\n * Compile raw MDX string into a serialized result that can be rendered.\n */\nexport async function serialize(\n source: string,\n {\n scope = {},\n mdxOptions = {},\n parseFrontmatter = false,\n blockJS = true,\n outputFormat = \"function-body\",\n format = \"mdx\",\n }: SerializeOptions = {},\n rsc = false\n): Promise<SerializeResult> {\n const vfile = new VFile(source);\n\n if (parseFrontmatter) {\n matter(vfile, { strip: true });\n }\n\n let compiledSource: string;\n try {\n compiledSource = String(\n await compile(vfile, getCompileOptions(mdxOptions, rsc, blockJS, outputFormat, format))\n );\n } catch (error: any) {\n throw createFormattedMDXError(error, String(vfile));\n }\n\n return {\n compiledSource,\n frontmatter: (vfile.data.matter ?? {}) as Record<string, unknown>,\n scope,\n };\n}\n","// MPL-2.0 — derived from next-mdx-remote (IBM). See LICENSE-MPL-2.0.\n/**\n * Wraps raw MDX compilation errors with a clear message prefix.\n */\nexport function createFormattedMDXError(error: any, _source: string): Error {\n return new Error(`[mdx] error compiling MDX:\\n${error?.message ?? error}`);\n}\n","// MPL-2.0 — derived from next-mdx-remote (IBM). See LICENSE-MPL-2.0.\nimport { remove } from \"unist-util-remove\";\nimport type { Node } from \"unist\";\n\n/** remark plugin: strips all `mdxjsEsm` nodes (import/export statements). */\nexport function removeImportsExportsPlugin() {\n return (tree: Node) => remove(tree, \"mdxjsEsm\");\n}\n","// MPL-2.0 — derived from next-mdx-remote (IBM). See LICENSE-MPL-2.0.\nimport { visit, SKIP } from \"unist-util-visit\";\nimport type { Node } from \"unist\";\n\n/**\n * remark plugin: removes JS expression nodes ({variable}, {func()}) from MDX.\n * Preserves JSX (<Component />) and plain markdown.\n */\nexport const removeJavaScriptExpressions = () => {\n return (tree: Node) => {\n visit(tree, (node: Node, index: number | undefined, parent: Node | undefined) => {\n if (node.type === \"mdxFlowExpression\" || node.type === \"mdxTextExpression\") {\n if (parent && typeof index === \"number\") {\n (parent as any).children.splice(index, 1);\n return [SKIP, index] as const;\n }\n }\n\n if (node.type === \"mdxJsxFlowElement\" || node.type === \"mdxJsxTextElement\") {\n const el = node as any;\n if (el.attributes) {\n el.attributes = el.attributes.filter((attr: any) => {\n if (attr.type === \"mdxJsxAttribute\") {\n return (\n attr.value === null ||\n typeof attr.value === \"string\" ||\n (attr.value && attr.value.type !== \"mdxJsxAttributeValueExpression\")\n );\n }\n return attr.type !== \"mdxJsxExpressionAttribute\";\n });\n }\n }\n });\n };\n};\n","// MPL-2.0 — derived from next-mdx-remote (IBM). See LICENSE-MPL-2.0.\nimport type { Node } from \"unist\";\n\nconst BLOCKED_GLOBALS = [\n // Code execution\n \"eval\",\n \"Function\",\n \"AsyncFunction\",\n \"GeneratorFunction\",\n // Module system\n \"require\",\n \"module\",\n \"exports\",\n \"__dirname\",\n \"__filename\",\n // Runtime\n \"process\",\n \"global\",\n \"globalThis\",\n \"Reflect\",\n // File system / network\n \"child_process\",\n \"fs\",\n \"net\",\n \"http\",\n \"https\",\n \"vm\",\n \"worker_threads\",\n // Browser-like (available in Node/Deno)\n \"fetch\",\n \"setTimeout\",\n \"setInterval\",\n \"setImmediate\",\n \"queueMicrotask\",\n \"XMLHttpRequest\",\n];\n\nconst BLOCKED_PROPERTIES = [\n \"constructor\",\n \"prototype\",\n \"__proto__\",\n \"eval\",\n \"Reflect\",\n \"Function\",\n \"AsyncFunction\",\n \"GeneratorFunction\",\n \"require\",\n];\n\nfunction walk(node: any, blockedGlobals: string[], blockedProperties: string[]) {\n if (!node || typeof node !== \"object\") return;\n\n if (node.type === \"Identifier\" && blockedGlobals.includes(node.name)) {\n const parent = node.parent;\n const isProperty =\n parent?.type === \"MemberExpression\" && parent.property === node && !parent.computed;\n const isParam = parent?.type === \"FunctionDeclaration\" || parent?.type === \"FunctionExpression\";\n if (!isProperty && !isParam) {\n throw new Error(`Security: Access to '${node.name}' is not allowed`);\n }\n }\n\n // Block direct calls to blocked globals: eval(), Function(), fetch(), etc.\n if (\n node.type === \"CallExpression\" &&\n node.callee?.type === \"Identifier\" &&\n blockedGlobals.includes(node.callee.name)\n ) {\n throw new Error(`Security: ${node.callee.name}() calls are not allowed`);\n }\n\n // Block dynamic import(): import(\"node:fs\")\n if (node.type === \"ImportExpression\") {\n throw new Error(\"Security: Dynamic import() is not allowed\");\n }\n\n // Block tagged template literals on blocked globals: eval`...`\n if (\n node.type === \"TaggedTemplateExpression\" &&\n node.tag?.type === \"Identifier\" &&\n blockedGlobals.includes(node.tag.name)\n ) {\n throw new Error(`Security: ${node.tag.name}\\`...\\` tagged template is not allowed`);\n }\n\n // Block computed MemberExpression calls on any object identifier\n // Catches: Object[\"constructor\"](...), Object[\"con\"+\"structor\"](...), etc.\n if (\n node.type === \"CallExpression\" &&\n node.callee?.type === \"MemberExpression\" &&\n node.callee.computed\n ) {\n throw new Error(\"Security: Function calls via computed property access are not allowed\");\n }\n\n // Block non-computed property access to dangerous properties:\n // obj.constructor, obj.prototype, obj.__proto__\n if (node.type === \"MemberExpression\" && !node.computed) {\n const prop = node.property;\n if (prop?.type === \"Identifier\" && blockedProperties.includes(prop.name)) {\n throw new Error(`Security: .${prop.name} access is not allowed`);\n }\n }\n\n // Block new expressions: new Function(...)\n if (\n node.type === \"NewExpression\" &&\n node.callee?.type === \"Identifier\" &&\n blockedGlobals.includes(node.callee.name)\n ) {\n throw new Error(`Security: new ${node.callee.name}() is not allowed`);\n }\n\n for (const key in node) {\n if (key === \"parent\" || key === \"position\") continue;\n const value = node[key];\n if (Array.isArray(value)) {\n value.forEach((child: any) => {\n if (child && typeof child === \"object\") walk(child, blockedGlobals, blockedProperties);\n });\n } else if (value && typeof value === \"object\") {\n walk(value, blockedGlobals, blockedProperties);\n }\n }\n}\n\nexport const CreateRemoveDangerousCallsPlugin = (\n blockedGlobals?: string[],\n blockedProperties?: string[]\n) => {\n return () => (tree: Node) => {\n walk(tree, blockedGlobals ?? BLOCKED_GLOBALS, blockedProperties ?? BLOCKED_PROPERTIES);\n return tree;\n };\n};\n"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