@xlxz/markdown-editor 2.0.0

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.
Files changed (66) hide show
  1. package/dist/index.cjs +1806 -0
  2. package/dist/index.d.ts +23 -0
  3. package/dist/index.js +1774 -0
  4. package/dist/plugins/attachment.d.ts +7 -0
  5. package/dist/plugins/base-extensions.d.ts +8 -0
  6. package/dist/plugins/close-brackets.d.ts +8 -0
  7. package/dist/plugins/expand-text.d.ts +11 -0
  8. package/dist/plugins/fold.d.ts +8 -0
  9. package/dist/plugins/hanging-indent.d.ts +7 -0
  10. package/dist/plugins/indent-guide.d.ts +7 -0
  11. package/dist/plugins/index.d.ts +22 -0
  12. package/dist/plugins/keymap.d.ts +8 -0
  13. package/dist/plugins/line-numbers.d.ts +7 -0
  14. package/dist/plugins/link-handler.d.ts +8 -0
  15. package/dist/plugins/list-continuation.d.ts +8 -0
  16. package/dist/plugins/live-preview.d.ts +8 -0
  17. package/dist/plugins/markdown-language.d.ts +8 -0
  18. package/dist/plugins/on-change.d.ts +7 -0
  19. package/dist/plugins/suggest.d.ts +16 -0
  20. package/dist/plugins/table-continuation.d.ts +9 -0
  21. package/dist/plugins/table.d.ts +7 -0
  22. package/dist/plugins/theme.d.ts +8 -0
  23. package/dist/plugins/types.d.ts +29 -0
  24. package/dist/table/copy-widget.d.ts +17 -0
  25. package/dist/table/detect.d.ts +15 -0
  26. package/dist/table/format.d.ts +15 -0
  27. package/dist/table/index.d.ts +6 -0
  28. package/dist/table/theme.d.ts +8 -0
  29. package/package.json +57 -0
  30. package/vendor/app.css +15715 -0
  31. package/vendor/enhance.js +641 -0
  32. package/vendor/i18n/en.json +2144 -0
  33. package/vendor/i18n/zh.json +2144 -0
  34. package/vendor/lib/codemirror.js +14806 -0
  35. package/vendor/lib/i18next.min.js +2654 -0
  36. package/vendor/lib/markdown.js +1717 -0
  37. package/vendor/lib/mathjax/output/chtml/fonts/tex.js +1 -0
  38. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  39. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  40. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  41. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  42. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  43. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  44. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  45. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  46. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  47. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  48. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  49. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  50. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  51. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  52. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  53. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  54. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  55. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  56. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  57. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  58. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  59. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  60. package/vendor/lib/mathjax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  61. package/vendor/lib/mathjax/tex-chtml-full.js +36 -0
  62. package/vendor/lib/meta.min.js +1 -0
  63. package/vendor/lib/modes.min.js +236 -0
  64. package/vendor/lib/turndown.js +679 -0
  65. package/vendor/mock.js +28 -0
  66. package/vendor/obsidian-app.patched.js +161786 -0
@@ -0,0 +1,23 @@
1
+ /**
2
+ * xlxz-markdown-editor — 公开 API 入口
3
+ *
4
+ * @example
5
+ * import { createEditor } from 'xlxz-markdown-editor';
6
+ * const editor = createEditor(container, { doc: '# Hello' });
7
+ *
8
+ * @example 自定义插件组合
9
+ * import { createEditor, suggestPlugin, tablePlugin } from 'xlxz-markdown-editor';
10
+ * const editor = createEditor(container, { doc: '' });
11
+ * editor.use(tablePlugin);
12
+ *
13
+ * @example 注册补全 provider
14
+ * editor.registerSuggest({
15
+ * trigger: /\[\[(.*)$/,
16
+ * getSuggestions: (query) => backend.listLinkTargets().then(items => items.filter(...)),
17
+ * suffix: ']]',
18
+ * });
19
+ */
20
+ export { createEditor, autoLoad } from './kernel.js';
21
+ export type { EditorBackend, EditorOptions, EditorInstance, EditorPlugin, PluginContext, LinkTarget, SuggestConfig, SuggestItem, I18nProvider, AssetLoader, AutoLoadOptions, } from './types.js';
22
+ export { livePreviewPlugin, markdownLanguagePlugin, hangingIndentPlugin, listContinuationPlugin, closeBracketsPlugin, expandTextPlugin, foldPlugin, lineNumbersPlugin, indentGuidePlugin, suggestPlugin, linkHandlerPlugin, attachmentPlugin, tablePlugin, tableContinuationPlugin, themePlugin, baseExtensionsPlugin, keymapPlugin, onChangePlugin, } from './plugins/index.js';
23
+ export type { CompletionProvider } from './plugins/types.js';