@editora/core 1.0.4 → 1.0.6

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/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: unknown[]) => PluginCommandResult;
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: unknown[]) => void | Promise<void>;
80
+ init?: (...args: any[]) => void | Promise<void>;
81
81
  initialize?: (config?: PluginConfig) => void | Promise<void>;
82
- destroy?: (...args: unknown[]) => void | Promise<void>;
83
- executeLocal?: (command: string, ...args: unknown[]) => unknown;
84
- executeAPI?: (command: string, ...args: unknown[]) => Promise<unknown>;
85
- executeHybrid?: (command: string, ...args: unknown[]) => Promise<unknown>;
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.4",
3
+ "version": "1.0.6",
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",
@@ -54,50 +54,56 @@
54
54
  "types": "./index.d.ts",
55
55
  "browser": "./dist/index.esm.js",
56
56
  "import": "./dist/index.esm.js",
57
- "require": "./dist/index.cjs.js"
57
+ "require": "./dist/index.cjs.js",
58
+ "default": "./dist/index.esm.js"
58
59
  },
59
60
  "./webcomponent": {
60
61
  "types": "./index.d.ts",
61
62
  "browser": "./dist/webcomponent.js",
62
63
  "import": "./dist/webcomponent.js",
63
- "require": "./dist/webcomponent.cjs.js"
64
+ "default": "./dist/webcomponent.js"
64
65
  },
65
66
  "./webcomponent-core": {
66
67
  "types": "./index.d.ts",
67
68
  "browser": "./dist/webcomponent-core.js",
68
69
  "import": "./dist/webcomponent-core.js",
69
- "require": "./dist/webcomponent-core.cjs.js"
70
+ "default": "./dist/webcomponent-core.js"
70
71
  },
71
72
  "./plugin-loader": {
72
73
  "types": "./index.d.ts",
73
74
  "import": "./dist/plugin-loader.js",
74
- "require": "./dist/plugin-loader.cjs.js"
75
+ "default": "./dist/plugin-loader.js"
75
76
  },
76
77
  "./webcomponent.css": "./dist/webcomponent.min.css",
77
78
  "./KeyboardShortcuts": {
78
79
  "types": "./index.d.ts",
79
80
  "import": "./dist/index.esm.js",
80
- "require": "./dist/index.cjs.js"
81
+ "require": "./dist/index.cjs.js",
82
+ "default": "./dist/index.esm.js"
81
83
  },
82
84
  "./core": {
83
85
  "types": "./index.d.ts",
84
86
  "import": "./dist/index.esm.js",
85
- "require": "./dist/index.cjs.js"
87
+ "require": "./dist/index.cjs.js",
88
+ "default": "./dist/index.esm.js"
86
89
  },
87
90
  "./ui": {
88
91
  "types": "./index.d.ts",
89
92
  "import": "./dist/index.esm.js",
90
- "require": "./dist/index.cjs.js"
93
+ "require": "./dist/index.cjs.js",
94
+ "default": "./dist/index.esm.js"
91
95
  },
92
96
  "./adapters": {
93
97
  "types": "./index.d.ts",
94
98
  "import": "./dist/index.esm.js",
95
- "require": "./dist/index.cjs.js"
99
+ "require": "./dist/index.cjs.js",
100
+ "default": "./dist/index.esm.js"
96
101
  },
97
102
  "./config": {
98
103
  "types": "./index.d.ts",
99
104
  "import": "./dist/index.esm.js",
100
- "require": "./dist/index.cjs.js"
105
+ "require": "./dist/index.cjs.js",
106
+ "default": "./dist/index.esm.js"
101
107
  }
102
108
  },
103
109
  "files": [
@@ -109,9 +115,10 @@
109
115
  ],
110
116
  "scripts": {
111
117
  "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",
118
+ "typecheck:build": "tsc -p tsconfig.build.json --noEmit",
112
119
  "dev": "vite build --watch",
113
120
  "clean": "rm -rf dist",
114
- "prepublishOnly": "npm run build"
121
+ "prepublishOnly": "npm run typecheck:build && npm run build"
115
122
  },
116
123
  "devDependencies": {
117
124
  "typescript": "^5.0.0",