@plurid/plurid-react 0.0.0-2 → 0.0.0-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -9
- package/distribution/{modules/components → components/links}/Link/components/Preview/index.d.ts +3 -2
- package/distribution/{modules/components → components/links}/Link/components/Preview/styled.d.ts +2 -1
- package/distribution/components/links/Link/index.d.ts +22 -0
- package/distribution/components/links/Link/styled.d.ts +7 -0
- package/distribution/{modules/components → components/links}/RouterLink/index.d.ts +3 -2
- package/distribution/{modules/components → components/links}/RouterLink/styled.d.ts +0 -0
- package/distribution/components/planes/ExternalPlane/index.d.ts +14 -0
- package/distribution/components/planes/ExternalPlane/styled.d.ts +5 -0
- package/distribution/components/planes/IframePlane/index.d.ts +14 -0
- package/distribution/components/planes/IframePlane/styled.d.ts +5 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneBridge/index.d.ts +1 -1
- package/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +7 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneContent/index.d.ts +0 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneContent/styled.d.ts +0 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/components/SearchItem/index.d.ts +1 -1
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/components/SearchItem/styled.d.ts +0 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/components/SearchList/index.d.ts +1 -1
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/components/SearchList/styled.d.ts +0 -0
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/index.d.ts +3 -2
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneControls/styled.d.ts +7 -1
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneDebugger/index.d.ts +1 -1
- package/distribution/{modules/components → components/structural}/Plane/components/PlaneDebugger/styled.d.ts +0 -0
- package/distribution/components/structural/Plane/index.d.ts +23 -0
- package/distribution/components/structural/Plane/styled.d.ts +10 -0
- package/distribution/{modules/components → components/structural}/Root/index.d.ts +1 -5
- package/distribution/{modules/components → components/structural}/Root/styled.d.ts +0 -0
- package/distribution/components/structural/Roots/index.d.ts +18 -0
- package/distribution/components/structural/Roots/styled.d.ts +3 -0
- package/distribution/{modules/components → components/structural}/Space/components/SpaceDebugger/index.d.ts +1 -1
- package/distribution/{modules/components → components/structural}/Space/components/SpaceDebugger/styled.d.ts +0 -0
- package/distribution/{modules/components → components/structural}/Space/index.d.ts +1 -5
- package/distribution/components/structural/Space/styled.d.ts +8 -0
- package/distribution/{modules/components → components/utilities}/ApplicationConfigurator/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/ApplicationConfigurator/styled.d.ts +0 -0
- package/distribution/components/utilities/ErrorBoundary/index.d.ts +18 -0
- package/distribution/{modules/components → components/utilities}/NotFound/index.d.ts +1 -1
- package/distribution/{modules/components → components/utilities}/NotFound/styled.d.ts +0 -0
- package/distribution/components/utilities/Origin/index.d.ts +15 -0
- package/distribution/components/utilities/Origin/styled.d.ts +7 -0
- package/distribution/{modules/components → components/utilities}/PlaneConfigurator/index.d.ts +1 -1
- package/distribution/{modules/components → components/utilities}/PlaneConfigurator/styled.d.ts +0 -0
- package/distribution/{modules/components → components}/utilities/Portal/index.d.ts +2 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/Button/index.d.ts +2 -2
- package/distribution/components/utilities/Toolbar/Button/styled.d.ts +13 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/Drawer/index.d.ts +1 -1
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/Drawer/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Global/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +1 -1
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Space/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +3 -3
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/data.d.ts +2 -0
- package/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +21 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuMore/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuUniverses/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/MenuUniverses/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarRotate/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarRotate/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarScale/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarScale/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarTranslate/index.d.ts +2 -2
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/ToolbarTranslate/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/components/TransformArrow/index.d.ts +1 -1
- package/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +6 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/data.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Toolbar/General/index.d.ts +3 -3
- package/distribution/components/utilities/Toolbar/General/styled.d.ts +29 -0
- package/distribution/{modules/components → components/utilities}/UniverseExplorer/index.d.ts +1 -1
- package/distribution/{modules/components → components/utilities}/UniverseExplorer/styled.d.ts +0 -0
- package/distribution/{modules/components → components/utilities}/Viewcube/components/ViewcubeFace/index.d.ts +2 -2
- package/distribution/components/utilities/Viewcube/components/ViewcubeFace/styled.d.ts +16 -0
- package/distribution/{modules/components → components/utilities}/Viewcube/components/ViewcubeModel/index.d.ts +1 -1
- package/distribution/components/utilities/Viewcube/components/ViewcubeModel/styled.d.ts +3 -0
- package/distribution/{modules/components → components/utilities}/Viewcube/index.d.ts +2 -2
- package/distribution/components/utilities/Viewcube/styled.d.ts +19 -0
- package/distribution/{modules/components/Virtual → components/virtuals}/List/components/ListItem/index.d.ts +0 -0
- package/distribution/{modules/components/Virtual → components/virtuals}/List/index.d.ts +2 -2
- package/distribution/{modules/components/Virtual → components/virtuals}/List/styled.d.ts +0 -0
- package/distribution/{modules/containers → containers/Application/View}/ErrorView/index.d.ts +0 -0
- package/distribution/{modules/containers → containers/Application/View}/ErrorView/styled.d.ts +0 -0
- package/distribution/{modules/containers → containers/Application/View}/PlanesView/index.d.ts +1 -3
- package/distribution/{Application → containers/Application}/View/index-old.d.ts +0 -0
- package/distribution/{Application → containers/Application}/View/index.d.ts +7 -5
- package/distribution/containers/Application/View/logic.d.ts +4 -0
- package/distribution/{Application → containers/Application}/View/styled.d.ts +0 -0
- package/distribution/{Application → containers/Application}/index.d.ts +5 -4
- package/distribution/{modules/components → containers}/Provider/context.d.ts +0 -0
- package/distribution/{modules/components → containers}/Provider/index.d.ts +0 -0
- package/distribution/{modules/components → containers}/RouterBrowser/index.d.ts +3 -1
- package/distribution/containers/RouterStatic/index.d.ts +18 -0
- package/distribution/data/constants/index.d.ts +3 -0
- package/distribution/data/interfaces/index.d.ts +19 -0
- package/distribution/distribution/components/links/Link/components/Preview/index.d.ts +16 -0
- package/distribution/distribution/components/links/Link/components/Preview/styled.d.ts +7 -0
- package/distribution/distribution/components/links/Link/index.d.ts +22 -0
- package/distribution/distribution/components/links/Link/styled.d.ts +7 -0
- package/distribution/distribution/components/links/RouterLink/index.d.ts +17 -0
- package/distribution/distribution/components/links/RouterLink/styled.d.ts +2 -0
- package/distribution/distribution/components/planes/ExternalPlane/index.d.ts +14 -0
- package/distribution/distribution/components/planes/ExternalPlane/styled.d.ts +5 -0
- package/distribution/distribution/components/planes/IframePlane/index.d.ts +14 -0
- package/distribution/distribution/components/planes/IframePlane/styled.d.ts +5 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneBridge/index.d.ts +16 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneBridge/styled.d.ts +7 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneContent/index.d.ts +6 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneContent/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/index.d.ts +19 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchItem/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/index.d.ts +18 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/components/SearchList/styled.d.ts +2 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/index.d.ts +19 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneControls/styled.d.ts +10 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/index.d.ts +13 -0
- package/distribution/distribution/components/structural/Plane/components/PlaneDebugger/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Plane/index.d.ts +23 -0
- package/distribution/distribution/components/structural/Plane/styled.d.ts +10 -0
- package/distribution/distribution/components/structural/Root/index.d.ts +14 -0
- package/distribution/distribution/components/structural/Root/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Roots/index.d.ts +18 -0
- package/distribution/distribution/components/structural/Roots/styled.d.ts +3 -0
- package/distribution/distribution/components/structural/Space/components/SpaceDebugger/index.d.ts +13 -0
- package/distribution/distribution/components/structural/Space/components/SpaceDebugger/styled.d.ts +1 -0
- package/distribution/distribution/components/structural/Space/index.d.ts +14 -0
- package/distribution/distribution/components/structural/Space/styled.d.ts +8 -0
- package/distribution/distribution/components/utilities/ApplicationConfigurator/index.d.ts +17 -0
- package/distribution/distribution/components/utilities/ApplicationConfigurator/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/ErrorBoundary/index.d.ts +18 -0
- package/distribution/distribution/components/utilities/NotFound/index.d.ts +13 -0
- package/distribution/distribution/components/utilities/NotFound/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Origin/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Origin/styled.d.ts +7 -0
- package/distribution/distribution/components/utilities/PlaneConfigurator/index.d.ts +13 -0
- package/distribution/distribution/components/utilities/PlaneConfigurator/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Portal/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/Button/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/Button/styled.d.ts +13 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/index.d.ts +18 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/Drawer/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Global/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Shortcuts/index.d.ts +14 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Space/index.d.ts +20 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Technical/index.d.ts +17 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Toolbar/index.d.ts +22 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Transform/index.d.ts +19 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/components/Viewcube/index.d.ts +20 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/data.d.ts +9 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuMore/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/index.d.ts +15 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/MenuUniverses/styled.d.ts +4 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/index.d.ts +23 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarRotate/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarScale/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/index.d.ts +23 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/ToolbarTranslate/styled.d.ts +1 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/index.d.ts +14 -0
- package/distribution/distribution/components/utilities/Toolbar/General/components/TransformArrow/styled.d.ts +6 -0
- package/distribution/distribution/components/utilities/Toolbar/General/data.d.ts +6 -0
- package/distribution/distribution/components/utilities/Toolbar/General/index.d.ts +21 -0
- package/distribution/distribution/components/utilities/Toolbar/General/styled.d.ts +29 -0
- package/distribution/distribution/components/utilities/UniverseExplorer/index.d.ts +16 -0
- package/distribution/distribution/components/utilities/UniverseExplorer/styled.d.ts +2 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/index.d.ts +26 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeFace/styled.d.ts +16 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/index.d.ts +17 -0
- package/distribution/distribution/components/utilities/Viewcube/components/ViewcubeModel/styled.d.ts +3 -0
- package/distribution/distribution/components/utilities/Viewcube/index.d.ts +22 -0
- package/distribution/distribution/components/utilities/Viewcube/styled.d.ts +19 -0
- package/distribution/distribution/components/virtuals/List/components/ListItem/index.d.ts +9 -0
- package/distribution/distribution/components/virtuals/List/index.d.ts +15 -0
- package/distribution/distribution/components/virtuals/List/styled.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/ErrorView/index.d.ts +6 -0
- package/distribution/distribution/containers/Application/View/ErrorView/styled.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/PlanesView/index.d.ts +10 -0
- package/distribution/distribution/containers/Application/View/index-old.d.ts +1 -0
- package/distribution/distribution/containers/Application/View/index.d.ts +44 -0
- package/distribution/distribution/containers/Application/View/logic.d.ts +4 -0
- package/distribution/distribution/containers/Application/View/styled.d.ts +3 -0
- package/distribution/distribution/containers/Application/index.d.ts +18 -0
- package/distribution/distribution/containers/Provider/context.d.ts +4 -0
- package/distribution/distribution/containers/Provider/index.d.ts +12 -0
- package/distribution/distribution/containers/RouterBrowser/index.d.ts +5 -0
- package/distribution/distribution/containers/RouterStatic/index.d.ts +18 -0
- package/distribution/distribution/data/constants/index.d.ts +3 -0
- package/distribution/distribution/data/interfaces/index.d.ts +19 -0
- package/distribution/distribution/index.d.ts +81 -0
- package/distribution/distribution/services/context/index.d.ts +5 -0
- package/distribution/{modules → distribution}/services/hooks/event/index.d.ts +0 -0
- package/distribution/distribution/services/hooks/index.d.ts +2 -0
- package/distribution/{modules → distribution}/services/hooks/router/index.d.ts +0 -0
- package/distribution/distribution/services/logic/computing/index.d.ts +10 -0
- package/distribution/distribution/services/logic/router/index.d.ts +51 -0
- package/distribution/{modules → distribution}/services/logic/router/styled.d.ts +0 -0
- package/distribution/distribution/services/logic/server/index.d.ts +3 -0
- package/distribution/{modules → distribution}/services/logic/shortcuts/index.d.ts +1 -1
- package/distribution/distribution/services/logic/transform/index.d.ts +2 -0
- package/distribution/distribution/services/state/actions/index.d.ts +9 -0
- package/distribution/{modules → distribution}/services/state/context/index.d.ts +0 -0
- package/distribution/{modules/services/state/modules/global.d.ts → distribution/services/state/global/index.d.ts} +2 -1
- package/distribution/{modules/services/state/modules/configuration/actions.d.ts → distribution/services/state/modules/configuration/actions/index.d.ts} +1 -1
- package/distribution/{modules → distribution}/services/state/modules/configuration/index.d.ts +2 -1
- package/distribution/{modules/services/state/modules/configuration/initial.d.ts → distribution/services/state/modules/configuration/initial/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/configuration/reducer.d.ts → distribution/services/state/modules/configuration/reducer/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/configuration/resolvers.d.ts → distribution/services/state/modules/configuration/resolvers/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/configuration/selectors/index.d.ts +11 -0
- package/distribution/{modules/services/state/modules/configuration/types.d.ts → distribution/services/state/modules/configuration/types/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/general/actions/index.d.ts +2 -0
- package/distribution/{modules/services/state/modules/space → distribution/services/state/modules/general}/index.d.ts +2 -1
- package/distribution/{modules/services/state/modules/shortcuts/initial.d.ts → distribution/services/state/modules/general/initial/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/shortcuts/reducer.d.ts → distribution/services/state/modules/general/reducer/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/general/resolvers/index.d.ts +1 -0
- package/distribution/distribution/services/state/modules/general/selectors/index.d.ts +2 -0
- package/distribution/distribution/services/state/modules/general/types/index.d.ts +3 -0
- package/distribution/{modules → distribution}/services/state/modules/index.d.ts +4 -2
- package/distribution/{modules/services/state/modules/shortcuts/actions.d.ts → distribution/services/state/modules/shortcuts/actions/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/themes → distribution/services/state/modules/shortcuts}/index.d.ts +2 -1
- package/distribution/{modules/services/state/modules/space/initial.d.ts → distribution/services/state/modules/shortcuts/initial/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/space/reducer.d.ts → distribution/services/state/modules/shortcuts/reducer/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/shortcuts/resolvers.d.ts → distribution/services/state/modules/shortcuts/resolvers/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/shortcuts/selectors/index.d.ts +11 -0
- package/distribution/{modules/services/state/modules/shortcuts/types.d.ts → distribution/services/state/modules/shortcuts/types/index.d.ts} +2 -1
- package/distribution/{modules/services/state/modules/space/actions.d.ts → distribution/services/state/modules/space/actions/index.d.ts} +6 -4
- package/distribution/{modules/services/state/modules/shortcuts → distribution/services/state/modules/space}/index.d.ts +2 -1
- package/distribution/{modules/services/state/modules/themes/initial.d.ts → distribution/services/state/modules/space/initial/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/themes/reducer.d.ts → distribution/services/state/modules/space/reducer/index.d.ts} +1 -1
- package/distribution/{modules/services/state/modules/space/resolvers.d.ts → distribution/services/state/modules/space/resolvers/index.d.ts} +3 -1
- package/distribution/distribution/services/state/modules/space/selectors/index.d.ts +147 -0
- package/distribution/{modules/services/state/modules/space/types.d.ts → distribution/services/state/modules/space/types/index.d.ts} +22 -7
- package/distribution/{modules/services/state/modules/themes/actions.d.ts → distribution/services/state/modules/themes/actions/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/themes/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/themes/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/themes/reducer/index.d.ts +3 -0
- package/distribution/{modules/services/state/modules/themes/resolvers.d.ts → distribution/services/state/modules/themes/resolvers/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/themes/selectors/index.d.ts +19 -0
- package/distribution/{modules/services/state/modules/themes/types.d.ts → distribution/services/state/modules/themes/types/index.d.ts} +2 -1
- package/distribution/{modules/services/state/modules/ui/actions.d.ts → distribution/services/state/modules/ui/actions/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/ui/index.d.ts +7 -0
- package/distribution/distribution/services/state/modules/ui/initial/index.d.ts +3 -0
- package/distribution/distribution/services/state/modules/ui/reducer/index.d.ts +3 -0
- package/distribution/{modules/services/state/modules/ui/resolvers.d.ts → distribution/services/state/modules/ui/resolvers/index.d.ts} +1 -1
- package/distribution/distribution/services/state/modules/ui/selectors/index.d.ts +11 -0
- package/distribution/{modules/services/state/modules/ui/types.d.ts → distribution/services/state/modules/ui/types/index.d.ts} +2 -1
- package/distribution/{modules → distribution}/services/state/selectors/index.d.ts +41 -2
- package/distribution/{modules/services/state/store/store.development.d.ts → distribution/services/state/store/development/index.d.ts} +1 -1
- package/distribution/{modules → distribution}/services/state/store/index.d.ts +4 -2
- package/distribution/{modules/services/state/store/store.production.d.ts → distribution/services/state/store/production/index.d.ts} +1 -1
- package/distribution/distribution/services/state/store/reducers/index.d.ts +9 -0
- package/distribution/{modules → distribution}/services/state/types/space.d.ts +0 -0
- package/distribution/distribution/services/styled/index.d.ts +2 -0
- package/distribution/{modules → distribution}/services/utilities/environment/index.d.ts +0 -0
- package/distribution/{modules → distribution}/services/utilities/imports/index.d.ts +0 -0
- package/distribution/distribution/services/utilities/react/index.d.ts +3 -0
- package/distribution/index.d.ts +50 -32
- package/distribution/index.es.js +7054 -0
- package/distribution/index.es.js.map +1 -0
- package/distribution/index.js +2340 -2049
- package/distribution/index.js.map +1 -1
- package/distribution/index.min.js +137 -170
- package/distribution/index.min.js.map +1 -0
- package/distribution/services/context/index.d.ts +5 -0
- package/distribution/services/hooks/event/index.d.ts +4 -0
- package/distribution/services/hooks/index.d.ts +2 -0
- package/distribution/services/hooks/router/index.d.ts +1 -0
- package/distribution/services/logic/computing/index.d.ts +10 -0
- package/distribution/services/logic/router/index.d.ts +51 -0
- package/distribution/services/logic/router/styled.d.ts +5 -0
- package/distribution/services/logic/server/index.d.ts +3 -0
- package/distribution/services/logic/shortcuts/index.d.ts +10 -0
- package/distribution/services/logic/transform/index.d.ts +2 -0
- package/distribution/services/state/actions/index.d.ts +9 -0
- package/distribution/services/state/context/index.d.ts +3 -0
- package/distribution/services/state/global/index.d.ts +6 -0
- package/distribution/services/state/modules/configuration/actions/index.d.ts +28 -0
- package/distribution/services/state/modules/configuration/index.d.ts +7 -0
- package/distribution/services/state/modules/configuration/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/configuration/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/configuration/resolvers/index.d.ts +27 -0
- package/distribution/services/state/modules/configuration/selectors/index.d.ts +11 -0
- package/distribution/services/state/modules/configuration/types/index.d.ts +136 -0
- package/distribution/services/state/modules/general/actions/index.d.ts +2 -0
- package/distribution/services/state/modules/general/index.d.ts +7 -0
- package/distribution/services/state/modules/general/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/general/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/general/resolvers/index.d.ts +1 -0
- package/distribution/services/state/modules/general/selectors/index.d.ts +2 -0
- package/distribution/services/state/modules/general/types/index.d.ts +3 -0
- package/distribution/services/state/modules/index.d.ts +15 -0
- package/distribution/services/state/modules/shortcuts/actions/index.d.ts +3 -0
- package/distribution/services/state/modules/shortcuts/index.d.ts +7 -0
- package/distribution/services/state/modules/shortcuts/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/shortcuts/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/shortcuts/resolvers/index.d.ts +3 -0
- package/distribution/services/state/modules/shortcuts/selectors/index.d.ts +11 -0
- package/distribution/services/state/modules/shortcuts/types/index.d.ts +13 -0
- package/distribution/services/state/modules/space/actions/index.d.ts +48 -0
- package/distribution/services/state/modules/space/index.d.ts +7 -0
- package/distribution/services/state/modules/space/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/space/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/space/resolvers/index.d.ts +47 -0
- package/distribution/services/state/modules/space/selectors/index.d.ts +147 -0
- package/distribution/services/state/modules/space/types/index.d.ts +257 -0
- package/distribution/services/state/modules/themes/actions/index.d.ts +4 -0
- package/distribution/services/state/modules/themes/index.d.ts +7 -0
- package/distribution/services/state/modules/themes/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/themes/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/themes/resolvers/index.d.ts +3 -0
- package/distribution/services/state/modules/themes/selectors/index.d.ts +19 -0
- package/distribution/services/state/modules/themes/types/index.d.ts +17 -0
- package/distribution/services/state/modules/ui/actions/index.d.ts +2 -0
- package/distribution/services/state/modules/ui/index.d.ts +7 -0
- package/distribution/services/state/modules/ui/initial/index.d.ts +3 -0
- package/distribution/services/state/modules/ui/reducer/index.d.ts +3 -0
- package/distribution/services/state/modules/ui/resolvers/index.d.ts +2 -0
- package/distribution/services/state/modules/ui/selectors/index.d.ts +11 -0
- package/distribution/services/state/modules/ui/types/index.d.ts +10 -0
- package/distribution/services/state/selectors/index.d.ts +197 -0
- package/distribution/services/state/store/development/index.d.ts +5 -0
- package/distribution/services/state/store/index.d.ts +19 -0
- package/distribution/services/state/store/production/index.d.ts +5 -0
- package/distribution/services/state/store/reducers/index.d.ts +9 -0
- package/distribution/services/state/types/space.d.ts +3 -0
- package/distribution/services/styled/index.d.ts +2 -0
- package/distribution/services/utilities/environment/index.d.ts +7 -0
- package/distribution/services/utilities/imports/index.d.ts +49 -0
- package/distribution/services/utilities/react/index.d.ts +3 -0
- package/package.json +59 -50
- package/distribution/Application/View/logic.d.ts +0 -3
- package/distribution/Application/variations/ExposedApplication/index.d.ts +0 -6
- package/distribution/Application/variations/SingleApplication/Root/index.d.ts +0 -10
- package/distribution/Application/variations/SingleApplication/index.d.ts +0 -4
- package/distribution/modules/components/Link/index.d.ts +0 -24
- package/distribution/modules/components/Link/styled.d.ts +0 -1
- package/distribution/modules/components/Plane/components/PlaneBridge/styled.d.ts +0 -1
- package/distribution/modules/components/Plane/index.d.ts +0 -25
- package/distribution/modules/components/Plane/styled.d.ts +0 -1
- package/distribution/modules/components/Renderer/index.d.ts +0 -14
- package/distribution/modules/components/Roots/index.d.ts +0 -29
- package/distribution/modules/components/Roots/styled.d.ts +0 -2
- package/distribution/modules/components/RouterStatic/index.d.ts +0 -14
- package/distribution/modules/components/Space/styled.d.ts +0 -1
- package/distribution/modules/components/Toolbar/Button/styled.d.ts +0 -2
- package/distribution/modules/components/Toolbar/General/components/MenuMore/index.d.ts +0 -19
- package/distribution/modules/components/Toolbar/General/components/TransformArrow/styled.d.ts +0 -1
- package/distribution/modules/components/Toolbar/General/styled.d.ts +0 -4
- package/distribution/modules/components/Viewcube/components/ViewcubeFace/styled.d.ts +0 -2
- package/distribution/modules/components/Viewcube/components/ViewcubeModel/styled.d.ts +0 -3
- package/distribution/modules/components/Viewcube/styled.d.ts +0 -4
- package/distribution/modules/services/hooks/index.d.ts +0 -3
- package/distribution/modules/services/logic/computing/index.d.ts +0 -9
- package/distribution/modules/services/logic/context/index.d.ts +0 -4
- package/distribution/modules/services/logic/router/index.d.ts +0 -39
- package/distribution/modules/services/logic/server/index.d.ts +0 -3
- package/distribution/modules/services/logic/static/index.d.ts +0 -3
- package/distribution/modules/services/state/actions/index.d.ts +0 -13
- package/distribution/modules/services/state/modules/ui/index.d.ts +0 -6
- package/distribution/modules/services/state/modules/ui/initial.d.ts +0 -3
- package/distribution/modules/services/state/modules/ui/reducer.d.ts +0 -3
- package/distribution/modules/services/state/selectors/configuration.d.ts +0 -10
- package/distribution/modules/services/state/selectors/space.d.ts +0 -123
- package/distribution/modules/services/state/selectors/themes.d.ts +0 -17
- package/distribution/modules/services/state/selectors/ui.d.ts +0 -10
- package/distribution/modules/services/state/store/reducers.d.ts +0 -13
- package/distribution/modules/services/utilities/navigate/index.d.ts +0 -1
- package/distribution/modules/services/utilities/template/index.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),o=require("react-redux"),r=require("redux"),i=require("redux-thunk"),l=require("@plurid/plurid-functions"),s=require("@plurid/plurid-themes"),c=require("styled-components"),u=require("@plurid/plurid-ui-components-react"),d=require("@plurid/plurid-icons-react"),T=require("@plurid/plurid-functions-react"),p=require("react-dom");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=E(a),m=E(n),g=E(i),_=E(s),O=E(c);var h=Object.freeze({__proto__:null,SET_CONFIGURATION:"SET_CONFIGURATION",SET_CONFIGURATION_MICRO:"SET_CONFIGURATION_MICRO",SET_CONFIGURATION_PLANE_CONTROLS:"SET_CONFIGURATION_PLANE_CONTROLS",SET_CONFIGURATION_PLANE_OPACITY:"SET_CONFIGURATION_PLANE_OPACITY",SET_CONFIGURATION_THEME_GENERAL:"SET_CONFIGURATION_THEME_GENERAL",SET_CONFIGURATION_THEME_INTERACTION:"SET_CONFIGURATION_THEME_INTERACTION",SET_CONFIGURATION_LANGUAGE:"SET_CONFIGURATION_LANGUAGE",TOGGLE_CONFIGURATION_VIEWCUBE_HIDE:"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS:"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE:"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL:"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL",TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL:"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL",TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS",TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS",TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE:"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE",TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER:"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI:"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI",TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN:"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN",SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE:"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",SET_CONFIGURATION_SPACE_TRANSFORM_MODE:"SET_CONFIGURATION_SPACE_TRANSFORM_MODE",TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE:"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH:"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON:"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON",SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS:"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",SET_CONFIGURATION_SPACE_LAYOUT_TYPE:"SET_CONFIGURATION_SPACE_LAYOUT_TYPE",SET_CONFIGURATION_SPACE_CULLING_DISTANCE:"SET_CONFIGURATION_SPACE_CULLING_DISTANCE"});var R=Object.freeze({__proto__:null,setConfiguration:e=>({type:"SET_CONFIGURATION",payload:e}),setConfigurationMicro:()=>({type:"SET_CONFIGURATION_MICRO"}),setConfigurationPlaneControls:e=>({type:"SET_CONFIGURATION_PLANE_CONTROLS",payload:e}),setConfigurationPlaneOpacity:e=>({type:"SET_CONFIGURATION_PLANE_OPACITY",payload:e}),setConfigurationThemeGeneralAction:e=>({type:"SET_CONFIGURATION_THEME_GENERAL",payload:e}),setConfigurationThemeInteractionAction:e=>({type:"SET_CONFIGURATION_THEME_INTERACTION",payload:e}),setConfigurationLanguageAction:e=>({type:"SET_CONFIGURATION_LANGUAGE",payload:e}),toggleConfigurationViewcubeHide:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",payload:e}),toggleConfigurationViewcubeButtons:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",payload:e}),toggleConfigurationViewcubeOpaque:e=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",payload:e}),toggleConfigurationViewcubeConceal:()=>({type:"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL"}),toggleConfigurationToolbarConceal:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL"}),toggleConfigurationToolbarTransformIcons:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS"}),toggleConfigurationToolbarTransformButtons:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS"}),toggleConfigurationSpaceTransparentUI:()=>({type:"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI"}),toggleConfigurationSpaceShowTransformOrigin:()=>({type:"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN"}),toggleConfigurationToolbarOpaque:()=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE"}),toggleConfigurationToolbarToggleDrawer:e=>({type:"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",payload:e}),setConfigurationSpaceTransformOriginSize:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",payload:e}),setConfigurationSpaceTransformMode:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_MODE",payload:e}),toggleConfigurationSpaceTransformMultimode:e=>({type:"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",payload:e}),setConfigurationSpaceTransformTouch:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",payload:e}),toggleConfigurationSpaceFirstPerson:()=>({type:"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON"}),setConfigurationSpaceTransformLocks:e=>({type:"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",payload:e}),setConfigurationSpaceLayoutType:e=>({type:"SET_CONFIGURATION_SPACE_LAYOUT_TYPE",payload:e}),setConfigurationSpaceCullingDistance:e=>({type:"SET_CONFIGURATION_SPACE_CULLING_DISTANCE",payload:e})});const A=Object.assign({},e.defaultConfiguration),S=(e,t)=>Object.assign(Object.assign({},e),t.payload),I=e=>{const t=Object.assign({},e);return t.elements.toolbar.show=!1,t.elements.plane.controls.show=!1,t.elements.viewcube.show=!1,Object.assign({},t)},C=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.controls.show=t.payload,Object.assign({},a)},U=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.opacity=t.payload,Object.assign({},a)},L=(e,t)=>{const a=Object.assign({},e),n={general:t.payload,interaction:"object"==typeof a.global.theme?a.global.theme.interaction:"plurid"};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},b=(e,t)=>{const a=Object.assign({},e),n={general:"object"==typeof a.global.theme?a.global.theme.general:"plurid",interaction:t.payload};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},P=(e,t)=>Object.assign(Object.assign({},e),{global:Object.assign(Object.assign({},e.global),{language:t.payload})}),N=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.show=t.payload,Object.assign({},a)},v=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.buttons=t.payload,Object.assign({},a)},w=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.opaque=t.payload,Object.assign({},a)},y=e=>{const{conceal:t}=e.elements.viewcube,a=Object.assign({},e);return a.elements.viewcube.conceal=!t,Object.assign({},a)},D=e=>{const{conceal:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.conceal=!t,Object.assign({},a)},M=e=>{const{transformIcons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformIcons=!t,Object.assign({},a)},x=e=>{const{transformButtons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformButtons=!t,Object.assign({},a)},F=e=>{const{show:t}=e.space.transformOrigin,a=Object.assign({},e);return a.space.transformOrigin.show=!t,Object.assign({},a)},G=e=>{const{opaque:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.opaque=!t,Object.assign({},a)},j=e=>{const t=Object.assign({},e);return t.global.transparentUI=!e.global.transparentUI,Object.assign({},t)},k=(e,t)=>{const a=Object.assign({},e);return a.space.transformOrigin.size=t.payload,Object.assign({},a)},V=(t,a)=>{const n=Object.assign({},t);return n.space.transformMode!==a.payload?n.space.transformMode=a.payload:n.space.transformMode=e.TRANSFORM_MODES.ALL,Object.assign({},n)},W=(e,t)=>{const a=Object.assign({},e);return a.space.transformMultimode=t.payload,Object.assign({},a)},Y=(e,t)=>{const a=Object.assign({},e);return a.space.transformTouch=t.payload,Object.assign({},a)},B=e=>{const{firstPerson:t}=e.space,a=Object.assign({},e);return a.space.firstPerson=!t,Object.assign({},a)},$=(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar,n=Object.assign({},e);if(a.includes(t.payload)){const e=a.filter((e=>e!==t.payload));n.elements.toolbar.toggledDrawers=[...e]}else n.elements.toolbar.toggledDrawers=[...a,t.payload];return Object.assign({},n)},H=(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},e),o=Object.assign({},a);return o[t.payload]=!a[t.payload],n.space.transformLocks=Object.assign({},o),Object.assign({},n)},X=(t,a)=>{const n=Object.assign({},t),o={type:e.LAYOUT_TYPES[a.payload]};return n.space.layout=Object.assign({},o),Object.assign({},n)},z=(e,t)=>{const a=Object.assign({},e);return a.space.cullingDistance=t.payload,Object.assign({},a)};var Z=Object.freeze({__proto__:null,setConfiguration:S,setConfigurationMicro:I,setConfigurationPlaneControls:C,setConfigurationPlaneOpacity:U,setConfigurationThemeGeneral:L,setConfigurationThemeInteraction:b,setConfigurationLanguage:P,toggleConfigurationViewcubeHide:N,toggleConfigurationViewcubeButtons:v,toggleConfigurationViewcubeOpaque:w,toggleConfigurationViewcubeConceal:y,toggleConfigurationToolbarConceal:D,toggleConfigurationToolbarTransformIcons:M,toggleConfigurationToolbarTransformButtons:x,toggleConfigurationShowTransformOrigin:F,toggleConfigurationToolbarOpaque:G,toggleConfigurationSpaceTransparentUI:j,setConfigurationSpaceTransformOriginSize:k,setConfigurationSpaceTransformMode:V,toggleConfigurationSpaceTransformMultimode:W,setConfigurationSpaceTransformTouch:Y,toggleConfigurationSpaceFirstPerson:B,toggleConfigurationToolbarToggleDrawer:$,setConfigurationSpaceTransformLocks:H,setConfigurationSpaceLayout:X,setConfigurationSpaceCullingDistance:z});const K=(e=A,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.configuration);case"SET_CONFIGURATION":return S(e,t);case"SET_CONFIGURATION_MICRO":return I(e);case"SET_CONFIGURATION_PLANE_CONTROLS":return C(e,t);case"SET_CONFIGURATION_PLANE_OPACITY":return U(e,t);case"SET_CONFIGURATION_THEME_GENERAL":return L(e,t);case"SET_CONFIGURATION_THEME_INTERACTION":return b(e,t);case"SET_CONFIGURATION_LANGUAGE":return P(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_HIDE":return N(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS":return v(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE":return w(e,t);case"TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL":return y(e);case"TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL":return D(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS":return M(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS":return x(e);case"TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER":return $(e,t);case"TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE":return G(e);case"TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI":return j(e);case"TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN":return F(e);case"SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE":return k(e,t);case"SET_CONFIGURATION_SPACE_TRANSFORM_MODE":return V(e,t);case"TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE":return W(e,t);case"SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH":return Y(e,t);case"TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON":return B(e);case"SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS":return H(e,t);case"SET_CONFIGURATION_SPACE_LAYOUT_TYPE":return X(e,t);case"SET_CONFIGURATION_SPACE_CULLING_DISTANCE":return z(e,t);default:return Object.assign({},e)}};var q=Object.freeze({__proto__:null,actions:R,initialState:A,reducer:K,resolvers:Z,Types:h});var Q=Object.freeze({__proto__:null,SHORTCUTS_SET_GLOBAL_SHORTCUTS:"SHORTCUTS_SET_GLOBAL_SHORTCUTS",SHORTCUTS_UNSET_GLOBAL_SHORTCUTS:"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS"});var J=Object.freeze({__proto__:null,setGlobalShortcuts:()=>({type:"SHORTCUTS_SET_GLOBAL_SHORTCUTS"}),unsetGlobalShortcuts:()=>({type:"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS"})});const ee={global:!0},te=e=>Object.assign(Object.assign({},e),{global:!0}),ae=e=>Object.assign(Object.assign({},e),{global:!1});var ne=Object.freeze({__proto__:null,setGlobalShortcuts:te,unsetGlobalShortcuts:ae});const oe=(e=ee,t)=>{switch(t.type){case"SHORTCUTS_SET_GLOBAL_SHORTCUTS":return te(e);case"SHORTCUTS_UNSET_GLOBAL_SHORTCUTS":return ae(e);default:return Object.assign({},e)}};var re=Object.freeze({__proto__:null,actions:J,initialState:ee,reducer:oe,resolvers:ne,Types:Q});var ie=Object.freeze({__proto__:null,SET_SPACE_LOADING:"SET_SPACE_LOADING",SET_ANIMATED_TRANSFORM:"SET_ANIMATED_TRANSFORM",SET_TRANSFORM_TIME:"SET_TRANSFORM_TIME",SET_SPACE_LOCATION:"SET_SPACE_LOCATION",VIEW_CAMERA_MOVE_FORWARD:"VIEW_CAMERA_MOVE_FORWARD",VIEW_CAMERA_MOVE_BACKWARD:"VIEW_CAMERA_MOVE_BACKWARD",VIEW_CAMERA_MOVE_LEFT:"VIEW_CAMERA_MOVE_LEFT",VIEW_CAMERA_MOVE_RIGHT:"VIEW_CAMERA_MOVE_RIGHT",VIEW_CAMERA_MOVE_UP:"VIEW_CAMERA_MOVE_UP",VIEW_CAMERA_MOVE_DOWN:"VIEW_CAMERA_MOVE_DOWN",VIEW_CAMERA_TURN_UP:"VIEW_CAMERA_TURN_UP",VIEW_CAMERA_TURN_DOWN:"VIEW_CAMERA_TURN_DOWN",VIEW_CAMERA_TURN_LEFT:"VIEW_CAMERA_TURN_LEFT",VIEW_CAMERA_TURN_RIGHT:"VIEW_CAMERA_TURN_RIGHT",ROTATE_UP:"ROTATE_UP",ROTATE_DOWN:"ROTATE_DOWN",ROTATE_LEFT:"ROTATE_LEFT",ROTATE_X:"ROTATE_X",ROTATE_X_WITH:"ROTATE_X_WITH",ROTATE_RIGHT:"ROTATE_RIGHT",ROTATE_Y:"ROTATE_Y",ROTATE_Y_WITH:"ROTATE_Y_WITH",TRANSLATE_UP:"TRANSLATE_UP",TRANSLATE_DOWN:"TRANSLATE_DOWN",TRANSLATE_LEFT:"TRANSLATE_LEFT",TRANSLATE_RIGHT:"TRANSLATE_RIGHT",TRANSLATE_IN:"TRANSLATE_IN",TRANSLATE_OUT:"TRANSLATE_OUT",TRANSLATE_X_WITH:"TRANSLATE_X_WITH",TRANSLATE_Y_WITH:"TRANSLATE_Y_WITH",SCALE_UP:"SCALE_UP",SCALE_DOWN:"SCALE_DOWN",SCALE_UP_WITH:"SCALE_UP_WITH",SCALE_DOWN_WITH:"SCALE_DOWN_WITH",SET_INITIAL_TREE:"SET_INITIAL_TREE",SET_TREE:"SET_TREE",SET_ACTIVE_UNIVERSE:"SET_ACTIVE_UNIVERSE",SPACE_RESET_TRANSFORM:"SPACE_RESET_TRANSFORM",SET_VIEW_SIZE:"SET_VIEW_SIZE",SET_SPACE_SIZE:"SET_SPACE_SIZE",UPDATE_SPACE_TREE_PLANE:"UPDATE_SPACE_TREE_PLANE",UPDATE_SPACE_LINK_COORDINATES:"UPDATE_SPACE_LINK_COORDINATES",SPACE_SET_VIEW:"SPACE_SET_VIEW",SPACE_SET_CULLED_VIEW:"SPACE_SET_CULLED_VIEW"});var le=Object.freeze({__proto__:null,setSpaceLoading:e=>({type:"SET_SPACE_LOADING",payload:e}),setAnimatedTransform:e=>({type:"SET_ANIMATED_TRANSFORM",payload:e}),setTransformTime:e=>({type:"SET_TRANSFORM_TIME",payload:e}),setSpaceLocation:e=>({type:"SET_SPACE_LOCATION",payload:e}),viewCameraMoveForward:()=>({type:"VIEW_CAMERA_MOVE_FORWARD"}),viewCameraMoveBackward:()=>({type:"VIEW_CAMERA_MOVE_BACKWARD"}),viewCameraMoveLeft:()=>({type:"VIEW_CAMERA_MOVE_LEFT"}),viewCameraMoveRight:()=>({type:"VIEW_CAMERA_MOVE_RIGHT"}),viewCameraMoveUp:()=>({type:"VIEW_CAMERA_MOVE_UP"}),viewCameraMoveDown:()=>({type:"VIEW_CAMERA_MOVE_DOWN"}),viewCameraTurnUp:()=>({type:"VIEW_CAMERA_TURN_UP"}),viewCameraTurnDown:()=>({type:"VIEW_CAMERA_TURN_DOWN"}),viewCameraTurnLeft:()=>({type:"VIEW_CAMERA_TURN_LEFT"}),viewCameraTurnRight:()=>({type:"VIEW_CAMERA_TURN_RIGHT"}),rotateUp:()=>({type:"ROTATE_UP"}),rotateDown:()=>({type:"ROTATE_DOWN"}),rotateX:e=>({type:"ROTATE_X",payload:e}),rotateXWith:e=>({type:"ROTATE_X_WITH",payload:e}),rotateLeft:()=>({type:"ROTATE_LEFT"}),rotateRight:()=>({type:"ROTATE_RIGHT"}),rotateY:e=>({type:"ROTATE_Y",payload:e}),rotateYWith:e=>({type:"ROTATE_Y_WITH",payload:e}),translateUp:()=>({type:"TRANSLATE_UP"}),translateDown:()=>({type:"TRANSLATE_DOWN"}),translateLeft:()=>({type:"TRANSLATE_LEFT"}),translateRight:()=>({type:"TRANSLATE_RIGHT"}),translateIn:()=>({type:"TRANSLATE_IN"}),translateOut:()=>({type:"TRANSLATE_OUT"}),translateXWith:e=>({type:"TRANSLATE_X_WITH",payload:e}),translateYWith:e=>({type:"TRANSLATE_Y_WITH",payload:e}),scaleUp:()=>({type:"SCALE_UP"}),scaleDown:()=>({type:"SCALE_DOWN"}),scaleUpWith:e=>({type:"SCALE_UP_WITH",payload:e}),scaleDownWith:e=>({type:"SCALE_DOWN_WITH",payload:e}),setInitialTree:e=>({type:"SET_INITIAL_TREE",payload:e}),setTree:e=>({type:"SET_TREE",payload:e}),setActiveUniverse:e=>({type:"SET_ACTIVE_UNIVERSE",payload:e}),spaceResetTransform:()=>({type:"SPACE_RESET_TRANSFORM"}),setViewSize:e=>({type:"SET_VIEW_SIZE",payload:e}),setSpaceSize:e=>({type:"SET_SPACE_SIZE",payload:e}),updateSpaceTreePlane:e=>({type:"UPDATE_SPACE_TREE_PLANE",payload:e}),updateSpaceLinkCoordinates:e=>({type:"UPDATE_SPACE_LINK_COORDINATES",payload:e}),spaceSetView:e=>({type:"SPACE_SET_VIEW",payload:e}),spaceSetCulledView:e=>({type:"SPACE_SET_CULLED_VIEW",payload:e})});const se={loading:!0,animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:[],tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[]},{toRadians:ce}=l.mathematics.geometry,ue=(e,t)=>Object.assign(Object.assign({},e),{loading:t.payload}),de=(e,t)=>Object.assign(Object.assign({},e),{animatedTransform:t.payload}),Te=(e,t)=>Object.assign(Object.assign({},e),{transformTime:t.payload}),pe=(e,t)=>Object.assign(Object.assign({},e),t.payload),Ee=t=>{const a=t.translationZ+6*e.TRANSLATION_STEP*Math.cos(ce(-t.rotationY)),n=t.translationX+6*e.TRANSLATION_STEP*Math.sin(ce(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},fe=t=>{const a=t.translationZ-6*e.TRANSLATION_STEP*Math.cos(ce(-t.rotationY)),n=t.translationX-6*e.TRANSLATION_STEP*Math.sin(ce(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},me=t=>{const a=t.translationX+3*e.TRANSLATION_STEP*Math.cos(ce(t.rotationY)),n=t.translationZ+3*e.TRANSLATION_STEP*Math.sin(ce(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},ge=t=>{const a=t.translationX-3*e.TRANSLATION_STEP*Math.cos(ce(t.rotationY)),n=t.translationZ-3*e.TRANSLATION_STEP*Math.sin(ce(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},_e=t=>{const a=t.translationY+3*e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},Oe=t=>{const a=t.translationY-3*e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},he=t=>{const a=(t.rotationX+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Re=t=>{const a=(t.rotationX-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Ae=t=>{const a=(t.rotationY-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},Se=t=>{const a=(t.rotationY+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},Ie=t=>{const a=(t.rotationX+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Ce=t=>{const a=(t.rotationX-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationX:a})},Ue=(e,t)=>Object.assign(Object.assign({},e),{rotationX:t.payload}),Le=(e,t)=>{const a=e.rotationX+t.payload;return Object.assign(Object.assign({},e),{rotationX:a})},be=t=>{const a=(t.rotationY+e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},Pe=t=>{const a=(t.rotationY-e.ROTATION_STEP)%360;return Object.assign(Object.assign({},t),{rotationY:a})},Ne=(e,t)=>Object.assign(Object.assign({},e),{rotationY:t.payload}),ve=(e,t)=>{const a=e.rotationY+t.payload;return Object.assign(Object.assign({},e),{rotationY:a})},we=t=>{const a=t.translationY-e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},ye=t=>{const a=t.translationY+e.TRANSLATION_STEP;return Object.assign(Object.assign({},t),{translationY:a})},De=t=>{const a=t.translationX-e.TRANSLATION_STEP*Math.cos(ce(t.rotationY)),n=t.translationZ-e.TRANSLATION_STEP*Math.sin(ce(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},Me=t=>{const a=t.translationX+e.TRANSLATION_STEP*Math.cos(ce(t.rotationY)),n=t.translationZ+e.TRANSLATION_STEP*Math.sin(ce(t.rotationY));return Object.assign(Object.assign({},t),{translationX:a,translationZ:n})},xe=t=>{const a=t.translationZ-3*e.TRANSLATION_STEP*Math.cos(ce(-t.rotationY)),n=t.translationX-3*e.TRANSLATION_STEP*Math.sin(ce(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},Fe=t=>{const a=t.translationZ+3*e.TRANSLATION_STEP*Math.cos(ce(-t.rotationY)),n=t.translationX+3*e.TRANSLATION_STEP*Math.sin(ce(-t.rotationY));return Object.assign(Object.assign({},t),{translationX:n,translationZ:a})},Ge=(e,t)=>{const a=e.translationX+t.payload*Math.cos(ce(e.rotationY)),n=e.translationZ+t.payload*Math.sin(ce(e.rotationY));return Object.assign(Object.assign({},e),{translationX:a,translationZ:n})},je=(e,t)=>{const a=e.translationY+t.payload;return Object.assign(Object.assign({},e),{translationY:a})},ke=t=>{const a=t.scale+e.SCALE_STEP,n=a<e.SCALE_UPPER_LIMIT?a:e.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},t),{scale:n})},Ve=t=>{const a=t.scale-e.SCALE_STEP,n=a>e.SCALE_LOWER_LIMIT?a:e.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},t),{scale:n})},We=(t,a)=>{const n=t.scale+Math.abs(a.payload),o=n<e.SCALE_UPPER_LIMIT?n:e.SCALE_UPPER_LIMIT;return Object.assign(Object.assign({},t),{scale:o})},Ye=(t,a)=>{const n=t.scale-Math.abs(a.payload),o=n>e.SCALE_LOWER_LIMIT?n:e.SCALE_LOWER_LIMIT;return Object.assign(Object.assign({},t),{scale:o})},Be=(e,t)=>Object.assign(Object.assign({},e),{initialTree:[...t.payload]}),$e=(e,t)=>Object.assign(Object.assign({},e),{tree:[...t.payload]}),He=(e,t)=>Object.assign(Object.assign({},e),{activeUniverseID:t.payload}),Xe=e=>Object.assign(Object.assign({},e),{scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0}),ze=(e,t)=>Object.assign(Object.assign({},e),{viewSize:Object.assign({},t.payload)}),Ze=(e,t)=>Object.assign(Object.assign({},e),{spaceSize:Object.assign({},t.payload)}),Ke=(e,a)=>{const n=t.general.tree.updateTreePlane(e.tree,a.payload);return Object.assign(Object.assign({},e),{tree:n})},qe=(e,a)=>{const{planeID:n,linkCoordinates:o}=a.payload,r=t.general.tree.updateTreeByPlaneIDWithLinkCoordinates(e.tree,n,o);return Object.assign(Object.assign({},e),{tree:r})},Qe=(e,t)=>Object.assign(Object.assign({},e),{view:t.payload}),Je=(e,t)=>Object.assign(Object.assign({},e),{culledView:t.payload});var et=Object.freeze({__proto__:null,setSpaceLoading:ue,setAnimatedTransform:de,setTransformTime:Te,setSpaceLocation:pe,viewCameraMoveForward:Ee,viewCameraMoveBackward:fe,viewCameraMoveLeft:me,viewCameraMoveRight:ge,viewCameraMoveUp:_e,viewCameraMoveDown:Oe,viewCameraTurnUp:he,viewCameraTurnDown:Re,viewCameraTurnLeft:Ae,viewCameraTurnRight:Se,rotateUp:Ie,rotateDown:Ce,rotateX:Ue,rotateXWith:Le,rotateLeft:be,rotateRight:Pe,rotateY:Ne,rotateYWith:ve,translateUp:we,translateDown:ye,translateLeft:De,translateRight:Me,translateIn:xe,translateOut:Fe,translateXWith:Ge,translateYWith:je,scaleUp:ke,scaleDown:Ve,scaleUpWith:We,scaleDownWith:Ye,setInitialTree:Be,setTree:$e,setActiveUniverse:He,spaceResetTransform:Xe,setViewSize:ze,setSpaceSize:Ze,updateSpaceTreePlane:Ke,updateSpaceLinkCoordinates:qe,spaceSetView:Qe,spaceSetCulledView:Je});const tt=(e=se,t)=>{switch(t.type){case"SET_STATE":return Object.assign(Object.assign({},e),t.payload.space);case"SET_SPACE_LOADING":return ue(e,t);case"SET_ANIMATED_TRANSFORM":return de(e,t);case"SET_TRANSFORM_TIME":return Te(e,t);case"SET_SPACE_LOCATION":return pe(e,t);case"VIEW_CAMERA_MOVE_FORWARD":return Ee(e);case"VIEW_CAMERA_MOVE_BACKWARD":return fe(e);case"VIEW_CAMERA_MOVE_LEFT":return me(e);case"VIEW_CAMERA_MOVE_RIGHT":return ge(e);case"VIEW_CAMERA_MOVE_UP":return _e(e);case"VIEW_CAMERA_MOVE_DOWN":return Oe(e);case"VIEW_CAMERA_TURN_UP":return he(e);case"VIEW_CAMERA_TURN_DOWN":return Re(e);case"VIEW_CAMERA_TURN_LEFT":return Ae(e);case"VIEW_CAMERA_TURN_RIGHT":return Se(e);case"ROTATE_UP":return Ie(e);case"ROTATE_DOWN":return Ce(e);case"ROTATE_X":return Ue(e,t);case"ROTATE_X_WITH":return Le(e,t);case"ROTATE_LEFT":return be(e);case"ROTATE_RIGHT":return Pe(e);case"ROTATE_Y":return Ne(e,t);case"ROTATE_Y_WITH":return ve(e,t);case"TRANSLATE_UP":return we(e);case"TRANSLATE_DOWN":return ye(e);case"TRANSLATE_LEFT":return De(e);case"TRANSLATE_RIGHT":return Me(e);case"TRANSLATE_IN":return xe(e);case"TRANSLATE_OUT":return Fe(e);case"TRANSLATE_X_WITH":return Ge(e,t);case"TRANSLATE_Y_WITH":return je(e,t);case"SCALE_UP":return ke(e);case"SCALE_DOWN":return Ve(e);case"SCALE_UP_WITH":return We(e,t);case"SCALE_DOWN_WITH":return Ye(e,t);case"SET_INITIAL_TREE":return Be(e,t);case"SET_TREE":return $e(e,t);case"SET_ACTIVE_UNIVERSE":return He(e,t);case"SPACE_RESET_TRANSFORM":return Xe(e);case"SET_VIEW_SIZE":return ze(e,t);case"SET_SPACE_SIZE":return Ze(e,t);case"UPDATE_SPACE_TREE_PLANE":return Ke(e,t);case"UPDATE_SPACE_LINK_COORDINATES":return qe(e,t);case"SPACE_SET_VIEW":return Qe(e,t);case"SPACE_SET_CULLED_VIEW":return Je(e,t);default:return Object.assign({},e)}};var at=Object.freeze({__proto__:null,actions:le,initialState:se,reducer:tt,resolvers:et,Types:ie});var nt=Object.freeze({__proto__:null,THEMES_SET_GENERAL_THEME:"THEMES_SET_GENERAL_THEME",THEMES_SET_INTERACTION_THEME:"THEMES_SET_INTERACTION_THEME"});var ot=Object.freeze({__proto__:null,setGeneralTheme:e=>({type:"THEMES_SET_GENERAL_THEME",payload:e}),setInteractionTheme:e=>({type:"THEMES_SET_INTERACTION_THEME",payload:e})});const rt={general:_.default.plurid,interaction:_.default.plurid},it=(e,t)=>Object.assign(Object.assign({},e),{general:Object.assign({},t.payload)}),lt=(e,t)=>Object.assign(Object.assign({},e),{interaction:Object.assign({},t.payload)});var st=Object.freeze({__proto__:null,setGeneralTheme:it,setInteractionTheme:lt});const ct=(e=rt,t)=>{switch(t.type){case"THEMES_SET_GENERAL_THEME":return it(e,t);case"THEMES_SET_INTERACTION_THEME":return lt(e,t);default:return Object.assign({},e)}};var ut=Object.freeze({__proto__:null,actions:ot,initialState:rt,reducer:ct,resolvers:st,Types:nt});var dt=Object.freeze({__proto__:null,SET_UI_TOOLBAR_SCROLL_POSITION:"SET_UI_TOOLBAR_SCROLL_POSITION"});var Tt=Object.freeze({__proto__:null,setUIToolbarScrollPosition:e=>({type:"SET_UI_TOOLBAR_SCROLL_POSITION",payload:e})});const pt={toolbarScrollPosition:0},Et=(e,t)=>Object.assign(Object.assign({},e),{toolbarScrollPosition:t.payload});var ft=Object.freeze({__proto__:null,setUIToolbarScrollPosition:Et});const mt=(e=pt,t)=>{switch(t.type){case"SET_UI_TOOLBAR_SCROLL_POSITION":return Et(e,t);default:return Object.assign({},e)}};var gt=Object.freeze({__proto__:null,actions:Tt,initialState:pt,reducer:mt,resolvers:ft,Types:dt});const _t=r.combineReducers({configuration:K,shortcuts:oe,space:tt,themes:ct,ui:mt}),Ot=e=>r.createStore(_t,e,r.applyMiddleware(g.default)),ht=m.default.createContext({}),Rt=m.default.createContext(void 0);function At(e,t,a,n){return new(a||(a=Promise))((function(o,r){function i(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const St=m.default.createContext(null);var It={configuration:R,shortcuts:J,space:le,themes:ot,ui:Tt};const Ct=()=>At(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(require("hammerjs"))}))}));var Ut={getConfiguration:e=>e.configuration},Lt={getLoading:e=>e.space.loading,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getInitialTree:e=>e.space.initialTree,getTree:e=>e.space.tree,getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView},bt={getGeneralTheme:e=>e.themes.general,getInteractionTheme:e=>e.themes.interaction},Pt={getToolbarScrollPosition:e=>e.ui.toolbarScrollPosition};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===a&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css?family=Ubuntu&display=swap');\n");const Nt=c.createGlobalStyle`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@plurid/plurid-data"),t=require("@plurid/plurid-engine"),a=require("@plurid/plurid-pubsub"),n=require("react"),r=require("react-redux"),o=require("redux"),i=require("redux-thunk"),l=require("@plurid/plurid-functions"),s=require("@plurid/plurid-themes"),c=require("styled-components"),u=require("@plurid/plurid-ui-components-react"),d=require("@plurid/plurid-icons-react"),f=require("@plurid/plurid-functions-react"),p=require("react-dom"),m=require("cross-fetch"),g=require("@plurid/elementql-client-react"),T=require("hammerjs");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=h(e),_=h(t),O=h(a),S=h(n),R=h(r),A=h(o),b=h(i),C=h(l),I=h(s),v=h(c),P=h(u),L=h(d),y=h(f),U=h(p),w=h(m),N=h(g),D=h(T);var M={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=E.default,a=_.default,n=O.default,r=S.default,o=R.default,i=A.default,l=b.default,s=C.default,c=I.default,u=v.default,d=P.default,f=L.default,p=y.default,m=U.default,g=w.default,T=N.default;function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var M=h(n),x=h(r),F=h(l),j=h(c),k=h(u),G=h(g);const Y=x.default.createContext(void 0),B="SET_CONFIGURATION",V="SET_CONFIGURATION_MICRO",X="SET_CONFIGURATION_PLANE_CONTROLS",$="SET_CONFIGURATION_PLANE_OPACITY",W="SET_CONFIGURATION_THEME_GENERAL",z="SET_CONFIGURATION_THEME_INTERACTION",H="SET_CONFIGURATION_LANGUAGE",Z="TOGGLE_CONFIGURATION_VIEWCUBE_HIDE",K="TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS",q="TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE",Q="TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL",J="TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL",ee="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS",te="TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS",ae="TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE",ne="TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER",re="TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI",oe="TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN",ie="SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE",le="SET_CONFIGURATION_SPACE_TRANSFORM_MODE",se="TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE",ce="SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH",ue="TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON",de="SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS",fe="SET_CONFIGURATION_SPACE_LAYOUT_TYPE",pe="SET_CONFIGURATION_SPACE_CULLING_DISTANCE";var me=Object.freeze({__proto__:null,SET_CONFIGURATION:B,SET_CONFIGURATION_MICRO:V,SET_CONFIGURATION_PLANE_CONTROLS:X,SET_CONFIGURATION_PLANE_OPACITY:$,SET_CONFIGURATION_THEME_GENERAL:W,SET_CONFIGURATION_THEME_INTERACTION:z,SET_CONFIGURATION_LANGUAGE:H,TOGGLE_CONFIGURATION_VIEWCUBE_HIDE:Z,TOGGLE_CONFIGURATION_VIEWCUBE_BUTTONS:K,TOGGLE_CONFIGURATION_VIEWCUBE_OPAQUE:q,TOGGLE_CONFIGURATION_VIEWCUBE_CONCEAL:Q,TOGGLE_CONFIGURATION_TOOLBAR_CONCEAL:J,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_ICONS:ee,TOGGLE_CONFIGURATION_TOOLBAR_TRANSFORM_BUTTONS:te,TOGGLE_CONFIGURATION_TOOLBAR_OPAQUE:ae,TOGGLE_CONFIGURATION_TOOLBAR_TOGGLE_DRAWER:ne,TOGGLE_CONFIGURATION_SPACE_TRANSPARENT_UI:re,TOGGLE_CONFIGURATION_SPACE_SHOW_TRANSFORM_ORIGIN:oe,SET_CONFIGURATION_SPACE_TRANSFORM_ORIGIN_SIZE:ie,SET_CONFIGURATION_SPACE_TRANSFORM_MODE:le,TOGGLE_CONFIGURATION_SPACE_TRANSFORM_MULTIMODE:se,SET_CONFIGURATION_SPACE_TRANSFORM_TOUCH:ce,TOGGLE_CONFIGURATION_SPACE_FIRST_PERSON:ue,SET_CONFIGURATION_SPACE_TRANSFORM_LOCKS:de,SET_CONFIGURATION_SPACE_LAYOUT_TYPE:fe,SET_CONFIGURATION_SPACE_CULLING_DISTANCE:pe});var ge=Object.freeze({__proto__:null,setConfiguration:e=>({type:B,payload:e}),setConfigurationMicro:()=>({type:V}),setConfigurationPlaneControls:e=>({type:X,payload:e}),setConfigurationPlaneOpacity:e=>({type:$,payload:e}),setConfigurationThemeGeneralAction:e=>({type:W,payload:e}),setConfigurationThemeInteractionAction:e=>({type:z,payload:e}),setConfigurationLanguageAction:e=>({type:H,payload:e}),toggleConfigurationViewcubeHide:e=>({type:Z,payload:e}),toggleConfigurationViewcubeButtons:e=>({type:K,payload:e}),toggleConfigurationViewcubeOpaque:e=>({type:q,payload:e}),toggleConfigurationViewcubeConceal:()=>({type:Q}),toggleConfigurationToolbarConceal:()=>({type:J}),toggleConfigurationToolbarTransformIcons:()=>({type:ee}),toggleConfigurationToolbarTransformButtons:()=>({type:te}),toggleConfigurationSpaceTransparentUI:()=>({type:re}),toggleConfigurationSpaceShowTransformOrigin:()=>({type:oe}),toggleConfigurationToolbarOpaque:()=>({type:ae}),toggleConfigurationToolbarToggleDrawer:e=>({type:ne,payload:e}),setConfigurationSpaceTransformOriginSize:e=>({type:ie,payload:e}),setConfigurationSpaceTransformMode:e=>({type:le,payload:e}),toggleConfigurationSpaceTransformMultimode:e=>({type:se,payload:e}),setConfigurationSpaceTransformTouch:e=>({type:ce,payload:e}),toggleConfigurationSpaceFirstPerson:()=>({type:ue}),setConfigurationSpaceTransformLocks:e=>({type:de,payload:e}),setConfigurationSpaceLayoutType:e=>({type:fe,payload:e}),setConfigurationSpaceCullingDistance:e=>({type:pe,payload:e})});const Te=Object.assign({},t.defaultConfiguration),he=(e,t)=>Object.assign(Object.assign({},e),t.payload),Ee=e=>{const t=Object.assign({},e);return t.elements.toolbar.show=!1,t.elements.plane.controls.show=!1,t.elements.viewcube.show=!1,Object.assign({},t)},_e=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.controls.show=t.payload,Object.assign({},a)},Oe=(e,t)=>{const a=Object.assign({},e);return a.elements.plane.opacity=t.payload,Object.assign({},a)},Se=(e,t)=>{const a=Object.assign({},e),n={general:t.payload,interaction:"object"==typeof a.global.theme?a.global.theme.interaction:"plurid"};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},Re=(e,t)=>{const a=Object.assign({},e),n={general:"object"==typeof a.global.theme?a.global.theme.general:"plurid",interaction:t.payload};return Object.assign(Object.assign({},a),{global:Object.assign(Object.assign({},a.global),{theme:n})})},Ae=(e,t)=>Object.assign(Object.assign({},e),{global:Object.assign(Object.assign({},e.global),{language:t.payload})}),be=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.show=t.payload,Object.assign({},a)},Ce=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.buttons=t.payload,Object.assign({},a)},Ie=(e,t)=>{const a=Object.assign({},e);return a.elements.viewcube.opaque=t.payload,Object.assign({},a)},ve=e=>{const{conceal:t}=e.elements.viewcube,a=Object.assign({},e);return a.elements.viewcube.conceal=!t,Object.assign({},a)},Pe=e=>{const{conceal:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.conceal=!t,Object.assign({},a)},Le=e=>{const{transformIcons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformIcons=!t,Object.assign({},a)},ye=e=>{const{transformButtons:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.transformButtons=!t,Object.assign({},a)},Ue=e=>{const{show:t}=e.space.transformOrigin,a=Object.assign({},e);return a.space.transformOrigin.show=!t,Object.assign({},a)},we=e=>{const{opaque:t}=e.elements.toolbar,a=Object.assign({},e);return a.elements.toolbar.opaque=!t,Object.assign({},a)},Ne=e=>{const t=Object.assign({},e);return t.global.transparentUI=!e.global.transparentUI,Object.assign({},t)},De=(e,t)=>{const a=Object.assign({},e);return a.space.transformOrigin.size=t.payload,Object.assign({},a)},Me=(e,a)=>{const n=Object.assign({},e);return n.space.transformMode!==a.payload?n.space.transformMode=a.payload:n.space.transformMode=t.TRANSFORM_MODES.ALL,Object.assign({},n)},xe=(e,t)=>{const a=Object.assign({},e);return a.space.transformMultimode=t.payload,Object.assign({},a)},Fe=(e,t)=>{const a=Object.assign({},e);return a.space.transformTouch=t.payload,Object.assign({},a)},je=e=>{const{firstPerson:t}=e.space,a=Object.assign({},e);return a.space.firstPerson=!t,Object.assign({},a)},ke=(e,t)=>{const{toggledDrawers:a}=e.elements.toolbar,n=Object.assign({},e);if(a.includes(t.payload)){const e=a.filter((e=>e!==t.payload));n.elements.toolbar.toggledDrawers=[...e]}else n.elements.toolbar.toggledDrawers=[...a,t.payload];return Object.assign({},n)},Ge=(e,t)=>{const{transformLocks:a}=e.space,n=Object.assign({},e),r=Object.assign({},a);return r[t.payload]=!a[t.payload],n.space.transformLocks=Object.assign({},r),Object.assign({},n)},Ye=(e,a)=>{const n=Object.assign({},e),r={type:t.LAYOUT_TYPES[a.payload]};return n.space.layout=Object.assign({},r),Object.assign({},n)},Be=(e,t)=>{const a=Object.assign({},e);return a.space.cullingDistance=t.payload,Object.assign({},a)};var Ve=Object.freeze({__proto__:null,setConfiguration:he,setConfigurationMicro:Ee,setConfigurationPlaneControls:_e,setConfigurationPlaneOpacity:Oe,setConfigurationThemeGeneral:Se,setConfigurationThemeInteraction:Re,setConfigurationLanguage:Ae,toggleConfigurationViewcubeHide:be,toggleConfigurationViewcubeButtons:Ce,toggleConfigurationViewcubeOpaque:Ie,toggleConfigurationViewcubeConceal:ve,toggleConfigurationToolbarConceal:Pe,toggleConfigurationToolbarTransformIcons:Le,toggleConfigurationToolbarTransformButtons:ye,toggleConfigurationShowTransformOrigin:Ue,toggleConfigurationToolbarOpaque:we,toggleConfigurationSpaceTransparentUI:Ne,setConfigurationSpaceTransformOriginSize:De,setConfigurationSpaceTransformMode:Me,toggleConfigurationSpaceTransformMultimode:xe,setConfigurationSpaceTransformTouch:Fe,toggleConfigurationSpaceFirstPerson:je,toggleConfigurationToolbarToggleDrawer:ke,setConfigurationSpaceTransformLocks:Ge,setConfigurationSpaceLayout:Ye,setConfigurationSpaceCullingDistance:Be});const Xe="SET_STATE";var $e={getConfiguration:e=>e.configuration},We=Object.freeze({__proto__:null,actions:ge,initialState:Te,reducer:(e=Te,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.configuration);case B:return he(e,t);case V:return Ee(e);case X:return _e(e,t);case $:return Oe(e,t);case W:return Se(e,t);case z:return Re(e,t);case H:return Ae(e,t);case Z:return be(e,t);case K:return Ce(e,t);case q:return Ie(e,t);case Q:return ve(e);case J:return Pe(e);case ee:return Le(e);case te:return ye(e);case ne:return ke(e,t);case ae:return we(e);case re:return Ne(e);case oe:return Ue(e);case ie:return De(e,t);case le:return Me(e,t);case se:return xe(e,t);case ce:return Fe(e,t);case ue:return je(e);case de:return Ge(e,t);case fe:return Ye(e,t);case pe:return Be(e,t);default:return Object.assign({},e)}},resolvers:Ve,selectors:$e,Types:me}),ze=Object.freeze({__proto__:null,default:{}});const He={};var Ze=Object.freeze({__proto__:null}),Ke=Object.freeze({__proto__:null}),qe=Object.freeze({__proto__:null,actions:ze,initialState:He,reducer:(e=He,t)=>Object.assign({},e),resolvers:Ze,selectors:{},Types:Ke});const Qe="SHORTCUTS_SET_GLOBAL_SHORTCUTS",Je="SHORTCUTS_UNSET_GLOBAL_SHORTCUTS";var et=Object.freeze({__proto__:null,SHORTCUTS_SET_GLOBAL_SHORTCUTS:Qe,SHORTCUTS_UNSET_GLOBAL_SHORTCUTS:Je});var tt=Object.freeze({__proto__:null,setGlobalShortcuts:()=>({type:Qe}),unsetGlobalShortcuts:()=>({type:Je})});const at={global:!0},nt=e=>Object.assign(Object.assign({},e),{global:!0}),rt=e=>Object.assign(Object.assign({},e),{global:!1});var ot=Object.freeze({__proto__:null,setGlobalShortcuts:nt,unsetGlobalShortcuts:rt});var it={getGlobal:e=>e.shortcuts.global},lt=Object.freeze({__proto__:null,actions:tt,initialState:at,reducer:(e=at,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.shortcuts);case Qe:return nt(e);case Je:return rt(e);default:return Object.assign({},e)}},resolvers:ot,selectors:it,Types:et});const st="SET_SPACE_FIELD",ct="SET_SPACE_LOADING",ut="SET_TRANSFORM",dt="SET_ANIMATED_TRANSFORM",ft="SET_TRANSFORM_TIME",pt="SET_SPACE_LOCATION",mt="VIEW_CAMERA_MOVE_FORWARD",gt="VIEW_CAMERA_MOVE_BACKWARD",Tt="VIEW_CAMERA_MOVE_LEFT",ht="VIEW_CAMERA_MOVE_RIGHT",Et="VIEW_CAMERA_MOVE_UP",_t="VIEW_CAMERA_MOVE_DOWN",Ot="VIEW_CAMERA_TURN_UP",St="VIEW_CAMERA_TURN_DOWN",Rt="VIEW_CAMERA_TURN_LEFT",At="VIEW_CAMERA_TURN_RIGHT",bt="ROTATE_UP",Ct="ROTATE_DOWN",It="ROTATE_LEFT",vt="ROTATE_X",Pt="ROTATE_X_WITH",Lt="ROTATE_RIGHT",yt="ROTATE_Y",Ut="ROTATE_Y_WITH",wt="TRANSLATE_UP",Nt="TRANSLATE_DOWN",Dt="TRANSLATE_LEFT",Mt="TRANSLATE_RIGHT",xt="TRANSLATE_IN",Ft="TRANSLATE_OUT",jt="TRANSLATE_X_WITH",kt="TRANSLATE_Y_WITH",Gt="SCALE_UP",Yt="SCALE_DOWN",Bt="SCALE_UP_WITH",Vt="SCALE_DOWN_WITH",Xt="SET_INITIAL_TREE",$t="SET_TREE",Wt="SET_ACTIVE_UNIVERSE",zt="SPACE_RESET_TRANSFORM",Ht="SET_VIEW_SIZE",Zt="SET_SPACE_SIZE",Kt="UPDATE_SPACE_TREE_PLANE",qt="UPDATE_SPACE_LINK_COORDINATES",Qt="SPACE_SET_VIEW",Jt="SPACE_SET_CULLED_VIEW";var ea=Object.freeze({__proto__:null,SET_SPACE_FIELD:st,SET_SPACE_LOADING:ct,SET_TRANSFORM:ut,SET_ANIMATED_TRANSFORM:dt,SET_TRANSFORM_TIME:ft,SET_SPACE_LOCATION:pt,VIEW_CAMERA_MOVE_FORWARD:mt,VIEW_CAMERA_MOVE_BACKWARD:gt,VIEW_CAMERA_MOVE_LEFT:Tt,VIEW_CAMERA_MOVE_RIGHT:ht,VIEW_CAMERA_MOVE_UP:Et,VIEW_CAMERA_MOVE_DOWN:_t,VIEW_CAMERA_TURN_UP:Ot,VIEW_CAMERA_TURN_DOWN:St,VIEW_CAMERA_TURN_LEFT:Rt,VIEW_CAMERA_TURN_RIGHT:At,ROTATE_UP:bt,ROTATE_DOWN:Ct,ROTATE_LEFT:It,ROTATE_X:vt,ROTATE_X_WITH:Pt,ROTATE_RIGHT:Lt,ROTATE_Y:yt,ROTATE_Y_WITH:Ut,TRANSLATE_UP:wt,TRANSLATE_DOWN:Nt,TRANSLATE_LEFT:Dt,TRANSLATE_RIGHT:Mt,TRANSLATE_IN:xt,TRANSLATE_OUT:Ft,TRANSLATE_X_WITH:jt,TRANSLATE_Y_WITH:kt,SCALE_UP:Gt,SCALE_DOWN:Yt,SCALE_UP_WITH:Bt,SCALE_DOWN_WITH:Vt,SET_INITIAL_TREE:Xt,SET_TREE:$t,SET_ACTIVE_UNIVERSE:Wt,SPACE_RESET_TRANSFORM:zt,SET_VIEW_SIZE:Ht,SET_SPACE_SIZE:Zt,UPDATE_SPACE_TREE_PLANE:Kt,UPDATE_SPACE_LINK_COORDINATES:qt,SPACE_SET_VIEW:Qt,SPACE_SET_CULLED_VIEW:Jt});var ta=Object.freeze({__proto__:null,setSpaceField:e=>({type:st,payload:e}),setSpaceLoading:e=>({type:ct,payload:e}),setTransform:e=>({type:ut,payload:e}),setAnimatedTransform:e=>({type:dt,payload:e}),setTransformTime:e=>({type:ft,payload:e}),setSpaceLocation:e=>({type:pt,payload:e}),viewCameraMoveForward:()=>({type:mt}),viewCameraMoveBackward:()=>({type:gt}),viewCameraMoveLeft:()=>({type:Tt}),viewCameraMoveRight:()=>({type:ht}),viewCameraMoveUp:()=>({type:Et}),viewCameraMoveDown:()=>({type:_t}),viewCameraTurnUp:()=>({type:Ot}),viewCameraTurnDown:()=>({type:St}),viewCameraTurnLeft:()=>({type:Rt}),viewCameraTurnRight:()=>({type:At}),rotateUp:()=>({type:bt}),rotateDown:()=>({type:Ct}),rotateX:e=>({type:vt,payload:e}),rotateXWith:e=>({type:Pt,payload:e}),rotateLeft:()=>({type:It}),rotateRight:()=>({type:Lt}),rotateY:e=>({type:yt,payload:e}),rotateYWith:e=>({type:Ut,payload:e}),translateUp:()=>({type:wt}),translateDown:()=>({type:Nt}),translateLeft:()=>({type:Dt}),translateRight:()=>({type:Mt}),translateIn:()=>({type:xt}),translateOut:()=>({type:Ft}),translateXWith:e=>({type:jt,payload:e}),translateYWith:e=>({type:kt,payload:e}),scaleUp:()=>({type:Gt}),scaleDown:()=>({type:Yt}),scaleUpWith:e=>({type:Bt,payload:e}),scaleDownWith:e=>({type:Vt,payload:e}),setInitialTree:e=>({type:Xt,payload:e}),setTree:e=>({type:$t,payload:e}),setActiveUniverse:e=>({type:Wt,payload:e}),spaceResetTransform:()=>({type:zt}),setViewSize:e=>({type:Ht,payload:e}),setSpaceSize:e=>({type:Zt,payload:e}),updateSpaceTreePlane:e=>({type:Kt,payload:e}),updateSpaceLinkCoordinates:e=>({type:qt,payload:e}),spaceSetView:e=>({type:Qt,payload:e}),spaceSetCulledView:e=>({type:Jt,payload:e})});const aa={loading:!0,transform:"matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)",animatedTransform:!1,transformTime:450,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:[],tree:[],activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight},spaceSize:{width:"undefined"==typeof window?1440:window.innerWidth,height:"undefined"==typeof window?821:window.innerHeight,depth:0,topCorner:{x:0,y:0,z:0}},view:[],culledView:[]},{quaternion:na,matrix:ra}=a.interaction,{matrixArrayToCSSMatrix:oa,rotateMatrix:ia,multiplyArrayOfMatrices:la,scaleMatrix:sa,translateMatrix:ca}=ra,{degToRad:ua}=na,da=e=>{const{translationX:t,translationY:a,translationZ:n,rotationX:r,rotationY:o,scale:i}=e,l=-1*t+("undefined"==typeof window?720:window.innerWidth/2),s=-1*a+("undefined"==typeof window?400:window.innerHeight/2),c=-1*n,u=ia(ua(-r),ua(-o)),d=ca(t,a,n),f=sa(i),p=la([d,la([ca(l,s,c),u,ca(-l,-s,-c)]),f]);return oa(p)},{toRadians:fa}=s.mathematics.geometry,pa=e=>s.objects.clone(e,"any"),ma=(e,t)=>{const{field:a,value:n}=t.payload,r=pa(e);return r[a]=n,Object.assign({},r)},ga=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{loading:t.payload})},Ta=(e,t)=>{const{translationX:a,translationY:n,translationZ:r,rotationX:o,rotationY:i,scale:l}=t.payload,s=null!=a?a:e.translationX,c=null!=n?n:e.translationY,u=null!=r?r:e.translationZ,d=null!=o?o:e.rotationX,f=null!=i?i:e.rotationY,p=null!=l?l:e.scale,m=pa(e);return Object.assign(Object.assign({},m),{translationX:s,translationY:c,translationZ:u,rotationX:d,rotationY:f,scale:p})},ha=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{animatedTransform:t.payload})},Ea=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{transformTime:t.payload})},_a=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),t.payload)},Oa=e=>{const a=pa(e);return a.translationZ=e.translationZ+6*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX+6*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Sa=e=>{const a=pa(e);return a.translationZ=e.translationZ-6*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX-6*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Ra=e=>{const a=pa(e);return a.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Aa=e=>{const a=pa(e);return a.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},ba=e=>{const a=pa(e);return a.translationY=e.translationY+3*t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ca=e=>{const a=pa(e);return a.translationY=e.translationY-3*t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ia=e=>{const a=pa(e);return a.rotationX=(e.rotationX+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},va=e=>{const a=pa(e);return a.rotationX=(e.rotationX-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Pa=e=>{const a=pa(e);return a.rotationY=(e.rotationY-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},La=e=>{const a=pa(e);return a.rotationY=(e.rotationY+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},ya=e=>{const a=pa(e);return a.rotationX=(e.rotationX+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Ua=e=>{const a=pa(e);return a.rotationX=(e.rotationX-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},wa=(e,t)=>{const a=pa(e);return a.rotationX=t.payload,a.transform=da(a),Object.assign({},a)},Na=(e,t)=>{const a=pa(e);return a.rotationX=e.rotationX+t.payload,a.transform=da(a),Object.assign({},a)},Da=e=>{const a=pa(e);return a.rotationY=(e.rotationY+t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},Ma=e=>{const a=pa(e);return a.rotationY=(e.rotationY-t.ROTATION_STEP)%360,a.transform=da(a),Object.assign({},a)},xa=(e,t)=>{const a=pa(e);return a.rotationY=t.payload,a.transform=da(a),Object.assign({},a)},Fa=(e,t)=>{const a=pa(e);return a.rotationY=e.rotationY+t.payload,a.transform=da(a),Object.assign({},a)},ja=e=>{const a=pa(e);return a.translationY=e.translationY-t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},ka=e=>{const a=pa(e);return a.translationY=e.translationY+t.TRANSLATION_STEP,a.transform=da(a),Object.assign({},a)},Ga=e=>{const a=pa(e);return a.translationX=e.translationX-t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ-t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Ya=e=>{const a=pa(e);return a.translationX=e.translationX+t.TRANSLATION_STEP*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+t.TRANSLATION_STEP*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},Ba=e=>{const a=pa(e);return a.translationZ=e.translationZ-3*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX-3*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Va=e=>{const a=pa(e);return a.translationZ=e.translationZ+3*t.TRANSLATION_STEP*Math.cos(fa(-e.rotationY)),a.translationX=e.translationX+3*t.TRANSLATION_STEP*Math.sin(fa(-e.rotationY)),a.transform=da(a),Object.assign({},a)},Xa=(e,t)=>{const a=pa(e);return a.translationX=e.translationX+t.payload*Math.cos(fa(e.rotationY)),a.translationZ=e.translationZ+t.payload*Math.sin(fa(e.rotationY)),a.transform=da(a),Object.assign({},a)},$a=(e,t)=>{const a=pa(e);return a.translationY=e.translationY+t.payload,a.transform=da(a),Object.assign({},a)},Wa=e=>{const a=e.scale+t.SCALE_STEP,n=a<t.SCALE_UPPER_LIMIT?a:t.SCALE_UPPER_LIMIT,r=pa(e);return r.scale=n,r.transform=da(r),Object.assign({},r)},za=e=>{const a=e.scale-t.SCALE_STEP,n=a>t.SCALE_LOWER_LIMIT?a:t.SCALE_LOWER_LIMIT,r=pa(e);return r.scale=n,r.transform=da(r),Object.assign({},r)},Ha=(e,a)=>{const n=e.scale+Math.abs(a.payload),r=n<t.SCALE_UPPER_LIMIT?n:t.SCALE_UPPER_LIMIT,o=pa(e);return o.scale=r,o.transform=da(o),Object.assign({},o)},Za=(e,a)=>{const n=e.scale-Math.abs(a.payload),r=n>t.SCALE_LOWER_LIMIT?n:t.SCALE_LOWER_LIMIT,o=pa(e);return o.scale=r,o.transform=da(o),Object.assign({},o)},Ka=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{initialTree:[...t.payload]})},qa=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{tree:[...t.payload]})},Qa=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{activeUniverseID:t.payload})},Ja=e=>{const t=pa(e);return t.scale=1,t.rotationX=0,t.rotationY=0,t.translationX=0,t.translationY=0,t.translationZ=0,t.transform=da(t),Object.assign({},t)},en=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{viewSize:Object.assign({},t.payload)})},tn=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{spaceSize:Object.assign({},t.payload)})},an=(e,t)=>{const n=pa(e),r=a.general.tree.updateTreePlane(n.tree,t.payload);return Object.assign(Object.assign({},n),{tree:r})},nn=(e,t)=>{const{planeID:n,linkCoordinates:r}=t.payload,o=pa(e),i=a.general.tree.updateTreeByPlaneIDWithLinkCoordinates(o.tree,n,r);return Object.assign(Object.assign({},o),{tree:i})},rn=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{view:t.payload})},on=(e,t)=>{const a=pa(e);return Object.assign(Object.assign({},a),{culledView:t.payload})};var ln=Object.freeze({__proto__:null,setSpaceField:ma,setSpaceLoading:ga,setTransform:Ta,setAnimatedTransform:ha,setTransformTime:Ea,setSpaceLocation:_a,viewCameraMoveForward:Oa,viewCameraMoveBackward:Sa,viewCameraMoveLeft:Ra,viewCameraMoveRight:Aa,viewCameraMoveUp:ba,viewCameraMoveDown:Ca,viewCameraTurnUp:Ia,viewCameraTurnDown:va,viewCameraTurnLeft:Pa,viewCameraTurnRight:La,rotateUp:ya,rotateDown:Ua,rotateX:wa,rotateXWith:Na,rotateLeft:Da,rotateRight:Ma,rotateY:xa,rotateYWith:Fa,translateUp:ja,translateDown:ka,translateLeft:Ga,translateRight:Ya,translateIn:Ba,translateOut:Va,translateXWith:Xa,translateYWith:$a,scaleUp:Wa,scaleDown:za,scaleUpWith:Ha,scaleDownWith:Za,setInitialTree:Ka,setTree:qa,setActiveUniverse:Qa,spaceResetTransform:Ja,setViewSize:en,setSpaceSize:tn,updateSpaceTreePlane:an,updateSpaceLinkCoordinates:nn,spaceSetView:rn,spaceSetCulledView:on});var sn={getLoading:e=>e.space.loading,getTransformMatrix:e=>e.space.transform,getAnimatedTransform:e=>e.space.animatedTransform,getTransformTime:e=>e.space.transformTime,getRotationX:e=>e.space.rotationX,getRotationY:e=>e.space.rotationY,getTranslationX:e=>e.space.translationX,getTranslationY:e=>e.space.translationY,getTranslationZ:e=>e.space.translationZ,getScale:e=>e.space.scale,getTransform:e=>({rotationX:e.space.rotationX,rotationY:e.space.rotationY,translationX:e.space.translationX,translationY:e.space.translationY,translationZ:e.space.translationZ,scale:e.space.scale}),getInitialTree:e=>e.space.initialTree,getTree:e=>e.space.tree,getActiveUniverseID:e=>e.space.activeUniverseID,getView:e=>e.space.view,getViewSize:e=>e.space.viewSize,getCulledView:e=>e.space.culledView},cn=Object.freeze({__proto__:null,actions:ta,initialState:aa,reducer:(e=aa,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.space);case st:return ma(e,t);case ct:return ga(e,t);case ut:return Ta(e,t);case dt:return ha(e,t);case ft:return Ea(e,t);case pt:return _a(e,t);case mt:return Oa(e);case gt:return Sa(e);case Tt:return Ra(e);case ht:return Aa(e);case Et:return ba(e);case _t:return Ca(e);case Ot:return Ia(e);case St:return va(e);case Rt:return Pa(e);case At:return La(e);case bt:return ya(e);case Ct:return Ua(e);case vt:return wa(e,t);case Pt:return Na(e,t);case It:return Da(e);case Lt:return Ma(e);case yt:return xa(e,t);case Ut:return Fa(e,t);case wt:return ja(e);case Nt:return ka(e);case Dt:return Ga(e);case Mt:return Ya(e);case xt:return Ba(e);case Ft:return Va(e);case jt:return Xa(e,t);case kt:return $a(e,t);case Gt:return Wa(e);case Yt:return za(e);case Bt:return Ha(e,t);case Vt:return Za(e,t);case Xt:return Ka(e,t);case $t:return qa(e,t);case Wt:return Qa(e,t);case zt:return Ja(e);case Ht:return en(e,t);case Zt:return tn(e,t);case Kt:return an(e,t);case qt:return nn(e,t);case Qt:return rn(e,t);case Jt:return on(e,t);default:return Object.assign({},e)}},resolvers:ln,selectors:sn,Types:ea});const un="THEMES_SET_GENERAL_THEME",dn="THEMES_SET_INTERACTION_THEME";var fn=Object.freeze({__proto__:null,THEMES_SET_GENERAL_THEME:un,THEMES_SET_INTERACTION_THEME:dn});var pn=Object.freeze({__proto__:null,setGeneralTheme:e=>({type:un,payload:e}),setInteractionTheme:e=>({type:dn,payload:e})});const mn={general:c.plurid,interaction:c.plurid},gn=(e,t)=>Object.assign(Object.assign({},e),{general:Object.assign({},t.payload)}),Tn=(e,t)=>Object.assign(Object.assign({},e),{interaction:Object.assign({},t.payload)});var hn=Object.freeze({__proto__:null,setGeneralTheme:gn,setInteractionTheme:Tn});var En={getGeneralTheme:e=>e.themes.general,getInteractionTheme:e=>e.themes.interaction},_n=Object.freeze({__proto__:null,actions:pn,initialState:mn,reducer:(e=mn,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.themes);case un:return gn(e,t);case dn:return Tn(e,t);default:return Object.assign({},e)}},resolvers:hn,selectors:En,Types:fn});const On="SET_UI_TOOLBAR_SCROLL_POSITION";var Sn=Object.freeze({__proto__:null,SET_UI_TOOLBAR_SCROLL_POSITION:On});var Rn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:e=>({type:On,payload:e})});const An={toolbarScrollPosition:0},bn=(e,t)=>Object.assign(Object.assign({},e),{toolbarScrollPosition:t.payload});var Cn=Object.freeze({__proto__:null,setUIToolbarScrollPosition:bn});var In={getToolbarScrollPosition:e=>e.ui.toolbarScrollPosition},vn={configuration:We,general:qe,shortcuts:lt,space:cn,themes:_n,ui:Object.freeze({__proto__:null,actions:Rn,initialState:An,reducer:(e=An,t)=>{switch(t.type){case Xe:return Object.assign(Object.assign({},e),t.payload.ui);case On:return bn(e,t);default:return Object.assign({},e)}},resolvers:Cn,selectors:In,Types:Sn})};const Pn=i.combineReducers({configuration:vn.configuration.reducer,general:vn.general.reducer,shortcuts:vn.shortcuts.reducer,space:vn.space.reducer,themes:vn.themes.reducer,ui:vn.ui.reducer}),Ln=e=>i.createStore(Pn,e,i.applyMiddleware(F.default)),yn=x.default.createContext({});function Un(e,t,a,n){return new(a||(a=Promise))((function(r,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))}const wn=x.default.createContext(null);var Nn={configuration:vn.configuration.actions,general:vn.general.actions,shortcuts:vn.shortcuts.actions,space:vn.space.actions,themes:vn.themes.actions,ui:vn.ui.actions};const{direction:Dn}=a.interaction,Mn=()=>Un(void 0,void 0,void 0,(function*(){return yield Promise.resolve().then((function(){return function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}(D.default)}))}));var xn={configuration:vn.configuration.selectors,general:vn.general.selectors,shortcuts:vn.shortcuts.selectors,space:vn.space.selectors,themes:vn.themes.selectors,ui:vn.ui.selectors};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css?family=Ubuntu&display=swap');\n");const Fn=u.createGlobalStyle`
|
|
2
2
|
*,
|
|
3
3
|
*:after,
|
|
4
4
|
*:before {
|
|
@@ -29,44 +29,46 @@
|
|
|
29
29
|
*/
|
|
30
30
|
overscroll-behavior-x: contain;
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,jn=k.default.div`
|
|
33
33
|
height: 100%;
|
|
34
|
+
min-height: ${e=>e.fullHeight?"100vh":"100%"};
|
|
35
|
+
min-height: ${e=>e.fullHeight?"-webkit-fill-available":"100%"};
|
|
36
|
+
|
|
34
37
|
width: 100%;
|
|
35
38
|
position: relative;
|
|
36
39
|
scroll-snap-align: start;
|
|
37
40
|
outline: none;
|
|
38
41
|
overflow: hidden;
|
|
39
42
|
|
|
40
|
-
cursor: ${
|
|
43
|
+
cursor: ${e=>e.transformMode===t.TRANSFORM_MODES.TRANSLATION||e.transformMode===t.TRANSFORM_MODES.ROTATION?"all-scroll":e.transformMode===t.TRANSFORM_MODES.SCALE?"ns-resize":"initial"};
|
|
41
44
|
user-select: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
|
|
42
45
|
touch-action: ${e=>"ALL"!==e.transformMode?"none !important":"initial !important"};
|
|
43
46
|
-webkit-user-drag: ${e=>"ALL"!==e.transformMode?"none":"initial !important"};
|
|
44
47
|
-webkit-tap-highlight-color: ${e=>"ALL"!==e.transformMode?"rgba(0, 0, 0, 0)":"initial !important"};
|
|
45
|
-
`;
|
|
48
|
+
`;k.default.div`
|
|
46
49
|
outline: none;
|
|
47
50
|
background: ${e=>{if(e.opaque){return`radial-gradient(\n ellipse at center,\n ${"dark"===e.theme.type?e.theme.backgroundColorTertiary:e.theme.backgroundColorPrimary} 0%,\n ${"dark"===e.theme.type?e.theme.backgroundColorPrimary:e.theme.backgroundColorTertiary} 100%)\n `}return"transparent"}};
|
|
48
|
-
`;
|
|
49
|
-
background-color: ${e=>{if(e
|
|
50
|
-
box-shadow: ${e=>0===e
|
|
51
|
-
color: ${e=>e.
|
|
52
|
-
opacity: ${e=>e
|
|
53
|
-
user-select: ${e=>e
|
|
51
|
+
`;class kn extends x.default.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.renderError?this.props.renderError:x.default.createElement("h1",null,"Something went wrong."):this.props.children}}const Gn=k.default.div`
|
|
52
|
+
background-color: ${({transparentUI:e,mouseOver:t,theme:a,planeOpacity:n})=>{if(e&&!t)return a.backgroundColorPrimaryAlpha;if(1!==n){const e=c.decomposeColor(a.backgroundColorPrimary);if(e){return`hsla(${e.hue}, ${e.saturation}%, ${e.lightness}%, ${n})`}return"transparent"}return a.backgroundColorPrimary}};
|
|
53
|
+
box-shadow: ${({planeOpacity:e,theme:t})=>0===e?"none":t.boxShadowUmbra};
|
|
54
|
+
color: ${({theme:e})=>e.colorPrimary};
|
|
55
|
+
opacity: ${({show:e})=>e?"1":"0"};
|
|
56
|
+
user-select: ${({show:e})=>e?"auto":"none"};
|
|
54
57
|
|
|
55
58
|
position: absolute;
|
|
56
59
|
height: auto;
|
|
57
60
|
width: 100%;
|
|
58
61
|
font-size: 0.9rem;
|
|
59
|
-
font-family:
|
|
60
|
-
'Open Sans', 'Helvetica Neue', 'Lucida Sans', sans-serif;
|
|
62
|
+
font-family: ${({theme:e})=>e.fontFamilySansSerif};
|
|
61
63
|
transition: background-color 300ms linear;
|
|
62
64
|
|
|
63
65
|
display: grid;
|
|
64
66
|
grid-template-columns: 1fr;
|
|
65
|
-
grid-template-rows: ${e=>e
|
|
67
|
+
grid-template-rows: ${({planeControls:e})=>e?"56px auto":"auto"};
|
|
66
68
|
|
|
67
69
|
transform-origin: 0 0 0;
|
|
68
|
-
`,
|
|
69
|
-
background-color: ${e=>0===e
|
|
70
|
+
`,Yn=k.default.div`
|
|
71
|
+
background-color: ${({planeOpacity:e,planeControls:t,theme:a})=>0===e?"transparent":t?a.backgroundColorDark:a.backgroundColorPrimary};
|
|
70
72
|
|
|
71
73
|
position: absolute;
|
|
72
74
|
top: 0;
|
|
@@ -74,47 +76,9 @@
|
|
|
74
76
|
height: 30px;
|
|
75
77
|
width: 100px;
|
|
76
78
|
opacity: 0.5;
|
|
77
|
-
`,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
left: 0;
|
|
81
|
-
right: 0;
|
|
82
|
-
top: 47px;
|
|
83
|
-
border-bottom-left-radius: 15px;
|
|
84
|
-
border-bottom-right-radius: 15px;
|
|
85
|
-
z-index: 9999;
|
|
86
|
-
|
|
87
|
-
background-color: ${e=>e.theme.backgroundColorDark};
|
|
88
|
-
box-shadow: ${e=>e.theme.boxShadowPenumbra};
|
|
89
|
-
|
|
90
|
-
ul {
|
|
91
|
-
padding: 0;
|
|
92
|
-
margin: 0;
|
|
93
|
-
list-style: none;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
li {
|
|
97
|
-
padding: 0.7rem 1.4rem;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
li:last-child {
|
|
102
|
-
border-bottom-left-radius: 15px;
|
|
103
|
-
border-bottom-right-radius: 15px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
li:hover {
|
|
107
|
-
background-color: ${e=>e.theme.backgroundColorPrimary};
|
|
108
|
-
}
|
|
109
|
-
`,jt=O.default.div`
|
|
110
|
-
display: grid;
|
|
111
|
-
padding: 0.7rem;
|
|
112
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
113
|
-
place-content: center;
|
|
114
|
-
justify-items: center;
|
|
115
|
-
`,kt=o.connect((e=>({stateConfiguration:Ut.getConfiguration(e),stateGeneralTheme:bt.getGeneralTheme(e),stateInteractionTheme:bt.getInteractionTheme(e)})),(e=>({})),null,{context:ht})((e=>{const{hideSearch:t,stateInteractionTheme:a}=e;return m.default.createElement(Gt,{theme:a},m.default.createElement(jt,null,m.default.createElement("div",null,"space - default"),m.default.createElement("div",null,"universe - default"),m.default.createElement("div",null,"cluster - default")),m.default.createElement("ul",null,[].map((e=>m.default.createElement(Ft,{key:l.uuid.generate(),text:e,hideSearch:t})))))})),Vt=O.default.div`
|
|
116
|
-
background-color: ${e=>e.transparentUI&&!e.mouseOver?"transparent":e.theme.backgroundColorDark};
|
|
117
|
-
box-shadow: ${e=>e.theme.boxShadowUmbraInset};
|
|
79
|
+
`,Bn=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{controls:r,opacity:o}=n.elements.plane;return x.default.createElement(Yn,{theme:a,planeControls:r.show,planeOpacity:o,"data-plurid-entity":t.PLURID_ENTITY_PLANE_BRIDGE})})),Vn=k.default.div`
|
|
80
|
+
background-color: ${({transparentUI:e,mouseOver:t,theme:a})=>e&&!t?"transparent":a.backgroundColorDark};
|
|
81
|
+
box-shadow: ${({theme:e})=>e.boxShadowUmbraInset};
|
|
118
82
|
|
|
119
83
|
width: 100%;
|
|
120
84
|
display: grid;
|
|
@@ -127,35 +91,23 @@
|
|
|
127
91
|
@media (max-width: 800px) {
|
|
128
92
|
grid-template-columns: 1fr 3fr 1fr;
|
|
129
93
|
}
|
|
130
|
-
`,
|
|
131
|
-
|
|
94
|
+
`,Xn=k.default.div`
|
|
95
|
+
`,$n=k.default.div`
|
|
132
96
|
width: 100%;
|
|
133
97
|
height: 38px;
|
|
134
98
|
position: relative;
|
|
135
|
-
`,
|
|
99
|
+
`,Wn=k.default.div`
|
|
136
100
|
display: grid;
|
|
137
101
|
grid-template-columns: repeat(4, 30px);
|
|
138
102
|
padding: 0 1rem;
|
|
139
|
-
`,{inputs:{Textline
|
|
103
|
+
`,{inputs:{Textline:zn}}=d.universal,Hn=o.connect((e=>({configuration:xn.configuration.getConfiguration(e),generalTheme:xn.themes.getGeneralTheme(e),interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plane:a,treePlane:n,mouseOver:o,configuration:i,generalTheme:l,interactionTheme:s}=e,{global:c,elements:u}=i,{transparentUI:d}=c,{pathbar:f}=u.plane.controls,{route:p,routeDivisions:m}=n,{protocol:g,host:T}=m;T.value,encodeURIComponent(p);const[h,E]=r.useState(n.route);r.useState(!1);const[_,O]=r.useState(!1);return x.default.createElement(Vn,{theme:l,mouseOver:o,transparentUI:d,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTROLS},x.default.createElement(Xn,null),x.default.createElement($n,null,x.default.createElement(zn,{theme:s,text:h,atChange:e=>{if(E(e.target.value),f.onChange){const t=a.route.absolute;f.onChange(e,t)}},atKeyDown:e=>{if(_||O(!0),"Escape"===e.key&&O(!1),f.onKeyDown){const t=a.route.absolute;f.onKeyDown(e,t)}},ariaLabel:"Plurid Pathbar"})),x.default.createElement(Wn,null))})),Zn=k.default.div`
|
|
140
104
|
position: relative;
|
|
141
|
-
|
|
142
|
-
font-size: initial !important;
|
|
143
|
-
`,zt=t=>{const{children:a}=t,o=n.useRef(null);return m.default.createElement(Xt,{ref:o,"data-plurid-entity":e.PLURID_ENTITY_PLANE_CONTENT},a)},Zt=o.connect((e=>({viewSize:Lt.getViewSize(e),spaceScale:Lt.getScale(e),generalTheme:bt.getGeneralTheme(e),interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e),tree:Lt.getTree(e)})),(e=>({updateSpaceTreePlane:t=>e(It.space.updateSpaceTreePlane(t))})),null,{context:ht})((t=>{const{planeID:a,plane:o,treePlane:r,location:i,children:s,viewSize:c,generalTheme:u,configuration:d,updateSpaceTreePlane:T}=t,{global:p,elements:E}=d,{transparentUI:f}=p,{controls:g,width:_,opacity:O}=E.plane,h=g.show,R=l.mathematics.numbers.checkIntegerNonUnit(_)?_:_*c.width,[A,S]=n.useState(!1);return m.default.createElement(yt,{suppressHydrationWarning:!0,theme:u,planeControls:h,planeOpacity:O,show:r.show,id:a,style:{width:R,transform:wt(`\n translateX(${i.translateX}px)\n translateY(${i.translateY}px)\n translateZ(${i.translateZ}px)\n rotateX(${i.rotateX}deg)\n rotateY(${i.rotateY}deg)\n `)},onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),transparentUI:f,mouseOver:A,"data-plurid-plane":a,"data-plurid-entity":e.PLURID_ENTITY_PLANE},r.show&&m.default.createElement(m.default.Fragment,null,r.parentPlaneID&&m.default.createElement(Mt,null),h&&m.default.createElement(Ht,{plane:o,treePlane:r,mouseOver:A}),m.default.createElement(zt,null,s)))})),Kt=O.default.div`
|
|
105
|
+
`,Kn=e=>{const{children:a}=e,n=r.useRef(null);return x.default.createElement(Zn,{ref:n,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONTENT},a)},qn=o.connect((e=>({stateViewSize:xn.space.getViewSize(e),stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({dispatchUpdateSpaceTreePlane:t=>e(Nn.space.updateSpaceTreePlane(t))})),null,{context:yn})((e=>{const{planeID:n,plane:o,treePlane:i,children:l,stateViewSize:c,stateGeneralTheme:u,stateConfiguration:d,dispatchUpdateSpaceTreePlane:f}=e,{global:p,elements:m}=d,{transparentUI:g}=p,{controls:T,width:h,opacity:E}=m.plane,_=T.show;s.mathematics.numbers.checkIntegerNonUnit(h)||c.width;const O=r.useContext(wn);if(!O)return x.default.createElement(x.default.Fragment,null);const{planeRenderError:S}=O,[R,A]=r.useState(!1),b={};return x.default.createElement(Gn,{suppressHydrationWarning:!0,theme:u,planeControls:_,planeOpacity:E,show:i.show,id:n,style:{width:"100%",transform:a.cleanTemplate(`\n translateX(${i.location.translateX}px)\n translateY(${i.location.translateY}px)\n translateZ(${i.location.translateZ}px)\n rotateX(${i.location.rotateX}deg)\n rotateY(${i.location.rotateY}deg)\n `)},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),transparentUI:g,mouseOver:R,"data-plurid-plane":n,"data-plurid-entity":t.PLURID_ENTITY_PLANE},i.show&&x.default.createElement(x.default.Fragment,null,i.parentPlaneID&&x.default.createElement(Bn,null),_&&x.default.createElement(Hn,{plane:o,treePlane:i,mouseOver:R}),S?x.default.createElement(kn,{renderError:"boolean"!=typeof S?S:void 0},x.default.createElement(Kn,Object.assign({},b),l)):x.default.createElement(Kn,Object.assign({},b),l)))})),Qn=e=>!!e&&("string"!=typeof e&&!e.url),Jn=k.default.div`
|
|
144
106
|
transform-style: preserve-3d;
|
|
145
|
-
`,
|
|
107
|
+
`,{getPlanesRegistrar:er,getRegisteredPlane:tr}=a.planes,ar=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>{const{plane:a}=e,{location:n}=a,o=r.useContext(wn);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i,planeContext:l,planeContextValue:s,customPlane:c,matchedRoute:u}=o,d=c,[f,p]=r.useState([]),m=e=>{if(!e.children)return;const t=er(i);e.children.map((e=>{if(!t)return;const a=e.sourceID,n=t.get(a);let r=x.default.createElement(x.default.Fragment,null);if(n){const t=n.component,a={plane:{value:n.route.absolute,planeID:e.planeID,parentPlaneID:e.parentPlaneID,fragments:n.route.fragments,parameters:n.route.parameters,query:n.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},o={plurid:Object.assign({},a)},i=Qn(t),c=Qn(d);r=d?c?x.default.createElement(d,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location}):x.default.createElement(x.default.Fragment,null):i?x.default.createElement(qn,{key:e.planeID,plane:n,treePlane:e,planeID:e.planeID,location:e.location},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(t,Object.assign({},o))):x.default.createElement(t,Object.assign({},o))):x.default.createElement(x.default.Fragment,null),p((e=>[...e,r]))}e.children&&m(e)}))};r.useEffect((()=>{p([]),m(a)}),[JSON.stringify(a)]);const g=a.sourceID;if(!g)return x.default.createElement(x.default.Fragment,null);const T=tr(g,i);if(!T)return x.default.createElement(x.default.Fragment,null);const h=T.component,E={plane:{value:T.route.absolute,planeID:a.planeID,parentPlaneID:a.parentPlaneID,fragments:T.route.fragments,parameters:T.route.parameters,query:T.route.query},route:{value:(null==u?void 0:u.match.value)||"",parameters:(null==u?void 0:u.match.parameters)||{},query:(null==u?void 0:u.match.query)||{}}},_={plurid:Object.assign({},E)};return d?"function"!=typeof d?x.default.createElement(x.default.Fragment,null):x.default.createElement(Jn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(d,{plane:T,treePlane:a,planeID:a.planeID,location:n}),f):x.default.createElement(Jn,{"data-plurid-entity":t.PLURID_ENTITY_ROOT},x.default.createElement(qn,{plane:T,treePlane:a,planeID:a.planeID,location:n},l?x.default.createElement(l.Provider,{value:s},x.default.createElement(h,Object.assign({},_))):x.default.createElement(h,Object.assign({},_))),f)})),nr=k.default.div`
|
|
146
108
|
transform-style: preserve-3d;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
height: ${t=>{switch(t.transformOriginSize){case e.SIZES.SMALL:return"5px";case e.SIZES.NORMAL:return"10px";case e.SIZES.LARGE:return"15px";default:return"10px"}}};
|
|
150
|
-
width: ${t=>{switch(t.transformOriginSize){case e.SIZES.SMALL:return"5px";case e.SIZES.NORMAL:return"10px";case e.SIZES.LARGE:return"15px";default:return"10px"}}};
|
|
151
|
-
|
|
152
|
-
position: absolute;
|
|
153
|
-
z-index: 999;
|
|
154
|
-
border-radius: 100px;
|
|
155
|
-
user-select: none;
|
|
156
|
-
pointer-events: none;
|
|
157
|
-
touch-action: none;
|
|
158
|
-
`,ea=o.connect((e=>({stateConfiguration:Ut.getConfiguration(e),interactionTheme:bt.getInteractionTheme(e),animatedTransform:Lt.getAnimatedTransform(e),transformTime:Lt.getTransformTime(e),spaceScale:Lt.getScale(e),spaceRotationX:Lt.getRotationX(e),spaceRotationY:Lt.getRotationY(e),spaceTranslationX:Lt.getTranslationX(e),spaceTranslationY:Lt.getTranslationY(e),spaceTranslationZ:Lt.getTranslationZ(e),stateTree:Lt.getTree(e)})),(e=>({})),null,{context:ht})((t=>{const{computedTree:a,appConfiguration:n,stateConfiguration:o,interactionTheme:r,animatedTransform:i,transformTime:l,spaceScale:s,spaceRotationX:c,spaceRotationY:u,spaceTranslationX:d,spaceTranslationY:T,spaceTranslationZ:p,stateTree:E}=t,f=a?n:o,{space:g}=f,{transformOrigin:_}=g,{show:O,size:h}=_,R=-1*d+("undefined"==typeof window?720:window.innerWidth/2),A=-1*T+("undefined"==typeof window?400:window.innerHeight/2),S=-1*p,I=h===e.SIZES.SMALL?2.5:h===e.SIZES.NORMAL?5:7.5;return m.default.createElement(Qt,{suppressHydrationWarning:!0,style:{width:"undefined"!=typeof window?window.innerWidth+"px":"1440px",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:wt(`\n translateX(${d}px)\n translateY(${T}px)\n translateZ(${p}px)\n scale(${s})\n rotateX(${c}deg)\n rotateY(${u}deg)\n `),transition:i?`transform ${l}ms ease-in-out`:"initial",transformOrigin:wt(`\n ${R}px\n ${A}px\n ${S}px\n `)},"data-plurid-entity":e.PLURID_ENTITY_ROOTS},O&&m.default.createElement(Jt,{suppressHydrationWarning:!0,theme:r,transformOriginSize:h,style:{transform:wt(`\n rotateY(${-u}deg)\n translateX(${R-I}px)\n translateY(${A-I}px)\n translateZ(${S+5}px)\n `),transformOrigin:wt(`\n ${R-I}px\n ${A-I}px\n ${S}px\n `)},"data-plurid-entity":e.PLURID_ENTITY_TRANSFORM_ORIGIN}),E.map((e=>m.default.createElement(qt,{key:e.planeID,plane:e}))))})),ta=c.keyframes`
|
|
109
|
+
transform-origin: 0 0 0;
|
|
110
|
+
`,rr=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),spaceTransformMatrix:xn.space.getTransformMatrix(e),spaceAnimatedTransform:xn.space.getAnimatedTransform(e),spaceTransformTime:xn.space.getTransformTime(e),stateTree:xn.space.getTree(e)})),(e=>({})),null,{context:yn})((e=>{const{spaceTransformMatrix:a,spaceAnimatedTransform:n,spaceTransformTime:r,stateTree:o}=e;return x.default.createElement(nr,{suppressHydrationWarning:!0,style:{width:"100%",height:"undefined"!=typeof window?window.innerHeight+"px":"821px",transform:a,transition:n?`transform ${r}ms ease-in-out`:"initial"},"data-plurid-entity":t.PLURID_ENTITY_ROOTS},o.map((e=>x.default.createElement(ar,{key:e.planeID,plane:e}))))})),or=u.keyframes`
|
|
159
111
|
from {
|
|
160
112
|
opacity: 0%;
|
|
161
113
|
}
|
|
@@ -163,19 +115,37 @@
|
|
|
163
115
|
to {
|
|
164
116
|
opacity: 100%;
|
|
165
117
|
}
|
|
166
|
-
`,
|
|
118
|
+
`,ir=e=>u.css`${or} ${e}ms linear 100ms forwards`,lr=k.default.div`
|
|
167
119
|
position: relative;
|
|
168
120
|
height: 100%;
|
|
169
121
|
overflow: hidden;
|
|
170
122
|
perspective: 2000px;
|
|
171
123
|
outline: none;
|
|
172
|
-
background: ${e=>{if(e.opaque){return`radial-gradient(\n ellipse at center,\n ${"dark"===e.theme.type?e.theme.backgroundColorTertiary:e.theme.backgroundColorPrimary} 0%,\n ${"dark"===e.theme.type?e.theme.backgroundColorPrimary:e.theme.backgroundColorTertiary} 100%)\n `}return"transparent"}};
|
|
173
124
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
125
|
+
background: ${({opaque:e,theme:t})=>{if(e){return`radial-gradient(\n ellipse at center,\n ${"dark"===t.type?t.backgroundColorTertiary:t.backgroundColorPrimary} 0%,\n ${"dark"===t.type?t.backgroundColorPrimary:t.backgroundColorTertiary} 100%)\n `}return"transparent"}};
|
|
126
|
+
|
|
127
|
+
/* TOFIX */
|
|
128
|
+
/* opacity: ${({fadeInTime:e})=>e?"0":"1"};
|
|
129
|
+
animation: ${({isMounted:e,fadeInTime:t})=>e&&t?ir(t):""}; */
|
|
130
|
+
`,sr=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateGeneralTheme:xn.themes.getGeneralTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{stateConfiguration:a,stateGeneralTheme:n}=e,{space:o}=a,{opaque:i,fadeInTime:l}=o,[s,c]=r.useState(!1);return r.useEffect((()=>{c(!0)}),[]),x.default.createElement(lr,{theme:n,opaque:i,isMounted:s,fadeInTime:l,"data-plurid-entity":t.PLURID_ENTITY_SPACE},x.default.createElement(rr,null))})),cr=({size:e})=>{switch(e){case t.SIZES.SMALL:return"5px";case t.SIZES.NORMAL:return"10px";case t.SIZES.LARGE:return"15px";default:return"10px"}},ur=k.default.div`
|
|
131
|
+
background-color: ${({theme:e})=>e.backgroundColorTertiaryAlpha};
|
|
132
|
+
height: ${cr};
|
|
133
|
+
width: ${cr};
|
|
134
|
+
|
|
135
|
+
position: absolute;
|
|
136
|
+
top: 50%;
|
|
137
|
+
left: 50%;
|
|
138
|
+
transform: translateX(-50%) translateY(-50%);
|
|
139
|
+
z-index: 99999;
|
|
140
|
+
border-radius: 100px;
|
|
141
|
+
user-select: none;
|
|
142
|
+
pointer-events: none;
|
|
143
|
+
touch-action: none;
|
|
144
|
+
`,dr=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e),stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{stateGeneralTheme:a,stateConfiguration:n}=e,{space:r}=n,{transformOrigin:o}=r,{show:i,size:l}=o;return i?x.default.createElement(ur,{theme:a,size:l,"data-plurid-entity":t.PLURID_ENTITY_TRANSFORM_ORIGIN}):x.default.createElement(x.default.Fragment,null)}));var fr;!function(e){e.NONE="NONE",e.UNIVERSES="UNIVERSES",e.MORE="MORE"}(fr||(fr={}));const pr=k.default.div`
|
|
145
|
+
bottom: ${({conceal:e,mouseIn:t})=>e?t?"-5px":"-55px":"-5px"};
|
|
146
|
+
pointer-events: ${({showMenu:e})=>e!==fr.NONE?"all":"none"};
|
|
147
|
+
opacity: ${({fadeInTime:e})=>e?"0":"1"};
|
|
148
|
+
animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ir(e):""};
|
|
179
149
|
|
|
180
150
|
display: grid;
|
|
181
151
|
position: absolute;
|
|
@@ -184,12 +154,12 @@
|
|
|
184
154
|
height: 75px;
|
|
185
155
|
z-index: 9999;
|
|
186
156
|
transition: bottom 300ms ease-in-out;
|
|
187
|
-
`,
|
|
188
|
-
color: ${e=>e.
|
|
189
|
-
background-color: ${e=>
|
|
190
|
-
box-shadow: ${e=>e.
|
|
191
|
-
grid-template-columns: ${e=>e
|
|
192
|
-
opacity: ${e=>e
|
|
157
|
+
`,mr=k.default.div`
|
|
158
|
+
color: ${({theme:e})=>e.colorPrimary};
|
|
159
|
+
background-color: ${({theme:e,transparentUI:t})=>t?e.backgroundColorPrimaryAlpha:e.backgroundColorSecondary};
|
|
160
|
+
box-shadow: ${({theme:e})=>e.boxShadowUmbra};
|
|
161
|
+
grid-template-columns: ${({showIcons:e,showTransformButtons:t,documentsBased:a})=>e&&!t?a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))":t?a?"40px 200px 200px 200px 40px 40px":"40px 200px 200px 200px 40px":a?"repeat(6, minmax(min-content, 40px))":"repeat(5, minmax(min-content, 40px))"};
|
|
162
|
+
opacity: ${({opaque:e,mouseIn:t})=>e||t?"1":"0.4"};
|
|
193
163
|
|
|
194
164
|
z-index: 9999;
|
|
195
165
|
user-select: none;
|
|
@@ -217,10 +187,10 @@
|
|
|
217
187
|
right: 0;
|
|
218
188
|
height: 20px;
|
|
219
189
|
}
|
|
220
|
-
`,
|
|
221
|
-
padding: ${e=>e
|
|
222
|
-
background-color: ${e=>e
|
|
223
|
-
min-width: ${e=>e
|
|
190
|
+
`,gr=k.default.div`
|
|
191
|
+
padding: ${({button:e,showIcons:t,showTransformButtons:a})=>e||t&&!a?"0":"0 7px"};
|
|
192
|
+
background-color: ${({active:e,theme:t})=>e?t.backgroundColorTertiary:"transparent"};
|
|
193
|
+
min-width: ${({button:e})=>e?"40px":"70px"};
|
|
224
194
|
|
|
225
195
|
height: 45px;
|
|
226
196
|
display: grid;
|
|
@@ -230,9 +200,9 @@
|
|
|
230
200
|
user-select: none;
|
|
231
201
|
|
|
232
202
|
:hover {
|
|
233
|
-
background: ${e=>e.
|
|
203
|
+
background: ${({theme:e})=>e.backgroundColorTertiary};
|
|
234
204
|
}
|
|
235
|
-
`,
|
|
205
|
+
`,Tr=k.default.div`
|
|
236
206
|
width: 40px;
|
|
237
207
|
display: grid;
|
|
238
208
|
place-content: center;
|
|
@@ -242,7 +212,7 @@
|
|
|
242
212
|
width: 15px;
|
|
243
213
|
fill: white;
|
|
244
214
|
} */
|
|
245
|
-
`,
|
|
215
|
+
`,hr=k.default.div`
|
|
246
216
|
position: absolute;
|
|
247
217
|
bottom: 75px;
|
|
248
218
|
max-height: 250px;
|
|
@@ -261,7 +231,7 @@
|
|
|
261
231
|
padding: 0;
|
|
262
232
|
list-style: none;
|
|
263
233
|
}
|
|
264
|
-
`;
|
|
234
|
+
`;k.default.div`
|
|
265
235
|
display: flex;
|
|
266
236
|
justify-content: space-between;
|
|
267
237
|
align-items: center;
|
|
@@ -270,7 +240,7 @@
|
|
|
270
240
|
margin-bottom: ${e=>e.afterline?"30px":"10px"};
|
|
271
241
|
|
|
272
242
|
${e=>e.afterline?"\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: white;\n }\n ":""};
|
|
273
|
-
`;const
|
|
243
|
+
`;const Er=k.default.div`
|
|
274
244
|
max-height: 210px;
|
|
275
245
|
overflow: scroll;
|
|
276
246
|
padding: 0 5px;
|
|
@@ -285,7 +255,7 @@
|
|
|
285
255
|
h5::first-child {
|
|
286
256
|
margin-top: 0;
|
|
287
257
|
}
|
|
288
|
-
`;
|
|
258
|
+
`;k.default.li`
|
|
289
259
|
margin: 10px 0;
|
|
290
260
|
padding: 10px 20px;
|
|
291
261
|
border-radius: 100px;
|
|
@@ -298,7 +268,7 @@
|
|
|
298
268
|
background-color: ${e=>e.theme.backgroundColorTertiary};
|
|
299
269
|
box-shadow: ${e=>e.active?"inset 0px -1px 6px 0px "+e.theme.boxShadowUmbraColor:e.theme.boxShadowUmbra};
|
|
300
270
|
}
|
|
301
|
-
`;const
|
|
271
|
+
`;const _r=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),activeUniverseID:xn.space.getActiveUniverseID(e)})),(e=>({dispatchSetActiveUniverse:t=>e(Nn.space.setActiveUniverse(t))})),null,{context:yn})((e=>{const{interactionTheme:t,activeUniverseID:a,dispatchSetActiveUniverse:n}=e;return x.default.createElement(hr,{theme:t},x.default.createElement(Er,null))})),Or=k.default.div`
|
|
302
272
|
h5 {
|
|
303
273
|
font-size: 1rem;
|
|
304
274
|
margin: 0;
|
|
@@ -312,7 +282,7 @@
|
|
|
312
282
|
background-color: ${e=>e.transparentUI&&e.mouseOver?e.theme.backgroundColorSecondary:"transparent"};
|
|
313
283
|
box-shadow: ${e=>e.transparentUI&&e.mouseOver?e.theme.boxShadowUmbra:"none"};
|
|
314
284
|
color: ${e=>e.theme.colorPrimary};
|
|
315
|
-
`,
|
|
285
|
+
`,Sr=k.default.div`
|
|
316
286
|
user-select: none;
|
|
317
287
|
cursor: pointer;
|
|
318
288
|
padding: 0.5rem;
|
|
@@ -323,8 +293,8 @@
|
|
|
323
293
|
:hover {
|
|
324
294
|
border-bottom: 1px solid ${e=>e.theme.colorPrimary};
|
|
325
295
|
}
|
|
326
|
-
`,
|
|
327
|
-
`,{typography:{Heading:
|
|
296
|
+
`,Rr=k.default.div`
|
|
297
|
+
`,{typography:{Heading:Ar}}=d.universal,br=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{heading:t,items:a,toggled:n,toggle:o,interactionTheme:i,configuration:l}=e,{global:s}=l,{transparentUI:c}=s,[u,d]=r.useState(!1);return x.default.createElement(Or,{theme:i,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),transparentUI:c,mouseOver:u,toggled:n},x.default.createElement(Sr,{theme:i,onClick:()=>o()},x.default.createElement(Ar,{theme:i,type:"h5"},t)),n&&x.default.createElement(Rr,null,a))})),Cr=k.default.div`
|
|
328
298
|
position: absolute;
|
|
329
299
|
bottom: 75px;
|
|
330
300
|
height: 280px;
|
|
@@ -338,7 +308,7 @@
|
|
|
338
308
|
|
|
339
309
|
background-color: ${e=>e.transparentUI?e.theme.backgroundColorPrimaryAlpha:e.theme.backgroundColorSecondary};
|
|
340
310
|
box-shadow: ${e=>e.theme.boxShadowUmbra};
|
|
341
|
-
`,
|
|
311
|
+
`,Ir=k.default.div`
|
|
342
312
|
display: flex;
|
|
343
313
|
justify-content: space-between;
|
|
344
314
|
align-items: center;
|
|
@@ -349,7 +319,7 @@
|
|
|
349
319
|
margin-bottom: ${e=>e.last?"0":e.afterline?"30px":"10px"};
|
|
350
320
|
|
|
351
321
|
${e=>e.afterline?`\n ::after {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n bottom: -15px;\n height: 1px;\n background-color: ${e.theme?e.theme.colorPrimary:"white"};\n }\n `:""};
|
|
352
|
-
`,
|
|
322
|
+
`,vr=k.default.div`
|
|
353
323
|
height: 240px;
|
|
354
324
|
overflow: scroll;
|
|
355
325
|
padding: 0 5px;
|
|
@@ -364,12 +334,12 @@
|
|
|
364
334
|
h5::first-child {
|
|
365
335
|
margin-top: 0;
|
|
366
336
|
}
|
|
367
|
-
`,{inputs:{Dropdown:ha}}=u.universal,Ra=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(It.configuration.setConfigurationThemeGeneralAction(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(It.configuration.setConfigurationThemeInteractionAction(t)),dispatchSetConfigurationLanguage:t=>e(It.configuration.setConfigurationLanguageAction(t)),dispatchSetGeneralTheme:t=>e(It.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(It.themes.setInteractionTheme(t))})),null,{context:ht})((a=>{const{stateLanguage:o,interactionTheme:r,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=a,T=i.global.theme,[p,E]=n.useState("object"==typeof T?T.general:T),[f,g]=n.useState("object"==typeof T?T.interaction:T);return n.useEffect((()=>{"object"==typeof T?(E(T.general),g(T.interaction)):(E(T),g(T))}),[T]),m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerGlobalGeneralTheme),m.default.createElement(ha,{selectables:Object.keys(_.default),selected:"string"==typeof p?p:"",atSelect:e=>(e=>{l(_.default[e]),c(e)})(e),theme:r,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),m.default.createElement(_a,null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerGlobalInteractionTheme),m.default.createElement(ha,{selectables:Object.keys(_.default),selected:"string"==typeof f?f:"",atSelect:e=>(e=>{s(_.default[e]),u(e)})(e),theme:r,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),m.default.createElement(_a,{last:!0},t.internatiolate(o,e.internationalization.fields.toolbarDrawerGlobalLanguage),m.default.createElement(ha,{selectables:e.internationalization.languages,selected:o,atSelect:e=>{d(e)},theme:r,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:Aa}}=u.universal,Sa=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(It.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(It.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(It.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:ht})((a=>{const{stateLanguage:n,interactionTheme:o,configuration:r,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=a,{transformMultimode:c,transformLocks:u,transformTouch:d}=r.space;return m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),m.default.createElement(Aa,{theme:o,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowRotationX)),m.default.createElement(Aa,{theme:o,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowRotationY)),m.default.createElement(Aa,{theme:o,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),m.default.createElement(Aa,{theme:o,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),m.default.createElement(Aa,{theme:o,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),m.default.createElement(Aa,{theme:o,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformAllowScale)),m.default.createElement(Aa,{theme:o,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),m.default.createElement(_a,{last:!0},m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===e.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),m.default.createElement(Aa,{theme:o,checked:d===e.TRANSFORM_TOUCHES.PAN,atChange:()=>d===e.TRANSFORM_TOUCHES.PAN?l(e.TRANSFORM_TOUCHES.SWIPE):l(e.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:Ia,Switch:Ca,Slider:Ua}}=u.universal,La=o.connect((e=>({interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(It.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(It.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(It.configuration.toggleConfigurationSpaceShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(It.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(It.configuration.setConfigurationSpaceLayoutType(t))})),null,{context:ht})((a=>{const{interactionTheme:n,configuration:o,dispatchSetConfigurationPlaneOpacity:r,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=a,{global:u,space:d,elements:T}=o,{transparentUI:p,language:E}=u,{layout:f,transformOrigin:g}=d,_=e.layoutNames[f.type],{show:O,size:h}=g,R=T.plane.opacity;return m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,t.internatiolate(E,e.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),m.default.createElement(Ca,{checked:p,atChange:()=>i(),exclusive:!0,level:2,theme:n})),m.default.createElement(_a,null,t.internatiolate(E,e.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),m.default.createElement(Ca,{checked:O,atChange:()=>l(),exclusive:!0,level:2,theme:n})),m.default.createElement(_a,null,t.internatiolate(E,e.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),m.default.createElement(Ia,{selectables:["small","normal","large"],selected:h.toLowerCase(),atSelect:t=>{const a=t.toUpperCase();a!==e.SIZES.SMALL&&a!==e.SIZES.NORMAL&&a!==e.SIZES.LARGE||s(a)},heightItems:3,theme:n})),m.default.createElement(_a,null,t.internatiolate(E,e.internationalization.fields.toolbarDrawerSpacePlaneOpacity),m.default.createElement(Ua,{value:R,max:1,min:0,step:.1,defaultValue:100,atChange:e=>r(e),thumbSize:"large",level:2,theme:n})),m.default.createElement(_a,{last:!0},t.internatiolate(E,e.internationalization.fields.toolbarDrawerSpaceLayoutType),m.default.createElement(Ia,{selectables:[...Object.values(e.layoutNames)],selected:_,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:ba}}=u.universal,Pa=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e),viewSize:Lt.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(It.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(It.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(It.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(It.configuration.toggleConfigurationToolbarOpaque())})),null,{context:ht})((a=>{const{stateLanguage:o,interactionTheme:r,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=a,{toolbar:T}=i.elements,{conceal:p,opaque:E,transformIcons:f,transformButtons:g}=T,[_,O]=n.useState(!1);return n.useEffect((()=>{l.width<800?O(!0):O(!1)}),[l.width]),m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),m.default.createElement(ba,{theme:r,checked:E,atChange:()=>d(),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),m.default.createElement(ba,{theme:r,checked:f,atChange:()=>c(),exclusive:!0,level:2})),!_&&m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),m.default.createElement(ba,{theme:r,checked:g,atChange:()=>u(),exclusive:!0,level:2})),m.default.createElement(_a,{last:!0},m.default.createElement("div",null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),m.default.createElement(ba,{theme:r,checked:p,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:Na}}=u.universal,va=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(It.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(It.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(It.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(It.configuration.toggleConfigurationViewcubeConceal())})),null,{context:ht})((a=>{const{stateLanguage:n,interactionTheme:o,configuration:r,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=a,{viewcube:u}=r.elements,{show:d,buttons:T,opaque:p,conceal:E}=u;return m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,{last:!d},m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),m.default.createElement(Na,{theme:o,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),m.default.createElement(Na,{theme:o,checked:T,atChange:()=>l(!T),exclusive:!0,level:2})),m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),m.default.createElement(Na,{theme:o,checked:p,atChange:()=>s(!p),exclusive:!0,level:2})),m.default.createElement(_a,{last:!0},m.default.createElement("div",null,t.internatiolate(n,e.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),m.default.createElement(Na,{theme:o,checked:E,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:wa}}=u.universal,ya=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,stateConfiguration:Ut.getConfiguration(e),stateInteractionTheme:bt.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(It.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:ht})((a=>{const{stateLanguage:o,stateConfiguration:r,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=a,{cullingDistance:s}=r.space,[c,u]=n.useState(s),d=T.useDebouncedCallback((e=>{l(e)}),300);return m.default.createElement(m.default.Fragment,null,m.default.createElement(_a,null,m.default.createElement("div",null,t.internatiolate(o,e.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),m.default.createElement(wa,{theme:i,value:c,atChange:e=>{u(e),d(e)},min:1e3,max:5e3,defaultValue:1500})))})),Da=o.connect((e=>({interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e)})),(e=>({})),null,{context:ht})((a=>{const{interactionTheme:n,configuration:o}=a,{global:r}=o,{language:i}=r;return m.default.createElement(m.default.Fragment,null,e.defaultShortcuts.map(((a,o)=>{const{type:r}=a,l=e.shortcutsNames[r],{name:s,internationalizedKey:c,key:u,modifier:d}=l,T=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",p=t.internatiolate(i,s),E=u,f=c?t.internatiolate(i,E):u;return m.default.createElement(_a,{key:s,theme:n,afterline:"TURN_DOWN"===r||"TOGGLE_ROTATE"===r||"TOGGLE_TRANSLATE"===r,last:o===e.defaultShortcuts.length-1},m.default.createElement("div",null,p),m.default.createElement("div",null,T," ",f))})))})),Ma=[{name:e.internationalization.fields.toolbarDrawerGlobalTitle,drawer:e.TOOLBAR_DRAWERS.GLOBAL,component:m.default.createElement(Ra,null)},{name:e.internationalization.fields.toolbarDrawerTransformTitle,drawer:e.TOOLBAR_DRAWERS.TRANSFORM,component:m.default.createElement(Sa,null)},{name:e.internationalization.fields.toolbarDrawerSpaceTitle,drawer:e.TOOLBAR_DRAWERS.SPACE,component:m.default.createElement(La,null)},{name:e.internationalization.fields.toolbarDrawerToolbarTitle,drawer:e.TOOLBAR_DRAWERS.TOOLBAR,component:m.default.createElement(Pa,null)},{name:e.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:e.TOOLBAR_DRAWERS.VIEWCUBE,component:m.default.createElement(va,null)},{name:e.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:e.TOOLBAR_DRAWERS.TECHNICAL,component:m.default.createElement(ya,null)},{name:e.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:e.TOOLBAR_DRAWERS.SHORTCUTS,component:m.default.createElement(Da,null)}],xa=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,interactionTheme:bt.getInteractionTheme(e),configuration:Ut.getConfiguration(e),toolbarMenuScrollPosition:Pt.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(It.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(It.ui.setUIToolbarScrollPosition(t))})),null,{context:ht})((e=>{const{stateLanguage:a,interactionTheme:o,configuration:r,toolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:u}=r,{transparentUI:d}=c,{toolbar:p}=u,{toggledDrawers:E}=p,f=n.useRef(null),g=T.useDebouncedCallback((e=>{if(f.current){const e=f.current.scrollTop;s(e)}}),100);return n.useEffect((()=>(f.current&&f.current.addEventListener("wheel",g),()=>{f.current&&f.current.removeEventListener("wheel",g)})),[f.current]),n.useEffect((()=>{f.current&&(f.current.scrollTop=i)}),[i,f.current]),m.default.createElement(ga,{theme:o,transparentUI:d},m.default.createElement(Oa,{ref:f},Ma.map((e=>{const{name:n,drawer:o,component:r}=e,i=t.internatiolate(a,n);return m.default.createElement(ma,{key:n,heading:i,items:m.default.createElement(m.default.Fragment,null,r),toggled:E.includes(o),toggle:()=>l(o)})}))))})),Fa=O.default.div`
|
|
337
|
+
`,{inputs:{Dropdown:Pr}}=d.universal,Lr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationThemeGeneralAction:t=>e(Nn.configuration.setConfigurationThemeGeneralAction(t)),dispatchSetConfigurationThemeInteractionAction:t=>e(Nn.configuration.setConfigurationThemeInteractionAction(t)),dispatchSetConfigurationLanguage:t=>e(Nn.configuration.setConfigurationLanguageAction(t)),dispatchSetGeneralTheme:t=>e(Nn.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(Nn.themes.setInteractionTheme(t))})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,dispatchSetGeneralTheme:l,dispatchSetInteractionTheme:s,dispatchSetConfigurationThemeGeneralAction:c,dispatchSetConfigurationThemeInteractionAction:u,dispatchSetConfigurationLanguage:d}=e,f=i.global.theme,[p,m]=r.useState("object"==typeof f?f.general:f),[g,T]=r.useState("object"==typeof f?f.interaction:f);return r.useEffect((()=>{"object"==typeof f?(m(f.general),T(f.interaction)):(m(f),T(f))}),[f]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalGeneralTheme),x.default.createElement(Pr,{selectables:Object.keys(j.default),selected:"string"==typeof p?p:"",atSelect:e=>(e=>{l(j.default[e]),c(e)})(e),theme:o,filterable:!0,heightItems:3,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ir,null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalInteractionTheme),x.default.createElement(Pr,{selectables:Object.keys(j.default),selected:"string"==typeof g?g:"",atSelect:e=>(e=>{s(j.default[e]),u(e)})(e),theme:o,heightItems:3,filterable:!0,width:90,style:{fontSize:"0.8rem"}})),x.default.createElement(Ir,{last:!0},a.internatiolate(n,t.internationalization.fields.toolbarDrawerGlobalLanguage),x.default.createElement(Pr,{selectables:t.internationalization.languages,selected:n,atSelect:e=>{d(e)},theme:o,heightItems:3,width:90,style:{fontSize:"0.8rem"}})))})),{inputs:{Switch:yr}}=d.universal,Ur=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationSpaceTransformMultimode:t=>e(Nn.configuration.toggleConfigurationSpaceTransformMultimode(t)),dispatchSetConfigurationSpaceTransformTouch:t=>e(Nn.configuration.setConfigurationSpaceTransformTouch(t)),dispatchSetConfigurationSpaceTransformLocks:t=>e(Nn.configuration.setConfigurationSpaceTransformLocks(t))})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationSpaceTransformMultimode:i,dispatchSetConfigurationSpaceTransformTouch:l,dispatchSetConfigurationSpaceTransformLocks:s}=e,{transformMultimode:c,transformLocks:u,transformTouch:d}=o.space;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformMultiModeTransform)),x.default.createElement(yr,{theme:r,checked:c,atChange:()=>i(!c),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationX)),x.default.createElement(yr,{theme:r,checked:u.rotationX,atChange:()=>s("rotationX"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowRotationY)),x.default.createElement(yr,{theme:r,checked:u.rotationY,atChange:()=>s("rotationY"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationX)),x.default.createElement(yr,{theme:r,checked:u.translationX,atChange:()=>s("translationX"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationY)),x.default.createElement(yr,{theme:r,checked:u.translationY,atChange:()=>s("translationY"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowTranslationZ)),x.default.createElement(yr,{theme:r,checked:u.translationZ,atChange:()=>s("translationZ"),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformAllowScale)),x.default.createElement(yr,{theme:r,checked:u.scale,atChange:()=>s("scale"),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTransformTouchTransform),": ",d===t.TRANSFORM_TOUCHES.PAN?"pan":"swipe"),x.default.createElement(yr,{theme:r,checked:d===t.TRANSFORM_TOUCHES.PAN,atChange:()=>d===t.TRANSFORM_TOUCHES.PAN?l(t.TRANSFORM_TOUCHES.SWIPE):l(t.TRANSFORM_TOUCHES.PAN),level:2})))})),{inputs:{Dropdown:wr,Switch:Nr,Slider:Dr}}=d.universal,Mr=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfigurationPlaneOpacity:t=>e(Nn.configuration.setConfigurationPlaneOpacity(t)),dispatchToggleConfigurationSpaceTransparentUI:()=>e(Nn.configuration.toggleConfigurationSpaceTransparentUI()),dispatchToggleConfigurationSpaceShowTransformOrigin:()=>e(Nn.configuration.toggleConfigurationSpaceShowTransformOrigin()),dispatchSetConfigurationSpaceTransformOriginSize:t=>e(Nn.configuration.setConfigurationSpaceTransformOriginSize(t)),dispatchSetConfigurationSpaceLayoutType:t=>e(Nn.configuration.setConfigurationSpaceLayoutType(t))})),null,{context:yn})((e=>{const{interactionTheme:n,configuration:r,dispatchSetConfigurationPlaneOpacity:o,dispatchToggleConfigurationSpaceTransparentUI:i,dispatchToggleConfigurationSpaceShowTransformOrigin:l,dispatchSetConfigurationSpaceTransformOriginSize:s,dispatchSetConfigurationSpaceLayoutType:c}=e,{global:u,space:d,elements:f}=r,{transparentUI:p,language:m}=u,{layout:g,transformOrigin:T}=d,h=t.layoutNames[g.type],{show:E,size:_}=T,O=f.plane.opacity;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransparentUserInterface),x.default.createElement(Nr,{checked:p,atChange:()=>i(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceShowTransformOrigin),x.default.createElement(Nr,{checked:E,atChange:()=>l(),exclusive:!0,level:2,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceTransformOriginSize),x.default.createElement(wr,{selectables:["small","normal","large"],selected:_.toLowerCase(),atSelect:e=>{const a=e.toUpperCase();a!==t.SIZES.SMALL&&a!==t.SIZES.NORMAL&&a!==t.SIZES.LARGE||s(a)},heightItems:3,theme:n})),x.default.createElement(Ir,null,a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpacePlaneOpacity),x.default.createElement(Dr,{value:O,max:1,min:0,step:.1,defaultValue:100,atChange:e=>o(e),thumbSize:"large",level:2,theme:n})),x.default.createElement(Ir,{last:!0},a.internatiolate(m,t.internationalization.fields.toolbarDrawerSpaceLayoutType),x.default.createElement(wr,{selectables:[...Object.values(t.layoutNames)],selected:h,atSelect:e=>{const t=e.toUpperCase().replace(/\s/g,"_");c(t)},heightItems:3,theme:n,width:100})))})),{inputs:{Switch:xr}}=d.universal,Fr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e),viewSize:xn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationToolbarConceal:()=>e(Nn.configuration.toggleConfigurationToolbarConceal()),dispatchToggleConfigurationToolbarTransformIcons:()=>e(Nn.configuration.toggleConfigurationToolbarTransformIcons()),dispatchToggleConfigurationToolbarTransformButtons:()=>e(Nn.configuration.toggleConfigurationToolbarTransformButtons()),dispatchToggleConfigurationToolbarOpaque:()=>e(Nn.configuration.toggleConfigurationToolbarOpaque())})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:o,configuration:i,viewSize:l,dispatchToggleConfigurationToolbarConceal:s,dispatchToggleConfigurationToolbarTransformIcons:c,dispatchToggleConfigurationToolbarTransformButtons:u,dispatchToggleConfigurationToolbarOpaque:d}=e,{toolbar:f}=i.elements,{conceal:p,opaque:m,transformIcons:g,transformButtons:T}=f,[h,E]=r.useState(!1);return r.useEffect((()=>{l.width<800?E(!0):E(!1)}),[l.width]),x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarAlwaysOpaque)),x.default.createElement(xr,{theme:o,checked:m,atChange:()=>d(),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformIcons)),x.default.createElement(xr,{theme:o,checked:g,atChange:()=>c(),exclusive:!0,level:2})),!h&&x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarShowTransformArrows)),x.default.createElement(xr,{theme:o,checked:T,atChange:()=>u(),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerToolbarConcealToolbar)),x.default.createElement(xr,{theme:o,checked:p,atChange:()=>s(),exclusive:!0,level:2})))})),{inputs:{Switch:jr}}=d.universal,kr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchToggleConfigurationViewcubeHide:t=>e(Nn.configuration.toggleConfigurationViewcubeHide(t)),dispatchToggleConfigurationViewcubeButtons:t=>e(Nn.configuration.toggleConfigurationViewcubeButtons(t)),dispatchToggleConfigurationViewcubeOpaque:t=>e(Nn.configuration.toggleConfigurationViewcubeOpaque(t)),dispatchToggleConfigurationViewcubeConceal:()=>e(Nn.configuration.toggleConfigurationViewcubeConceal())})),null,{context:yn})((e=>{const{stateLanguage:n,interactionTheme:r,configuration:o,dispatchToggleConfigurationViewcubeHide:i,dispatchToggleConfigurationViewcubeButtons:l,dispatchToggleConfigurationViewcubeOpaque:s,dispatchToggleConfigurationViewcubeConceal:c}=e,{viewcube:u}=o.elements,{show:d,buttons:f,opaque:p,conceal:m}=u;return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,{last:!d},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowViewcube)),x.default.createElement(jr,{theme:r,checked:d,atChange:()=>i(!d),exclusive:!0,level:2})),d&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeShowTransformButtons)),x.default.createElement(jr,{theme:r,checked:f,atChange:()=>l(!f),exclusive:!0,level:2})),x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeAlwaysOpaque)),x.default.createElement(jr,{theme:r,checked:p,atChange:()=>s(!p),exclusive:!0,level:2})),x.default.createElement(Ir,{last:!0},x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerViewcubeConcealViewcube)),x.default.createElement(jr,{theme:r,checked:m,atChange:()=>c(),exclusive:!0,level:2}))))})),{inputs:{Slider:Gr}}=d.universal,Yr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,stateConfiguration:xn.configuration.getConfiguration(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({dispatchSetConfigurationSpaceCullingDistance:t=>e(Nn.configuration.setConfigurationSpaceCullingDistance(t))})),null,{context:yn})((e=>{const{stateLanguage:n,stateConfiguration:o,stateInteractionTheme:i,dispatchSetConfigurationSpaceCullingDistance:l}=e,{cullingDistance:s}=o.space,[c,u]=r.useState(s),d=p.useDebouncedCallback((e=>{l(e)}),300);return x.default.createElement(x.default.Fragment,null,x.default.createElement(Ir,null,x.default.createElement("div",null,a.internatiolate(n,t.internationalization.fields.toolbarDrawerTechnicalCullingDistance)),x.default.createElement(Gr,{theme:i,value:c,atChange:e=>{u(e),d(e)},min:1e3,max:5e3,defaultValue:1500})))})),Br=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({})),null,{context:yn})((e=>{const{interactionTheme:n,configuration:r}=e,{global:o}=r,{language:i}=o;return x.default.createElement(x.default.Fragment,null,t.defaultShortcuts.map(((e,r)=>{const{type:o}=e,l=t.shortcutsNames[o],{name:s,internationalizedKey:c,key:u,modifier:d}=l,f=Array.isArray(d)?d.reduce(((e,t)=>e+" + "+t))+" +":"string"==typeof d?d+" +":"",p=a.internatiolate(i,s),m=u,g=c?a.internatiolate(i,m):u;return x.default.createElement(Ir,{key:s,theme:n,afterline:"TURN_DOWN"===o||"TOGGLE_ROTATE"===o||"TOGGLE_TRANSLATE"===o,last:r===t.defaultShortcuts.length-1},x.default.createElement("div",null,p),x.default.createElement("div",null,f," ",g))})))})),Vr={GLOBAL:{name:t.internationalization.fields.toolbarDrawerGlobalTitle,drawer:t.TOOLBAR_DRAWERS.GLOBAL,component:x.default.createElement(Lr,null)},TRANSFORM:{name:t.internationalization.fields.toolbarDrawerTransformTitle,drawer:t.TOOLBAR_DRAWERS.TRANSFORM,component:x.default.createElement(Ur,null)},SPACE:{name:t.internationalization.fields.toolbarDrawerSpaceTitle,drawer:t.TOOLBAR_DRAWERS.SPACE,component:x.default.createElement(Mr,null)},TOOLBAR:{name:t.internationalization.fields.toolbarDrawerToolbarTitle,drawer:t.TOOLBAR_DRAWERS.TOOLBAR,component:x.default.createElement(Fr,null)},VIEWCUBE:{name:t.internationalization.fields.toolbarDrawerViewcubeTitle,drawer:t.TOOLBAR_DRAWERS.VIEWCUBE,component:x.default.createElement(kr,null)},TECHNICAL:{name:t.internationalization.fields.toolbarDrawerTechnicalTitle,drawer:t.TOOLBAR_DRAWERS.TECHNICAL,component:x.default.createElement(Yr,null)},SHORTCUTS:{name:t.internationalization.fields.toolbarDrawerShortcutsTitle,drawer:t.TOOLBAR_DRAWERS.SHORTCUTS,component:x.default.createElement(Br,null)}},Xr=Object.values(Vr),$r=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,stateInteractionTheme:xn.themes.getInteractionTheme(e),stateConfiguration:xn.configuration.getConfiguration(e),stateToolbarMenuScrollPosition:xn.ui.getToolbarScrollPosition(e)})),(e=>({dispatchToggleConfigurationToolbarToggleDrawer:t=>e(Nn.configuration.toggleConfigurationToolbarToggleDrawer(t)),dispatchSetUIToolbarScrollPosition:t=>e(Nn.ui.setUIToolbarScrollPosition(t))})),null,{context:yn})((e=>{const{stateLanguage:t,stateInteractionTheme:n,stateConfiguration:o,stateToolbarMenuScrollPosition:i,dispatchToggleConfigurationToolbarToggleDrawer:l,dispatchSetUIToolbarScrollPosition:s}=e,{global:c,elements:u}=o,{transparentUI:d}=c,{toolbar:f}=u,{drawers:m,toggledDrawers:g}=f,T=(e=>{if(0===e.length||e.includes("ALL"))return Xr;const t=[];for(const a of e){const e=Vr[a];t.push(e)}return t})(m),h=r.useRef(null),E=p.useDebouncedCallback((e=>{if(h.current){const e=h.current.scrollTop;s(e)}}),100);return r.useEffect((()=>(h.current&&h.current.addEventListener("wheel",E),()=>{h.current&&h.current.removeEventListener("wheel",E)})),[h.current]),r.useEffect((()=>{h.current&&(h.current.scrollTop=i)}),[i,h.current]),x.default.createElement(Cr,{theme:n,transparentUI:d},x.default.createElement(vr,{ref:h},T.map((e=>{const{name:n,drawer:r,component:o}=e,i=a.internatiolate(t,n);return x.default.createElement(br,{key:n,heading:i,items:x.default.createElement(x.default.Fragment,null,o),toggled:g.includes("ALL")||g.includes(r),toggle:()=>l(r)})}))))})),Wr=k.default.div`
|
|
368
338
|
display: grid;
|
|
369
339
|
align-items: center;
|
|
370
340
|
justify-items: center;
|
|
371
341
|
grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
|
|
372
|
-
`,
|
|
342
|
+
`,zr=k.default.div`
|
|
373
343
|
user-select: none;
|
|
374
344
|
cursor: pointer;
|
|
375
345
|
border-radius: 50px;
|
|
@@ -378,28 +348,29 @@
|
|
|
378
348
|
display: grid;
|
|
379
349
|
place-content: center;
|
|
380
350
|
padding: 2px;
|
|
381
|
-
|
|
351
|
+
|
|
352
|
+
background-color: ${({pressed:e,theme:t})=>e?t.backgroundColorTertiary:"initial"};
|
|
382
353
|
|
|
383
354
|
:hover {
|
|
384
|
-
background-color: ${e=>e.
|
|
355
|
+
background-color: ${({theme:e})=>e.backgroundColorTertiary};
|
|
385
356
|
}
|
|
386
|
-
`,
|
|
357
|
+
`,Hr={left:"◀",right:"▶",up:"▲",down:"▼"},Zr=o.connect((e=>({interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{direction:t,transform:a,interactionTheme:n}=e,o=Hr[t],i=r.useRef(null),l=r.useRef(null),[s,c]=r.useState(!1),u=e=>{switch(e.type){case"tap":a(),i.current&&(c(!1),clearInterval(i.current));break;case"press":c(!0),i.current=setInterval((()=>{a()}),30);break;case"pressup":c(!1),i.current&&clearInterval(i.current)}};return r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Un(void 0,void 0,void 0,(function*(){const t=(yield Mn()).default;e=new t(l.current),e.on("tap press pressup",u)})),()=>{e&&e.off("tap press pressup",u)}}),[l.current]),x.default.createElement(zr,{ref:l,theme:n,pressed:s,onMouseLeave:()=>{i.current&&(c(!1),clearInterval(i.current))}},o)})),Kr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({rotateUp:()=>e(Nn.space.rotateUp()),rotateDown:()=>e(Nn.space.rotateDown()),rotateLeft:()=>e(Nn.space.rotateLeft()),rotateRight:()=>e(Nn.space.rotateRight())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,rotateUp:c,rotateDown:u,rotateLeft:d,rotateRight:p}=e;return x.default.createElement(Wr,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"left",transform:()=>p()}),x.default.createElement(Zr,{direction:"up",transform:()=>c()})),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.ROTATION),active:o===t.TRANSFORM_MODES.ROTATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconRotate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformRotate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"down",transform:()=>u()}),x.default.createElement(Zr,{direction:"right",transform:()=>d()})))})),qr=k.default.div`
|
|
387
358
|
display: grid;
|
|
388
359
|
align-items: center;
|
|
389
360
|
justify-items: center;
|
|
390
361
|
grid-template-columns: ${e=>e.showTransformButtons?"30px 60px 30px":"1fr"};
|
|
391
|
-
`,
|
|
362
|
+
`,Qr=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({scaleUp:()=>e(Nn.space.scaleUp()),scaleDown:()=>e(Nn.space.scaleDown())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,scaleUp:c,scaleDown:u}=e;return x.default.createElement(qr,{showTransformButtons:n},n&&x.default.createElement(Zr,{direction:"up",transform:()=>c()}),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.SCALE),active:o===t.TRANSFORM_MODES.SCALE,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconScale,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformScale))),n&&x.default.createElement(Zr,{direction:"down",transform:()=>u()}))})),Jr=k.default.div`
|
|
392
363
|
display: grid;
|
|
393
364
|
align-items: center;
|
|
394
365
|
justify-items: center;
|
|
395
366
|
grid-template-columns: ${e=>e.showTransformButtons?"30px 30px 60px 30px 30px":"1fr"};
|
|
396
|
-
`,
|
|
367
|
+
`,eo=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,interactionTheme:xn.themes.getInteractionTheme(e)})),(e=>({translateUp:()=>e(Nn.space.translateUp()),translateDown:()=>e(Nn.space.translateDown()),translateLeft:()=>e(Nn.space.translateLeft()),translateRight:()=>e(Nn.space.translateRight())})),null,{context:yn})((e=>{const{showTransformButtons:n,showIcons:r,transformMode:o,toggleTransform:i,stateLanguage:l,interactionTheme:s,translateUp:c,translateDown:u,translateLeft:d,translateRight:p}=e;return x.default.createElement(Jr,{showTransformButtons:n},n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"left",transform:()=>d()}),x.default.createElement(Zr,{direction:"up",transform:()=>c()})),x.default.createElement(gr,{theme:s,onClick:()=>i(t.TRANSFORM_MODES.TRANSLATION),active:o===t.TRANSFORM_MODES.TRANSLATION,showIcons:r,showTransformButtons:n,button:r},r?x.default.createElement(Tr,null,x.default.createElement(f.PluridIconTranslate,null)):x.default.createElement(x.default.Fragment,null,a.internatiolate(l,t.internationalization.fields.toolbarTransformTranslate))),n&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Zr,{direction:"down",transform:()=>u()}),x.default.createElement(Zr,{direction:"right",transform:()=>p()})))})),to=o.connect((e=>({configuration:xn.configuration.getConfiguration(e),theme:xn.themes.getInteractionTheme(e),viewSize:xn.space.getViewSize(e)})),(e=>({dispatchToggleConfigurationSpaceFirstPerson:()=>e(Nn.configuration.toggleConfigurationSpaceFirstPerson()),dispatchSetConfigurationSpaceTransformMode:t=>e(Nn.configuration.setConfigurationSpaceTransformMode(t))})),null,{context:yn})((e=>{const{theme:a,configuration:n,viewSize:o,dispatchToggleConfigurationSpaceFirstPerson:i,dispatchSetConfigurationSpaceTransformMode:l}=e,{global:s,elements:c,space:u}=n,{transparentUI:d}=s,{firstPerson:p,transformMode:m,fadeInTime:g}=u,{toolbar:T}=c,{conceal:h,opaque:E,transformIcons:_,transformButtons:O}=T,S=T.show,R=r.useRef(null),[A,b]=r.useState(!1),[C,I]=r.useState(fr.NONE),[v,P]=r.useState(_),[L,y]=r.useState(O),[U,w]=r.useState(!1),N=e=>{C!==fr.NONE&&I(fr.NONE),l(e)};return r.useEffect((()=>{w(!0)}),[]),r.useEffect((()=>{o.width<800&&O&&y(!1),o.width>800&&y(O)}),[o.width]),r.useEffect((()=>{P(_),y(O)}),[_,O]),r.useEffect((()=>(A&&R.current&&clearTimeout(R.current),A||(R.current=setTimeout((()=>{I(fr.NONE)}),400)),()=>{R.current&&clearTimeout(R.current)})),[A]),S?x.default.createElement(pr,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),mouseIn:A,conceal:h,showMenu:C,isMounted:U,fadeInTime:g,"data-plurid-entity":t.PLURID_ENTITY_TOOLBAR},x.default.createElement(mr,{theme:a,showIcons:v,showTransformButtons:L,documentsBased:!1,mouseIn:A,opaque:E,transparentUI:d},x.default.createElement(gr,{theme:a,onClick:()=>i(),active:p,button:!0,showIcons:v,showTransformButtons:L},x.default.createElement(Tr,null,x.default.createElement(f.PluridIconFirstPerson,null))),x.default.createElement(Kr,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(Qr,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(eo,{showTransformButtons:L,showIcons:v,transformMode:m,toggleTransform:N}),x.default.createElement(gr,{theme:a,onClick:()=>{return e=fr.MORE,void(C===e?I(fr.NONE):(l(t.TRANSFORM_MODES.ALL),I(e)));var e},active:C===fr.MORE,button:!0,showIcons:v,showTransformButtons:L},x.default.createElement(Tr,null,x.default.createElement(f.PluridIconMore,null)))),C===fr.UNIVERSES&&x.default.createElement(_r,null),C===fr.MORE&&x.default.createElement($r,null)):x.default.createElement(x.default.Fragment,null)})),ao=k.default.div`
|
|
397
368
|
position: absolute;
|
|
398
369
|
@media (max-width: 800px) {
|
|
399
|
-
top: ${e=>e
|
|
370
|
+
top: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
|
|
400
371
|
}
|
|
401
|
-
bottom: ${e=>e
|
|
402
|
-
right: ${e=>e
|
|
372
|
+
bottom: ${({conceal:e,mouseOver:t})=>e&&!t?"-90px":"0"};
|
|
373
|
+
right: ${({conceal:e,mouseOver:t})=>e&&!t?"-100px":"0"};
|
|
403
374
|
position: absolute;
|
|
404
375
|
user-select: none;
|
|
405
376
|
transition: all 300ms ease-in-out;
|
|
@@ -414,10 +385,13 @@
|
|
|
414
385
|
grid-template-rows: 20px 15px 95px 15px 20px;
|
|
415
386
|
grid-template-columns: 15px 115px 15px 20px;
|
|
416
387
|
|
|
388
|
+
opacity: ${({fadeInTime:e})=>e?"0":"1"};
|
|
389
|
+
animation: ${({fadeInTime:e,isMounted:t})=>t&&e?ir(e):""};
|
|
390
|
+
|
|
417
391
|
:hover {
|
|
418
392
|
opacity: 1;
|
|
419
393
|
}
|
|
420
|
-
`,
|
|
394
|
+
`,no=k.default.div`
|
|
421
395
|
display: grid;
|
|
422
396
|
place-content: center;
|
|
423
397
|
|
|
@@ -425,7 +399,7 @@
|
|
|
425
399
|
* Themed color
|
|
426
400
|
*/
|
|
427
401
|
color: white;
|
|
428
|
-
`,
|
|
402
|
+
`,ro=k.default.div`
|
|
429
403
|
user-select: none;
|
|
430
404
|
font-size: 0.6rem;
|
|
431
405
|
width: 1.2rem;
|
|
@@ -436,9 +410,9 @@
|
|
|
436
410
|
cursor: pointer;
|
|
437
411
|
|
|
438
412
|
:hover {
|
|
439
|
-
background-color: ${e=>e.
|
|
413
|
+
background-color: ${({theme:e})=>e.backgroundColorTertiary};
|
|
440
414
|
}
|
|
441
|
-
`,
|
|
415
|
+
`,oo=k.default.div`
|
|
442
416
|
grid-area: PVFitview;
|
|
443
417
|
display: grid;
|
|
444
418
|
place-content: center;
|
|
@@ -450,7 +424,7 @@
|
|
|
450
424
|
width: 0.8rem;
|
|
451
425
|
fill: white;
|
|
452
426
|
}
|
|
453
|
-
`,
|
|
427
|
+
`,io=k.default.div`
|
|
454
428
|
font-size: 0.6rem;
|
|
455
429
|
position: absolute;
|
|
456
430
|
height: 50px;
|
|
@@ -466,95 +440,88 @@
|
|
|
466
440
|
box-sizing: content-box;
|
|
467
441
|
transition: all 300ms linear;
|
|
468
442
|
|
|
469
|
-
border: 1px solid ${e=>e
|
|
470
|
-
box-shadow: ${e=>"base"===e
|
|
471
|
-
opacity: ${e=>{if(!e
|
|
472
|
-
transform: ${e=>{switch(e
|
|
473
|
-
`,
|
|
443
|
+
border: 1px solid ${({mouseOver:e,theme:t})=>e?t.colorTertiary:t.backgroundColorSecondary};
|
|
444
|
+
box-shadow: ${({face:e,theme:t})=>"base"===e?"0px 0px 12px 2px "+t.boxShadowPenumbraColor:""};
|
|
445
|
+
opacity: ${({opaque:e,mouseOver:t})=>{if(!e){if(t)return"0.8";if(!t)return"0.4"}return"1"}};
|
|
446
|
+
transform: ${({face:e})=>{switch(e){case"front":return"translateZ(25px) rotateY(0deg)";case"back":return"translateZ(-25px) rotateY(-180deg)";case"left":return"translateX(-25px) rotateY(-90deg)";case"right":return"translateX(25px) rotateY(90deg)";case"top":return"translateY(-25px) rotateX(90deg)";case"base":return"translateY(25px) rotateX(-90deg)"}return""}};
|
|
447
|
+
`,lo=k.default.div`
|
|
474
448
|
display: grid;
|
|
475
449
|
place-content: center;
|
|
476
450
|
cursor: pointer;
|
|
477
451
|
pointer-events: all;
|
|
478
452
|
|
|
479
|
-
grid-area: ${e=>`PVF${e
|
|
480
|
-
color: ${e=>
|
|
481
|
-
background-color: ${e=>
|
|
482
|
-
border: 1px solid ${e=>
|
|
453
|
+
grid-area: ${({type:e})=>`PVF${e}`};
|
|
454
|
+
color: ${({theme:e,hovered:t})=>t?e.colorPrimary:e.colorSecondary};
|
|
455
|
+
background-color: ${({theme:e,transparentUI:t,hovered:a,active:n})=>t&&!a?e.backgroundColorPrimaryAlpha:n||a?e.backgroundColorTertiary:e.backgroundColorSecondary};
|
|
456
|
+
border: 1px solid ${({theme:e,transparentUI:t,hovered:a})=>t&&!a?"transparent":a?e.colorTertiary:e.backgroundColorSecondary};
|
|
483
457
|
|
|
484
458
|
:hover {
|
|
485
|
-
background-color: ${e=>e.
|
|
459
|
+
background-color: ${({theme:e})=>e.backgroundColorTertiary};
|
|
486
460
|
}
|
|
487
|
-
`,
|
|
461
|
+
`,so="TopLeft",co="TopCenter",uo="TopRight",fo="MiddleLeft",po="MiddleCenter",mo="MiddleRight",go="BottomLeft",To="BottomCenter",ho="BottomRight",Eo={frontTopLeft:"A1",frontTopCenter:"A2",frontTopRight:"A3",frontMiddleLeft:"B1",frontMiddleCenter:"B2",frontMiddleRight:"B3",frontBottomLeft:"C1",frontBottomCenter:"C2",frontBottomRight:"C3",rightTopLeft:"A3",rightTopCenter:"A4",rightTopRight:"A5",rightMiddleLeft:"B3",rightMiddleCenter:"B4",rightMiddleRight:"B5",rightBottomLeft:"C3",rightBottomCenter:"C4",rightBottomRight:"C5",backTopLeft:"A5",backTopCenter:"A6",backTopRight:"A7",backMiddleLeft:"B5",backMiddleCenter:"B6",backMiddleRight:"B7",backBottomLeft:"C5",backBottomCenter:"C6",backBottomRight:"C7",leftTopLeft:"A7",leftTopCenter:"A8",leftTopRight:"A1",leftMiddleLeft:"B7",leftMiddleCenter:"B8",leftMiddleRight:"B1",leftBottomLeft:"C7",leftBottomCenter:"C8",leftBottomRight:"C1",topTopLeft:"A7",topTopCenter:"A6",topTopRight:"A5",topMiddleLeft:"A8",topMiddleCenter:"D1",topMiddleRight:"A4",topBottomLeft:"A1",topBottomCenter:"A2",topBottomRight:"A3",baseTopLeft:"C1",baseTopCenter:"C2",baseTopRight:"C3",baseMiddleLeft:"C8",baseMiddleCenter:"E1",baseMiddleRight:"C4",baseBottomLeft:"C7",baseBottomCenter:"C6",baseBottomRight:"C5"},_o={A1:{rotateX:-45,rotateY:45},A2:{rotateX:-45,rotateY:0},A3:{rotateX:-45,rotateY:-45},B1:{rotateX:0,rotateY:45},B2:{rotateX:0,rotateY:0},B3:{rotateX:0,rotateY:-45},C1:{rotateX:45,rotateY:45},C2:{rotateX:45,rotateY:0},C3:{rotateX:45,rotateY:-45},A4:{rotateX:-45,rotateY:270.1},A5:{rotateX:-45,rotateY:225},B4:{rotateX:0,rotateY:270.1},B5:{rotateX:0,rotateY:225},C4:{rotateX:45,rotateY:270.1},C5:{rotateX:45,rotateY:225},A6:{rotateX:-45,rotateY:180},A7:{rotateX:-45,rotateY:135},B6:{rotateX:0,rotateY:180.1},B7:{rotateX:0,rotateY:135},C6:{rotateX:45,rotateY:180.1},C7:{rotateX:45,rotateY:135},A8:{rotateX:-45,rotateY:90.1},B8:{rotateX:0,rotateY:90.1},C8:{rotateX:45,rotateY:90.1},D1:{rotateX:-90.1,rotateY:0},E1:{rotateX:90.1,rotateY:0}},Oo=o.connect((e=>({generalTheme:xn.themes.getGeneralTheme(e),interactionTheme:xn.themes.getInteractionTheme(e),configuration:xn.configuration.getConfiguration(e)})),(e=>({dispatchRotateX:t=>e(Nn.space.rotateX(t)),dispatchRotateY:t=>e(Nn.space.rotateY(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t))})),null,{context:yn})((e=>{const{face:t,faceText:a,mouseOver:n,hoveredZone:r,setHoveredZone:o,activeZone:i,setActiveZone:l,generalTheme:s,interactionTheme:c,configuration:u,dispatchRotateX:d,dispatchRotateY:f,dispatchSetAnimatedTransform:p}=e,{global:m,elements:g}=u,{transparentUI:T}=m,h=g.viewcube.opaque,E=e=>{const a=Eo[`${t}${e}`],n=_o[a];l(a),p(!0),d(n.rotateX),f(n.rotateY),setTimeout((()=>{p(!1)}),450)};return x.default.createElement(io,{theme:s,face:t,opaque:h,mouseOver:n},x.default.createElement(lo,{theme:c,type:so,active:i===Eo[`${t}${so}`],hovered:r===Eo[`${t}${so}`],onClick:()=>E(so),onMouseEnter:()=>o(Eo[`${t}${so}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:co,active:i===Eo[`${t}${co}`],hovered:r===Eo[`${t}${co}`],onClick:()=>E(co),onMouseEnter:()=>o(Eo[`${t}${co}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:uo,active:i===Eo[`${t}${uo}`],hovered:r===Eo[`${t}${uo}`],onClick:()=>E(uo),onMouseEnter:()=>o(Eo[`${t}${uo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:fo,active:i===Eo[`${t}${fo}`],hovered:r===Eo[`${t}${fo}`],onClick:()=>E(fo),onMouseEnter:()=>o(Eo[`${t}${fo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:po,active:i===Eo[`${t}${po}`],hovered:r===Eo[`${t}${po}`],onClick:()=>E(po),onMouseEnter:()=>o(Eo[`${t}${po}`]),transparentUI:T},a),x.default.createElement(lo,{theme:c,type:mo,active:i===Eo[`${t}${mo}`],hovered:r===Eo[`${t}${mo}`],onClick:()=>E(mo),onMouseEnter:()=>o(Eo[`${t}${mo}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:go,active:i===Eo[`${t}${go}`],hovered:r===Eo[`${t}${go}`],onClick:()=>E(go),onMouseEnter:()=>o(Eo[`${t}${go}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:To,active:i===Eo[`${t}${To}`],hovered:r===Eo[`${t}${To}`],onClick:()=>E(To),onMouseEnter:()=>o(Eo[`${t}${To}`]),transparentUI:T}),x.default.createElement(lo,{theme:c,type:ho,active:i===Eo[`${t}${ho}`],hovered:r===Eo[`${t}${ho}`],onClick:()=>E(ho),onMouseEnter:()=>o(Eo[`${t}${ho}`]),transparentUI:T}))})),So=k.default.div`
|
|
488
462
|
grid-area: PVModel;
|
|
489
|
-
`,
|
|
463
|
+
`,Ro=k.default.div`
|
|
490
464
|
perspective: 2000px;
|
|
491
465
|
perspective-origin: 50% 50%;
|
|
492
|
-
`,
|
|
466
|
+
`,Ao=k.default.div`
|
|
493
467
|
transform-style: preserve-3d;
|
|
494
468
|
width: 50px;
|
|
495
469
|
height: 50px;
|
|
496
|
-
`,En=o.connect((e=>({stateLanguage:Ut.getConfiguration(e).global.language,spaceRotationX:Lt.getRotationX(e),spaceRotationY:Lt.getRotationY(e),stateAnimatedTransform:Lt.getAnimatedTransform(e),stateTransformTime:Lt.getTransformTime(e)})),(e=>({})),null,{context:ht})((a=>{const{mouseOver:o,stateLanguage:r,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=a,[u,d]=n.useState(""),[T,p]=n.useState("");return n.useEffect((()=>{u||p("")}),[i,l]),m.default.createElement(dn,null,m.default.createElement(Tn,null,m.default.createElement(pn,{suppressHydrationWarning:!0,style:{transform:`\n translateX(32px)\n translateY(23px)\n rotateX(${i}deg)\n rotateY(${l}deg)\n `,transition:o||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},m.default.createElement(un,{face:"front",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeFront),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),m.default.createElement(un,{face:"back",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeBack),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),m.default.createElement(un,{face:"left",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeLeft),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),m.default.createElement(un,{face:"right",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeRight),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),m.default.createElement(un,{face:"top",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeTop),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}),m.default.createElement(un,{face:"base",faceText:t.internatiolate(r,e.internationalization.fields.viewcubeBase),mouseOver:o,hoveredZone:u,setHoveredZone:d,activeZone:T,setActiveZone:p}))))})),fn=o.connect((e=>({stateConfiguration:Ut.getConfiguration(e),stateInteractionTheme:bt.getInteractionTheme(e),stateTransformTime:Lt.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(It.space.rotateXWith(t)),dispatchRotateYWith:t=>e(It.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(It.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(It.space.spaceResetTransform())})),null,{context:ht})((t=>{const{stateConfiguration:a,stateInteractionTheme:o,stateTransformTime:r,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=t,{elements:u}=a,{viewcube:T}=u,{buttons:p,opaque:E,conceal:f}=T,[g,_]=n.useState(!1),O=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),r)};return m.default.createElement(Ha,{onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),onMouseMove:()=>g?null:_(!0),conceal:f,mouseOver:g,"data-plurid-entity":e.PLURID_ENTITY_VIEWCUBE},m.default.createElement(En,{mouseOver:g}),g&&p&&m.default.createElement(m.default.Fragment,null,m.default.createElement(Xa,{style:{gridArea:"PVRotateUp"}},m.default.createElement(za,{theme:o,onClick:()=>O("rotateX",-90.1)},"▲")),m.default.createElement(Xa,{theme:o,style:{gridArea:"PVRotateDown"}},m.default.createElement(za,{theme:o,onClick:()=>O("rotateX",90.1)},"▼")),m.default.createElement(Xa,{theme:o,style:{gridArea:"PVRotateLeft"}},m.default.createElement(za,{theme:o,onClick:()=>O("rotateY",90.1)},"◀")),m.default.createElement(Xa,{theme:o,style:{gridArea:"PVRotateRight"}},m.default.createElement(za,{theme:o,onClick:()=>O("rotateY",-90.1)},"▶")),m.default.createElement(Za,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),r))}},m.default.createElement(d.PluridIconGlobal,null))))})),mn=o.connect((e=>({stateConfiguration:Ut.getConfiguration(e)})),(e=>({})),null,{context:ht})((e=>{const{stateConfiguration:t}=e,{elements:a}=t,{toolbar:n,viewcube:o}=a,r=n.show,i=o.show;return m.default.createElement(m.default.Fragment,null,m.default.createElement(na,null),r&&m.default.createElement($a,null),i&&m.default.createElement(fn,null))})),gn=O.default.div`
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
`,_n=e=>{const{error:t}=e;return m.default.createElement(gn,null,t)},On=o.connect((e=>({stateConfiguration:Ut.getConfiguration(e),stateTransform:Lt.getTransform(e),stateSpaceLoading:Lt.getLoading(e),stateSpaceView:Lt.getView(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(It.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(It.configuration.setConfigurationMicro()),dispatchSpaceSetViewSize:t=>e(It.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(It.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(It.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(It.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(It.space.setSpaceLocation(t)),dispatchSetInitialTree:t=>e(It.space.setInitialTree(t)),dispatchSetTree:t=>e(It.space.setTree(t)),dispatchSetGeneralTheme:t=>e(It.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(It.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(It.space.rotateX(t)),dispatchRotateXWith:t=>e(It.space.rotateXWith(t)),dispatchRotateY:t=>e(It.space.rotateY(t)),dispatchRotateYWith:t=>e(It.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(It.space.translateXWith(t)),dispatchTranslateYWith:t=>e(It.space.translateYWith(t)),dispatchScaleUpWith:t=>e(It.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(It.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(It.space.spaceSetView(t))})),null,{context:ht})((a=>{const{planesRegistrar:o,pubsub:r,stateConfiguration:i,stateTransform:s,stateSpaceView:c,dispatch:u,dispatchSetSpaceLocation:d,dispatchSetAnimatedTransform:T,dispatchSetTransformTime:p,dispatchSetTree:E,dispatchRotateXWith:f,dispatchRotateX:g,dispatchRotateYWith:_,dispatchRotateY:O,dispatchTranslateXWith:h,dispatchTranslateYWith:R,dispatchScaleUpWith:A,dispatchScaleDownWith:S,dispatchSpaceSetViewSize:I,dispatchSpaceSetView:C}=a,U=n.useRef(null),[L,b]=n.useState(r?[r]:[]),P=n.useCallback((t=>{const{transformLocks:a}=i.space;((t,a,n,o)=>{if(l.dom.verifyPathInputElement(a.path))return;const r=!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey);if("KeyF"===a.code&&r)return t(It.configuration.toggleConfigurationSpaceFirstPerson());if(n){if("KeyW"===a.code&&r&&o.translationZ)return t(It.space.viewCameraMoveForward());if("KeyS"===a.code&&r&&o.translationZ)return t(It.space.viewCameraMoveBackward());if("KeyA"===a.code&&r&&o.translationX)return t(It.space.viewCameraMoveLeft());if("KeyA"===a.code&&a.shiftKey&&o.rotationY)return t(It.space.viewCameraTurnLeft());if("KeyD"===a.code&&r&&o.translationX)return t(It.space.viewCameraMoveRight());if("KeyD"===a.code&&a.shiftKey&&o.rotationY)return t(It.space.viewCameraTurnRight());if("KeyQ"===a.code&&r&&o.rotationX)return t(It.space.viewCameraTurnUp());if("KeyZ"===a.code&&r&&o.rotationX)return t(It.space.viewCameraTurnDown());if("KeyE"===a.code&&r&&o.translationY)return t(It.space.viewCameraMoveUp());if("KeyC"===a.code&&r&&o.translationY)return t(It.space.viewCameraMoveDown())}if("KeyR"===a.code&&r)return t(It.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.ROTATION));if("KeyT"===a.code&&r)return t(It.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.TRANSLATION));if("KeyS"===a.code&&r&&!n)return t(It.configuration.setConfigurationSpaceTransformMode(e.TRANSFORM_MODES.SCALE));if("ArrowRight"===a.key){if(a.shiftKey&&o.rotationY)return t(It.space.rotateLeft());if(a.altKey&&o.translationX)return t(It.space.translateRight())}if("ArrowLeft"===a.key){if(a.shiftKey&&o.rotationY)return t(It.space.rotateRight());if(a.altKey&&o.translationX)return t(It.space.translateLeft())}if("ArrowUp"===a.key){if(a.shiftKey&&a.altKey&&o.translationZ)return t(It.space.translateIn());if(a.shiftKey&&!a.altKey&&o.rotationX)return t(It.space.rotateUp());if(a.altKey&&!a.shiftKey&&o.translationY)return t(It.space.translateUp());if(a.metaKey||a.ctrlKey&&o.scale)return t(It.space.scaleUp())}if("ArrowDown"===a.key){if(a.shiftKey&&a.altKey&&o.translationZ)return t(It.space.translateOut());if(a.shiftKey&&!a.altKey&&o.rotationX)return t(It.space.rotateDown());if(a.altKey&&!a.shiftKey&&o.translationY)return t(It.space.translateDown());if(a.metaKey||a.ctrlKey&&o.scale)t(It.space.scaleDown())}})(u,t,i.space.firstPerson,a)}),[i.space.firstPerson,i.space.transformLocks,u]),N=n.useCallback((a=>{const{transformMode:n,transformLocks:o}=i.space,r={rotation:n===e.TRANSFORM_MODES.ROTATION,translation:n===e.TRANSFORM_MODES.TRANSLATION,scale:n===e.TRANSFORM_MODES.SCALE};((e,a,n,o)=>{(a.shiftKey||a.metaKey||a.altKey||a.ctrlKey||n.rotation||n.translation||n.scale)&&a.preventDefault();const r={deltaX:a.deltaX,deltaY:a.deltaY},i=t.direction.getWheelDirection(r);n.rotation&&("left"===i&&o.rotationY&&e(It.space.rotateLeft()),"right"===i&&o.rotationY&&e(It.space.rotateRight()),"up"===i&&o.rotationX&&e(It.space.rotateUp()),"down"===i&&o.rotationX&&e(It.space.rotateDown())),a.shiftKey&&!a.altKey&&("up"===i&&o.rotationX&&e(It.space.rotateUp()),"down"===i&&o.rotationX&&e(It.space.rotateDown()),"left"===i&&o.rotationY&&e(It.space.rotateLeft()),"right"===i&&o.rotationY&&e(It.space.rotateRight())),n.translation&&("up"===i&&o.translationY&&e(It.space.translateDown()),"down"===i&&o.translationY&&e(It.space.translateUp()),"left"===i&&o.translationX&&e(It.space.translateRight()),"right"===i&&o.translationX&&e(It.space.translateLeft())),a.altKey&&a.shiftKey&&("up"===i&&o.translationZ&&e(It.space.translateIn()),"down"===i&&o.translationZ&&e(It.space.translateOut())),a.altKey&&!a.shiftKey&&("up"===i&&o.translationY&&e(It.space.translateDown()),"down"===i&&o.translationY&&e(It.space.translateUp()),"left"===i&&o.translationX&&e(It.space.translateRight()),"right"===i&&o.translationX&&e(It.space.translateLeft())),n.scale&&("down"===i&&o.scale&&e(It.space.scaleUp()),"up"===i&&o.scale&&e(It.space.scaleDown())),(a.metaKey||a.ctrlKey)&&("down"===i&&o.scale&&e(It.space.scaleUp()),"up"===i&&o.scale&&e(It.space.scaleDown()))})(u,a,r,o)}),[u,i.space.transformMode,i.space.transformLocks]),v=n.useCallback((()=>{const e=t.getRegisteredPlanes(o),a=new t.space.tree.Tree({planes:e,configuration:i,view:c}).compute();E(a)}),[c,i]),w=t=>{t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||d(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;T(t.active),t.time?p(t.time):p(450)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;f(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;g(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;_(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;O(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;h(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;R(t)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...c,t];C(a)}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;C([...t])}}),t.subscribe({topic:e.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=c.filter((e=>"string"!=typeof e||e===t));C(a)}})},y=t=>{const a={value:Object.assign({},s),internal:!0};t.publish({topic:e.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),t.publish({topic:e.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:i})},D=t=>{const{transformMode:a}=i.space,{velocity:n,distance:o,direction:r}=t;if(a===e.TRANSFORM_MODES.ALL)return;const l=a===e.TRANSFORM_MODES.ROTATION,s=a===e.TRANSFORM_MODES.TRANSLATION,c=a===e.TRANSFORM_MODES.SCALE;switch(T(!0),r){case 2:l&&_(60*n),s&&h(-1*o);break;case 4:l&&_(60*n),s&&h(o);break;case 8:l&&f(60*n),s&&R(-1*o),c&&A(n);break;case 16:l&&f(60*n),s&&R(o),c&&S(n)}setTimeout((()=>{T(!1)}),450)},M=t=>{const{transformMode:a}=i.space,{velocity:n,distance:o,direction:r}=t;if(a===e.TRANSFORM_MODES.ALL)return;const l=a===e.TRANSFORM_MODES.ROTATION,s=a===e.TRANSFORM_MODES.TRANSLATION,c=a===e.TRANSFORM_MODES.SCALE,u=20*n,d=o/5,T=n/4;switch(r){case 2:l&&_(u),s&&h(-1*d);break;case 4:l&&_(u),s&&h(d);break;case 8:l&&f(u),s&&R(-1*d),c&&A(T);break;case 16:l&&f(u),s&&R(d),c&&S(T)}};n.useEffect((()=>(U.current&&(U.current.addEventListener("keydown",P,{passive:!1}),U.current.addEventListener("wheel",N,{passive:!1})),()=>{U.current&&(U.current.removeEventListener("keydown",P),U.current.removeEventListener("wheel",N))})),[U.current,i.space.transformMode,i.space.firstPerson]),n.useEffect((()=>{const e=l.meta.debounce((()=>{if(U&&U.current){const e=U.current.offsetWidth,t=U.current.offsetHeight;I({width:e,height:t})}}),150);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n.useEffect((()=>(window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)})),[c,i]),n.useEffect((()=>{if("undefined"==typeof window)return;let t;return At(void 0,void 0,void 0,(function*(){const a=(yield Ct()).default,{transformTouch:n}=i.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,U.current&&(t=new a(U.current),t.get("pan").set({direction:a.DIRECTION_ALL}),t.get("swipe").set({direction:a.DIRECTION_ALL}),n===e.TRANSFORM_TOUCHES.PAN?t.on("pan",M):t.on("swipe",D))})),()=>{const{transformTouch:a}=i.space;a===e.TRANSFORM_TOUCHES.PAN?t&&t.off("pan",M):t&&t.off("swipe",D)}}),[U.current,i.space.transformTouch]),n.useEffect((()=>{for(const e of L)w(e)}),[L.length]),n.useEffect((()=>{for(const e of L)y(e)}),[L.length,i,s]),n.useEffect((()=>{v()}),[c]);const x={planesRegistrar:o,registerPubSub:e=>{const t=[...L,e];b(t)}},F=c?m.default.createElement(mn,null):m.default.createElement(_n,{error:"the plurid' application must contain a view"});return m.default.createElement(vt,{ref:U,tabIndex:0,transformMode:i.space.transformMode,"data-plurid-entity":e.PLURID_ENTITY_VIEW},m.default.createElement(Nt,null),m.default.createElement(St.Provider,{value:x},F))}));class hn extends n.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=Ot(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeSubscriber&&this.storeSubscriber()}render(){return m.default.createElement(o.Provider,{store:this.store,context:ht},m.default.createElement(On,Object.assign({},this.props)))}computeStore(){const{view:e,planes:a,configuration:n,precomputedState:o,planesRegistrar:r,id:i,useLocalStorage:l}=this.props;t.registerPlanes(a,r);const s=this.store?this.store.getState():void 0,c=t.state.local.load(this.storeID,l),u=i&&this.context&&this.context.states[i]?this.context.states[i]:void 0;return t.state.compute(e,n,r,s,c,o,u)}subscribeStore(){if(!this.store)return;if("undefined"==typeof localStorage)return;const{useLocalStorage:e}=this.props;e&&(this.storeSubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}hn.contextType=Rt;const Rn=e=>{const{store:t,pluridApplication:a}=e;return m.default.createElement(o.Provider,{store:t,context:ht},m.default.createElement(On,Object.assign({},a)))},An=Ot({}),Sn=e=>m.default.createElement(Rn,{store:An,pluridApplication:Object.assign({},e)}),In=e=>{const{elementID:t,rootID:a,children:n}=e,o=T.usePortal(t,a);return p.createPortal(n,o)},Cn=O.default.div`
|
|
470
|
+
`,{matrixArrayToCSSMatrix:bo,rotateMatrix:Co,multiplyArrayOfMatrices:Io,scaleMatrix:vo,translateMatrix:Po}=a.interaction.matrix,{degToRad:Lo}=a.interaction.quaternion,yo=o.connect((e=>({stateLanguage:xn.configuration.getConfiguration(e).global.language,spaceRotationX:xn.space.getRotationX(e),spaceRotationY:xn.space.getRotationY(e),stateAnimatedTransform:xn.space.getAnimatedTransform(e),stateTransformTime:xn.space.getTransformTime(e)})),(e=>({})),null,{context:yn})((e=>{const{mouseOver:n,stateLanguage:o,spaceRotationX:i,spaceRotationY:l,stateAnimatedTransform:s,stateTransformTime:c}=e,[u,d]=r.useState(""),[f,p]=r.useState("");r.useEffect((()=>{u||p("")}),[i,l]);const m=(()=>{const e=32,t=23,a=0,n=0,r=0,o=0,s=Co(Lo(-i),Lo(-l)),c=Po(e,t,a),u=vo(1),d=Io([c,Io([Po(n,r,o),s,Po(-n,-r,-o)]),u]);return bo(d)})();return x.default.createElement(So,null,x.default.createElement(Ro,null,x.default.createElement(Ao,{suppressHydrationWarning:!0,style:{transform:m,transition:n||s?`transform ${c}ms ease-in-out`:""},onMouseLeave:()=>{d("")}},x.default.createElement(Oo,{face:"front",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeFront),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"back",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBack),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"left",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeLeft),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"right",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeRight),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"top",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeTop),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}),x.default.createElement(Oo,{face:"base",faceText:a.internatiolate(o,t.internationalization.fields.viewcubeBase),mouseOver:n,hoveredZone:u,setHoveredZone:d,activeZone:f,setActiveZone:p}))))})),Uo=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateInteractionTheme:xn.themes.getInteractionTheme(e),stateTransformTime:xn.space.getTransformTime(e)})),(e=>({dispatchRotateXWith:t=>e(Nn.space.rotateXWith(t)),dispatchRotateYWith:t=>e(Nn.space.rotateYWith(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSpaceResetTransform:()=>e(Nn.space.spaceResetTransform())})),null,{context:yn})((e=>{const{stateConfiguration:a,stateInteractionTheme:n,stateTransformTime:o,dispatchRotateXWith:i,dispatchRotateYWith:l,dispatchSetAnimatedTransform:s,dispatchSpaceResetTransform:c}=e,{elements:u,space:d}=a,{viewcube:p}=u,{buttons:m,conceal:g}=p,{fadeInTime:T}=d,h=p.show,[E,_]=r.useState(!1),[O,S]=r.useState(!1),R=(e,t)=>{switch(s(!0),e){case"rotateX":i(t);break;case"rotateY":l(t)}setTimeout((()=>{s(!1)}),o)};return r.useEffect((()=>{S(!0)}),[]),h?x.default.createElement(ao,{onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),onMouseMove:()=>E?null:_(!0),conceal:g,mouseOver:E,isMounted:O,fadeInTime:T,"data-plurid-entity":t.PLURID_ENTITY_VIEWCUBE},x.default.createElement(yo,{mouseOver:E}),E&&m&&x.default.createElement(x.default.Fragment,null,x.default.createElement(no,{style:{gridArea:"PVRotateUp"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateX",-90.1)},"▲")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateDown"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateX",90.1)},"▼")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateLeft"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateY",90.1)},"◀")),x.default.createElement(no,{theme:n,style:{gridArea:"PVRotateRight"}},x.default.createElement(ro,{theme:n,onClick:()=>R("rotateY",-90.1)},"▶")),x.default.createElement(oo,{onClick:e=>{e.ctrlKey||e.metaKey||(s(!0),c(),setTimeout((()=>{s(!1)}),o))}},x.default.createElement(f.PluridIconGlobal,null)))):x.default.createElement(x.default.Fragment,null)})),wo=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>x.default.createElement(x.default.Fragment,null,x.default.createElement(sr,null),x.default.createElement(dr,null),x.default.createElement(to,null),x.default.createElement(Uo,null)))),{getRegisteredPlanes:No}=a.planes,Do=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e),stateTransform:xn.space.getTransform(e),stateTree:xn.space.getTree(e),stateSpaceLoading:xn.space.getLoading(e),stateSpaceView:xn.space.getView(e)})),(e=>({dispatch:e,dispatchSetConfiguration:t=>e(Nn.configuration.setConfiguration(t)),dispatchSetConfigurationMicro:()=>e(Nn.configuration.setConfigurationMicro()),dispatchSpaceSetViewSize:t=>e(Nn.space.setViewSize(t)),dispatchSetSpaceLoading:t=>e(Nn.space.setSpaceLoading(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSetTransformTime:t=>e(Nn.space.setTransformTime(t)),dispatchSetSpaceLocation:t=>e(Nn.space.setSpaceLocation(t)),dispatchSetInitialTree:t=>e(Nn.space.setInitialTree(t)),dispatchSetTree:t=>e(Nn.space.setTree(t)),dispatchSetGeneralTheme:t=>e(Nn.themes.setGeneralTheme(t)),dispatchSetInteractionTheme:t=>e(Nn.themes.setInteractionTheme(t)),dispatchRotateX:t=>e(Nn.space.rotateX(t)),dispatchRotateXWith:t=>e(Nn.space.rotateXWith(t)),dispatchRotateY:t=>e(Nn.space.rotateY(t)),dispatchRotateYWith:t=>e(Nn.space.rotateYWith(t)),dispatchTranslateXWith:t=>e(Nn.space.translateXWith(t)),dispatchTranslateYWith:t=>e(Nn.space.translateYWith(t)),dispatchScaleUpWith:t=>e(Nn.space.scaleUpWith(t)),dispatchScaleDownWith:t=>e(Nn.space.scaleDownWith(t)),dispatchSpaceSetView:t=>e(Nn.space.spaceSetView(t))})),null,{context:yn})((e=>{const{planesRegistrar:n,customPlane:o,planeContext:i,planeContextValue:l,pubsub:c,planeNotFound:u,planeRenderError:d,matchedRoute:f,stateConfiguration:p,stateTransform:m,stateSpaceView:g,stateTree:T,dispatch:h,dispatchSetConfiguration:E,dispatchSetGeneralTheme:_,dispatchSetInteractionTheme:O,dispatchSetSpaceLocation:S,dispatchSetAnimatedTransform:R,dispatchSetTransformTime:A,dispatchSetTree:b,dispatchRotateXWith:C,dispatchRotateX:I,dispatchRotateYWith:v,dispatchRotateY:P,dispatchTranslateXWith:L,dispatchTranslateYWith:y,dispatchScaleUpWith:U,dispatchScaleDownWith:w,dispatchSpaceSetViewSize:N,dispatchSpaceSetView:D}=e,M=r.useRef(null),[F,k]=r.useState(c?[c]:[]),G=r.useCallback((e=>{const{transformLocks:a}=p.space;((e,a,n,r)=>{if(a.defaultPrevented)return;if(s.dom.verifyPathInputElement(a.path))return;const o=!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey);if("KeyF"===a.code&&o)return e(Nn.configuration.toggleConfigurationSpaceFirstPerson());if(n){if("KeyW"===a.code&&o&&r.translationZ)return e(Nn.space.viewCameraMoveForward());if("KeyS"===a.code&&o&&r.translationZ)return e(Nn.space.viewCameraMoveBackward());if("KeyA"===a.code&&o&&r.translationX)return e(Nn.space.viewCameraMoveLeft());if("KeyA"===a.code&&a.shiftKey&&r.rotationY)return e(Nn.space.viewCameraTurnLeft());if("KeyD"===a.code&&o&&r.translationX)return e(Nn.space.viewCameraMoveRight());if("KeyD"===a.code&&a.shiftKey&&r.rotationY)return e(Nn.space.viewCameraTurnRight());if("KeyQ"===a.code&&o&&r.rotationX)return e(Nn.space.viewCameraTurnUp());if("KeyZ"===a.code&&o&&r.rotationX)return e(Nn.space.viewCameraTurnDown());if("KeyE"===a.code&&o&&r.translationY)return e(Nn.space.viewCameraMoveUp());if("KeyC"===a.code&&o&&r.translationY)return e(Nn.space.viewCameraMoveDown())}if("KeyR"===a.code&&o)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.ROTATION));if("KeyT"===a.code&&o)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.TRANSLATION));if("KeyS"===a.code&&o&&!n)return e(Nn.configuration.setConfigurationSpaceTransformMode(t.TRANSFORM_MODES.SCALE));if("ArrowRight"===a.key){if(a.shiftKey&&r.rotationY)return e(Nn.space.rotateLeft());if(a.altKey&&r.translationX)return e(Nn.space.translateRight())}if("ArrowLeft"===a.key){if(a.shiftKey&&r.rotationY)return e(Nn.space.rotateRight());if(a.altKey&&r.translationX)return e(Nn.space.translateLeft())}if("ArrowUp"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(Nn.space.translateIn());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(Nn.space.rotateUp());if(a.altKey&&!a.shiftKey&&r.translationY)return e(Nn.space.translateUp());if(a.metaKey||a.ctrlKey&&r.scale)return e(Nn.space.scaleUp())}if("ArrowDown"===a.key){if(a.shiftKey&&a.altKey&&r.translationZ)return e(Nn.space.translateOut());if(a.shiftKey&&!a.altKey&&r.rotationX)return e(Nn.space.rotateDown());if(a.altKey&&!a.shiftKey&&r.translationY)return e(Nn.space.translateDown());if(a.metaKey||a.ctrlKey&&r.scale)e(Nn.space.scaleDown())}})(h,e,p.space.firstPerson,a)}),[p.space.firstPerson,p.space.transformLocks,h]),Y=r.useCallback((e=>{const{transformMode:a,transformLocks:n}=p.space,r={rotation:a===t.TRANSFORM_MODES.ROTATION,translation:a===t.TRANSFORM_MODES.TRANSLATION,scale:a===t.TRANSFORM_MODES.SCALE};((e,t,a,n)=>{(t.shiftKey||t.metaKey||t.altKey||t.ctrlKey||a.rotation||a.translation||a.scale)&&t.preventDefault();const r={deltaX:t.deltaX,deltaY:t.deltaY},o=Dn.getWheelDirection(r);a.rotation&&("left"===o&&n.rotationY&&e(Nn.space.rotateLeft()),"right"===o&&n.rotationY&&e(Nn.space.rotateRight()),"up"===o&&n.rotationX&&e(Nn.space.rotateUp()),"down"===o&&n.rotationX&&e(Nn.space.rotateDown())),t.shiftKey&&!t.altKey&&("up"===o&&n.rotationX&&e(Nn.space.rotateUp()),"down"===o&&n.rotationX&&e(Nn.space.rotateDown()),"left"===o&&n.rotationY&&e(Nn.space.rotateLeft()),"right"===o&&n.rotationY&&e(Nn.space.rotateRight())),a.translation&&("up"===o&&n.translationY&&e(Nn.space.translateDown()),"down"===o&&n.translationY&&e(Nn.space.translateUp()),"left"===o&&n.translationX&&e(Nn.space.translateRight()),"right"===o&&n.translationX&&e(Nn.space.translateLeft())),t.altKey&&t.shiftKey&&("up"===o&&n.translationZ&&e(Nn.space.translateIn()),"down"===o&&n.translationZ&&e(Nn.space.translateOut())),t.altKey&&!t.shiftKey&&("up"===o&&n.translationY&&e(Nn.space.translateDown()),"down"===o&&n.translationY&&e(Nn.space.translateUp()),"left"===o&&n.translationX&&e(Nn.space.translateRight()),"right"===o&&n.translationX&&e(Nn.space.translateLeft())),a.scale&&("down"===o&&n.scale&&e(Nn.space.scaleUp()),"up"===o&&n.scale&&e(Nn.space.scaleDown())),(t.metaKey||t.ctrlKey)&&("down"===o&&n.scale&&e(Nn.space.scaleUp()),"up"===o&&n.scale&&e(Nn.space.scaleDown()))})(h,e,r,n)}),[h,p.space.transformMode,p.space.transformLocks]),B=(e,t=p)=>{const r=No(n),o=new a.space.tree.Tree({planes:r,configuration:t,view:e}).compute();for(const e of T)for(const[t,a]of o.entries())e.route===a.route&&e.children&&(o[t].children=e.children);b(o)},V=r.useCallback((()=>{B(g)}),[g,p]),X=e=>{const n=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,callback:e=>{if(e.internal)return;const t=a.general.configuration.merge(e,p);"object"==typeof t.global.theme?("string"==typeof t.global.theme.general?_(j.default[t.global.theme.general]):_(t.global.theme.general),"string"==typeof t.global.theme.interaction?O(j.default[t.global.theme.interaction]):O(t.global.theme.interaction)):"string"==typeof t.global.theme&&(_(j.default[t.global.theme]),O(j.default[t.global.theme])),E(t)}}),r=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,callback:e=>{const{value:t,internal:a}=e;a||S(t)}}),o=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM,callback:e=>{const{value:t}=e;R(t.active),t.time?A(t.time):A(450)}}),i=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH,callback:e=>{const{value:t}=e;C(t)}}),l=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO,callback:e=>{const{value:t}=e;I(t)}}),s=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH,callback:e=>{const{value:t}=e;v(t)}}),c=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO,callback:e=>{const{value:t}=e;P(t)}}),u=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH,callback:e=>{const{value:t}=e;L(t)}}),d=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH,callback:e=>{const{value:t}=e;y(t)}}),f=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE,callback:e=>{const{plane:t}=e,a=[...g,t];D(a),B(a)}}),m=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES,callback:e=>{const{view:t}=e;D([...t]),B(t)}}),T=e.subscribe({topic:t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE,callback:e=>{const{plane:t}=e,a=g.filter((e=>"string"!=typeof e||e===t));D(a),B(a)}});return()=>{e.unsubscribe(n,t.PLURID_PUBSUB_TOPIC.CONFIGURATION),e.unsubscribe(r,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM),e.unsubscribe(o,t.PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM),e.unsubscribe(i,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH),e.unsubscribe(l,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO),e.unsubscribe(s,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH),e.unsubscribe(c,t.PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO),e.unsubscribe(u,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH),e.unsubscribe(d,t.PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH),e.unsubscribe(f,t.PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE),e.unsubscribe(m,t.PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES),e.unsubscribe(T,t.PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE)}},$=e=>{const a={value:Object.assign({},m),internal:!0};e.publish({topic:t.PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM,data:a}),e.publish({topic:t.PLURID_PUBSUB_TOPIC.CONFIGURATION,data:Object.assign(Object.assign({},p),{internal:!0})})},W=e=>{const{transformMode:a}=p.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE;switch(R(!0),o){case 2:i&&v(60*n),l&&L(-1*r);break;case 4:i&&v(60*n),l&&L(r);break;case 8:i&&C(60*n),l&&y(-1*r),s&&U(n);break;case 16:i&&C(60*n),l&&y(r),s&&w(n)}setTimeout((()=>{R(!1)}),450)},z=e=>{const{transformMode:a}=p.space;if(a===t.TRANSFORM_MODES.ALL)return;const{velocity:n,distance:r,direction:o}=e,i=a===t.TRANSFORM_MODES.ROTATION,l=a===t.TRANSFORM_MODES.TRANSLATION,s=a===t.TRANSFORM_MODES.SCALE,c=20*n,u=r/5,d=n/4;switch(o){case 2:i&&v(c),l&&L(-1*u);break;case 4:i&&v(c),l&&L(u);break;case 8:i&&C(c),l&&y(-1*u),s&&U(d);break;case 16:i&&C(c),l&&y(u),s&&w(d)}};r.useEffect((()=>(M.current&&(M.current.addEventListener("keydown",G,{passive:!1}),M.current.addEventListener("wheel",Y,{passive:!1})),()=>{M.current&&(M.current.removeEventListener("keydown",G),M.current.removeEventListener("wheel",Y))})),[M.current,p.space.transformMode,p.space.firstPerson]),r.useEffect((()=>{const e=s.meta.debounce((()=>{if(M&&M.current){const e=M.current.offsetWidth,t=M.current.offsetHeight;N({width:e,height:t})}}),150);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),r.useEffect((()=>(window.addEventListener("resize",V),()=>{window.removeEventListener("resize",V)})),[g,p]),r.useEffect((()=>{if("undefined"==typeof window)return;let e;return Un(void 0,void 0,void 0,(function*(){const a=(yield Mn()).default,{transformTouch:n}=p.space;delete a.defaults.cssProps.userSelect,delete a.defaults.cssProps.userDrag,delete a.defaults.cssProps.tapHighlightColor,delete a.defaults.cssProps.touchSelect,M.current&&(e=new a(M.current),e.get("pan").set({direction:a.DIRECTION_ALL}),e.get("swipe").set({direction:a.DIRECTION_ALL}),n===t.TRANSFORM_TOUCHES.PAN?e.on("pan",z):e.on("swipe",W))})),()=>{if(!e)return;const{transformTouch:a}=p.space;a===t.TRANSFORM_TOUCHES.PAN?e.off("pan",z):e.off("swipe",W)}}),[M.current,p.space.transformTouch,p.space.transformMode]),r.useEffect((()=>{const e=e=>{navigator.getGamepads()[e.gamepad.index]},t=e=>{navigator.getGamepads()[e.gamepad.index]};return window.addEventListener("gamepadconnected",e),window.addEventListener("gamepaddisconnected",t),()=>{window.removeEventListener("gamepadconnected",e),window.removeEventListener("gamepaddisconnected",t)}}),[]),r.useEffect((()=>{const e=[];for(const t of F){const a=X(t);e.push(a)}return()=>{for(const t of e)t()}}),[F.length]),r.useEffect((()=>{for(const e of F)$(e)}),[F.length,p,m]);const H={planesRegistrar:n,planeContext:i,planeContextValue:l,customPlane:o,planeNotFound:u,planeRenderError:d,matchedRoute:f,registerPubSub:e=>{const t=[...F,e];k(t)}},Z=0===g.length?x.default.createElement(x.default.Fragment,null):x.default.createElement(wo,null);return x.default.createElement(jn,{ref:M,tabIndex:0,transformMode:p.space.transformMode,"data-plurid-entity":t.PLURID_ENTITY_VIEW},x.default.createElement(Fn,null),x.default.createElement(wn.Provider,{value:H},Z))})),{registerPlanes:Mo}=a.planes;class xo extends r.Component{constructor(e,t){super(e),this.storeID=e.id||"default",this.context=t;const a=this.computeStore();this.store=Ln(a),this.subscribeStore()}componentDidUpdate(){const e=this.computeStore();this.store.dispatch({type:"SET_STATE",payload:e})}componentWillUnmount(){this.storeUnubscriber&&this.storeUnubscriber()}render(){return x.default.createElement(o.Provider,{store:this.store,context:yn},x.default.createElement(Do,Object.assign({},this.props)))}computeStore(){const{view:e,planes:t,configuration:n,precomputedState:r,planesRegistrar:o,id:i,useLocalStorage:l}=this.props;Mo(t,o);const s=this.store?this.store.getState():void 0,c=a.state.local.load(this.storeID,l),u=i&&this.context&&this.context.states[i]?this.context.states[i]:void 0;return a.state.compute(e,n,o,s,c,r,u)}subscribeStore(){this.store&&"undefined"!=typeof localStorage&&this.props.useLocalStorage&&(this.storeUnubscriber=this.store.subscribe((()=>{const e=this.store.getState(),t=JSON.stringify(e);localStorage.setItem("pluridState-"+this.storeID,t)})))}}xo.contextType=Y;const Fo=k.default.div`
|
|
471
|
+
scroll-snap-type: ${e=>{const{alignment:t,snapType:a}=e;return"none"===a?"none":t+" "+a}};
|
|
472
|
+
|
|
473
|
+
flex-direction: ${e=>{const{alignment:t}=e;return"x"===t?"row":"column"}};
|
|
474
|
+
|
|
475
|
+
outline: none;
|
|
476
|
+
overflow: auto;
|
|
477
|
+
/* display: flex; */
|
|
478
|
+
height: 100vh;
|
|
479
|
+
height: -webkit-fill-available;
|
|
480
|
+
width: 100vw;
|
|
481
|
+
`,{resolvePluridRoutePlaneData:jo,Registrar:ko}=a.planes,Go=(e,n,r,o)=>{if(o||"RoutePlane"===(null==e?void 0:e.kind)){const t=o||e;if(!t)return()=>()=>x.default.createElement(x.default.Fragment,null);return Yo(t,n)}if(!e){const e=r.match("/not-found","route");if(e&&"Route"===e.kind){return Go(e,n,r)}return()=>()=>x.default.createElement(x.default.Fragment,null)}const{exterior:i,view:l,planes:c,spaces:u,defaultConfiguration:d,slotted:f,resolver:p}=e.data;p&&p(void 0);const m={value:e.match.value,parameters:e.match.parameters,query:e.match.query};let g;return Qn(i)&&(g=i,g&&(g.displayName="PluridRouteExterior")),!i||!g||l||c||u?l?()=>{const t=new M.default,a=x.default.createElement(xo,{view:l,planesRegistrar:n,configuration:d,pubsub:t,matchedRoute:e});return()=>x.default.createElement(x.default.Fragment,null,g&&x.default.createElement(g,{plurid:m,pubsub:t,spaces:f?[a]:void 0}),!f&&x.default.createElement(x.default.Fragment,null,a))}:(e=>{var n,r,o,i,l,c;if("Route"!==e.kind)return()=>()=>x.default.createElement(x.default.Fragment,null);const u="http",d="localhost:63000",{match:f,data:p}=e,{parameters:m,query:g}=f,T={value:f.value,parameters:m,query:g},{exterior:h,planes:E,spaces:_,slotted:O}=e.data,S=(null===(n=p.multispace)||void 0===n?void 0:n.alignment)||"y",R=(null===(r=p.multispace)||void 0===r?void 0:r.snapType)||"mandatory";let A=()=>x.default.createElement(x.default.Fragment,null);Qn(h)&&(A=h);let b=()=>x.default.createElement(x.default.Fragment,null);const C=[];if(_)for(const e of _){const n=[],r=[];if(e.planes)for(const o of e.planes){const i=jo(o),{component:l}=i,s=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(i.value)].join(t.PLURID_ROUTE_SEPARATOR),c={component:l,route:s};n.push(c),r.push(s)}if(e.universes)for(const o of e.universes){if(o.clusters)for(const i of o.clusters)for(const l of i.planes){const s=jo(l),{component:c}=s,f=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),i.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(i.value),a.utilities.cleanPathElement(s.value)].join(t.PLURID_ROUTE_SEPARATOR),m={component:c,route:f};n.push(m),p.view?p.view.includes(s.value)&&r.push(f):r.push(f)}if(o.planes)for(const i of o.planes){const l=jo(i),{component:s}=l,c=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),o.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(o.value),t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(l.value)].join(t.PLURID_ROUTE_SEPARATOR),f={component:s,route:c};n.push(f),r.push(c)}}const o=new ko,i=x.default.createElement(xo,{key:s.uuid.generate(),id:p.value,planes:n,view:r,configuration:e.configuration,planesRegistrar:o});C.push(i)}if(E){const e=[],n=[];for(const r of E){const o=jo(r),{component:i}=o,l=[u,d,p.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(p.value),t.PLURID_ROUTE_DEFAULT_SPACE,t.PLURID_ROUTE_DEFAULT_UNIVERSE,t.PLURID_ROUTE_DEFAULT_CLUSTER,a.utilities.cleanPathElement(o.value)].join(t.PLURID_ROUTE_SEPARATOR),s={component:i,route:l};e.push(s),p.view?p.view.includes(o.value)&&n.push(l):n.push(l)}const r=x.default.createElement(xo,{key:s.uuid.generate(),id:p.value,planes:e,view:n,configuration:p.defaultConfiguration});C.push(r)}let I,v;return Qn(null===(o=p.multispace)||void 0===o?void 0:o.header)&&(I=null===(i=p.multispace)||void 0===i?void 0:i.header),Qn(null===(l=p.multispace)||void 0===l?void 0:l.footer)&&(v=null===(c=p.multispace)||void 0===c?void 0:c.footer),b=()=>x.default.createElement(Fo,{alignment:S,snapType:R,"data-plurid-entity":t.PLURID_ENTITY_MULTISPACE},I&&x.default.createElement(I,{plurid:T}),C,v&&x.default.createElement(v,{plurid:T})),()=>()=>x.default.createElement(x.default.Fragment,null,h&&x.default.createElement(A,{spaces:O?C:void 0,plurid:T}),(_||E)&&!O&&x.default.createElement(b,null))})(e):()=>()=>x.default.createElement(x.default.Fragment,null,g&&x.default.createElement(g,{plurid:m}))},Yo=(e,t)=>{if(e.match.query.flat){const a=e.match.query.flat.toLowerCase();if("true"===a||"1"===a){const a=t.get(e.match.value);if(a){const e=a.component;if("function"!=typeof e)return()=>()=>x.default.createElement(x.default.Fragment,null);return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(e,null))}}}const{defaultConfiguration:a}=null==e?void 0:e.data;return()=>()=>x.default.createElement(x.default.Fragment,null,x.default.createElement(xo,{view:[e.match.value],planesRegistrar:t,configuration:a}))},{Registrar:Bo}=a.planes,{IsoMatcher:Vo}=a.routing,Xo=e=>{const{routes:a,planes:n,exterior:o,shell:i,static:l,view:c,cleanNavigation:u,notFoundPath:d}=e,f=d||"/not-found",m=((e,t)=>{const a=[];for(const t of e){if(t.planes)for(const e of t.planes){const n=jo(e),r={route:n.link?n.link:n.value.startsWith("/")?n.value:t.value+"/"+n.value,component:n.component};a.push(r)}t.spaces}if(t)for(const e of t){const t=jo(e),n={route:t.value,component:t.component};a.push(n)}return a})(a,n),g=r.useRef(new Bo(m)),T=r.useRef(new Vo({routes:a,routePlanes:n})),h=p.useMounted(),[E,_]=r.useState((e=>e?e.path:"undefined"!=typeof window?window.location.pathname+window.location.search:"/")(l)),[O,S]=r.useState(T.current.match(E,"route")),[R,A]=r.useState(Go(O,g.current,T.current,l&&l.directPlane?T.current.match(l.directPlane,"route"):void 0)),b=e=>{let t;e&&e.detail&&e.detail.path&&!t&&(t=e.detail.path),u&&c&&!t&&(t=c);const a=window.location.pathname;t||(t=a+window.location.search),_(t)};let C;r.useEffect((()=>(window.addEventListener("popstate",b),window.addEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,b),()=>{window.removeEventListener("popstate",b),window.removeEventListener(t.PLURID_ROUTER_LOCATION_CHANGED,b)})),[]),r.useEffect((()=>{if(!h)return;u||location.pathname!==E&&history.pushState(null,"",E);let e=T.current.match(E,"route");if(e&&"RoutePlane"===e.kind){const t=Yo(e,g.current);return S(e),void A(t)}e||(e=T.current.match(f,"route")),S(e),A(Go(e,g.current,T.current))}),[h,E]),r.useEffect((()=>{if(!O)return;if("Route"!==O.kind)return;const e=O.match.value;s.storage.saveState(e,t.PLURID_ROUTER_STORAGE);const a=new CustomEvent(t.PLURID_ROUTER_LOCATION_STORED,{detail:{path:e}});window.dispatchEvent(a)}),[u,O]),Qn(o)&&(C=o,C&&(C.displayName="PluridRouterExterior"));let I=({children:e})=>x.default.createElement(x.default.Fragment,null,e);return Qn(i)&&(I=i,I&&(I.displayName="PluridRouterShell")),x.default.createElement(x.default.Fragment,null,C&&x.default.createElement(C,{matchedRoute:O}),x.default.createElement(I,{matchedRoute:O},x.default.createElement(R,null)))},$o=e=>{const{path:t,directPlane:a,routes:n,planes:r,exterior:o,shell:i,protocol:l,host:s,gateway:c,gatewayQuery:u,gatewayEndpoint:d}=e,f=l||"http",p=s||"localhost:63000";return x.default.createElement(Xo,{routes:n,planes:r,exterior:o,shell:i,static:{path:t,directPlane:a},protocol:f,host:p})};class Wo extends r.Component{constructor(e){super(e),this.properties=e}render(){const{metastate:e,children:t}=this.properties;return x.default.createElement(Y.Provider,{value:e},t)}}Wo.displayName="PluridProvider";const zo={x:0,y:0},Ho=e=>{const{elementID:t,rootID:a,children:n}=e,r=p.usePortal(t,a);return m.createPortal(n,r)},Zo=k.default.div`
|
|
509
482
|
position: absolute;
|
|
510
483
|
min-width: 600px;
|
|
511
484
|
min-height: 300px;
|
|
512
485
|
z-index: 99999;
|
|
513
486
|
|
|
514
|
-
top: ${e=>e.
|
|
515
|
-
left: ${e=>e.
|
|
516
|
-
background-color: ${e=>e.
|
|
517
|
-
box-shadow: ${e=>e.
|
|
518
|
-
`,
|
|
487
|
+
top: ${({linkCoordinates:e})=>e.y+"px"};
|
|
488
|
+
left: ${({linkCoordinates:e})=>e.x+5+"px"};
|
|
489
|
+
background-color: ${({theme:e})=>e.backgroundColorSecondary};
|
|
490
|
+
box-shadow: ${({theme:e})=>e.boxShadowUmbra};
|
|
491
|
+
`,{getPlanesRegistrar:Ko}=a.planes,qo=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{planeID:t,linkCoordinates:a,stateGeneralTheme:n}=e,o=r.useContext(wn);if(!o)return x.default.createElement(x.default.Fragment,null);const{planesRegistrar:i}=o,l=Ko(i);if(!l)return x.default.createElement(x.default.Fragment,null);const s=l.get(t);if(!s)return x.default.createElement(x.default.Fragment,null);const c=s.component;return"function"!=typeof c?x.default.createElement(x.default.Fragment,null):x.default.createElement(Zo,{theme:n,linkCoordinates:a},x.default.createElement(c,null))})),Qo=k.default.a`
|
|
519
492
|
/**
|
|
520
493
|
* Forces element to go to the second row if inlined.
|
|
521
494
|
*/
|
|
522
495
|
display: inline-block;
|
|
523
496
|
|
|
524
497
|
cursor: pointer;
|
|
525
|
-
color: ${e=>e.
|
|
498
|
+
color: ${({theme:e})=>e.colorTertiary};
|
|
526
499
|
|
|
527
500
|
:hover {
|
|
528
|
-
color: ${e=>e.
|
|
501
|
+
color: ${({theme:e})=>e.colorPrimary};
|
|
529
502
|
}
|
|
530
503
|
|
|
531
504
|
::after {
|
|
532
|
-
content: "${e=>e
|
|
505
|
+
content: "${({devisible:e,suffix:t})=>e?"":t||"'"}";
|
|
533
506
|
}
|
|
534
|
-
`,{
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
flex-direction: ${e=>{const{alignment:t}=e;return"x"===t?"row":"column"}};
|
|
538
|
-
|
|
539
|
-
outline: none;
|
|
540
|
-
overflow: auto;
|
|
541
|
-
display: flex;
|
|
542
|
-
height: 100vh;
|
|
543
|
-
height: -webkit-fill-available;
|
|
544
|
-
width: 100vw;
|
|
545
|
-
`,yn=a=>{var n,o,r,i;const{matchedRoute:s,protocol:c,host:u,indexedPlanes:d,staticRender:T}=a,{path:p,parameters:E,query:f}=s,g={path:{parameters:E,query:f}},{exterior:_,planes:O,spaces:h,slotted:R}=p,A=(null===(n=p.multispace)||void 0===n?void 0:n.alignment)||"y",S=(null===(o=p.multispace)||void 0===o?void 0:o.snapType)||"mandatory";let I=()=>m.default.createElement(m.default.Fragment,null);if(_)switch(_.kind){case"elementql":break;case"react":I=_.element}let C=()=>m.default.createElement(m.default.Fragment,null);const U=[];if(h)for(const a of h){const n=[],o=[];if(a.planes)for(const r of a.planes){const{component:i}=r,l=[c,u,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(r.value)].join(e.PLURID_ROUTE_SEPARATOR);if("react"===i.kind){const e={component:{kind:"react",element:i.element,properties:{plurid:g}},route:l};n.push(e),o.push(l)}}if(a.universes)for(const r of a.universes){if(r.clusters)for(const i of r.clusters)for(const l of i.planes){const{component:s}=l,d=[c,u,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),r.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(r.value),i.value===e.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?e.PLURID_ROUTE_DEFAULT_CLUSTER:t.utilities.cleanPathElement(i.value),t.utilities.cleanPathElement(l.value)].join(e.PLURID_ROUTE_SEPARATOR);if("react"===s.kind){const e={component:{kind:"react",element:s.element,properties:{plurid:g}},route:d};n.push(e),p.view?p.view.includes(l.value)&&o.push(d):o.push(d)}}if(r.planes)for(const i of r.planes){const{component:l}=i,s=[c,u,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),a.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(a.value),r.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(r.value),e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(i.value)].join(e.PLURID_ROUTE_SEPARATOR);if("react"===l.kind){const e={component:{kind:"react",element:l.element,properties:{plurid:g}},route:s};n.push(e),o.push(s)}}}const r=new t.PluridPlanesRegistrar,i=m.default.createElement(hn,{key:l.uuid.generate(),id:p.value,planes:n,indexedPlanes:d,view:o,static:T,configuration:a.configuration,planesRegistrar:r});U.push(i)}if(O){const a=[],n=[];for(const o of O){const{component:r}=o,i=[c,u,p.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(p.value),e.PLURID_ROUTE_DEFAULT_SPACE,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(o.value)].join(e.PLURID_ROUTE_SEPARATOR);if("react"===r.kind){const e={component:{kind:"react",element:r.element,properties:{plurid:g}},route:i};a.push(e),p.view?p.view.includes(o.value)&&n.push(i):n.push(i)}}const o=new Map,r=m.default.createElement(hn,{key:l.uuid.generate(),id:p.value,planes:a,indexedPlanes:d,planesProperties:o,view:n,static:T,configuration:p.defaultConfiguration});U.push(r)}let L,b;if(null===(r=p.multispace)||void 0===r?void 0:r.header){const e=p.multispace.header;"react"===e.kind&&(L=e.element)}if(null===(i=p.multispace)||void 0===i?void 0:i.footer){const e=p.multispace.footer;"react"===e.kind&&(b=e.element)}C=()=>m.default.createElement(wn,{alignment:A,snapType:S,"data-plurid-entity":e.PLURID_ENTITY_MULTISPACE},L&&m.default.createElement(L,null),U,b&&m.default.createElement(b,null));return m.default.createElement(m.default.Fragment,null,_&&m.default.createElement(I,{spaces:R?U:void 0,plurid:g}),(h||O)&&!R&&m.default.createElement(C,null))},Dn=(e,a,n)=>{const o=new Map;for(const r of e){if(r.planes)for(const e of r.planes){const i="/"===r.value?"p":t.utilities.cleanPathElement(r.value),l="s",s="u",c="c",u=t.utilities.cleanPathElement(e.value),d=[a,n,i,l,s,c,u].join("://"),T={protocol:a,host:n,path:i,space:l,universe:s,cluster:c,plane:u,component:e.component,route:d};o.set(d,T)}if(r.spaces){for(const e of r.spaces)if(e.universes)for(const i of e.universes)if(i.clusters)for(const l of i.clusters)for(const s of l.planes){const c="/"===r.value?"p":t.utilities.cleanPathElement(r.value),u="default"===e.value?"s":t.utilities.cleanPathElement(e.value),d="default"===i.value?"u":t.utilities.cleanPathElement(i.value),T="default"===l.value?"c":t.utilities.cleanPathElement(l.value),p=t.utilities.cleanPathElement(s.value),E=[a,n,c,u,d,T,p].join("://"),f={protocol:a,host:n,path:c,space:u,universe:d,cluster:T,plane:p,component:s.component,route:E};o.set(E,f)}}else{const e="/"===r.value?"p":t.utilities.cleanPathElement(r.value),i=[a,n,e].join("://"),l={protocol:a,host:n,path:e,space:"",universe:"",cluster:"",plane:"",component:r.exterior||{kind:"react",element:()=>m.default.createElement(m.default.Fragment,null)},route:i};o.set(i,l)}}return o},Mn=(a,n,o,r,i,l,s)=>{const c=r===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(r),u=i===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(i),d=l===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(l),T=s===e.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?e.PLURID_ROUTE_DEFAULT_CLUSTER:t.utilities.cleanPathElement(s),p=t.utilities.cleanPathElement(a.value),E=[n,o,c,u,d,T,p].join(e.PLURID_ROUTE_SEPARATOR);return{id:E,indexedPlane:{protocol:n,host:o,path:c,space:u,universe:d,cluster:T,plane:p,route:E,component:a.component}}},xn=(t,a,n)=>{const o=[],r=t.planes||[];for(const i of r){const{id:r,indexedPlane:l}=Mn(i,a,n,t.value,e.PLURID_ROUTE_DEFAULT_SPACE,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER);o.push({id:r,indexedPlane:l})}if(!t.spaces)return o;for(const r of t.spaces){const i=r.planes||[];for(const l of i){const{id:i,indexedPlane:s}=Mn(l,a,n,t.value,r.value,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER);o.push({id:i,indexedPlane:s})}if(r.universes)for(const i of r.universes){const l=i.planes||[];for(const s of l){const{id:l,indexedPlane:c}=Mn(s,a,n,t.value,r.value,i.value,e.PLURID_ROUTE_DEFAULT_CLUSTER);o.push({id:l,indexedPlane:c})}if(i.clusters)for(const e of i.clusters)for(const l of e.planes){const{id:s,indexedPlane:c}=Mn(l,a,n,t.value,r.value,i.value,e.value);o.push({id:s,indexedPlane:c})}}}return o},Fn=t.router.default,Gn=t.router.URLRouter,jn=a=>{const{routes:o,exterior:r,shell:i,view:s,cleanNavigation:c,protocol:u,host:d,gatewayPath:T,gatewayExterior:p,notFoundPath:E,api:f,static:g}=a,_=E||"/not-found",O=T||"/gateway",h=u||window.location.protocol.replace(":",""),R=d||window.location.host,A=n.useRef(new Map),S=n.useRef({}),I=n.useRef(o.map((e=>{S.current[e.value]=Object.assign({},e);const{value:t,parameters:a}=e;return{value:t,parameters:a}}))),C=n.useRef(new Gn(I.current)),U=n.useRef(new Fn(o)),L="undefined"!=typeof window?window.location.pathname:"",b=U.current.match((null==g?void 0:g.path)||L),P=b||U.current.match("/not-found"),N=Dn(o,h,R),v=yn({matchedRoute:P,protocol:h,host:R,indexedPlanes:N}),[w,y]=n.useState(),[D,M]=n.useState(v);n.useState({path:g?g.path:""});const x=()=>{const{Component:a,gatewayRoute:n}=(a=>{const{queryString:n,routes:o,gatewayPath:r,gatewayExterior:i,protocol:l,host:s,indexedPlanes:c}=a,u=t.router.extractQuery(n),d=[];if(u.plurid&&d.push(u.plurid),u.plurids){const e=u.plurids.split(",");d.push(...e)}const T=[],p=[];for(const a of o){if(a.spaces){const n=a.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(a.value);for(const o of a.spaces){const a=o.value===e.PLURID_ROUTE_DEFAULT_SPACE_VALUE?e.PLURID_ROUTE_DEFAULT_SPACE:t.utilities.cleanPathElement(o.value);if(o.universes)for(const r of o.universes){const o=r.value===e.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?e.PLURID_ROUTE_DEFAULT_UNIVERSE:t.utilities.cleanPathElement(r.value);if(r.clusters)for(const i of r.clusters){const r=i.value===e.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?e.PLURID_ROUTE_DEFAULT_CLUSTER:t.utilities.cleanPathElement(i.value);for(const c of i.planes){const{component:i,value:u}=c,E=[l,s,n,a,o,r,t.utilities.cleanPathElement(u)].join(e.PLURID_ROUTE_SEPARATOR);for(const e of d)if(e===E&&"react"===i.kind){const e={component:{kind:"react",element:i.element},route:E};T.push(e),p.push(E)}}}if(r.planes)for(const i of r.planes){const{component:r,value:c}=i,u=t.utilities.cleanPathElement(c),E=[l,s,n,a,o,e.PLURID_ROUTE_DEFAULT_CLUSTER,u].join(e.PLURID_ROUTE_SEPARATOR);for(const e of d)if(e===E&&"react"===r.kind){const e={component:{kind:"react",element:r.element},route:E};T.push(e),p.push(E)}}}if(o.planes)for(const r of o.planes){const{component:o,value:i}=r,c=t.utilities.cleanPathElement(i),u=[l,s,n,a,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,c].join(e.PLURID_ROUTE_SEPARATOR);for(const e of d)if(e===u&&"react"===o.kind){const e={component:{kind:"react",element:o.element},route:u};T.push(e),p.push(u)}}}}if(a.planes)for(const n of a.planes){const{component:o}=n,r=[l,s,a.value===e.PLURID_ROUTE_DEFAULT_PATH_VALUE?e.PLURID_ROUTE_DEFAULT_PATH:t.utilities.cleanPathElement(a.value),e.PLURID_ROUTE_DEFAULT_SPACE,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER,t.utilities.cleanPathElement(n.value)].join(e.PLURID_ROUTE_SEPARATOR);if("react"===o.kind){const e={component:{kind:"react",element:o.element},route:r};T.push(e),p.push(r)}}}let E=()=>m.default.createElement(m.default.Fragment,null);if(i)switch(i.kind){case"react":E=i.element}return{Component:m.default.createElement(m.default.Fragment,null,m.default.createElement(E,null),m.default.createElement(hn,{planes:T,indexedPlanes:c,view:p})),gatewayRoute:{path:{value:r||"gateway"},pathname:"",fragments:{elements:[],texts:[]},parameters:{},query:{},route:""}}})({queryString:window.location.search,routes:o,gatewayPath:O,gatewayExterior:p,protocol:h,host:R,indexedPlanes:A.current});M(a),y(n)},F=t=>{var a;const n=window.location.pathname;if(!t&&n===O)return void x();const o=t&&(null===(a=t.detail)||void 0===a?void 0:a.path)?t.detail.path:c&&s?s:n+window.location.search,r=U.current.match(o);C.current.match(o),r?(t=>{y(t),c||window.location.pathname!==t.route&&history.pushState(null,"",t.route),l.storage.saveState(t.path.value,"__PLURID_ROUTER__");const a=new CustomEvent(e.PLURID_ROUTER_LOCATION_STORED,{detail:{path:t.path.value}});window&&window.dispatchEvent(a);const n=yn({matchedRoute:t,protocol:h,host:R,indexedPlanes:A.current});M(n)})(r):(()=>{const e=U.current.match(_);if(e){y(e);const t=yn({matchedRoute:e,protocol:h,host:R,indexedPlanes:A.current});t&&M(t)}})()};n.useEffect((()=>{window.location.pathname!==O?F():x()}),[]),n.useEffect((()=>(window.addEventListener("popstate",F),window.addEventListener(e.PLURID_ROUTER_LOCATION_CHANGED,F),()=>{window.removeEventListener("popstate",F),window.removeEventListener(e.PLURID_ROUTER_LOCATION_CHANGED,F)})),[]),n.useEffect((()=>{for(const a of o){if(!a.spaces){if(a.planes){for(const t of a.planes){const{id:n,indexedPlane:o}=Mn(t,h,R,a.value,e.PLURID_ROUTE_DEFAULT_SPACE,e.PLURID_ROUTE_DEFAULT_UNIVERSE,e.PLURID_ROUTE_DEFAULT_CLUSTER);A.current.set(n,o)}continue}{const e="/"===a.value?"p":t.utilities.cleanPathElement(a.value),n=[h,R,e].join("://"),o=l.uuid.generate(),r={protocol:h,host:R,path:e,space:"",universe:"",cluster:"",plane:"",component:a.exterior||{kind:"react",element:()=>m.default.createElement(m.default.Fragment,null)},route:n};A.current.set(o,r);continue}}const n=xn(a,h,R);for(const e of n){const{id:t,indexedPlane:a}=e;A.current.set(t,a)}}}),[o]);let G=()=>m.default.createElement(m.default.Fragment,null);r&&"react"===r.kind&&(G=r.element,G.displayName="PluridRouterExterior");let j=({children:e})=>m.default.createElement(m.default.Fragment,null,e);return i&&"react"===i.kind&&(j=i.element,j.displayName="PluridRouterShell"),m.default.createElement(m.default.Fragment,null,m.default.createElement(G,{matchedRoute:P||w}),m.default.createElement(j,{matchedRoute:P||w},D?m.default.createElement(m.default.Fragment,null,D):m.default.createElement(m.default.Fragment,null)))},kn=e=>{const{path:t,routes:a,exterior:n,shell:o,protocol:r,host:i,gateway:l,gatewayQuery:s,gatewayEndpoint:c}=e,u=r||"http",d=i||"localhost:63000";return m.default.createElement(jn,{routes:a,exterior:n,shell:o,static:{path:t},protocol:u,host:d})},Vn=t=>{if(!CustomEvent||!window)return;const a=new CustomEvent(e.PLURID_ROUTER_LOCATION_CHANGED,{detail:{path:t}});window.dispatchEvent(a)},Wn=O.default.a`
|
|
546
|
-
`,Yn=O.default.div`
|
|
507
|
+
`,{resolveRoute:Jo,computePlaneAddress:ei}=a.routing,{getPlanesRegistrar:ti,getPluridPlaneIDByData:ai}=a.planes,{degToRad:ni,radToDeg:ri}=a.interaction.quaternion,{multiplyMatrices:oi,translateMatrix:ii,rotateYMatrix:li}=a.interaction.transform.general,{getTransformRotate:si,getTransformTranslate:ci,getTransformScale:ui}=a.interaction.transform.matrix3d;var di=o.connect((e=>({stateTree:xn.space.getTree(e),stateGeneralTheme:xn.themes.getGeneralTheme(e),stateConfiguration:xn.configuration.getConfiguration(e),stateViewSize:xn.space.getViewSize(e)})),(e=>({dispatchSetTree:t=>e(Nn.space.setTree(t)),dispatchSetAnimatedTransform:t=>e(Nn.space.setAnimatedTransform(t)),dispatchSetTransform:t=>e(Nn.space.setTransform(t)),dispatchSetSpaceField:t=>e(Nn.space.setSpaceField(t)),dispatchUpdateSpaceLinkCoordinates:t=>e(Nn.space.updateSpaceLinkCoordinates(t))})),null,{context:yn})((e=>{const{children:n,route:o,devisible:i,suffix:l,atClick:s,style:c,className:u,stateTree:d,stateGeneralTheme:f,stateConfiguration:p,stateViewSize:m,dispatchSetTree:g,dispatchSetAnimatedTransform:T,dispatchSetTransform:h,dispatchSetSpaceField:E,dispatchUpdateSpaceLinkCoordinates:_}=e,O=p.elements.plane.controls.show,S=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_IN,R=t.PLURID_DEFAULT_CONFIGURATION_LINK_PREVIEW_FADE_OUT,A=ei(o),b=Jo(A,p.network.protocol,p.network.host),C=null!=l?l:t.PLURID_DEFAULT_CONFIGURATION_LINK_SUFFIX,I=null!=i&&i,v=r.useContext(wn);if(!v)return x.default.createElement(x.default.Fragment,null,n);const{planesRegistrar:P}=v,L=ti(P);if(!L)return x.default.createElement(x.default.Fragment,null,n);const y=r.useRef(null),U=r.useRef(null),w=r.useRef(null),[N,D]=r.useState(!1),[M,F]=r.useState(!1),[j,k]=r.useState(!1),[G,Y]=r.useState(""),[B,V]=r.useState(""),[X,$]=r.useState(""),[W,z]=r.useState(zo),H=()=>{const e=y.current;if(!e)return Object.assign({},zo);let t=0,a=0,n=!1,r=e,o=!0,i=0,l=0;for(;o;)if("static"!==window.getComputedStyle(r).position||n||(t+=r.offsetTop,a+=r.offsetLeft,n=!0),"relative"===window.getComputedStyle(r).position&&(i+=t,l+=a,t=0,a=0,n=!1),r.scrollLeft&&(l+=-r.scrollLeft),r.scrollTop&&(i+=-r.scrollTop),r.parentElement){"PluridPlane"===r.parentElement.dataset.pluridEntity&&(o=!1),r=r.parentElement}else o=!1;const s=O?56:0;return{x:l+e.offsetWidth,y:i+s}},Z=(e,t)=>{if(!t)return;if(j)return;if(e.altKey||e.metaKey)return;const{location:a}=t,{translateX:n,translateY:r,translateZ:o,rotateY:i}=a,l=i<100?1:-1,s=i<100?-1:1,c=i<100?200:0,u=`matrix3d(${oi(oi(oi(ii(-n,-r,l*o),li(ni(i))),ii(n,r,s*o)),ii(-(n+c),-r,l*o)).flat().join(",")})`,d=si(u),f=ci(u),p=ui(u);T(!0),E({field:"transform",value:u}),h({translationX:f.translateX,translationY:f.translateY,translationZ:f.translateZ,rotationX:ri(d.rotateX),rotationY:-1*ri(d.rotateY),scale:p.scale}),setTimeout((()=>{T(!1)}),500)},K=e=>{j||B?(e=>{const{updatedTree:t,updatedPlane:n}=a.space.tree.logic.togglePlaneFromTree(d,B);Z(e,n),g(t),k((e=>!e)),F(!1)})(e):(e=>{if(!X||!b)return;const{route:t}=b,n=H(),{pluridPlaneID:r,updatedTree:o,updatedTreePlane:i}=a.space.tree.logic.updateTreeWithNewPlane(t,X,n,d,L.getAll(),p);r&&(Z(e,i),g(o),k(!0),V(r))})(e)},q=r.useCallback((e=>{e.preventDefault(),void 0!==s&&s(e),K(e)}),[y.current,d]);return r.useEffect((()=>{const e=ai(y.current);$(e);const t=H();z(t)}),[]),r.useEffect((()=>(N&&w.current&&(U.current=setTimeout((()=>{F(!0)}),S),clearTimeout(w.current)),N||(w.current=setTimeout((()=>{F(!1),U.current&&clearTimeout(U.current)}),R)),()=>{w.current&&clearTimeout(w.current),U.current&&clearTimeout(U.current)})),[N]),r.useEffect((()=>{}),[]),x.default.createElement(Qo,{ref:y,onClick:e=>q(e),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),theme:f,suffix:C,devisible:I,style:Object.assign({},c),className:u,"data-plurid-entity":t.PLURID_ENTITY_LINK},n,M&&!j&&x.default.createElement(Ho,{elementID:`preview-${X}`,rootID:X},x.default.createElement(qo,{planeID:G,linkCoordinates:W})))}));const fi=k.default.a`
|
|
508
|
+
`,pi=k.default.div`
|
|
547
509
|
cursor: pointer;
|
|
548
|
-
`,
|
|
510
|
+
`,mi=e=>{const{route:t,children:n,asAnchor:r,style:o,className:i,atClick:l}=e,s={onClick:e=>{if(l){if(l(e))return}e.preventDefault(),a.pluridRouterNavigate(t)},style:o,className:i};return null==r||r?x.default.createElement(fi,Object.assign({href:t},s),n):x.default.createElement(pi,Object.assign({},s),n)},gi=k.default.div`
|
|
549
511
|
position: absolute;
|
|
550
512
|
height: 0;
|
|
551
513
|
width: 0;
|
|
552
514
|
user-select: none;
|
|
553
515
|
pointer-events: none;
|
|
554
|
-
`,
|
|
516
|
+
`,Ti=o.connect((e=>({stateConfiguration:xn.configuration.getConfiguration(e)})),(e=>({dispatchSetConfiguration:t=>e(Nn.configuration.setConfiguration(t))})),null,{context:yn})((e=>{const n=r.useContext(wn);if(!n)return x.default.createElement(x.default.Fragment,null);const{registerPubSub:o}=n,{configuration:i,pubsub:l,stateConfiguration:s,dispatchSetConfiguration:c}=e,u=r.useRef(null);return r.useEffect((()=>{const e=a.general.configuration.merge(i,s);c(e)}),[i]),r.useEffect((()=>{l&&o(l)}),[l]),x.default.createElement(gi,{ref:u,"data-plurid-entity":t.PLURID_ENTITY_APPLICATION_CONFIGURATOR})})),hi=k.default.div`
|
|
555
517
|
position: absolute;
|
|
556
518
|
height: 0;
|
|
557
519
|
width: 0;
|
|
558
520
|
user-select: none;
|
|
559
521
|
pointer-events: none;
|
|
560
|
-
`,
|
|
522
|
+
`,{getPluridPlaneIDByData:Ei}=a.planes,_i=o.connect((e=>({})),(e=>({})),null,{context:yn})((e=>{const a=r.useRef(null),[n,o]=r.useState("");return r.useEffect((()=>{const e=Ei(a.current);o(e)}),[]),x.default.createElement(hi,{ref:a,"data-plurid-entity":t.PLURID_ENTITY_PLANE_CONFIGURATOR})})),Oi=k.default.div`
|
|
523
|
+
`,Si=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plurid:t}=e,a=t.value,n=r.useRef(!1),[o,i]=r.useState();return r.useEffect((()=>(n.current=!0,()=>{n.current=!1}))),r.useEffect((()=>{let e=!1;Un(void 0,void 0,void 0,(function*(){if(!e){e=!0;try{const{domain:e,url:t}=(e=>{const t=e.match(/^pttp:\/\/(\w+(\.|:)\w+)\/?/);if(!t)return{domain:"",url:""};const a=t[1];return{domain:a,url:`http://${a}/pttp`}})(a),r=((e,t)=>{if(e)return t.replace(`pttp://${e}`,"")})(e,a);if(!t||!r)return;const o=yield((e,t)=>Un(void 0,void 0,void 0,(function*(){try{const a=yield G.default(e,{method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({path:t}),credentials:"include"}),n=yield a.json();if(!n.element)return;const{element:r}=n,o=new T.ElementQLClient({url:r.url}),{status:i,Elements:l}=yield o.get(r.json,"json");if(!i)return;const s=l[r.name];return()=>s}catch(e){return}})))(t,r);if(!n.current)return;o&&i(o)}catch(e){return}}}))}),[]),x.default.createElement(Oi,null,o&&x.default.createElement(o,null))})),Ri=k.default.div`
|
|
524
|
+
`,Ai=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>{const{plurid:t}=e,a=t.value;return x.default.createElement(Ri,null,x.default.createElement("iframe",{src:a}))})),bi=e=>{const{top:t,index:a,element:n,setHeight:o}=e,i=r.useRef(null);return r.useEffect((()=>{i.current&&o(i.current.offsetHeight,a)}),[i.current]),x.default.createElement("div",{ref:i,style:{position:"absolute",top:t+"px"}},n)},{markers:{Spinner:Ci}}=d.universal,Ii=o.connect((e=>({translationY:xn.space.getTranslationY(e),viewSize:xn.space.getViewSize(e)})),(e=>({})),null,{context:yn})((e=>{const{items:t,generalHeight:a,translationY:n,viewSize:o}=e,i=a||100,l=r.useRef(null),c=r.useRef([]),u=r.useRef(Array(t.length).fill(i)),[d,f]=r.useState(0),[p,m]=r.useState(Math.floor(1e3/i)),[g,T]=r.useState(i*(p-d)),[h,E]=r.useState(!1),_=(e,t)=>{u.current[t]=e};return r.useEffect((()=>{if(u.current){const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e)}}),[d,p,u.current]),r.useEffect((()=>{let e=0;for(const[t,a]of u.current.entries())e+=a,n<0?(e<Math.abs(n)&&f(t),e>Math.abs(n)+o.height&&e<Math.abs(n)+o.height+400&&m(t)):(f(0),m(10))}),[o.height,n]),r.useEffect((()=>{E(!0),setTimeout((()=>{const e=s.mathematics.arithmetic.sum(u.current,u.current.length);T(e),E(!1)}),400)}),[o]),x.default.createElement("div",{style:{height:g},ref:l},h&&x.default.createElement(x.default.Fragment,null,x.default.createElement(Ci,null)),!h&&x.default.createElement(x.default.Fragment,null,(()=>{c.current=[];for(let e=d;e<=p;e++){const a=t[e];c.current.push(x.default.createElement(bi,{key:e+Math.random(),index:e,top:s.mathematics.arithmetic.sum(u.current,e),element:a,setHeight:_}))}return c.current})()))})),vi=k.default.div`
|
|
525
|
+
`,Pi=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>x.default.createElement(vi,null,"PluridPlaneDebugger"))),Li=k.default.div`
|
|
526
|
+
`,yi=o.connect((e=>({stateGeneralTheme:xn.themes.getGeneralTheme(e),stateInteractionTheme:xn.themes.getInteractionTheme(e)})),(e=>({})),null,{context:yn})((e=>x.default.createElement(Li,null,"PluridSpaceDebugger"))),{resolvePluridPlaneData:Ui}=a.planes,wi=(e,t,n,r)=>{const o=new Map,i=new Map(e||new Map),l=a.general.configuration.merge(n);if(t)for(const e of t){const t=Ui(e),n=a.routing.resolveRoute(t.route);if(!n)continue;const{protocol:r,host:o,path:l,space:s,universe:c,cluster:u,plane:d,route:f}=n,p={protocol:r,host:"",path:"",space:"",universe:"",cluster:"",plane:"",route:f,component:t.component},m=f;i.set(m,p)}const s=new Map(i),c={};for(const[e,t]of i)c[t.route]=e;for(const[e,t]of i);const u=r||[],d=[];for(const e of u)if("string"==typeof e){const t=a.routing.resolveRoute(e);if(!t)continue;d.push(t.route)}return{computedTree:[],indexedPlanesReference:s,planesPropertiesReference:o,appConfiguration:l}},Ni=(e,n,r)=>Un(void 0,void 0,void 0,(function*(){const o="http",i="localhost:63000",l=((e,t,n)=>{const r=new Map;for(const o of e){if(o.planes)for(const e of o.planes){const i=jo(e),l="/"===o.value?"p":a.utilities.cleanPathElement(o.value),s="s",c="u",u="c",d=a.utilities.cleanPathElement(i.value),f=[t,n,l,s,c,u,d].join("://"),p={protocol:t,host:n,path:l,space:s,universe:c,cluster:u,plane:d,component:i.component,route:f};r.set(f,p)}if(o.spaces){for(const e of o.spaces)if(e.universes)for(const i of e.universes)if(i.clusters)for(const l of i.clusters)for(const s of l.planes){const c=jo(s),u="/"===o.value?"p":a.utilities.cleanPathElement(o.value),d="default"===e.value?"s":a.utilities.cleanPathElement(e.value),f="default"===i.value?"u":a.utilities.cleanPathElement(i.value),p="default"===l.value?"c":a.utilities.cleanPathElement(l.value),m=a.utilities.cleanPathElement(c.value),g=[t,n,u,d,f,p,m].join("://"),T={protocol:t,host:n,path:u,space:d,universe:f,cluster:p,plane:m,component:c.component,route:g};r.set(g,T)}}else{const e="/"===o.value?"p":a.utilities.cleanPathElement(o.value),i=[t,n,e].join("://"),l={protocol:t,host:n,path:e,space:"",universe:"",cluster:"",plane:"",component:o.exterior||(()=>x.default.createElement(x.default.Fragment,null)),route:i};r.set(i,l)}}return r})(n,o,i),s=yield((e,n,r,o)=>Un(void 0,void 0,void 0,(function*(){const n={planes:[],spaces:[],view:[],value:""};if("Route"===e.kind){let t=e.data;e.data.resolver&&(t=yield e.data.resolver(o)),n.planes=t.planes||[],n.spaces=t.spaces||[],n.view=t.view||[],n.value=e.data.value||""}const{planes:r,spaces:i,view:l}=n,s=[];if(i)for(const e of i){const r=[],o=[];if(e.planes)for(const r of e.planes){const o=jo(r);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),a.utilities.cleanPathElement(o.value)}if(e.universes)for(const r of e.universes){if(r.clusters)for(const o of r.clusters)for(const i of o.planes){const l=jo(i);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),o.value===t.PLURID_ROUTE_DEFAULT_CLUSTER_VALUE?t.PLURID_ROUTE_DEFAULT_CLUSTER:a.utilities.cleanPathElement(o.value),a.utilities.cleanPathElement(l.value)}if(r.planes)for(const o of r.planes){const i=jo(o);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),e.value===t.PLURID_ROUTE_DEFAULT_SPACE_VALUE?t.PLURID_ROUTE_DEFAULT_SPACE:a.utilities.cleanPathElement(e.value),r.value===t.PLURID_ROUTE_DEFAULT_UNIVERSE_VALUE?t.PLURID_ROUTE_DEFAULT_UNIVERSE:a.utilities.cleanPathElement(r.value),a.utilities.cleanPathElement(i.value)}}const i={planes:r,view:o};s.push(i)}if(r){const e=[];for(const e of r){const r=jo(e);n.value===t.PLURID_ROUTE_DEFAULT_PATH_VALUE?t.PLURID_ROUTE_DEFAULT_PATH:a.utilities.cleanPathElement(n.value),a.utilities.cleanPathElement(r.value)}const o={planes:e,view:l||[]};s.push(o)}return s})))(e,0,0,r),c={};for(const t of s){const{planes:a,view:n}=t,{computedTree:r,appConfiguration:o}=wi(l,a,void 0,n),i={configuration:Object.assign({},o),shortcuts:{global:!0},themes:{general:j.default.plurid,interaction:j.default.plurid},ui:{toolbarScrollPosition:50},space:{loading:!1,animatedTransform:!1,scale:1,rotationX:0,rotationY:0,translationX:0,translationY:0,translationZ:0,initialTree:r,tree:r,activeUniverseID:"",camera:{x:0,y:0,z:0},viewSize:{width:1440,height:821},spaceSize:{width:1440,height:821,depth:0,topCorner:{x:0,y:0,z:0}},view:n,culledView:[]}};c[e.data.value]=i}return{states:c}})),{IsoMatcher:Di,RouteParser:Mi}=a.routing,xi={PluridPlaneBridge:Bn,PluridPlaneContent:Kn,PluridPlaneControls:Hn,PluridPlaneDebugger:Pi,PluridSpaceDebugger:yi},Fi={Application:xo,RouterStatic:$o,RouterBrowser:Xo,Provider:Wo,Link:di,RouterLink:mi,ApplicationConfigurator:Ti,PlaneConfigurator:_i,ExternalPlane:Si,IframePlane:Ai,VirtualList:Ii,SPACE_LAYOUT:t.LAYOUT_TYPES,SIZES:t.SIZES,TRANSFORM_MODES:t.TRANSFORM_MODES,TRANSFORM_TOUCHES:t.TRANSFORM_TOUCHES,PubSub:M.default,PUBSUB_TOPIC:t.PLURID_PUBSUB_TOPIC,serverComputeMetastate:Ni,IsoMatcher:Di,routerNavigate:a.pluridRouterNavigate,internals:xi};Object.defineProperty(e,"PLURID_PUBSUB_TOPIC",{enumerable:!0,get:function(){return t.PLURID_PUBSUB_TOPIC}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_CHANGED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_CHANGED}}),Object.defineProperty(e,"PLURID_ROUTER_LOCATION_STORED",{enumerable:!0,get:function(){return t.PLURID_ROUTER_LOCATION_STORED}}),Object.defineProperty(e,"SIZES",{enumerable:!0,get:function(){return t.SIZES}}),Object.defineProperty(e,"SPACE_LAYOUT",{enumerable:!0,get:function(){return t.LAYOUT_TYPES}}),Object.defineProperty(e,"TRANSFORM_MODES",{enumerable:!0,get:function(){return t.TRANSFORM_MODES}}),Object.defineProperty(e,"TRANSFORM_TOUCHES",{enumerable:!0,get:function(){return t.TRANSFORM_TOUCHES}}),Object.defineProperty(e,"pluridRouterNavigate",{enumerable:!0,get:function(){return a.pluridRouterNavigate}}),Object.defineProperty(e,"PluridPubSub",{enumerable:!0,get:function(){return M.default}}),e.PluridApplication=xo,e.PluridApplicationConfigurator=Ti,e.PluridExternalPlane=Si,e.PluridIframePlane=Ai,e.PluridIsoMatcher=Di,e.PluridLink=di,e.PluridPlaneConfigurator=_i,e.PluridProvider=Wo,e.PluridRouteParser=Mi,e.PluridRouterBrowser=Xo,e.PluridRouterLink=mi,e.PluridRouterStatic=$o,e.PluridVirtualList=Ii,e.default=Fi,e.getDirectPlaneMatch=(e,t,a)=>{let n,r,o;for(const a of t){if(a.planes)for(const t of a.planes){const n=jo(t),i="/"===a.value?n.value:a.value+n.value;if(o=i,e===i){r=t;break}}if(r){n=a;break}}if(a)for(const t of a){if(e===jo(t).value){r=t;break}}return{matchRoute:n,matchPlane:r,matchPath:o}},e.internals=xi,e.pluridStateModules=vn,e.serverComputeMetastate=Ni,e.usePluridRouter=()=>{const[e,a]=r.useState("");return r.useEffect((()=>{const e=()=>{const e=s.storage.loadState(t.PLURID_ROUTER_STORAGE);e&&a(e)};return e(),window.addEventListener(t.PLURID_ROUTER_LOCATION_STORED,e),()=>{window.removeEventListener(t.PLURID_ROUTER_LOCATION_STORED,e)}}),[]),e}}(M);var x,F=(x=M)&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x;exports.default=F;
|
|
527
|
+
//# sourceMappingURL=index.min.js.map
|