From d62210988f5c2687019710af47f7b6646e846d17 Mon Sep 17 00:00:00 2001 From: Raanan Weber Date: Wed, 6 Nov 2024 17:20:28 +0100 Subject: [PATCH 1/9] Needed changes to enable the inspector on the viewer --- packages/dev/buildTools/src/webpackTools.ts | 4 +-- .../animations/curveEditor/graph/keyPoint.tsx | 6 ++--- .../embedHost/embedHostComponent.tsx | 4 +-- packages/dev/inspector/tsconfig.build.json | 3 ++- packages/dev/inspector/tsconfig.json | 5 +++- ...Button.modules.scss => Button.module.scss} | 0 .../src/components/Button.tsx | 2 +- .../{Icon.modules.scss => Icon.module.scss} | 0 .../src/components/Icon.tsx | 2 +- .../{Label.modules.scss => Label.module.scss} | 0 .../src/components/Label.tsx | 2 +- ...modules.scss => MessageDialog.module.scss} | 0 .../src/components/MessageDialog.tsx | 2 +- ...s.scss => TextInputWithSubmit.module.scss} | 0 .../src/components/TextInputWithSubmit.tsx | 2 +- ...Toggle.modules.scss => Toggle.module.scss} | 0 .../src/components/Toggle.tsx | 2 +- ...ar.modules.scss => CommandBar.module.scss} | 0 .../components/bars/CommandBarComponent.tsx | 2 +- ...modules.scss => CommandButton.module.scss} | 0 .../bars/CommandButtonComponent.tsx | 2 +- ...dules.scss => CommandDropdown.module.scss} | 0 .../bars/CommandDropdownComponent.tsx | 2 +- ...s.scss => ColorComponentEntry.module.scss} | 0 .../colorPicker/ColorComponentEntry.tsx | 2 +- ...r.modules.scss => ColorPicker.module.scss} | 0 .../components/colorPicker/ColorPicker.tsx | 2 +- ...olor.modules.scss => HexColor.module.scss} | 0 .../src/components/colorPicker/HexColor.tsx | 2 +- ...odules.scss => FlexibleColumn.module.scss} | 0 .../src/components/layout/FlexibleColumn.tsx | 2 +- ...ules.scss => FlexibleDropZone.module.scss} | 0 .../components/layout/FlexibleDropZone.tsx | 2 +- ...scss => FlexibleGridContainer.module.scss} | 0 .../layout/FlexibleGridContainer.tsx | 2 +- ...les.scss => FlexibleResizeBar.module.scss} | 0 .../components/layout/FlexibleResizeBar.tsx | 2 +- ...b.modules.scss => FlexibleTab.module.scss} | 0 .../src/components/layout/FlexibleTab.tsx | 2 +- ...scss => FlexibleTabsContainer.module.scss} | 0 .../layout/FlexibleTabsContainer.tsx | 2 +- ...es.scss => ColorLineComponent.module.scss} | 0 .../components/lines/ColorLineComponent.tsx | 2 +- ...s => ColorPickerLineComponent.module.scss} | 0 .../lines/ColorPickerLineComponent.tsx | 2 +- ...ss => FileButtonLineComponent.module.scss} | 0 .../lines/FileButtonLineComponent.tsx | 2 +- ...scss => NumericInputComponent.module.scss} | 0 .../lines/NumericInputComponent.tsx | 2 +- ....scss => OptionsLineComponent.module.scss} | 0 .../components/lines/OptionsLineComponent.tsx | 2 +- ....scss => GraphConnectorHandle.module.scss} | 0 .../reactGraphSystem/GraphConnectorHandle.tsx | 2 +- ...odules.scss => GraphContainer.module.scss} | 0 .../reactGraphSystem/GraphContainer.tsx | 2 +- ...ode.modules.scss => GraphNode.module.scss} | 0 .../components/reactGraphSystem/GraphNode.tsx | 2 +- ...common.modules.scss => common.module.scss} | 0 .../src/nodeGraphSystem/frameNodePort.ts | 2 +- ...s.modules.scss => graphCanvas.module.scss} | 0 .../src/nodeGraphSystem/graphCanvas.tsx | 4 +-- ...me.modules.scss => graphFrame.module.scss} | 0 .../src/nodeGraphSystem/graphFrame.ts | 4 +-- ...ode.modules.scss => graphNode.module.scss} | 0 .../src/nodeGraphSystem/graphNode.ts | 4 +-- ...Link.modules.scss => nodeLink.module.scss} | 0 .../src/nodeGraphSystem/nodeLink.ts | 4 +-- ...Port.modules.scss => nodePort.module.scss} | 0 .../src/nodeGraphSystem/nodePort.ts | 4 +-- .../src/scssDeclaration.d.ts | 2 +- packages/tools/guiEditor/src/custom.d.ts | 2 +- packages/tools/nodeEditor/src/custom.d.ts | 2 +- ...modules.scss => blockNodeData.module.scss} | 0 .../src/graphSystem/blockNodeData.ts | 2 +- ...s.scss => clampDisplayManager.module.scss} | 0 ...common.modules.scss => common.module.scss} | 0 ...s.scss => curveDisplayManager.module.scss} | 0 .../display/curveDisplayManager.ts | 2 +- ...s.scss => elbowDisplayManager.module.scss} | 0 .../display/elbowDisplayManager.ts | 2 +- ...css => gradientDisplayManager.module.scss} | 0 .../display/gradientDisplayManager.ts | 2 +- ... => imageSourceDisplayManager.module.scss} | 0 .../display/imageSourceDisplayManager.ts | 4 +-- ...s.scss => inputDisplayManager.module.scss} | 0 .../display/inputDisplayManager.ts | 2 +- ....scss => outputDisplayManager.module.scss} | 0 ...s.scss => remapDisplayManager.module.scss} | 0 .../display/remapDisplayManager.ts | 2 +- ...scss => textureDisplayManager.module.scss} | 0 .../display/textureDisplayManager.ts | 4 +-- ...=> trigonometryDisplayManager.module.scss} | 0 .../tools/nodeGeometryEditor/src/custom.d.ts | 2 +- ...modules.scss => blockNodeData.module.scss} | 0 .../src/graphSystem/blockNodeData.ts | 2 +- ...common.modules.scss => common.module.scss} | 0 ...s.scss => debugDisplayManager.module.scss} | 0 .../display/debugDisplayManager.ts | 2 +- ...s.scss => elbowDisplayManager.module.scss} | 0 .../display/elbowDisplayManager.ts | 2 +- ...s.scss => inputDisplayManager.module.scss} | 0 .../display/inputDisplayManager.ts | 2 +- ....scss => sourceDisplayManager.module.scss} | 0 ...scss => textureDisplayManager.module.scss} | 0 .../display/textureDisplayManager.ts | 2 +- .../nodeRenderGraphEditor/src/custom.d.ts | 2 +- ...modules.scss => blockNodeData.module.scss} | 0 .../src/graphSystem/blockNodeData.ts | 2 +- ...common.modules.scss => common.module.scss} | 0 ...s.scss => elbowDisplayManager.module.scss} | 0 .../display/elbowDisplayManager.ts | 2 +- ...s.scss => inputDisplayManager.module.scss} | 0 .../display/inputDisplayManager.ts | 2 +- ... => postProcessDisplayManager.module.scss} | 0 packages/tools/viewer-alpha/src/viewer.ts | 25 +++++++++++++++++++ .../viewer-alpha/test/apps/web/index.html | 17 +++++++++++++ packages/tools/viewer-alpha/vite.config.mjs | 8 ++++++ ...les.scss => NodeListComponent.module.scss} | 0 .../vsm/src/components/NodeListComponent.tsx | 2 +- .../tools/vsm/src/customDeclarations.d.ts | 2 +- ...nch.modules.scss => workbench.module.scss} | 0 packages/tools/vsm/src/workbench.tsx | 2 +- 122 files changed, 126 insertions(+), 72 deletions(-) rename packages/dev/sharedUiComponents/src/components/{Button.modules.scss => Button.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/{Icon.modules.scss => Icon.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/{Label.modules.scss => Label.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/{MessageDialog.modules.scss => MessageDialog.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/{TextInputWithSubmit.modules.scss => TextInputWithSubmit.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/{Toggle.modules.scss => Toggle.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/bars/{CommandBar.modules.scss => CommandBar.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/bars/{CommandButton.modules.scss => CommandButton.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/bars/{CommandDropdown.modules.scss => CommandDropdown.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/colorPicker/{ColorComponentEntry.modules.scss => ColorComponentEntry.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/colorPicker/{ColorPicker.modules.scss => ColorPicker.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/colorPicker/{HexColor.modules.scss => HexColor.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleColumn.modules.scss => FlexibleColumn.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleDropZone.modules.scss => FlexibleDropZone.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleGridContainer.modules.scss => FlexibleGridContainer.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleResizeBar.modules.scss => FlexibleResizeBar.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleTab.modules.scss => FlexibleTab.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/layout/{FlexibleTabsContainer.modules.scss => FlexibleTabsContainer.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/lines/{ColorLineComponent.modules.scss => ColorLineComponent.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/lines/{ColorPickerLineComponent.modules.scss => ColorPickerLineComponent.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/lines/{FileButtonLineComponent.modules.scss => FileButtonLineComponent.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/lines/{NumericInputComponent.modules.scss => NumericInputComponent.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/lines/{OptionsLineComponent.modules.scss => OptionsLineComponent.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/reactGraphSystem/{GraphConnectorHandle.modules.scss => GraphConnectorHandle.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/reactGraphSystem/{GraphContainer.modules.scss => GraphContainer.module.scss} (100%) rename packages/dev/sharedUiComponents/src/components/reactGraphSystem/{GraphNode.modules.scss => GraphNode.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{common.modules.scss => common.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{graphCanvas.modules.scss => graphCanvas.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{graphFrame.modules.scss => graphFrame.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{graphNode.modules.scss => graphNode.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{nodeLink.modules.scss => nodeLink.module.scss} (100%) rename packages/dev/sharedUiComponents/src/nodeGraphSystem/{nodePort.modules.scss => nodePort.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/{blockNodeData.modules.scss => blockNodeData.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{clampDisplayManager.modules.scss => clampDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{common.modules.scss => common.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{curveDisplayManager.modules.scss => curveDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{elbowDisplayManager.modules.scss => elbowDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{gradientDisplayManager.modules.scss => gradientDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{imageSourceDisplayManager.modules.scss => imageSourceDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{inputDisplayManager.modules.scss => inputDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{outputDisplayManager.modules.scss => outputDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{remapDisplayManager.modules.scss => remapDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{textureDisplayManager.modules.scss => textureDisplayManager.module.scss} (100%) rename packages/tools/nodeEditor/src/graphSystem/display/{trigonometryDisplayManager.modules.scss => trigonometryDisplayManager.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/{blockNodeData.modules.scss => blockNodeData.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{common.modules.scss => common.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{debugDisplayManager.modules.scss => debugDisplayManager.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{elbowDisplayManager.modules.scss => elbowDisplayManager.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{inputDisplayManager.modules.scss => inputDisplayManager.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{sourceDisplayManager.modules.scss => sourceDisplayManager.module.scss} (100%) rename packages/tools/nodeGeometryEditor/src/graphSystem/display/{textureDisplayManager.modules.scss => textureDisplayManager.module.scss} (100%) rename packages/tools/nodeRenderGraphEditor/src/graphSystem/{blockNodeData.modules.scss => blockNodeData.module.scss} (100%) rename packages/tools/nodeRenderGraphEditor/src/graphSystem/display/{common.modules.scss => common.module.scss} (100%) rename packages/tools/nodeRenderGraphEditor/src/graphSystem/display/{elbowDisplayManager.modules.scss => elbowDisplayManager.module.scss} (100%) rename packages/tools/nodeRenderGraphEditor/src/graphSystem/display/{inputDisplayManager.modules.scss => inputDisplayManager.module.scss} (100%) rename packages/tools/nodeRenderGraphEditor/src/graphSystem/display/{postProcessDisplayManager.modules.scss => postProcessDisplayManager.module.scss} (100%) rename packages/tools/vsm/src/components/{NodeListComponent.modules.scss => NodeListComponent.module.scss} (100%) rename packages/tools/vsm/src/{workbench.modules.scss => workbench.module.scss} (100%) diff --git a/packages/dev/buildTools/src/webpackTools.ts b/packages/dev/buildTools/src/webpackTools.ts index 6bf45d4dbcd..fb8e14d9259 100644 --- a/packages/dev/buildTools/src/webpackTools.ts +++ b/packages/dev/buildTools/src/webpackTools.ts @@ -97,7 +97,7 @@ export const getRules = ( rules.push( { sideEffects: options.sideEffects, - test: /(?; @@ -47,7 +47,7 @@ export class EmbedHostComponent extends React.Component; export default content; } diff --git a/packages/tools/guiEditor/src/custom.d.ts b/packages/tools/guiEditor/src/custom.d.ts index a83f2be29e8..b8b82f402df 100644 --- a/packages/tools/guiEditor/src/custom.d.ts +++ b/packages/tools/guiEditor/src/custom.d.ts @@ -3,7 +3,7 @@ declare module "*.svg" { export default content; } -declare module "*.modules.scss" { +declare module "*.module.scss" { const content: Record; export default content; } diff --git a/packages/tools/nodeEditor/src/custom.d.ts b/packages/tools/nodeEditor/src/custom.d.ts index a83f2be29e8..b8b82f402df 100644 --- a/packages/tools/nodeEditor/src/custom.d.ts +++ b/packages/tools/nodeEditor/src/custom.d.ts @@ -3,7 +3,7 @@ declare module "*.svg" { export default content; } -declare module "*.modules.scss" { +declare module "*.module.scss" { const content: Record; export default content; } diff --git a/packages/tools/nodeEditor/src/graphSystem/blockNodeData.modules.scss b/packages/tools/nodeEditor/src/graphSystem/blockNodeData.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/blockNodeData.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/blockNodeData.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/blockNodeData.ts b/packages/tools/nodeEditor/src/graphSystem/blockNodeData.ts index e69a431d8ab..dd7596b03c2 100644 --- a/packages/tools/nodeEditor/src/graphSystem/blockNodeData.ts +++ b/packages/tools/nodeEditor/src/graphSystem/blockNodeData.ts @@ -6,7 +6,7 @@ import type { IPortData } from "shared-ui-components/nodeGraphSystem/interfaces/ import { ConnectionPointPortData } from "./connectionPointPortData"; import triangle from "../imgs/triangle.svg"; import square from "../imgs/square.svg"; -import styles from "./blockNodeData.modules.scss"; +import styles from "./blockNodeData.module.scss"; import type { NodeMaterialTeleportOutBlock } from "core/Materials/Node/Blocks/Teleport/teleportOutBlock"; import type { NodeMaterialTeleportInBlock } from "core/Materials/Node/Blocks/Teleport/teleportInBlock"; diff --git a/packages/tools/nodeEditor/src/graphSystem/display/clampDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/clampDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/clampDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/clampDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/common.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/common.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/common.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/common.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.ts index 293c8252064..d7058a07c05 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/curveDisplayManager.ts @@ -3,7 +3,7 @@ import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/inter import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; import type { CurveBlock } from "core/Materials/Node/Blocks/curveBlock"; import { CurveBlockTypes } from "core/Materials/Node/Blocks/curveBlock"; -import styles from "./curveDisplayManager.modules.scss"; +import styles from "./curveDisplayManager.module.scss"; export class CurveDisplayManager implements IDisplayManager { public getHeaderClass() { diff --git a/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.ts index 8ee8d6c6eca..98fef7e9fac 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/elbowDisplayManager.ts @@ -3,7 +3,7 @@ import type { ElbowBlock } from "core/Materials/Node/Blocks/elbowBlock"; import { BlockTools } from "../../blockTools"; import type { IDisplayManager, VisualContentDescription } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./elbowDisplayManager.modules.scss"; +import styles from "./elbowDisplayManager.module.scss"; export class ElbowDisplayManager implements IDisplayManager { public getHeaderClass() { diff --git a/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.ts index cb8961692a9..d5520034719 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/gradientDisplayManager.ts @@ -2,7 +2,7 @@ import type { NodeMaterialBlock } from "core/Materials/Node/nodeMaterialBlock"; import type { GradientBlock } from "core/Materials/Node/Blocks/gradientBlock"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./gradientDisplayManager.modules.scss"; +import styles from "./gradientDisplayManager.module.scss"; export class GradientDisplayManager implements IDisplayManager { public getHeaderClass() { diff --git a/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.ts index bc57bcc20b6..a2d05344ff2 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/imageSourceDisplayManager.ts @@ -3,8 +3,8 @@ import type { ImageSourceBlock } from "core/Materials/Node/Blocks/Dual/imageSour import { TextureLineComponent } from "../../sharedComponents/textureLineComponent"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import localStyles from "./imageSourceDisplayManager.modules.scss"; -import commonStyles from "./common.modules.scss"; +import localStyles from "./imageSourceDisplayManager.module.scss"; +import commonStyles from "./common.module.scss"; export class ImageSourceDisplayManager implements IDisplayManager { private _previewCanvas: HTMLCanvasElement; diff --git a/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.ts index f920838c0b2..241c84200d3 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/inputDisplayManager.ts @@ -8,7 +8,7 @@ import type { Color3 } from "core/Maths/math.color"; import { BlockTools } from "../../blockTools"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./inputDisplayManager.modules.scss"; +import styles from "./inputDisplayManager.module.scss"; const inputNameToAttributeValue: { [name: string]: string } = { position2d: "position", diff --git a/packages/tools/nodeEditor/src/graphSystem/display/outputDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/outputDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/outputDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/outputDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.ts index 4d7d5f3e5c3..06480de1e49 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/remapDisplayManager.ts @@ -4,7 +4,7 @@ import type { RemapBlock } from "core/Materials/Node/Blocks/remapBlock"; import type { NodeMaterialConnectionPoint } from "core/Materials/Node/nodeMaterialBlockConnectionPoint"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./remapDisplayManager.modules.scss"; +import styles from "./remapDisplayManager.module.scss"; export class RemapDisplayManager implements IDisplayManager { public getHeaderClass() { diff --git a/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.module.scss diff --git a/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.ts b/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.ts index 98b7e5e594d..54f5e8271bf 100644 --- a/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.ts +++ b/packages/tools/nodeEditor/src/graphSystem/display/textureDisplayManager.ts @@ -9,8 +9,8 @@ import { ReflectionBlock } from "core/Materials/Node/Blocks/PBR/reflectionBlock" import { TriPlanarBlock } from "core/Materials/Node/Blocks/triPlanarBlock"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import localStyles from "./textureDisplayManager.modules.scss"; -import commonStyles from "./common.modules.scss"; +import localStyles from "./textureDisplayManager.module.scss"; +import commonStyles from "./common.module.scss"; export class TextureDisplayManager implements IDisplayManager { private _previewCanvas: HTMLCanvasElement; diff --git a/packages/tools/nodeEditor/src/graphSystem/display/trigonometryDisplayManager.modules.scss b/packages/tools/nodeEditor/src/graphSystem/display/trigonometryDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeEditor/src/graphSystem/display/trigonometryDisplayManager.modules.scss rename to packages/tools/nodeEditor/src/graphSystem/display/trigonometryDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/custom.d.ts b/packages/tools/nodeGeometryEditor/src/custom.d.ts index a83f2be29e8..b8b82f402df 100644 --- a/packages/tools/nodeGeometryEditor/src/custom.d.ts +++ b/packages/tools/nodeGeometryEditor/src/custom.d.ts @@ -3,7 +3,7 @@ declare module "*.svg" { export default content; } -declare module "*.modules.scss" { +declare module "*.module.scss" { const content: Record; export default content; } diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.ts b/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.ts index 27dcaa0062c..e8eecd955ee 100644 --- a/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.ts +++ b/packages/tools/nodeGeometryEditor/src/graphSystem/blockNodeData.ts @@ -2,7 +2,7 @@ import type { INodeContainer } from "shared-ui-components/nodeGraphSystem/interf import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; import type { IPortData } from "shared-ui-components/nodeGraphSystem/interfaces/portData"; import { ConnectionPointPortData } from "./connectionPointPortData"; -import styles from "./blockNodeData.modules.scss"; +import styles from "./blockNodeData.module.scss"; import type { NodeGeometryBlock } from "core/Meshes/Node/nodeGeometryBlock"; import type { Nullable } from "core/types"; import type { Observer } from "core/Misc/observable"; diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/common.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/common.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/common.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/common.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.ts b/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.ts index e81c5d3f4e2..48bc6b5d9c3 100644 --- a/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.ts +++ b/packages/tools/nodeGeometryEditor/src/graphSystem/display/debugDisplayManager.ts @@ -1,7 +1,7 @@ import { BlockTools } from "../../blockTools"; import type { IDisplayManager, VisualContentDescription } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./debugDisplayManager.modules.scss"; +import styles from "./debugDisplayManager.module.scss"; import type { NodeGeometryBlock } from "core/Meshes/Node/nodeGeometryBlock"; import type { DebugBlock } from "core/Meshes/Node/Blocks/debugBlock"; diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.ts b/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.ts index b1707ac8f84..7d7fac9a96e 100644 --- a/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.ts +++ b/packages/tools/nodeGeometryEditor/src/graphSystem/display/elbowDisplayManager.ts @@ -1,7 +1,7 @@ import { BlockTools } from "../../blockTools"; import type { IDisplayManager, VisualContentDescription } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./elbowDisplayManager.modules.scss"; +import styles from "./elbowDisplayManager.module.scss"; import type { NodeGeometryBlock } from "core/Meshes/Node/nodeGeometryBlock"; import type { GeometryElbowBlock } from "core/Meshes/Node/Blocks/geometryElbowBlock"; diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.ts b/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.ts index 837b4113816..4e5f0e5b7ab 100644 --- a/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.ts +++ b/packages/tools/nodeGeometryEditor/src/graphSystem/display/inputDisplayManager.ts @@ -2,7 +2,7 @@ import type { Vector2, Vector3, Vector4 } from "core/Maths/math.vector"; import { BlockTools } from "../../blockTools"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./inputDisplayManager.modules.scss"; +import styles from "./inputDisplayManager.module.scss"; import type { GeometryInputBlock } from "core/Meshes/Node/Blocks/geometryInputBlock"; import { NodeGeometryBlockConnectionPointTypes } from "core/Meshes/Node/Enums/nodeGeometryConnectionPointTypes"; import { NodeGeometryContextualSources } from "core/Meshes/Node/Enums/nodeGeometryContextualSources"; diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/sourceDisplayManager.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/sourceDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/sourceDisplayManager.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/sourceDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.modules.scss b/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.modules.scss rename to packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.module.scss diff --git a/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.ts b/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.ts index 38ffa99457d..4efe378eda5 100644 --- a/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.ts +++ b/packages/tools/nodeGeometryEditor/src/graphSystem/display/textureDisplayManager.ts @@ -1,6 +1,6 @@ import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import localStyles from "./textureDisplayManager.modules.scss"; +import localStyles from "./textureDisplayManager.module.scss"; import type { GeometryTextureBlock } from "core/Meshes/Node/Blocks/Textures/geometryTextureBlock"; import type { NodeGeometryBlock } from "core/Meshes/Node/nodeGeometryBlock"; diff --git a/packages/tools/nodeRenderGraphEditor/src/custom.d.ts b/packages/tools/nodeRenderGraphEditor/src/custom.d.ts index a83f2be29e8..b8b82f402df 100644 --- a/packages/tools/nodeRenderGraphEditor/src/custom.d.ts +++ b/packages/tools/nodeRenderGraphEditor/src/custom.d.ts @@ -3,7 +3,7 @@ declare module "*.svg" { export default content; } -declare module "*.modules.scss" { +declare module "*.module.scss" { const content: Record; export default content; } diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.modules.scss b/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.module.scss similarity index 100% rename from packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.modules.scss rename to packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.module.scss diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.ts b/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.ts index f1db679d396..d72c3c66632 100644 --- a/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.ts +++ b/packages/tools/nodeRenderGraphEditor/src/graphSystem/blockNodeData.ts @@ -2,7 +2,7 @@ import type { INodeContainer } from "shared-ui-components/nodeGraphSystem/interf import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; import type { IPortData } from "shared-ui-components/nodeGraphSystem/interfaces/portData"; import { ConnectionPointPortData } from "./connectionPointPortData"; -import styles from "./blockNodeData.modules.scss"; +import styles from "./blockNodeData.module.scss"; import type { NodeRenderGraphBlock } from "core/FrameGraph/Node/nodeRenderGraphBlock"; import type { Nullable } from "core/types"; import type { Observer } from "core/Misc/observable"; diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/common.modules.scss b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/common.module.scss similarity index 100% rename from packages/tools/nodeRenderGraphEditor/src/graphSystem/display/common.modules.scss rename to packages/tools/nodeRenderGraphEditor/src/graphSystem/display/common.module.scss diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.modules.scss b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.modules.scss rename to packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.module.scss diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.ts b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.ts index f38b40ee00e..9315500bf30 100644 --- a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.ts +++ b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/elbowDisplayManager.ts @@ -1,7 +1,7 @@ import { BlockTools } from "../../blockTools"; import type { IDisplayManager, VisualContentDescription } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./elbowDisplayManager.modules.scss"; +import styles from "./elbowDisplayManager.module.scss"; import type { NodeRenderGraphBlock } from "core/FrameGraph/Node/nodeRenderGraphBlock"; import type { NodeRenderGraphElbowBlock } from "core/FrameGraph/Node/Blocks/elbowBlock"; diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.modules.scss b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.modules.scss rename to packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.module.scss diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.ts b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.ts index a30903bc091..6bceda4b4e9 100644 --- a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.ts +++ b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/inputDisplayManager.ts @@ -1,7 +1,7 @@ import { BlockTools } from "../../blockTools"; import type { IDisplayManager } from "shared-ui-components/nodeGraphSystem/interfaces/displayManager"; import type { INodeData } from "shared-ui-components/nodeGraphSystem/interfaces/nodeData"; -import styles from "./inputDisplayManager.modules.scss"; +import styles from "./inputDisplayManager.module.scss"; import type { NodeRenderGraphInputBlock } from "core/FrameGraph/Node/Blocks/inputBlock"; import { NodeRenderGraphBlockConnectionPointTypes } from "core/FrameGraph/Node/Types/nodeRenderGraphTypes"; diff --git a/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/postProcessDisplayManager.modules.scss b/packages/tools/nodeRenderGraphEditor/src/graphSystem/display/postProcessDisplayManager.module.scss similarity index 100% rename from packages/tools/nodeRenderGraphEditor/src/graphSystem/display/postProcessDisplayManager.modules.scss rename to packages/tools/nodeRenderGraphEditor/src/graphSystem/display/postProcessDisplayManager.module.scss diff --git a/packages/tools/viewer-alpha/src/viewer.ts b/packages/tools/viewer-alpha/src/viewer.ts index 305afcf4b2c..49ea1b70ffd 100644 --- a/packages/tools/viewer-alpha/src/viewer.ts +++ b/packages/tools/viewer-alpha/src/viewer.ts @@ -33,6 +33,8 @@ import { Viewport } from "core/Maths/math.viewport"; import { GetHotSpotToRef } from "core/Meshes/abstractMesh.hotSpot"; import { SnapshotRenderingHelper } from "core/Misc/snapshotRenderingHelper"; +import type { Inspector } from "inspector/inspector"; + const toneMappingOptions = ["none", "standard", "aces", "neutral"] as const; export type ToneMapping = (typeof toneMappingOptions)[number]; @@ -241,6 +243,8 @@ export class Viewer implements IDisposable { private _activeAnimationObservers: Observer[] = []; private _animationSpeed = 1; + private _inspectorInstance: Nullable = null; + public constructor( private readonly _engine: AbstractEngine, options?: ViewerOptions @@ -539,6 +543,27 @@ export class Viewer implements IDisposable { await this._updateModel(undefined, undefined, abortSignal); } + /** + * Show the inspector for this scene + * @param rootElement the root element to attach the inspector to. defaults to body (but body will need to be styled correctly) + */ + public async showInspector(rootElement?: HTMLElement): Promise { + if (!this._inspectorInstance) { + // eslint-disable-next-line @typescript-eslint/naming-convention + await import("inspector/inspector").then(({ Inspector }) => { + this._inspectorInstance = Inspector; + }); + } + this._inspectorInstance?.Show(this._details.scene, { globalRoot: rootElement || document.body }); + } + + /** + * Hide the inspector for this scene + */ + public hideInspector(): void { + this._inspectorInstance?.Hide(); + } + private async _updateModel(source: string | File | ArrayBufferView | undefined, options?: LoadAssetContainerOptions, abortSignal?: AbortSignal): Promise { this._throwIfDisposedOrAborted(abortSignal); diff --git a/packages/tools/viewer-alpha/test/apps/web/index.html b/packages/tools/viewer-alpha/test/apps/web/index.html index b4f62fbeb98..b9785691830 100644 --- a/packages/tools/viewer-alpha/test/apps/web/index.html +++ b/packages/tools/viewer-alpha/test/apps/web/index.html @@ -33,6 +33,12 @@ right: 10px; } + .toggle-inspector-button { + position: absolute; + top: 100px; + right: 10px; + } + .lineContainer { pointer-events: none; display: block; @@ -84,10 +90,12 @@ +
+ diff --git a/packages/tools/viewer-alpha/vite.config.mjs b/packages/tools/viewer-alpha/vite.config.mjs index aa2a54e72b7..fcfd590cf76 100644 --- a/packages/tools/viewer-alpha/vite.config.mjs +++ b/packages/tools/viewer-alpha/vite.config.mjs @@ -7,6 +7,7 @@ import chalk from "chalk"; import { mkdirSync, createWriteStream } from "fs"; import { execSync } from "child_process"; import path from "path"; +import { inspect } from "util"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()); @@ -54,6 +55,13 @@ export default defineConfig(({ mode }) => { alias: { core: `@${source}/core/dist`, loaders: `@${source}/loaders/dist`, + inspector: `@${source}/inspector/dist`, + //"shared-ui-components": `@${source}/sharedUiComponents/dist`, + materials: `@${source}/materials/dist`, + serializers: `@${source}/serializers/dist`, + gui: `@${source}/gui/dist`, + "shared-ui-components": path.resolve("../../dev/sharedUiComponents/dist"), + "gui-editor": path.resolve("../../tools/guiEditor/dist"), }, }, }; diff --git a/packages/tools/vsm/src/components/NodeListComponent.modules.scss b/packages/tools/vsm/src/components/NodeListComponent.module.scss similarity index 100% rename from packages/tools/vsm/src/components/NodeListComponent.modules.scss rename to packages/tools/vsm/src/components/NodeListComponent.module.scss diff --git a/packages/tools/vsm/src/components/NodeListComponent.tsx b/packages/tools/vsm/src/components/NodeListComponent.tsx index db850889ae9..26d91d46175 100644 --- a/packages/tools/vsm/src/components/NodeListComponent.tsx +++ b/packages/tools/vsm/src/components/NodeListComponent.tsx @@ -3,7 +3,7 @@ import type { FC } from "react"; import { useState } from "react"; import { SetPositionAction } from "../actions/actions/SetPositionAction"; import { State } from "../stateMachine/State"; -import style from "./NodeListComponent.modules.scss"; +import style from "./NodeListComponent.module.scss"; import { useSceneNode } from "./tools/useSceneNode"; import { useStateMachine } from "./tools/useStateMachine"; diff --git a/packages/tools/vsm/src/customDeclarations.d.ts b/packages/tools/vsm/src/customDeclarations.d.ts index a83f2be29e8..b8b82f402df 100644 --- a/packages/tools/vsm/src/customDeclarations.d.ts +++ b/packages/tools/vsm/src/customDeclarations.d.ts @@ -3,7 +3,7 @@ declare module "*.svg" { export default content; } -declare module "*.modules.scss" { +declare module "*.module.scss" { const content: Record; export default content; } diff --git a/packages/tools/vsm/src/workbench.modules.scss b/packages/tools/vsm/src/workbench.module.scss similarity index 100% rename from packages/tools/vsm/src/workbench.modules.scss rename to packages/tools/vsm/src/workbench.module.scss diff --git a/packages/tools/vsm/src/workbench.tsx b/packages/tools/vsm/src/workbench.tsx index 313b6fbcc1c..3ae11efd216 100644 --- a/packages/tools/vsm/src/workbench.tsx +++ b/packages/tools/vsm/src/workbench.tsx @@ -5,7 +5,7 @@ import type { FC } from "react"; import { CommandBarComponent } from "shared-ui-components/components/bars/CommandBarComponent"; import { FlexibleGridLayout } from "shared-ui-components/components/layout/FlexibleGridLayout"; import { SceneContext } from "./context/SceneContext"; -import style from "./workbench.modules.scss"; +import style from "./workbench.module.scss"; import { StateSelectionContext } from "./context/StateSelectionContext"; import { initialLayout } from "./initialLayout"; import { StateMachine } from "./stateMachine/StateMachine"; From c02851c2973d1f6d6da39ca135c80607c13fbf67 Mon Sep 17 00:00:00 2001 From: Raanan Weber Date: Wed, 6 Nov 2024 17:32:42 +0100 Subject: [PATCH 2/9] unneeded import --- packages/tools/viewer-alpha/vite.config.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/tools/viewer-alpha/vite.config.mjs b/packages/tools/viewer-alpha/vite.config.mjs index fcfd590cf76..cc8343bd3c1 100644 --- a/packages/tools/viewer-alpha/vite.config.mjs +++ b/packages/tools/viewer-alpha/vite.config.mjs @@ -7,7 +7,6 @@ import chalk from "chalk"; import { mkdirSync, createWriteStream } from "fs"; import { execSync } from "child_process"; import path from "path"; -import { inspect } from "util"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()); From 95683ad6764d0affcab9689ae7bd3cb88633dffa Mon Sep 17 00:00:00 2001 From: Ryan Tremblay Date: Thu, 7 Nov 2024 14:32:25 -0800 Subject: [PATCH 3/9] Handle ShadowDom in Inspector Move showInspector from Viewer to ViewerElement --- packages/dev/inspector/src/inspector.ts | 32 ++++++++++++++----- packages/tools/viewer-alpha/src/viewer.ts | 25 --------------- .../tools/viewer-alpha/src/viewerElement.ts | 26 ++++++++++++++- 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/packages/dev/inspector/src/inspector.ts b/packages/dev/inspector/src/inspector.ts index 1490b58eb57..f61c8954a52 100644 --- a/packages/dev/inspector/src/inspector.ts +++ b/packages/dev/inspector/src/inspector.ts @@ -64,28 +64,36 @@ export class Inspector { this._GlobalState.selectedLineContainerTitles.push(...titles); } - private static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument) { - for (let index = 0; index < sourceDoc.styleSheets.length; index++) { - const styleSheet: any = sourceDoc.styleSheets[index]; + private static _CopyStyles(source: Document, target: DocumentOrShadowRoot) { + for (let index = 0; index < source.styleSheets.length; index++) { + const styleSheet: any = source.styleSheets[index]; try { if (styleSheet.cssRules) { // for