@editora/core 1.0.4 → 1.0.5
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/dist/{CodePlugin.native-0Zari_zp.mjs → CodePlugin.native-B263UI8O.mjs} +502 -370
- package/dist/{CodeSamplePlugin.native-B-KS1pOl.mjs → CodeSamplePlugin.native-CgGoH-X4.mjs} +52 -52
- package/dist/{HistoryPlugin.native-DCrPdeSW.mjs → HistoryPlugin.native-TDnVMsEO.mjs} +21 -21
- package/dist/{MergeTagPlugin.native-CU9LtsfD.mjs → MergeTagPlugin.native-DIGWhdnF.mjs} +8 -5
- package/dist/plugin-loader.js +2 -2
- package/dist/webcomponent-core.js +2 -2
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +33 -25
- package/dist/webcomponent.js +4 -4
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +154 -146
- package/index.d.ts +6 -6
- package/package.json +3 -2
package/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export type PluginCommandResult =
|
|
|
66
66
|
| void
|
|
67
67
|
| Promise<EditorState | null | boolean | void>;
|
|
68
68
|
|
|
69
|
-
export type PluginCommand = (...args:
|
|
69
|
+
export type PluginCommand = (...args: any[]) => PluginCommandResult;
|
|
70
70
|
|
|
71
71
|
export interface Plugin {
|
|
72
72
|
name: string;
|
|
@@ -77,12 +77,12 @@ export interface Plugin {
|
|
|
77
77
|
keymap?: Record<string, string | ((...args: unknown[]) => unknown)>;
|
|
78
78
|
context?: PluginContext;
|
|
79
79
|
config?: PluginConfig;
|
|
80
|
-
init?: (...args:
|
|
80
|
+
init?: (...args: any[]) => void | Promise<void>;
|
|
81
81
|
initialize?: (config?: PluginConfig) => void | Promise<void>;
|
|
82
|
-
destroy?: (...args:
|
|
83
|
-
executeLocal?: (command: string, ...args:
|
|
84
|
-
executeAPI?: (command: string, ...args:
|
|
85
|
-
executeHybrid?: (command: string, ...args:
|
|
82
|
+
destroy?: (...args: any[]) => void | Promise<void>;
|
|
83
|
+
executeLocal?: (command: string, ...args: any[]) => unknown;
|
|
84
|
+
executeAPI?: (command: string, ...args: any[]) => Promise<unknown>;
|
|
85
|
+
executeHybrid?: (command: string, ...args: any[]) => Promise<unknown>;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
export class PluginManager {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editora/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Framework-agnostic core editor engine for Editora Rich Text Editor",
|
|
5
5
|
"author": "Ajay Kumar <ajaykr089@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -109,9 +109,10 @@
|
|
|
109
109
|
],
|
|
110
110
|
"scripts": {
|
|
111
111
|
"build": "vite build && vite build --config vite.umd.config.ts && vite build --config vite.webcomponent.config.ts && vite build --config vite.webcomponent-core.config.ts && vite build --config vite.plugin-loader.config.ts",
|
|
112
|
+
"typecheck:build": "tsc -p tsconfig.build.json --noEmit",
|
|
112
113
|
"dev": "vite build --watch",
|
|
113
114
|
"clean": "rm -rf dist",
|
|
114
|
-
"prepublishOnly": "npm run build"
|
|
115
|
+
"prepublishOnly": "npm run typecheck:build && npm run build"
|
|
115
116
|
},
|
|
116
117
|
"devDependencies": {
|
|
117
118
|
"typescript": "^5.0.0",
|