{"version":3,"file":"dictionary-BAWvNoVT.cjs","names":[],"sources":["../src/i18n/locales/en.ts","../src/i18n/dictionary.ts"],"sourcesContent":["export const en = {\n  block: {\n    add_source_text: \"Add a LaTeX equation\",\n    input_placeholder: \"E = mc^2\",\n    preview_error_text: \"Invalid equation (click to edit)\",\n  },\n  inline: {\n    add_source_text: \"Add a LaTeX equation\",\n    input_placeholder: \"E = mc^2\",\n    preview_error_text: \"Invalid equation (click to edit)\",\n  },\n  slash_menu: {\n    math_block: {\n      title: \"Block Equation\",\n      subtext: \"Standalone math equation block\",\n      aliases: [\"math\", \"latex\", \"formula\", \"equation\"],\n      group: \"Advanced\",\n    },\n    inline_math: {\n      title: \"Inline Equation\",\n      subtext: \"Math symbols in text\",\n      aliases: [\"math\", \"latex\", \"formula\", \"equation\"],\n      group: \"Advanced\",\n    },\n  },\n  block_type_select: {\n    name: \"Equation\",\n  },\n  exporter: {\n    invalid_formula: (source: string) => `Invalid formula \"${source}\"`,\n  },\n};\n","import { BlockNoteEditor, Exporter } from \"@blocknote/core\";\n\nimport { en } from \"./locales/en.js\";\n\nexport type MathDictionary = typeof en;\n\n/**\n * Returns the Math dictionary for the editor. The Math block/inline content are\n * localized by merging a `math` dictionary into the editor's dictionary (see\n * the exported `locales`); when the host hasn't provided one, the bundled\n * English strings are used, so the blocks work without extra setup.\n */\nexport function getMathDictionary(\n  editor: BlockNoteEditor<any, any, any>,\n): MathDictionary {\n  return ((editor.dictionary as any).math as MathDictionary | undefined) ?? en;\n}\n\n/**\n * Returns the Math exporter strings. Exporters are localized independently\n * of an editor: the host passes a dictionary to the exporter's options\n * (see `ExporterOptions.dictionary`), and the math strings are read from\n * its `math` section - the same shape merged into editor dictionaries -\n * falling back to the bundled English strings.\n */\nexport function getMathExporterDictionary(\n  exporter: Exporter<any, any, any, any, any, any, any>,\n): MathDictionary[\"exporter\"] {\n  return (\n    ((exporter.options.dictionary as any)?.math as MathDictionary | undefined)\n      ?.exporter ?? en.exporter\n  );\n}\n"],"mappings":"4mBAAa,EAAK,CAChB,MAAO,CACL,gBAAiB,uBACjB,kBAAmB,WACnB,mBAAoB,kCACtB,EACA,OAAQ,CACN,gBAAiB,uBACjB,kBAAmB,WACnB,mBAAoB,kCACtB,EACA,WAAY,CACV,WAAY,CACV,MAAO,iBACP,QAAS,iCACT,QAAS,CAAC,OAAQ,QAAS,UAAW,UAAU,EAChD,MAAO,UACT,EACA,YAAa,CACX,MAAO,kBACP,QAAS,uBACT,QAAS,CAAC,OAAQ,QAAS,UAAW,UAAU,EAChD,MAAO,UACT,CACF,EACA,kBAAmB,CACjB,KAAM,UACR,EACA,SAAU,CACR,gBAAkB,GAAmB,oBAAoB,EAAO,EAClE,CACF,ECnBA,SAAgB,EACd,EACgB,CAChB,OAAS,EAAO,WAAmB,MAAuC,CAC5E,CASA,SAAgB,EACd,EAC4B,CAC5B,OACI,EAAS,QAAQ,YAAoB,MACnC,UAAY,EAAG,QAEvB"}