@pie-element/rubric 8.1.1 → 8.1.2-next.1

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 (93) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +71 -0
  4. package/dist/author/defaults.js +53 -0
  5. package/dist/author/index.d.ts +21 -0
  6. package/dist/author/index.js +72 -0
  7. package/dist/author/main.d.ts +14 -0
  8. package/dist/author/main.js +51 -0
  9. package/dist/browser/author/index.js +44381 -0
  10. package/dist/browser/author/index.js.map +1 -0
  11. package/dist/browser/controller/index.js +41 -0
  12. package/dist/browser/controller/index.js.map +1 -0
  13. package/dist/browser/delivery/index.js +34 -0
  14. package/dist/browser/delivery/index.js.map +1 -0
  15. package/dist/browser/dist-DESt1KeY.js +9084 -0
  16. package/dist/browser/dist-DESt1KeY.js.map +1 -0
  17. package/dist/browser/dist-DnnL1HSL.js +98 -0
  18. package/dist/browser/dist-DnnL1HSL.js.map +1 -0
  19. package/dist/browser/main-wvVb2SYi.js +153 -0
  20. package/dist/browser/main-wvVb2SYi.js.map +1 -0
  21. package/dist/browser/print/index.js +34 -0
  22. package/dist/browser/print/index.js.map +1 -0
  23. package/dist/browser/rubric.css +2 -0
  24. package/dist/controller/defaults.d.ts +17 -0
  25. package/dist/controller/defaults.js +21 -0
  26. package/dist/controller/index.d.ts +10 -0
  27. package/dist/controller/index.js +23 -0
  28. package/dist/delivery/index.d.ts +16 -0
  29. package/dist/delivery/index.js +33 -0
  30. package/dist/delivery/main.d.ts +34 -0
  31. package/dist/delivery/main.js +156 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.iife.d.ts +8 -0
  34. package/dist/index.iife.js +145 -0
  35. package/dist/index.js +2 -0
  36. package/dist/print/index.d.ts +15 -0
  37. package/dist/print/index.js +34 -0
  38. package/dist/runtime-support.d.ts +12 -0
  39. package/dist/runtime-support.js +12 -0
  40. package/package.json +88 -25
  41. package/CHANGELOG.json +0 -257
  42. package/CHANGELOG.md +0 -1719
  43. package/LICENSE.md +0 -5
  44. package/README.md +0 -3
  45. package/configure/CHANGELOG.json +0 -197
  46. package/configure/CHANGELOG.md +0 -1559
  47. package/configure/lib/defaults.js +0 -70
  48. package/configure/lib/defaults.js.map +0 -1
  49. package/configure/lib/index.js +0 -135
  50. package/configure/lib/index.js.map +0 -1
  51. package/configure/lib/main.js +0 -103
  52. package/configure/lib/main.js.map +0 -1
  53. package/configure/package.json +0 -23
  54. package/configure/src/__tests__/index.test.jsx +0 -192
  55. package/configure/src/defaults.js +0 -43
  56. package/configure/src/index.js +0 -139
  57. package/configure/src/main.jsx +0 -87
  58. package/controller/CHANGELOG.json +0 -17
  59. package/controller/CHANGELOG.md +0 -901
  60. package/controller/lib/defaults.js +0 -15
  61. package/controller/lib/defaults.js.map +0 -1
  62. package/controller/lib/index.js +0 -46
  63. package/controller/lib/index.js.map +0 -1
  64. package/controller/package.json +0 -12
  65. package/controller/src/__tests__/index.test.js +0 -33
  66. package/controller/src/defaults.js +0 -8
  67. package/controller/src/index.js +0 -41
  68. package/docs/config-schema.json +0 -712
  69. package/docs/config-schema.json.md +0 -532
  70. package/docs/demo/config.js +0 -8
  71. package/docs/demo/generate.js +0 -8
  72. package/docs/demo/index.html +0 -2
  73. package/docs/pie-schema.json +0 -391
  74. package/docs/pie-schema.json.md +0 -281
  75. package/lib/index.js +0 -52
  76. package/lib/index.js.map +0 -1
  77. package/lib/main.js +0 -208
  78. package/lib/main.js.map +0 -1
  79. package/lib/print.js +0 -71
  80. package/lib/print.js.map +0 -1
  81. package/module/configure.js +0 -1
  82. package/module/controller.js +0 -73
  83. package/module/demo.js +0 -33
  84. package/module/element.js +0 -1
  85. package/module/index.html +0 -21
  86. package/module/manifest.json +0 -14
  87. package/module/print-demo.js +0 -71
  88. package/module/print.html +0 -18
  89. package/module/print.js +0 -1
  90. package/src/__tests__/rubric-view.test.jsx +0 -37
  91. package/src/index.js +0 -48
  92. package/src/main.jsx +0 -226
  93. package/src/print.js +0 -74
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import e from "./delivery/index.js";
2
+ export { e as default };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/rubric/src/print.js
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
+ export default class RubricPrint extends HTMLElement {
10
+ constructor();
11
+ set options(o: any);
12
+ set model(s: any);
13
+ connectedCallback(): void;
14
+ disconnectedCallback(): void;
15
+ }
@@ -0,0 +1,34 @@
1
+ import e from "../delivery/main.js";
2
+ import t from "react";
3
+ import { createRoot as n } from "react-dom/client";
4
+ import r from "debug";
5
+ import { renderMath as i } from "@pie-element/shared-math-rendering-mathjax";
6
+ import { debounce as a } from "@pie-element/shared-lodash";
7
+ //#region src/print/index.tsx
8
+ var o = r("pie-element:rubric:print"), s = (e, t) => t.role === "instructor" ? (e.value = { ...e }, e.mode = "evaluate", e.animationsDisabled = !0, e) : {}, c = class extends HTMLElement {
9
+ constructor() {
10
+ super(), this._options = null, this._model = null, this._session = [], this._root = null, this._rerender = a(() => {
11
+ if (this._model && this._session) {
12
+ let r = s(this._model, this._options), a = this._options && t.createElement(e, { ...r });
13
+ this._root ||= n(this), this._root.render(a), queueMicrotask(() => {
14
+ o("render complete - render math"), i(this);
15
+ });
16
+ } else o("skip");
17
+ }, 50, {
18
+ leading: !1,
19
+ trailing: !0
20
+ });
21
+ }
22
+ set options(e) {
23
+ this._options = e;
24
+ }
25
+ set model(e) {
26
+ this._model = e, this._rerender();
27
+ }
28
+ connectedCallback() {}
29
+ disconnectedCallback() {
30
+ this._root && this._root.unmount();
31
+ }
32
+ };
33
+ //#endregion
34
+ export { c as default };
@@ -0,0 +1,12 @@
1
+ export declare const runtimeSupport: {
2
+ schemaVersion: number;
3
+ packageName: string;
4
+ supports: {
5
+ esm: {
6
+ delivery: boolean;
7
+ author: boolean;
8
+ print: boolean;
9
+ };
10
+ };
11
+ };
12
+ export default runtimeSupport;
@@ -0,0 +1,12 @@
1
+ //#region src/runtime-support.ts
2
+ var e = {
3
+ schemaVersion: 1,
4
+ packageName: "@pie-element/rubric",
5
+ supports: { esm: {
6
+ delivery: !0,
7
+ author: !0,
8
+ print: !0
9
+ } }
10
+ };
11
+ //#endregion
12
+ export { e as default, e as runtimeSupport };
package/package.json CHANGED
@@ -1,37 +1,100 @@
1
1
  {
2
2
  "name": "@pie-element/rubric",
3
- "repository": "pie-framework/pie-elements",
4
- "version": "8.1.1",
5
- "main": "lib/index.js",
6
- "module": "src/index.js",
7
- "exports": {
8
- ".": {
9
- "import": "./src/index.js",
10
- "default": "./lib/index.js"
11
- },
12
- "./print": "./src/print.js",
13
- "./configure/lib": {
14
- "require": "./configure/lib/index.js",
15
- "default": "./configure/lib/index.js"
16
- }
17
- },
3
+ "version": "8.1.2-next.1",
18
4
  "description": "Rubric Scoring Interaction",
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
5
  "dependencies": {
23
6
  "@emotion/react": "^11.14.0",
24
7
  "@emotion/style": "^0.8.0",
25
8
  "@mui/icons-material": "^7.3.4",
26
9
  "@mui/material": "^7.3.4",
27
- "@pie-lib/math-rendering": "5.0.2",
28
- "@pie-lib/render-ui": "6.1.0",
29
- "prop-types": "^15.8.1"
10
+ "@pie-lib/render-ui": "6.1.1-next.0",
11
+ "prop-types": "^15.8.1",
12
+ "@pie-element/shared-configure-events": "0.1.0",
13
+ "debug": "^4.4.3",
14
+ "@pie-lib/rubric": "2.0.4-next.0",
15
+ "@pie-lib/config-ui": "13.0.4-next.0",
16
+ "@pie-element/shared-math-rendering-mathjax": "0.1.0",
17
+ "@pie-element/shared-lodash": "0.1.1-next.0",
18
+ "@emotion/core": "0.x.x"
19
+ },
20
+ "peerDependencies": {
21
+ "react": "^18.0.0",
22
+ "react-dom": "^18.0.0"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "./delivery": {
30
+ "types": "./dist/delivery/index.d.ts",
31
+ "default": "./dist/delivery/index.js"
32
+ },
33
+ "./browser/delivery": {
34
+ "default": "./dist/browser/delivery/index.js"
35
+ },
36
+ "./author": {
37
+ "types": "./dist/author/index.d.ts",
38
+ "default": "./dist/author/index.js"
39
+ },
40
+ "./browser/author": {
41
+ "default": "./dist/browser/author/index.js"
42
+ },
43
+ "./configure": {
44
+ "types": "./dist/author/index.d.ts",
45
+ "default": "./dist/author/index.js"
46
+ },
47
+ "./controller": {
48
+ "types": "./dist/controller/index.d.ts",
49
+ "default": "./dist/controller/index.js"
50
+ },
51
+ "./controller.js": {
52
+ "types": "./dist/controller/index.d.ts",
53
+ "default": "./dist/controller/index.js"
54
+ },
55
+ "./browser/controller": {
56
+ "default": "./dist/browser/controller/index.js"
57
+ },
58
+ "./print": {
59
+ "types": "./dist/print/index.d.ts",
60
+ "default": "./dist/print/index.js"
61
+ },
62
+ "./browser/print": {
63
+ "default": "./dist/browser/print/index.js"
64
+ },
65
+ "./runtime-support": {
66
+ "types": "./dist/runtime-support.d.ts",
67
+ "default": "./dist/runtime-support.js"
68
+ }
69
+ },
70
+ "type": "module",
71
+ "main": "./dist/index.js",
72
+ "types": "./dist/index.d.ts",
73
+ "files": [
74
+ "configure.js",
75
+ "controller.js",
76
+ "dist"
77
+ ],
78
+ "sideEffects": false,
79
+ "devDependencies": {
80
+ "vite": "^8.0.1",
81
+ "typescript": "^5.9.3",
82
+ "@vitejs/plugin-react": "^6.0.1",
83
+ "@types/react": "^18.2.0",
84
+ "@types/react-dom": "^18.2.0"
30
85
  },
31
- "author": "pie framework developers",
32
- "license": "ISC",
33
- "gitHead": "103c0fbfbc458001afb7abb0f72e7b8ead258860",
34
86
  "scripts": {
35
- "postpublish": "../../scripts/postpublish"
87
+ "build": "bun x vite build && bun x vite build --config ../../../tools/vite/element-browser.config.ts && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
88
+ "dev": "bun x vite",
89
+ "demo": "bun x vite --mode demo",
90
+ "test": "bun x vitest run"
91
+ },
92
+ "pie": {
93
+ "controller": "@pie-element/rubric/controller",
94
+ "configure": "@pie-element/rubric/configure",
95
+ "browserSharedDependencies": {
96
+ "react": "18.2.0",
97
+ "react-dom": "18.2.0"
98
+ }
36
99
  }
37
100
  }
package/CHANGELOG.json DELETED
@@ -1,257 +0,0 @@
1
- [
2
- {
3
- "type": "feat",
4
- "scope": null,
5
- "subject": "rubric interaction",
6
- "merge": null,
7
- "header": "feat: rubric interaction",
8
- "body": null,
9
- "footer": null,
10
- "notes": [],
11
- "hash": "3cc2b6c45f137939c38681c82fb60724c6b4955c",
12
- "gitTags": "",
13
- "committerDate": "2019-05-29 17:32:36 -0400",
14
- "isTagged": true,
15
- "tag": "@pie-element/rubric@1.1.0"
16
- },
17
- {
18
- "type": "chore",
19
- "scope": "version",
20
- "subject": "bumped the versions",
21
- "merge": null,
22
- "header": "chore(version): bumped the versions",
23
- "body": null,
24
- "footer": null,
25
- "notes": [],
26
- "hash": "12b141d884c66a15d23c8cbb34be820a422d7332",
27
- "gitTags": " (origin/feat/mask-markup-elements)",
28
- "committerDate": "2019-06-06 01:15:50 +0300",
29
- "isTagged": true,
30
- "tag": "@pie-element/rubric@1.1.1"
31
- },
32
- {
33
- "type": "chore",
34
- "scope": "merge",
35
- "subject": "merged develop into master",
36
- "merge": null,
37
- "header": "chore(merge): merged develop into master",
38
- "body": null,
39
- "footer": null,
40
- "notes": [],
41
- "hash": "3bb9f402d900f3a0349537dfd01ce558c526cb55",
42
- "gitTags": " (develop)",
43
- "committerDate": "2019-06-07 23:29:44 +0300",
44
- "isTagged": true,
45
- "tag": "@pie-element/rubric@1.1.2"
46
- },
47
- {
48
- "type": "fix",
49
- "scope": null,
50
- "subject": "exlude zeros handled in renderiing",
51
- "merge": null,
52
- "header": "fix: exlude zeros handled in renderiing",
53
- "body": null,
54
- "footer": null,
55
- "notes": [],
56
- "hash": "ca8b34e67483c6e320077a6ca186f00f4852531e",
57
- "gitTags": " (origin/ch2903/rubric-exclude-zeros-checkbox-not-functional)",
58
- "committerDate": "2019-07-23 16:53:50 -0400",
59
- "isTagged": true,
60
- "tag": "@pie-element/rubric@1.1.8"
61
- },
62
- {
63
- "type": "fix",
64
- "scope": "rubric",
65
- "subject": "fix exclude zeroes number of points",
66
- "merge": null,
67
- "header": "fix(rubric): fix exclude zeroes number of points",
68
- "body": null,
69
- "footer": null,
70
- "notes": [],
71
- "hash": "96237349c9c4559a431dbeedff35c6cd50271046",
72
- "gitTags": " (origin/fix/rubric-exclude-zeroes)",
73
- "committerDate": "2019-08-13 17:06:51 +0300",
74
- "isTagged": true,
75
- "tag": "@pie-element/rubric@1.1.11"
76
- },
77
- {
78
- "type": "fix",
79
- "scope": "elements",
80
- "subject": "version bumped the editable-html packages [ch1738]",
81
- "merge": null,
82
- "header": "fix(elements): version bumped the editable-html packages [ch1738]",
83
- "body": null,
84
- "footer": null,
85
- "notes": [],
86
- "hash": "949222a6a3af39cf8b81a885a81e5c6f3c6a28a0",
87
- "gitTags": "",
88
- "committerDate": "2019-08-08 08:40:11 +0300",
89
- "isTagged": true,
90
- "tag": "@pie-element/rubric@1.1.11"
91
- },
92
- {
93
- "type": "fix",
94
- "scope": "math-rendering",
95
- "subject": "updated all dependent packages [ch3365]",
96
- "merge": null,
97
- "header": "fix(math-rendering): updated all dependent packages [ch3365]",
98
- "body": null,
99
- "footer": null,
100
- "notes": [],
101
- "hash": "7cbf25ac92040a16621d5699e232c38575f6c36c",
102
- "gitTags": "",
103
- "committerDate": "2019-08-16 23:04:42 +0300",
104
- "isTagged": true,
105
- "tag": "@pie-element/rubric@1.1.12"
106
- },
107
- {
108
- "type": "fix",
109
- "scope": "math-rendering",
110
- "subject": "updated all dependent packages for math rendering and for editable-html [ch3365], [ch1530]",
111
- "merge": null,
112
- "header": "fix(math-rendering): updated all dependent packages for math rendering and for editable-html [ch3365], [ch1530]",
113
- "body": null,
114
- "footer": null,
115
- "notes": [],
116
- "hash": "33e3287a735cec9aed893f697a1933ff0c077042",
117
- "gitTags": "",
118
- "committerDate": "2019-08-19 19:37:56 +0300",
119
- "isTagged": true,
120
- "tag": "@pie-element/rubric@1.1.13"
121
- },
122
- {
123
- "type": "feat",
124
- "scope": null,
125
- "subject": "PIE-200 - partialScoring - NEEDS VERIFICATION",
126
- "merge": null,
127
- "header": "feat: PIE-200 - partialScoring - NEEDS VERIFICATION",
128
- "body": null,
129
- "footer": null,
130
- "notes": [],
131
- "hash": "30e396948f87c82a7b0d65d80a7f6ab7d68c2f76",
132
- "gitTags": "",
133
- "committerDate": "2019-12-06 12:22:22 +0000",
134
- "isTagged": true,
135
- "tag": "@pie-element/rubric@1.2.0"
136
- },
137
- {
138
- "type": "fix",
139
- "scope": null,
140
- "subject": "bump ui versions",
141
- "merge": null,
142
- "header": "fix: bump ui versions",
143
- "body": null,
144
- "footer": null,
145
- "notes": [],
146
- "hash": "5b9d99fe59c304bdd173c9336503eb558900d2a2",
147
- "gitTags": "",
148
- "committerDate": "2020-03-31 19:25:13 +0100",
149
- "isTagged": true,
150
- "tag": "@pie-element/rubric@1.3.0"
151
- },
152
- {
153
- "type": "fix",
154
- "scope": null,
155
- "subject": "bump lib and ui versions",
156
- "merge": null,
157
- "header": "fix: bump lib and ui versions",
158
- "body": null,
159
- "footer": null,
160
- "notes": [],
161
- "hash": "a882cbf4580098ce0e12c51cf6ad2879817e17e7",
162
- "gitTags": "",
163
- "committerDate": "2020-04-10 17:13:24 +0100",
164
- "isTagged": true,
165
- "tag": "@pie-element/rubric@1.4.1"
166
- },
167
- {
168
- "type": "fix",
169
- "scope": null,
170
- "subject": "bump all packages to avoid tag conflict",
171
- "merge": null,
172
- "header": "fix: bump all packages to avoid tag conflict",
173
- "body": null,
174
- "footer": null,
175
- "notes": [],
176
- "hash": "d9ec9a8689f0a391594b5e2f4ea958c6dc9f6d7b",
177
- "gitTags": "",
178
- "committerDate": "2020-04-10 20:01:37 +0100",
179
- "isTagged": true,
180
- "tag": "@pie-element/rubric@1.4.1"
181
- },
182
- {
183
- "type": "fix",
184
- "scope": null,
185
- "subject": "bump version to avoid tag conflict",
186
- "merge": null,
187
- "header": "fix: bump version to avoid tag conflict",
188
- "body": null,
189
- "footer": null,
190
- "notes": [],
191
- "hash": "4d55f6d203f496420e2ed2fa32c0851406036c53",
192
- "gitTags": "",
193
- "committerDate": "2020-04-10 17:39:16 +0100",
194
- "isTagged": true,
195
- "tag": "@pie-element/rubric@1.4.1"
196
- },
197
- {
198
- "type": "fix",
199
- "scope": null,
200
- "subject": "bump ui/lib versions",
201
- "merge": null,
202
- "header": "fix: bump ui/lib versions",
203
- "body": null,
204
- "footer": null,
205
- "notes": [],
206
- "hash": "3edb2321ebaefcaee70c3642aa6da8a50e8a99e5",
207
- "gitTags": "",
208
- "committerDate": "2020-04-14 15:36:44 +0100",
209
- "isTagged": true,
210
- "tag": "@pie-element/rubric@1.4.3"
211
- },
212
- {
213
- "type": "fix",
214
- "scope": null,
215
- "subject": "bump ui/lib versions",
216
- "merge": null,
217
- "header": "fix: bump ui/lib versions",
218
- "body": null,
219
- "footer": null,
220
- "notes": [],
221
- "hash": "45f0da6e3e01f33aff6059cb13d571554690348b",
222
- "gitTags": "",
223
- "committerDate": "2020-04-28 14:57:57 +0100",
224
- "isTagged": true,
225
- "tag": "@pie-element/rubric@1.4.4"
226
- },
227
- {
228
- "type": "fix",
229
- "scope": null,
230
- "subject": "update ui/lib versions",
231
- "merge": null,
232
- "header": "fix: update ui/lib versions",
233
- "body": null,
234
- "footer": null,
235
- "notes": [],
236
- "hash": "0226b0bc0869d468ba3e5986bc469e020f4f12a6",
237
- "gitTags": "",
238
- "committerDate": "2020-04-28 14:20:37 +0100",
239
- "isTagged": true,
240
- "tag": "@pie-element/rubric@1.4.4"
241
- },
242
- {
243
- "type": "fix",
244
- "scope": null,
245
- "subject": "ui+libs update",
246
- "merge": null,
247
- "header": "fix: ui+libs update",
248
- "body": null,
249
- "footer": null,
250
- "notes": [],
251
- "hash": "6127de27006a7835d1dd7a9c4c5f13de950aa06d",
252
- "gitTags": "",
253
- "committerDate": "2020-04-27 19:52:07 +0100",
254
- "isTagged": true,
255
- "tag": "@pie-element/rubric@1.4.4"
256
- }
257
- ]