From 0775b7cd5d4f616fd3b462ae6639f80a3692186a Mon Sep 17 00:00:00 2001 From: Emilio Alvarez Date: Mon, 20 Mar 2023 14:14:02 -0500 Subject: [PATCH] move useDoenetRenders for import scanning --- src/Viewer/PageViewer.jsx | 6 +++--- src/Viewer/renderers/alert.jsx | 2 +- src/Viewer/renderers/angle.jsx | 2 +- src/Viewer/renderers/answer.jsx | 2 +- src/Viewer/renderers/asList.jsx | 2 +- src/Viewer/renderers/boolean.jsx | 2 +- src/Viewer/renderers/booleanInput.jsx | 4 ++-- src/Viewer/renderers/c.jsx | 2 +- src/Viewer/renderers/callAction.jsx | 2 +- src/Viewer/renderers/cell.jsx | 2 +- src/Viewer/renderers/chart.jsx | 2 +- src/Viewer/renderers/choiceInput.jsx | 4 ++-- src/Viewer/renderers/circle.jsx | 2 +- src/Viewer/renderers/cobwebPolyline.jsx | 2 +- src/Viewer/renderers/codeEditor.jsx | 2 +- src/Viewer/renderers/codeViewer.jsx | 2 +- src/Viewer/renderers/containerBlock.jsx | 2 +- src/Viewer/renderers/containerInline.jsx | 2 +- src/Viewer/renderers/curve.jsx | 2 +- src/Viewer/renderers/ellipsis.jsx | 2 +- src/Viewer/renderers/em.jsx | 2 +- src/Viewer/renderers/embed.jsx | 2 +- src/Viewer/renderers/feedback.jsx | 2 +- src/Viewer/renderers/figure.jsx | 2 +- src/Viewer/renderers/footnote.jsx | 2 +- src/Viewer/renderers/graph.jsx | 2 +- src/Viewer/renderers/hint.jsx | 2 +- src/Viewer/renderers/image.jsx | 2 +- src/Viewer/renderers/label.jsx | 2 +- src/Viewer/renderers/legend.jsx | 2 +- src/Viewer/renderers/line.jsx | 2 +- src/Viewer/renderers/lineSegment.jsx | 2 +- src/Viewer/renderers/list.jsx | 2 +- src/Viewer/renderers/math.jsx | 2 +- src/Viewer/renderers/mathInput.jsx | 4 ++-- src/Viewer/renderers/mathList.jsx | 2 +- src/Viewer/renderers/matrixInput.jsx | 2 +- src/Viewer/renderers/mdash.jsx | 2 +- src/Viewer/renderers/nbsp.jsx | 2 +- src/Viewer/renderers/ndash.jsx | 2 +- src/Viewer/renderers/number.jsx | 2 +- src/Viewer/renderers/numberList.jsx | 2 +- src/Viewer/renderers/orbitalDiagram.jsx | 2 +- src/Viewer/renderers/orbitalDiagramInput.jsx | 2 +- src/Viewer/renderers/p.jsx | 2 +- src/Viewer/renderers/paginatorControls.jsx | 2 +- src/Viewer/renderers/pegboard.jsx | 2 +- src/Viewer/renderers/point.jsx | 2 +- src/Viewer/renderers/polygon.jsx | 2 +- src/Viewer/renderers/polyline.jsx | 2 +- src/Viewer/renderers/pre.jsx | 2 +- src/Viewer/renderers/q.jsx | 2 +- src/Viewer/renderers/ray.jsx | 2 +- src/Viewer/renderers/ref.jsx | 2 +- src/Viewer/renderers/regionBetweenCurveXAxis.jsx | 2 +- src/Viewer/renderers/row.jsx | 2 +- src/Viewer/renderers/section.jsx | 2 +- src/Viewer/renderers/sideBySide.jsx | 2 +- src/Viewer/renderers/slider.jsx | 4 ++-- src/Viewer/renderers/solution.jsx | 2 +- src/Viewer/renderers/spreadsheet.jsx | 2 +- src/Viewer/renderers/sq.jsx | 2 +- src/Viewer/renderers/subsetOfRealsInput.jsx | 2 +- src/Viewer/renderers/summaryStatistics.jsx | 2 +- src/Viewer/renderers/table.jsx | 2 +- src/Viewer/renderers/tabular.jsx | 2 +- src/Viewer/renderers/tag.jsx | 2 +- src/Viewer/renderers/text.jsx | 2 +- src/Viewer/renderers/textInput.jsx | 4 ++-- src/Viewer/renderers/textList.jsx | 2 +- src/Viewer/renderers/triggerSet.jsx | 2 +- src/Viewer/renderers/updateValue.jsx | 2 +- src/Viewer/renderers/vector.jsx | 2 +- src/Viewer/renderers/video.jsx | 2 +- src/Viewer/{renderers => }/useDoenetRenderer.jsx | 4 ++-- 75 files changed, 83 insertions(+), 83 deletions(-) rename src/Viewer/{renderers => }/useDoenetRenderer.jsx (96%) diff --git a/src/Viewer/PageViewer.jsx b/src/Viewer/PageViewer.jsx index 9d14adf10e..bb996e92c2 100644 --- a/src/Viewer/PageViewer.jsx +++ b/src/Viewer/PageViewer.jsx @@ -4,7 +4,7 @@ import { useToast, toastType } from '@Toast'; import { serializedComponentsReplacer, serializedComponentsReviver } from '../Core/utils/serializedStateProcessing'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons'; -import { rendererState } from './renderers/useDoenetRenderer'; +import { rendererState } from './useDoenetRenderer'; import { atom, atomFamily, useRecoilCallback, useRecoilValue } from 'recoil'; import { get as idb_get, set as idb_set } from 'idb-keyval'; import { cidFromText } from '../Core/utils/cid'; @@ -415,7 +415,7 @@ export default function PageViewer(props) { // console.log(">>>core.rendererTypesInDocument",core.rendererTypesInDocument); for (let rendererClassName of coreInfo.current.rendererTypesInDocument) { rendererClassNames.push(rendererClassName); - renderPromises.push(import(`./renderers/${rendererClassName}.js`)); + renderPromises.push(import(`./renderers/${rendererClassName}.jsx`)); } let documentComponentInstructions = coreInfo.current.documentToRender; @@ -813,7 +813,7 @@ export default function PageViewer(props) { } // console.log(`send message to create core ${pageNumber}`) - coreWorker.current = new Worker(props.unbundledCore ? 'core/CoreWorker.js' : '/viewer/core.js', { type: 'module' }); + coreWorker.current = new Worker(props.unbundledCore ? 'core/CoreWorker.js' : './src/Viewer/core.js', { type: 'module' }); coreWorker.current.postMessage({ messageType: "createCore", diff --git a/src/Viewer/renderers/alert.jsx b/src/Viewer/renderers/alert.jsx index f044755928..f75c178cc5 100644 --- a/src/Viewer/renderers/alert.jsx +++ b/src/Viewer/renderers/alert.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Alert(props){ let {name, id, SVs, children} = useDoenetRender(props); diff --git a/src/Viewer/renderers/angle.jsx b/src/Viewer/renderers/angle.jsx index 322cbcf6c7..2b259ad74a 100644 --- a/src/Viewer/renderers/angle.jsx +++ b/src/Viewer/renderers/angle.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useContext, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import me from 'math-expressions'; import { MathJax } from 'better-react-mathjax'; diff --git a/src/Viewer/renderers/answer.jsx b/src/Viewer/renderers/answer.jsx index 056cafdf68..c5bf720353 100644 --- a/src/Viewer/renderers/answer.jsx +++ b/src/Viewer/renderers/answer.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck, faLevelDownAlt, faTimes, faCloud } from '@fortawesome/free-solid-svg-icons' import styled from 'styled-components'; diff --git a/src/Viewer/renderers/asList.jsx b/src/Viewer/renderers/asList.jsx index b4167d81ce..f31738d3ac 100644 --- a/src/Viewer/renderers/asList.jsx +++ b/src/Viewer/renderers/asList.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function AsList(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/boolean.jsx b/src/Viewer/renderers/boolean.jsx index 18b9c3d233..223ae6be68 100644 --- a/src/Viewer/renderers/boolean.jsx +++ b/src/Viewer/renderers/boolean.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Boolean(props) { let { name, id, SVs } = useDoenetRender(props, false); diff --git a/src/Viewer/renderers/booleanInput.jsx b/src/Viewer/renderers/booleanInput.jsx index af9e0cffda..89fc083fe5 100644 --- a/src/Viewer/renderers/booleanInput.jsx +++ b/src/Viewer/renderers/booleanInput.jsx @@ -1,8 +1,8 @@ import React, { useRef, useState } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck, faLevelDownAlt, faTimes, faCloud, faPercentage } from '@fortawesome/free-solid-svg-icons' -import { rendererState } from './useDoenetRenderer'; +import { rendererState } from '../useDoenetRenderer'; import { useSetRecoilState } from 'recoil'; import ToggleButton from '../../_reactComponents/PanelHeaderComponents/ToggleButton'; import styled from 'styled-components'; diff --git a/src/Viewer/renderers/c.jsx b/src/Viewer/renderers/c.jsx index 5c5be1fe2f..6473adfb34 100644 --- a/src/Viewer/renderers/c.jsx +++ b/src/Viewer/renderers/c.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function C(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/callAction.jsx b/src/Viewer/renderers/callAction.jsx index af4e95816f..a83aa55c15 100644 --- a/src/Viewer/renderers/callAction.jsx +++ b/src/Viewer/renderers/callAction.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import Button from '../../_reactComponents/PanelHeaderComponents/Button'; export default React.memo(function CallAction(props) { diff --git a/src/Viewer/renderers/cell.jsx b/src/Viewer/renderers/cell.jsx index 29a2ebc512..175b83b7d8 100644 --- a/src/Viewer/renderers/cell.jsx +++ b/src/Viewer/renderers/cell.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Cell(props) { let {name, id, SVs, children} = useDoenetRender(props); diff --git a/src/Viewer/renderers/chart.jsx b/src/Viewer/renderers/chart.jsx index 1d1ca13486..858664f009 100644 --- a/src/Viewer/renderers/chart.jsx +++ b/src/Viewer/renderers/chart.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useState, useRef, createContext } from 'react'; import { sizeToCSS } from './utils/css'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; // import Plotly from 'plotly.js-dist-min'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/choiceInput.jsx b/src/Viewer/renderers/choiceInput.jsx index 1b5e5f8d7a..6a8d6931d0 100644 --- a/src/Viewer/renderers/choiceInput.jsx +++ b/src/Viewer/renderers/choiceInput.jsx @@ -1,8 +1,8 @@ import React, { useRef, useState } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck, faLevelDownAlt, faTimes, faCloud } from '@fortawesome/free-solid-svg-icons' -import { rendererState } from './useDoenetRenderer'; +import { rendererState } from '../useDoenetRenderer'; import { useSetRecoilState } from 'recoil'; import styled from 'styled-components'; import './choiceInput.css'; diff --git a/src/Viewer/renderers/circle.jsx b/src/Viewer/renderers/circle.jsx index 79e246b3fb..f323fb2dc1 100644 --- a/src/Viewer/renderers/circle.jsx +++ b/src/Viewer/renderers/circle.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; export default React.memo(function Circle(props) { diff --git a/src/Viewer/renderers/cobwebPolyline.jsx b/src/Viewer/renderers/cobwebPolyline.jsx index 559c27397b..d3e65a4a5d 100644 --- a/src/Viewer/renderers/cobwebPolyline.jsx +++ b/src/Viewer/renderers/cobwebPolyline.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import { createFunctionFromDefinition } from '../../Core/utils/function'; diff --git a/src/Viewer/renderers/codeEditor.jsx b/src/Viewer/renderers/codeEditor.jsx index a5b594eab5..8e432d8b63 100644 --- a/src/Viewer/renderers/codeEditor.jsx +++ b/src/Viewer/renderers/codeEditor.jsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import CodeMirror from '../../Tools/_framework/CodeMirror'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/codeViewer.jsx b/src/Viewer/renderers/codeViewer.jsx index b128cb1a92..c425ceb893 100644 --- a/src/Viewer/renderers/codeViewer.jsx +++ b/src/Viewer/renderers/codeViewer.jsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import Button from '../../_reactComponents/PanelHeaderComponents/Button'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/containerBlock.jsx b/src/Viewer/renderers/containerBlock.jsx index 06c6ab8856..11cc6120d5 100644 --- a/src/Viewer/renderers/containerBlock.jsx +++ b/src/Viewer/renderers/containerBlock.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; export default React.memo(function Container(props) { diff --git a/src/Viewer/renderers/containerInline.jsx b/src/Viewer/renderers/containerInline.jsx index b80b922d6c..44cd4b7ba1 100644 --- a/src/Viewer/renderers/containerInline.jsx +++ b/src/Viewer/renderers/containerInline.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function ContainerInline(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/curve.jsx b/src/Viewer/renderers/curve.jsx index 41065effdf..f43ac8dc27 100644 --- a/src/Viewer/renderers/curve.jsx +++ b/src/Viewer/renderers/curve.jsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; import { createFunctionFromDefinition } from '../../Core/utils/function'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; diff --git a/src/Viewer/renderers/ellipsis.jsx b/src/Viewer/renderers/ellipsis.jsx index 0be4e78fb2..9e21b19491 100644 --- a/src/Viewer/renderers/ellipsis.jsx +++ b/src/Viewer/renderers/ellipsis.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Ellipsis(props) { let {name, id, SVs} = useDoenetRender(props); diff --git a/src/Viewer/renderers/em.jsx b/src/Viewer/renderers/em.jsx index 685d61f4f0..1e85491aff 100644 --- a/src/Viewer/renderers/em.jsx +++ b/src/Viewer/renderers/em.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Em(props) { let {name, id, SVs, children} = useDoenetRender(props); diff --git a/src/Viewer/renderers/embed.jsx b/src/Viewer/renderers/embed.jsx index a2e31042cd..8429044fde 100644 --- a/src/Viewer/renderers/embed.jsx +++ b/src/Viewer/renderers/embed.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import cssesc from 'cssesc'; import { sizeToCSS } from './utils/css'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/feedback.jsx b/src/Viewer/renderers/feedback.jsx index 1d8a0ce4fd..6d23724faf 100644 --- a/src/Viewer/renderers/feedback.jsx +++ b/src/Viewer/renderers/feedback.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faComment as thoughtBubble } from '@fortawesome/free-regular-svg-icons'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/figure.jsx b/src/Viewer/renderers/figure.jsx index 279ca2450b..5530c66ea9 100644 --- a/src/Viewer/renderers/figure.jsx +++ b/src/Viewer/renderers/figure.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; import Measure from 'react-measure'; diff --git a/src/Viewer/renderers/footnote.jsx b/src/Viewer/renderers/footnote.jsx index 59612a278e..834668211d 100644 --- a/src/Viewer/renderers/footnote.jsx +++ b/src/Viewer/renderers/footnote.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Footnote(props) { let { name, id, SVs } = useDoenetRender(props,false); diff --git a/src/Viewer/renderers/graph.jsx b/src/Viewer/renderers/graph.jsx index a85c170db0..047f48b8d8 100644 --- a/src/Viewer/renderers/graph.jsx +++ b/src/Viewer/renderers/graph.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useState, useRef, createContext } from 'react'; import { sizeToCSS } from './utils/css'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import me from 'math-expressions'; import VisibilitySensor from 'react-visibility-sensor-v2'; import cssesc from 'cssesc'; diff --git a/src/Viewer/renderers/hint.jsx b/src/Viewer/renderers/hint.jsx index ac6bb7000f..15f65d9f69 100644 --- a/src/Viewer/renderers/hint.jsx +++ b/src/Viewer/renderers/hint.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faLightbulb as lightOff } from '@fortawesome/free-solid-svg-icons'; import { faLightbulb as lightOn } from '@fortawesome/free-regular-svg-icons'; diff --git a/src/Viewer/renderers/image.jsx b/src/Viewer/renderers/image.jsx index cea4c6f6ff..3f8e580158 100644 --- a/src/Viewer/renderers/image.jsx +++ b/src/Viewer/renderers/image.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useContext, useRef } from 'react'; import { BoardContext } from './graph'; import { retrieveMediaForCid } from '../../Core/utils/retrieveMedia'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import VisibilitySensor from 'react-visibility-sensor-v2'; import me from 'math-expressions'; diff --git a/src/Viewer/renderers/label.jsx b/src/Viewer/renderers/label.jsx index 4a97bb7a06..ef2b0fe7d9 100644 --- a/src/Viewer/renderers/label.jsx +++ b/src/Viewer/renderers/label.jsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; import { BoardContext } from './graph'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { MathJax } from "better-react-mathjax"; import me from 'math-expressions'; diff --git a/src/Viewer/renderers/legend.jsx b/src/Viewer/renderers/legend.jsx index d2bc602582..c914e4b465 100644 --- a/src/Viewer/renderers/legend.jsx +++ b/src/Viewer/renderers/legend.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import { deepCompare } from '../../Core/utils/deepFunctions'; diff --git a/src/Viewer/renderers/line.jsx b/src/Viewer/renderers/line.jsx index af07266550..a08579ebc2 100644 --- a/src/Viewer/renderers/line.jsx +++ b/src/Viewer/renderers/line.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import me from 'math-expressions'; import { MathJax } from 'better-react-mathjax'; diff --git a/src/Viewer/renderers/lineSegment.jsx b/src/Viewer/renderers/lineSegment.jsx index 048b7844e7..2c26c4f5a4 100644 --- a/src/Viewer/renderers/lineSegment.jsx +++ b/src/Viewer/renderers/lineSegment.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; export default React.memo(function LineSegment(props) { diff --git a/src/Viewer/renderers/list.jsx b/src/Viewer/renderers/list.jsx index 745d9d0e18..ef95a85b82 100644 --- a/src/Viewer/renderers/list.jsx +++ b/src/Viewer/renderers/list.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; export default React.memo(function List(props) { diff --git a/src/Viewer/renderers/math.jsx b/src/Viewer/renderers/math.jsx index 21fcaf404b..b868934422 100644 --- a/src/Viewer/renderers/math.jsx +++ b/src/Viewer/renderers/math.jsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; import { BoardContext } from './graph'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { MathJax } from "better-react-mathjax"; import me from 'math-expressions'; diff --git a/src/Viewer/renderers/mathInput.jsx b/src/Viewer/renderers/mathInput.jsx index 54563abf18..ee471d9a5a 100644 --- a/src/Viewer/renderers/mathInput.jsx +++ b/src/Viewer/renderers/mathInput.jsx @@ -1,5 +1,5 @@ import React, { useRef, useState, useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import styled from 'styled-components'; import { @@ -19,7 +19,7 @@ import { } from '../../Tools/_framework/Footers/MathInputSelector'; import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { rendererState } from './useDoenetRenderer'; +import { rendererState } from '../useDoenetRenderer'; import './mathInput.css'; // Moved most of checkWorkStyle styling into Button diff --git a/src/Viewer/renderers/mathList.jsx b/src/Viewer/renderers/mathList.jsx index a623286bae..eeaaf1f833 100644 --- a/src/Viewer/renderers/mathList.jsx +++ b/src/Viewer/renderers/mathList.jsx @@ -1,6 +1,6 @@ import { MathJax } from 'better-react-mathjax'; import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function MathList(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/matrixInput.jsx b/src/Viewer/renderers/matrixInput.jsx index d7883f0392..a8e0a05622 100644 --- a/src/Viewer/renderers/matrixInput.jsx +++ b/src/Viewer/renderers/matrixInput.jsx @@ -1,5 +1,5 @@ import React, { useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; // import me from 'math-expressions'; import ActionButton from '../../_reactComponents/PanelHeaderComponents/ActionButton'; import ActionButtonGroup from '../../_reactComponents/PanelHeaderComponents/ActionButtonGroup'; diff --git a/src/Viewer/renderers/mdash.jsx b/src/Viewer/renderers/mdash.jsx index 19c78775c7..58c524761e 100644 --- a/src/Viewer/renderers/mdash.jsx +++ b/src/Viewer/renderers/mdash.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Ndash(props) { let { SVs } = useDoenetRender(props,false); diff --git a/src/Viewer/renderers/nbsp.jsx b/src/Viewer/renderers/nbsp.jsx index 1b77f809ee..5212480b69 100644 --- a/src/Viewer/renderers/nbsp.jsx +++ b/src/Viewer/renderers/nbsp.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Nbsp(props) { let { SVs } = useDoenetRender(props,false); diff --git a/src/Viewer/renderers/ndash.jsx b/src/Viewer/renderers/ndash.jsx index 7100f40a2b..ef67a5782b 100644 --- a/src/Viewer/renderers/ndash.jsx +++ b/src/Viewer/renderers/ndash.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Ndash(props) { let { SVs } = useDoenetRender(props); diff --git a/src/Viewer/renderers/number.jsx b/src/Viewer/renderers/number.jsx index 0bf221b74e..590671f2f1 100644 --- a/src/Viewer/renderers/number.jsx +++ b/src/Viewer/renderers/number.jsx @@ -1,6 +1,6 @@ import { MathJax } from 'better-react-mathjax'; import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Number(props) { let { name, id, SVs } = useDoenetRender(props); diff --git a/src/Viewer/renderers/numberList.jsx b/src/Viewer/renderers/numberList.jsx index f65d0f8e07..d6bf108837 100644 --- a/src/Viewer/renderers/numberList.jsx +++ b/src/Viewer/renderers/numberList.jsx @@ -1,6 +1,6 @@ import { MathJax } from 'better-react-mathjax'; import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function MathList(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/orbitalDiagram.jsx b/src/Viewer/renderers/orbitalDiagram.jsx index 17df99af95..9515e89454 100644 --- a/src/Viewer/renderers/orbitalDiagram.jsx +++ b/src/Viewer/renderers/orbitalDiagram.jsx @@ -1,5 +1,5 @@ import React, { createRef, useEffect, useState } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import styled from 'styled-components'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/orbitalDiagramInput.jsx b/src/Viewer/renderers/orbitalDiagramInput.jsx index b294dec3a1..9215257164 100644 --- a/src/Viewer/renderers/orbitalDiagramInput.jsx +++ b/src/Viewer/renderers/orbitalDiagramInput.jsx @@ -1,5 +1,5 @@ import React, { createRef, useEffect, useState } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import styled from 'styled-components'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/p.jsx b/src/Viewer/renderers/p.jsx index 70666d72aa..105f0d3838 100644 --- a/src/Viewer/renderers/p.jsx +++ b/src/Viewer/renderers/p.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; import { useEffect } from 'react'; diff --git a/src/Viewer/renderers/paginatorControls.jsx b/src/Viewer/renderers/paginatorControls.jsx index 06804aed72..561e7c2256 100644 --- a/src/Viewer/renderers/paginatorControls.jsx +++ b/src/Viewer/renderers/paginatorControls.jsx @@ -1,6 +1,6 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function PaginatorControls(props) { let { name, id, SVs, actions, callAction } = useDoenetRender(props,false); diff --git a/src/Viewer/renderers/pegboard.jsx b/src/Viewer/renderers/pegboard.jsx index 1453489f6a..c4775d8acd 100644 --- a/src/Viewer/renderers/pegboard.jsx +++ b/src/Viewer/renderers/pegboard.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import me from 'math-expressions'; diff --git a/src/Viewer/renderers/point.jsx b/src/Viewer/renderers/point.jsx index 0f69c5ae8b..963b2ebce1 100644 --- a/src/Viewer/renderers/point.jsx +++ b/src/Viewer/renderers/point.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import { MathJax } from 'better-react-mathjax'; diff --git a/src/Viewer/renderers/polygon.jsx b/src/Viewer/renderers/polygon.jsx index b3fa31d732..62fa7cf123 100644 --- a/src/Viewer/renderers/polygon.jsx +++ b/src/Viewer/renderers/polygon.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; diff --git a/src/Viewer/renderers/polyline.jsx b/src/Viewer/renderers/polyline.jsx index 8b95fa8f1a..32468e7bee 100644 --- a/src/Viewer/renderers/polyline.jsx +++ b/src/Viewer/renderers/polyline.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; diff --git a/src/Viewer/renderers/pre.jsx b/src/Viewer/renderers/pre.jsx index e8ba091d38..c7a0845d59 100644 --- a/src/Viewer/renderers/pre.jsx +++ b/src/Viewer/renderers/pre.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRenderer from './useDoenetRenderer'; +import useDoenetRenderer from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; export default React.memo(function Pre(props){ diff --git a/src/Viewer/renderers/q.jsx b/src/Viewer/renderers/q.jsx index c200cd39f1..fd8023328f 100644 --- a/src/Viewer/renderers/q.jsx +++ b/src/Viewer/renderers/q.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Q(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/ray.jsx b/src/Viewer/renderers/ray.jsx index 37925f8e90..cb191abdcb 100644 --- a/src/Viewer/renderers/ray.jsx +++ b/src/Viewer/renderers/ray.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; // import me from 'math-expressions'; diff --git a/src/Viewer/renderers/ref.jsx b/src/Viewer/renderers/ref.jsx index d0e19e7749..dd756336eb 100644 --- a/src/Viewer/renderers/ref.jsx +++ b/src/Viewer/renderers/ref.jsx @@ -5,7 +5,7 @@ import { useRecoilValue } from 'recoil'; import { pageToolViewAtom } from '../../Tools/_framework/NewToolRoot'; import { itemByDoenetId } from '../../_reactComponents/Course/CourseActions'; import { getURLFromRef, scrollableContainerAtom } from '../PageViewer'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import styled from 'styled-components'; // const LinkStyling = styled.a` diff --git a/src/Viewer/renderers/regionBetweenCurveXAxis.jsx b/src/Viewer/renderers/regionBetweenCurveXAxis.jsx index 33d45e7088..521cced1d1 100644 --- a/src/Viewer/renderers/regionBetweenCurveXAxis.jsx +++ b/src/Viewer/renderers/regionBetweenCurveXAxis.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import { createFunctionFromDefinition } from '../../Core/utils/function'; diff --git a/src/Viewer/renderers/row.jsx b/src/Viewer/renderers/row.jsx index da211c3026..5b9daac1bb 100644 --- a/src/Viewer/renderers/row.jsx +++ b/src/Viewer/renderers/row.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Row(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/section.jsx b/src/Viewer/renderers/section.jsx index 2f22f82479..d5595ea902 100644 --- a/src/Viewer/renderers/section.jsx +++ b/src/Viewer/renderers/section.jsx @@ -4,7 +4,7 @@ import { faCheck, faLevelDownAlt, faTimes, faCloud, faPercentage } from '@fortaw import { faCaretRight as twirlIsClosed } from '@fortawesome/free-solid-svg-icons'; import { faCaretDown as twirlIsOpen } from '@fortawesome/free-solid-svg-icons'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; export default React.memo(function Section(props) { diff --git a/src/Viewer/renderers/sideBySide.jsx b/src/Viewer/renderers/sideBySide.jsx index 610ed82da0..2fe175148b 100644 --- a/src/Viewer/renderers/sideBySide.jsx +++ b/src/Viewer/renderers/sideBySide.jsx @@ -1,7 +1,7 @@ import React, { useRef, useState, useEffect } from 'react'; // import styled from "styled-components"; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/slider.jsx b/src/Viewer/renderers/slider.jsx index 601e19bd3c..65e9514239 100644 --- a/src/Viewer/renderers/slider.jsx +++ b/src/Viewer/renderers/slider.jsx @@ -2,11 +2,11 @@ import React, { useRef, useState, useEffect } from 'react'; import me from 'math-expressions'; import styled from "styled-components"; // import { Spring } from '@react-spring/web'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import ActionButton from "../../_reactComponents/PanelHeaderComponents/ActionButton"; import ActionButtonGroup from "../../_reactComponents/PanelHeaderComponents/ActionButtonGroup"; import { useSetRecoilState } from 'recoil'; -import { rendererState } from './useDoenetRenderer'; +import { rendererState } from '../useDoenetRenderer'; import { MathJax } from "better-react-mathjax"; let round_to_decimals = (x, n) => me.round_numbers_to_decimals(x, n).tree; diff --git a/src/Viewer/renderers/solution.jsx b/src/Viewer/renderers/solution.jsx index fb2a3f4838..e725619fca 100644 --- a/src/Viewer/renderers/solution.jsx +++ b/src/Viewer/renderers/solution.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faPuzzlePiece as puzzle } from '@fortawesome/free-solid-svg-icons'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/spreadsheet.jsx b/src/Viewer/renderers/spreadsheet.jsx index cb10d06ab2..2fa8cd3956 100644 --- a/src/Viewer/renderers/spreadsheet.jsx +++ b/src/Viewer/renderers/spreadsheet.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { HotTable } from '@handsontable/react'; import { HyperFormula } from 'hyperformula'; import 'handsontable/dist/handsontable.full.css'; diff --git a/src/Viewer/renderers/sq.jsx b/src/Viewer/renderers/sq.jsx index e8d52a54c4..43963c6875 100644 --- a/src/Viewer/renderers/sq.jsx +++ b/src/Viewer/renderers/sq.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Sq(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/subsetOfRealsInput.jsx b/src/Viewer/renderers/subsetOfRealsInput.jsx index 0d140476de..f5bea13345 100644 --- a/src/Viewer/renderers/subsetOfRealsInput.jsx +++ b/src/Viewer/renderers/subsetOfRealsInput.jsx @@ -1,6 +1,6 @@ import React, { useRef, useState, useEffect } from 'react'; import styled from "styled-components"; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import ActionButton from '../../_reactComponents/PanelHeaderComponents/ActionButton'; import ActionButtonGroup from '../../_reactComponents/PanelHeaderComponents/ActionButtonGroup'; import ToggleButton from '../../_reactComponents/PanelHeaderComponents/ToggleButton'; diff --git a/src/Viewer/renderers/summaryStatistics.jsx b/src/Viewer/renderers/summaryStatistics.jsx index 486ce427d3..a3e2693dfc 100644 --- a/src/Viewer/renderers/summaryStatistics.jsx +++ b/src/Viewer/renderers/summaryStatistics.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/table.jsx b/src/Viewer/renderers/table.jsx index fc1830ada1..076255b011 100644 --- a/src/Viewer/renderers/table.jsx +++ b/src/Viewer/renderers/table.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import VisibilitySensor from 'react-visibility-sensor-v2'; export default React.memo(function Table(props) { diff --git a/src/Viewer/renderers/tabular.jsx b/src/Viewer/renderers/tabular.jsx index fc0a6cd039..ed89f94949 100644 --- a/src/Viewer/renderers/tabular.jsx +++ b/src/Viewer/renderers/tabular.jsx @@ -1,5 +1,5 @@ import React, { useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/tag.jsx b/src/Viewer/renderers/tag.jsx index e5facc6f61..e2025d452c 100644 --- a/src/Viewer/renderers/tag.jsx +++ b/src/Viewer/renderers/tag.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function Tag(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/text.jsx b/src/Viewer/renderers/text.jsx index 7acf89aaeb..abcd0046c3 100644 --- a/src/Viewer/renderers/text.jsx +++ b/src/Viewer/renderers/text.jsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; import { BoardContext } from './graph'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import me from 'math-expressions'; export default React.memo(function Text(props) { diff --git a/src/Viewer/renderers/textInput.jsx b/src/Viewer/renderers/textInput.jsx index 460c96abf2..9434357af6 100644 --- a/src/Viewer/renderers/textInput.jsx +++ b/src/Viewer/renderers/textInput.jsx @@ -1,9 +1,9 @@ import React, { useRef, useState } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck, faLevelDownAlt, faTimes, faCloud, faPercentage } from '@fortawesome/free-solid-svg-icons' import { sizeToCSS } from './utils/css'; -import { rendererState } from './useDoenetRenderer'; +import { rendererState } from '../useDoenetRenderer'; import { useSetRecoilState } from 'recoil'; import styled from 'styled-components'; diff --git a/src/Viewer/renderers/textList.jsx b/src/Viewer/renderers/textList.jsx index 80e1aaf3a6..c6a296217f 100644 --- a/src/Viewer/renderers/textList.jsx +++ b/src/Viewer/renderers/textList.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; export default React.memo(function TextList(props) { let { name, id, SVs, children } = useDoenetRender(props); diff --git a/src/Viewer/renderers/triggerSet.jsx b/src/Viewer/renderers/triggerSet.jsx index af19420d8b..7877fedd6b 100644 --- a/src/Viewer/renderers/triggerSet.jsx +++ b/src/Viewer/renderers/triggerSet.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import Button from '../../_reactComponents/PanelHeaderComponents/Button'; diff --git a/src/Viewer/renderers/updateValue.jsx b/src/Viewer/renderers/updateValue.jsx index e78d776642..a8b46decc9 100644 --- a/src/Viewer/renderers/updateValue.jsx +++ b/src/Viewer/renderers/updateValue.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import Button from '../../_reactComponents/PanelHeaderComponents/Button'; diff --git a/src/Viewer/renderers/vector.jsx b/src/Viewer/renderers/vector.jsx index 6491d50642..661ee88f4d 100644 --- a/src/Viewer/renderers/vector.jsx +++ b/src/Viewer/renderers/vector.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState, useRef } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { BoardContext } from './graph'; import me from 'math-expressions'; import { MathJax } from 'better-react-mathjax'; diff --git a/src/Viewer/renderers/video.jsx b/src/Viewer/renderers/video.jsx index 059088c56a..908ee62e77 100644 --- a/src/Viewer/renderers/video.jsx +++ b/src/Viewer/renderers/video.jsx @@ -4,7 +4,7 @@ import React, { useRef, useEffect } from 'react'; -import useDoenetRender from './useDoenetRenderer'; +import useDoenetRender from '../useDoenetRenderer'; import { sizeToCSS } from './utils/css'; import cssesc from 'cssesc'; import VisibilitySensor from 'react-visibility-sensor-v2'; diff --git a/src/Viewer/renderers/useDoenetRenderer.jsx b/src/Viewer/useDoenetRenderer.jsx similarity index 96% rename from src/Viewer/renderers/useDoenetRenderer.jsx rename to src/Viewer/useDoenetRenderer.jsx index d5f85ef97b..e339c37545 100644 --- a/src/Viewer/renderers/useDoenetRenderer.jsx +++ b/src/Viewer/useDoenetRenderer.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { atomFamily, useRecoilValue, useSetRecoilState } from 'recoil'; // import { serializedComponentsReviver } from '../../Core/utils/serializedStateProcessing'; -import { renderersloadComponent } from '../PageViewer'; +import { renderersloadComponent } from './PageViewer'; export const rendererState = atomFamily({ key: 'rendererState', @@ -62,7 +62,7 @@ export default function useDoenetRenderer(props, initializeChildrenOnConstructio setRenderersToLoad((old) => { let rendererPromises = { ...old }; if (!(childInstructions.rendererType in rendererPromises)) { - rendererPromises[childInstructions.rendererType] = import(`./${childInstructions.rendererType}.js`); + rendererPromises[childInstructions.rendererType] = import(`./renderers/${childInstructions.rendererType}.js`); } return rendererPromises; })