mdream 0.2.5 → 0.2.7
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/cli.mjs +4 -4
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.mjs +3 -3
- package/dist/plugins.d.mts +3 -7
- package/dist/plugins.d.ts +3 -7
- package/dist/plugins.mjs +6 -6
- package/dist/preset/minimal.d.mts +1 -1
- package/dist/preset/minimal.d.ts +1 -1
- package/dist/preset/minimal.mjs +3 -3
- package/dist/shared/mdream.BFdDSM96.d.ts +9 -0
- package/dist/shared/{mdream.CsDVbUMp.mjs → mdream.BUjJQ2oF.mjs} +1 -1
- package/dist/shared/{mdream.-SGj02be.d.mts → mdream.C0Qx0F7t.d.mts} +2 -2
- package/dist/shared/{mdream.-SGj02be.d.ts → mdream.C0Qx0F7t.d.ts} +2 -2
- package/dist/shared/{mdream.Ch6B8TEB.mjs → mdream.C8Xgmr_a.mjs} +1 -1
- package/dist/shared/{mdream.C6Z2rfeq.mjs → mdream.CNrwlePY.mjs} +1 -1
- package/dist/shared/{mdream.D5zBVbP9.mjs → mdream.Crxe0Sar.mjs} +2 -2
- package/dist/shared/mdream.DMe7T-0M.d.mts +9 -0
- package/dist/shared/{mdream.DMUbnRbh.mjs → mdream.VU-fHLcf.mjs} +2 -2
- package/package.json +8 -8
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { cac } from 'cac';
|
|
3
|
-
import { f as frontmatterPlugin } from './shared/mdream.
|
|
4
|
-
import { r as readabilityPlugin } from './shared/mdream.
|
|
5
|
-
import { s as streamHtmlToMarkdown } from './shared/mdream.
|
|
6
|
-
import './shared/mdream.
|
|
3
|
+
import { f as frontmatterPlugin } from './shared/mdream.CNrwlePY.mjs';
|
|
4
|
+
import { r as readabilityPlugin } from './shared/mdream.VU-fHLcf.mjs';
|
|
5
|
+
import { s as streamHtmlToMarkdown } from './shared/mdream.BUjJQ2oF.mjs';
|
|
6
|
+
import './shared/mdream.C8Xgmr_a.mjs';
|
|
7
7
|
|
|
8
8
|
async function streamingConvert(options = {}) {
|
|
9
9
|
const outputStream = process.stdout;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { H as HTMLToMarkdownOptions } from './shared/mdream
|
|
2
|
-
export { B as BufferRegion,
|
|
1
|
+
import { H as HTMLToMarkdownOptions } from './shared/mdream.C0Qx0F7t.mjs';
|
|
2
|
+
export { B as BufferRegion, b as ELEMENT_NODE, E as ElementNode, f as HandlerContext, d as MdreamProcessingState, M as MdreamRuntimeState, N as Node, e as NodeEvent, P as Plugin, a as PluginCreationOptions, T as TEXT_NODE, g as TagHandler, c as TextNode } from './shared/mdream.C0Qx0F7t.mjs';
|
|
3
3
|
import { ReadableStream } from 'node:stream/web';
|
|
4
|
+
export { E as ExtractedElement } from './shared/mdream.DMe7T-0M.mjs';
|
|
5
|
+
|
|
6
|
+
declare const TagIdMap: Record<string, number>;
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* Creates a markdown stream from an HTML stream
|
|
@@ -12,4 +15,4 @@ declare function streamHtmlToMarkdown(htmlStream: ReadableStream | null, options
|
|
|
12
15
|
|
|
13
16
|
declare function htmlToMarkdown(html: string, options?: HTMLToMarkdownOptions): string;
|
|
14
17
|
|
|
15
|
-
export { HTMLToMarkdownOptions, htmlToMarkdown, streamHtmlToMarkdown };
|
|
18
|
+
export { HTMLToMarkdownOptions, TagIdMap, htmlToMarkdown, streamHtmlToMarkdown };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { H as HTMLToMarkdownOptions } from './shared/mdream
|
|
2
|
-
export { B as BufferRegion,
|
|
1
|
+
import { H as HTMLToMarkdownOptions } from './shared/mdream.C0Qx0F7t.js';
|
|
2
|
+
export { B as BufferRegion, b as ELEMENT_NODE, E as ElementNode, f as HandlerContext, d as MdreamProcessingState, M as MdreamRuntimeState, N as Node, e as NodeEvent, P as Plugin, a as PluginCreationOptions, T as TEXT_NODE, g as TagHandler, c as TextNode } from './shared/mdream.C0Qx0F7t.js';
|
|
3
3
|
import { ReadableStream } from 'node:stream/web';
|
|
4
|
+
export { E as ExtractedElement } from './shared/mdream.BFdDSM96.js';
|
|
5
|
+
|
|
6
|
+
declare const TagIdMap: Record<string, number>;
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* Creates a markdown stream from an HTML stream
|
|
@@ -12,4 +15,4 @@ declare function streamHtmlToMarkdown(htmlStream: ReadableStream | null, options
|
|
|
12
15
|
|
|
13
16
|
declare function htmlToMarkdown(html: string, options?: HTMLToMarkdownOptions): string;
|
|
14
17
|
|
|
15
|
-
export { HTMLToMarkdownOptions, htmlToMarkdown, streamHtmlToMarkdown };
|
|
18
|
+
export { HTMLToMarkdownOptions, TagIdMap, htmlToMarkdown, streamHtmlToMarkdown };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as processPartialHTMLToMarkdown } from './shared/mdream.
|
|
2
|
-
export { s as streamHtmlToMarkdown } from './shared/mdream.
|
|
3
|
-
|
|
1
|
+
import { p as processPartialHTMLToMarkdown } from './shared/mdream.BUjJQ2oF.mjs';
|
|
2
|
+
export { s as streamHtmlToMarkdown } from './shared/mdream.BUjJQ2oF.mjs';
|
|
3
|
+
export { T as TagIdMap } from './shared/mdream.C8Xgmr_a.mjs';
|
|
4
4
|
|
|
5
5
|
function htmlToMarkdown(html, options = {}) {
|
|
6
6
|
const state = {
|
package/dist/plugins.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { P as Plugin
|
|
1
|
+
import { P as Plugin } from './shared/mdream.C0Qx0F7t.mjs';
|
|
2
|
+
export { e as extractionPlugin } from './shared/mdream.DMe7T-0M.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Create a plugin that implements the Plugin interface with improved type inference
|
|
@@ -7,11 +8,6 @@ import { P as Plugin, b as ElementNode, d as MdreamRuntimeState } from './shared
|
|
|
7
8
|
*/
|
|
8
9
|
declare function createPlugin<T extends Partial<Plugin>>(plugin: T): Plugin;
|
|
9
10
|
|
|
10
|
-
interface ExtractedElement extends ElementNode {
|
|
11
|
-
textContent: string;
|
|
12
|
-
}
|
|
13
|
-
declare function extractionPlugin(selectors: Record<string, (element: ExtractedElement, state: MdreamRuntimeState) => void>): Plugin;
|
|
14
|
-
|
|
15
11
|
/**
|
|
16
12
|
* Plugin that filters nodes based on CSS selectors.
|
|
17
13
|
* Allows including or excluding nodes based on selectors.
|
|
@@ -90,4 +86,4 @@ declare function readabilityPlugin(): Plugin;
|
|
|
90
86
|
*/
|
|
91
87
|
declare function tailwindPlugin(): Plugin;
|
|
92
88
|
|
|
93
|
-
export { createPlugin,
|
|
89
|
+
export { createPlugin, filterPlugin, frontmatterPlugin, isolateMainPlugin, readabilityPlugin, tailwindPlugin };
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { P as Plugin
|
|
1
|
+
import { P as Plugin } from './shared/mdream.C0Qx0F7t.js';
|
|
2
|
+
export { e as extractionPlugin } from './shared/mdream.BFdDSM96.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Create a plugin that implements the Plugin interface with improved type inference
|
|
@@ -7,11 +8,6 @@ import { P as Plugin, b as ElementNode, d as MdreamRuntimeState } from './shared
|
|
|
7
8
|
*/
|
|
8
9
|
declare function createPlugin<T extends Partial<Plugin>>(plugin: T): Plugin;
|
|
9
10
|
|
|
10
|
-
interface ExtractedElement extends ElementNode {
|
|
11
|
-
textContent: string;
|
|
12
|
-
}
|
|
13
|
-
declare function extractionPlugin(selectors: Record<string, (element: ExtractedElement, state: MdreamRuntimeState) => void>): Plugin;
|
|
14
|
-
|
|
15
11
|
/**
|
|
16
12
|
* Plugin that filters nodes based on CSS selectors.
|
|
17
13
|
* Allows including or excluding nodes based on selectors.
|
|
@@ -90,4 +86,4 @@ declare function readabilityPlugin(): Plugin;
|
|
|
90
86
|
*/
|
|
91
87
|
declare function tailwindPlugin(): Plugin;
|
|
92
88
|
|
|
93
|
-
export { createPlugin,
|
|
89
|
+
export { createPlugin, filterPlugin, frontmatterPlugin, isolateMainPlugin, readabilityPlugin, tailwindPlugin };
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as createPlugin } from './shared/mdream.
|
|
2
|
-
export { f as frontmatterPlugin } from './shared/mdream.
|
|
3
|
-
import { p as parseSelector } from './shared/mdream.
|
|
4
|
-
export { f as filterPlugin, i as isolateMainPlugin, t as tailwindPlugin } from './shared/mdream.
|
|
5
|
-
export { r as readabilityPlugin } from './shared/mdream.
|
|
6
|
-
import './shared/mdream.
|
|
1
|
+
import { c as createPlugin } from './shared/mdream.CNrwlePY.mjs';
|
|
2
|
+
export { f as frontmatterPlugin } from './shared/mdream.CNrwlePY.mjs';
|
|
3
|
+
import { p as parseSelector } from './shared/mdream.Crxe0Sar.mjs';
|
|
4
|
+
export { f as filterPlugin, i as isolateMainPlugin, t as tailwindPlugin } from './shared/mdream.Crxe0Sar.mjs';
|
|
5
|
+
export { r as readabilityPlugin } from './shared/mdream.VU-fHLcf.mjs';
|
|
6
|
+
import './shared/mdream.C8Xgmr_a.mjs';
|
|
7
7
|
|
|
8
8
|
function extractionPlugin(selectors) {
|
|
9
9
|
const matcherCallbacks = Object.entries(selectors).map(([selector, callback]) => ({
|
package/dist/preset/minimal.d.ts
CHANGED
package/dist/preset/minimal.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as isolateMainPlugin, t as tailwindPlugin, f as filterPlugin } from '../shared/mdream.
|
|
3
|
-
import { f as frontmatterPlugin } from '../shared/mdream.
|
|
1
|
+
import { aa as TAG_FORM, W as TAG_FIELDSET, b2 as TAG_OBJECT, a5 as TAG_EMBED, b6 as TAG_FIGURE, ab as TAG_FOOTER, v as TAG_ASIDE, Q as TAG_IFRAME, a4 as TAG_INPUT, Y as TAG_TEXTAREA, Z as TAG_SELECT, ai as TAG_BUTTON, ak as TAG_NAV } from '../shared/mdream.C8Xgmr_a.mjs';
|
|
2
|
+
import { i as isolateMainPlugin, t as tailwindPlugin, f as filterPlugin } from '../shared/mdream.Crxe0Sar.mjs';
|
|
3
|
+
import { f as frontmatterPlugin } from '../shared/mdream.CNrwlePY.mjs';
|
|
4
4
|
|
|
5
5
|
function withMinimalPreset(options = {}) {
|
|
6
6
|
const plugins = [
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { E as ElementNode, M as MdreamRuntimeState, P as Plugin } from './mdream.C0Qx0F7t.js';
|
|
2
|
+
|
|
3
|
+
interface ExtractedElement extends ElementNode {
|
|
4
|
+
textContent: string;
|
|
5
|
+
}
|
|
6
|
+
declare function extractionPlugin(selectors: Record<string, (element: ExtractedElement, state: MdreamRuntimeState) => void>): Plugin;
|
|
7
|
+
|
|
8
|
+
export { extractionPlugin as e };
|
|
9
|
+
export type { ExtractedElement as E };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TEXT_NODE, N as NodeEventEnter, c as collectNodeContent, E as ELEMENT_NODE, b as TAG_PRE, d as TAG_LI, e as TAG_BLOCKQUOTE, f as NO_SPACING, D as DEFAULT_BLOCK_SPACING, g as TABLE_ROW_SPACING, L as LIST_ITEM_SPACING, B as BLOCKQUOTE_SPACING, M as MARKDOWN_STRIKETHROUGH, h as MARKDOWN_HORIZONTAL_RULE, i as TAG_DD, j as TAG_DT, k as TAG_DL, l as TAG_ADDRESS, m as TAG_RP, n as TAG_RT, o as TAG_RUBY, p as TAG_BDO, q as TAG_TIME, r as TAG_VAR, s as TAG_DFN, t as TAG_CITE, u as TAG_U, v as TAG_ASIDE, w as TAG_PLAINTEXT, x as TAG_XMP, y as TAG_NOFRAMES, z as TAG_NOSCRIPT, A as TAG_SMALL, C as TAG_SAMP, F as TAG_Q, G as TAG_MARK, H as TAG_ABBR, I as TAG_TEMPLATE, J as TAG_PROGRESS, K as TAG_METER, O as TAG_DIALOG, P as TAG_MAP, Q as TAG_IFRAME, R as TAG_CANVAS, S as TAG_VIDEO, U as TAG_AUDIO, V as TAG_LEGEND, W as TAG_FIELDSET, X as TAG_OPTION, Y as TAG_TEXTAREA, Z as TAG_SELECT, _ as TAG_SVG, $ as TAG_WBR, a0 as TAG_TRACK, a1 as TAG_SOURCE, a2 as TAG_PARAM, a3 as TAG_KEYGEN, a4 as TAG_INPUT, a5 as TAG_EMBED, a6 as TAG_COL, a7 as TAG_BASE, a8 as TAG_AREA, a9 as TAG_LINK, aa as TAG_FORM, ab as TAG_FOOTER, ac as TAG_KBD, ad as TAG_TFOOT, ae as TAG_TBODY, af as TAG_CENTER, ag as TAG_TABLE, ah as TAG_BODY, ai as TAG_BUTTON, aj as TAG_LABEL, ak as TAG_NAV, al as TAG_SPAN, am as TAG_DIV, an as TAG_P, ao as TAG_TD, ap as TAG_TH, aq as TAG_TR, ar as TAG_THEAD, as as TAG_IMG, at as TAG_A, au as TAG_UL, av as TAG_OL, aw as TAG_CODE, ax as MARKDOWN_CODE_BLOCK, ay as MARKDOWN_INLINE_CODE, az as TAG_INS, aA as TAG_SUP, aB as TAG_SUB, aC as TAG_DEL, aD as TAG_I, aE as TAG_EM, aF as TAG_B, aG as TAG_STRONG, aH as TAG_HR, aI as TAG_H6, aJ as TAG_H5, aK as TAG_H4, aL as TAG_H3, aM as TAG_H2, aN as TAG_H1, aO as TAG_BR, aP as TAG_META, aQ as TAG_STYLE, aR as TAG_SCRIPT, aS as TAG_TITLE, aT as TAG_SUMMARY, aU as TAG_DETAILS, aV as TAG_HEAD, aW as MARKDOWN_EMPHASIS, aX as MARKDOWN_STRONG, aY as HTML_ENTITIES, aZ as MAX_TAG_ID, a_ as assembleBufferedContent, T as TagIdMap, a$ as NodeEventExit } from './mdream.C8Xgmr_a.mjs';
|
|
2
2
|
|
|
3
3
|
function needsSpacing(lastChar, firstChar) {
|
|
4
4
|
const noSpaceLastChars = /* @__PURE__ */ new Set(["\n", " ", "[", ">", "_", "*", "`", "|", "#", "<", "("]);
|
|
@@ -222,5 +222,5 @@ interface TagHandler {
|
|
|
222
222
|
excludesTextNodes?: boolean;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
export {
|
|
226
|
-
export type { BufferRegion as B, HTMLToMarkdownOptions as H,
|
|
225
|
+
export { TEXT_NODE as T, ELEMENT_NODE as b };
|
|
226
|
+
export type { BufferRegion as B, ElementNode as E, HTMLToMarkdownOptions as H, MdreamRuntimeState as M, Node as N, Plugin as P, PluginCreationOptions as a, TextNode as c, MdreamProcessingState as d, NodeEvent as e, HandlerContext as f, TagHandler as g };
|
|
@@ -222,5 +222,5 @@ interface TagHandler {
|
|
|
222
222
|
excludesTextNodes?: boolean;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
export {
|
|
226
|
-
export type { BufferRegion as B, HTMLToMarkdownOptions as H,
|
|
225
|
+
export { TEXT_NODE as T, ELEMENT_NODE as b };
|
|
226
|
+
export type { BufferRegion as B, ElementNode as E, HTMLToMarkdownOptions as H, MdreamRuntimeState as M, Node as N, Plugin as P, PluginCreationOptions as a, TextNode as c, MdreamProcessingState as d, NodeEvent as e, HandlerContext as f, TagHandler as g };
|
|
@@ -277,4 +277,4 @@ const BLOCKQUOTE_SPACING = [1, 1];
|
|
|
277
277
|
const LIST_ITEM_SPACING = [1, 0];
|
|
278
278
|
const TABLE_ROW_SPACING = [0, 1];
|
|
279
279
|
|
|
280
|
-
export {
|
|
280
|
+
export { TAG_WBR as $, TAG_SMALL as A, BLOCKQUOTE_SPACING as B, TAG_SAMP as C, DEFAULT_BLOCK_SPACING as D, ELEMENT_NODE as E, TAG_Q as F, TAG_MARK as G, TAG_ABBR as H, TAG_TEMPLATE as I, TAG_PROGRESS as J, TAG_METER as K, LIST_ITEM_SPACING as L, MARKDOWN_STRIKETHROUGH as M, NodeEventEnter as N, TAG_DIALOG as O, TAG_MAP as P, TAG_IFRAME as Q, TAG_CANVAS as R, TAG_VIDEO as S, TagIdMap as T, TAG_AUDIO as U, TAG_LEGEND as V, TAG_FIELDSET as W, TAG_OPTION as X, TAG_TEXTAREA as Y, TAG_SELECT as Z, TAG_SVG as _, TEXT_NODE as a, NodeEventExit as a$, TAG_TRACK as a0, TAG_SOURCE as a1, TAG_PARAM as a2, TAG_KEYGEN as a3, TAG_INPUT as a4, TAG_EMBED as a5, TAG_COL as a6, TAG_BASE as a7, TAG_AREA as a8, TAG_LINK as a9, TAG_SUP as aA, TAG_SUB as aB, TAG_DEL as aC, TAG_I as aD, TAG_EM as aE, TAG_B as aF, TAG_STRONG as aG, TAG_HR as aH, TAG_H6 as aI, TAG_H5 as aJ, TAG_H4 as aK, TAG_H3 as aL, TAG_H2 as aM, TAG_H1 as aN, TAG_BR as aO, TAG_META as aP, TAG_STYLE as aQ, TAG_SCRIPT as aR, TAG_TITLE as aS, TAG_SUMMARY as aT, TAG_DETAILS as aU, TAG_HEAD as aV, MARKDOWN_EMPHASIS as aW, MARKDOWN_STRONG as aX, HTML_ENTITIES as aY, MAX_TAG_ID as aZ, assembleBufferedContent as a_, TAG_FORM as aa, TAG_FOOTER as ab, TAG_KBD as ac, TAG_TFOOT as ad, TAG_TBODY as ae, TAG_CENTER as af, TAG_TABLE as ag, TAG_BODY as ah, TAG_BUTTON as ai, TAG_LABEL as aj, TAG_NAV as ak, TAG_SPAN as al, TAG_DIV as am, TAG_P as an, TAG_TD as ao, TAG_TH as ap, TAG_TR as aq, TAG_THEAD as ar, TAG_IMG as as, TAG_A as at, TAG_UL as au, TAG_OL as av, TAG_CODE as aw, MARKDOWN_CODE_BLOCK as ax, MARKDOWN_INLINE_CODE as ay, TAG_INS as az, TAG_PRE as b, TAG_HTML as b0, createBufferRegion as b1, TAG_OBJECT as b2, TAG_HEADER as b3, TAG_CAPTION as b4, TAG_FIGCAPTION as b5, TAG_FIGURE as b6, TAG_MAIN as b7, TAG_SECTION as b8, TAG_ARTICLE as b9, collectNodeContent as c, TAG_LI as d, TAG_BLOCKQUOTE as e, NO_SPACING as f, TABLE_ROW_SPACING as g, MARKDOWN_HORIZONTAL_RULE as h, TAG_DD as i, TAG_DT as j, TAG_DL as k, TAG_ADDRESS as l, TAG_RP as m, TAG_RT as n, TAG_RUBY as o, TAG_BDO as p, TAG_TIME as q, TAG_VAR as r, TAG_DFN as s, TAG_CITE as t, TAG_U as u, TAG_ASIDE as v, TAG_PLAINTEXT as w, TAG_XMP as x, TAG_NOFRAMES as y, TAG_NOSCRIPT as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ELEMENT_NODE,
|
|
1
|
+
import { E as ELEMENT_NODE, aV as TAG_HEAD, c as collectNodeContent, aS as TAG_TITLE, aP as TAG_META } from './mdream.C8Xgmr_a.mjs';
|
|
2
2
|
|
|
3
3
|
function createPlugin(plugin) {
|
|
4
4
|
return plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createPlugin } from './mdream.
|
|
1
|
+
import { a as TEXT_NODE, E as ELEMENT_NODE, b7 as TAG_MAIN, b3 as TAG_HEADER, ab as TAG_FOOTER, aN as TAG_H1, aM as TAG_H2, aL as TAG_H3, aK as TAG_H4, aJ as TAG_H5, aI as TAG_H6 } from './mdream.C8Xgmr_a.mjs';
|
|
2
|
+
import { c as createPlugin } from './mdream.CNrwlePY.mjs';
|
|
3
3
|
|
|
4
4
|
class TagSelector {
|
|
5
5
|
constructor(tagName) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { E as ElementNode, M as MdreamRuntimeState, P as Plugin } from './mdream.C0Qx0F7t.mjs';
|
|
2
|
+
|
|
3
|
+
interface ExtractedElement extends ElementNode {
|
|
4
|
+
textContent: string;
|
|
5
|
+
}
|
|
6
|
+
declare function extractionPlugin(selectors: Record<string, (element: ExtractedElement, state: MdreamRuntimeState) => void>): Plugin;
|
|
7
|
+
|
|
8
|
+
export { extractionPlugin as e };
|
|
9
|
+
export type { ExtractedElement as E };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createPlugin } from './mdream.
|
|
1
|
+
import { ah as TAG_BODY, b0 as TAG_HTML, aV as TAG_HEAD, b1 as createBufferRegion, at as TAG_A, l as TAG_ADDRESS, aT as TAG_SUMMARY, aU as TAG_DETAILS, aQ as TAG_STYLE, aR as TAG_SCRIPT, al as TAG_SPAN, aO as TAG_BR, aH as TAG_HR, aD as TAG_I, aE as TAG_EM, aF as TAG_B, aG as TAG_STRONG, b2 as TAG_OBJECT, a5 as TAG_EMBED, Q as TAG_IFRAME, W as TAG_FIELDSET, Z as TAG_SELECT, Y as TAG_TEXTAREA, a4 as TAG_INPUT, ai as TAG_BUTTON, aa as TAG_FORM, v as TAG_ASIDE, ak as TAG_NAV, ab as TAG_FOOTER, b3 as TAG_HEADER, aI as TAG_H6, aJ as TAG_H5, aK as TAG_H4, aL as TAG_H3, aM as TAG_H2, aN as TAG_H1, i as TAG_DD, j as TAG_DT, k as TAG_DL, d as TAG_LI, av as TAG_OL, au as TAG_UL, ao as TAG_TD, ap as TAG_TH, aq as TAG_TR, ad as TAG_TFOOT, ae as TAG_TBODY, ar as TAG_THEAD, b4 as TAG_CAPTION, ag as TAG_TABLE, _ as TAG_SVG, U as TAG_AUDIO, S as TAG_VIDEO, b5 as TAG_FIGCAPTION, b6 as TAG_FIGURE, as as TAG_IMG, aw as TAG_CODE, b as TAG_PRE, e as TAG_BLOCKQUOTE, am as TAG_DIV, an as TAG_P, b7 as TAG_MAIN, b8 as TAG_SECTION, b9 as TAG_ARTICLE } from './mdream.C8Xgmr_a.mjs';
|
|
2
|
+
import { c as createPlugin } from './mdream.CNrwlePY.mjs';
|
|
3
3
|
|
|
4
4
|
const REGEXPS = {
|
|
5
5
|
// Positive patterns that suggest high-quality content
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdream",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"description": "Ultra-performant JavaScript HTML to Markdown converter optimized for LLMs.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"cac": "^6.7.14"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@antfu/eslint-config": "^4.
|
|
33
|
-
"@types/node": "^22.15.
|
|
34
|
-
"bumpp": "^10.
|
|
35
|
-
"crawlee": "^3.13.
|
|
36
|
-
"eslint": "^9.
|
|
32
|
+
"@antfu/eslint-config": "^4.16.1",
|
|
33
|
+
"@types/node": "^22.15.33",
|
|
34
|
+
"bumpp": "^10.2.0",
|
|
35
|
+
"crawlee": "^3.13.8",
|
|
36
|
+
"eslint": "^9.29.0",
|
|
37
37
|
"llm-cost": "^1.0.5",
|
|
38
|
-
"playwright": "^1.
|
|
38
|
+
"playwright": "^1.53.1",
|
|
39
39
|
"typescript": "5.8.3",
|
|
40
40
|
"unbuild": "^3.5.0",
|
|
41
|
-
"vitest": "^3.
|
|
41
|
+
"vitest": "^3.2.4"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"flame": "pnpm build && unbuild bench/bundle && clinic flame -- node bench/bundle/dist/string.mjs 10",
|