@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.
- package/README.md +22 -4
- package/dist/modulo-editor.js +76 -770
- package/dist/modulo-editor.js.map +1 -1
- package/dist/modulo-editor.umd.cjs +1 -2
- package/dist/modulo-editor.umd.cjs.map +1 -1
- package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts +31 -110
- package/dist/types/core/Builder/DefaultModuloEditorBuilder.d.ts.map +1 -1
- package/dist/types/core/ModuloEditor.d.ts.map +1 -1
- package/dist/types/core/contracts/ModuloEditorBuilder.d.ts +18 -18
- package/dist/types/core/contracts/ModuloEditorBuilder.d.ts.map +1 -1
- package/dist/types/presets/builtin/DefaultEditorPreset.d.ts +7 -0
- package/dist/types/presets/builtin/DefaultEditorPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/SafeMarkdownPreset.d.ts +7 -0
- package/dist/types/presets/builtin/SafeMarkdownPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/StarterKitPreset.d.ts +7 -0
- package/dist/types/presets/builtin/StarterKitPreset.d.ts.map +1 -0
- package/dist/types/presets/builtin/index.d.ts +4 -0
- package/dist/types/presets/builtin/index.d.ts.map +1 -0
- package/dist/types/presets/contracts/EditorPreset.d.ts +6 -0
- package/dist/types/presets/contracts/EditorPreset.d.ts.map +1 -0
- package/dist/types/presets/contracts/index.d.ts +2 -0
- package/dist/types/presets/contracts/index.d.ts.map +1 -0
- package/dist/types/presets/index.d.ts +3 -0
- package/dist/types/presets/index.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ModuloEdit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zB"}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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