@pie-element/extended-text-entry 15.1.2-next.2 → 15.1.2-next.21

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 (49) hide show
  1. package/author.js +2 -0
  2. package/dist/author/index.d.ts +1 -0
  3. package/dist/author/index.js +5 -2
  4. package/dist/author/main.js +38 -38
  5. package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
  6. package/dist/browser/author/index.js +2208 -90
  7. package/dist/browser/author/index.js.map +1 -1
  8. package/dist/browser/browser-kkT1XVKw.js.map +1 -1
  9. package/dist/browser/controller/index.js +2 -2
  10. package/dist/browser/controller/index.js.map +1 -1
  11. package/dist/browser/delivery/index.js +72 -18
  12. package/dist/browser/delivery/index.js.map +1 -1
  13. package/dist/browser/dist-CE2hC-lR.js +41129 -0
  14. package/dist/browser/dist-CE2hC-lR.js.map +1 -0
  15. package/dist/browser/editor-runtime/assets/Symbola-4c507403.woff2 +0 -0
  16. package/dist/browser/editor-runtime/author/index.js +2613 -0
  17. package/dist/browser/editor-runtime/author/index.js.map +1 -0
  18. package/dist/browser/editor-runtime/browser-jJGxjKdp.js +219 -0
  19. package/dist/browser/editor-runtime/browser-jJGxjKdp.js.map +1 -0
  20. package/dist/browser/editor-runtime/controller/index.js +184 -0
  21. package/dist/browser/editor-runtime/controller/index.js.map +1 -0
  22. package/dist/browser/editor-runtime/delivery/index.js +152 -0
  23. package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
  24. package/dist/browser/editor-runtime/dist-CPLFGjwV.js +24743 -0
  25. package/dist/browser/editor-runtime/dist-CPLFGjwV.js.map +1 -0
  26. package/dist/browser/editor-runtime/main-Csga0XaB.js +713 -0
  27. package/dist/browser/editor-runtime/main-Csga0XaB.js.map +1 -0
  28. package/dist/browser/editor-runtime/print/index.js +48 -0
  29. package/dist/browser/editor-runtime/print/index.js.map +1 -0
  30. package/dist/browser/{main-VcQEFn-b.js → main-D36K4CTv.js} +199 -200
  31. package/dist/browser/main-D36K4CTv.js.map +1 -0
  32. package/dist/browser/print/index.js +7 -7
  33. package/dist/browser/print/index.js.map +1 -1
  34. package/dist/controller/index.js +2 -2
  35. package/dist/delivery/annotation/annotation-menu.js +30 -29
  36. package/dist/delivery/annotation/freeform-editor.js +36 -35
  37. package/dist/delivery/index.js +18 -14
  38. package/dist/delivery/main.d.ts +0 -2
  39. package/dist/delivery/main.js +59 -61
  40. package/dist/index.iife.js +100 -136
  41. package/dist/print/index.js +14 -14
  42. package/module/assets/Symbola-4c507403.woff2 +0 -0
  43. package/{dist/browser/dist-BCJzhghM.js → module/print.js} +45276 -45210
  44. package/module/print.js.map +1 -0
  45. package/package.json +44 -23
  46. package/print.js +2 -0
  47. package/dist/browser/dist-BCJzhghM.js.map +0 -1
  48. package/dist/browser/extended-text-entry.css +0 -2
  49. package/dist/browser/main-VcQEFn-b.js.map +0 -1
@@ -1,40 +1,40 @@
1
1
  import e from "./annotation/annotation-editor.js";
2
2
  import t from "react";
3
3
  import n from "prop-types";
4
- import { debounce as r } from "@pie-element/shared-lodash";
5
- import i from "debug";
6
- import a from "@mui/material/Typography";
7
- import { styled as o } from "@mui/material/styles";
8
- import s from "@pie-lib/editable-html-tip-tap";
9
- import * as c from "@pie-lib/render-ui";
10
- import { Collapsible as l, Feedback as u, PreviewPrompt as d, UiLayout as f, color as p } from "@pie-lib/render-ui";
11
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
4
+ import r from "debug";
5
+ import i from "@mui/material/Typography";
6
+ import { styled as a } from "@mui/material/styles";
7
+ import o from "@pie-lib/editable-html-tip-tap";
8
+ import * as s from "@pie-lib/render-ui";
9
+ import { Collapsible as c, Feedback as l, PreviewPrompt as u, UiLayout as d, color as f } from "@pie-lib/render-ui";
10
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
11
  //#region src/delivery/main.tsx
13
- function g(e) {
12
+ function h(e) {
14
13
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
15
14
  }
16
- function _(e, t) {
17
- return !e || g(e) ? e : g(e.default) ? e.default : t && g(e[t]) ? e[t] : t && g(e[t]?.default) ? e[t].default : e;
15
+ function g(e, t) {
16
+ return !e || h(e) ? e : h(e.default) ? e.default : t && h(e[t]) ? e[t] : t && h(e[t]?.default) ? e[t].default : e;
18
17
  }
19
- var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt") || _(w.PreviewPrompt, "PreviewPrompt"), b = _(l, "Collapsible") || _(w.Collapsible, "Collapsible"), x = _(u, "Feedback") || _(w.Feedback, "Feedback"), S = c, C = S.default, w = C && typeof C == "object" ? C : S, T = i("@pie-ui:extended-text-entry"), E = o(v)({
20
- backgroundColor: p.background(),
21
- color: p.text()
22
- }), D = o(a)(({ theme: e }) => ({
18
+ var _ = g(d, "UiLayout") || g(C.UiLayout, "UiLayout"), v = g(u, "PreviewPrompt") || g(C.PreviewPrompt, "PreviewPrompt"), y = g(c, "Collapsible") || g(C.Collapsible, "Collapsible"), b = g(l, "Feedback") || g(C.Feedback, "Feedback"), x = s, S = x.default, C = S && typeof S == "object" ? S : x, w = r("@pie-ui:extended-text-entry"), T = a(_)({
19
+ backgroundColor: f.background(),
20
+ color: f.text()
21
+ }), E = a(i)(({ theme: e }) => ({
23
22
  width: "100%",
24
- color: p.text(),
23
+ color: f.text(),
25
24
  marginBottom: e.spacing(2),
26
- fontSize: "inherit"
27
- })), O = o("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), k = o(s)(({ theme: e }) => ({
25
+ fontSize: "inherit",
26
+ display: "block"
27
+ })), D = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), O = a(o)(({ theme: e }) => ({
28
28
  marginBottom: e.spacing(2),
29
29
  borderRadius: "4px"
30
- })), A = o("h2")({
30
+ })), k = a("h2")({
31
31
  position: "absolute",
32
32
  left: "-10000px",
33
33
  top: "auto",
34
34
  width: "1px",
35
35
  height: "1px",
36
36
  overflow: "hidden"
37
- }), j = class extends t.Component {
37
+ }), A = class extends t.Component {
38
38
  static propTypes = {
39
39
  onValueChange: n.func.isRequired,
40
40
  onAnnotationsChange: n.func.isRequired,
@@ -46,67 +46,65 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
46
46
  comment: n.string
47
47
  }).isRequired
48
48
  };
49
- changeSessionValue = r(this.props.onValueChange, 1500);
50
- changeSessionComment = r(this.props.onCommentChange, 1500);
51
49
  render() {
52
- 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
- T("[render] disabled? ", c);
54
- let z = /* @__PURE__ */ m(y, {
50
+ let { model: t, session: n, onAnnotationsChange: r, onCommentChange: i, onValueChange: a } = this.props, { animationsDisabled: o, annotatorMode: s, customKeys: c, dimensions: l, disabled: u, disabledAnnotator: d, equationEditor: f, extraCSSRules: h, feedback: g, mathInput: _, playersToolbarPosition: x, predefinedAnnotations: S, prompt: C, spanishInput: A, specialInput: j, spellCheckEnabled: M, teacherInstructions: N } = t, { annotations: P, comment: F, value: I } = n, { width: L, height: R } = l || {}, z = "40vh", B = { position: x === "top" ? "top" : "bottom" };
51
+ w("[render] disabled? ", u);
52
+ let V = /* @__PURE__ */ p(v, {
55
53
  defaultClassName: "teacher-instructions",
56
- prompt: j
57
- }), B = [];
58
- return S && B.push({ language: "spanish" }), C && B.push({ language: "special" }), /* @__PURE__ */ h(E, {
59
- extraCSSRules: d,
54
+ prompt: N
55
+ }), H = [];
56
+ return A && H.push({ language: "spanish" }), j && H.push({ language: "special" }), /* @__PURE__ */ m(T, {
57
+ extraCSSRules: h,
60
58
  ref: (e) => {
61
59
  this.containerRef = e;
62
60
  },
63
61
  children: [
64
- /* @__PURE__ */ m(A, { children: "Constructed Response Question" }),
65
- j && /* @__PURE__ */ m(O, { children: i ? z : /* @__PURE__ */ m(b, {
62
+ /* @__PURE__ */ p(k, { children: "Constructed Response Question" }),
63
+ N && /* @__PURE__ */ p(D, { children: o ? V : /* @__PURE__ */ p(y, {
66
64
  labels: {
67
65
  hidden: "Show Teacher Instructions",
68
66
  visible: "Hide Teacher Instructions"
69
67
  },
70
- children: z
68
+ children: V
71
69
  }) }),
72
- v && /* @__PURE__ */ m(D, {
70
+ C && /* @__PURE__ */ p(E, {
73
71
  component: "span",
74
- children: /* @__PURE__ */ m(y, {
72
+ children: /* @__PURE__ */ p(v, {
75
73
  defaultClassName: "prompt",
76
74
  prompt: t.prompt
77
75
  })
78
76
  }),
79
- a ? /* @__PURE__ */ m(e, {
80
- text: P || "",
81
- annotations: M || [],
82
- comment: N || "",
83
- predefinedAnnotations: _ || [],
77
+ s ? /* @__PURE__ */ p(e, {
78
+ text: I || "",
79
+ annotations: P || [],
80
+ comment: F || "",
81
+ predefinedAnnotations: S || [],
84
82
  onChange: r,
85
- onCommentChange: this.changeSessionComment,
86
- width: F,
87
- height: I,
88
- maxHeight: L,
89
- disabled: l,
90
- disabledMath: !p,
91
- customKeys: o,
92
- keypadMode: u
93
- }) : /* @__PURE__ */ m(k, {
83
+ onCommentChange: i,
84
+ width: L,
85
+ height: R,
86
+ maxHeight: z,
87
+ disabled: d,
88
+ disabledMath: !_,
89
+ customKeys: c,
90
+ keypadMode: f
91
+ }) : /* @__PURE__ */ p(O, {
94
92
  className: "response-area-editor",
95
- onChange: this.changeSessionValue,
96
- markup: P || "",
97
- maxWidth: F && F.toString(),
93
+ onChange: a,
94
+ markup: I || "",
95
+ maxWidth: L && L.toString(),
98
96
  minWidth: "100px",
99
- minHeight: I && I.toString(),
100
- maxHeight: L,
101
- disabled: c,
97
+ minHeight: R && R.toString(),
98
+ maxHeight: z,
99
+ disabled: u,
102
100
  highlightShape: !0,
103
- toolbarOpts: R,
104
- spellCheck: w,
101
+ toolbarOpts: B,
102
+ spellCheck: M,
105
103
  charactersLimit: 5e4,
106
104
  autoWidthToolbar: !0,
107
105
  pluginProps: {
108
106
  math: {
109
- disabled: !p,
107
+ disabled: !_,
110
108
  customKeys: this.props.model.customKeys,
111
109
  keypadMode: this.props.model.equationEditor,
112
110
  controlledKeypadMode: !1
@@ -120,15 +118,15 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
120
118
  ul_list: { disabled: !0 },
121
119
  ol_list: { disabled: !0 }
122
120
  },
123
- languageCharactersProps: B
121
+ languageCharactersProps: H
124
122
  }),
125
- f && /* @__PURE__ */ m(x, {
123
+ g && /* @__PURE__ */ p(b, {
126
124
  correctness: "correct",
127
- feedback: f
125
+ feedback: g
128
126
  })
129
127
  ]
130
128
  });
131
129
  }
132
130
  };
133
131
  //#endregion
134
- export { j as default };
132
+ export { A as Main, A as default };