← Files DefuddleARCHIVED FILE
skills/defuddle-web-content/references/source/src/index.full.ts
1.2 KB · Oct 3, 2026 · 06:36 UTC
import { Defuddle as DefuddleBase } from './defuddle';
import { DefuddleOptions, DefuddleResponse } from './types';
import { toMarkdown, createMarkdownContent } from './markdown';
// Export types
export type { DefuddleOptions, DefuddleResponse };
// Export standalone markdown conversion
export { createMarkdownContent };
class Defuddle {
private defuddle: DefuddleBase;
private options: DefuddleOptions;
constructor(doc: Document, options: DefuddleOptions = {}) {
this.defuddle = new DefuddleBase(doc, options);
this.options = options;
}
parse(): DefuddleResponse {
const result = this.defuddle.parse();
toMarkdown(result, this.options, this.options.url ?? '');
return result;
}
async parseAsync(): Promise<DefuddleResponse> {
const result = await this.defuddle.parseAsync();
toMarkdown(result, this.options, this.options.url ?? '');
return result;
}
}
// Attach named exports as static properties for UMD/CJS consumers
(Defuddle as any).createMarkdownContent = createMarkdownContent;
// Export Defuddle as default
export default Defuddle;
// This file exists to ensure proper type generation for the full bundle
// The actual math module switching is handled by webpack's alias configuration
SHA-256: 5cd292efc1b7a4942a08497073bf0e4a2fd572c04a9a50582e2c8c565e77e721