@pie-lib/editable-html-tip-tap 2.2.0-beta.9 → 3.0.0-next.36

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 (238) hide show
  1. package/dist/components/CharacterPicker.d.ts +31 -0
  2. package/dist/components/CharacterPicker.js +141 -0
  3. package/dist/components/EditableHtml.d.ts +11 -0
  4. package/dist/components/EditableHtml.js +330 -0
  5. package/dist/components/MenuBar.d.ts +11 -0
  6. package/dist/components/MenuBar.js +531 -0
  7. package/dist/components/TiptapContainer.d.ts +11 -0
  8. package/dist/components/TiptapContainer.js +167 -0
  9. package/dist/components/characters/characterUtils.d.ts +35 -0
  10. package/dist/components/characters/characterUtils.js +465 -0
  11. package/dist/components/characters/custom-popper.d.ts +14 -0
  12. package/dist/components/characters/custom-popper.js +32 -0
  13. package/dist/components/common/done-button.d.ts +30 -0
  14. package/dist/components/common/done-button.js +26 -0
  15. package/dist/components/common/toolbar-buttons.d.ts +38 -0
  16. package/dist/components/common/toolbar-buttons.js +96 -0
  17. package/dist/components/icons/CssIcon.d.ts +11 -0
  18. package/dist/components/icons/CssIcon.js +14 -0
  19. package/dist/components/icons/RespArea.d.ts +26 -0
  20. package/dist/components/icons/RespArea.js +42 -0
  21. package/dist/components/icons/TableIcons.d.ts +14 -0
  22. package/dist/components/icons/TableIcons.js +34 -0
  23. package/dist/components/icons/TextAlign.d.ts +18 -0
  24. package/dist/components/icons/TextAlign.js +143 -0
  25. package/dist/components/image/AltDialog.d.ts +22 -0
  26. package/dist/components/image/AltDialog.js +61 -0
  27. package/dist/components/image/ImageToolbar.d.ts +24 -0
  28. package/dist/components/image/ImageToolbar.js +80 -0
  29. package/dist/components/image/InsertImageHandler.d.ts +33 -0
  30. package/dist/components/image/InsertImageHandler.js +65 -0
  31. package/dist/components/image/findImageNode.d.ts +3 -0
  32. package/dist/components/image/findImageNode.js +11 -0
  33. package/dist/components/media/MediaDialog.d.ts +43 -0
  34. package/dist/components/media/MediaDialog.js +389 -0
  35. package/dist/components/media/MediaToolbar.d.ts +19 -0
  36. package/dist/components/media/MediaToolbar.js +41 -0
  37. package/dist/components/media/MediaWrapper.d.ts +19 -0
  38. package/dist/components/respArea/DragInTheBlank/DragInTheBlank.d.ts +23 -0
  39. package/dist/components/respArea/DragInTheBlank/DragInTheBlank.js +58 -0
  40. package/dist/components/respArea/DragInTheBlank/choice.d.ts +56 -0
  41. package/dist/components/respArea/DragInTheBlank/choice.js +157 -0
  42. package/dist/components/respArea/ExplicitConstructedResponse.d.ts +20 -0
  43. package/dist/components/respArea/ExplicitConstructedResponse.js +84 -0
  44. package/dist/components/respArea/InlineDropdown.d.ts +18 -0
  45. package/dist/components/respArea/InlineDropdown.js +126 -0
  46. package/dist/components/respArea/MathTemplated.d.ts +19 -0
  47. package/dist/components/respArea/MathTemplated.js +98 -0
  48. package/dist/components/respArea/ToolbarIcon.d.ts +14 -0
  49. package/dist/components/respArea/ToolbarIcon.js +17 -0
  50. package/dist/components/respArea/inlineDropdownUtils.d.ts +15 -0
  51. package/dist/components/respArea/inlineDropdownUtils.js +15 -0
  52. package/dist/constants.d.ts +13 -0
  53. package/dist/constants.js +4 -0
  54. package/dist/extensions/css.d.ts +11 -0
  55. package/dist/extensions/css.js +120 -0
  56. package/dist/extensions/custom-toolbar-wrapper.d.ts +11 -0
  57. package/dist/extensions/custom-toolbar-wrapper.js +61 -0
  58. package/dist/extensions/div-node.d.ts +10 -0
  59. package/dist/extensions/div-node.js +42 -0
  60. package/dist/extensions/ensure-empty-root-div.d.ts +14 -0
  61. package/dist/extensions/ensure-empty-root-div.js +24 -0
  62. package/dist/extensions/ensure-list-item-content-is-div.d.ts +15 -0
  63. package/dist/extensions/ensure-list-item-content-is-div.js +31 -0
  64. package/dist/extensions/extended-list-item.d.ts +13 -0
  65. package/dist/extensions/extended-list-item.js +5 -0
  66. package/dist/extensions/extended-table-cell.d.ts +10 -0
  67. package/dist/extensions/extended-table-cell.js +6 -0
  68. package/dist/extensions/extended-table.d.ts +17 -0
  69. package/dist/extensions/extended-table.js +34 -0
  70. package/dist/extensions/heading-paragraph.d.ts +17 -0
  71. package/dist/extensions/heading-paragraph.js +30 -0
  72. package/dist/extensions/image-component.d.ts +22 -0
  73. package/dist/extensions/image-component.js +223 -0
  74. package/dist/extensions/image.d.ts +10 -0
  75. package/dist/extensions/image.js +77 -0
  76. package/dist/extensions/index.d.ts +16 -0
  77. package/dist/extensions/index.js +64 -0
  78. package/dist/extensions/math.d.ts +15 -0
  79. package/dist/extensions/math.js +213 -0
  80. package/dist/extensions/media.d.ts +19 -0
  81. package/dist/extensions/media.js +149 -0
  82. package/dist/extensions/responseArea.d.ts +27 -0
  83. package/dist/extensions/responseArea.js +255 -0
  84. package/dist/index.d.ts +13 -0
  85. package/dist/index.js +7 -0
  86. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  87. package/dist/styles/editorContainerStyles.d.ts +134 -0
  88. package/dist/theme.d.ts +9 -0
  89. package/dist/utils/helper.d.ts +9 -0
  90. package/dist/utils/helper.js +27 -0
  91. package/dist/utils/size.d.ts +9 -0
  92. package/dist/utils/size.js +14 -0
  93. package/dist/utils/toolbar.d.ts +10 -0
  94. package/dist/utils/toolbar.js +7 -0
  95. package/package.json +56 -42
  96. package/CHANGELOG.json +0 -32
  97. package/CHANGELOG.md +0 -2532
  98. package/lib/components/CharacterPicker.js +0 -226
  99. package/lib/components/CharacterPicker.js.map +0 -1
  100. package/lib/components/EditableHtml.js +0 -388
  101. package/lib/components/EditableHtml.js.map +0 -1
  102. package/lib/components/MenuBar.js +0 -702
  103. package/lib/components/MenuBar.js.map +0 -1
  104. package/lib/components/TiptapContainer.js +0 -242
  105. package/lib/components/TiptapContainer.js.map +0 -1
  106. package/lib/components/characters/characterUtils.js +0 -378
  107. package/lib/components/characters/characterUtils.js.map +0 -1
  108. package/lib/components/characters/custom-popper.js +0 -44
  109. package/lib/components/characters/custom-popper.js.map +0 -1
  110. package/lib/components/common/done-button.js +0 -34
  111. package/lib/components/common/done-button.js.map +0 -1
  112. package/lib/components/common/toolbar-buttons.js +0 -149
  113. package/lib/components/common/toolbar-buttons.js.map +0 -1
  114. package/lib/components/icons/CssIcon.js +0 -25
  115. package/lib/components/icons/CssIcon.js.map +0 -1
  116. package/lib/components/icons/RespArea.js +0 -72
  117. package/lib/components/icons/RespArea.js.map +0 -1
  118. package/lib/components/icons/TableIcons.js +0 -53
  119. package/lib/components/icons/TableIcons.js.map +0 -1
  120. package/lib/components/icons/TextAlign.js +0 -157
  121. package/lib/components/icons/TextAlign.js.map +0 -1
  122. package/lib/components/image/AltDialog.js +0 -98
  123. package/lib/components/image/AltDialog.js.map +0 -1
  124. package/lib/components/image/ImageToolbar.js +0 -137
  125. package/lib/components/image/ImageToolbar.js.map +0 -1
  126. package/lib/components/image/InsertImageHandler.js +0 -135
  127. package/lib/components/image/InsertImageHandler.js.map +0 -1
  128. package/lib/components/media/MediaDialog.js +0 -594
  129. package/lib/components/media/MediaDialog.js.map +0 -1
  130. package/lib/components/media/MediaToolbar.js +0 -74
  131. package/lib/components/media/MediaToolbar.js.map +0 -1
  132. package/lib/components/media/MediaWrapper.js +0 -67
  133. package/lib/components/media/MediaWrapper.js.map +0 -1
  134. package/lib/components/respArea/DragInTheBlank/DragInTheBlank.js +0 -84
  135. package/lib/components/respArea/DragInTheBlank/DragInTheBlank.js.map +0 -1
  136. package/lib/components/respArea/DragInTheBlank/choice.js +0 -253
  137. package/lib/components/respArea/DragInTheBlank/choice.js.map +0 -1
  138. package/lib/components/respArea/ExplicitConstructedResponse.js +0 -137
  139. package/lib/components/respArea/ExplicitConstructedResponse.js.map +0 -1
  140. package/lib/components/respArea/InlineDropdown.js +0 -223
  141. package/lib/components/respArea/InlineDropdown.js.map +0 -1
  142. package/lib/components/respArea/MathTemplated.js +0 -130
  143. package/lib/components/respArea/MathTemplated.js.map +0 -1
  144. package/lib/components/respArea/ToolbarIcon.js +0 -81
  145. package/lib/components/respArea/ToolbarIcon.js.map +0 -1
  146. package/lib/components/respArea/inlineDropdownUtils.js +0 -67
  147. package/lib/components/respArea/inlineDropdownUtils.js.map +0 -1
  148. package/lib/constants.js +0 -11
  149. package/lib/constants.js.map +0 -1
  150. package/lib/extensions/css.js +0 -227
  151. package/lib/extensions/css.js.map +0 -1
  152. package/lib/extensions/custom-toolbar-wrapper.js +0 -92
  153. package/lib/extensions/custom-toolbar-wrapper.js.map +0 -1
  154. package/lib/extensions/div-node.js +0 -83
  155. package/lib/extensions/div-node.js.map +0 -1
  156. package/lib/extensions/ensure-empty-root-div.js +0 -48
  157. package/lib/extensions/ensure-empty-root-div.js.map +0 -1
  158. package/lib/extensions/ensure-list-item-content-is-div.js +0 -64
  159. package/lib/extensions/ensure-list-item-content-is-div.js.map +0 -1
  160. package/lib/extensions/extended-list-item.js +0 -15
  161. package/lib/extensions/extended-list-item.js.map +0 -1
  162. package/lib/extensions/extended-table-cell.js +0 -22
  163. package/lib/extensions/extended-table-cell.js.map +0 -1
  164. package/lib/extensions/extended-table.js +0 -75
  165. package/lib/extensions/extended-table.js.map +0 -1
  166. package/lib/extensions/heading-paragraph.js +0 -61
  167. package/lib/extensions/heading-paragraph.js.map +0 -1
  168. package/lib/extensions/image-component.js +0 -351
  169. package/lib/extensions/image-component.js.map +0 -1
  170. package/lib/extensions/image.js +0 -134
  171. package/lib/extensions/image.js.map +0 -1
  172. package/lib/extensions/index.js +0 -46
  173. package/lib/extensions/index.js.map +0 -1
  174. package/lib/extensions/math.js +0 -469
  175. package/lib/extensions/math.js.map +0 -1
  176. package/lib/extensions/media.js +0 -243
  177. package/lib/extensions/media.js.map +0 -1
  178. package/lib/extensions/responseArea.js +0 -452
  179. package/lib/extensions/responseArea.js.map +0 -1
  180. package/lib/index.js +0 -37
  181. package/lib/index.js.map +0 -1
  182. package/lib/styles/editorContainerStyles.js +0 -137
  183. package/lib/styles/editorContainerStyles.js.map +0 -1
  184. package/lib/theme.js +0 -8
  185. package/lib/theme.js.map +0 -1
  186. package/lib/utils/helper.js +0 -73
  187. package/lib/utils/helper.js.map +0 -1
  188. package/lib/utils/size.js +0 -26
  189. package/lib/utils/size.js.map +0 -1
  190. package/lib/utils/toolbar.js +0 -19
  191. package/lib/utils/toolbar.js.map +0 -1
  192. package/src/components/CharacterPicker.jsx +0 -237
  193. package/src/components/EditableHtml.jsx +0 -458
  194. package/src/components/MenuBar.jsx +0 -561
  195. package/src/components/TiptapContainer.jsx +0 -235
  196. package/src/components/characters/characterUtils.js +0 -447
  197. package/src/components/characters/custom-popper.js +0 -38
  198. package/src/components/common/done-button.jsx +0 -27
  199. package/src/components/common/toolbar-buttons.jsx +0 -127
  200. package/src/components/icons/CssIcon.jsx +0 -15
  201. package/src/components/icons/RespArea.jsx +0 -71
  202. package/src/components/icons/TableIcons.jsx +0 -52
  203. package/src/components/icons/TextAlign.jsx +0 -114
  204. package/src/components/image/AltDialog.jsx +0 -82
  205. package/src/components/image/ImageToolbar.jsx +0 -99
  206. package/src/components/image/InsertImageHandler.js +0 -107
  207. package/src/components/media/MediaDialog.jsx +0 -596
  208. package/src/components/media/MediaToolbar.jsx +0 -49
  209. package/src/components/media/MediaWrapper.jsx +0 -39
  210. package/src/components/respArea/DragInTheBlank/DragInTheBlank.jsx +0 -76
  211. package/src/components/respArea/DragInTheBlank/choice.jsx +0 -259
  212. package/src/components/respArea/ExplicitConstructedResponse.jsx +0 -136
  213. package/src/components/respArea/InlineDropdown.jsx +0 -240
  214. package/src/components/respArea/MathTemplated.jsx +0 -124
  215. package/src/components/respArea/ToolbarIcon.jsx +0 -66
  216. package/src/components/respArea/inlineDropdownUtils.js +0 -79
  217. package/src/constants.js +0 -5
  218. package/src/extensions/css.js +0 -233
  219. package/src/extensions/custom-toolbar-wrapper.jsx +0 -78
  220. package/src/extensions/div-node.js +0 -86
  221. package/src/extensions/ensure-empty-root-div.js +0 -47
  222. package/src/extensions/ensure-list-item-content-is-div.js +0 -62
  223. package/src/extensions/extended-list-item.js +0 -10
  224. package/src/extensions/extended-table-cell.js +0 -19
  225. package/src/extensions/extended-table.js +0 -60
  226. package/src/extensions/heading-paragraph.js +0 -53
  227. package/src/extensions/image-component.jsx +0 -340
  228. package/src/extensions/image.js +0 -109
  229. package/src/extensions/index.js +0 -81
  230. package/src/extensions/math.js +0 -454
  231. package/src/extensions/media.js +0 -188
  232. package/src/extensions/responseArea.js +0 -407
  233. package/src/index.jsx +0 -5
  234. package/src/styles/editorContainerStyles.js +0 -145
  235. package/src/theme.js +0 -1
  236. package/src/utils/helper.js +0 -69
  237. package/src/utils/size.js +0 -32
  238. package/src/utils/toolbar.js +0 -15
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/common/done-button.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const RawDoneButton: {
12
+ ({ onClick, doneButtonRef }: {
13
+ onClick: any;
14
+ doneButtonRef: any;
15
+ }): React.JSX.Element;
16
+ propTypes: {
17
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
18
+ doneButtonRef: PropTypes.Requireable<(...args: any[]) => any>;
19
+ };
20
+ };
21
+ export declare const DoneButton: {
22
+ ({ onClick, doneButtonRef }: {
23
+ onClick: any;
24
+ doneButtonRef: any;
25
+ }): React.JSX.Element;
26
+ propTypes: {
27
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
28
+ doneButtonRef: PropTypes.Requireable<(...args: any[]) => any>;
29
+ };
30
+ };
@@ -0,0 +1,26 @@
1
+ import "react";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import t from "prop-types";
4
+ import n from "@mui/material/IconButton";
5
+ import r from "@mui/icons-material/Check";
6
+ import { jsx as i } from "react/jsx-runtime";
7
+ //#region src/components/common/done-button.tsx
8
+ var a = e(n)({
9
+ verticalAlign: "top",
10
+ width: "28px",
11
+ height: "28px",
12
+ color: "var(--editable-html-toolbar-check, #00bb00)",
13
+ padding: "4px"
14
+ }), o = ({ onClick: e, doneButtonRef: t }) => /* @__PURE__ */ i(a, {
15
+ "aria-label": "Done",
16
+ buttonRef: t,
17
+ onClick: e,
18
+ children: /* @__PURE__ */ i(r, {})
19
+ });
20
+ o.propTypes = {
21
+ onClick: t.func,
22
+ doneButtonRef: t.func
23
+ };
24
+ var s = o;
25
+ //#endregion
26
+ export { s as DoneButton, o as RawDoneButton };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/common/toolbar-buttons.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class RawButton extends React.Component {
12
+ static propTypes: {
13
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
14
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
15
+ active: PropTypes.Requireable<boolean>;
16
+ disabled: PropTypes.Requireable<boolean>;
17
+ extraStyles: PropTypes.Requireable<object>;
18
+ };
19
+ constructor(props: any);
20
+ onClick: any;
21
+ onKeyDown: any;
22
+ render(): React.JSX.Element;
23
+ }
24
+ export declare const Button: typeof RawButton;
25
+ export declare class RawMarkButton extends React.Component {
26
+ static propTypes: {
27
+ onToggle: PropTypes.Validator<(...args: any[]) => any>;
28
+ mark: PropTypes.Requireable<string>;
29
+ label: PropTypes.Validator<string>;
30
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
31
+ active: PropTypes.Requireable<boolean>;
32
+ };
33
+ constructor(props: any);
34
+ onToggle: any;
35
+ onKeyDown: any;
36
+ render(): React.JSX.Element;
37
+ }
38
+ export declare const MarkButton: typeof RawMarkButton;
@@ -0,0 +1,96 @@
1
+ import e from "react";
2
+ import { styled as t } from "@mui/material/styles";
3
+ import n from "prop-types";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import { color as i } from "@pie-lib/render-ui";
6
+ import a from "debug";
7
+ //#region src/components/common/toolbar-buttons.tsx
8
+ var o = t("button", { shouldForwardProp: (e) => ![
9
+ "active",
10
+ "disabled",
11
+ "extraStyles"
12
+ ].includes(e) })(({ active: e, disabled: t }) => ({
13
+ color: e ? i.text() : i.disabled(),
14
+ display: "inline-flex",
15
+ padding: "2px",
16
+ background: "none",
17
+ border: "none",
18
+ cursor: t ? "not-allowed" : "pointer",
19
+ "& svg": {
20
+ width: "24px",
21
+ height: "24px"
22
+ },
23
+ "&:hover": { color: t ? i.disabled() : i.text() },
24
+ "&:focus": { outline: `2px solid ${i.buttonFocusOutline()}` },
25
+ ...t && { opacity: .7 }
26
+ })), s = a("pie-elements:editable-html:raw-button");
27
+ (class extends e.Component {
28
+ static propTypes = {
29
+ onClick: n.func.isRequired,
30
+ children: n.oneOfType([n.arrayOf(n.node), n.node]).isRequired,
31
+ active: n.bool,
32
+ disabled: n.bool,
33
+ extraStyles: n.object
34
+ };
35
+ constructor(e) {
36
+ super(e);
37
+ }
38
+ onClick = (e) => {
39
+ s("[onClick]"), e.preventDefault();
40
+ let { onClick: t } = this.props;
41
+ t(e);
42
+ };
43
+ onKeyDown = (e) => {
44
+ if (e.key === "Enter" || e.key === " ") {
45
+ s("[onKeyDown]"), e.preventDefault();
46
+ let { onClick: t } = this.props;
47
+ t(e);
48
+ }
49
+ };
50
+ render() {
51
+ let { active: e, children: t, disabled: n, extraStyles: i, ariaLabel: a } = this.props;
52
+ return /* @__PURE__ */ r(o, {
53
+ style: i,
54
+ active: e,
55
+ disabled: n,
56
+ onMouseDown: this.onClick,
57
+ onKeyDown: this.onKeyDown,
58
+ "aria-label": a,
59
+ "aria-pressed": e,
60
+ tabIndex: 0,
61
+ children: t
62
+ });
63
+ }
64
+ });
65
+ var c = class extends e.Component {
66
+ static propTypes = {
67
+ onToggle: n.func.isRequired,
68
+ mark: n.string,
69
+ label: n.string.isRequired,
70
+ children: n.oneOfType([n.arrayOf(n.node), n.node]).isRequired,
71
+ active: n.bool
72
+ };
73
+ constructor(e) {
74
+ super(e);
75
+ }
76
+ onToggle = (e) => {
77
+ e.preventDefault(), this.props.onToggle(this.props.mark);
78
+ };
79
+ onKeyDown = (e) => {
80
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.props.onToggle(this.props.mark));
81
+ };
82
+ render() {
83
+ let { children: e, active: t, label: n } = this.props;
84
+ return /* @__PURE__ */ r(o, {
85
+ active: t,
86
+ onMouseDown: this.onToggle,
87
+ "aria-pressed": t,
88
+ onKeyDown: this.onKeyDown,
89
+ "aria-label": n,
90
+ tabIndex: 0,
91
+ children: e
92
+ });
93
+ }
94
+ }, l = c;
95
+ //#endregion
96
+ export { l as MarkButton, c as RawMarkButton };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/icons/CssIcon.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ declare const CssIcon: () => React.JSX.Element;
11
+ export default CssIcon;
@@ -0,0 +1,14 @@
1
+ import "react";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/icons/CssIcon.tsx
5
+ var n = e("div")(({ theme: e }) => ({
6
+ fontFamily: "Cerebri Sans, Arial, sans-serif",
7
+ fontSize: e.typography.fontSize,
8
+ fontWeight: "bold",
9
+ lineHeight: "14px",
10
+ position: "relative",
11
+ whiteSpace: "nowrap"
12
+ })), r = () => /* @__PURE__ */ t(n, { children: "CSS" });
13
+ //#endregion
14
+ export { r as default };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/icons/RespArea.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const Chevron: {
12
+ (props: any): React.JSX.Element;
13
+ propTypes: {
14
+ direction: PropTypes.Requireable<string>;
15
+ style: PropTypes.Requireable<object>;
16
+ };
17
+ };
18
+ export declare const GripIcon: {
19
+ ({ style }: {
20
+ style: any;
21
+ }): React.JSX.Element;
22
+ propTypes: {
23
+ style: PropTypes.Requireable<object>;
24
+ };
25
+ };
26
+ export declare const ToolbarIcon: () => React.JSX.Element;
@@ -0,0 +1,42 @@
1
+ import "react";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import t from "prop-types";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import i from "@mui/icons-material/ChevronRight";
6
+ import a from "@mui/icons-material/MoreVert";
7
+ //#region src/components/icons/RespArea.tsx
8
+ var o = (e) => {
9
+ switch (e) {
10
+ case "down": return 90;
11
+ case "up": return -90;
12
+ case "left": return 180;
13
+ default: return 0;
14
+ }
15
+ }, s = (e) => {
16
+ let { direction: t, style: r } = e;
17
+ return /* @__PURE__ */ n(i, { style: {
18
+ transform: `rotate(${o(t)}deg)`,
19
+ ...r
20
+ } });
21
+ };
22
+ s.propTypes = {
23
+ direction: t.string,
24
+ style: t.object
25
+ };
26
+ var c = ({ style: e }) => /* @__PURE__ */ r("span", {
27
+ style: e,
28
+ children: [/* @__PURE__ */ n(a, { style: { margin: "0 -16px" } }), /* @__PURE__ */ n(a, {})]
29
+ });
30
+ c.propTypes = { style: t.object }, e("div")(({ theme: e }) => ({
31
+ fontFamily: "Cerebri Sans !important",
32
+ fontSize: e.typography.fontSize,
33
+ fontWeight: "bold",
34
+ lineHeight: "14px",
35
+ position: "relative",
36
+ top: "7px",
37
+ width: "110px",
38
+ height: "28px",
39
+ whiteSpace: "nowrap"
40
+ }));
41
+ //#endregion
42
+ export { s as Chevron, c as GripIcon };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/icons/TableIcons.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ export declare const AddRow: (props: any) => React.JSX.Element;
11
+ export declare const RemoveRow: (props: any) => React.JSX.Element;
12
+ export declare const AddColumn: (props: any) => React.JSX.Element;
13
+ export declare const RemoveColumn: (props: any) => React.JSX.Element;
14
+ export declare const RemoveTable: (props: any) => React.JSX.Element;
@@ -0,0 +1,34 @@
1
+ import "react";
2
+ import { styled as e } from "@mui/material/styles";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/icons/TableIcons.tsx
5
+ var n = e("path")({
6
+ fill: "grey",
7
+ "&:hover": { fill: "black" }
8
+ }), r = (e) => (n) => /* @__PURE__ */ t("svg", {
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ version: "1.1",
11
+ width: "24",
12
+ height: "24",
13
+ viewBox: "0 0 24 24",
14
+ "aria-hidden": "true",
15
+ focusable: "false",
16
+ children: /* @__PURE__ */ t(e, { ...n })
17
+ }), i = r((e) => /* @__PURE__ */ t(n, {
18
+ ...e,
19
+ d: "M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z"
20
+ })), a = r((e) => /* @__PURE__ */ t(n, {
21
+ ...e,
22
+ d: "M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z"
23
+ })), o = r((e) => /* @__PURE__ */ t(n, {
24
+ ...e,
25
+ d: "M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z"
26
+ })), s = r((e) => /* @__PURE__ */ t(n, {
27
+ ...e,
28
+ d: "M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z"
29
+ })), c = r((e) => /* @__PURE__ */ t(n, {
30
+ ...e,
31
+ d: "M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z"
32
+ }));
33
+ //#endregion
34
+ export { o as AddColumn, i as AddRow, s as RemoveColumn, a as RemoveRow, c as RemoveTable };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/icons/TextAlign.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ export declare const AlignLeft: () => React.JSX.Element;
11
+ export declare const AlignRight: () => React.JSX.Element;
12
+ export declare const AlignCenter: () => React.JSX.Element;
13
+ export declare const AlignJustify: () => React.JSX.Element;
14
+ declare const _default: ({ editor, onChange }: {
15
+ editor: any;
16
+ onChange: any;
17
+ }) => React.JSX.Element;
18
+ export default _default;
@@ -0,0 +1,143 @@
1
+ import { useState as e } from "react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import r from "@mui/material/List";
4
+ import i from "@mui/material/ListItem";
5
+ import a from "@mui/material/Collapse";
6
+ //#region src/components/icons/TextAlign.tsx
7
+ var o = () => /* @__PURE__ */ t("svg", {
8
+ width: "20",
9
+ height: "20",
10
+ viewBox: "0 0 66 66",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ "aria-hidden": "true",
14
+ focusable: "false",
15
+ children: /* @__PURE__ */ t("path", {
16
+ d: "M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z",
17
+ fill: "currentColor"
18
+ })
19
+ }), s = () => /* @__PURE__ */ t("svg", {
20
+ width: "20",
21
+ height: "20",
22
+ viewBox: "0 0 66 66",
23
+ fill: "none",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ "aria-hidden": "true",
26
+ focusable: "false",
27
+ children: /* @__PURE__ */ t("path", {
28
+ d: "M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z",
29
+ fill: "currentColor"
30
+ })
31
+ }), c = () => /* @__PURE__ */ t("svg", {
32
+ width: "20",
33
+ height: "20",
34
+ viewBox: "0 0 66 66",
35
+ fill: "none",
36
+ xmlns: "http://www.w3.org/2000/svg",
37
+ "aria-hidden": "true",
38
+ focusable: "false",
39
+ children: /* @__PURE__ */ t("path", {
40
+ d: "M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z",
41
+ fill: "currentColor"
42
+ })
43
+ }), l = () => /* @__PURE__ */ t("svg", {
44
+ width: "20",
45
+ height: "20",
46
+ viewBox: "0 0 66 66",
47
+ fill: "none",
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ "aria-hidden": "true",
50
+ focusable: "false",
51
+ children: /* @__PURE__ */ t("path", {
52
+ d: "M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z",
53
+ fill: "currentColor"
54
+ })
55
+ }), u = ({ editor: u, onChange: d }) => {
56
+ let [f, p] = e(!1), m;
57
+ switch (!0) {
58
+ case u.isActive({ textAlign: "right" }):
59
+ m = /* @__PURE__ */ t(s, {});
60
+ break;
61
+ case u.isActive({ textAlign: "center" }):
62
+ m = /* @__PURE__ */ t(c, {});
63
+ break;
64
+ case u.isActive({ textAlign: "justify" }):
65
+ m = /* @__PURE__ */ t(l, {});
66
+ break;
67
+ default:
68
+ m = /* @__PURE__ */ t(o, {});
69
+ break;
70
+ }
71
+ let h = (e) => {
72
+ let t = e.currentTarget?.getAttribute("value");
73
+ t && u.commands.setTextAlign(t), p(!1);
74
+ };
75
+ return /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ n("div", {
76
+ style: {
77
+ display: "flex",
78
+ alignItems: "center"
79
+ },
80
+ onClick: (e) => {
81
+ e.preventDefault(), e.stopPropagation(), p(!f);
82
+ },
83
+ children: [m, /* @__PURE__ */ t("span", {
84
+ style: {
85
+ marginLeft: "5px",
86
+ fontSize: "8px"
87
+ },
88
+ "aria-hidden": "true",
89
+ children: "▼"
90
+ })]
91
+ }), /* @__PURE__ */ t(a, {
92
+ in: f,
93
+ timeout: "auto",
94
+ unmountOnExit: !0,
95
+ style: { position: "absolute" },
96
+ children: /* @__PURE__ */ n(r, {
97
+ component: "div",
98
+ disablePadding: !0,
99
+ style: {
100
+ background: "#fff",
101
+ display: "flex",
102
+ flexDirection: "row",
103
+ padding: 0
104
+ },
105
+ children: [
106
+ /* @__PURE__ */ t(i, {
107
+ button: !0,
108
+ type: "submit",
109
+ value: "left",
110
+ "aria-label": "Align text left",
111
+ onClick: h,
112
+ children: /* @__PURE__ */ t(o, {})
113
+ }),
114
+ /* @__PURE__ */ t(i, {
115
+ button: !0,
116
+ type: "submit",
117
+ value: "center",
118
+ "aria-label": "Align text center",
119
+ onClick: h,
120
+ children: /* @__PURE__ */ t(c, {})
121
+ }),
122
+ /* @__PURE__ */ t(i, {
123
+ button: !0,
124
+ type: "submit",
125
+ value: "right",
126
+ "aria-label": "Align text right",
127
+ onClick: h,
128
+ children: /* @__PURE__ */ t(s, {})
129
+ }),
130
+ /* @__PURE__ */ t(i, {
131
+ button: !0,
132
+ type: "submit",
133
+ value: "justify",
134
+ "aria-label": "Justify text",
135
+ onClick: h,
136
+ children: /* @__PURE__ */ t(l, {})
137
+ })
138
+ ]
139
+ })
140
+ })] });
141
+ };
142
+ //#endregion
143
+ export { c as AlignCenter, l as AlignJustify, o as AlignLeft, s as AlignRight, u as default };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/image/AltDialog.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class AltDialog extends React.Component {
12
+ static propTypes: {
13
+ onDone: PropTypes.Validator<(...args: any[]) => any>;
14
+ alt: PropTypes.Requireable<string>;
15
+ };
16
+ constructor(props: any);
17
+ closeDialog: any;
18
+ onDone: any;
19
+ handleOverflow: any;
20
+ render(): React.JSX.Element;
21
+ }
22
+ export default AltDialog;
@@ -0,0 +1,61 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import i from "@mui/material/DialogContent";
5
+ import a from "@mui/icons-material/ArrowBackIos";
6
+ import o from "@mui/material/TextField";
7
+ import s from "@mui/material/DialogActions";
8
+ import c from "@mui/material/Button";
9
+ import l from "@mui/material/Dialog";
10
+ //#region src/components/image/AltDialog.tsx
11
+ var u = class extends e.Component {
12
+ static propTypes = {
13
+ onDone: t.func.isRequired,
14
+ alt: t.string
15
+ };
16
+ constructor(e) {
17
+ super(e);
18
+ let { alt: t } = e;
19
+ this.state = { value: t };
20
+ }
21
+ closeDialog = () => {
22
+ document.querySelectorAll("#text-dialog").forEach(function(e) {
23
+ return e.remove();
24
+ });
25
+ };
26
+ onDone = () => {
27
+ let { onDone: e } = this.props, { value: t } = this.state;
28
+ e(t), this.closeDialog();
29
+ };
30
+ handleOverflow = () => {
31
+ document.body.style.removeProperty("overflow");
32
+ };
33
+ render() {
34
+ let { value: e } = this.state;
35
+ return /* @__PURE__ */ r(l, {
36
+ open: !0,
37
+ disablePortal: !0,
38
+ onClose: this.closeDialog,
39
+ id: "text-dialog",
40
+ hideBackdrop: !0,
41
+ disableScrollLock: !0,
42
+ onEntered: this.handleOverflow,
43
+ children: [/* @__PURE__ */ n(i, { children: /* @__PURE__ */ r("div", {
44
+ style: { display: "flex" },
45
+ children: [/* @__PURE__ */ n(a, { style: { paddingTop: "6px" } }), /* @__PURE__ */ n(o, {
46
+ multiline: !0,
47
+ placeholder: "Enter an Alt Text description of this image",
48
+ helperText: "Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.",
49
+ value: e,
50
+ onChange: (e) => this.setState({ value: e.target.value }),
51
+ FormHelperTextProps: { style: { fontSize: 14 } }
52
+ })]
53
+ }) }), /* @__PURE__ */ n(s, { children: /* @__PURE__ */ n(c, {
54
+ onClick: this.onDone,
55
+ children: "Done"
56
+ }) })]
57
+ });
58
+ }
59
+ };
60
+ //#endregion
61
+ export { u as AltDialog, u as default };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/image/ImageToolbar.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import PropTypes from 'prop-types';
10
+ import React from 'react';
11
+ export declare class ImageToolbar extends React.Component {
12
+ static propTypes: {
13
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
14
+ alignment: PropTypes.Requireable<string>;
15
+ alt: PropTypes.Requireable<string>;
16
+ imageLoaded: PropTypes.Requireable<boolean>;
17
+ disableImageAlignmentButtons: PropTypes.Requireable<boolean>;
18
+ };
19
+ onAltTextDone: any;
20
+ onAlignmentClick: any;
21
+ renderDialog: any;
22
+ render(): React.JSX.Element;
23
+ }
24
+ export default ImageToolbar;