@lakamark/modulo-editor 0.2.0-alpha.1 → 0.2.0-alpha.2

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.
@@ -1,23 +1,23 @@
1
+ import type { EditorPreset } from "../../presets";
2
+ import type { EditorDomResolver } from "../../dom/contracts";
3
+ import type { EditorInputAdapter } from "../../input";
4
+ import type { EditorOutputAdapter } from "../../output";
5
+ import type { TextareaBridge } from "../../textarea";
6
+ import type { MarkdownProcessor } from "../../markdown";
1
7
  import type { EditorPlugin } from "../../plugins";
2
8
  import type { ModuloEditor } from "../ModuloEditor";
3
- /**
4
- * Fluent builder used to configure and create a ModuloEditor instance.
5
- *
6
- * This builder provides a higher-level API for common editor setups while
7
- * keeping the low-level `ModuloEditor` constructor available for advanced use cases.
8
- */
9
+ import type { EditorDocument } from "./EditorDocument";
10
+ import type { EditorCommand } from "../../commands";
9
11
  export interface ModuloEditorBuilder {
10
- /**
11
- * Replaces the default plugin list with the provided plugins.
12
- */
13
- use(...plugins: EditorPlugin[]): this;
14
- /**
15
- * Disables all default plugins.
16
- */
17
- withoutPlugins(): this;
18
- /**
19
- * Builds and initializes the editor instance.
20
- */
21
- init(): ModuloEditor;
12
+ usePreset(preset: EditorPreset): this;
13
+ withDomResolver(domResolver: EditorDomResolver): this;
14
+ withInput(input: EditorInputAdapter): this;
15
+ withOutput(output: EditorOutputAdapter): this;
16
+ withTextareaBridge(textareaBridge: TextareaBridge): this;
17
+ withMarkdown(markdown: MarkdownProcessor): this;
18
+ withPlugins(plugins: readonly EditorPlugin[]): this;
19
+ withDocument(document: EditorDocument): this;
20
+ withCommands(commands: readonly EditorCommand[]): this;
21
+ build(): ModuloEditor;
22
22
  }
23
23
  //# sourceMappingURL=ModuloEditorBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuloEditorBuilder.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ModuloEditorBuilder.ts"],"names":[],"mappings":"AA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AI,CAAC;IAC9C,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACzD,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAChD,WAAW,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAAC;IACpD,YAAY,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7C,YAAY,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,GAAG,IAAI,CAAC;IACvD,KAAK,IAAI,YAAY,CAAC;CACzB"}
@@ -0,0 +1,7 @@
1
+ import type { EditorPreset } from "../contracts";
2
+ import type { ModuloEditorBuilder } from "../../core";
3
+ export declare class DefaultEditorPreset implements EditorPreset {
4
+ readonly name = "default";
5
+ apply(builder: ModuloEditorBuilder): void;
6
+ }
7
+ //# sourceMappingURL=DefaultEditorPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultEditorPreset.d.ts","sourceRoot":"","sources":["../../../../src/presets/builtin/DefaultEditorPreset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAMpD,qBAAa,mBAAoB,YAAW,YAAY;IACpD,SAAgB,IAAI,aAAa;IAE1B,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;CAQnD"}
@@ -0,0 +1,7 @@
1
+ import type { EditorPreset } from "../contracts";
2
+ import type { ModuloEditorBuilder } from "../../core";
3
+ export declare class SafeMarkdownPreset implements EditorPreset {
4
+ readonly name = "safe-markdown";
5
+ apply(builder: ModuloEditorBuilder): void;
6
+ }
7
+ //# sourceMappingURL=SafeMarkdownPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeMarkdownPreset.d.ts","sourceRoot":"","sources":["../../../../src/presets/builtin/SafeMarkdownPreset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AASpD,qBAAa,kBAAmB,YAAW,YAAY;IACnD,SAAgB,IAAI,mBAAmB;IAEhC,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;CASnD"}
@@ -0,0 +1,7 @@
1
+ import type { EditorPreset } from "../contracts";
2
+ import type { ModuloEditorBuilder } from "../../core";
3
+ export declare class StarterKitPreset implements EditorPreset {
4
+ readonly name = "starter-kit";
5
+ apply(builder: ModuloEditorBuilder): void;
6
+ }
7
+ //# sourceMappingURL=StarterKitPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StarterKitPreset.d.ts","sourceRoot":"","sources":["../../../../src/presets/builtin/StarterKitPreset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAIpD,qBAAa,gBAAiB,YAAW,YAAY;IACjD,SAAgB,IAAI,iBAAiB;IAE9B,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;CAInD"}
@@ -0,0 +1,4 @@
1
+ export { DefaultEditorPreset } from './DefaultEditorPreset';
2
+ export { SafeMarkdownPreset } from './SafeMarkdownPreset';
3
+ export { StarterKitPreset } from './StarterKitPreset';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presets/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ModuloEditorBuilder } from "../../core";
2
+ export interface EditorPreset {
3
+ readonly name: string;
4
+ apply(builder: ModuloEditorBuilder): void;
5
+ }
6
+ //# sourceMappingURL=EditorPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorPreset.d.ts","sourceRoot":"","sources":["../../../../src/presets/contracts/EditorPreset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC7C"}
@@ -0,0 +1,2 @@
1
+ export type { EditorPreset } from './EditorPreset';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presets/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type { EditorPreset } from "./contracts";
2
+ export * from "./builtin";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presets/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAC9C,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lakamark/modulo-editor",
3
3
  "private": false,
4
- "version": "0.2.0-alpha.1",
4
+ "version": "0.2.0-alpha.2",
5
5
  "description": "Modular, extensible and safe Markdown editor with plugin API and textarea form integration.",
6
6
  "type": "module",
7
7
  "author": {