@kerebron/extension-dev-toolkit 0.4.25 → 0.4.27
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/package.json +3 -2
- package/esm/mod.d.ts +0 -13
- package/esm/mod.d.ts.map +0 -1
- package/esm/mod.js +0 -36
- package/esm/package.json +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-dev-toolkit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/mod.js",
|
|
6
6
|
"exports": {
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"scripts": {},
|
|
12
|
+
"files": [],
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@kerebron/editor": "0.4.
|
|
14
|
+
"@kerebron/editor": "0.4.27",
|
|
14
15
|
"prosemirror-dev-toolkit": "1.1.8",
|
|
15
16
|
"prosemirror-view": "1.40.0"
|
|
16
17
|
},
|
package/esm/mod.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CommandFactories, type CoreEditor, Extension } from '@kerebron/editor';
|
|
2
|
-
import { CommandShortcuts } from '@kerebron/editor/commands';
|
|
3
|
-
export interface DevToolkitConfig {
|
|
4
|
-
}
|
|
5
|
-
export declare class ExtensionDevToolkit extends Extension {
|
|
6
|
-
protected config: DevToolkitConfig;
|
|
7
|
-
name: string;
|
|
8
|
-
private visible;
|
|
9
|
-
constructor(config?: DevToolkitConfig);
|
|
10
|
-
getCommandFactories(editor: CoreEditor): Partial<CommandFactories>;
|
|
11
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=mod.d.ts.map
|
package/esm/mod.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D,MAAM,WAAW,gBAAgB;CAChC;AAED,qBAAa,mBAAoB,SAAQ,SAAS;cAKjB,MAAM,EAAE,gBAAgB;IAJvD,IAAI,SAAiB;IAErB,OAAO,CAAC,OAAO,CAAS;gBAEO,MAAM,GAAE,gBAAqB;IAInD,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkBlE,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAM3D"}
|
package/esm/mod.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { applyDevTools, removeDevTools } from 'prosemirror-dev-toolkit';
|
|
2
|
-
import { Extension } from '@kerebron/editor';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
export class ExtensionDevToolkit extends Extension {
|
|
5
|
-
config;
|
|
6
|
-
name = 'dev_toolkit';
|
|
7
|
-
visible = false;
|
|
8
|
-
constructor(config = {}) {
|
|
9
|
-
super(config);
|
|
10
|
-
this.config = config;
|
|
11
|
-
}
|
|
12
|
-
getCommandFactories(editor) {
|
|
13
|
-
const commands = {
|
|
14
|
-
toggleDevToolkit: () => () => {
|
|
15
|
-
if (this.visible) {
|
|
16
|
-
removeDevTools();
|
|
17
|
-
this.visible = !this.visible;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
if (editor.view instanceof EditorView) {
|
|
21
|
-
applyDevTools(editor.view, { devToolsExpanded: true });
|
|
22
|
-
this.visible = !this.visible;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return true;
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
return commands;
|
|
29
|
-
}
|
|
30
|
-
getKeyboardShortcuts() {
|
|
31
|
-
const shortcuts = {
|
|
32
|
-
'Ctrl-`': 'toggleDevToolkit',
|
|
33
|
-
};
|
|
34
|
-
return shortcuts;
|
|
35
|
-
}
|
|
36
|
-
}
|
package/esm/package.json
DELETED