@pie-element/math-inline 10.0.2-esm.0 → 10.1.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [10.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@9.0.0...@pie-element/math-inline@10.1.0) (2025-10-07)
7
+
8
+ **Note:** Version bump only for package @pie-element/math-inline
9
+
10
+
11
+
12
+
13
+
6
14
  # [10.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.8.11...@pie-element/math-inline@10.0.0) (2025-10-02)
7
15
 
8
16
 
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [9.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@9.0.0...@pie-element/math-inline-configure@9.1.0) (2025-10-07)
7
+
8
+ **Note:** Version bump only for package @pie-element/math-inline-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [9.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.7.0...@pie-element/math-inline-configure@9.0.1) (2025-10-02)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/math-inline-configure
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/math-inline-configure",
3
3
  "private": true,
4
- "version": "9.0.3-esm.0",
4
+ "version": "9.1.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -11,12 +11,12 @@
11
11
  "@material-ui/icons": "^3.0.1",
12
12
  "@pie-framework/mathquill": "^1.1.3",
13
13
  "@pie-framework/pie-configure-events": "^1.3.0",
14
- "@pie-lib/config-ui": "^11.26.1",
15
- "@pie-lib/editable-html": "^11.18.1",
16
- "@pie-lib/math-rendering": "^3.19.0",
17
- "@pie-lib/math-toolbar": "^1.28.1",
18
- "@pie-lib/render-ui": "^4.32.1",
19
- "@pie-lib/test-utils": "^0.19.1",
14
+ "@pie-lib/config-ui": "^11.25.0",
15
+ "@pie-lib/editable-html": "^11.17.0",
16
+ "@pie-lib/math-rendering": "^3.18.0",
17
+ "@pie-lib/math-toolbar": "^1.27.0",
18
+ "@pie-lib/render-ui": "^4.31.0",
19
+ "@pie-lib/test-utils": "^0.18.0",
20
20
  "classnames": "^2.2.5",
21
21
  "debug": "^3.1.0",
22
22
  "prop-types": "^15.6.2",
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@8.0.0...@pie-element/math-inline-controller@8.1.0) (2025-10-07)
7
+
8
+ **Note:** Version bump only for package @pie-element/math-inline-controller
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@7.4.11...@pie-element/math-inline-controller@8.0.1) (2025-10-02)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/math-inline-controller
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/math-inline-controller",
3
3
  "private": true,
4
- "version": "8.0.2",
4
+ "version": "8.1.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@pie-framework/math-validation": "^1.4.2",
13
- "@pie-lib/feedback": "^0.21.0",
14
- "@pie-lib/translator": "^2.20.0",
13
+ "@pie-lib/feedback": "^0.20.0",
14
+ "@pie-lib/translator": "^2.19.0",
15
15
  "debug": "^3.1.0",
16
16
  "lodash": "^4.17.15"
17
17
  },
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
37
37
 
38
38
  var _piePlayerEvents = require("@pie-framework/pie-player-events");
39
39
 
40
- var _defaults = _interopRequireDefault(require("../configure/src/defaults"));
40
+ var _defaults = _interopRequireDefault(require("../configure/lib/defaults"));
41
41
 
42
42
  var _main = _interopRequireDefault(require("./main"));
43
43
 
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","MathInline","_configuration","defaults","configuration","sessionChangedEventCaller","_","debounce","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","language","_model","lang","slice","setAttribute","playerContainer","closest","m","ModelSetEvent","setLangAttribute","_render","_session","s","c","Object","keys","map","key","el","React","createElement","Main","model","session","onSessionChange","sessionChanged","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,oBAAN,CAAZ;;IAIqBC,U;;;;;AACnB,wBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,cAAL,GAAsBC,qBAASC,aAA/B;AACA,UAAKC,yBAAL,GAAiCC,mBAAEC,QAAF,CAAW,YAAM;AAChD,YAAKC,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,IAApD,CAAnB;AACD,KAFgC,EAE9B,IAF8B,CAAjC;AAHY;AAMb;;;;WAED,4BAAmB;AACjB,UAAMC,QAAQ,GAAG,KAAKC,MAAL,6BAAsB,KAAKA,MAAL,CAAYD,QAAlC,IAA6C,KAAKC,MAAL,CAAYD,QAAzD,GAAoE,EAArF;AACA,UAAME,IAAI,GAAGF,QAAQ,GAAGA,QAAQ,CAACG,KAAT,CAAe,CAAf,EAAkB,CAAlB,CAAH,GAA0B,IAA/C;AACA,WAAKC,YAAL,CAAkB,MAAlB,EAA0BF,IAA1B,EAHiB,CA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ADuB;AAEnCsB,QAAAA,OAAO,EAAE,KAAKZ,QAFqB;AAGnCnB,QAAAA,aAAa,EAAE,KAAKF,cAHe;AAInCkC,QAAAA,eAAe,EAAE,KAAKC,cAAL,CAAoBC,IAApB,CAAyB,IAAzB;AAJkB,OAA1B,CAAX;;AAOAC,2BAASC,MAAT,CAAgBV,EAAhB,EAAoB,IAApB;AACD;;;kDAvEqCW,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\nimport _ from 'lodash';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\n\nimport defaults from '../configure/src/defaults';\nimport Main from './main';\n\nconst log = debug('pie-ui:math-inline');\n\nexport { Main as Component };\n\nexport default class MathInline extends HTMLElement {\n constructor() {\n super();\n this._configuration = defaults.configuration;\n this.sessionChangedEventCaller = _.debounce(() => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), true));\n }, 1000);\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n\n // set the lang attribute for the nearest parent div with class 'player-container' for MPI items as per PD-2483\n const playerContainer = this.closest('.player-container');\n if (playerContainer) {\n playerContainer.setAttribute('lang', lang);\n }\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this._model, true, !!this._model));\n this.setLangAttribute();\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n sessionChanged(s) {\n Object.keys(s).map((key) => {\n this._session[key] = s[key];\n });\n\n this.sessionChangedEventCaller();\n log('session: ', this._session);\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Math Response Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n configuration: this._configuration,\n onSessionChange: this.sessionChanged.bind(this),\n });\n\n ReactDOM.render(el, this);\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","MathInline","_configuration","defaults","configuration","sessionChangedEventCaller","_","debounce","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","language","_model","lang","slice","setAttribute","playerContainer","closest","m","ModelSetEvent","setLangAttribute","_render","_session","s","c","Object","keys","map","key","el","React","createElement","Main","model","session","onSessionChange","sessionChanged","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,oBAAN,CAAZ;;IAIqBC,U;;;;;AACnB,wBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,cAAL,GAAsBC,qBAASC,aAA/B;AACA,UAAKC,yBAAL,GAAiCC,mBAAEC,QAAF,CAAW,YAAM;AAChD,YAAKC,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,IAApD,CAAnB;AACD,KAFgC,EAE9B,IAF8B,CAAjC;AAHY;AAMb;;;;WAED,4BAAmB;AACjB,UAAMC,QAAQ,GAAG,KAAKC,MAAL,6BAAsB,KAAKA,MAAL,CAAYD,QAAlC,IAA6C,KAAKC,MAAL,CAAYD,QAAzD,GAAoE,EAArF;AACA,UAAME,IAAI,GAAGF,QAAQ,GAAGA,QAAQ,CAACG,KAAT,CAAe,CAAf,EAAkB,CAAlB,CAAH,GAA0B,IAA/C;AACA,WAAKC,YAAL,CAAkB,MAAlB,EAA0BF,IAA1B,EAHiB,CAKjB;;AACA,UAAMG,eAAe,GAAG,KAAKC,OAAL,CAAa,mBAAb,CAAxB;;AACA,UAAID,eAAJ,EAAqB;AACnBA,QAAAA,eAAe,CAACD,YAAhB,CAA6B,MAA7B,EAAqCF,IAArC;A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IAAzB;AAJkB,OAA1B,CAAX;;AAOAC,2BAASC,MAAT,CAAgBV,EAAhB,EAAoB,IAApB;AACD;;;kDAvEqCW,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\nimport _ from 'lodash';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\n\nimport defaults from '../configure/lib/defaults';\nimport Main from './main';\n\nconst log = debug('pie-ui:math-inline');\n\nexport { Main as Component };\n\nexport default class MathInline extends HTMLElement {\n constructor() {\n super();\n this._configuration = defaults.configuration;\n this.sessionChangedEventCaller = _.debounce(() => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), true));\n }, 1000);\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n\n // set the lang attribute for the nearest parent div with class 'player-container' for MPI items as per PD-2483\n const playerContainer = this.closest('.player-container');\n if (playerContainer) {\n playerContainer.setAttribute('lang', lang);\n }\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this._model, true, !!this._model));\n this.setLangAttribute();\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n sessionChanged(s) {\n Object.keys(s).map((key) => {\n this._session[key] = s[key];\n });\n\n this.sessionChangedEventCaller();\n log('session: ', this._session);\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Math Response Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n configuration: this._configuration,\n onSessionChange: this.sessionChanged.bind(this),\n });\n\n ReactDOM.render(el, this);\n }\n}\n"],"file":"index.js"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "10.0.2-esm.0",
7
+ "version": "10.1.0",
8
8
  "main": "lib/index.js",
9
9
  "description": "",
10
10
  "scripts": {
@@ -14,12 +14,12 @@
14
14
  "@material-ui/core": "^3.9.2",
15
15
  "@pie-framework/mathquill": "^1.1.3",
16
16
  "@pie-framework/pie-player-events": "^0.1.0",
17
- "@pie-lib/correct-answer-toggle": "^2.22.1",
18
- "@pie-lib/math-input": "^6.28.1",
19
- "@pie-lib/math-rendering": "^3.19.0",
20
- "@pie-lib/math-toolbar": "^1.28.1",
21
- "@pie-lib/render-ui": "^4.32.1",
22
- "@pie-lib/translator": "^2.20.0",
17
+ "@pie-lib/correct-answer-toggle": "^2.21.0",
18
+ "@pie-lib/math-input": "^6.27.0",
19
+ "@pie-lib/math-rendering": "^3.18.0",
20
+ "@pie-lib/math-toolbar": "^1.27.0",
21
+ "@pie-lib/render-ui": "^4.31.0",
22
+ "@pie-lib/translator": "^2.19.0",
23
23
  "classnames": "^2.2.5",
24
24
  "debug": "^4.1.1",
25
25
  "lodash": "^4.17.10",
@@ -29,28 +29,10 @@
29
29
  },
30
30
  "author": "",
31
31
  "license": "ISC",
32
- "gitHead": "007ac5f6be719f57eccb8af3c08e7014c2797f1e",
32
+ "gitHead": "e6dde692b33cb1d42c6b2958fff7520dc40ca82c",
33
33
  "module": "src/index.js",
34
34
  "exports": {
35
- ".": {
36
- "import": "./esm/element.js",
37
- "require": "./lib/index.js",
38
- "default": "./esm/element.js"
39
- },
40
- "./configure": {
41
- "import": "./esm/configure.js",
42
- "require": "./configure/lib/index.js",
43
- "default": "./esm/configure.js"
44
- },
45
- "./controller": {
46
- "import": "./esm/controller.js",
47
- "require": "./controller/lib/index.js",
48
- "default": "./esm/controller.js"
49
- },
50
- "./print": {
51
- "import": "./esm/print.js",
52
- "require": "./lib/print.js",
53
- "default": "./esm/print.js"
54
- }
35
+ ".": "./src/index.js",
36
+ "./print": "./src/print.js"
55
37
  }
56
38
  }