@pie-element/explicit-constructed-response 11.1.1 → 11.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.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/author/alternateResponses.d.ts +34 -0
- package/dist/author/alternateResponses.js +113 -0
- package/dist/author/alternateSection.d.ts +58 -0
- package/dist/author/alternateSection.js +213 -0
- package/dist/author/defaults.d.ts +186 -0
- package/dist/author/defaults.js +128 -0
- package/dist/author/ecr-toolbar.d.ts +41 -0
- package/dist/author/ecr-toolbar.js +100 -0
- package/dist/author/index.d.ts +42 -0
- package/dist/author/index.js +96 -0
- package/dist/author/main.d.ts +38 -0
- package/dist/author/main.js +291 -0
- package/dist/author/markupUtils.d.ts +14 -0
- package/dist/author/markupUtils.js +13 -0
- package/dist/author/utils.d.ts +9 -0
- package/dist/author/utils.js +7 -0
- package/dist/browser/author/index.js +3378 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/browser-BC3WygxE.js +360 -0
- package/dist/browser/browser-BC3WygxE.js.map +1 -0
- package/dist/browser/controller/index.js +4152 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +96 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-D5D48-XD.js +45656 -0
- package/dist/browser/dist-D5D48-XD.js.map +1 -0
- package/dist/browser/dist-D9ARZhQk.js +1426 -0
- package/dist/browser/dist-D9ARZhQk.js.map +1 -0
- package/dist/browser/explicit-constructed-response.css +2 -0
- package/dist/browser/main-B4lD1zyg.js +959 -0
- package/dist/browser/main-B4lD1zyg.js.map +1 -0
- package/dist/browser/print/index.js +40 -0
- package/dist/browser/print/index.js.map +1 -0
- package/dist/controller/defaults.d.ts +25 -0
- package/dist/controller/defaults.js +19 -0
- package/dist/controller/index.d.ts +64 -0
- package/dist/controller/index.js +139 -0
- package/dist/delivery/index.d.ts +20 -0
- package/dist/delivery/index.js +66 -0
- package/dist/delivery/main.d.ts +48 -0
- package/dist/delivery/main.js +115 -0
- package/dist/explicit-constructed-response.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +393 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +40 -0
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +94 -26
- package/CHANGELOG.json +0 -1102
- package/CHANGELOG.md +0 -2187
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -652
- package/configure/CHANGELOG.md +0 -1928
- package/configure/lib/alternateResponses.js +0 -199
- package/configure/lib/alternateResponses.js.map +0 -1
- package/configure/lib/alternateSection.js +0 -329
- package/configure/lib/alternateSection.js.map +0 -1
- package/configure/lib/defaults.js +0 -184
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/ecr-toolbar.js +0 -181
- package/configure/lib/ecr-toolbar.js.map +0 -1
- package/configure/lib/index.js +0 -161
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -514
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/markupUtils.js +0 -70
- package/configure/lib/markupUtils.js.map +0 -1
- package/configure/lib/utils.js +0 -15
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -22
- package/controller/CHANGELOG.json +0 -517
- package/controller/CHANGELOG.md +0 -1344
- package/controller/lib/defaults.js +0 -23
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -368
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -18
- package/docs/config-schema.json +0 -2629
- package/docs/config-schema.json.md +0 -1941
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -20
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -10
- package/docs/pie-schema.json +0 -1130
- package/docs/pie-schema.json.md +0 -814
- package/lib/index.js +0 -91
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -205
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -71
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -6534
- package/module/demo.js +0 -45
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -18
- package/module/print-demo.js +0 -83
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/explicit-constructed-response/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 ExplicitConstructedResponsePrint extends HTMLElement {
|
|
10
|
+
constructor();
|
|
11
|
+
set options(o: any);
|
|
12
|
+
set model(s: any);
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import e from "../delivery/main.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { createRoot as n } from "react-dom/client";
|
|
4
|
+
import { renderMath as r } from "@pie-element/shared-math-rendering-mathjax";
|
|
5
|
+
import { debounce as i } from "@pie-element/shared-lodash";
|
|
6
|
+
import a from "debug";
|
|
7
|
+
//#region src/print/index.tsx
|
|
8
|
+
var o = a("pie-element:explicit-constructed-response:print"), s = (e, t) => {
|
|
9
|
+
let n = t.role === "instructor";
|
|
10
|
+
return e.prompt = e.promptEnabled === !1 ? void 0 : e.prompt, e.teacherInstructions = n && e.teacherInstructionsEnabled !== !1 ? e.teacherInstructions : void 0, e.rationale = n && e.rationaleEnabled !== !1 ? e.rationale : void 0, e.alwaysShowCorrect = n, e.mode = n ? "evaluate" : e.mode, e.disabled = !0, e.animationsDisabled = !0, e;
|
|
11
|
+
}, c = class extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(), this._options = null, this._model = null, this._session = [], this._root = null, this._rerender = i(() => {
|
|
14
|
+
if (this._model && this._session) {
|
|
15
|
+
let i = s(this._model, this._options), a = this._options && t.createElement(e, {
|
|
16
|
+
...i,
|
|
17
|
+
onChange: () => {}
|
|
18
|
+
});
|
|
19
|
+
this._root ||= n(this), this._root.render(a), queueMicrotask(() => {
|
|
20
|
+
o("render complete - render math"), r(this);
|
|
21
|
+
});
|
|
22
|
+
} else o("skip");
|
|
23
|
+
}, 50, {
|
|
24
|
+
leading: !1,
|
|
25
|
+
trailing: !0
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
set options(e) {
|
|
29
|
+
this._options = e;
|
|
30
|
+
}
|
|
31
|
+
set model(e) {
|
|
32
|
+
this._model = e, this._rerender();
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
this._root && this._root.unmount();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { c as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/runtime-support.ts
|
|
2
|
+
var e = {
|
|
3
|
+
schemaVersion: 1,
|
|
4
|
+
packageName: "@pie-element/explicit-constructed-response",
|
|
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,39 +1,107 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/explicit-constructed-response",
|
|
3
|
-
"
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
6
|
-
},
|
|
7
|
-
"version": "11.1.1",
|
|
3
|
+
"version": "11.1.2-next.1",
|
|
8
4
|
"description": "",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"postpublish": "../../scripts/postpublish"
|
|
11
|
-
},
|
|
12
5
|
"dependencies": {
|
|
13
6
|
"@emotion/react": "^11.14.0",
|
|
14
7
|
"@emotion/style": "^0.8.0",
|
|
15
8
|
"@mui/icons-material": "^7.3.4",
|
|
16
9
|
"@mui/material": "^7.3.4",
|
|
17
|
-
"@pie-
|
|
18
|
-
"@pie-lib/
|
|
19
|
-
"@pie-lib/
|
|
20
|
-
"@pie-lib/
|
|
21
|
-
"@pie-lib/render-ui": "6.1.0",
|
|
22
|
-
"@pie-lib/translator": "4.0.2",
|
|
23
|
-
"classnames": "^2.2.5",
|
|
10
|
+
"@pie-lib/correct-answer-toggle": "4.0.3-next.0",
|
|
11
|
+
"@pie-lib/mask-markup": "3.0.4-next.0",
|
|
12
|
+
"@pie-lib/render-ui": "6.1.1-next.0",
|
|
13
|
+
"@pie-lib/translator": "4.0.3-next.0",
|
|
24
14
|
"he": "^1.2.0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
15
|
+
"prop-types": "^15.8.1",
|
|
16
|
+
"@pie-element/shared-lodash": "0.1.1-next.0",
|
|
17
|
+
"@pie-lib/editable-html-tip-tap": "2.1.2-next.0",
|
|
18
|
+
"debug": "^4.4.3",
|
|
19
|
+
"@pie-element/shared-configure-events": "0.1.0",
|
|
20
|
+
"@pie-lib/config-ui": "13.0.4-next.0",
|
|
21
|
+
"@pie-element/shared-controller-utils": "0.1.1-next.1",
|
|
22
|
+
"@pie-element/shared-player-events": "0.1.0",
|
|
23
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.0",
|
|
24
|
+
"@emotion/core": "0.x.x",
|
|
25
|
+
"clsx": "^2.1.1"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^18.0.0",
|
|
29
|
+
"react-dom": "^18.0.0"
|
|
29
30
|
},
|
|
30
|
-
"author": "",
|
|
31
|
-
"license": "ISC",
|
|
32
|
-
"gitHead": "103c0fbfbc458001afb7abb0f72e7b8ead258860",
|
|
33
|
-
"main": "lib/index.js",
|
|
34
|
-
"module": "src/index.js",
|
|
35
31
|
"exports": {
|
|
36
|
-
".":
|
|
37
|
-
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./delivery": {
|
|
37
|
+
"types": "./dist/delivery/index.d.ts",
|
|
38
|
+
"default": "./dist/delivery/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./browser/delivery": {
|
|
41
|
+
"default": "./dist/browser/delivery/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./author": {
|
|
44
|
+
"types": "./dist/author/index.d.ts",
|
|
45
|
+
"default": "./dist/author/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./browser/author": {
|
|
48
|
+
"default": "./dist/browser/author/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./configure": {
|
|
51
|
+
"types": "./dist/author/index.d.ts",
|
|
52
|
+
"default": "./dist/author/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./controller": {
|
|
55
|
+
"types": "./dist/controller/index.d.ts",
|
|
56
|
+
"default": "./dist/controller/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./controller.js": {
|
|
59
|
+
"types": "./dist/controller/index.d.ts",
|
|
60
|
+
"default": "./dist/controller/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./browser/controller": {
|
|
63
|
+
"default": "./dist/browser/controller/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./print": {
|
|
66
|
+
"types": "./dist/print/index.d.ts",
|
|
67
|
+
"default": "./dist/print/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./browser/print": {
|
|
70
|
+
"default": "./dist/browser/print/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./runtime-support": {
|
|
73
|
+
"types": "./dist/runtime-support.d.ts",
|
|
74
|
+
"default": "./dist/runtime-support.js"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"type": "module",
|
|
78
|
+
"main": "./dist/index.js",
|
|
79
|
+
"types": "./dist/index.d.ts",
|
|
80
|
+
"files": [
|
|
81
|
+
"configure.js",
|
|
82
|
+
"controller.js",
|
|
83
|
+
"dist"
|
|
84
|
+
],
|
|
85
|
+
"sideEffects": false,
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"vite": "^8.0.1",
|
|
88
|
+
"typescript": "^5.9.3",
|
|
89
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
90
|
+
"@types/react": "^18.2.0",
|
|
91
|
+
"@types/react-dom": "^18.2.0"
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"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",
|
|
95
|
+
"dev": "bun x vite",
|
|
96
|
+
"demo": "bun x vite --mode demo",
|
|
97
|
+
"test": "bun x vitest run"
|
|
98
|
+
},
|
|
99
|
+
"pie": {
|
|
100
|
+
"controller": "@pie-element/explicit-constructed-response/controller",
|
|
101
|
+
"configure": "@pie-element/explicit-constructed-response/configure",
|
|
102
|
+
"browserSharedDependencies": {
|
|
103
|
+
"react": "18.2.0",
|
|
104
|
+
"react-dom": "18.2.0"
|
|
105
|
+
}
|
|
38
106
|
}
|
|
39
107
|
}
|