diff --git a/devserver/src/components/Playground.tsx b/devserver/src/components/Playground.tsx index be6589e3b..1e60f7315 100644 --- a/devserver/src/components/Playground.tsx +++ b/devserver/src/components/Playground.tsx @@ -1,25 +1,23 @@ -import { Classes, Intent, OverlayToaster, type ToastProps, type Toaster } from "@blueprintjs/core"; +import { Classes, Intent, OverlayToaster, type ToastProps } from "@blueprintjs/core"; import classNames from "classnames"; +import { SourceDocumentation, getNames, runInContext, type Context } from "js-slang"; import { Chapter, Variant } from "js-slang/dist/types"; import { stringify } from "js-slang/dist/utils/stringify"; import React, { useCallback } from "react"; import { HotKeys } from "react-hotkeys"; - +import mockModuleContext from "../mockModuleContext"; +import type { InterpreterOutput } from "../types"; import Workspace, { type WorkspaceProps } from "./Workspace"; +import { ControlBarClearButton } from "./controlBar/ControlBarClearButton"; +import { ControlBarRefreshButton } from "./controlBar/ControlBarRefreshButton"; import { ControlBarRunButton } from "./controlBar/ControlBarRunButton"; -import { type Context, runInContext, getNames, SourceDocumentation } from "js-slang"; +import testTabContent from "./sideContent/TestTab"; +import type { SideContentTab } from "./sideContent/types"; +import { getDynamicTabs } from "./sideContent/utils"; // Importing this straight from js-slang doesn't work for whatever reason import createContext from "js-slang/dist/createContext"; -import { getDynamicTabs } from "./sideContent/utils"; -import type { SideContentTab } from "./sideContent/types"; -import testTabContent from "./sideContent/TestTab"; -import { ControlBarClearButton } from "./controlBar/ControlBarClearButton"; -import { ControlBarRefreshButton } from "./controlBar/ControlBarRefreshButton"; -import type { InterpreterOutput } from "../types"; -import mockModuleContext from "../mockModuleContext"; - const refreshSuccessToast: ToastProps = { intent: Intent.SUCCESS, message: "Refresh Successful!" @@ -48,7 +46,7 @@ const Playground: React.FC<{}> = () => { const [replOutput, setReplOutput] = React.useState(null); const [alerts, setAlerts] = React.useState([]); - const toaster = React.useRef(null); + const toaster = React.useRef(null); const showToast = (props: ToastProps) => { if (toaster.current) { diff --git a/devserver/src/components/controlBar/ControlBarClearButton.tsx b/devserver/src/components/controlBar/ControlBarClearButton.tsx index 95ec26220..1e29127bb 100644 --- a/devserver/src/components/controlBar/ControlBarClearButton.tsx +++ b/devserver/src/components/controlBar/ControlBarClearButton.tsx @@ -1,4 +1,4 @@ -import { Tooltip2 } from "@blueprintjs/popover2"; +import { Tooltip } from "@blueprintjs/core"; import ControlButton from "../ControlButton"; import { IconNames } from "@blueprintjs/icons"; @@ -6,10 +6,10 @@ type Props = { onClick: () => void } -export const ControlBarClearButton = (props: Props) => +export const ControlBarClearButton = (props: Props) => -; +; diff --git a/devserver/src/components/controlBar/ControlBarRefreshButton.tsx b/devserver/src/components/controlBar/ControlBarRefreshButton.tsx index a28cc5376..fed4548ad 100644 --- a/devserver/src/components/controlBar/ControlBarRefreshButton.tsx +++ b/devserver/src/components/controlBar/ControlBarRefreshButton.tsx @@ -1,4 +1,4 @@ -import { Tooltip2 } from "@blueprintjs/popover2"; +import { Tooltip } from "@blueprintjs/core"; import ControlButton from "../ControlButton"; import { IconNames } from "@blueprintjs/icons"; @@ -6,10 +6,10 @@ type Props = { onClick: () => void } -export const ControlBarRefreshButton = (props: Props) => +export const ControlBarRefreshButton = (props: Props) => -; +; diff --git a/devserver/src/components/controlBar/ControlBarRunButton.tsx b/devserver/src/components/controlBar/ControlBarRunButton.tsx index 80dfb6e9e..f8fc50803 100644 --- a/devserver/src/components/controlBar/ControlBarRunButton.tsx +++ b/devserver/src/components/controlBar/ControlBarRunButton.tsx @@ -1,6 +1,5 @@ -import { Position } from "@blueprintjs/core"; +import { Position, Tooltip } from "@blueprintjs/core"; import { IconNames } from "@blueprintjs/icons"; -import { Tooltip2 } from "@blueprintjs/popover2"; import React from "react"; import ControlButton from "../ControlButton"; @@ -20,7 +19,7 @@ type ControlButtonRunButtonProps = DispatchProps & StateProps; export const ControlBarRunButton: React.FC = (props) => { const tooltipContent = "Evaluate the program"; return ( - + = (props className: props.className }} /> - + ); }; diff --git a/devserver/src/components/sideContent/SideContent.tsx b/devserver/src/components/sideContent/SideContent.tsx index d54e192c7..0d2c4bbe0 100644 --- a/devserver/src/components/sideContent/SideContent.tsx +++ b/devserver/src/components/sideContent/SideContent.tsx @@ -1,5 +1,4 @@ -import { Card, Icon, Tab, type TabProps, Tabs } from "@blueprintjs/core"; -import { Tooltip2 } from "@blueprintjs/popover2"; +import { Card, Icon, Tab, type TabProps, Tabs, Tooltip } from "@blueprintjs/core"; import React from "react"; import type { SideContentTab } from "./types"; @@ -37,11 +36,11 @@ const renderTab = ( ) => { const iconSize = 20; const tabTitle = ( - +
-
+ ); const tabProps: TabProps = { id: tab.id, diff --git a/devserver/src/styles/index.scss b/devserver/src/styles/index.scss index 5fc22cb31..49e5b163d 100644 --- a/devserver/src/styles/index.scss +++ b/devserver/src/styles/index.scss @@ -1,7 +1,6 @@ @use 'sass:math'; @import '@blueprintjs/core/lib/css/blueprint.css'; -@import '@blueprintjs/popover2/lib/css/blueprint-popover2.css'; @import '@blueprintjs/core/lib/scss/variables'; // CSS styles for react-mde Markdown editor diff --git a/package.json b/package.json index 289ca538e..b9136b9d8 100644 --- a/package.json +++ b/package.json @@ -96,9 +96,8 @@ "yarnhook": "^0.5.1" }, "dependencies": { - "@blueprintjs/core": "^4.20.2", - "@blueprintjs/icons": "^4.4.0", - "@blueprintjs/popover2": "^1.4.3", + "@blueprintjs/core": "^5.9.1", + "@blueprintjs/icons": "^5.7.1", "@box2d/core": "^0.10.0", "@box2d/debug-draw": "^0.10.0", "@jscad/modeling": "2.9.6", diff --git a/scripts/src/build/modules/tab.ts b/scripts/src/build/modules/tab.ts index c11c6469b..6b367d6b6 100644 --- a/scripts/src/build/modules/tab.ts +++ b/scripts/src/build/modules/tab.ts @@ -96,7 +96,8 @@ export const getTabOptions = (tabs: string[], { srcDir, outDir }: Record<'srcDir 'react-ace', 'react-dom', 'react/jsx-runtime', - '@blueprintjs/*', + '@blueprintjs/core', + '@blueprintjs/icons', // 'phaser', ], jsx: 'automatic', diff --git a/src/tabs/Csg/hover_control_hint.tsx b/src/tabs/Csg/hover_control_hint.tsx index ab051ca32..8ac8a419f 100644 --- a/src/tabs/Csg/hover_control_hint.tsx +++ b/src/tabs/Csg/hover_control_hint.tsx @@ -1,6 +1,5 @@ /* [Imports] */ -import { Icon } from '@blueprintjs/core'; -import { Tooltip2 } from '@blueprintjs/popover2'; +import { Icon, Tooltip } from '@blueprintjs/core'; import React from 'react'; import { BP_ICON_COLOR, SA_TAB_BUTTON_WIDTH, SA_TAB_ICON_SIZE } from '../common/css_constants'; import type { HintProps } from './types'; @@ -18,7 +17,7 @@ export default class HoverControlHint extends React.Component { height: SA_TAB_BUTTON_WIDTH, }} > - @@ -27,7 +26,7 @@ export default class HoverControlHint extends React.Component { size={SA_TAB_ICON_SIZE} color={BP_ICON_COLOR} /> - + ; } } diff --git a/src/tabs/Curve/animation_canvas_3d_curve.tsx b/src/tabs/Curve/animation_canvas_3d_curve.tsx index c78988e94..b09de6cdc 100644 --- a/src/tabs/Curve/animation_canvas_3d_curve.tsx +++ b/src/tabs/Curve/animation_canvas_3d_curve.tsx @@ -1,6 +1,5 @@ -import { Icon, Slider } from '@blueprintjs/core'; +import { Icon, Slider, Tooltip } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { type AnimatedCurve } from '../../bundles/curve/types'; import AutoLoopSwitch from '../common/AutoLoopSwitch'; @@ -292,7 +291,7 @@ State disabled={Boolean(this.state.errored)} onClick={ this.onPlayButtonClick } /> - @@ -302,7 +301,7 @@ State > - +
- @@ -339,7 +338,7 @@ State onChange={ this.onAngleSliderChange } /> - +
{
{getInstance() .getUserAgreementStatus() === 'new_user_agreement' &&
The User Agreement has updated.
} - { + { if (e !== null) { - if (e.input !== null) { - e.input.checked = (getInstance() - .getUserAgreementStatus() === 'agreed'); - this.userAgreementCheckboxChecked = e.input.checked; - } + e.checked = (getInstance() + .getUserAgreementStatus() === 'agreed'); + this.userAgreementCheckboxChecked = e.checked; } }} onChange = {(event : React.ChangeEvent) => { this.userAgreementCheckboxChecked = event.target.checked; diff --git a/src/tabs/common/AnimationCanvas.tsx b/src/tabs/common/AnimationCanvas.tsx index 1fd64fb7e..40b80253b 100644 --- a/src/tabs/common/AnimationCanvas.tsx +++ b/src/tabs/common/AnimationCanvas.tsx @@ -1,6 +1,5 @@ -import { Icon, Slider } from '@blueprintjs/core'; +import { Icon, Slider, Tooltip } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { type glAnimation } from '../../typings/anim_types'; import AutoLoopSwitch from './AutoLoopSwitch'; @@ -269,7 +268,7 @@ AnimCanvasState disabled={Boolean(this.state.errored)} onClick={this.onPlayButtonClick} /> - @@ -279,7 +278,7 @@ AnimCanvasState > - + ) => (props.disabled ? : - +