@web-atoms/web-controls 2.1.10 → 2.1.11

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.
Files changed (122) hide show
  1. package/dist/basic/PopupButton.d.ts +2 -1
  2. package/dist/basic/PopupButton.d.ts.map +1 -1
  3. package/dist/basic/PopupButton.js +7 -2
  4. package/dist/basic/PopupButton.js.map +1 -1
  5. package/dist/html-editor/HtmlEditor.d.ts +23 -0
  6. package/dist/html-editor/HtmlEditor.d.ts.map +1 -0
  7. package/dist/html-editor/HtmlEditor.js +206 -0
  8. package/dist/html-editor/HtmlEditor.js.map +1 -0
  9. package/dist/html-editor/commands/AddImage.d.ts +5 -0
  10. package/dist/html-editor/commands/AddImage.d.ts.map +1 -0
  11. package/dist/html-editor/commands/AddImage.js +23 -0
  12. package/dist/html-editor/commands/AddImage.js.map +1 -0
  13. package/dist/html-editor/commands/AddLink.d.ts +5 -0
  14. package/dist/html-editor/commands/AddLink.d.ts.map +1 -0
  15. package/dist/html-editor/commands/AddLink.js +23 -0
  16. package/dist/html-editor/commands/AddLink.js.map +1 -0
  17. package/dist/html-editor/commands/Align.d.ts +2 -0
  18. package/dist/html-editor/commands/Align.d.ts.map +1 -0
  19. package/dist/html-editor/commands/Align.js +24 -0
  20. package/dist/html-editor/commands/Align.js.map +1 -0
  21. package/dist/html-editor/commands/Bold.d.ts +3 -0
  22. package/dist/html-editor/commands/Bold.d.ts.map +1 -0
  23. package/dist/html-editor/commands/Bold.js +20 -0
  24. package/dist/html-editor/commands/Bold.js.map +1 -0
  25. package/dist/html-editor/commands/ChangeColor.d.ts +2 -0
  26. package/dist/html-editor/commands/ChangeColor.d.ts.map +1 -0
  27. package/dist/html-editor/commands/ChangeColor.js +146 -0
  28. package/dist/html-editor/commands/ChangeColor.js.map +1 -0
  29. package/dist/html-editor/commands/ChangeFont.d.ts +6 -0
  30. package/dist/html-editor/commands/ChangeFont.d.ts.map +1 -0
  31. package/dist/html-editor/commands/ChangeFont.js +72 -0
  32. package/dist/html-editor/commands/ChangeFont.js.map +1 -0
  33. package/dist/html-editor/commands/ChangeFontSize.d.ts +3 -0
  34. package/dist/html-editor/commands/ChangeFontSize.d.ts.map +1 -0
  35. package/dist/html-editor/commands/ChangeFontSize.js +22 -0
  36. package/dist/html-editor/commands/ChangeFontSize.js.map +1 -0
  37. package/dist/html-editor/commands/Command.d.ts +12 -0
  38. package/dist/html-editor/commands/Command.d.ts.map +1 -0
  39. package/dist/html-editor/commands/Command.js +43 -0
  40. package/dist/html-editor/commands/Command.js.map +1 -0
  41. package/dist/html-editor/commands/CommandButton.d.ts +19 -0
  42. package/dist/html-editor/commands/CommandButton.d.ts.map +1 -0
  43. package/dist/html-editor/commands/CommandButton.js +53 -0
  44. package/dist/html-editor/commands/CommandButton.js.map +1 -0
  45. package/dist/html-editor/commands/Headings.d.ts +2 -0
  46. package/dist/html-editor/commands/Headings.d.ts.map +1 -0
  47. package/dist/html-editor/commands/Headings.js +26 -0
  48. package/dist/html-editor/commands/Headings.js.map +1 -0
  49. package/dist/html-editor/commands/HorizontalRule.d.ts +3 -0
  50. package/dist/html-editor/commands/HorizontalRule.d.ts.map +1 -0
  51. package/dist/html-editor/commands/HorizontalRule.js +20 -0
  52. package/dist/html-editor/commands/HorizontalRule.js.map +1 -0
  53. package/dist/html-editor/commands/IndentLess.d.ts +2 -0
  54. package/dist/html-editor/commands/IndentLess.d.ts.map +1 -0
  55. package/dist/html-editor/commands/IndentLess.js +20 -0
  56. package/dist/html-editor/commands/IndentLess.js.map +1 -0
  57. package/dist/html-editor/commands/IndentMore.d.ts +2 -0
  58. package/dist/html-editor/commands/IndentMore.d.ts.map +1 -0
  59. package/dist/html-editor/commands/IndentMore.js +20 -0
  60. package/dist/html-editor/commands/IndentMore.js.map +1 -0
  61. package/dist/html-editor/commands/Italic.d.ts +3 -0
  62. package/dist/html-editor/commands/Italic.d.ts.map +1 -0
  63. package/dist/html-editor/commands/Italic.js +20 -0
  64. package/dist/html-editor/commands/Italic.js.map +1 -0
  65. package/dist/html-editor/commands/NumberedList.d.ts +2 -0
  66. package/dist/html-editor/commands/NumberedList.d.ts.map +1 -0
  67. package/dist/html-editor/commands/NumberedList.js +20 -0
  68. package/dist/html-editor/commands/NumberedList.js.map +1 -0
  69. package/dist/html-editor/commands/Quote.d.ts +2 -0
  70. package/dist/html-editor/commands/Quote.d.ts.map +1 -0
  71. package/dist/html-editor/commands/Quote.js +20 -0
  72. package/dist/html-editor/commands/Quote.js.map +1 -0
  73. package/dist/html-editor/commands/RemoveFormat.d.ts +2 -0
  74. package/dist/html-editor/commands/RemoveFormat.d.ts.map +1 -0
  75. package/dist/html-editor/commands/RemoveFormat.js +20 -0
  76. package/dist/html-editor/commands/RemoveFormat.js.map +1 -0
  77. package/dist/html-editor/commands/Separator.d.ts +2 -0
  78. package/dist/html-editor/commands/Separator.d.ts.map +1 -0
  79. package/dist/html-editor/commands/Separator.js +29 -0
  80. package/dist/html-editor/commands/Separator.js.map +1 -0
  81. package/dist/html-editor/commands/StrikeThrough.d.ts +3 -0
  82. package/dist/html-editor/commands/StrikeThrough.d.ts.map +1 -0
  83. package/dist/html-editor/commands/StrikeThrough.js +20 -0
  84. package/dist/html-editor/commands/StrikeThrough.js.map +1 -0
  85. package/dist/html-editor/commands/Underline.d.ts +3 -0
  86. package/dist/html-editor/commands/Underline.d.ts.map +1 -0
  87. package/dist/html-editor/commands/Underline.js +20 -0
  88. package/dist/html-editor/commands/Underline.js.map +1 -0
  89. package/dist/html-editor/commands/Unlink.d.ts +2 -0
  90. package/dist/html-editor/commands/Unlink.d.ts.map +1 -0
  91. package/dist/html-editor/commands/Unlink.js +20 -0
  92. package/dist/html-editor/commands/Unlink.js.map +1 -0
  93. package/dist/html-editor/commands/UnorderedList.d.ts +2 -0
  94. package/dist/html-editor/commands/UnorderedList.d.ts.map +1 -0
  95. package/dist/html-editor/commands/UnorderedList.js +20 -0
  96. package/dist/html-editor/commands/UnorderedList.js.map +1 -0
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/package.json +2 -2
  99. package/src/basic/PopupButton.tsx +9 -2
  100. package/src/html-editor/HtmlEditor.tsx +206 -0
  101. package/src/html-editor/commands/AddImage.tsx +13 -0
  102. package/src/html-editor/commands/AddLink.tsx +13 -0
  103. package/src/html-editor/commands/Align.tsx +32 -0
  104. package/src/html-editor/commands/Bold.ts +13 -0
  105. package/src/html-editor/commands/ChangeColor.tsx +178 -0
  106. package/src/html-editor/commands/ChangeFont.tsx +75 -0
  107. package/src/html-editor/commands/ChangeFontSize.tsx +18 -0
  108. package/src/html-editor/commands/Command.tsx +44 -0
  109. package/src/html-editor/commands/CommandButton.tsx +66 -0
  110. package/src/html-editor/commands/Headings.tsx +24 -0
  111. package/src/html-editor/commands/HorizontalRule.tsx +12 -0
  112. package/src/html-editor/commands/IndentLess.tsx +13 -0
  113. package/src/html-editor/commands/IndentMore.tsx +13 -0
  114. package/src/html-editor/commands/Italic.ts +13 -0
  115. package/src/html-editor/commands/NumberedList.tsx +13 -0
  116. package/src/html-editor/commands/Quote.tsx +13 -0
  117. package/src/html-editor/commands/RemoveFormat.tsx +13 -0
  118. package/src/html-editor/commands/Separator.tsx +18 -0
  119. package/src/html-editor/commands/StrikeThrough.ts +13 -0
  120. package/src/html-editor/commands/Underline.ts +13 -0
  121. package/src/html-editor/commands/Unlink.tsx +13 -0
  122. package/src/html-editor/commands/UnorderedList.tsx +13 -0
@@ -0,0 +1,72 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/Colors", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/StyleRule", "@web-atoms/core/dist/web/styles/CSS", "../../basic/PopupButton"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FontMenu = void 0;
13
+ const Bind_1 = require("@web-atoms/core/dist/core/Bind");
14
+ const Colors_1 = require("@web-atoms/core/dist/core/Colors");
15
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
16
+ const StyleRule_1 = require("@web-atoms/core/dist/style/StyleRule");
17
+ const CSS_1 = require("@web-atoms/core/dist/web/styles/CSS");
18
+ const PopupButton_1 = require("../../basic/PopupButton");
19
+ const fontMenuCSS = (0, CSS_1.default)((0, StyleRule_1.default)()
20
+ .padding(5)
21
+ .child((0, StyleRule_1.default)(".menu")
22
+ .padding(5)
23
+ .hoverBackgroundColor(Colors_1.default.lightGreen)
24
+ .child((0, StyleRule_1.default)("i")
25
+ .opacity("0")
26
+ .and((0, StyleRule_1.default)(".selected")
27
+ .opacity("1")))));
28
+ const fonts = [
29
+ ["Sans Serif", ["arial", "sans-serif"]],
30
+ ["Serif", [`"times new roman"`, "serif"]],
31
+ ["Fixed Width", ["monospace"]],
32
+ ["Wide", [`"arial black"`, "sans-serif"]],
33
+ ["Narrow", [`"arial narrow"`, "sans-serif"]],
34
+ ["Comic Sans MS", [`"comic sans ms"`, "sans-serif"]],
35
+ ["Garamond", ["garamond", `"times new roman"`, "serif"]],
36
+ ["Georgia", ["georgia"]],
37
+ ["Tahoma", ["tahoma"]],
38
+ ["Trebuchet MS", [`"trebuchet ms"`]],
39
+ ["Verdana", ["verdana"]]
40
+ ];
41
+ function FontMenu({ name, value }) {
42
+ const cssName = value.join(" ");
43
+ return XNode_1.default.create("div", { class: "menu", eventClick: Bind_1.default.event((e) => e.executeCommand("fontName", false, cssName)) },
44
+ XNode_1.default.create("i", { class: Bind_1.default.oneWay((e) => ({
45
+ "ri-check-line": 1,
46
+ "selected": e.getStyle("fontFamily", e.version)
47
+ .toLowerCase()
48
+ .indexOf(value[0].toLowerCase()) !== -1
49
+ })) }),
50
+ XNode_1.default.create("label", { styleFontFamily: name }, name));
51
+ }
52
+ exports.FontMenu = FontMenu;
53
+ function selectFont(name) {
54
+ if (name === null) {
55
+ return "Font";
56
+ }
57
+ for (const [display, value] of fonts) {
58
+ for (const iterator of value) {
59
+ if (name.indexOf(iterator) !== -1) {
60
+ return display;
61
+ }
62
+ }
63
+ }
64
+ return "Font";
65
+ }
66
+ function ChangeFont() {
67
+ return XNode_1.default.create(PopupButton_1.default, { class: "command", text: Bind_1.default.oneWay((e) => selectFont(e.getStyle("fontFamily", e.version))), title: "Change Font" },
68
+ XNode_1.default.create("div", { class: fontMenuCSS }, ...fonts.map((x) => XNode_1.default.create(FontMenu, { name: x[0], value: x[1] }))));
69
+ }
70
+ exports.default = ChangeFont;
71
+ });
72
+ //# sourceMappingURL=ChangeFont.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangeFont.js","sourceRoot":"","sources":["../../../src/html-editor/commands/ChangeFont.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import { ICommand } from "./Command";
2
+ export default function ChangeFontSize(cmd: ICommand): any;
3
+ //# sourceMappingURL=ChangeFontSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangeFontSize.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/ChangeFontSize.tsx"],"names":[],"mappings":"AAIA,OAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,QAAQ,OAWnD"}
@@ -0,0 +1,22 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "../../basic/PopupButton"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Bind_1 = require("@web-atoms/core/dist/core/Bind");
13
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
14
+ const PopupButton_1 = require("../../basic/PopupButton");
15
+ function ChangeFontSize(cmd) {
16
+ return XNode_1.default.create(PopupButton_1.default, { class: "command", icon: "ri-font-size-2", title: "Change Font Size" },
17
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-add-line", label: "Increase", eventClick: Bind_1.default.event((e) => e.executeCommand("increaseFontSize")) }),
18
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-subtract-line", label: "Decrease", eventClick: Bind_1.default.event((e) => e.executeCommand("decreaseFontSize")) }));
19
+ }
20
+ exports.default = ChangeFontSize;
21
+ });
22
+ //# sourceMappingURL=ChangeFontSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangeFontSize.js","sourceRoot":"","sources":["../../../src/html-editor/commands/ChangeFontSize.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,yDAAkD;IAClD,2DAAoD;IACpD,yDAAgE;IAIhE,SAAwB,cAAc,CAAC,GAAa;QAChD,OAAO,uBAAC,qBAAW,IACf,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,kBAAkB;YACxB,uBAAC,sBAAQ,IAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,UAAU,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAoB,EAAE,EAAE,CAC1F,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,GAAG;YAC5C,uBAAC,sBAAQ,IAAC,IAAI,EAAC,kBAAkB,EAAC,KAAK,EAAC,UAAU,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAoB,EAAE,EAAE,CAC/F,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAClC,CAAC;IAEnB,CAAC;IAXD,iCAWC"}
@@ -0,0 +1,12 @@
1
+ import type { HtmlEditorControl } from "../HtmlEditor";
2
+ export interface ICommand {
3
+ label?: string;
4
+ icon?: string;
5
+ queryState?: string;
6
+ enabled?: boolean;
7
+ title?: string;
8
+ command?: (editor: HtmlEditorControl) => void;
9
+ query?: (editor: HtmlEditorControl) => boolean;
10
+ }
11
+ export default function Command({ icon, label, command, queryState, query, ...others }: ICommand): any;
12
+ //# sourceMappingURL=Command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/Command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,QAAQ;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAmB,EACnB,KAAK,EACL,GAAI,MAAM,EACb,EAAE,QAAQ,OAsBV"}
@@ -0,0 +1,43 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ (function (factory) {
13
+ if (typeof module === "object" && typeof module.exports === "object") {
14
+ var v = factory(require, exports);
15
+ if (v !== undefined) module.exports = v;
16
+ }
17
+ else if (typeof define === "function" && define.amd) {
18
+ define(["require", "exports", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode"], factory);
19
+ }
20
+ })(function (require, exports) {
21
+ "use strict";
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ const Bind_1 = require("@web-atoms/core/dist/core/Bind");
24
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
25
+ function Command(_a) {
26
+ var { icon, label, command, queryState = "none", query } = _a, others = __rest(_a, ["icon", "label", "command", "queryState", "query"]);
27
+ if (label) {
28
+ return XNode_1.default.create("div", Object.assign({ eventClick: Bind_1.default.event((e) => command(e)), styleClass: Bind_1.default.oneWay((e) => ({
29
+ command: e.version,
30
+ pressed: !e.queryCommandState(queryState)
31
+ })) }, others),
32
+ XNode_1.default.create("i", { class: icon }),
33
+ XNode_1.default.create("label", { class: "label", text: label }));
34
+ }
35
+ return XNode_1.default.create("div", Object.assign({ eventClick: Bind_1.default.event((e) => command(e)), styleClass: Bind_1.default.oneWay((e) => ({
36
+ command: e.version,
37
+ pressed: e.queryCommandState(queryState)
38
+ })) }, others),
39
+ XNode_1.default.create("i", { class: icon }));
40
+ }
41
+ exports.default = Command;
42
+ });
43
+ //# sourceMappingURL=Command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.js","sourceRoot":"","sources":["../../../src/html-editor/commands/Command.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAAA,yDAAkD;IAClD,2DAAoD;IAapD,SAAwB,OAAO,CAAC,EAOrB;YAPqB,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,GAAG,MAAM,EACnB,KAAK,OAEE,EADH,MAAM,cANkB,mDAO/B,CADa;QAEV,IAAI,KAAK,EAAE;YACP,OAAO,8CACH,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAsB,CAAC,CAAC,EAC9D,UAAU,EAAE,cAAI,CAAC,MAAM,CAAC,CAAC,CAAoB,EAAE,EAAE,CAAC,CAAC;oBAC/C,OAAO,EAAE,CAAC,CAAC,OAAO;oBAClB,OAAO,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,UAAU,CAAC;iBAC5C,CAAC,CAAC,IACG,MAAM;gBACZ,8BAAG,KAAK,EAAE,IAAI,GAAG;gBACjB,kCAAO,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,KAAK,GAAG,CACjC,CAAC;SACV;QACD,OAAO,8CACH,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAsB,CAAC,CAAC,EAC9D,UAAU,EAAE,cAAI,CAAC,MAAM,CAAC,CAAC,CAAoB,EAAE,EAAE,CAAC,CAAC;gBAC/C,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC,UAAU,CAAC;aAC3C,CAAC,CAAC,IACG,MAAM;YACZ,8BAAG,KAAK,EAAE,IAAI,GAAG,CACf,CAAC;IACX,CAAC;IA7BD,0BA6BC"}
@@ -0,0 +1,19 @@
1
+ export interface ICommandButton {
2
+ icon?: string;
3
+ label?: string;
4
+ /**
5
+ * On click, you must return a promise of string or a string that will be inserted
6
+ */
7
+ eventInsertHtml?: any;
8
+ /**
9
+ * Default is insertHTML but you can change it.
10
+ */
11
+ insertCommand: any;
12
+ /**
13
+ * Tooltip
14
+ */
15
+ title?: string;
16
+ }
17
+ export declare function notSet(text: string): () => void;
18
+ export default function CommandButton({ icon, label, eventInsertHtml, insertCommand, title }: ICommandButton): any;
19
+ //# sourceMappingURL=CommandButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandButton.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/CommandButton.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,GAAG,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,cAIlC;AAcD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,eAAe,EACf,aAAa,EACb,KAAK,EACR,EAAE,cAAc,OAkBhB"}
@@ -0,0 +1,53 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ (function (factory) {
11
+ if (typeof module === "object" && typeof module.exports === "object") {
12
+ var v = factory(require, exports);
13
+ if (v !== undefined) module.exports = v;
14
+ }
15
+ else if (typeof define === "function" && define.amd) {
16
+ define(["require", "exports", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode"], factory);
17
+ }
18
+ })(function (require, exports) {
19
+ "use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.notSet = void 0;
22
+ const Bind_1 = require("@web-atoms/core/dist/core/Bind");
23
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
24
+ function notSet(text) {
25
+ return () => {
26
+ alert(`Command ${text} not set`);
27
+ };
28
+ }
29
+ exports.notSet = notSet;
30
+ function insert(callback, command) {
31
+ return (s, e) => __awaiter(this, void 0, void 0, function* () {
32
+ let r = callback(s, e);
33
+ if (typeof r !== "string") {
34
+ if (r.then) {
35
+ r = yield r;
36
+ }
37
+ }
38
+ s.executeCommand(command !== null && command !== void 0 ? command : "insertHTML", false, r);
39
+ });
40
+ }
41
+ function CommandButton({ icon, label, eventInsertHtml, insertCommand, title }) {
42
+ if (label) {
43
+ return XNode_1.default.create("button", { class: "command", eventClick: Bind_1.default.event(insert(eventInsertHtml, insertCommand)), title: title },
44
+ XNode_1.default.create("label", { class: "label" },
45
+ XNode_1.default.create("i", { class: icon }),
46
+ XNode_1.default.create("span", { text: label })));
47
+ }
48
+ return XNode_1.default.create("button", { title: title, class: "command", eventClick: Bind_1.default.event(insert(eventInsertHtml, insertCommand)) },
49
+ XNode_1.default.create("i", { class: icon }));
50
+ }
51
+ exports.default = CommandButton;
52
+ });
53
+ //# sourceMappingURL=CommandButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandButton.js","sourceRoot":"","sources":["../../../src/html-editor/commands/CommandButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;IAAA,yDAAkD;IAClD,2DAAoD;IAsBpD,SAAgB,MAAM,CAAC,IAAY;QAC/B,OAAO,GAAG,EAAE;YACR,KAAK,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC;QACrC,CAAC,CAAC;IACN,CAAC;IAJD,wBAIC;IAED,SAAS,MAAM,CAAC,QAAsE,EAAE,OAAe;QACnG,OAAO,CAAO,CAAoB,EAAE,CAAQ,EAAE,EAAE;YAC5C,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACvB,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBACvB,IAAI,CAAC,CAAC,IAAI,EAAE;oBACR,CAAC,GAAG,MAAM,CAAC,CAAC;iBACf;aACJ;YACD,CAAC,CAAC,cAAc,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,YAAY,EAAE,KAAK,EAAE,CAAW,CAAC,CAAC;QAClE,CAAC,CAAA,CAAC;IACN,CAAC;IAED,SAAwB,aAAa,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,eAAe,EACf,aAAa,EACb,KAAK,EACQ;QACb,IAAI,KAAK,EAAE;YACP,OAAO,mCACH,KAAK,EAAC,SAAS,EACf,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EAC9D,KAAK,EAAE,KAAK;gBACZ,kCAAO,KAAK,EAAC,OAAO;oBAChB,8BAAG,KAAK,EAAE,IAAI,GAAI;oBAClB,iCAAM,IAAI,EAAE,KAAK,GAAG,CAChB,CACH,CAAC;SACb;QACD,OAAO,mCACH,KAAK,EAAE,KAAK,EACZ,KAAK,EAAC,SAAS,EACf,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;YAC9D,8BAAG,KAAK,EAAE,IAAI,GAAI,CACb,CAAC;IACd,CAAC;IAxBD,gCAwBC"}
@@ -0,0 +1,2 @@
1
+ export default function Headings(): any;
2
+ //# sourceMappingURL=Headings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Headings.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/Headings.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,QAAQ,QAkB/B"}
@@ -0,0 +1,26 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "../../basic/PopupButton"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Bind_1 = require("@web-atoms/core/dist/core/Bind");
13
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
14
+ const PopupButton_1 = require("../../basic/PopupButton");
15
+ function Headings() {
16
+ return XNode_1.default.create(PopupButton_1.default, { class: "command", icon: "ri-heading", title: "Apply Heading" },
17
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-1", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H1")) }),
18
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-2", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H2")) }),
19
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-3", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H3")) }),
20
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-4", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H4")) }),
21
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-5", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H5")) }),
22
+ XNode_1.default.create(PopupButton_1.MenuItem, { icon: "ri-h-6", eventClick: Bind_1.default.event((e) => e.executeCommand("formatBlock", false, "H6")) }));
23
+ }
24
+ exports.default = Headings;
25
+ });
26
+ //# sourceMappingURL=Headings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Headings.js","sourceRoot":"","sources":["../../../src/html-editor/commands/Headings.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,yDAAkD;IAClD,2DAAoD;IACpD,yDAAgE;IAGhE,SAAwB,QAAQ;QAC5B,OAAO,uBAAC,qBAAW,IACf,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,eAAe;YACrB,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAoB,EAAE,EAAE,CACpE,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;YACpD,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CACtD,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;YACpD,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CACtD,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;YACpD,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CACtD,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;YACpD,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CACtD,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;YACpD,uBAAC,sBAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CACtD,CAAC,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,CAC1C,CAAC;IACnB,CAAC;IAlBD,2BAkBC"}
@@ -0,0 +1,3 @@
1
+ import { ICommand } from "./Command";
2
+ export default function HorizontalRule(cmd: ICommand): any;
3
+ //# sourceMappingURL=HorizontalRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalRule.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/HorizontalRule.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,QAAQ,OASnD"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function HorizontalRule(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-separator", title: "Insert Horizontal Line" }, cmd), { command(editor) {
15
+ editor.executeCommand("insertHorizontalRule");
16
+ } }));
17
+ }
18
+ exports.default = HorizontalRule;
19
+ });
20
+ //# sourceMappingURL=HorizontalRule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalRule.js","sourceRoot":"","sources":["../../../src/html-editor/commands/HorizontalRule.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAA8C;IAE9C,SAAwB,cAAc,CAAC,GAAa;QAChD,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,wBAAwB,IAC3B,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;YAClD,CAAC,IACH,CAAC;IACP,CAAC;IATD,iCASC"}
@@ -0,0 +1,2 @@
1
+ export default function IndentLess(cmd: any): any;
2
+ //# sourceMappingURL=IndentLess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentLess.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/IndentLess.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,GAAG,EAAE,GAAG,OAU1C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function IndentLess(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-indent-decrease", queryState: "outdent", title: "Indent Less" }, cmd), { command(editor) {
15
+ editor.executeCommand("outdent");
16
+ } }));
17
+ }
18
+ exports.default = IndentLess;
19
+ });
20
+ //# sourceMappingURL=IndentLess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentLess.js","sourceRoot":"","sources":["../../../src/html-editor/commands/IndentLess.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAAgC;IAEhC,SAAwB,UAAU,CAAC,GAAQ;QACvC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,oBAAoB,EAC1B,UAAU,EAAE,SAAS,EACrB,KAAK,EAAE,aAAa,IAChB,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YACrC,CAAC,IACH,CAAC;IACP,CAAC;IAVD,6BAUC"}
@@ -0,0 +1,2 @@
1
+ export default function IndentMore(cmd: any): any;
2
+ //# sourceMappingURL=IndentMore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentMore.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/IndentMore.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,GAAG,EAAE,GAAG,OAU1C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function IndentMore(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-indent-increase", queryState: "indent", title: "Indent More" }, cmd), { command(editor) {
15
+ editor.executeCommand("indent");
16
+ } }));
17
+ }
18
+ exports.default = IndentMore;
19
+ });
20
+ //# sourceMappingURL=IndentMore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentMore.js","sourceRoot":"","sources":["../../../src/html-editor/commands/IndentMore.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAAgC;IAEhC,SAAwB,UAAU,CAAC,GAAQ;QACvC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,oBAAoB,EAC1B,UAAU,EAAE,QAAQ,EACpB,KAAK,EAAE,aAAa,IAChB,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACpC,CAAC,IACH,CAAC;IACP,CAAC;IAVD,6BAUC"}
@@ -0,0 +1,3 @@
1
+ import { ICommand } from "./Command";
2
+ export default function Italic(cmd: ICommand): any;
3
+ //# sourceMappingURL=Italic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Italic.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/Italic.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,QAAQ,OAU3C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function Italic(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-italic", queryState: "italic", title: "Italic" }, cmd), { command(editor) {
15
+ editor.executeCommand("italic");
16
+ } }));
17
+ }
18
+ exports.default = Italic;
19
+ });
20
+ //# sourceMappingURL=Italic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Italic.js","sourceRoot":"","sources":["../../../src/html-editor/commands/Italic.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAA8C;IAE9C,SAAwB,MAAM,CAAC,GAAa;QACxC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,QAAQ,EACpB,KAAK,EAAE,QAAQ,IACX,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACpC,CAAC,IACH,CAAC;IACP,CAAC;IAVD,yBAUC"}
@@ -0,0 +1,2 @@
1
+ export default function NumberedList(cmd: any): any;
2
+ //# sourceMappingURL=NumberedList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberedList.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/NumberedList.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,GAAG,OAU5C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function NumberedList(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-list-ordered", queryState: "insertOrderedList", title: "Create Numbered List" }, cmd), { command(editor) {
15
+ editor.executeCommand("insertOrderedList");
16
+ } }));
17
+ }
18
+ exports.default = NumberedList;
19
+ });
20
+ //# sourceMappingURL=NumberedList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberedList.js","sourceRoot":"","sources":["../../../src/html-editor/commands/NumberedList.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAAgC;IAEhC,SAAwB,YAAY,CAAC,GAAQ;QACzC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAE,sBAAsB,IACzB,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;YAC/C,CAAC,IACH,CAAC;IACP,CAAC;IAVD,+BAUC"}
@@ -0,0 +1,2 @@
1
+ export default function IndentMore(cmd: any): any;
2
+ //# sourceMappingURL=Quote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quote.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/Quote.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,GAAG,EAAE,GAAG,OAU1C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function IndentMore(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-double-quotes", queryState: "formatBlock", title: "Insert Quote" }, cmd), { command(editor) {
15
+ editor.executeCommand("formatBlock");
16
+ } }));
17
+ }
18
+ exports.default = IndentMore;
19
+ });
20
+ //# sourceMappingURL=Quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quote.js","sourceRoot":"","sources":["../../../src/html-editor/commands/Quote.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAAgC;IAEhC,SAAwB,UAAU,CAAC,GAAQ;QACvC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,cAAc,IACjB,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YACzC,CAAC,IACH,CAAC;IACP,CAAC;IAVD,6BAUC"}
@@ -0,0 +1,2 @@
1
+ export default function RemoveFormat(cmd: any): any;
2
+ //# sourceMappingURL=RemoveFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoveFormat.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/RemoveFormat.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,GAAG,OAU5C"}
@@ -0,0 +1,20 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Command"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Command_1 = require("./Command");
13
+ function RemoveFormat(cmd) {
14
+ return (0, Command_1.default)(Object.assign(Object.assign({ icon: "ri-format-clear", queryState: "removeFormat", title: "Clear Formatting" }, cmd), { command(editor) {
15
+ editor.executeCommand("removeFormat");
16
+ } }));
17
+ }
18
+ exports.default = RemoveFormat;
19
+ });
20
+ //# sourceMappingURL=RemoveFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoveFormat.js","sourceRoot":"","sources":["../../../src/html-editor/commands/RemoveFormat.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,uCAAgC;IAEhC,SAAwB,YAAY,CAAC,GAAQ;QACzC,OAAO,IAAA,iBAAO,gCACV,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,kBAAkB,IACrB,GAAG,KACP,OAAO,CAAC,MAAM;gBACV,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAC1C,CAAC,IACH,CAAC;IACP,CAAC;IAVD,+BAUC"}
@@ -0,0 +1,2 @@
1
+ export default function Separator(): any;
2
+ //# sourceMappingURL=Separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/Separator.tsx"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,SAAS,QAEhC"}
@@ -0,0 +1,29 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "@web-atoms/core/dist/core/Colors", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/StyleRule", "@web-atoms/core/dist/web/styles/CSS"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const Colors_1 = require("@web-atoms/core/dist/core/Colors");
13
+ const XNode_1 = require("@web-atoms/core/dist/core/XNode");
14
+ const StyleRule_1 = require("@web-atoms/core/dist/style/StyleRule");
15
+ const CSS_1 = require("@web-atoms/core/dist/web/styles/CSS");
16
+ const separatorCss = (0, CSS_1.default)((0, StyleRule_1.default)()
17
+ .backgroundColor(Colors_1.default.darkGray)
18
+ .marginLeft(4)
19
+ .marginRight(4)
20
+ .display("inline-block")
21
+ .marginTop(4)
22
+ .height(20)
23
+ .width(2));
24
+ function Separator() {
25
+ return XNode_1.default.create("div", { class: separatorCss });
26
+ }
27
+ exports.default = Separator;
28
+ });
29
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../../src/html-editor/commands/Separator.tsx"],"names":[],"mappings":";;;;;;;;;;;IAAA,6DAAsD;IACtD,2DAAoD;IACpD,oEAA6D;IAC7D,6DAAsD;IAEtD,MAAM,YAAY,GAAG,IAAA,aAAG,EAAC,IAAA,mBAAS,GAAE;SAC/B,eAAe,CAAC,gBAAM,CAAC,QAAQ,CAAC;SAChC,UAAU,CAAC,CAAC,CAAC;SACb,WAAW,CAAC,CAAC,CAAC;SACd,OAAO,CAAC,cAAc,CAAC;SACvB,SAAS,CAAC,CAAC,CAAC;SACZ,MAAM,CAAC,EAAE,CAAC;SACV,KAAK,CAAC,CAAC,CAAC,CACZ,CAAC;IAEF,SAAwB,SAAS;QAC7B,OAAO,gCAAK,KAAK,EAAE,YAAY,GAAQ,CAAC;IAC5C,CAAC;IAFD,4BAEC"}
@@ -0,0 +1,3 @@
1
+ import { ICommand } from "./Command";
2
+ export default function StrikeThrough(cmd: ICommand): any;
3
+ //# sourceMappingURL=StrikeThrough.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StrikeThrough.d.ts","sourceRoot":"","sources":["../../../src/html-editor/commands/StrikeThrough.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,GAAG,EAAE,QAAQ,OAUlD"}