@kerebron/extension-menu 0.0.8 → 0.0.10
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/esm/extension-menu/src/MenuPlugin.d.ts.map +1 -1
- package/esm/extension-menu/src/MenuPlugin.js +2 -3
- package/esm/extension-menu/src/menu.d.ts.map +1 -1
- package/esm/extension-menu/src/menu.js +2 -3
- package/package.json +2 -3
- package/esm/_dnt.shims.d.ts +0 -6
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -61
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuPlugin.d.ts","sourceRoot":"","sources":["../../../src/extension-menu/src/MenuPlugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuPlugin.d.ts","sourceRoot":"","sources":["../../../src/extension-menu/src/MenuPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,MAAM,EAAa,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAiB,MAAM,WAAW,CAAC;AA0LvD,qBAAa,UAAW,SAAQ,MAAM;gBACxB,OAAO,EAAE;QAGnB,OAAO,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;QAK7C,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB;CAOF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as dntShim from "../../_dnt.shims.js";
|
|
2
1
|
import { Plugin } from 'prosemirror-state';
|
|
3
2
|
import { renderGrouped } from './menu.js';
|
|
4
3
|
const prefix = 'ProseMirror-menubar';
|
|
@@ -166,7 +165,7 @@ class MenuBarView {
|
|
|
166
165
|
let border = (parent.offsetWidth - parent.clientWidth) / 2;
|
|
167
166
|
this.menu.style.left = (editorRect.left + border) + 'px';
|
|
168
167
|
this.menu.style.display = editorRect.top >
|
|
169
|
-
(this.editorView.dom.ownerDocument.defaultView
|
|
168
|
+
(this.editorView.dom.ownerDocument.defaultView)
|
|
170
169
|
.innerHeight
|
|
171
170
|
? 'none'
|
|
172
171
|
: '';
|
|
@@ -212,7 +211,7 @@ function findWrappingScrollable(node) {
|
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
function getAllWrapping(node) {
|
|
215
|
-
let res = [node.ownerDocument.defaultView
|
|
214
|
+
let res = [node.ownerDocument.defaultView];
|
|
216
215
|
for (let cur = node.parentNode; cur; cur = cur.parentNode) {
|
|
217
216
|
res.push(cur);
|
|
218
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/extension-menu/src/menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/extension-menu/src/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAcpD,MAAM,WAAW,WAAW;IAK1B,MAAM,CACJ,EAAE,EAAE,UAAU,GACb;QAAE,GAAG,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAA;KAAE,CAAC;CAClE;AAKD,qBAAa,QAAS,YAAW,WAAW;IAIxC,QAAQ,CAAC,IAAI,EAAE,YAAY;gBAAlB,IAAI,EAAE,YAAY;IAM7B,MAAM,CAAC,IAAI,EAAE,UAAU;;wBA2BE,WAAW;;CAoBrC;AAgBD,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,C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2CE,WAAW;;IAUpC,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE;qBAQ3B,OAAO;;;CAS5B;AAgCD,qBAAa,eAAgB,YAAW,WAAW;IAS/C,QAAQ,CAAC,OAAO,EAAE;QAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAVH,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;gBAK9B,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAEpC,OAAO,GAAE;QAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;KACX;IAMR,MAAM,CAAC,IAAI,EAAE,UAAU;;wBAoCE,WAAW;;CAOrC;AAMD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE;;oBAwBrB,WAAW;EAanC;AAYD,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,YAc1D;AAMD,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,YAmB1D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as dntShim from "../../_dnt.shims.js";
|
|
2
1
|
import { setBlockType, wrapIn, } from '../../editor/src/commands/mod.js';
|
|
3
2
|
import { getIcon } from './icons.js';
|
|
4
3
|
const prefix = 'ProseMirror-menu';
|
|
@@ -110,7 +109,7 @@ export class Dropdown {
|
|
|
110
109
|
/// Render the dropdown menu and sub-items.
|
|
111
110
|
render(view) {
|
|
112
111
|
let content = renderDropdownItems(this.content, view);
|
|
113
|
-
let win = view.dom.ownerDocument.defaultView
|
|
112
|
+
let win = view.dom.ownerDocument.defaultView;
|
|
114
113
|
let label = document.createElement('div');
|
|
115
114
|
label.classList.add(prefix + '-dropdown');
|
|
116
115
|
if (this.options.class) {
|
|
@@ -224,7 +223,7 @@ export class DropdownSubmenu {
|
|
|
224
223
|
/// Renders the submenu.
|
|
225
224
|
render(view) {
|
|
226
225
|
const items = renderDropdownItems(this.content, view);
|
|
227
|
-
const win = view.dom.ownerDocument.defaultView
|
|
226
|
+
const win = view.dom.ownerDocument.defaultView;
|
|
228
227
|
const label = document.createElement('div');
|
|
229
228
|
label.classList.add(prefix + '-submenu-label');
|
|
230
229
|
label.appendChild(document.createTextNode(translate(view, this.options.label || '')));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/extension-menu/src/ExtensionMenu.js",
|
|
6
6
|
"exports": {
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
"prosemirror-model": "1.24.1",
|
|
15
15
|
"prosemirror-state": "1.4.3",
|
|
16
16
|
"prosemirror-transform": "1.10.3",
|
|
17
|
-
"prosemirror-view": "1.33.6"
|
|
18
|
-
"@deno/shim-deno": "~0.18.0"
|
|
17
|
+
"prosemirror-view": "1.33.6"
|
|
19
18
|
},
|
|
20
19
|
"devDependencies": {
|
|
21
20
|
"@types/node": "^20.9.0"
|
package/esm/_dnt.shims.d.ts
DELETED
package/esm/_dnt.shims.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvC,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
|
package/esm/_dnt.shims.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Deno } from "@deno/shim-deno";
|
|
2
|
-
export { Deno } from "@deno/shim-deno";
|
|
3
|
-
const dntGlobals = {
|
|
4
|
-
Deno,
|
|
5
|
-
};
|
|
6
|
-
export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
7
|
-
function createMergeProxy(baseObj, extObj) {
|
|
8
|
-
return new Proxy(baseObj, {
|
|
9
|
-
get(_target, prop, _receiver) {
|
|
10
|
-
if (prop in extObj) {
|
|
11
|
-
return extObj[prop];
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return baseObj[prop];
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
set(_target, prop, value) {
|
|
18
|
-
if (prop in extObj) {
|
|
19
|
-
delete extObj[prop];
|
|
20
|
-
}
|
|
21
|
-
baseObj[prop] = value;
|
|
22
|
-
return true;
|
|
23
|
-
},
|
|
24
|
-
deleteProperty(_target, prop) {
|
|
25
|
-
let success = false;
|
|
26
|
-
if (prop in extObj) {
|
|
27
|
-
delete extObj[prop];
|
|
28
|
-
success = true;
|
|
29
|
-
}
|
|
30
|
-
if (prop in baseObj) {
|
|
31
|
-
delete baseObj[prop];
|
|
32
|
-
success = true;
|
|
33
|
-
}
|
|
34
|
-
return success;
|
|
35
|
-
},
|
|
36
|
-
ownKeys(_target) {
|
|
37
|
-
const baseKeys = Reflect.ownKeys(baseObj);
|
|
38
|
-
const extKeys = Reflect.ownKeys(extObj);
|
|
39
|
-
const extKeysSet = new Set(extKeys);
|
|
40
|
-
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
41
|
-
},
|
|
42
|
-
defineProperty(_target, prop, desc) {
|
|
43
|
-
if (prop in extObj) {
|
|
44
|
-
delete extObj[prop];
|
|
45
|
-
}
|
|
46
|
-
Reflect.defineProperty(baseObj, prop, desc);
|
|
47
|
-
return true;
|
|
48
|
-
},
|
|
49
|
-
getOwnPropertyDescriptor(_target, prop) {
|
|
50
|
-
if (prop in extObj) {
|
|
51
|
-
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
has(_target, prop) {
|
|
58
|
-
return prop in extObj || prop in baseObj;
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
}
|