Skip to content

Commit

Permalink
Merge branch 'master' into fix/node-module-resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Rheeseyb committed Oct 10, 2024
2 parents a633c4c + 647fb23 commit ab16941
Show file tree
Hide file tree
Showing 71 changed files with 2,114 additions and 776 deletions.
2 changes: 2 additions & 0 deletions editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
"@types/w3c-css-typed-object-model-level-1": "20180410.0.5",
"@use-it/interval": "0.1.3",
"@vercel/stega": "0.1.0",
"@xengine/tailwindcss-class-parser": "1.1.17",
"ajv": "6.4.0",
"anser": "2.1.0",
"antd": "4.3.5",
Expand Down Expand Up @@ -424,6 +425,7 @@
"source-map-loader": "0.2.3",
"string-replace-loader": "2.2.0",
"style-loader": "0.18.2",
"tailwindcss": "^3.4.13",
"tar": "6.0.5",
"terser-webpack-plugin": "5.3.9",
"three": "0.140.2",
Expand Down
54 changes: 20 additions & 34 deletions editor/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import { reparentSubjectsForInteractionTarget } from './strategies/reparent-help
import { getReparentTargetUnified } from './strategies/reparent-helpers/reparent-strategy-parent-lookup'
import { gridRearrangeResizeKeyboardStrategy } from './strategies/grid-rearrange-keyboard-strategy'
import createCachedSelector from 're-reselect'
import { getActivePlugin } from '../plugins/style-plugins'

export type CanvasStrategyFactory = (
canvasState: InteractionCanvasState,
Expand Down Expand Up @@ -202,6 +203,7 @@ export function pickCanvasStateFromEditorState(
editorState: EditorState,
builtInDependencies: BuiltInDependencies,
): InteractionCanvasState {
const activePlugin = getActivePlugin(editorState)
return {
builtInDependencies: builtInDependencies,
interactionTarget: getInteractionTargetFromEditorState(editorState, localSelectedViews),
Expand All @@ -214,6 +216,11 @@ export function pickCanvasStateFromEditorState(
startingElementPathTree: editorState.elementPathTree,
startingAllElementProps: editorState.allElementProps,
propertyControlsInfo: editorState.propertyControlsInfo,
styleInfoReader: activePlugin.styleInfoFactory({
projectContents: editorState.projectContents,
metadata: editorState.jsxMetadata,
elementPathTree: editorState.elementPathTree,
}),
}
}

Expand All @@ -224,6 +231,8 @@ export function pickCanvasStateFromEditorStateWithMetadata(
metadata: ElementInstanceMetadataMap,
allElementProps?: AllElementProps,
): InteractionCanvasState {
const activePlugin = getActivePlugin(editorState)

return {
builtInDependencies: builtInDependencies,
interactionTarget: getInteractionTargetFromEditorState(editorState, localSelectedViews),
Expand All @@ -236,6 +245,11 @@ export function pickCanvasStateFromEditorStateWithMetadata(
startingElementPathTree: editorState.elementPathTree, // IMPORTANT! This isn't based on the passed in metadata
startingAllElementProps: allElementProps ?? editorState.allElementProps,
propertyControlsInfo: editorState.propertyControlsInfo,
styleInfoReader: activePlugin.styleInfoFactory({
projectContents: editorState.projectContents,
metadata: metadata,
elementPathTree: editorState.elementPathTree,
}),
}
}

Expand Down
Loading

0 comments on commit ab16941

Please sign in to comment.