diff --git a/package.json b/package.json index a04184c458..454bdea5b2 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "publish:beta:prerelease": "lerna publish prerelease --dist-tag beta --preid beta --force-publish --ignore-scripts", "postinstall": "git config --local include.path ../.gitconfig", "clean-install": "git clean -xdf . && yarn install && ./scripts/build babel", - "check-pie-lib-updates": "lerna exec -- npm-check-updates '@pie-lib/*' --pre --target prerelease", - "update-pie-lib": "lerna exec -- npm-check-updates '@pie-lib/*' --pre --target prerelease -u", + "check-pie-lib-updates": "lerna exec -- npm-check-updates '@pie-lib/*' --target latest", + "update-pie-lib": "lerna exec -- npm-check-updates '@pie-lib/*' --target latest -u && node scripts/sync-pie-lib-resolutions.js", "check-pie-lib-next": "lerna exec -- npm-check-updates '@pie-lib/*' --pre --target prerelease --preid next", - "update-pie-lib-next": "lerna exec -- npm-check-updates '@pie-lib/*' --pre --target prerelease --preid next -u", + "update-pie-lib-next": "lerna exec -- npm-check-updates '@pie-lib/*' --pre --target prerelease --preid next -u && node scripts/sync-pie-lib-resolutions.js", "health:scan": "pie-health scan packages", "health:report": "pie-health report", "health:serve": "pie-health serve", @@ -89,27 +89,27 @@ "@jest/test-sequencer": "29.7.0", "@types/d3-array": "3.0.3", "@pie-lib/categorize": "2.0.2", - "@pie-lib/charting": "7.0.8", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/charting": "7.0.9", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/controller-utils": "2.0.2", "@pie-lib/correct-answer-toggle": "4.0.4", "@pie-lib/drag": "4.0.5", "@pie-lib/editable-html": "13.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/feedback": "2.0.2", - "@pie-lib/graphing-solution-set": "4.0.8", + "@pie-lib/graphing-solution-set": "4.0.9", "@pie-lib/graphing-utils": "3.0.2", - "@pie-lib/graphing": "4.0.9", + "@pie-lib/graphing": "4.0.10", "@pie-lib/icons": "4.0.3", - "@pie-lib/mask-markup": "3.0.8", + "@pie-lib/mask-markup": "3.0.9", "@pie-lib/math-evaluator": "4.0.2", "@pie-lib/math-input": "8.1.1", "@pie-lib/math-rendering-accessible": "5.0.2", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/math-toolbar": "3.0.4", - "@pie-lib/plot": "4.0.8", + "@pie-lib/plot": "4.0.9", "@pie-lib/render-ui": "6.1.2", - "@pie-lib/rubric": "2.0.8", + "@pie-lib/rubric": "2.0.9", "@pie-lib/scoring-config": "5.0.3", "@pie-lib/style-utils": "2.0.2", "@pie-lib/test-utils": "2.0.2", diff --git a/packages/boilerplate-item-type/configure/package.json b/packages/boilerplate-item-type/configure/package.json index dc62c85c33..b3c55f540b 100644 --- a/packages/boilerplate-item-type/configure/package.json +++ b/packages/boilerplate-item-type/configure/package.json @@ -11,8 +11,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/boilerplate-item-type/configure/src/index.js b/packages/boilerplate-item-type/configure/src/index.js index c1536d7e41..d7b74b76f6 100644 --- a/packages/boilerplate-item-type/configure/src/index.js +++ b/packages/boilerplate-item-type/configure/src/index.js @@ -101,6 +101,7 @@ export default class BoilerplateItemTypeConfigure extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/boilerplate-item-type/src/index.js b/packages/boilerplate-item-type/src/index.js index 909fe4cfae..6f7df426cc 100644 --- a/packages/boilerplate-item-type/src/index.js +++ b/packages/boilerplate-item-type/src/index.js @@ -70,6 +70,7 @@ export default class BoilerplateItemType extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/calculator/configure/package.json b/packages/calculator/configure/package.json index 5377b354be..70c9bfd42a 100644 --- a/packages/calculator/configure/package.json +++ b/packages/calculator/configure/package.json @@ -11,7 +11,7 @@ "@mui/material": "^7.3.4", "@pie-framework/material-ui-calculator": "4.0.0", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "react": "18.3.1", "react-dom": "18.3.1" }, diff --git a/packages/calculator/configure/src/index.js b/packages/calculator/configure/src/index.js index 1924009660..e651ff4106 100644 --- a/packages/calculator/configure/src/index.js +++ b/packages/calculator/configure/src/index.js @@ -48,6 +48,7 @@ export default class Calculator extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/calculator/src/index.js b/packages/calculator/src/index.js index 3227b40b4c..8ee664fcea 100644 --- a/packages/calculator/src/index.js +++ b/packages/calculator/src/index.js @@ -37,6 +37,7 @@ export default class Calculator extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/categorize/configure/package.json b/packages/categorize/configure/package.json index d0ab56b0db..3cf1679146 100644 --- a/packages/categorize/configure/package.json +++ b/packages/categorize/configure/package.json @@ -16,9 +16,9 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", "@pie-lib/categorize": "2.0.2", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/drag": "4.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "@pie-lib/translator": "4.0.2", diff --git a/packages/categorize/configure/src/defaults.js b/packages/categorize/configure/src/defaults.js index 2e59d5bdfd..6fccb47ce4 100644 --- a/packages/categorize/configure/src/defaults.js +++ b/packages/categorize/configure/src/defaults.js @@ -4,7 +4,7 @@ export default { model: { allowAlternateEnabled: true, allowMaxChoicesPerCategory: false, - allowMultiplePlacementsEnabled: multiplePlacements.enabled, + allowMultiplePlacementsEnabled: multiplePlacements.disabled, alternates: [], categories: [], categoriesPerRow: 2, diff --git a/packages/categorize/controller/src/defaults.js b/packages/categorize/controller/src/defaults.js index c94d38e139..852b9172d1 100644 --- a/packages/categorize/controller/src/defaults.js +++ b/packages/categorize/controller/src/defaults.js @@ -1,7 +1,7 @@ import { multiplePlacements } from './utils'; export default { - allowMultiplePlacementsEnabled: multiplePlacements.enabled, + allowMultiplePlacementsEnabled: multiplePlacements.disabled, alternates: [], categories: [], categoriesPerRow: 2, diff --git a/packages/categorize/package.json b/packages/categorize/package.json index 44ffd46f92..55015300ba 100644 --- a/packages/categorize/package.json +++ b/packages/categorize/package.json @@ -16,7 +16,7 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/categorize": "2.0.2", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/correct-answer-toggle": "4.0.4", "@pie-lib/drag": "4.0.5", "@pie-lib/math-rendering": "5.0.2", diff --git a/packages/charting/configure/package.json b/packages/charting/configure/package.json index c656e967d4..5f9b765a1c 100644 --- a/packages/charting/configure/package.json +++ b/packages/charting/configure/package.json @@ -12,9 +12,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/charting": "7.0.8", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/charting": "7.0.9", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", diff --git a/packages/charting/configure/src/index.js b/packages/charting/configure/src/index.js index 16e6140d8c..cf86449524 100644 --- a/packages/charting/configure/src/index.js +++ b/packages/charting/configure/src/index.js @@ -124,9 +124,14 @@ export default class GraphLinesConfigure extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } \ No newline at end of file diff --git a/packages/charting/package.json b/packages/charting/package.json index 59bc64aafe..7554896823 100644 --- a/packages/charting/package.json +++ b/packages/charting/package.json @@ -15,7 +15,7 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/charting": "7.0.8", + "@pie-lib/charting": "7.0.9", "@pie-lib/correct-answer-toggle": "4.0.4", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", diff --git a/packages/charting/src/index.js b/packages/charting/src/index.js index a1d78996ff..235d1d28cd 100644 --- a/packages/charting/src/index.js +++ b/packages/charting/src/index.js @@ -113,6 +113,7 @@ export default class Graphing extends HTMLElement { this._disconnectMathObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/complex-rubric/configure/package.json b/packages/complex-rubric/configure/package.json index 610708c917..4bd0343ab2 100644 --- a/packages/complex-rubric/configure/package.json +++ b/packages/complex-rubric/configure/package.json @@ -14,9 +14,9 @@ "@pie-element/multi-trait-rubric": "^8.1.0", "@pie-element/rubric": "^8.1.0", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/render-ui": "6.1.2", - "@pie-lib/rubric": "2.0.8", + "@pie-lib/rubric": "2.0.9", "debug": "^4.1.1", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", diff --git a/packages/complex-rubric/package.json b/packages/complex-rubric/package.json index f5cec0754b..890c008624 100644 --- a/packages/complex-rubric/package.json +++ b/packages/complex-rubric/package.json @@ -13,7 +13,7 @@ "@pie-element/multi-trait-rubric": "^8.1.0", "@pie-element/rubric": "^8.1.0", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/rubric": "2.0.8", + "@pie-lib/rubric": "2.0.9", "classnames": "^2.2.6", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/drag-in-the-blank/configure/package.json b/packages/drag-in-the-blank/configure/package.json index f942975e55..4c7ed5e544 100644 --- a/packages/drag-in-the-blank/configure/package.json +++ b/packages/drag-in-the-blank/configure/package.json @@ -12,9 +12,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/drag": "4.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-rendering": "5.0.2", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/drag-in-the-blank/configure/src/choices.jsx b/packages/drag-in-the-blank/configure/src/choices.jsx index b8e8d60669..7b8682bcea 100644 --- a/packages/drag-in-the-blank/configure/src/choices.jsx +++ b/packages/drag-in-the-blank/configure/src/choices.jsx @@ -134,12 +134,20 @@ export class Choices extends React.Component { onChange(newChoices); }; - onChoiceDone = (choiceId) => { + onChoiceDone = (choiceId, latestValue) => { const { onChange, model } = this.props; const { choices } = model; const currentChoice = (choices || []).find((c) => c.id === choiceId); - if (!currentChoice || !choiceIsEmpty(currentChoice)) { + // model.choices[i].value can be stale when the editor's onChange did not fire for the most recent edit + // (for example, image uploads). In that case, we want to use the latest value from the editor. + const effectiveValue = latestValue !== undefined ? latestValue : currentChoice && currentChoice.value; + + if (!currentChoice || !choiceIsEmpty({ value: effectiveValue })) { + if (currentChoice && currentChoice.value !== effectiveValue) { + const newChoices = (choices || []).map((c) => (c.id === choiceId ? { ...c, value: effectiveValue } : c)); + onChange(newChoices); + } this.setState({ focusedEl: undefined }); return; } @@ -270,12 +278,12 @@ export class Choices extends React.Component { this.onChoiceChanged(choice.value, val, choice.id); }} - onDone={() => { + onDone={(val) => { if (this.preventDone) { return; } - this.onChoiceDone(choice.id); + this.onChoiceDone(choice.id, val); }} onBlur={(e) => { const inInInsertCharacter = e.relatedTarget && e.relatedTarget.closest('.insert-character-dialog'); diff --git a/packages/drag-in-the-blank/configure/src/index.js b/packages/drag-in-the-blank/configure/src/index.js index aa6d009bce..fa94018b9c 100644 --- a/packages/drag-in-the-blank/configure/src/index.js +++ b/packages/drag-in-the-blank/configure/src/index.js @@ -158,9 +158,14 @@ export default class DragInTheBlank extends HTMLElement { }, 0); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/drag-in-the-blank/package.json b/packages/drag-in-the-blank/package.json index 9da9698f5a..4eb2cf9e0b 100644 --- a/packages/drag-in-the-blank/package.json +++ b/packages/drag-in-the-blank/package.json @@ -17,7 +17,7 @@ "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/correct-answer-toggle": "4.0.4", "@pie-lib/drag": "4.0.5", - "@pie-lib/mask-markup": "3.0.8", + "@pie-lib/mask-markup": "3.0.9", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "lodash-es": "^4.17.23", diff --git a/packages/drag-in-the-blank/src/index.js b/packages/drag-in-the-blank/src/index.js index a8a1d28b02..09fcce60dc 100644 --- a/packages/drag-in-the-blank/src/index.js +++ b/packages/drag-in-the-blank/src/index.js @@ -223,6 +223,7 @@ export default class DragInTheBlank extends HTMLElement { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/drawing-response/configure/package.json b/packages/drawing-response/configure/package.json index f199ac5f6b..e0ba6da5ba 100644 --- a/packages/drawing-response/configure/package.json +++ b/packages/drawing-response/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "debug": "^4.1.1", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", diff --git a/packages/drawing-response/configure/src/index.js b/packages/drawing-response/configure/src/index.js index 0ba3ce1f6b..06ecacb8fe 100644 --- a/packages/drawing-response/configure/src/index.js +++ b/packages/drawing-response/configure/src/index.js @@ -159,9 +159,14 @@ export default class DrawableResponseConfigure extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/drawing-response/src/index.js b/packages/drawing-response/src/index.js index 866fade5fd..50e0613f7c 100644 --- a/packages/drawing-response/src/index.js +++ b/packages/drawing-response/src/index.js @@ -67,6 +67,7 @@ export default class DrawingResponse extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/ebsr/configure/package.json b/packages/ebsr/configure/package.json index 9ef51aeeef..bde6db1f99 100644 --- a/packages/ebsr/configure/package.json +++ b/packages/ebsr/configure/package.json @@ -13,7 +13,7 @@ "@mui/material": "^7.3.4", "@pie-element/multiple-choice": "^13.2.0", "@pie-framework/pie-configure-events": "^1.2.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", "react": "18.3.1", diff --git a/packages/explicit-constructed-response/configure/package.json b/packages/explicit-constructed-response/configure/package.json index 7b2e0abb04..b2be2243c2 100644 --- a/packages/explicit-constructed-response/configure/package.json +++ b/packages/explicit-constructed-response/configure/package.json @@ -10,8 +10,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "classnames": "^2.2.6", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/explicit-constructed-response/configure/src/index.js b/packages/explicit-constructed-response/configure/src/index.js index a8d15c4317..f1c6788749 100644 --- a/packages/explicit-constructed-response/configure/src/index.js +++ b/packages/explicit-constructed-response/configure/src/index.js @@ -174,9 +174,14 @@ export default class ExplicitConstructedResponse extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/explicit-constructed-response/package.json b/packages/explicit-constructed-response/package.json index b3d2c61a72..fff5341074 100644 --- a/packages/explicit-constructed-response/package.json +++ b/packages/explicit-constructed-response/package.json @@ -16,7 +16,7 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/correct-answer-toggle": "4.0.4", - "@pie-lib/mask-markup": "3.0.8", + "@pie-lib/mask-markup": "3.0.9", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "@pie-lib/translator": "4.0.2", diff --git a/packages/explicit-constructed-response/src/index.js b/packages/explicit-constructed-response/src/index.js index 601591143d..11520913df 100644 --- a/packages/explicit-constructed-response/src/index.js +++ b/packages/explicit-constructed-response/src/index.js @@ -92,6 +92,7 @@ export default class InlineDropdown extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/extended-text-entry/configure/package.json b/packages/extended-text-entry/configure/package.json index 54cf2e0f9d..daafc5acc3 100644 --- a/packages/extended-text-entry/configure/package.json +++ b/packages/extended-text-entry/configure/package.json @@ -13,8 +13,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", "react": "18.3.1", diff --git a/packages/extended-text-entry/configure/src/index.js b/packages/extended-text-entry/configure/src/index.js index 1fb7de08fd..193829d11d 100644 --- a/packages/extended-text-entry/configure/src/index.js +++ b/packages/extended-text-entry/configure/src/index.js @@ -128,9 +128,14 @@ export default class ExtendedTextEntry extends HTMLElement { } } + connectedCallback() { + this.render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/extended-text-entry/package.json b/packages/extended-text-entry/package.json index 6750e0012c..27d1dc0b6a 100644 --- a/packages/extended-text-entry/package.json +++ b/packages/extended-text-entry/package.json @@ -14,8 +14,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "classnames": "^2.2.6", diff --git a/packages/extended-text-entry/src/index.js b/packages/extended-text-entry/src/index.js index a84e03cf70..94d7449757 100644 --- a/packages/extended-text-entry/src/index.js +++ b/packages/extended-text-entry/src/index.js @@ -119,6 +119,7 @@ export default class RootExtendedTextEntry extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/extended-text-entry/src/main.jsx b/packages/extended-text-entry/src/main.jsx index 386429273b..08357d8205 100644 --- a/packages/extended-text-entry/src/main.jsx +++ b/packages/extended-text-entry/src/main.jsx @@ -23,6 +23,7 @@ const StyledPrompt = styled(Typography)(({ theme }) => ({ color: color.text(), marginBottom: theme.spacing(2), fontSize: 'inherit', + display: 'block', })); const TeacherInstructions = styled('div')(({ theme }) => ({ diff --git a/packages/fraction-model/configure/package.json b/packages/fraction-model/configure/package.json index a4648af0dd..31928324fc 100644 --- a/packages/fraction-model/configure/package.json +++ b/packages/fraction-model/configure/package.json @@ -11,8 +11,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "debug": "^4.1.1", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", diff --git a/packages/fraction-model/configure/src/index.js b/packages/fraction-model/configure/src/index.js index fd441cda15..483d90db20 100644 --- a/packages/fraction-model/configure/src/index.js +++ b/packages/fraction-model/configure/src/index.js @@ -172,6 +172,7 @@ export default class FractionModelConfigure extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/fraction-model/package.json b/packages/fraction-model/package.json index 103d503938..1dbb5374f5 100644 --- a/packages/fraction-model/package.json +++ b/packages/fraction-model/package.json @@ -12,7 +12,7 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/correct-answer-toggle": "4.0.4", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", diff --git a/packages/fraction-model/src/index.js b/packages/fraction-model/src/index.js index 8ac4b40c78..b54c79a4dc 100644 --- a/packages/fraction-model/src/index.js +++ b/packages/fraction-model/src/index.js @@ -81,6 +81,7 @@ export default class FractionModel extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/graphing-solution-set/configure/package.json b/packages/graphing-solution-set/configure/package.json index b9d4400eda..cd26a24b91 100644 --- a/packages/graphing-solution-set/configure/package.json +++ b/packages/graphing-solution-set/configure/package.json @@ -12,9 +12,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", - "@pie-lib/graphing-solution-set": "4.0.8", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", + "@pie-lib/graphing-solution-set": "4.0.9", "@pie-lib/math-rendering": "5.0.2", "classnames": "^2.2.6", "debug": "^4.1.1", diff --git a/packages/graphing-solution-set/configure/src/index.js b/packages/graphing-solution-set/configure/src/index.js index 7f19e443e8..c79012bac0 100644 --- a/packages/graphing-solution-set/configure/src/index.js +++ b/packages/graphing-solution-set/configure/src/index.js @@ -158,9 +158,14 @@ export default class GraphLinesConfigure extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/graphing-solution-set/package.json b/packages/graphing-solution-set/package.json index 6299712b63..f371ec08d5 100644 --- a/packages/graphing-solution-set/package.json +++ b/packages/graphing-solution-set/package.json @@ -16,9 +16,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/correct-answer-toggle": "4.0.4", - "@pie-lib/graphing-solution-set": "4.0.8", + "@pie-lib/graphing-solution-set": "4.0.9", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "classnames": "^2.2.6", diff --git a/packages/graphing-solution-set/src/index.js b/packages/graphing-solution-set/src/index.js index 61911438d2..13ee54cbbd 100644 --- a/packages/graphing-solution-set/src/index.js +++ b/packages/graphing-solution-set/src/index.js @@ -144,6 +144,7 @@ export default class Graphing extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/graphing/configure/package.json b/packages/graphing/configure/package.json index cf8428fe4b..941f0780a6 100644 --- a/packages/graphing/configure/package.json +++ b/packages/graphing/configure/package.json @@ -12,9 +12,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", - "@pie-lib/graphing": "4.0.9", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", + "@pie-lib/graphing": "4.0.10", "@pie-lib/math-rendering": "5.0.2", "classnames": "^2.2.6", "debug": "^4.1.1", diff --git a/packages/graphing/configure/src/index.js b/packages/graphing/configure/src/index.js index 4580eefef7..6fa028cc34 100644 --- a/packages/graphing/configure/src/index.js +++ b/packages/graphing/configure/src/index.js @@ -186,9 +186,14 @@ export default class GraphLinesConfigure extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/graphing/package.json b/packages/graphing/package.json index 708c625098..a544db8da1 100644 --- a/packages/graphing/package.json +++ b/packages/graphing/package.json @@ -16,7 +16,7 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/correct-answer-toggle": "4.0.4", - "@pie-lib/graphing": "4.0.9", + "@pie-lib/graphing": "4.0.10", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "classnames": "^2.2.6", diff --git a/packages/graphing/src/index.js b/packages/graphing/src/index.js index c6a2224c2a..1641326ae1 100644 --- a/packages/graphing/src/index.js +++ b/packages/graphing/src/index.js @@ -102,6 +102,7 @@ export default class Graphing extends HTMLElement { this._disconnectMathObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/hotspot/configure/package.json b/packages/hotspot/configure/package.json index 2687a3d926..24686c28ee 100644 --- a/packages/hotspot/configure/package.json +++ b/packages/hotspot/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "debug": "^4.1.1", "konva": "8.3.0", "lodash-es": "^4.17.23", diff --git a/packages/hotspot/configure/src/index.js b/packages/hotspot/configure/src/index.js index a43e391ce2..5e330ca48e 100644 --- a/packages/hotspot/configure/src/index.js +++ b/packages/hotspot/configure/src/index.js @@ -200,9 +200,14 @@ export default class HotspotConfigure extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/hotspot/src/index.js b/packages/hotspot/src/index.js index f59aa34cb7..de4d22a4fe 100644 --- a/packages/hotspot/src/index.js +++ b/packages/hotspot/src/index.js @@ -221,6 +221,7 @@ export default class Hotspot extends HTMLElement { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/image-cloze-association/configure/package.json b/packages/image-cloze-association/configure/package.json index 62af95817e..5b9f37a361 100644 --- a/packages/image-cloze-association/configure/package.json +++ b/packages/image-cloze-association/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "debug": "^4.1.1", "prop-types": "^15.8.1", "react": "18.3.1", diff --git a/packages/image-cloze-association/configure/src/index.js b/packages/image-cloze-association/configure/src/index.js index fbfd611851..9f70342efc 100644 --- a/packages/image-cloze-association/configure/src/index.js +++ b/packages/image-cloze-association/configure/src/index.js @@ -106,9 +106,14 @@ export default class ImageClozeAssociationConfigure extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/image-cloze-association/src/index.js b/packages/image-cloze-association/src/index.js index 05f8559b0c..3a5eb88677 100644 --- a/packages/image-cloze-association/src/index.js +++ b/packages/image-cloze-association/src/index.js @@ -222,6 +222,7 @@ export default class ImageClozeAssociation extends HTMLElement { if (this._root) { this._root.unmount(); + this._root = null; } } diff --git a/packages/inline-dropdown/configure/package.json b/packages/inline-dropdown/configure/package.json index 5d6ee6f7c8..ae949f33d5 100644 --- a/packages/inline-dropdown/configure/package.json +++ b/packages/inline-dropdown/configure/package.json @@ -10,8 +10,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "classnames": "^2.2.6", diff --git a/packages/inline-dropdown/configure/src/__tests__/inline-dropdown-toolbar.test.jsx b/packages/inline-dropdown/configure/src/__tests__/inline-dropdown-toolbar.test.jsx index b2bdaec436..8d68dd49b8 100644 --- a/packages/inline-dropdown/configure/src/__tests__/inline-dropdown-toolbar.test.jsx +++ b/packages/inline-dropdown/configure/src/__tests__/inline-dropdown-toolbar.test.jsx @@ -656,6 +656,45 @@ describe('RespAreaToolbar', () => { }); describe('Event Handlers', () => { + describe('finishEditing', () => { + it('should call onDone with editor HTML and set preventDone', () => { + const localOnAddChoice = jest.fn(); + const localEditor = { + ...editor, + commands: { + ...editor.commands, + refreshResponseArea: jest.fn(), + }, + }; + const instance = createInstance({ + onAddChoice: localOnAddChoice, + editor: localEditor, + }); + instance.editorRef = { + getHTML: jest.fn().mockReturnValue('
finished edit
'), + }; + instance.preventDone = false; + + instance.finishEditing(); + + expect(localOnAddChoice).toHaveBeenCalledWith('0', '
finished edit
', -1); + expect(instance.preventDone).toBe(true); + }); + + it('should handle empty HTML from editor', () => { + const localOnAddChoice = jest.fn(); + const instance = createInstance({ onAddChoice: localOnAddChoice }); + instance.editorRef = { + getHTML: jest.fn().mockReturnValue(''), + }; + + instance.finishEditing(); + + expect(localOnAddChoice).not.toHaveBeenCalled(); + expect(instance.preventDone).toBe(true); + }); + }); + describe('onKeyDown', () => { it('should call onDone and return true when Enter is pressed', () => { const localOnAddChoice = jest.fn(); @@ -842,13 +881,75 @@ describe('RespAreaToolbar', () => { expect(menuItems.length).toBe(0); }); - it('should render Add button', () => { + it('should render Add button when not editing a choice', () => { + const instance = createInstance(); + instance.state.toolbarStyle = { position: 'absolute', top: '100px', left: '50px' }; + instance.state.editedChoiceIndex = -1; + + const wrapper = render(<>{instance.render()}); + + const addButton = wrapper.container.querySelector('[aria-label="Add"]'); + expect(addButton).toBeTruthy(); + expect(addButton.querySelector('[data-testid="AddIcon"]')).toBeTruthy(); + }); + + it('should render Check icon on toolbar button when editing a choice', () => { const instance = createInstance(); instance.state.toolbarStyle = { position: 'absolute', top: '100px', left: '50px' }; + instance.state.editedChoiceIndex = 1; + + const wrapper = render(<>{instance.render()}); + + const toolbarButton = wrapper.container.querySelector('[aria-label="Add"]'); + expect(toolbarButton).toBeTruthy(); + expect(toolbarButton.querySelector('[data-testid="CheckIcon"]')).toBeTruthy(); + expect(toolbarButton.querySelector('[data-testid="AddIcon"]')).toBeNull(); + }); + + it('should finish editing when toolbar button is clicked while editing', () => { + const localOnAddChoice = jest.fn(); + const localEditor = { + ...editor, + commands: { + ...editor.commands, + refreshResponseArea: jest.fn(), + }, + }; + const instance = createInstance({ + onAddChoice: localOnAddChoice, + editor: localEditor, + }); + instance.state.toolbarStyle = { position: 'absolute', top: '100px', left: '50px' }; + instance.state.editedChoiceIndex = 1; + instance.editorRef = { + getHTML: jest.fn().mockReturnValue('
updated dog
'), + }; + + const wrapper = render(<>{instance.render()}); + fireEvent.click(wrapper.container.querySelector('[aria-label="Add"]')); + + expect(localOnAddChoice).toHaveBeenCalledWith('0', '
updated dog
', 1); + expect(instance.preventDone).toBe(true); + }); + + it('should call onAddChoice when toolbar button is clicked while not editing', () => { + const mockTr = { isDone: false, deleteSelection: jest.fn() }; + const localEditor = { + ...editor, + state: { + ...editor.state, + tr: mockTr, + }, + }; + const instance = createInstance({ editor: localEditor }); + instance.state.toolbarStyle = { position: 'absolute', top: '100px', left: '50px' }; + instance.state.editedChoiceIndex = -1; const wrapper = render(<>{instance.render()}); + fireEvent.click(wrapper.container.querySelector('[aria-label="Add"]')); - expect(wrapper.container.querySelector('[aria-label="Add"]')).toBeTruthy(); + expect(mockTr.isDone).toBe(true); + expect(localEditor.view.dispatch).toHaveBeenCalledWith(mockTr); }); it('should render toolbar above other elements with a high z-index', () => { diff --git a/packages/inline-dropdown/configure/src/index.js b/packages/inline-dropdown/configure/src/index.js index 61c812bd96..63625b5020 100644 --- a/packages/inline-dropdown/configure/src/index.js +++ b/packages/inline-dropdown/configure/src/index.js @@ -143,9 +143,14 @@ export default class InlineDropdown extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/inline-dropdown/configure/src/inline-dropdown-toolbar.jsx b/packages/inline-dropdown/configure/src/inline-dropdown-toolbar.jsx index dbe82e8ff9..2fc7fcab54 100644 --- a/packages/inline-dropdown/configure/src/inline-dropdown-toolbar.jsx +++ b/packages/inline-dropdown/configure/src/inline-dropdown-toolbar.jsx @@ -150,7 +150,7 @@ const RespArea = styled(EditableHtml)(({ theme }) => ({ }, })); -const AddButton = styled(IconButton)(({ theme }) => ({ +const ToolbarButton = styled(IconButton)(({ theme }) => ({ fontSize: theme.typography.fontSize + 2, padding: theme.spacing(0.5), color: theme.palette.common.black, @@ -307,12 +307,16 @@ class RespAreaToolbar extends React.Component { this.setState({ editedChoiceIndex: index }); }; + finishEditing = () => { + const html = this.editorRef.getHTML() || ''; + + this.onDone(html); + this.preventDone = true; + }; + onKeyDown = (event) => { if (event.key === 'Enter') { - const html = this.editorRef.getHTML() || ''; - - this.onDone(html); - this.preventDone = true; + this.finishEditing(); // Cancelling event return true; @@ -350,7 +354,7 @@ class RespAreaToolbar extends React.Component { baseInputConfiguration = {}, responseAreaInputConfiguration = {}, } = this.props; - const { respAreaMarkup, toolbarStyle } = this.state; + const { respAreaMarkup, toolbarStyle, editedChoiceIndex } = this.state; if (!toolbarStyle) { return null; @@ -420,13 +424,13 @@ class RespAreaToolbar extends React.Component { uploadSoundSupport={uploadSoundSupport} mathMlOptions={mathMlOptions} /> - this.onAddChoice()} + editedChoiceIndex >= 0 ? this.finishEditing() : this.onAddChoice()} size="small" aria-label="Add" > - - + {editedChoiceIndex >= 0 ? : } + {choices && ( diff --git a/packages/inline-dropdown/configure/src/main.jsx b/packages/inline-dropdown/configure/src/main.jsx index 8b41bb6ce5..4349b7fcce 100644 --- a/packages/inline-dropdown/configure/src/main.jsx +++ b/packages/inline-dropdown/configure/src/main.jsx @@ -272,8 +272,6 @@ export class Main extends React.Component { respAreaChoices[index] = []; } - - // check for duplicate answer, but exclude the one that is currently edited if ((respAreaChoices[index] || []).find((r, idx) => r.label === label && idx !== choiceIndex)) { showWarning('Duplicate answers are not allowed.'); diff --git a/packages/inline-dropdown/package.json b/packages/inline-dropdown/package.json index f6e23b3fdb..4a16b88546 100644 --- a/packages/inline-dropdown/package.json +++ b/packages/inline-dropdown/package.json @@ -16,7 +16,7 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/correct-answer-toggle": "4.0.4", - "@pie-lib/mask-markup": "3.0.8", + "@pie-lib/mask-markup": "3.0.9", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", "lodash-es": "^4.17.23", diff --git a/packages/inline-dropdown/src/index.js b/packages/inline-dropdown/src/index.js index 70e5a5c490..1ee8e1be57 100644 --- a/packages/inline-dropdown/src/index.js +++ b/packages/inline-dropdown/src/index.js @@ -85,6 +85,7 @@ export default class RootInlineDropdown extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/likert/configure/package.json b/packages/likert/configure/package.json index c54f1dae92..f8e1787005 100644 --- a/packages/likert/configure/package.json +++ b/packages/likert/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "prop-types": "^15.8.1", diff --git a/packages/likert/configure/src/index.js b/packages/likert/configure/src/index.js index 3ef7c36053..55143f82ee 100644 --- a/packages/likert/configure/src/index.js +++ b/packages/likert/configure/src/index.js @@ -106,9 +106,14 @@ export default class Likert extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/likert/src/index.js b/packages/likert/src/index.js index 2f5a670071..648810382e 100644 --- a/packages/likert/src/index.js +++ b/packages/likert/src/index.js @@ -60,6 +60,7 @@ export default class Likert extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/match-list/src/index.js b/packages/match-list/src/index.js index 258210b387..f021021ad1 100644 --- a/packages/match-list/src/index.js +++ b/packages/match-list/src/index.js @@ -85,6 +85,7 @@ export default class MatchList extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/match/configure/package.json b/packages/match/configure/package.json index ed497d1053..a858034193 100644 --- a/packages/match/configure/package.json +++ b/packages/match/configure/package.json @@ -13,9 +13,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/drag": "4.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "@pie-lib/test-utils": "2.0.2", "classnames": "^2.2.6", diff --git a/packages/match/configure/src/index.js b/packages/match/configure/src/index.js index 0925e5772b..8475b5ab8a 100644 --- a/packages/match/configure/src/index.js +++ b/packages/match/configure/src/index.js @@ -160,9 +160,14 @@ export default class MatchConfigure extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/match/src/index.js b/packages/match/src/index.js index 676b8e0834..cb356fbdd9 100644 --- a/packages/match/src/index.js +++ b/packages/match/src/index.js @@ -79,6 +79,7 @@ export default class Match extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/math-inline/configure/package.json b/packages/math-inline/configure/package.json index b0b927eda3..c65455c5c3 100644 --- a/packages/math-inline/configure/package.json +++ b/packages/math-inline/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-input": "8.1.1", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/math-toolbar": "3.0.4", diff --git a/packages/math-inline/configure/src/index.js b/packages/math-inline/configure/src/index.js index 81298c9d7e..050b56893d 100644 --- a/packages/math-inline/configure/src/index.js +++ b/packages/math-inline/configure/src/index.js @@ -142,9 +142,14 @@ export default class MathInlineConfigure extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/math-inline/src/index.js b/packages/math-inline/src/index.js index 9edcea12ac..bdafaa8658 100644 --- a/packages/math-inline/src/index.js +++ b/packages/math-inline/src/index.js @@ -91,6 +91,7 @@ export default class MathInline extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/math-templated/configure/package.json b/packages/math-templated/configure/package.json index a3767a7a5d..26a745c19a 100644 --- a/packages/math-templated/configure/package.json +++ b/packages/math-templated/configure/package.json @@ -11,8 +11,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/math-toolbar": "3.0.4", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", diff --git a/packages/math-templated/configure/src/index.js b/packages/math-templated/configure/src/index.js index fa8db79441..46267eb158 100644 --- a/packages/math-templated/configure/src/index.js +++ b/packages/math-templated/configure/src/index.js @@ -177,9 +177,14 @@ export default class MathTemplateConfigure extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/math-templated/package.json b/packages/math-templated/package.json index efee5d705c..6d7352db52 100644 --- a/packages/math-templated/package.json +++ b/packages/math-templated/package.json @@ -13,7 +13,7 @@ "@mui/material": "^7.3.4", "@pie-framework/pie-player-events": "^0.1.0", "@pie-lib/correct-answer-toggle": "4.0.4", - "@pie-lib/mask-markup": "3.0.8", + "@pie-lib/mask-markup": "3.0.9", "@pie-lib/math-input": "8.1.1", "@pie-lib/math-rendering": "5.0.2", "@pie-lib/render-ui": "6.1.2", diff --git a/packages/math-templated/src/index.js b/packages/math-templated/src/index.js index 33275396ac..9f5be66b82 100644 --- a/packages/math-templated/src/index.js +++ b/packages/math-templated/src/index.js @@ -79,6 +79,7 @@ export default class MathTemplated extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/matrix/configure/package.json b/packages/matrix/configure/package.json index ef5ca619d7..958386bad6 100644 --- a/packages/matrix/configure/package.json +++ b/packages/matrix/configure/package.json @@ -12,8 +12,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "prop-types": "^15.8.1", diff --git a/packages/matrix/configure/src/index.js b/packages/matrix/configure/src/index.js index f37ca62fad..492d0c4ca8 100644 --- a/packages/matrix/configure/src/index.js +++ b/packages/matrix/configure/src/index.js @@ -101,9 +101,14 @@ export default class Matrix extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/matrix/src/index.js b/packages/matrix/src/index.js index ab4a9df371..23aa0bf632 100644 --- a/packages/matrix/src/index.js +++ b/packages/matrix/src/index.js @@ -74,6 +74,7 @@ export default class Matrix extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/multi-trait-rubric/configure/package.json b/packages/multi-trait-rubric/configure/package.json index 39b52effb6..6183b48422 100644 --- a/packages/multi-trait-rubric/configure/package.json +++ b/packages/multi-trait-rubric/configure/package.json @@ -11,9 +11,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/drag": "4.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/multi-trait-rubric/configure/src/index.js b/packages/multi-trait-rubric/configure/src/index.js index 01b995d508..8100b34fc3 100644 --- a/packages/multi-trait-rubric/configure/src/index.js +++ b/packages/multi-trait-rubric/configure/src/index.js @@ -156,9 +156,14 @@ export default class MultiTraitRubricElement extends HTMLElement { } } + connectedCallback() { + this._render(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/multi-trait-rubric/src/index.js b/packages/multi-trait-rubric/src/index.js index 75f6e0362f..d452c74572 100644 --- a/packages/multi-trait-rubric/src/index.js +++ b/packages/multi-trait-rubric/src/index.js @@ -10,6 +10,44 @@ export default class MultiTraitRubric extends HTMLElement { this._model = {}; this._session = null; this._root = null; + this._mathObserver = null; + this._mathRenderPending = false; + } + + // React commits asynchronously, so a queueMicrotask(renderMath) can run before + // the LaTeX spans are in the DOM and leave raw LaTeX on first render — this is + // especially visible when this element is mounted inside complex-rubric, which + // swaps its innerHTML and re-defines the inner element. Observing the DOM and + // typesetting after each commit keeps math in sync regardless of timing. + _scheduleMathRender = () => { + if (this._mathRenderPending) return; + this._mathRenderPending = true; + + requestAnimationFrame(() => { + if (this._mathObserver) { + this._mathObserver.disconnect(); + } + renderMath(this); + this._mathRenderPending = false; + setTimeout(() => { + if (this._mathObserver) { + this._mathObserver.observe(this, { childList: true, subtree: true }); + } + }, 50); + }); + }; + + _initMathObserver() { + if (this._mathObserver) return; + this._mathObserver = new MutationObserver(this._scheduleMathRender); + this._mathObserver.observe(this, { childList: true, subtree: true }); + } + + _disconnectMathObserver() { + if (this._mathObserver) { + this._mathObserver.disconnect(); + this._mathObserver = null; + } } set model(s) { @@ -28,24 +66,26 @@ export default class MultiTraitRubric extends HTMLElement { } connectedCallback() { + this._initMathObserver(); this._render(); } _render() { + this._initMathObserver(); + const el = React.createElement(Main, { model: this._model, session: this._session }); if (!this._root) { this._root = createRoot(this); } this._root.render(el); - queueMicrotask(() => { - renderMath(this); - }); } disconnectedCallback() { + this._disconnectMathObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/multiple-choice/configure/package.json b/packages/multiple-choice/configure/package.json index 929e80d87d..0520ac5d57 100644 --- a/packages/multiple-choice/configure/package.json +++ b/packages/multiple-choice/configure/package.json @@ -10,8 +10,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/multiple-choice/configure/src/index.js b/packages/multiple-choice/configure/src/index.js index 358e83ab79..d233b75669 100644 --- a/packages/multiple-choice/configure/src/index.js +++ b/packages/multiple-choice/configure/src/index.js @@ -223,6 +223,7 @@ export default class MultipleChoice extends HTMLElement { log('connectedCallback - Component connected to DOM'); log('connectedCallback - Model:', this._model ? 'present' : 'missing'); log('connectedCallback - Configuration:', this._configuration ? 'present' : 'missing'); + this._render(); } disconnectedCallback() { diff --git a/packages/multiple-choice/src/index.js b/packages/multiple-choice/src/index.js index 0935bf7d4c..309432dd7a 100644 --- a/packages/multiple-choice/src/index.js +++ b/packages/multiple-choice/src/index.js @@ -405,6 +405,7 @@ export default class MultipleChoice extends HTMLElement { if (this._root) { this._root.unmount(); + this._root = null; } } diff --git a/packages/number-line/configure/package.json b/packages/number-line/configure/package.json index bf1249f65d..83afb8a818 100644 --- a/packages/number-line/configure/package.json +++ b/packages/number-line/configure/package.json @@ -10,8 +10,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "lodash-es": "^4.17.23", "react": "18.3.1", diff --git a/packages/number-line/configure/src/index.js b/packages/number-line/configure/src/index.js index 5c73467183..193d33f865 100644 --- a/packages/number-line/configure/src/index.js +++ b/packages/number-line/configure/src/index.js @@ -181,9 +181,14 @@ export default class NumberLine extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._rerender(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/number-line/src/index.js b/packages/number-line/src/index.js index 91aa608c40..318469b9a7 100644 --- a/packages/number-line/src/index.js +++ b/packages/number-line/src/index.js @@ -210,6 +210,7 @@ export default class NumberLine extends HTMLElement { this._disconnectMathObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/passage/configure/package.json b/packages/passage/configure/package.json index 7e5c81798d..b37f756d0d 100644 --- a/packages/passage/configure/package.json +++ b/packages/passage/configure/package.json @@ -13,8 +13,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "lodash-es": "^4.17.23", "prop-types": "^15.8.1", "react": "18.3.1", diff --git a/packages/passage/configure/src/index.js b/packages/passage/configure/src/index.js index abef2a2a40..68f5b91475 100644 --- a/packages/passage/configure/src/index.js +++ b/packages/passage/configure/src/index.js @@ -93,6 +93,7 @@ export default class PassageConfigure extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/passage/src/index.js b/packages/passage/src/index.js index 6ede3598c9..c85020ddfe 100644 --- a/packages/passage/src/index.js +++ b/packages/passage/src/index.js @@ -146,6 +146,7 @@ export default class PiePassage extends HTMLElement { this._disconnectPlayerObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/placement-ordering/configure/package.json b/packages/placement-ordering/configure/package.json index 881d61a1a1..6b8e34b87c 100644 --- a/packages/placement-ordering/configure/package.json +++ b/packages/placement-ordering/configure/package.json @@ -11,9 +11,9 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", + "@pie-lib/config-ui": "13.0.9", "@pie-lib/drag": "4.0.5", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/placement-ordering/configure/src/index.js b/packages/placement-ordering/configure/src/index.js index b6b145c5a1..2fbf04a5f9 100644 --- a/packages/placement-ordering/configure/src/index.js +++ b/packages/placement-ordering/configure/src/index.js @@ -161,9 +161,14 @@ export default class PlacementOrdering extends HTMLElement { this._root.render(element); } + connectedCallback() { + this._rerender(); + } + disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/placement-ordering/src/index.js b/packages/placement-ordering/src/index.js index 2496fef3d5..e9d986e442 100644 --- a/packages/placement-ordering/src/index.js +++ b/packages/placement-ordering/src/index.js @@ -113,12 +113,14 @@ export default class Ordering extends HTMLElement { connectedCallback() { this._initMathObserver(); + this.render(); } disconnectedCallback() { this._disconnectMathObserver(); if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/protractor/src/index.js b/packages/protractor/src/index.js index c8d258ca85..1ddff3cdbb 100644 --- a/packages/protractor/src/index.js +++ b/packages/protractor/src/index.js @@ -28,6 +28,7 @@ export default class Protractor extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/rubric/configure/package.json b/packages/rubric/configure/package.json index 18edf0b2ce..d7583e18dd 100644 --- a/packages/rubric/configure/package.json +++ b/packages/rubric/configure/package.json @@ -11,10 +11,10 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/render-ui": "6.1.2", - "@pie-lib/rubric": "2.0.8", + "@pie-lib/rubric": "2.0.9", "debug": "^4.1.1", "react": "18.3.1", "react-dom": "18.3.1" diff --git a/packages/rubric/src/index.js b/packages/rubric/src/index.js index 1866e74719..5008118e78 100644 --- a/packages/rubric/src/index.js +++ b/packages/rubric/src/index.js @@ -10,6 +10,44 @@ export default class RubricRender extends HTMLElement { debug.log('constructor called'); this.onModelChanged = this.onModelChanged.bind(this); this._root = null; + this._mathObserver = null; + this._mathRenderPending = false; + } + + // React commits asynchronously, so a queueMicrotask(renderMath) can run before + // the LaTeX spans are in the DOM and leave raw LaTeX on first render — this is + // especially visible when rubric is mounted inside complex-rubric, which swaps + // its innerHTML and re-defines the inner element. Observing the DOM and + // typesetting after each commit keeps math in sync regardless of timing. + _scheduleMathRender = () => { + if (this._mathRenderPending) return; + this._mathRenderPending = true; + + requestAnimationFrame(() => { + if (this._mathObserver) { + this._mathObserver.disconnect(); + } + renderMath(this); + this._mathRenderPending = false; + setTimeout(() => { + if (this._mathObserver) { + this._mathObserver.observe(this, { childList: true, subtree: true }); + } + }, 50); + }); + }; + + _initMathObserver() { + if (this._mathObserver) return; + this._mathObserver = new MutationObserver(this._scheduleMathRender); + this._mathObserver.observe(this, { childList: true, subtree: true }); + } + + _disconnectMathObserver() { + if (this._mathObserver) { + this._mathObserver.disconnect(); + this._mathObserver = null; + } } set model(s) { @@ -23,24 +61,25 @@ export default class RubricRender extends HTMLElement { } connectedCallback() { + this._initMathObserver(); this._render(); } _render() { if (this._model) { + this._initMathObserver(); + const el = React.createElement(Rubric, { value: this._model }); if (!this._root) { this._root = createRoot(this); } this._root.render(el); - queueMicrotask(() => { - renderMath(this); - }); } } disconnectedCallback() { + this._disconnectMathObserver(); if (this._root) { this._root.unmount(); } diff --git a/packages/ruler/configure/package.json b/packages/ruler/configure/package.json index ae19b5f896..c3e84fc2db 100644 --- a/packages/ruler/configure/package.json +++ b/packages/ruler/configure/package.json @@ -10,7 +10,7 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8" + "@pie-lib/config-ui": "13.0.9" }, "author": "", "license": "ISC" diff --git a/packages/ruler/configure/src/index.js b/packages/ruler/configure/src/index.js index effac4ac1f..9000f6a11e 100644 --- a/packages/ruler/configure/src/index.js +++ b/packages/ruler/configure/src/index.js @@ -65,6 +65,7 @@ export default class RulerConfigure extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/ruler/src/index.js b/packages/ruler/src/index.js index 6db9700ce3..4cce237d62 100644 --- a/packages/ruler/src/index.js +++ b/packages/ruler/src/index.js @@ -39,6 +39,7 @@ export default class Ruler extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/select-text/configure/package.json b/packages/select-text/configure/package.json index c3090a155c..0169aa0548 100644 --- a/packages/select-text/configure/package.json +++ b/packages/select-text/configure/package.json @@ -11,8 +11,8 @@ "@mui/icons-material": "^7.3.4", "@mui/material": "^7.3.4", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/config-ui": "13.0.8", - "@pie-lib/editable-html-tip-tap": "2.1.6", + "@pie-lib/config-ui": "13.0.9", + "@pie-lib/editable-html-tip-tap": "2.1.7", "@pie-lib/text-select": "3.0.4", "debug": "^4.1.1", "lodash-es": "^4.17.23", diff --git a/packages/select-text/configure/src/index.js b/packages/select-text/configure/src/index.js index 752dbea6e9..82141e8689 100644 --- a/packages/select-text/configure/src/index.js +++ b/packages/select-text/configure/src/index.js @@ -138,6 +138,7 @@ export default class SelectTextConfigure extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/packages/select-text/src/index.js b/packages/select-text/src/index.js index 3801ee2d5a..0925bb20cb 100644 --- a/packages/select-text/src/index.js +++ b/packages/select-text/src/index.js @@ -98,6 +98,7 @@ export default class SelectText extends HTMLElement { disconnectedCallback() { if (this._root) { this._root.unmount(); + this._root = null; } } } diff --git a/pslb/pslb.config.js b/pslb/pslb.config.js index ea7c18b2b5..8d723a946b 100644 --- a/pslb/pslb.config.js +++ b/pslb/pslb.config.js @@ -44,12 +44,12 @@ module.exports = { libs: { repository: 'pie-framework/pie-elements', packages: [ - { name: '@pie-lib/drag-module', version: '^4.0.11' }, - { name: '@pie-lib/math-rendering-module', version: '^5.0.11' }, - { name: '@pie-lib/math-edit-module', version: '^4.2.6' }, - { name: '@pie-lib/shared-module', version: '^5.2.6' }, - { name: '@pie-lib/editable-html-module', version: '^7.1.8' }, - { name: '@pie-lib/config-module', version: '^4.0.11' }, + { name: '@pie-lib/drag-module', version: '^4.0.12' }, + { name: '@pie-lib/math-rendering-module', version: '^5.0.12' }, + { name: '@pie-lib/math-edit-module', version: '^4.2.7' }, + { name: '@pie-lib/shared-module', version: '^5.2.7' }, + { name: '@pie-lib/editable-html-module', version: '^7.1.9' }, + { name: '@pie-lib/config-module', version: '^4.0.12' }, ], }, }; diff --git a/scripts/sync-pie-lib-resolutions.js b/scripts/sync-pie-lib-resolutions.js new file mode 100644 index 0000000000..245cd84dce --- /dev/null +++ b/scripts/sync-pie-lib-resolutions.js @@ -0,0 +1,100 @@ +#!/usr/bin/env node +/** + * Sync the root package.json `resolutions` block with the @pie-lib/* versions + * declared across the workspace packages. + * + * Run automatically after `npm-check-updates` bumps every package's @pie-lib/* + * deps (see the `update-pie-lib` / `update-pie-lib-next` npm scripts). It: + * 1. Collects the version each @pie-lib/* package uses across packages/*. + * 2. Fails (exit 1) if any @pie-lib/* package is declared at more than one + * version, since that defeats deduping under yarn/Bun. + * 3. Rewrites the @pie-lib/* entries in root `resolutions`: + * - direct deps -> the exact version used in the workspace + * - transitive-only deps already in resolutions but not declared in any + * package (e.g. editable-html, math-evaluator, plot, scoring-config, + * style-utils, math-rendering-accessible) -> latest published version. + */ +const fs = require('fs'); +const path = require('path'); +const { execSync } = require('child_process'); + +const root = path.resolve(__dirname, '..'); +const packagesDir = path.join(root, 'packages'); +const subDirs = ['', 'configure', 'controller', 'print']; + +const stripRange = (v) => v.replace(/^[\^~]/, ''); + +const collectDeclared = () => { + const declared = {}; + for (const dir of fs.readdirSync(packagesDir)) { + for (const sub of subDirs) { + const pkgPath = path.join(packagesDir, dir, sub, 'package.json'); + if (!fs.existsSync(pkgPath)) continue; + let pkg; + try { + pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); + } catch (e) { + console.error(`[sync-resolutions] could not parse ${pkgPath}: ${e.message}`); + process.exit(1); + } + const deps = { + ...pkg.dependencies, + ...pkg.devDependencies, + ...pkg.peerDependencies, + }; + for (const [name, ver] of Object.entries(deps)) { + if (!name.startsWith('@pie-lib/')) continue; + (declared[name] = declared[name] || new Set()).add(stripRange(ver)); + } + } + } + return declared; +}; + +const declared = collectDeclared(); + +const mismatches = Object.entries(declared).filter(([, versions]) => versions.size > 1); +if (mismatches.length) { + console.error('[sync-resolutions] pie-lib version mismatch across packages:'); + for (const [name, versions] of mismatches) { + console.error(` ${name}: ${[...versions].sort().join(', ')}`); + } + console.error('[sync-resolutions] resolve these before syncing resolutions.'); + process.exit(1); +} + +const rootPkgPath = path.join(root, 'package.json'); +const rootPkg = JSON.parse(fs.readFileSync(rootPkgPath, 'utf8')); +const resolutions = rootPkg.resolutions || {}; + +const changes = []; +for (const key of Object.keys(resolutions)) { + if (!key.startsWith('@pie-lib/')) continue; + + let next; + if (declared[key]) { + next = [...declared[key]][0]; + } else { + try { + next = execSync(`npm view ${key} version`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim(); + } catch (e) { + console.warn(`[sync-resolutions] could not fetch latest for ${key}; leaving as-is`); + continue; + } + } + + if (next && next !== resolutions[key]) { + changes.push(` ${key}: ${resolutions[key]} -> ${next}`); + resolutions[key] = next; + } +} + +if (!changes.length) { + console.log('[sync-resolutions] resolutions already in sync; no changes.'); + process.exit(0); +} + +rootPkg.resolutions = resolutions; +fs.writeFileSync(rootPkgPath, JSON.stringify(rootPkg, null, 2) + '\n'); +console.log('[sync-resolutions] updated @pie-lib/* resolutions:'); +console.log(changes.join('\n')); diff --git a/yarn.lock b/yarn.lock index 1b6665adaf..67aa5f46f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2833,10 +2833,10 @@ debug "^4.1.1" lodash-es "^4.17.23" -"@pie-lib/charting@7.0.8": - version "7.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/charting/-/charting-7.0.8.tgz#a5bb8b3ef0325af0492f72e533c9f25ba500f6e1" - integrity sha512-5I9pfrsTS6exVqdJjX7c3Zkv090iPPRcCwGUuVq7GvPRnVHQaqeR/xocawxuveVc0DpGfcukNIZQ4X1dnrifxg== +"@pie-lib/charting@7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/charting/-/charting-7.0.9.tgz#d24f948f47604c7344b2a88cb8e6cbbbdda54e40" + integrity sha512-Gh4+W/01Bkc/2simieILRGZI4A3hlQBJREWQPxi1I4eYL22BQqRfatBP3741sskGwfCHl1PfaV0UqCKfecw2wg== dependencies: "@emotion/react" "^11.14.0" "@emotion/styled" "^11.14.1" @@ -2844,7 +2844,7 @@ "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" "@pie-lib/math-rendering" "^5.0.2" - "@pie-lib/plot" "^4.0.8" + "@pie-lib/plot" "^4.0.9" "@pie-lib/render-ui" "^6.1.2" "@pie-lib/translator" "^4.0.2" "@visx/axis" "^3.0.0" @@ -2864,16 +2864,16 @@ react-draggable "^3.3.0" react-input-autosize "^2.2.1" -"@pie-lib/config-ui@13.0.8": - version "13.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/config-ui/-/config-ui-13.0.8.tgz#ed7bf26ada024226a9b74f3e13a20d0c5d12bf1a" - integrity sha512-Zxj1ZwVEUcy7QWSjJD1l1VbMSTvZHf5hc8qs0FoxrwZzNDwnQee279EXFp6mAeH4lIb/6kFeMnV6o9i6W0zbdg== +"@pie-lib/config-ui@13.0.9": + version "13.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/config-ui/-/config-ui-13.0.9.tgz#3cf8fd360bb7a850e154593bd955c6b55a2d2dd3" + integrity sha512-AbIpEi2QMJS2Lf7ExWvF5KpF/33g20B4wGJRNvHkvhZHqBk1e7vmP8CetN71dAxkYGe9P2oZg83qARG9UTU+fA== dependencies: "@emotion/react" "^11.14.0" "@emotion/styled" "^11.14.1" "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" "@pie-lib/icons" "^4.0.3" "@pie-lib/render-ui" "^6.1.2" assert "^1.4.1" @@ -2926,10 +2926,10 @@ prop-types "^15.7.2" react "^18.2.0" -"@pie-lib/editable-html-tip-tap@2.1.6", "@pie-lib/editable-html-tip-tap@^2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@pie-lib/editable-html-tip-tap/-/editable-html-tip-tap-2.1.6.tgz#3dcf8c4d170dbd9321fcec6176a8aba7bc2f475e" - integrity sha512-LA86OgrSTs7bO7AzNmYP0lzft+T/CcSxKZ/h/FHjE+vY3aguMkvRQGIgyE5W7DOStaSPfSfLKQ19VilNTX0WRQ== +"@pie-lib/editable-html-tip-tap@2.1.7", "@pie-lib/editable-html-tip-tap@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@pie-lib/editable-html-tip-tap/-/editable-html-tip-tap-2.1.7.tgz#462988501806bd320415d75395992d836b730646" + integrity sha512-XShZxgSEh7b1S3CcPv4Sx5muBubM3IBm89ksAwJekAnI9FUsFxdRYlVgH8nZpTkY1OBZuY3dSWXlcIpjitkqtA== dependencies: "@dnd-kit/core" "6.3.1" "@dnd-kit/modifiers" "9.0.0" @@ -3013,10 +3013,10 @@ resolved "https://registry.yarnpkg.com/@pie-lib/feedback/-/feedback-2.0.2.tgz#897e249ba78f8203aa39d75bd46b59e499b8e773" integrity sha512-y7NKifptZJJUb5eynFz+ppai4XoeOjlowSh6BrIrvghEshGkoX+O4EYzQCXcSlFuyOjjiuYaHd/OzNuifaYG5Q== -"@pie-lib/graphing-solution-set@4.0.8": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/graphing-solution-set/-/graphing-solution-set-4.0.8.tgz#6b92607df112ff3fa2050569c60119df71f7e9ab" - integrity sha512-7ZNgk2pMOC3rWUd/Ergi4e5CHIouZuLsesUKHmFij6QdjUe5pvpnInRVMaMCzjzSklRGQviJ8VxfOn0HU1t36Q== +"@pie-lib/graphing-solution-set@4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/graphing-solution-set/-/graphing-solution-set-4.0.9.tgz#eabf28dc2a8f35d7a92931f9ea0ea233063f52a9" + integrity sha512-7K7AhreuX7lq0/AhPPsavXnPe0kYiWsnALRBDSlAQFmdB6vN2HuGSHvVSnRPrbp0bMZWHsfli3W+h2kzrkKe/Q== dependencies: "@dnd-kit/sortable" "10.0.0" "@emotion/react" "^11.14.0" @@ -3025,9 +3025,9 @@ "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" "@pie-lib/drag" "^4.0.5" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" "@pie-lib/graphing-utils" "^3.0.2" - "@pie-lib/plot" "^4.0.8" + "@pie-lib/plot" "^4.0.9" "@pie-lib/render-ui" "^6.1.2" "@pie-lib/tools" "^2.0.3" "@pie-lib/translator" "^4.0.2" @@ -3063,10 +3063,10 @@ debug "^4.1.1" lodash-es "^4.17.23" -"@pie-lib/graphing@4.0.9": - version "4.0.9" - resolved "https://registry.yarnpkg.com/@pie-lib/graphing/-/graphing-4.0.9.tgz#af72a0f8977c9c39f91d7bf4b5ca1e2c415f8438" - integrity sha512-pyyEq+c+8uKIisUNLEEIQ7bARVpUU1mIq67+SNQEWRCP5xi5Cwi5oRP3Tpi2Wo9vgy4cI0lhmCrAyGaRAnv9XA== +"@pie-lib/graphing@4.0.10": + version "4.0.10" + resolved "https://registry.yarnpkg.com/@pie-lib/graphing/-/graphing-4.0.10.tgz#515a45cc6a06185ef0cebb3f4ba191fcf5ac5152" + integrity sha512-toDefLjZM2zXB8F2z1YK1MbVDTg9PonJmRUWgJQq8Hl1wwpf00zt2mJ9PWhuzJdPoo17dSJDFKPE8pck9Q2lUA== dependencies: "@dnd-kit/sortable" "10.0.0" "@emotion/react" "^11.14.0" @@ -3075,9 +3075,9 @@ "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" "@pie-lib/drag" "^4.0.5" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" "@pie-lib/graphing-utils" "^3.0.2" - "@pie-lib/plot" "^4.0.8" + "@pie-lib/plot" "^4.0.9" "@pie-lib/render-ui" "^6.1.2" "@pie-lib/translator" "^4.0.2" "@visx/axis" "^3.0.0" @@ -3114,17 +3114,17 @@ "@mui/material" "^7.3.4" prop-types "^15.6.2" -"@pie-lib/mask-markup@3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/mask-markup/-/mask-markup-3.0.8.tgz#a64ecdc177bd71ec3026e476752844cc02560cd7" - integrity sha512-yAEv2ZgcjZXbidvTMN0pQaas7UzhWDClLtmXV+tBgmxA7hveeF8yGJpIMBz/XkZ4xAHa7VGQfqb51K+KnSjPyg== +"@pie-lib/mask-markup@3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/mask-markup/-/mask-markup-3.0.9.tgz#e9287c653d8f21c1d8a8fbbbfd8d258744960a28" + integrity sha512-MXI3oJFuIUhkUApq92UkGKpmpWn8UFeKCgC2DFLNEwdlP4m6twmLnL2E4L3j5Np2qFvxpdQKudJoW+Q750Uipw== dependencies: "@emotion/react" "^11.14.0" "@emotion/styled" "^11.14.1" "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" "@pie-lib/drag" "^4.0.5" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" "@pie-lib/math-rendering" "^5.0.2" "@pie-lib/render-ui" "^6.1.2" classnames "^2.2.6" @@ -3198,17 +3198,17 @@ lodash-es "^4.17.23" prop-types "^15.7.2" -"@pie-lib/plot@4.0.8", "@pie-lib/plot@^4.0.8": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/plot/-/plot-4.0.8.tgz#55f8a35cae364255aa2d80d78c31f0f14d7d8e9f" - integrity sha512-W4zYwrgxuyqOd1YLRmzTSE9pHpj/vMpxxkPA9qXVwkubgi6JSysy/pJYjld+kzUPowoviHMLKn6mXM5vwfbGCw== +"@pie-lib/plot@4.0.9", "@pie-lib/plot@^4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/plot/-/plot-4.0.9.tgz#c02d2edfc048339e8cfe855cc34f1add10201e2c" + integrity sha512-NGwT8p7ABJmkFghas8vJHcHxwV5HAi5Kulbr39o7/TU5ipsNNLbqs3YfSzg4eWFPFEAOD2S1Fo4zJqdzoWoHBA== dependencies: "@emotion/react" "^11.14.0" "@emotion/styled" "^11.14.1" "@mapbox/point-geometry" "^1.1.0" "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" "@pie-lib/render-ui" "^6.1.2" assert "^1.4.1" d3-scale "^4.0.2" @@ -3239,17 +3239,17 @@ prop-types "^15.7.2" react-transition-group "^4.4.5" -"@pie-lib/rubric@2.0.8": - version "2.0.8" - resolved "https://registry.yarnpkg.com/@pie-lib/rubric/-/rubric-2.0.8.tgz#9f7272ed4dd953c6f0fe9251ece121713ffceaea" - integrity sha512-d8UxF83nA1RJm7AKzXq7cbxeQSxu3+xmpFYKpZNyPkBo8Kxf1bd/eKf60ahNVtZ/Zb12U7dB/qLXrit10PXjDA== +"@pie-lib/rubric@2.0.9": + version "2.0.9" + resolved "https://registry.yarnpkg.com/@pie-lib/rubric/-/rubric-2.0.9.tgz#e326dc98f1c1d29932cd46e5ced356549f02f456" + integrity sha512-T3Tm7gPhnGtbNJ+FD8saATRsJWH9EbzSY4CNWGWMGaDHOJSbknXtgDDsnGpeK3RMQJ+otUwJMm17OBO7oIRFDQ== dependencies: "@emotion/react" "^11.14.0" "@emotion/styled" "^11.14.1" "@hello-pangea/dnd" "^18.0.1" "@mui/icons-material" "^7.3.4" "@mui/material" "^7.3.4" - "@pie-lib/editable-html-tip-tap" "^2.1.6" + "@pie-lib/editable-html-tip-tap" "^2.1.7" debug "^4.1.1" lodash-es "^4.17.23" prop-types "^15.7.2"