@pie-element/passage 7.1.1-next.11 → 7.1.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/common.d.ts +36 -0
  4. package/dist/author/common.js +56 -0
  5. package/dist/author/defaults.d.ts +175 -0
  6. package/dist/author/defaults.js +113 -0
  7. package/dist/author/design.d.ts +28 -0
  8. package/dist/author/design.js +120 -0
  9. package/dist/author/index.d.ts +36 -0
  10. package/dist/author/index.js +66 -0
  11. package/dist/author/passage.d.ts +27 -0
  12. package/dist/author/passage.js +127 -0
  13. package/dist/browser/author/index.js +39774 -0
  14. package/dist/browser/author/index.js.map +1 -0
  15. package/dist/browser/controller/index.js +64 -0
  16. package/dist/browser/controller/index.js.map +1 -0
  17. package/dist/browser/debounce-CUPmq2t-.js +86 -0
  18. package/dist/browser/debounce-CUPmq2t-.js.map +1 -0
  19. package/dist/browser/delivery/index.js +117 -0
  20. package/dist/browser/delivery/index.js.map +1 -0
  21. package/dist/browser/dist-C_PfhNd9.js +9602 -0
  22. package/dist/browser/dist-C_PfhNd9.js.map +1 -0
  23. package/dist/browser/isEmpty-xEtDXvJL.js +143 -0
  24. package/dist/browser/isEmpty-xEtDXvJL.js.map +1 -0
  25. package/dist/browser/isObjectLike-qb18ZQkj.js +38 -0
  26. package/dist/browser/isObjectLike-qb18ZQkj.js.map +1 -0
  27. package/dist/browser/passage.css +2 -0
  28. package/dist/browser/print/index.js +48 -0
  29. package/dist/browser/print/index.js.map +1 -0
  30. package/dist/browser/stimulus-tabs-CMox8txJ.js +218 -0
  31. package/dist/browser/stimulus-tabs-CMox8txJ.js.map +1 -0
  32. package/dist/controller/defaults.d.ts +23 -0
  33. package/dist/controller/defaults.js +17 -0
  34. package/dist/controller/index.d.ts +18 -0
  35. package/dist/controller/index.js +50 -0
  36. package/dist/delivery/index.d.ts +22 -0
  37. package/dist/delivery/index.js +83 -0
  38. package/dist/delivery/stimulus-tabs.d.ts +21 -0
  39. package/dist/delivery/stimulus-tabs.js +220 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.iife.d.ts +8 -0
  42. package/dist/index.iife.js +145 -0
  43. package/dist/index.js +2 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  87. package/dist/print/index.d.ts +15 -0
  88. package/dist/print/index.js +47 -0
  89. package/package.json +83 -19
  90. package/CHANGELOG.json +0 -227
  91. package/CHANGELOG.md +0 -1452
  92. package/LICENSE.md +0 -5
  93. package/README.md +0 -3
  94. package/configure/CHANGELOG.md +0 -672
  95. package/configure/lib/common.js +0 -74
  96. package/configure/lib/common.js.map +0 -1
  97. package/configure/lib/defaults.js +0 -174
  98. package/configure/lib/defaults.js.map +0 -1
  99. package/configure/lib/design.js +0 -185
  100. package/configure/lib/design.js.map +0 -1
  101. package/configure/lib/index.js +0 -86
  102. package/configure/lib/index.js.map +0 -1
  103. package/configure/lib/passage.js +0 -194
  104. package/configure/lib/passage.js.map +0 -1
  105. package/configure/package.json +0 -23
  106. package/controller/CHANGELOG.json +0 -1
  107. package/controller/CHANGELOG.md +0 -109
  108. package/controller/lib/defaults.js +0 -23
  109. package/controller/lib/defaults.js.map +0 -1
  110. package/controller/lib/index.js +0 -80
  111. package/controller/lib/index.js.map +0 -1
  112. package/controller/package.json +0 -13
  113. package/docs/config-schema.json +0 -1325
  114. package/docs/config-schema.json.md +0 -974
  115. package/docs/demo/config.js +0 -8
  116. package/docs/demo/generate.js +0 -32
  117. package/docs/demo/index.html +0 -1
  118. package/docs/pie-schema.json +0 -775
  119. package/docs/pie-schema.json.md +0 -561
  120. package/lib/index.js +0 -143
  121. package/lib/index.js.map +0 -1
  122. package/lib/print.js +0 -78
  123. package/lib/print.js.map +0 -1
  124. package/lib/stimulus-tabs.js +0 -323
  125. package/lib/stimulus-tabs.js.map +0 -1
  126. package/module/configure.js +0 -1
  127. package/module/controller.js +0 -920
  128. package/module/demo.js +0 -57
  129. package/module/element.js +0 -1
  130. package/module/index.html +0 -21
  131. package/module/manifest.json +0 -10
  132. package/module/print-demo.js +0 -95
  133. package/module/print.html +0 -18
  134. package/module/print.js +0 -1
@@ -0,0 +1,127 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { InputContainer as a } from "@pie-lib/config-ui";
6
+ import o, { ALL_PLUGINS as s } from "@pie-lib/editable-html-tip-tap";
7
+ //#region src/author/passage.tsx
8
+ var c = n(a)(({ theme: e }) => ({
9
+ paddingTop: e.spacing(2),
10
+ marginBottom: e.spacing(2),
11
+ width: "100%"
12
+ })), l = n("div")(({ theme: e }) => ({
13
+ fontSize: e.typography.fontSize - 2,
14
+ color: e.palette.error.main,
15
+ paddingTop: e.spacing(1)
16
+ })), u = class extends e.Component {
17
+ static propTypes = {
18
+ onModelChanged: t.func.isRequired,
19
+ model: t.object.isRequired,
20
+ configuration: t.object.isRequired,
21
+ imageSupport: t.object.isRequired,
22
+ passageIndex: t.number.isRequired,
23
+ uploadSoundSupport: t.object.isRequired
24
+ };
25
+ static defaultProps = { passageIndex: 0 };
26
+ constructor(e) {
27
+ super(e);
28
+ }
29
+ handleChange = (e, t) => {
30
+ let { model: n, onModelChanged: r, passageIndex: i } = this.props;
31
+ if (!n.passages || i < 0 || i >= n.passages.length) return;
32
+ let a = [...n.passages];
33
+ a[i] = {
34
+ ...a[i],
35
+ [e]: t
36
+ }, r({
37
+ ...n,
38
+ passages: a
39
+ });
40
+ };
41
+ render() {
42
+ let { model: t, configuration: n, imageSupport: a, passageIndex: u, uploadSoundSupport: d } = this.props, { maxImageWidth: f = {}, maxImageHeight: p = {}, mathMlOptions: m = {}, baseInputConfiguration: h = {}, teacherInstructions: g = {}, title: _ = {}, subtitle: v = {}, text: y = {}, author: b = {} } = n || {}, { errors: x = {}, passages: S = [], teacherInstructionsEnabled: C, titleEnabled: w, subtitleEnabled: T, authorEnabled: E, textEnabled: D } = t || {}, { passages: O } = x || {}, { teacherInstructions: k, title: A, subtitle: j, author: M, text: N } = O && O[u] || {}, P = f && f.prompt, F = p && p.prompt, I = (e) => ({
43
+ ...h,
44
+ ...e
45
+ }), L = (s || []).filter((e) => ![
46
+ "math",
47
+ "table",
48
+ "bulleted-list",
49
+ "numbered-list"
50
+ ].includes(e));
51
+ return /* @__PURE__ */ i(e.Fragment, { children: [
52
+ C && /* @__PURE__ */ i(c, {
53
+ label: g.label,
54
+ children: [/* @__PURE__ */ r(o, {
55
+ activePlugins: s,
56
+ markup: S[u].teacherInstructions || "",
57
+ onChange: (e) => this.handleChange("teacherInstructions", e),
58
+ nonEmpty: !1,
59
+ error: k,
60
+ maxImageWidth: f && f.teacherInstructions || P,
61
+ maxImageHeight: p && p.teacherInstructions || F,
62
+ mathMlOptions: m,
63
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
64
+ pluginProps: I(g?.inputConfiguration)
65
+ }), k && /* @__PURE__ */ r(l, { children: k })]
66
+ }),
67
+ w && /* @__PURE__ */ i(c, {
68
+ label: _.label,
69
+ children: [/* @__PURE__ */ r(o, {
70
+ activePlugins: L,
71
+ markup: S[u].title || "",
72
+ onChange: (e) => this.handleChange("title", e),
73
+ nonEmpty: !1,
74
+ error: A,
75
+ mathMlOptions: m,
76
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
77
+ pluginProps: I(_?.inputConfiguration)
78
+ }), A && /* @__PURE__ */ r(l, { children: A })]
79
+ }),
80
+ T && /* @__PURE__ */ i(c, {
81
+ label: v.label,
82
+ children: [/* @__PURE__ */ r(o, {
83
+ activePlugins: L,
84
+ markup: S[u].subtitle || "",
85
+ onChange: (e) => this.handleChange("subtitle", e),
86
+ nonEmpty: !1,
87
+ error: j,
88
+ mathMlOptions: m,
89
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
90
+ pluginProps: I(v?.inputConfiguration)
91
+ }), j && /* @__PURE__ */ r(l, { children: j })]
92
+ }),
93
+ E && /* @__PURE__ */ i(c, {
94
+ label: b.label,
95
+ children: [/* @__PURE__ */ r(o, {
96
+ activePlugins: L,
97
+ markup: S[u].author || "",
98
+ onChange: (e) => this.handleChange("author", e),
99
+ nonEmpty: !1,
100
+ error: M,
101
+ mathMlOptions: m,
102
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
103
+ pluginProps: I(b?.inputConfiguration)
104
+ }), M && /* @__PURE__ */ r(l, { children: M })]
105
+ }),
106
+ D && /* @__PURE__ */ i(c, {
107
+ label: y.label,
108
+ children: [/* @__PURE__ */ r(o, {
109
+ activePlugins: s,
110
+ markup: S[u].text || "",
111
+ onChange: (e) => this.handleChange("text", e),
112
+ imageSupport: a,
113
+ uploadSoundSupport: d,
114
+ nonEmpty: !1,
115
+ error: N,
116
+ maxImageWidth: f && f.text || P,
117
+ maxImageHeight: p && p.text || F,
118
+ mathMlOptions: m,
119
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
120
+ pluginProps: I(y?.inputConfiguration)
121
+ }), N && /* @__PURE__ */ r(l, { children: N })]
122
+ })
123
+ ] });
124
+ }
125
+ };
126
+ //#endregion
127
+ export { u as default };