@limetech/lime-elements 37.26.5 → 37.27.0
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/CHANGELOG.md +8 -0
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +34 -21
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js +30 -17
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +34 -21
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-71cd8be1.entry.js → p-91f40d46.entry.js} +2 -2
- package/dist/lime-elements/p-91f40d46.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-71cd8be1.entry.js.map +0 -1
|
@@ -1,52 +1,65 @@
|
|
|
1
|
+
const getCommandSymbols = () => {
|
|
2
|
+
const macUserAgent = /Macintosh|MacIntel|MacPPC|Mac68K/;
|
|
3
|
+
if (navigator.userAgent.match(macUserAgent)) {
|
|
4
|
+
return { mod: '⌘', option: '⌥', shift: '⇧' };
|
|
5
|
+
}
|
|
6
|
+
return { mod: 'Ctrl', option: 'Alt', shift: 'Shift' };
|
|
7
|
+
};
|
|
8
|
+
const { mod, shift } = getCommandSymbols();
|
|
1
9
|
export const textEditorMenuItems = [
|
|
2
10
|
{
|
|
11
|
+
value: 'strong',
|
|
3
12
|
text: 'Bold',
|
|
4
|
-
commandText:
|
|
5
|
-
icon: 'bold',
|
|
13
|
+
commandText: `${mod} B`,
|
|
14
|
+
icon: '-lime-text-bold',
|
|
6
15
|
iconOnly: true,
|
|
7
16
|
},
|
|
8
17
|
{
|
|
18
|
+
value: 'em',
|
|
9
19
|
text: 'Italic',
|
|
10
|
-
commandText:
|
|
11
|
-
icon: 'italic',
|
|
12
|
-
iconOnly: true,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
text: 'Add or remove link',
|
|
16
|
-
commandText: '⌘ shift U',
|
|
17
|
-
icon: 'link',
|
|
20
|
+
commandText: `${mod} I`,
|
|
21
|
+
icon: '-lime-text-italic',
|
|
18
22
|
iconOnly: true,
|
|
19
23
|
},
|
|
20
24
|
{ separator: true },
|
|
21
25
|
{
|
|
26
|
+
value: 'headerlevel1',
|
|
22
27
|
text: 'Header Level 1',
|
|
23
|
-
|
|
28
|
+
commandText: `${mod} ${shift} 1`,
|
|
29
|
+
icon: '-lime-text-h-heading-1',
|
|
24
30
|
iconOnly: true,
|
|
25
31
|
},
|
|
26
32
|
{
|
|
33
|
+
value: 'headerlevel2',
|
|
27
34
|
text: 'Header Level 2',
|
|
28
|
-
|
|
35
|
+
commandText: `${mod} ${shift} 2`,
|
|
36
|
+
icon: '-lime-text-h-heading-2',
|
|
29
37
|
iconOnly: true,
|
|
30
38
|
},
|
|
31
39
|
{
|
|
40
|
+
value: 'headerlevel3',
|
|
32
41
|
text: 'Header Level 3',
|
|
33
|
-
|
|
42
|
+
commandText: `${mod} ${shift} 3`,
|
|
43
|
+
icon: '-lime-text-h-heading-3',
|
|
34
44
|
iconOnly: true,
|
|
35
45
|
},
|
|
36
46
|
{ separator: true },
|
|
37
47
|
{
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
value: 'bullet_list',
|
|
49
|
+
text: 'Bullet list',
|
|
50
|
+
icon: '-lime-text-bulleted-list',
|
|
40
51
|
iconOnly: true,
|
|
41
52
|
},
|
|
42
53
|
{
|
|
54
|
+
value: 'ordered_list',
|
|
43
55
|
text: 'Numbered list',
|
|
44
|
-
icon: '
|
|
56
|
+
icon: '-lime-text-ordered-list',
|
|
45
57
|
iconOnly: true,
|
|
46
58
|
},
|
|
47
59
|
{
|
|
60
|
+
value: 'blockquote',
|
|
48
61
|
text: 'Blockquote',
|
|
49
|
-
icon: '
|
|
62
|
+
icon: '-lime-text-blockquote',
|
|
50
63
|
iconOnly: true,
|
|
51
64
|
},
|
|
52
65
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-items.js","sourceRoot":"","sources":["../../../../../src/components/text-editor/prosemirror-adapter/menu/menu-items.ts"],"names":[],"mappings":"AAGA,MAAM,
|
|
1
|
+
{"version":3,"file":"menu-items.js","sourceRoot":"","sources":["../../../../../src/components/text-editor/prosemirror-adapter/menu/menu-items.ts"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG,GAIxB,EAAE;EACA,MAAM,YAAY,GAAG,kCAAkC,CAAC;EACxD,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;IACzC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;GAChD;EAED,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,iBAAiB,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,mBAAmB,GAAyC;EACrE;IACI,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,GAAG,GAAG,IAAI;IACvB,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,IAAI;GACjB;EACD;IACI,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,GAAG,GAAG,IAAI;IACvB,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,IAAI;GACjB;EACD,EAAE,SAAS,EAAE,IAAI,EAAE;EACnB;IACI,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,GAAG,GAAG,IAAI,KAAK,IAAI;IAChC,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,IAAI;GACjB;EACD;IACI,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,GAAG,GAAG,IAAI,KAAK,IAAI;IAChC,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,IAAI;GACjB;EACD;IACI,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,GAAG,GAAG,IAAI,KAAK,IAAI;IAChC,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,IAAI;GACjB;EACD,EAAE,SAAS,EAAE,IAAI,EAAE;EACnB;IACI,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,0BAA0B;IAChC,QAAQ,EAAE,IAAI;GACjB;EACD;IACI,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,IAAI;GACjB;EACD;IACI,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,IAAI;GACjB;CACJ,CAAC","sourcesContent":["import { ActionBarItem } from 'src/components/action-bar/action-bar.types';\nimport { ListSeparator } from 'src/components/list/list-item.types';\n\nconst getCommandSymbols = (): {\n mod: string;\n option: string;\n shift: string;\n} => {\n const macUserAgent = /Macintosh|MacIntel|MacPPC|Mac68K/;\n if (navigator.userAgent.match(macUserAgent)) {\n return { mod: '⌘', option: '⌥', shift: '⇧' };\n }\n\n return { mod: 'Ctrl', option: 'Alt', shift: 'Shift' };\n};\n\nconst { mod, shift } = getCommandSymbols();\n\nexport const textEditorMenuItems: Array<ActionBarItem | ListSeparator> = [\n {\n value: 'strong',\n text: 'Bold',\n commandText: `${mod} B`,\n icon: '-lime-text-bold',\n iconOnly: true,\n },\n {\n value: 'em',\n text: 'Italic',\n commandText: `${mod} I`,\n icon: '-lime-text-italic',\n iconOnly: true,\n },\n { separator: true },\n {\n value: 'headerlevel1',\n text: 'Header Level 1',\n commandText: `${mod} ${shift} 1`,\n icon: '-lime-text-h-heading-1',\n iconOnly: true,\n },\n {\n value: 'headerlevel2',\n text: 'Header Level 2',\n commandText: `${mod} ${shift} 2`,\n icon: '-lime-text-h-heading-2',\n iconOnly: true,\n },\n {\n value: 'headerlevel3',\n text: 'Header Level 3',\n commandText: `${mod} ${shift} 3`,\n icon: '-lime-text-h-heading-3',\n iconOnly: true,\n },\n { separator: true },\n {\n value: 'bullet_list',\n text: 'Bullet list',\n icon: '-lime-text-bulleted-list',\n iconOnly: true,\n },\n {\n value: 'ordered_list',\n text: 'Numbered list',\n icon: '-lime-text-ordered-list',\n iconOnly: true,\n },\n {\n value: 'blockquote',\n text: 'Blockquote',\n icon: '-lime-text-blockquote',\n iconOnly: true,\n },\n];\n"]}
|
|
@@ -12710,7 +12710,7 @@ var base = {
|
|
|
12710
12710
|
222: "'"
|
|
12711
12711
|
};
|
|
12712
12712
|
|
|
12713
|
-
var shift = {
|
|
12713
|
+
var shift$1 = {
|
|
12714
12714
|
48: ")",
|
|
12715
12715
|
49: "!",
|
|
12716
12716
|
50: "@",
|
|
@@ -12749,11 +12749,11 @@ for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
|
|
|
12749
12749
|
// And the alphabetic keys
|
|
12750
12750
|
for (var i = 65; i <= 90; i++) {
|
|
12751
12751
|
base[i] = String.fromCharCode(i + 32);
|
|
12752
|
-
shift[i] = String.fromCharCode(i);
|
|
12752
|
+
shift$1[i] = String.fromCharCode(i);
|
|
12753
12753
|
}
|
|
12754
12754
|
|
|
12755
12755
|
// For each code that doesn't have a shift-equivalent, copy the base name
|
|
12756
|
-
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
12756
|
+
for (var code in base) if (!shift$1.hasOwnProperty(code)) shift$1[code] = base[code];
|
|
12757
12757
|
|
|
12758
12758
|
function keyName(event) {
|
|
12759
12759
|
// On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.
|
|
@@ -12762,7 +12762,7 @@ function keyName(event) {
|
|
|
12762
12762
|
ie && event.shiftKey && event.key && event.key.length == 1 ||
|
|
12763
12763
|
event.key == "Unidentified";
|
|
12764
12764
|
var name = (!ignoreKey && event.key) ||
|
|
12765
|
-
(event.shiftKey ? shift : base)[event.keyCode] ||
|
|
12765
|
+
(event.shiftKey ? shift$1 : base)[event.keyCode] ||
|
|
12766
12766
|
event.key || "Unidentified";
|
|
12767
12767
|
// Edge sometimes produces wrong names (Issue #3)
|
|
12768
12768
|
if (name == "Esc") name = "Escape";
|
|
@@ -15980,55 +15980,68 @@ class MenuCommandFactory {
|
|
|
15980
15980
|
}
|
|
15981
15981
|
}
|
|
15982
15982
|
|
|
15983
|
+
const getCommandSymbols = () => {
|
|
15984
|
+
const macUserAgent = /Macintosh|MacIntel|MacPPC|Mac68K/;
|
|
15985
|
+
if (navigator.userAgent.match(macUserAgent)) {
|
|
15986
|
+
return { mod: '⌘', option: '⌥', shift: '⇧' };
|
|
15987
|
+
}
|
|
15988
|
+
return { mod: 'Ctrl', option: 'Alt', shift: 'Shift' };
|
|
15989
|
+
};
|
|
15990
|
+
const { mod, shift } = getCommandSymbols();
|
|
15983
15991
|
const textEditorMenuItems = [
|
|
15984
15992
|
{
|
|
15993
|
+
value: 'strong',
|
|
15985
15994
|
text: 'Bold',
|
|
15986
|
-
commandText:
|
|
15987
|
-
icon: 'bold',
|
|
15995
|
+
commandText: `${mod} B`,
|
|
15996
|
+
icon: '-lime-text-bold',
|
|
15988
15997
|
iconOnly: true,
|
|
15989
15998
|
},
|
|
15990
15999
|
{
|
|
16000
|
+
value: 'em',
|
|
15991
16001
|
text: 'Italic',
|
|
15992
|
-
commandText:
|
|
15993
|
-
icon: 'italic',
|
|
15994
|
-
iconOnly: true,
|
|
15995
|
-
},
|
|
15996
|
-
{
|
|
15997
|
-
text: 'Add or remove link',
|
|
15998
|
-
commandText: '⌘ shift U',
|
|
15999
|
-
icon: 'link',
|
|
16002
|
+
commandText: `${mod} I`,
|
|
16003
|
+
icon: '-lime-text-italic',
|
|
16000
16004
|
iconOnly: true,
|
|
16001
16005
|
},
|
|
16002
16006
|
{ separator: true },
|
|
16003
16007
|
{
|
|
16008
|
+
value: 'headerlevel1',
|
|
16004
16009
|
text: 'Header Level 1',
|
|
16005
|
-
|
|
16010
|
+
commandText: `${mod} ${shift} 1`,
|
|
16011
|
+
icon: '-lime-text-h-heading-1',
|
|
16006
16012
|
iconOnly: true,
|
|
16007
16013
|
},
|
|
16008
16014
|
{
|
|
16015
|
+
value: 'headerlevel2',
|
|
16009
16016
|
text: 'Header Level 2',
|
|
16010
|
-
|
|
16017
|
+
commandText: `${mod} ${shift} 2`,
|
|
16018
|
+
icon: '-lime-text-h-heading-2',
|
|
16011
16019
|
iconOnly: true,
|
|
16012
16020
|
},
|
|
16013
16021
|
{
|
|
16022
|
+
value: 'headerlevel3',
|
|
16014
16023
|
text: 'Header Level 3',
|
|
16015
|
-
|
|
16024
|
+
commandText: `${mod} ${shift} 3`,
|
|
16025
|
+
icon: '-lime-text-h-heading-3',
|
|
16016
16026
|
iconOnly: true,
|
|
16017
16027
|
},
|
|
16018
16028
|
{ separator: true },
|
|
16019
16029
|
{
|
|
16020
|
-
|
|
16021
|
-
|
|
16030
|
+
value: 'bullet_list',
|
|
16031
|
+
text: 'Bullet list',
|
|
16032
|
+
icon: '-lime-text-bulleted-list',
|
|
16022
16033
|
iconOnly: true,
|
|
16023
16034
|
},
|
|
16024
16035
|
{
|
|
16036
|
+
value: 'ordered_list',
|
|
16025
16037
|
text: 'Numbered list',
|
|
16026
|
-
icon: '
|
|
16038
|
+
icon: '-lime-text-ordered-list',
|
|
16027
16039
|
iconOnly: true,
|
|
16028
16040
|
},
|
|
16029
16041
|
{
|
|
16042
|
+
value: 'blockquote',
|
|
16030
16043
|
text: 'Blockquote',
|
|
16031
|
-
icon: '
|
|
16044
|
+
icon: '-lime-text-blockquote',
|
|
16032
16045
|
iconOnly: true,
|
|
16033
16046
|
},
|
|
16034
16047
|
];
|