@pie-element/math-inline 10.0.1 → 11.0.3-esm.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.
@@ -0,0 +1,21 @@
1
+
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <title>@pie-element/math-inline@11.0.3-esm.0</title>
6
+ <script
7
+ type="module"
8
+ src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
9
+
10
+ <link
11
+ href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
12
+ rel="stylesheet"
13
+ />
14
+ <style>
15
+ html, body {
16
+ font-family: 'Roboto', sans-serif;
17
+ }
18
+ </style>
19
+ <script type="module" src="./demo.js"></script>
20
+ </head>
21
+ </html>
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@pie-element/math-inline",
3
+ "version": "11.0.3-esm.0",
4
+ "modules": [
5
+ {
6
+ "name": "@pie-lib/shared-module",
7
+ "version": "^1.14.0"
8
+ },
9
+ {
10
+ "name": "@pie-lib/math-edit-module",
11
+ "version": "^2.4.0"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,104 @@
1
+ import PrintElement from './print.js';
2
+
3
+ var generate = {};
4
+
5
+ /* const initialModel = {
6
+ customKeys: [],
7
+ equationEditor: 'geometry',
8
+ responseType: 'Advanced Multi',
9
+ expression: '{{response}}',
10
+ responses: [
11
+ {
12
+ answer: 'r=\\sqrt{\\frac{V}{7\\pi}}',
13
+ id: '1',
14
+ alternates: {},
15
+ validation: 'literal',
16
+ },
17
+ ],
18
+ note: 'The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.',
19
+ rationale:
20
+ '<p>The correct answer is:</p><ul><li><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><msqrt><mfrac><mi>V</mi><mrow><mn>7</mn><mi>&#960;</mi></mrow></mfrac></msqrt></math></li></ul>',
21
+ }; */
22
+
23
+ const E262456 = {
24
+ equationEditor: 3,
25
+ toolbarEditorPosition: 'bottom',
26
+ prompt:
27
+ '<p><strong>B.</strong> Find the value of the expression that you wrote in part A to find how much money the band members made.</p>\n\n<p>Use the on-screen keyboard to type your answer in the box below.</p>\n',
28
+ expression: '${{response}}',
29
+ responses: [
30
+ {
31
+ allowSpaces: true,
32
+ // 'validation': 'symbolic',
33
+ answer: '$410',
34
+ id: '1',
35
+ },
36
+ ],
37
+ responseType: 'Advanced Multi',
38
+ };
39
+
40
+ generate.model = (id, element) => ({
41
+ id,
42
+ element,
43
+ ...E262456,
44
+ rubricEnabled: false,
45
+ });
46
+
47
+ const { model } = generate;
48
+
49
+ var config = {
50
+ elements: {
51
+ 'math-inline': '../..',
52
+ },
53
+ models: [model('1', 'math-inline')],
54
+ };
55
+
56
+ // new init - just shows off print!
57
+
58
+ const init = async () => {
59
+ console.log('define the element...');
60
+ await Promise.all(
61
+ config.models.map(async (m) => {
62
+ try {
63
+ const printTag = `${m.element}-print`;
64
+ if (customElements.get(printTag)) {
65
+ return true;
66
+ } else {
67
+ customElements.define(printTag, PrintElement);
68
+ await customElements.whenDefined(printTag);
69
+ return true;
70
+ }
71
+ } catch (e) {
72
+ return false;
73
+ }
74
+ })
75
+ );
76
+
77
+ console.log('now apply the model...');
78
+ config.models.forEach((m) => {
79
+ const printTag = `${m.element}-print`;
80
+ const h3s = document.createElement('h3');
81
+ h3s.textContent = 'student mode';
82
+ document.body.appendChild(h3s);
83
+ const de = document.createElement(printTag);
84
+ document.body.appendChild(de);
85
+ de.options = {};
86
+ de.model = m;
87
+
88
+ const h3 = document.createElement('h3');
89
+ h3.textContent = 'instructor mode';
90
+ document.body.appendChild(h3);
91
+ const instr = document.createElement(printTag);
92
+ document.body.appendChild(instr);
93
+ instr.options = { mode: 'instructor' };
94
+ instr.model = JSON.parse(JSON.stringify(m));
95
+ });
96
+ };
97
+
98
+ init()
99
+ .then(() => {
100
+ console.log('ready');
101
+ })
102
+ .catch((e) => {
103
+ console.error(e);
104
+ });
@@ -0,0 +1,18 @@
1
+
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <title>@pie-element/math-inline@11.0.3-esm.0</title>
6
+ <link
7
+ href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
+ rel="stylesheet"
9
+ />
10
+ <style>
11
+ html, body {
12
+ font-family: 'Roboto', sans-serif;
13
+ }
14
+ </style>
15
+ <script type="module" src="./print-demo.js"></script>
16
+ </head>
17
+ <body></body>
18
+ </html>