@pie-element/matrix 3.0.0-beta.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,18 +3,6 @@
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
- ## [2.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/matrix@2.3.2...@pie-element/matrix@2.3.3) (2025-11-27)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * bump libs PD-5274, PD-5211, PD-5248 ([7610b25](https://github.com/pie-framework/pie-elements/commit/7610b25423956b6492f33322513b3430051fca77))
12
- * **likert, matrix:** handle disabled color, add important for radio states colors PD-5274 ([8685fe6](https://github.com/pie-framework/pie-elements/commit/8685fe63194de27f213f5debcdf43452e405afeb))
13
-
14
-
15
-
16
-
17
-
18
6
  ## [2.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/matrix@2.3.1...@pie-element/matrix@2.3.2) (2025-10-22)
19
7
 
20
8
 
@@ -3,17 +3,6 @@
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
- ## [1.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/matrix-configure@1.3.2...@pie-element/matrix-configure@1.3.3) (2025-11-27)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * bump libs PD-5274, PD-5211, PD-5248 ([7610b25](https://github.com/pie-framework/pie-elements/commit/7610b25423956b6492f33322513b3430051fca77))
12
-
13
-
14
-
15
-
16
-
17
6
  ## [1.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/matrix-configure@1.3.1...@pie-element/matrix-configure@1.3.2) (2025-10-22)
18
7
 
19
8
 
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
12
+ var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
13
13
  var _configUi = require("@pie-lib/config-ui");
14
14
  var _styles = require("@mui/material/styles");
15
15
  var _MatrixColumnsSizeHeaderInput = _interopRequireDefault(require("./MatrixColumnsSizeHeaderInput"));
@@ -99,7 +99,7 @@ const Design = props => {
99
99
  })
100
100
  }, teacherInstructionsEnabled && /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
101
101
  label: teacherInstructions.label
102
- }, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
102
+ }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
103
103
  markup: model.teacherInstructions || '',
104
104
  onChange: onTeacherInstructionsChanged,
105
105
  imageSupport: imageSupport,
@@ -110,7 +110,7 @@ const Design = props => {
110
110
  uploadSoundSupport: uploadSoundSupport
111
111
  }), teacherInstructionsError && /*#__PURE__*/_react.default.createElement(ErrorText, null, teacherInstructionsError)), /*#__PURE__*/_react.default.createElement(StyledInputContainer, {
112
112
  label: prompt.label
113
- }, /*#__PURE__*/_react.default.createElement(_editableHtml.default, {
113
+ }, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
114
114
  markup: model.prompt,
115
115
  onChange: onPromptChanged,
116
116
  imageSupport: imageSupport,
@@ -1 +1 @@
1
- {"version":3,"file":"Main.js","names":["_react","_interopRequireDefault","require","_propTypes","_editableHtml","_configUi","_styles","_MatrixColumnsSizeHeaderInput","_MatrixRowsSizeHeaderInput","_MatrixLabelTypeHeaderInput","_MatrixValues","Panel","toggle","radio","settings","StyledInputContainer","styled","InputContainer","theme","width","paddingTop","spacing","marginTop","marginBottom","MatrixHeaderOptionsHolder","display","flexWrap","paddingBottom","justifyContent","ErrorText","fontSize","typography","color","palette","error","main","Design","props","model","configuration","onPromptChanged","imageSupport","uploadSoundSupport","onChangeModel","onConfigurationChanged","onTeacherInstructionsChanged","baseInputConfiguration","contentDimensions","prompt","scoringType","settingsPanelDisabled","spellCheck","teacherInstructions","errors","extraCSSRules","teacherInstructionsEnabled","spellCheckEnabled","promptError","teacherInstructionsError","panelProperties","label","getPluginProps","default","createElement","layout","ConfigLayout","dimensions","hideSettings","onChangeConfiguration","groups","Properties","markup","onChange","pluginProps","inputConfiguration","nonEmpty","disableUnderline","Main","React","Component","constructor","args","_defineProperty2","onModelChanged","data","render","_extends2","exports","PropTypes","object","isRequired","disableSidePanel","bool","func","shape","add","delete","_default"],"sources":["../src/Main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html';\nimport { InputContainer, settings, layout } from '@pie-lib/config-ui';\nimport { styled } from '@mui/material/styles';\nimport MatrixColumnsSizeHeaderInput from './MatrixColumnsSizeHeaderInput';\nimport MatrixRowsSizeHeaderInput from './MatrixRowsSizeHeaderInput';\nimport MatrixLabelTypeHeaderInput from './MatrixLabelTypeHeaderInput';\nimport MatrixValues from './MatrixValues';\n\nconst { Panel, toggle, radio } = settings;\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nconst MatrixHeaderOptionsHolder = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n paddingBottom: theme.spacing(2.5),\n justifyContent: 'space-around',\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nconst Design = (props) => {\n const {\n model,\n configuration,\n onPromptChanged,\n imageSupport,\n uploadSoundSupport,\n onChangeModel,\n onConfigurationChanged,\n onTeacherInstructionsChanged,\n } = props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n prompt = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n } = configuration || {};\n const { errors = {}, extraCSSRules, teacherInstructionsEnabled, spellCheckEnabled } = model || {};\n const { prompt: promptError, teacherInstructions: teacherInstructionsError } = errors;\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onChangeModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n nonEmpty={!prompt.settings}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n disableUnderline\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n\n <MatrixHeaderOptionsHolder>\n <MatrixRowsSizeHeaderInput model={model} onChangeModel={onChangeModel} />\n <MatrixColumnsSizeHeaderInput model={model} onChangeModel={onChangeModel} />\n <MatrixLabelTypeHeaderInput model={model} onChangeModel={onChangeModel} />\n </MatrixHeaderOptionsHolder>\n\n <MatrixValues model={model} onChangeModel={onChangeModel} />\n </layout.ConfigLayout>\n );\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n onPromptChanged = (prompt) => {\n this.props.onModelChanged({ ...this.props.model, prompt });\n };\n\n onChangeModel = (data) => {\n this.props.onModelChanged({ ...this.props.model, ...data });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n };\n\n render() {\n return (\n <Design\n {...this.props}\n onChangeModel={this.props.onModelChanged}\n onPromptChanged={this.onPromptChanged}\n onTeacherInstructionsChanged={this.onTeacherInstructionsChanged}\n />\n );\n }\n}\n\nexport default Main;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,6BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,0BAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,2BAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,aAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,MAAM;EAAES,KAAK;EAAEC,MAAM;EAAEC;AAAM,CAAC,GAAGC,kBAAQ;AAEzC,MAAMC,oBAAoB,GAAG,IAAAC,cAA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,CAAAC,aAAA,CAAC3B,MAAM,MAAAkD,SAAA,CAAAxB,OAAA,MACD,IAAI,CAACzB,KAAK;MACdM,aAAa,EAAE,IAAI,CAACN,KAAK,CAAC8C,cAAe;MACzC3C,eAAe,EAAE,IAAI,CAACA,eAAgB;MACtCK,4BAA4B,EAAE,IAAI,CAACA;IAA6B,EACjE,CAAC;EAEN;AACF;AAAC0C,OAAA,CAAAV,IAAA,GAAAA,IAAA;AAAA,IAAAK,gBAAA,CAAApB,OAAA,EAlCYe,IAAI,eACI;EACjBvC,KAAK,EAAEkD,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,gBAAgB,EAAEH,kBAAS,CAACI,IAAI;EAChCT,cAAc,EAAEK,kBAAS,CAACK,IAAI,CAACH,UAAU;EACzC9C,sBAAsB,EAAE4C,kBAAS,CAACK,IAAI,CAACH,UAAU;EACjDjD,YAAY,EAAE+C,kBAAS,CAACM,KAAK,CAAC;IAC5BC,GAAG,EAAEP,kBAAS,CAACK,IAAI,CAACH,UAAU;IAC9BM,MAAM,EAAER,kBAAS,CAACK,IAAI,CAACH;EACzB,CAAC;AACH,CAAC;AAAA,IAAAO,QAAA,GAAAV,OAAA,CAAAzB,OAAA,GA0BYe,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"Main.js","names":["_react","_interopRequireDefault","require","_propTypes","_editableHtmlTipTap","_configUi","_styles","_MatrixColumnsSizeHeaderInput","_MatrixRowsSizeHeaderInput","_MatrixLabelTypeHeaderInput","_MatrixValues","Panel","toggle","radio","settings","StyledInputContainer","styled","InputContainer","theme","width","paddingTop","spacing","marginTop","marginBottom","MatrixHeaderOptionsHolder","display","flexWrap","paddingBottom","justifyContent","ErrorText","fontSize","typography","color","palette","error","main","Design","props","model","configuration","onPromptChanged","imageSupport","uploadSoundSupport","onChangeModel","onConfigurationChanged","onTeacherInstructionsChanged","baseInputConfiguration","contentDimensions","prompt","scoringType","settingsPanelDisabled","spellCheck","teacherInstructions","errors","extraCSSRules","teacherInstructionsEnabled","spellCheckEnabled","promptError","teacherInstructionsError","panelProperties","label","getPluginProps","default","createElement","layout","ConfigLayout","dimensions","hideSettings","onChangeConfiguration","groups","Properties","markup","onChange","pluginProps","inputConfiguration","nonEmpty","disableUnderline","Main","React","Component","constructor","args","_defineProperty2","onModelChanged","data","render","_extends2","exports","PropTypes","object","isRequired","disableSidePanel","bool","func","shape","add","delete","_default"],"sources":["../src/Main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { InputContainer, settings, layout } from '@pie-lib/config-ui';\nimport { styled } from '@mui/material/styles';\nimport MatrixColumnsSizeHeaderInput from './MatrixColumnsSizeHeaderInput';\nimport MatrixRowsSizeHeaderInput from './MatrixRowsSizeHeaderInput';\nimport MatrixLabelTypeHeaderInput from './MatrixLabelTypeHeaderInput';\nimport MatrixValues from './MatrixValues';\n\nconst { Panel, toggle, radio } = settings;\n\nconst StyledInputContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nconst MatrixHeaderOptionsHolder = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n paddingBottom: theme.spacing(2.5),\n justifyContent: 'space-around',\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nconst Design = (props) => {\n const {\n model,\n configuration,\n onPromptChanged,\n imageSupport,\n uploadSoundSupport,\n onChangeModel,\n onConfigurationChanged,\n onTeacherInstructionsChanged,\n } = props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n prompt = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n } = configuration || {};\n const { errors = {}, extraCSSRules, teacherInstructionsEnabled, spellCheckEnabled } = model || {};\n const { prompt: promptError, teacherInstructions: teacherInstructionsError } = errors;\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onChangeModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n nonEmpty={!prompt.settings}\n spellCheck={spellCheckEnabled}\n uploadSoundSupport={uploadSoundSupport}\n disableUnderline\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n\n <MatrixHeaderOptionsHolder>\n <MatrixRowsSizeHeaderInput model={model} onChangeModel={onChangeModel} />\n <MatrixColumnsSizeHeaderInput model={model} onChangeModel={onChangeModel} />\n <MatrixLabelTypeHeaderInput model={model} onChangeModel={onChangeModel} />\n </MatrixHeaderOptionsHolder>\n\n <MatrixValues model={model} onChangeModel={onChangeModel} />\n </layout.ConfigLayout>\n );\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n onPromptChanged = (prompt) => {\n this.props.onModelChanged({ ...this.props.model, prompt });\n };\n\n onChangeModel = (data) => {\n this.props.onModelChanged({ ...this.props.model, ...data });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n };\n\n render() {\n return (\n <Design\n {...this.props}\n onChangeModel={this.props.onModelChanged}\n onPromptChanged={this.onPromptChanged}\n onTeacherInstructionsChanged={this.onTeacherInstructionsChanged}\n />\n );\n }\n}\n\nexport default Main;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,mBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,6BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,0BAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,2BAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,aAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,MAAM;EAAES,KAAK;EAAEC,MAAM;EAAEC;AAAM,CAAC,GAAGC,kBAAQ;AAEzC,MAAMC,oBAAoB,GAAG,IAAAC,cAAM,EAACC,wBAAc,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAClEC,KAAK,EAAE,MAAM;EACbC,UAAU,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;EAC5BC,SAAS,EAAE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I,CAACA,eAAgB;MACtCK,4BAA4B,EAAE,IAAI,CAACA;IAA6B,EACjE,CAAC;EAEN;AACF;AAAC0C,OAAA,CAAAV,IAAA,GAAAA,IAAA;AAAA,IAAAK,gBAAA,CAAApB,OAAA,EAlCYe,IAAI,eACI;EACjBvC,KAAK,EAAEkD,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,gBAAgB,EAAEH,kBAAS,CAACI,IAAI;EAChCT,cAAc,EAAEK,kBAAS,CAACK,IAAI,CAACH,UAAU;EACzC9C,sBAAsB,EAAE4C,kBAAS,CAACK,IAAI,CAACH,UAAU;EACjDjD,YAAY,EAAE+C,kBAAS,CAACM,KAAK,CAAC;IAC5BC,GAAG,EAAEP,kBAAS,CAACK,IAAI,CAACH,UAAU;IAC9BM,MAAM,EAAER,kBAAS,CAACK,IAAI,CAACH;EACzB,CAAC;AACH,CAAC;AAAA,IAAAO,QAAA,GAAAV,OAAA,CAAAzB,OAAA,GA0BYe,IAAI","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/matrix-configure",
3
3
  "private": true,
4
- "version": "2.0.0-beta.0",
4
+ "version": "2.0.0-beta.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -12,9 +12,9 @@
12
12
  "@mui/icons-material": "^7.3.4",
13
13
  "@mui/material": "^7.3.4",
14
14
  "@pie-framework/pie-configure-events": "^1.3.0",
15
- "@pie-lib/config-ui": "11.30.4-next.0",
16
- "@pie-lib/editable-html": "11.21.4-next.0",
17
- "@pie-lib/render-ui": "4.35.4-next.0",
15
+ "@pie-lib/config-ui": "12.1.0-next.5",
16
+ "@pie-lib/editable-html-tip-tap": "1.1.0-next.5",
17
+ "@pie-lib/render-ui": "5.1.0-next.5",
18
18
  "debug": "^4.1.1",
19
19
  "prop-types": "^15.6.2",
20
20
  "react": "18.2.0",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "3.0.0-beta.0",
7
+ "version": "3.0.0-beta.1",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -15,8 +15,8 @@
15
15
  "@mui/icons-material": "^7.3.4",
16
16
  "@mui/material": "^7.3.4",
17
17
  "@pie-framework/pie-player-events": "^0.1.0",
18
- "@pie-lib/math-rendering": "3.22.3-next.0",
19
- "@pie-lib/render-ui": "4.35.4-next.0",
18
+ "@pie-lib/math-rendering": "4.1.0-next.4",
19
+ "@pie-lib/render-ui": "5.1.0-next.5",
20
20
  "debug": "^4.1.1",
21
21
  "prop-types": "^15.6.1",
22
22
  "react": "18.2.0",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "author": "",
27
27
  "license": "ISC",
28
- "gitHead": "802d21e25bfd05e6c6f6913260dfb6a4ed28a274",
28
+ "gitHead": "f7801e8a2cd1bdc01ef1da55f9157f0989714bdc",
29
29
  "main": "lib/index.js",
30
30
  "module": "src/index.js"
31
31
  }