@lakamark/modulo-editor 0.2.0-alpha.1

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 (149) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -0
  3. package/dist/modulo-editor.js +1018 -0
  4. package/dist/modulo-editor.js.map +1 -0
  5. package/dist/modulo-editor.umd.cjs +5 -0
  6. package/dist/modulo-editor.umd.cjs.map +1 -0
  7. package/dist/types/commands/builtin/BoldCommand.d.ts +9 -0
  8. package/dist/types/commands/builtin/BoldCommand.d.ts.map +1 -0
  9. package/dist/types/commands/builtin/HeadingCommand.d.ts +8 -0
  10. package/dist/types/commands/builtin/HeadingCommand.d.ts.map +1 -0
  11. package/dist/types/commands/builtin/ItalicCommand.d.ts +6 -0
  12. package/dist/types/commands/builtin/ItalicCommand.d.ts.map +1 -0
  13. package/dist/types/commands/builtin/index.d.ts +11 -0
  14. package/dist/types/commands/builtin/index.d.ts.map +1 -0
  15. package/dist/types/commands/contracts/EditorCommand.d.ts +18 -0
  16. package/dist/types/commands/contracts/EditorCommand.d.ts.map +1 -0
  17. package/dist/types/commands/contracts/EditorCommandContext.d.ts +15 -0
  18. package/dist/types/commands/contracts/EditorCommandContext.d.ts.map +1 -0
  19. package/dist/types/commands/contracts/EditorInput.d.ts +14 -0
  20. package/dist/types/commands/contracts/EditorInput.d.ts.map +1 -0
  21. package/dist/types/commands/contracts/index.d.ts +4 -0
  22. package/dist/types/commands/contracts/index.d.ts.map +1 -0
  23. package/dist/types/commands/index.d.ts +5 -0
  24. package/dist/types/commands/index.d.ts.map +1 -0
  25. package/dist/types/commands/registry/EditorCommandRegistry.d.ts +28 -0
  26. package/dist/types/commands/registry/EditorCommandRegistry.d.ts.map +1 -0
  27. package/dist/types/commands/registry/EditorCommandsApi.d.ts +14 -0
  28. package/dist/types/commands/registry/EditorCommandsApi.d.ts.map +1 -0
  29. package/dist/types/commands/registry/RegistryEditorCommandsApi.d.ts +20 -0
  30. package/dist/types/commands/registry/RegistryEditorCommandsApi.d.ts.map +1 -0
  31. package/dist/types/commands/registry/index.d.ts +4 -0
  32. package/dist/types/commands/registry/index.d.ts.map +1 -0
  33. package/dist/types/commands/setup/assertCustomCommandsAreValid.d.ts +12 -0
  34. package/dist/types/commands/setup/assertCustomCommandsAreValid.d.ts.map +1 -0
  35. package/dist/types/commands/setup/builtin-command-names.d.ts +16 -0
  36. package/dist/types/commands/setup/builtin-command-names.d.ts.map +1 -0
  37. package/dist/types/commands/setup/index.d.ts +6 -0
  38. package/dist/types/commands/setup/index.d.ts.map +1 -0
  39. package/dist/types/commands/setup/resolveBuiltinCommands.d.ts +4 -0
  40. package/dist/types/commands/setup/resolveBuiltinCommands.d.ts.map +1 -0
  41. package/dist/types/commands/setup/setupEditorCommands.d.ts +30 -0
  42. package/dist/types/commands/setup/setupEditorCommands.d.ts.map +1 -0
  43. package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts +117 -0
  44. package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts.map +1 -0
  45. package/dist/types/core/Builder/index.d.ts +2 -0
  46. package/dist/types/core/Builder/index.d.ts.map +1 -0
  47. package/dist/types/core/DefaultEditorDocument.d.ts +11 -0
  48. package/dist/types/core/DefaultEditorDocument.d.ts.map +1 -0
  49. package/dist/types/core/ModuloEditor.d.ts +93 -0
  50. package/dist/types/core/ModuloEditor.d.ts.map +1 -0
  51. package/dist/types/core/contracts/EditorDocument.d.ts +16 -0
  52. package/dist/types/core/contracts/EditorDocument.d.ts.map +1 -0
  53. package/dist/types/core/contracts/ModuloEditorBuilder.d.ts +23 -0
  54. package/dist/types/core/contracts/ModuloEditorBuilder.d.ts.map +1 -0
  55. package/dist/types/core/contracts/ModuloEditorOptions.d.ts +52 -0
  56. package/dist/types/core/contracts/ModuloEditorOptions.d.ts.map +1 -0
  57. package/dist/types/core/contracts/index.d.ts +4 -0
  58. package/dist/types/core/contracts/index.d.ts.map +1 -0
  59. package/dist/types/core/index.d.ts +6 -0
  60. package/dist/types/core/index.d.ts.map +1 -0
  61. package/dist/types/dom/DefaultEditorDomResolver.d.ts +42 -0
  62. package/dist/types/dom/DefaultEditorDomResolver.d.ts.map +1 -0
  63. package/dist/types/dom/contracts/EditorDomResolver.d.ts +20 -0
  64. package/dist/types/dom/contracts/EditorDomResolver.d.ts.map +1 -0
  65. package/dist/types/dom/contracts/EditorDomSlots.d.ts +62 -0
  66. package/dist/types/dom/contracts/EditorDomSlots.d.ts.map +1 -0
  67. package/dist/types/dom/contracts/index.d.ts +3 -0
  68. package/dist/types/dom/contracts/index.d.ts.map +1 -0
  69. package/dist/types/dom/index.d.ts +2 -0
  70. package/dist/types/dom/index.d.ts.map +1 -0
  71. package/dist/types/index.d.ts +7 -0
  72. package/dist/types/index.d.ts.map +1 -0
  73. package/dist/types/input/EditorInputAdapter.d.ts +17 -0
  74. package/dist/types/input/EditorInputAdapter.d.ts.map +1 -0
  75. package/dist/types/input/EditorInputState.d.ts +6 -0
  76. package/dist/types/input/EditorInputState.d.ts.map +1 -0
  77. package/dist/types/input/TextareaInputAdapter.d.ts +18 -0
  78. package/dist/types/input/TextareaInputAdapter.d.ts.map +1 -0
  79. package/dist/types/input/index.d.ts +4 -0
  80. package/dist/types/input/index.d.ts.map +1 -0
  81. package/dist/types/markdown/config/ConfigurableHtmlSanitizer.d.ts +23 -0
  82. package/dist/types/markdown/config/ConfigurableHtmlSanitizer.d.ts.map +1 -0
  83. package/dist/types/markdown/config/DefaultHtmlSanitizerConfig.d.ts +6 -0
  84. package/dist/types/markdown/config/DefaultHtmlSanitizerConfig.d.ts.map +1 -0
  85. package/dist/types/markdown/config/HtmlSanitizerConfig.d.ts +14 -0
  86. package/dist/types/markdown/config/HtmlSanitizerConfig.d.ts.map +1 -0
  87. package/dist/types/markdown/config/index.d.ts +4 -0
  88. package/dist/types/markdown/config/index.d.ts.map +1 -0
  89. package/dist/types/markdown/contracts/HtmlSanitizer.d.ts +15 -0
  90. package/dist/types/markdown/contracts/HtmlSanitizer.d.ts.map +1 -0
  91. package/dist/types/markdown/contracts/MarkdownParser.d.ts +12 -0
  92. package/dist/types/markdown/contracts/MarkdownParser.d.ts.map +1 -0
  93. package/dist/types/markdown/contracts/MarkdownProcessor.d.ts +12 -0
  94. package/dist/types/markdown/contracts/MarkdownProcessor.d.ts.map +1 -0
  95. package/dist/types/markdown/contracts/index.d.ts +4 -0
  96. package/dist/types/markdown/contracts/index.d.ts.map +1 -0
  97. package/dist/types/markdown/index.d.ts +6 -0
  98. package/dist/types/markdown/index.d.ts.map +1 -0
  99. package/dist/types/markdown/parser/DefaultMarkdownProcessor.d.ts +18 -0
  100. package/dist/types/markdown/parser/DefaultMarkdownProcessor.d.ts.map +1 -0
  101. package/dist/types/markdown/parser/PlainTextMarkdownParser.d.ts +11 -0
  102. package/dist/types/markdown/parser/PlainTextMarkdownParser.d.ts.map +1 -0
  103. package/dist/types/markdown/parser/index.d.ts +3 -0
  104. package/dist/types/markdown/parser/index.d.ts.map +1 -0
  105. package/dist/types/markdown/sanitizers/DomPurifyHtmlSanitizer.d.ts +27 -0
  106. package/dist/types/markdown/sanitizers/DomPurifyHtmlSanitizer.d.ts.map +1 -0
  107. package/dist/types/markdown/sanitizers/NoopHtmlSanitizer.d.ts +11 -0
  108. package/dist/types/markdown/sanitizers/NoopHtmlSanitizer.d.ts.map +1 -0
  109. package/dist/types/markdown/sanitizers/index.d.ts +3 -0
  110. package/dist/types/markdown/sanitizers/index.d.ts.map +1 -0
  111. package/dist/types/output/EditorOutputAdapter.d.ts +25 -0
  112. package/dist/types/output/EditorOutputAdapter.d.ts.map +1 -0
  113. package/dist/types/output/HtmlPreviewAdapter.d.ts +20 -0
  114. package/dist/types/output/HtmlPreviewAdapter.d.ts.map +1 -0
  115. package/dist/types/output/index.d.ts +3 -0
  116. package/dist/types/output/index.d.ts.map +1 -0
  117. package/dist/types/plugins/contracts/EditorPlugin.d.ts +19 -0
  118. package/dist/types/plugins/contracts/EditorPlugin.d.ts.map +1 -0
  119. package/dist/types/plugins/contracts/EditorPluginApi.d.ts +11 -0
  120. package/dist/types/plugins/contracts/EditorPluginApi.d.ts.map +1 -0
  121. package/dist/types/plugins/contracts/index.d.ts +3 -0
  122. package/dist/types/plugins/contracts/index.d.ts.map +1 -0
  123. package/dist/types/plugins/index.d.ts +3 -0
  124. package/dist/types/plugins/index.d.ts.map +1 -0
  125. package/dist/types/plugins/toolbar/base/CommandButtonPlugin.d.ts +31 -0
  126. package/dist/types/plugins/toolbar/base/CommandButtonPlugin.d.ts.map +1 -0
  127. package/dist/types/plugins/toolbar/base/CommandButtonPluginOptions.d.ts +23 -0
  128. package/dist/types/plugins/toolbar/base/CommandButtonPluginOptions.d.ts.map +1 -0
  129. package/dist/types/plugins/toolbar/base/index.d.ts +3 -0
  130. package/dist/types/plugins/toolbar/base/index.d.ts.map +1 -0
  131. package/dist/types/plugins/toolbar/buttons/BoldToolbarPlugin.d.ts +8 -0
  132. package/dist/types/plugins/toolbar/buttons/BoldToolbarPlugin.d.ts.map +1 -0
  133. package/dist/types/plugins/toolbar/buttons/HeadingToolbarPlugin.d.ts +5 -0
  134. package/dist/types/plugins/toolbar/buttons/HeadingToolbarPlugin.d.ts.map +1 -0
  135. package/dist/types/plugins/toolbar/buttons/ItalicToolbarPlugin.d.ts +5 -0
  136. package/dist/types/plugins/toolbar/buttons/ItalicToolbarPlugin.d.ts.map +1 -0
  137. package/dist/types/plugins/toolbar/buttons/index.d.ts +4 -0
  138. package/dist/types/plugins/toolbar/buttons/index.d.ts.map +1 -0
  139. package/dist/types/plugins/toolbar/createDefaultToolbarPlugins.d.ts +6 -0
  140. package/dist/types/plugins/toolbar/createDefaultToolbarPlugins.d.ts.map +1 -0
  141. package/dist/types/plugins/toolbar/index.d.ts +4 -0
  142. package/dist/types/plugins/toolbar/index.d.ts.map +1 -0
  143. package/dist/types/textarea/HiddenTextareaBridge.d.ts +12 -0
  144. package/dist/types/textarea/HiddenTextareaBridge.d.ts.map +1 -0
  145. package/dist/types/textarea/TextareaBridge.d.ts +24 -0
  146. package/dist/types/textarea/TextareaBridge.d.ts.map +1 -0
  147. package/dist/types/textarea/index.d.ts +3 -0
  148. package/dist/types/textarea/index.d.ts.map +1 -0
  149. package/package.json +71 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorInputState.d.ts","sourceRoot":"","sources":["../../../src/input/EditorInputState.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CACjC"}
@@ -0,0 +1,18 @@
1
+ import type { EditorInputAdapter } from "./EditorInputAdapter";
2
+ import type { EditorInputState } from "./EditorInputState";
3
+ export declare class TextareaInputAdapter implements EditorInputAdapter {
4
+ private textarea;
5
+ private listeners;
6
+ mount(element: HTMLElement, initialValue: string): void;
7
+ getState(): EditorInputState;
8
+ setSelection(start: number, end: number): void;
9
+ getValue(): string;
10
+ setValue(value: string): void;
11
+ focus(): void;
12
+ onChange(listener: (value: string) => void): () => void;
13
+ destroy(): void;
14
+ private generateId;
15
+ private setTextareaAttributes;
16
+ private getElement;
17
+ }
18
+ //# sourceMappingURL=TextareaInputAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextareaInputAdapter.d.ts","sourceRoot":"","sources":["../../../src/input/TextareaInputAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEzD,qBAAa,oBAAqB,YAAW,kBAAkB;IAC3D,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,SAAS,CAAsC;IAEhD,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAkBvD,QAAQ,IAAI,gBAAgB;IAU5B,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAI9C,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ7B,KAAK,IAAI,IAAI;IAIb,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAUvD,OAAO,IAAI,IAAI;IAMtB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,UAAU;CAOrB"}
@@ -0,0 +1,4 @@
1
+ export type { EditorInputState } from './EditorInputState';
2
+ export type { EditorInputAdapter } from './EditorInputAdapter';
3
+ export { TextareaInputAdapter } from './TextareaInputAdapter';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { HtmlSanitizer } from "../contracts";
2
+ import type { HtmlSanitizerConfig } from "./HtmlSanitizerConfig";
3
+ /**
4
+ * Configurable HTML sanitizer.
5
+ *
6
+ * This class encapsulates sanitization rules and must remain
7
+ * completely isolated from the editor core.
8
+ */
9
+ export declare class ConfigurableHtmlSanitizer implements HtmlSanitizer {
10
+ private readonly config;
11
+ constructor(config: HtmlSanitizerConfig);
12
+ /**
13
+ * Sanitizes raw HTML output.
14
+ *
15
+ * @param html - Raw HTML string
16
+ */
17
+ sanitize(html: string): string;
18
+ /**
19
+ * Returns the active sanitizer configuration.
20
+ */
21
+ getConfig(): HtmlSanitizerConfig;
22
+ }
23
+ //# sourceMappingURL=ConfigurableHtmlSanitizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigurableHtmlSanitizer.d.ts","sourceRoot":"","sources":["../../../../src/markdown/config/ConfigurableHtmlSanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D;;;;;GAKG;AACH,qBAAa,yBAA0B,YAAW,aAAa;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAE1B,MAAM,EAAE,mBAAmB;IAI9C;;;;OAIG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIrC;;OAEG;IACI,SAAS,IAAI,mBAAmB;CAG1C"}
@@ -0,0 +1,6 @@
1
+ import type { HtmlSanitizerConfig } from "./HtmlSanitizerConfig";
2
+ /**
3
+ * Default strict sanitizer configuration.
4
+ */
5
+ export declare const DEFAULT_HTML_SANITIZER_CONFIG: HtmlSanitizerConfig;
6
+ //# sourceMappingURL=DefaultHtmlSanitizerConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultHtmlSanitizerConfig.d.ts","sourceRoot":"","sources":["../../../../src/markdown/config/DefaultHtmlSanitizerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAgB3C,CAAA"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Configuration used by HTML sanitizer implementations.
3
+ */
4
+ export interface HtmlSanitizerConfig {
5
+ /**
6
+ * Allowed HTML tags.
7
+ */
8
+ readonly allowedTags?: readonly string[];
9
+ /**
10
+ * Allowed attributes per tag.
11
+ */
12
+ readonly allowedAttributes?: Readonly<Record<string, readonly string[]>>;
13
+ }
14
+ //# sourceMappingURL=HtmlSanitizerConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlSanitizerConfig.d.ts","sourceRoot":"","sources":["../../../../src/markdown/config/HtmlSanitizerConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CACjC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CACpC,CAAC;CACL"}
@@ -0,0 +1,4 @@
1
+ export type { HtmlSanitizerConfig } from './HtmlSanitizerConfig';
2
+ export { ConfigurableHtmlSanitizer } from './ConfigurableHtmlSanitizer';
3
+ export { DEFAULT_HTML_SANITIZER_CONFIG } from './DefaultHtmlSanitizerConfig';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/markdown/config/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EAAC,6BAA6B,EAAC,MAAM,8BAA8B,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Sanitizes HTML output before it is rendered.
3
+ *
4
+ * This abstraction is responsible for enforcing the allowed tags
5
+ * and attributes policy. It must remain isolated from the editor core.
6
+ */
7
+ export interface HtmlSanitizer {
8
+ /**
9
+ * Sanitizes raw HTML content.
10
+ *
11
+ * @param html - Raw HTML string
12
+ */
13
+ sanitize(html: string): string;
14
+ }
15
+ //# sourceMappingURL=HtmlSanitizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlSanitizer.d.ts","sourceRoot":"","sources":["../../../../src/markdown/contracts/HtmlSanitizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Parses raw Markdown content into HTML.
3
+ */
4
+ export interface MarkdownParser {
5
+ /**
6
+ * Converts markdown into HTML.
7
+ *
8
+ * @param markdown - Raw markdown content
9
+ */
10
+ parse(markdown: string): string;
11
+ }
12
+ //# sourceMappingURL=MarkdownParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownParser.d.ts","sourceRoot":"","sources":["../../../../src/markdown/contracts/MarkdownParser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Transforms raw Markdown content into safe HTML.
3
+ */
4
+ export interface MarkdownProcessor {
5
+ /**
6
+ * Converts markdown into sanitized HTML.
7
+ *
8
+ * @param markdown - Raw markdown content
9
+ */
10
+ toHtml(markdown: string): string;
11
+ }
12
+ //# sourceMappingURL=MarkdownProcessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownProcessor.d.ts","sourceRoot":"","sources":["../../../../src/markdown/contracts/MarkdownProcessor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC"}
@@ -0,0 +1,4 @@
1
+ export type { MarkdownParser } from './MarkdownParser';
2
+ export type { MarkdownProcessor } from './MarkdownProcessor';
3
+ export type { HtmlSanitizer } from './HtmlSanitizer';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/markdown/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./contracts";
2
+ export * from "./config";
3
+ export * from "./parser";
4
+ export * from "./parser";
5
+ export * from "./sanitizers";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { HtmlSanitizer, MarkdownParser, MarkdownProcessor } from "../contracts";
2
+ /**
3
+ * Default Markdown processor implementation.
4
+ *
5
+ * This class delegates Markdown parsing and HTML sanitization
6
+ * to dedicated abstractions and keeps those concerns outside
7
+ * the editor core.
8
+ */
9
+ export declare class DefaultMarkdownProcessor implements MarkdownProcessor {
10
+ private readonly parser;
11
+ private readonly sanitize;
12
+ constructor(parser: MarkdownParser, sanitize: HtmlSanitizer);
13
+ /**
14
+ * Converts Markdown into safe HTML.
15
+ */
16
+ toHtml(markdown: string): string;
17
+ }
18
+ //# sourceMappingURL=DefaultMarkdownProcessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultMarkdownProcessor.d.ts","sourceRoot":"","sources":["../../../../src/markdown/parser/DefaultMarkdownProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,cAAc,EACd,iBAAiB,EACpB,MAAM,cAAc,CAAC;AAEtB;;;;;;GAMG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;gBAGrC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,aAAa;IAM3B;;OAEG;IACI,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAK1C"}
@@ -0,0 +1,11 @@
1
+ import type { MarkdownParser } from "../contracts";
2
+ /**
3
+ * Temporary Markdown parser used for development.
4
+ *
5
+ * This implementation does not parse real Markdown yet.
6
+ * It simply wraps text inside a paragraph.
7
+ */
8
+ export declare class PlainTextMarkdownParser implements MarkdownParser {
9
+ parse(markdown: string): string;
10
+ }
11
+ //# sourceMappingURL=PlainTextMarkdownParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlainTextMarkdownParser.d.ts","sourceRoot":"","sources":["../../../../src/markdown/parser/PlainTextMarkdownParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEjD;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,cAAc;IACnD,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAKzC"}
@@ -0,0 +1,3 @@
1
+ export { PlainTextMarkdownParser } from './PlainTextMarkdownParser';
2
+ export { DefaultMarkdownProcessor } from './DefaultMarkdownProcessor';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/markdown/parser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAA"}
@@ -0,0 +1,27 @@
1
+ import type { HtmlSanitizer } from "../contracts";
2
+ import type { HtmlSanitizerConfig } from "../config";
3
+ /**
4
+ * HTML sanitizer implementation backed by DOMPurify.
5
+ *
6
+ * This class is isolated from the editor core and is only responsible
7
+ * for transforming unsafe HTML into safe HTML according to the provided
8
+ * configuration.
9
+ */
10
+ export declare class DomPurifyHtmlSanitizer implements HtmlSanitizer {
11
+ private readonly config;
12
+ constructor(config: HtmlSanitizerConfig);
13
+ /**
14
+ * Sanitizes raw HTML output.
15
+ *
16
+ * @param html - Raw HTML string
17
+ */
18
+ sanitize(html: string): string;
19
+ /**
20
+ * Flattens per-tag allowed attributes into a DOMPurify-compatible list.
21
+ *
22
+ * DOMPurify's ALLOWED_ATTR is global, so this is a first clean step.
23
+ * If you later want stricter per-tag control, you can move to hooks.
24
+ */
25
+ private flattenAllowedAttributes;
26
+ }
27
+ //# sourceMappingURL=DomPurifyHtmlSanitizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomPurifyHtmlSanitizer.d.ts","sourceRoot":"","sources":["../../../../src/markdown/sanitizers/DomPurifyHtmlSanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,WAAW,CAAC;AAInD;;;;;;GAMG;AACH,qBAAa,sBAAuB,YAAW,aAAa;IACxD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAE1B,MAAM,EAAE,mBAAmB;IAI9C;;;;OAIG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAUrC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;CAiBnC"}
@@ -0,0 +1,11 @@
1
+ import type { HtmlSanitizer } from "../contracts";
2
+ /**
3
+ * Temporary sanitizer used for development.
4
+ *
5
+ * This implementation returns HTML as-is and must not be used
6
+ * as a production-safe sanitizer.
7
+ */
8
+ export declare class NoopHtmlSanitizer implements HtmlSanitizer {
9
+ sanitize(html: string): string;
10
+ }
11
+ //# sourceMappingURL=NoopHtmlSanitizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoopHtmlSanitizer.d.ts","sourceRoot":"","sources":["../../../../src/markdown/sanitizers/NoopHtmlSanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAEhD;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,aAAa;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGxC"}
@@ -0,0 +1,3 @@
1
+ export { NoopHtmlSanitizer } from './NoopHtmlSanitizer';
2
+ export { DomPurifyHtmlSanitizer } from './DomPurifyHtmlSanitizer';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/markdown/sanitizers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Adapter responsible for rendering editor output.
3
+ *
4
+ * The output adapter only displays already processed content.
5
+ * It does not parse or sanitize Markdown by itself.
6
+ */
7
+ export interface EditorOutputAdapter {
8
+ /**
9
+ * Mounts the output inside the given container.
10
+ *
11
+ * @param element - Preview container
12
+ */
13
+ mount(element: HTMLElement): void;
14
+ /**
15
+ * Renders processed HTML output.
16
+ *
17
+ * @param html - Safe HTML content
18
+ */
19
+ render(html: string): void;
20
+ /**
21
+ * Cleans up internal references.
22
+ */
23
+ destroy(): void;
24
+ }
25
+ //# sourceMappingURL=EditorOutputAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorOutputAdapter.d.ts","sourceRoot":"","sources":["../../../src/output/EditorOutputAdapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAElC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
@@ -0,0 +1,20 @@
1
+ import type { EditorOutputAdapter } from "./EditorOutputAdapter";
2
+ /**
3
+ * Default output adapter that renders HTML inside a preview container.
4
+ */
5
+ export declare class HtmlPreviewAdapter implements EditorOutputAdapter {
6
+ private element;
7
+ /**
8
+ * Attaches the adapter to a preview container.
9
+ */
10
+ mount(element: HTMLElement): void;
11
+ /**
12
+ * Renders HTML inside the mounted preview container.
13
+ */
14
+ render(html: string): void;
15
+ /**
16
+ * Clears the mounted element reference.
17
+ */
18
+ destroy(): void;
19
+ }
20
+ //# sourceMappingURL=HtmlPreviewAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HtmlPreviewAdapter.d.ts","sourceRoot":"","sources":["../../../src/output/HtmlPreviewAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAC1D,OAAO,CAAC,OAAO,CAA4B;IAE3C;;OAEG;IACI,KAAK,CAAC,OAAO,EAAE,WAAW,GAAE,IAAI;IAIvC;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM;IAQ1B;;OAEG;IACI,OAAO,IAAI,IAAI;CAOzB"}
@@ -0,0 +1,3 @@
1
+ export type { EditorOutputAdapter } from "./EditorOutputAdapter";
2
+ export { HtmlPreviewAdapter } from './HtmlPreviewAdapter';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/output/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { EditorPluginApi } from "./EditorPluginApi";
2
+ /**
3
+ * Contract implemented by editor plugins.
4
+ */
5
+ export interface EditorPlugin {
6
+ /**
7
+ * Unique plugin name.
8
+ */
9
+ readonly name: string;
10
+ /**
11
+ * Called when the plugin is initialized.
12
+ */
13
+ setup(api: EditorPluginApi): void;
14
+ /**
15
+ * Called when the plugin is destroyed.
16
+ */
17
+ destroy(): void;
18
+ }
19
+ //# sourceMappingURL=EditorPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/contracts/EditorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
@@ -0,0 +1,11 @@
1
+ import type { EditorCommandsApi } from "../../commands";
2
+ import type { EditorDomSlots } from "../../dom/contracts";
3
+ /**
4
+ * Public API exposed to editor plugins.
5
+ */
6
+ export interface EditorPluginApi {
7
+ readonly commands: EditorCommandsApi;
8
+ readonly slots: EditorDomSlots;
9
+ executeCommand(name: string): void;
10
+ }
11
+ //# sourceMappingURL=EditorPluginApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorPluginApi.d.ts","sourceRoot":"","sources":["../../../../src/plugins/contracts/EditorPluginApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC"}
@@ -0,0 +1,3 @@
1
+ export type { EditorPlugin } from './EditorPlugin';
2
+ export type { EditorPluginApi } from './EditorPluginApi';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./contracts";
2
+ export * from "./toolbar";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { EditorPlugin, EditorPluginApi } from "../../contracts";
2
+ import type { CommandButtonPluginOptions } from "./CommandButtonPluginOptions";
3
+ /**
4
+ * Generic toolbar plugin responsible for rendering
5
+ * a button that executes a command.
6
+ */
7
+ export declare class CommandButtonPlugin implements EditorPlugin {
8
+ readonly name: string;
9
+ private readonly commandName;
10
+ private readonly content;
11
+ private button;
12
+ private api;
13
+ constructor(options: CommandButtonPluginOptions);
14
+ /**
15
+ * Mounts the button and binds click interaction.
16
+ */
17
+ setup(api: EditorPluginApi): void;
18
+ /**
19
+ * Removes the button and cleans up listeners.
20
+ */
21
+ destroy(): void;
22
+ /**
23
+ * Renders the configured button content.
24
+ */
25
+ private renderButtonContent;
26
+ /**
27
+ * Executes the configured command when available.
28
+ */
29
+ private readonly handleClick;
30
+ }
31
+ //# sourceMappingURL=CommandButtonPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandButtonPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/base/CommandButtonPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EACZ,eAAe,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AAE7E;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACpD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6C;IAErE,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,GAAG,CAAgC;gBAExB,OAAO,EAAE,0BAA0B;IAMtD;;OAEG;IACI,KAAK,CAAC,GAAG,EAAE,eAAe,GAAE,IAAI;IAoBvC;;OAEG;IACI,OAAO,IAAI,IAAI;IAUtB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAe3B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAM1B;CACL"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Options used to create a command button plugin.
3
+ */
4
+ export interface CommandButtonPluginOptions {
5
+ /**
6
+ * Unique plugin name.
7
+ */
8
+ readonly pluginName: string;
9
+ /**
10
+ * Command executed when the button is clicked.
11
+ */
12
+ readonly commandName: string;
13
+ /**
14
+ * Button content.
15
+ *
16
+ * Can be:
17
+ * - plain text
18
+ * - an HTMLElement
19
+ * - a factory returning an HTMLElement
20
+ */
21
+ readonly content: string | HTMLElement | (() => HTMLElement);
22
+ }
23
+ //# sourceMappingURL=CommandButtonPluginOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandButtonPluginOptions.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/base/CommandButtonPluginOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,CAAC;CAChE"}
@@ -0,0 +1,3 @@
1
+ export type { CommandButtonPluginOptions } from './CommandButtonPluginOptions';
2
+ export { CommandButtonPlugin } from './CommandButtonPlugin';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/base/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { CommandButtonPlugin } from "../base";
2
+ /**
3
+ * Toolbar plugin rendering a button for the bold command.
4
+ */
5
+ export declare class BoldToolbarPlugin extends CommandButtonPlugin {
6
+ constructor();
7
+ }
8
+ //# sourceMappingURL=BoldToolbarPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoldToolbarPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/buttons/BoldToolbarPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,mBAAmB;;CAQzD"}
@@ -0,0 +1,5 @@
1
+ import { CommandButtonPlugin } from "../base";
2
+ export declare class HeadingToolbarPlugin extends CommandButtonPlugin {
3
+ constructor(level: number);
4
+ }
5
+ //# sourceMappingURL=HeadingToolbarPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeadingToolbarPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/buttons/HeadingToolbarPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAE5C,qBAAa,oBAAqB,SAAQ,mBAAmB;gBACtC,KAAK,EAAE,MAAM;CAOnC"}
@@ -0,0 +1,5 @@
1
+ import { CommandButtonPlugin } from "../base";
2
+ export declare class ItalicToolbarPlugin extends CommandButtonPlugin {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=ItalicToolbarPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItalicToolbarPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/buttons/ItalicToolbarPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAE5C,qBAAa,mBAAoB,SAAQ,mBAAmB;;CAQ3D"}
@@ -0,0 +1,4 @@
1
+ export { BoldToolbarPlugin } from './BoldToolbarPlugin';
2
+ export { ItalicToolbarPlugin } from './ItalicToolbarPlugin';
3
+ export { HeadingToolbarPlugin } from './HeadingToolbarPlugin';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/toolbar/buttons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { EditorPlugin } from "../contracts";
2
+ export type ToolbarPresetOptions = {
3
+ headings?: number[];
4
+ };
5
+ export declare function createDefaultToolbarPlugins(options?: ToolbarPresetOptions): readonly EditorPlugin[];
6
+ //# sourceMappingURL=createDefaultToolbarPlugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDefaultToolbarPlugins.d.ts","sourceRoot":"","sources":["../../../../src/plugins/toolbar/createDefaultToolbarPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAQ/C,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,wBAAgB,2BAA2B,CACvC,OAAO,GAAE,oBAAyB,GACnC,SAAS,YAAY,EAAE,CAQzB"}
@@ -0,0 +1,4 @@
1
+ export * from "./base";
2
+ export * from "./buttons";
3
+ export { createDefaultToolbarPlugins } from './createDefaultToolbarPlugins';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/toolbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAC,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { TextareaBridge } from "./TextareaBridge";
2
+ /**
3
+ * Default textarea bridge implementation.
4
+ */
5
+ export declare class HiddenTextareaBridge implements TextareaBridge {
6
+ private textarea;
7
+ mount(textarea: HTMLTextAreaElement): void;
8
+ getValue(): string;
9
+ setValue(value: string): void;
10
+ destroy(): void;
11
+ }
12
+ //# sourceMappingURL=HiddenTextareaBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiddenTextareaBridge.d.ts","sourceRoot":"","sources":["../../../src/textarea/HiddenTextareaBridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAErD;;GAEG;AACH,qBAAa,oBAAqB,YAAW,cAAc;IACvD,OAAO,CAAC,QAAQ,CAAoC;IAE7C,KAAK,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAI1C,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ7B,OAAO,IAAI,IAAI;CAGzB"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Synchronizes editor content with a hidden textarea.
3
+ *
4
+ * This allows the editor to integrate with native HTML forms.
5
+ */
6
+ export interface TextareaBridge {
7
+ /**
8
+ * Mounts the bridge on a textarea element.
9
+ */
10
+ mount(textarea: HTMLTextAreaElement): void;
11
+ /**
12
+ * Returns textarea value.
13
+ */
14
+ getValue(): string;
15
+ /**
16
+ * Updates textarea value.
17
+ */
18
+ setValue(value: string): void;
19
+ /**
20
+ * Cleans up internal references.
21
+ */
22
+ destroy(): void;
23
+ }
24
+ //# sourceMappingURL=TextareaBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextareaBridge.d.ts","sourceRoot":"","sources":["../../../src/textarea/TextareaBridge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,KAAK,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,QAAQ,IAAI,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ export type { TextareaBridge } from './TextareaBridge';
2
+ export { HiddenTextareaBridge } from './HiddenTextareaBridge';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/textarea/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA"}