@pie-element/extended-text-entry 15.1.2-next.0 → 15.1.2-next.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.
Files changed (148) hide show
  1. package/dist/author/index.d.ts +1 -0
  2. package/dist/author/index.js +5 -2
  3. package/dist/author/main.js +38 -38
  4. package/dist/browser/author/index.js +2208 -90
  5. package/dist/browser/author/index.js.map +1 -1
  6. package/dist/browser/browser-kkT1XVKw.js +13 -4
  7. package/dist/browser/browser-kkT1XVKw.js.map +1 -1
  8. package/dist/browser/controller/index.js +2 -2
  9. package/dist/browser/controller/index.js.map +1 -1
  10. package/dist/browser/delivery/index.js +3 -3
  11. package/dist/browser/delivery/index.js.map +1 -1
  12. package/dist/browser/{dist-D8VooYkz.js → dist-BefNeqwZ.js} +40001 -40474
  13. package/dist/browser/dist-BefNeqwZ.js.map +1 -0
  14. package/dist/browser/{main-C2oHx_V9.js → main-1U6_tsVt.js} +61 -60
  15. package/dist/browser/main-1U6_tsVt.js.map +1 -0
  16. package/dist/browser/print/index.js +13 -18
  17. package/dist/browser/print/index.js.map +1 -1
  18. package/dist/controller/index.js +2 -2
  19. package/dist/delivery/annotation/annotation-menu.js +30 -29
  20. package/dist/delivery/annotation/freeform-editor.js +36 -35
  21. package/dist/delivery/index.js +2 -2
  22. package/dist/delivery/main.d.ts +2 -2
  23. package/dist/delivery/main.js +21 -20
  24. package/dist/index.iife.js +107 -103
  25. package/dist/print/index.js +9 -10
  26. package/dist/runtime-support.d.ts +12 -0
  27. package/dist/runtime-support.js +12 -0
  28. package/module/extended-text-entry.css +2 -0
  29. package/module/print.js +55382 -0
  30. package/module/print.js.map +1 -0
  31. package/package.json +26 -10
  32. package/print.js +2 -0
  33. package/dist/browser/dist-D8VooYkz.js.map +0 -1
  34. package/dist/browser/main-C2oHx_V9.js.map +0 -1
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
@@ -1,10 +1,11 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
3
  import { styled as n } from "@mui/material/styles";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Popover as a } from "@mui/material";
4
+ import { color as r } from "@pie-lib/render-ui";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Popover as o } from "@mui/material";
6
7
  //#region src/delivery/annotation/annotation-menu.tsx
7
- var o = n(a)({ "& .MuiPaper-root": {
8
+ var s = n(o)({ "& .MuiPaper-root": {
8
9
  overflowX: "unset",
9
10
  overflowY: "unset",
10
11
  marginTop: "-16px",
@@ -17,39 +18,39 @@ var o = n(a)({ "& .MuiPaper-root": {
17
18
  width: 0,
18
19
  pointerEvents: "none",
19
20
  borderWidth: "7px",
20
- borderTopColor: "black"
21
+ borderTopColor: r.border()
21
22
  }
22
- } }), s = n("div")(({ theme: e }) => ({
23
+ } }), c = n("div")(() => ({
23
24
  width: "300px",
24
25
  overflow: "hidden",
25
26
  borderRadius: "4px",
26
- backgroundColor: e.palette.common.white,
27
- border: `2px solid ${e.palette.grey[100]}`
28
- })), c = n("div")({
27
+ backgroundColor: r.white(),
28
+ border: `2px solid ${r.border()}`
29
+ })), l = n("div")({
29
30
  display: "flex",
30
31
  flexWrap: "wrap"
31
- }), l = n("div")(({ theme: e }) => ({
32
+ }), u = n("div")(() => ({
32
33
  display: "flex",
33
34
  flexWrap: "wrap",
34
- borderTop: `2px solid ${e.palette.grey[100]}`
35
- })), u = n("div")(({ theme: e, variant: t }) => ({
35
+ borderTop: `2px solid ${r.border()}`
36
+ })), d = n("div")(({ variant: e }) => ({
36
37
  width: "22%",
37
38
  textAlign: "center",
38
39
  padding: "4px",
39
40
  cursor: "pointer",
40
- borderBottom: `1px solid ${e.palette.grey[100]}`,
41
- "&:not(:nth-child(4n))": { borderRight: `1px solid ${e.palette.grey[100]}` },
41
+ borderBottom: `1px solid ${r.border()}`,
42
+ "&:not(:nth-child(4n))": { borderRight: `1px solid ${r.border()}` },
42
43
  "&:nth-child(4n)": { flexGrow: 1 },
43
- "&:hover": { backgroundColor: e.palette.grey[100] },
44
- ...t === "positive" && {
44
+ "&:hover": { backgroundColor: r.backgroundDark() },
45
+ ...e === "positive" && {
45
46
  backgroundColor: "rgb(153, 255, 153) !important",
46
47
  "&:hover": { filter: "brightness(85%)" }
47
48
  },
48
- ...t === "negative" && {
49
+ ...e === "negative" && {
49
50
  backgroundColor: "rgb(255, 204, 238) !important",
50
51
  "&:hover": { filter: "brightness(85%)" }
51
52
  }
52
- })), d = class extends e.Component {
53
+ })), f = class extends e.Component {
53
54
  static propTypes = {
54
55
  anchorEl: t.object,
55
56
  open: t.bool,
@@ -62,8 +63,8 @@ var o = n(a)({ "& .MuiPaper-root": {
62
63
  onAnnotate: t.func
63
64
  };
64
65
  render() {
65
- let { anchorEl: t, annotations: n, isNewAnnotation: a, onAnnotate: d, onClose: f, onEdit: p, onDelete: m, onWrite: h, open: g } = this.props;
66
- return /* @__PURE__ */ r(o, {
66
+ let { anchorEl: t, annotations: n, isNewAnnotation: r, onAnnotate: o, onClose: f, onEdit: p, onDelete: m, onWrite: h, open: g } = this.props;
67
+ return /* @__PURE__ */ i(s, {
67
68
  anchorEl: t,
68
69
  open: g,
69
70
  onClose: f,
@@ -80,28 +81,28 @@ var o = n(a)({ "& .MuiPaper-root": {
80
81
  vertical: "bottom",
81
82
  horizontal: "center"
82
83
  },
83
- children: /* @__PURE__ */ i(s, { children: [/* @__PURE__ */ r(c, { children: n.map((e, t) => /* @__PURE__ */ r(u, {
84
+ children: /* @__PURE__ */ a(c, { children: [/* @__PURE__ */ i(l, { children: n.map((e, t) => /* @__PURE__ */ i(d, {
84
85
  variant: e.type,
85
- onClick: () => d(e),
86
+ onClick: () => o(e),
86
87
  children: e.label
87
- }, `annotation-${t}`)) }), /* @__PURE__ */ i(l, { children: [
88
- /* @__PURE__ */ r(u, {
88
+ }, `annotation-${t}`)) }), /* @__PURE__ */ a(u, { children: [
89
+ /* @__PURE__ */ i(d, {
89
90
  onClick: f,
90
91
  children: "Cancel"
91
92
  }),
92
- /* @__PURE__ */ r(u, { style: { pointerEvents: "none" } }),
93
- a ? /* @__PURE__ */ i(e.Fragment, { children: [/* @__PURE__ */ r(u, {
93
+ /* @__PURE__ */ i(d, { style: { pointerEvents: "none" } }),
94
+ r ? /* @__PURE__ */ a(e.Fragment, { children: [/* @__PURE__ */ i(d, {
94
95
  variant: "positive",
95
96
  onClick: () => h("positive"),
96
97
  children: "Write"
97
- }), /* @__PURE__ */ r(u, {
98
+ }), /* @__PURE__ */ i(d, {
98
99
  variant: "negative",
99
100
  onClick: () => h("negative"),
100
101
  children: "Write"
101
- })] }) : /* @__PURE__ */ i(e.Fragment, { children: [/* @__PURE__ */ r(u, {
102
+ })] }) : /* @__PURE__ */ a(e.Fragment, { children: [/* @__PURE__ */ i(d, {
102
103
  onClick: m,
103
104
  children: "Delete"
104
- }), /* @__PURE__ */ r(u, {
105
+ }), /* @__PURE__ */ i(d, {
105
106
  onClick: p,
106
107
  children: "Edit"
107
108
  })] })
@@ -110,4 +111,4 @@ var o = n(a)({ "& .MuiPaper-root": {
110
111
  }
111
112
  };
112
113
  //#endregion
113
- export { d as default };
114
+ export { f as default };
@@ -1,10 +1,11 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
3
  import { styled as n } from "@mui/material/styles";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Popover as a, TextField as o } from "@mui/material";
4
+ import { color as r } from "@pie-lib/render-ui";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Popover as o, TextField as s } from "@mui/material";
6
7
  //#region src/delivery/annotation/freeform-editor.tsx
7
- var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
8
+ var c = n(o)(({ annotationType: e }) => ({ "& .MuiPaper-root": {
8
9
  overflowX: "unset",
9
10
  overflowY: "unset",
10
11
  marginLeft: "16px",
@@ -18,41 +19,41 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
18
19
  width: 0,
19
20
  pointerEvents: "none",
20
21
  borderWidth: "7px",
21
- borderRightColor: e.palette.grey[100]
22
+ borderRightColor: r.border()
22
23
  },
23
- ...t === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
24
- ...t === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
25
- } })), c = n("div")(({ theme: e, annotationType: t }) => ({
24
+ ...e === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
25
+ ...e === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
26
+ } })), l = n("div")(({ annotationType: e }) => ({
26
27
  width: "200px",
27
28
  overflow: "hidden",
28
29
  borderRadius: "4px",
29
- backgroundColor: "#ffffff",
30
- border: `4px solid ${e.palette.grey[100]}`,
31
- ...t === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
32
- ...t === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
33
- })), l = n("div")(({ theme: e }) => ({
30
+ backgroundColor: r.white(),
31
+ border: `4px solid ${r.border()}`,
32
+ ...e === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
33
+ ...e === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
34
+ })), u = n("div")(() => ({
34
35
  display: "flex",
35
36
  flexWrap: "wrap",
36
- borderTop: `2px solid ${e.palette.grey[100]}`
37
- })), u = n("div")(({ theme: e, variant: t, annotationType: n }) => ({
37
+ borderTop: `2px solid ${r.border()}`
38
+ })), d = n("div")(({ variant: e, annotationType: t }) => ({
38
39
  flexGrow: 1,
39
40
  width: "28%",
40
41
  textAlign: "center",
41
42
  padding: "4px",
42
43
  cursor: "pointer",
43
- "&:not(:nth-child(3n))": { borderRight: `1px solid ${e.palette.grey[100]}` },
44
- "&:hover": { backgroundColor: e.palette.grey[100] },
45
- ...t === "positive" && {
44
+ "&:not(:nth-child(3n))": { borderRight: `1px solid ${r.border()}` },
45
+ "&:hover": { backgroundColor: r.backgroundDark() },
46
+ ...e === "positive" && {
46
47
  backgroundColor: "rgb(153, 255, 153) !important",
47
48
  "&:hover": { filter: "brightness(85%)" }
48
49
  },
49
- ...t === "negative" && {
50
+ ...e === "negative" && {
50
51
  backgroundColor: "rgb(255, 204, 238) !important",
51
52
  "&:hover": { filter: "brightness(85%)" }
52
53
  },
53
- ...t === "typeChange" && n === "negative" && { "&:hover": { backgroundColor: "rgb(153, 255, 153) !important" } },
54
- ...t === "typeChange" && n === "positive" && { "&:hover": { backgroundColor: "rgb(255, 204, 238) !important" } }
55
- })), d = class extends e.Component {
54
+ ...e === "typeChange" && t === "negative" && { "&:hover": { backgroundColor: "rgb(153, 255, 153) !important" } },
55
+ ...e === "typeChange" && t === "positive" && { "&:hover": { backgroundColor: "rgb(255, 204, 238) !important" } }
56
+ })), f = class extends e.Component {
56
57
  static propTypes = {
57
58
  anchorEl: t.object,
58
59
  open: t.bool,
@@ -81,13 +82,13 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
81
82
  n === "" ? t() : e(n), this.setState({ value: "" });
82
83
  };
83
84
  render() {
84
- let { anchorEl: e, offset: t, onDelete: n, open: a, type: d } = this.props, { value: f } = this.state;
85
- return /* @__PURE__ */ r(s, {
85
+ let { anchorEl: e, offset: t, onDelete: n, open: r, type: o } = this.props, { value: f } = this.state;
86
+ return /* @__PURE__ */ i(c, {
86
87
  anchorEl: e,
87
88
  elevation: 2,
88
- open: a,
89
+ open: r,
89
90
  onClose: this.handleSave,
90
- annotationType: d,
91
+ annotationType: o,
91
92
  style: {
92
93
  marginTop: `${t}px`,
93
94
  transition: "margin-top 2s ease-out"
@@ -104,9 +105,9 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
104
105
  vertical: "top",
105
106
  horizontal: "left"
106
107
  },
107
- children: /* @__PURE__ */ i(c, {
108
- annotationType: d,
109
- children: [/* @__PURE__ */ r(o, {
108
+ children: /* @__PURE__ */ a(l, {
109
+ annotationType: o,
110
+ children: [/* @__PURE__ */ i(s, {
110
111
  id: "annotation-editor",
111
112
  style: {
112
113
  padding: "2px 5px",
@@ -119,18 +120,18 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
119
120
  value: f,
120
121
  onChange: this.onValueChange,
121
122
  InputProps: { disableUnderline: !0 }
122
- }), /* @__PURE__ */ i(l, { children: [
123
- /* @__PURE__ */ r(u, {
123
+ }), /* @__PURE__ */ a(u, { children: [
124
+ /* @__PURE__ */ i(d, {
124
125
  onClick: n,
125
126
  children: "Delete"
126
127
  }),
127
- /* @__PURE__ */ r(u, {
128
+ /* @__PURE__ */ i(d, {
128
129
  variant: "typeChange",
129
- annotationType: d,
130
+ annotationType: o,
130
131
  onClick: this.handleTypeChange,
131
- children: d === "negative" ? "Green" : "Pink"
132
+ children: o === "negative" ? "Green" : "Pink"
132
133
  }),
133
- /* @__PURE__ */ r(u, {
134
+ /* @__PURE__ */ i(d, {
134
135
  onClick: this.handleSave,
135
136
  children: "Save"
136
137
  })
@@ -140,4 +141,4 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
140
141
  }
141
142
  };
142
143
  //#endregion
143
- export { d as default };
144
+ export { f as default };
@@ -1,4 +1,4 @@
1
- import e from "./main.js";
1
+ import { Main as e } from "./main.js";
2
2
  import t from "react";
3
3
  import n from "debug";
4
4
  import { createRoot as r } from "react-dom/client";
@@ -61,7 +61,7 @@ var d = class extends HTMLElement {
61
61
  }
62
62
  }
63
63
  disconnectedCallback() {
64
- this._root && this._root.unmount();
64
+ this._root &&= (this._root.unmount(), null);
65
65
  }
66
66
  };
67
67
  //#endregion
@@ -20,8 +20,8 @@ export declare class Main extends React.Component {
20
20
  comment: PropTypes.Requireable<string>;
21
21
  }>>>;
22
22
  };
23
- changeSessionValue: any;
24
- changeSessionComment: any;
23
+ changeSessionValue: import("@pie-element/shared-lodash").CancelableFunction<any>;
24
+ changeSessionComment: import("@pie-element/shared-lodash").CancelableFunction<any>;
25
25
  render(): React.JSX.Element;
26
26
  }
27
27
  export default Main;
@@ -1,7 +1,7 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js";
2
- import t from "./annotation/annotation-editor.js";
3
- import n from "react";
4
- import r from "prop-types";
1
+ import e from "./annotation/annotation-editor.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { debounce as r } from "@pie-element/shared-lodash";
5
5
  import i from "debug";
6
6
  import a from "@mui/material/Typography";
7
7
  import { styled as o } from "@mui/material/styles";
@@ -23,7 +23,8 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
23
23
  width: "100%",
24
24
  color: p.text(),
25
25
  marginBottom: e.spacing(2),
26
- fontSize: "inherit"
26
+ fontSize: "inherit",
27
+ display: "block"
27
28
  })), O = o("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), k = o(s)(({ theme: e }) => ({
28
29
  marginBottom: e.spacing(2),
29
30
  borderRadius: "4px"
@@ -34,22 +35,22 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
34
35
  width: "1px",
35
36
  height: "1px",
36
37
  overflow: "hidden"
37
- }), j = class extends n.Component {
38
+ }), j = class extends t.Component {
38
39
  static propTypes = {
39
- onValueChange: r.func.isRequired,
40
- onAnnotationsChange: r.func.isRequired,
41
- onCommentChange: r.func.isRequired,
42
- model: r.object,
43
- session: r.shape({
44
- value: r.string,
45
- annotations: r.array,
46
- comment: r.string
40
+ onValueChange: n.func.isRequired,
41
+ onAnnotationsChange: n.func.isRequired,
42
+ onCommentChange: n.func.isRequired,
43
+ model: n.object,
44
+ session: n.shape({
45
+ value: n.string,
46
+ annotations: n.array,
47
+ comment: n.string
47
48
  }).isRequired
48
49
  };
49
- changeSessionValue = e(this.props.onValueChange, 1500);
50
- changeSessionComment = e(this.props.onCommentChange, 1500);
50
+ changeSessionValue = r(this.props.onValueChange, 1500);
51
+ changeSessionComment = r(this.props.onCommentChange, 1500);
51
52
  render() {
52
- let { model: e, session: n, onAnnotationsChange: r } = this.props, { animationsDisabled: i, annotatorMode: a, customKeys: o, dimensions: s, disabled: c, disabledAnnotator: l, equationEditor: u, extraCSSRules: d, feedback: f, mathInput: p, playersToolbarPosition: g, predefinedAnnotations: _, prompt: v, spanishInput: S, specialInput: C, spellCheckEnabled: w, teacherInstructions: j } = e, { annotations: M, comment: N, value: P } = n, { width: F, height: I } = s || {}, L = "40vh", R = { position: g === "top" ? "top" : "bottom" };
53
+ let { model: t, session: n, onAnnotationsChange: r } = this.props, { animationsDisabled: i, annotatorMode: a, customKeys: o, dimensions: s, disabled: c, disabledAnnotator: l, equationEditor: u, extraCSSRules: d, feedback: f, mathInput: p, playersToolbarPosition: g, predefinedAnnotations: _, prompt: v, spanishInput: S, specialInput: C, spellCheckEnabled: w, teacherInstructions: j } = t, { annotations: M, comment: N, value: P } = n, { width: F, height: I } = s || {}, L = "40vh", R = { position: g === "top" ? "top" : "bottom" };
53
54
  T("[render] disabled? ", c);
54
55
  let z = /* @__PURE__ */ m(y, {
55
56
  defaultClassName: "teacher-instructions",
@@ -73,10 +74,10 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
73
74
  component: "span",
74
75
  children: /* @__PURE__ */ m(y, {
75
76
  defaultClassName: "prompt",
76
- prompt: e.prompt
77
+ prompt: t.prompt
77
78
  })
78
79
  }),
79
- a ? /* @__PURE__ */ m(t, {
80
+ a ? /* @__PURE__ */ m(e, {
80
81
  text: P || "",
81
82
  annotations: M || [],
82
83
  comment: N || "",
@@ -131,4 +132,4 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
131
132
  }
132
133
  };
133
134
  //#endregion
134
- export { j as default };
135
+ export { j as Main, j as default };