/** * v1.10.0: Developer Experience utilities. * * Exports: * - CLASSES: frozen object of CSS class name constants for programmatic use * - warn(message, ...args): dev-mode warning emitter (gated on devWarnings option) * - validateCustomCallouts(configs, strict): validates customCallouts at init time * - suggestSimilarType(type, knownTypes): Levenshtein-based "did you mean" suggester * * @module dx */ /** * v1.10.0+: Frozen object of CSS class names used by the plugin. Use these * in CSS-in-JS, tests, or any code that needs to reference callout classes * programmatically without hardcoding strings. * * @example * ```ts * import { CLASSES } from '@dr-ishaan/remake-blocks'; * * document.querySelector(`.${CLASSES.CALLOUT_NOTE}`) // '.callout-note' * ``` */ export declare const CLASSES: Readonly<{ readonly CALLOUT: "callout"; readonly CALLOUT_NOTE: "callout-note"; readonly CALLOUT_TIP: "callout-tip"; readonly CALLOUT_IMPORTANT: "callout-important"; readonly CALLOUT_WARNING: "callout-warning"; readonly CALLOUT_CAUTION: "callout-caution"; readonly CALLOUT_ABSTRACT: "callout-abstract"; readonly CALLOUT_INFO: "callout-info"; readonly CALLOUT_SUCCESS: "callout-success"; readonly CALLOUT_QUESTION: "callout-question"; readonly CALLOUT_FAILURE: "callout-failure"; readonly CALLOUT_DANGER: "callout-danger"; readonly CALLOUT_QUOTE: "callout-quote"; readonly CALLOUT_BUG: "callout-bug"; readonly CALLOUT_EXAMPLE: "callout-example"; readonly CALLOUT_TODO: "callout-todo"; readonly CALLOUT_SUMMARY: "callout-summary"; readonly CALLOUT_TLDR: "callout-tldr"; readonly CALLOUT_HINT: "callout-hint"; readonly CALLOUT_CHECK: "callout-check"; readonly CALLOUT_DONE: "callout-done"; readonly CALLOUT_HELP: "callout-help"; readonly CALLOUT_FAQ: "callout-faq"; readonly CALLOUT_ATTENTION: "callout-attention"; readonly CALLOUT_FAIL: "callout-fail"; readonly CALLOUT_MISSING: "callout-missing"; readonly CALLOUT_ERROR: "callout-error"; readonly CALLOUT_CITE: "callout-cite"; readonly CALLOUT_DEFINITION: "callout-definition"; readonly CALLOUT_ASIDE: "callout-aside"; readonly CALLOUT_CORRECTION: "callout-correction"; readonly CALLOUT_UPDATE: "callout-update"; readonly CALLOUT_FIGURE: "callout-figure"; readonly CALLOUT_FURTHER_READING: "callout-further-reading"; readonly CALLOUT_PREREQUISITE: "callout-prerequisite"; readonly CALLOUT_EXERCISE: "callout-exercise"; readonly CALLOUT_SIDENOTE: "callout-sidenote"; readonly CALLOUT_TIMELINE: "callout-timeline"; readonly CALLOUT_ANNOUNCEMENT: "callout-announcement"; readonly CALLOUT_BIBLIOGRAPHY: "callout-bibliography"; readonly CALLOUT_DRAFT: "callout-draft"; readonly CALLOUT_TRANSLATION: "callout-translation"; readonly CALLOUT_DISCUSSION: "callout-discussion"; readonly CALLOUT_RETRO: "callout-retro"; readonly CALLOUT_TITLE: "callout-title"; readonly CALLOUT_TITLE_TEXT: "callout-title-text"; readonly CALLOUT_ICON: "callout-icon"; readonly CALLOUT_BODY: "callout-body"; readonly CALLOUT_COLLAPSIBLE: "collapsible"; readonly DISCLOSURE: "disclosure"; readonly DISCLOSURE_TITLE: "disclosure-title"; readonly DISCLOSURE_BODY: "disclosure-body"; readonly DISCLOSURE_ACCORDION: "disclosure-accordion"; readonly DISCLOSURE_TREE: "disclosure-tree"; readonly PULL_QUOTE: "pull-quote"; readonly PULL_QUOTE_TEXT: "pull-quote-text"; readonly PULL_QUOTE_ATTRIBUTION: "pull-quote-attribution"; readonly EPIGRAPH: "epigraph"; readonly EPIGRAPH_TEXT: "epigraph-text"; readonly EPIGRAPH_ATTRIBUTION: "epigraph-attribution"; readonly BLOCKQUOTE_ENHANCED: "blockquote-enhanced"; }>; export type CalloutClassName = keyof typeof CLASSES; /** * v1.10.0+: Emit a developer-mode warning via `console.warn`. * * The warning is prefixed with `[remake-blocks]` for easy identification * and filtering. No-op when `devWarnings` is false OR when running in * production (`process.env.NODE_ENV === 'production'`). * * @param enabled — whether devWarnings is enabled (from plugin options) * @param message — warning message (without prefix) * @param args — additional context args */ export declare function warn(enabled: boolean, message: string, ...args: unknown[]): void; /** * Find the closest matching type from a list of known types. * Returns the best match if its edit distance is ≤ 3 (reasonable threshold * for typo detection), or null if no close match exists. * * @example * ```ts * suggestSimilarType('TYPO', ['note', 'tip', 'warning']) // → 'tip' * suggestSimilarType('XYZ', ['note', 'tip']) // → null * ``` */ export declare function suggestSimilarType(input: string, knownTypes: string[]): string | null; /** * v1.10.0+: Validate `customCallouts` config entries. * * When `strict` is true, throws a descriptive Error for the first config * entry that's missing a required field. When `strict` is false, returns * an array of validation errors without throwing (caller decides what to do). * * Required fields per CalloutConfig: * - type (non-empty string) * - icon (string, may be empty for icon-less callouts) * - className (non-empty string, used for CSS targeting) * - defaultTitle (non-empty string) * - color (valid CSS color) * - backgroundColor (valid CSS color) * * @example * ```ts * validateCustomCallouts([ * { type: 'x', icon: '🔥', className: 'callout-x', defaultTitle: 'X', color: '#f00', backgroundColor: '#fee' } * ], true); // OK — no throw * * validateCustomCallouts([ * { type: 'x', icon: '🔥' /* missing className, defaultTitle, color, backgroundColor *\/ } * ], true); // throws: "Custom callout config[0] ('x') is missing required fields: className, defaultTitle, color, backgroundColor" * ``` */ export declare function validateCustomCallouts(configs: unknown[], strict: boolean): string[]; //# sourceMappingURL=dx.d.ts.map