@mdesignable/react 1.0.0-beta.64
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/LICENSE.md +20 -0
- package/README.md +1 -0
- package/dist/designable.react.umd.production.css +1 -0
- package/dist/designable.react.umd.production.js +6 -0
- package/dist/designable.react.umd.production.min.css +1 -0
- package/dist/designable.react.umd.production.min.js +3580 -0
- package/esm/containers/Designer.d.ts +3 -0
- package/esm/containers/Designer.js +49 -0
- package/esm/containers/Layout.d.ts +3 -0
- package/esm/containers/Layout.js +33 -0
- package/esm/containers/Simulator.d.ts +3 -0
- package/esm/containers/Simulator.js +29 -0
- package/esm/containers/Viewport.d.ts +6 -0
- package/esm/containers/Viewport.js +84 -0
- package/esm/containers/Workbench.d.ts +2 -0
- package/esm/containers/Workbench.js +9 -0
- package/esm/containers/Workspace.d.ts +7 -0
- package/esm/containers/Workspace.js +38 -0
- package/esm/containers/index.d.ts +7 -0
- package/esm/containers/index.js +7 -0
- package/esm/containers/styles.less +19 -0
- package/esm/context.d.ts +7 -0
- package/esm/context.js +6 -0
- package/esm/hooks/index.d.ts +25 -0
- package/esm/hooks/index.js +25 -0
- package/esm/hooks/useComponents.d.ts +1 -0
- package/esm/hooks/useComponents.js +3 -0
- package/esm/hooks/useCursor.d.ts +1 -0
- package/esm/hooks/useCursor.js +5 -0
- package/esm/hooks/useDesigner.d.ts +5 -0
- package/esm/hooks/useDesigner.js +13 -0
- package/esm/hooks/useHistory.d.ts +1 -0
- package/esm/hooks/useHistory.js +5 -0
- package/esm/hooks/useHover.d.ts +1 -0
- package/esm/hooks/useHover.js +5 -0
- package/esm/hooks/useLayout.d.ts +2 -0
- package/esm/hooks/useLayout.js +7 -0
- package/esm/hooks/useMoveHelper.d.ts +1 -0
- package/esm/hooks/useMoveHelper.js +5 -0
- package/esm/hooks/useNodeIdProps.d.ts +4 -0
- package/esm/hooks/useNodeIdProps.js +10 -0
- package/esm/hooks/useOperation.d.ts +1 -0
- package/esm/hooks/useOperation.js +5 -0
- package/esm/hooks/useOutline.d.ts +1 -0
- package/esm/hooks/useOutline.js +5 -0
- package/esm/hooks/usePosition.d.ts +1 -0
- package/esm/hooks/usePosition.js +5 -0
- package/esm/hooks/usePrefix.d.ts +1 -0
- package/esm/hooks/usePrefix.js +6 -0
- package/esm/hooks/useRegistry.d.ts +2 -0
- package/esm/hooks/useRegistry.js +5 -0
- package/esm/hooks/useScreen.d.ts +1 -0
- package/esm/hooks/useScreen.js +4 -0
- package/esm/hooks/useSelected.d.ts +1 -0
- package/esm/hooks/useSelected.js +5 -0
- package/esm/hooks/useSelectedNode.d.ts +6 -0
- package/esm/hooks/useSelectedNode.js +13 -0
- package/esm/hooks/useSelection.d.ts +1 -0
- package/esm/hooks/useSelection.js +5 -0
- package/esm/hooks/useTheme.d.ts +1 -0
- package/esm/hooks/useTheme.js +5 -0
- package/esm/hooks/useTransformHelper.d.ts +1 -0
- package/esm/hooks/useTransformHelper.js +5 -0
- package/esm/hooks/useTree.d.ts +1 -0
- package/esm/hooks/useTree.js +5 -0
- package/esm/hooks/useTreeNode.d.ts +1 -0
- package/esm/hooks/useTreeNode.js +5 -0
- package/esm/hooks/useValidNodeOffsetRect.d.ts +2 -0
- package/esm/hooks/useValidNodeOffsetRect.js +54 -0
- package/esm/hooks/useViewport.d.ts +1 -0
- package/esm/hooks/useViewport.js +5 -0
- package/esm/hooks/useWorkbench.d.ts +1 -0
- package/esm/hooks/useWorkbench.js +5 -0
- package/esm/hooks/useWorkspace.d.ts +2 -0
- package/esm/hooks/useWorkspace.js +15 -0
- package/esm/icons/actions.d.ts +7 -0
- package/esm/icons/actions.js +28 -0
- package/esm/icons/add.d.ts +2 -0
- package/esm/icons/add.js +4 -0
- package/esm/icons/animations.d.ts +24 -0
- package/esm/icons/animations.js +24 -0
- package/esm/icons/boolean.d.ts +2 -0
- package/esm/icons/boolean.js +3 -0
- package/esm/icons/clone.d.ts +3 -0
- package/esm/icons/clone.js +3 -0
- package/esm/icons/close.d.ts +2 -0
- package/esm/icons/close.js +3 -0
- package/esm/icons/code.d.ts +2 -0
- package/esm/icons/code.js +2 -0
- package/esm/icons/command.d.ts +2 -0
- package/esm/icons/command.js +4 -0
- package/esm/icons/component.d.ts +2 -0
- package/esm/icons/component.js +2 -0
- package/esm/icons/container.d.ts +2 -0
- package/esm/icons/container.js +4 -0
- package/esm/icons/corner.d.ts +5 -0
- package/esm/icons/corner.js +5 -0
- package/esm/icons/delete.d.ts +2 -0
- package/esm/icons/delete.js +5 -0
- package/esm/icons/design.d.ts +2 -0
- package/esm/icons/design.js +3 -0
- package/esm/icons/display.d.ts +5 -0
- package/esm/icons/display.js +5 -0
- package/esm/icons/dragmove.d.ts +2 -0
- package/esm/icons/dragmove.js +3 -0
- package/esm/icons/expand.d.ts +2 -0
- package/esm/icons/expand.js +2 -0
- package/esm/icons/expression.d.ts +2 -0
- package/esm/icons/expression.js +2 -0
- package/esm/icons/eyes.d.ts +3 -0
- package/esm/icons/eyes.js +7 -0
- package/esm/icons/flex.d.ts +22 -0
- package/esm/icons/flex.js +22 -0
- package/esm/icons/flip.d.ts +2 -0
- package/esm/icons/flip.js +2 -0
- package/esm/icons/focus.d.ts +2 -0
- package/esm/icons/focus.js +2 -0
- package/esm/icons/font.d.ts +16 -0
- package/esm/icons/font.js +16 -0
- package/esm/icons/formula.d.ts +2 -0
- package/esm/icons/formula.js +2 -0
- package/esm/icons/freemove.d.ts +2 -0
- package/esm/icons/freemove.js +3 -0
- package/esm/icons/help.d.ts +2 -0
- package/esm/icons/help.js +4 -0
- package/esm/icons/hidden.d.ts +2 -0
- package/esm/icons/hidden.js +2 -0
- package/esm/icons/history.d.ts +2 -0
- package/esm/icons/history.js +3 -0
- package/esm/icons/image.d.ts +3 -0
- package/esm/icons/image.js +3 -0
- package/esm/icons/index.d.ts +53 -0
- package/esm/icons/index.js +53 -0
- package/esm/icons/json.d.ts +2 -0
- package/esm/icons/json.js +2 -0
- package/esm/icons/logo.d.ts +4 -0
- package/esm/icons/logo.js +4 -0
- package/esm/icons/menu.d.ts +2 -0
- package/esm/icons/menu.js +3 -0
- package/esm/icons/mobile.d.ts +2 -0
- package/esm/icons/mobile.js +4 -0
- package/esm/icons/move.d.ts +2 -0
- package/esm/icons/move.js +2 -0
- package/esm/icons/number.d.ts +2 -0
- package/esm/icons/number.js +3 -0
- package/esm/icons/outline.d.ts +2 -0
- package/esm/icons/outline.js +2 -0
- package/esm/icons/page.d.ts +2 -0
- package/esm/icons/page.js +5 -0
- package/esm/icons/pc.d.ts +2 -0
- package/esm/icons/pc.js +3 -0
- package/esm/icons/play.d.ts +2 -0
- package/esm/icons/play.js +2 -0
- package/esm/icons/position.d.ts +6 -0
- package/esm/icons/position.js +6 -0
- package/esm/icons/pushpin.d.ts +3 -0
- package/esm/icons/pushpin.js +5 -0
- package/esm/icons/recover.d.ts +2 -0
- package/esm/icons/recover.js +2 -0
- package/esm/icons/redo.d.ts +2 -0
- package/esm/icons/redo.js +2 -0
- package/esm/icons/remove.d.ts +2 -0
- package/esm/icons/remove.js +2 -0
- package/esm/icons/responsive.d.ts +2 -0
- package/esm/icons/responsive.js +5 -0
- package/esm/icons/return.d.ts +2 -0
- package/esm/icons/return.js +2 -0
- package/esm/icons/selection.d.ts +2 -0
- package/esm/icons/selection.js +2 -0
- package/esm/icons/setting.d.ts +2 -0
- package/esm/icons/setting.js +2 -0
- package/esm/icons/shadow.d.ts +5 -0
- package/esm/icons/shadow.js +5 -0
- package/esm/icons/shift.d.ts +2 -0
- package/esm/icons/shift.js +2 -0
- package/esm/icons/sources.d.ts +75 -0
- package/esm/icons/sources.js +544 -0
- package/esm/icons/text.d.ts +3 -0
- package/esm/icons/text.js +5 -0
- package/esm/icons/undo.d.ts +2 -0
- package/esm/icons/undo.js +3 -0
- package/esm/icons/upload.d.ts +2 -0
- package/esm/icons/upload.js +4 -0
- package/esm/index.d.ts +9 -0
- package/esm/index.js +9 -0
- package/esm/locales/global.d.ts +17 -0
- package/esm/locales/global.js +16 -0
- package/esm/locales/icons.d.ts +133 -0
- package/esm/locales/icons.js +132 -0
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +6 -0
- package/esm/locales/operations.d.ts +51 -0
- package/esm/locales/operations.js +50 -0
- package/esm/locales/panels.d.ts +27 -0
- package/esm/locales/panels.js +26 -0
- package/esm/panels/CompositePanel.d.ts +22 -0
- package/esm/panels/CompositePanel.js +140 -0
- package/esm/panels/SettingsPanel.d.ts +6 -0
- package/esm/panels/SettingsPanel.js +69 -0
- package/esm/panels/SourceBarPanel.d.ts +4 -0
- package/esm/panels/SourceBarPanel.js +31 -0
- package/esm/panels/StudioPanel.d.ts +12 -0
- package/esm/panels/StudioPanel.js +44 -0
- package/esm/panels/ToolbarPanel.d.ts +3 -0
- package/esm/panels/ToolbarPanel.js +16 -0
- package/esm/panels/ViewPanel.d.ts +9 -0
- package/esm/panels/ViewPanel.js +57 -0
- package/esm/panels/ViewportPanel.d.ts +3 -0
- package/esm/panels/ViewportPanel.js +18 -0
- package/esm/panels/WorkspacePanel.d.ts +8 -0
- package/esm/panels/WorkspacePanel.js +21 -0
- package/esm/panels/index.d.ts +9 -0
- package/esm/panels/index.js +9 -0
- package/esm/panels/sourceBarPanel.less +4 -0
- package/esm/panels/styles.less +331 -0
- package/esm/simulators/MobileSimulator/body.d.ts +4 -0
- package/esm/simulators/MobileSimulator/body.js +57 -0
- package/esm/simulators/MobileSimulator/index.d.ts +7 -0
- package/esm/simulators/MobileSimulator/index.js +22 -0
- package/esm/simulators/MobileSimulator/styles.less +29 -0
- package/esm/simulators/PCSimulator/index.d.ts +7 -0
- package/esm/simulators/PCSimulator/index.js +19 -0
- package/esm/simulators/PCSimulator/styles.less +11 -0
- package/esm/simulators/ResponsiveSimulator/handle.d.ts +10 -0
- package/esm/simulators/ResponsiveSimulator/handle.js +28 -0
- package/esm/simulators/ResponsiveSimulator/index.d.ts +7 -0
- package/esm/simulators/ResponsiveSimulator/index.js +157 -0
- package/esm/simulators/ResponsiveSimulator/styles.less +56 -0
- package/esm/simulators/index.d.ts +3 -0
- package/esm/simulators/index.js +3 -0
- package/esm/theme.less +224 -0
- package/esm/types.d.ts +32 -0
- package/esm/types.js +1 -0
- package/esm/variables.less +1 -0
- package/esm/widgets/AuxToolWidget/Copy.d.ts +7 -0
- package/esm/widgets/AuxToolWidget/Copy.js +16 -0
- package/esm/widgets/AuxToolWidget/Cover.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/Cover.js +52 -0
- package/esm/widgets/AuxToolWidget/DashedBox.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/DashedBox.js +43 -0
- package/esm/widgets/AuxToolWidget/Delete.d.ts +7 -0
- package/esm/widgets/AuxToolWidget/Delete.js +16 -0
- package/esm/widgets/AuxToolWidget/DragHandler.d.ts +7 -0
- package/esm/widgets/AuxToolWidget/DragHandler.js +30 -0
- package/esm/widgets/AuxToolWidget/FreeSelection.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/FreeSelection.js +43 -0
- package/esm/widgets/AuxToolWidget/Helpers.d.ts +15 -0
- package/esm/widgets/AuxToolWidget/Helpers.js +100 -0
- package/esm/widgets/AuxToolWidget/Insertion.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/Insertion.js +70 -0
- package/esm/widgets/AuxToolWidget/ResizeHandler.d.ts +6 -0
- package/esm/widgets/AuxToolWidget/ResizeHandler.js +39 -0
- package/esm/widgets/AuxToolWidget/Selection.d.ts +8 -0
- package/esm/widgets/AuxToolWidget/Selection.js +69 -0
- package/esm/widgets/AuxToolWidget/Selector.d.ts +7 -0
- package/esm/widgets/AuxToolWidget/Selector.js +101 -0
- package/esm/widgets/AuxToolWidget/SnapLine.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/SnapLine.js +30 -0
- package/esm/widgets/AuxToolWidget/SpaceBlock.d.ts +2 -0
- package/esm/widgets/AuxToolWidget/SpaceBlock.js +68 -0
- package/esm/widgets/AuxToolWidget/TranslateHandler.d.ts +6 -0
- package/esm/widgets/AuxToolWidget/TranslateHandler.js +32 -0
- package/esm/widgets/AuxToolWidget/index.d.ts +6 -0
- package/esm/widgets/AuxToolWidget/index.js +34 -0
- package/esm/widgets/AuxToolWidget/styles.less +383 -0
- package/esm/widgets/ComponentTreeWidget/index.d.ts +15 -0
- package/esm/widgets/ComponentTreeWidget/index.js +106 -0
- package/esm/widgets/ComponentTreeWidget/styles.less +6 -0
- package/esm/widgets/DesignerToolsWidget/index.d.ts +10 -0
- package/esm/widgets/DesignerToolsWidget/index.js +109 -0
- package/esm/widgets/DesignerToolsWidget/styles.less +29 -0
- package/esm/widgets/DroppableWidget/index.d.ts +15 -0
- package/esm/widgets/DroppableWidget/index.js +43 -0
- package/esm/widgets/DroppableWidget/styles.less +11 -0
- package/esm/widgets/EmptyWidget/index.d.ts +6 -0
- package/esm/widgets/EmptyWidget/index.js +46 -0
- package/esm/widgets/EmptyWidget/styles.less +27 -0
- package/esm/widgets/GhostWidget/index.d.ts +3 -0
- package/esm/widgets/GhostWidget/index.js +35 -0
- package/esm/widgets/GhostWidget/styles.less +20 -0
- package/esm/widgets/HistoryWidget/index.d.ts +3 -0
- package/esm/widgets/HistoryWidget/index.js +28 -0
- package/esm/widgets/HistoryWidget/styles.less +23 -0
- package/esm/widgets/IconWidget/index.d.ts +22 -0
- package/esm/widgets/IconWidget/index.js +108 -0
- package/esm/widgets/IconWidget/styles.less +17 -0
- package/esm/widgets/NodeActionsWidget/index.d.ts +17 -0
- package/esm/widgets/NodeActionsWidget/index.js +48 -0
- package/esm/widgets/NodeActionsWidget/styles.less +53 -0
- package/esm/widgets/NodePathWidget/index.d.ts +7 -0
- package/esm/widgets/NodePathWidget/index.js +34 -0
- package/esm/widgets/NodePathWidget/styles.less +16 -0
- package/esm/widgets/NodeTitleWidget/index.d.ts +6 -0
- package/esm/widgets/NodeTitleWidget/index.js +13 -0
- package/esm/widgets/OutlineWidget/Insertion.d.ts +5 -0
- package/esm/widgets/OutlineWidget/Insertion.js +52 -0
- package/esm/widgets/OutlineWidget/OutlineNode.d.ts +10 -0
- package/esm/widgets/OutlineWidget/OutlineNode.js +140 -0
- package/esm/widgets/OutlineWidget/context.d.ts +8 -0
- package/esm/widgets/OutlineWidget/context.js +2 -0
- package/esm/widgets/OutlineWidget/index.d.ts +10 -0
- package/esm/widgets/OutlineWidget/index.js +65 -0
- package/esm/widgets/OutlineWidget/styles.less +195 -0
- package/esm/widgets/ResourceWidget/index.d.ts +12 -0
- package/esm/widgets/ResourceWidget/index.js +69 -0
- package/esm/widgets/ResourceWidget/styles.less +87 -0
- package/esm/widgets/SimpleResourceWidget/index.d.ts +10 -0
- package/esm/widgets/SimpleResourceWidget/index.js +42 -0
- package/esm/widgets/SimpleResourceWidget/styles.less +57 -0
- package/esm/widgets/TextWidget/index.d.ts +9 -0
- package/esm/widgets/TextWidget/index.js +32 -0
- package/esm/widgets/ViewToolsWidget/index.d.ts +8 -0
- package/esm/widgets/ViewToolsWidget/index.js +31 -0
- package/esm/widgets/index.d.ts +16 -0
- package/esm/widgets/index.js +16 -0
- package/lib/containers/Designer.d.ts +3 -0
- package/lib/containers/Designer.js +76 -0
- package/lib/containers/Layout.d.ts +3 -0
- package/lib/containers/Layout.js +63 -0
- package/lib/containers/Simulator.d.ts +3 -0
- package/lib/containers/Simulator.js +35 -0
- package/lib/containers/Viewport.d.ts +6 -0
- package/lib/containers/Viewport.js +114 -0
- package/lib/containers/Workbench.d.ts +2 -0
- package/lib/containers/Workbench.js +15 -0
- package/lib/containers/Workspace.d.ts +7 -0
- package/lib/containers/Workspace.js +65 -0
- package/lib/containers/index.d.ts +7 -0
- package/lib/containers/index.js +23 -0
- package/lib/containers/styles.less +19 -0
- package/lib/context.d.ts +7 -0
- package/lib/context.js +9 -0
- package/lib/hooks/index.d.ts +25 -0
- package/lib/hooks/index.js +41 -0
- package/lib/hooks/useComponents.d.ts +1 -0
- package/lib/hooks/useComponents.js +7 -0
- package/lib/hooks/useCursor.d.ts +1 -0
- package/lib/hooks/useCursor.js +9 -0
- package/lib/hooks/useDesigner.d.ts +5 -0
- package/lib/hooks/useDesigner.js +17 -0
- package/lib/hooks/useHistory.d.ts +1 -0
- package/lib/hooks/useHistory.js +9 -0
- package/lib/hooks/useHover.d.ts +1 -0
- package/lib/hooks/useHover.js +9 -0
- package/lib/hooks/useLayout.d.ts +2 -0
- package/lib/hooks/useLayout.js +11 -0
- package/lib/hooks/useMoveHelper.d.ts +1 -0
- package/lib/hooks/useMoveHelper.js +9 -0
- package/lib/hooks/useNodeIdProps.d.ts +4 -0
- package/lib/hooks/useNodeIdProps.js +14 -0
- package/lib/hooks/useOperation.d.ts +1 -0
- package/lib/hooks/useOperation.js +9 -0
- package/lib/hooks/useOutline.d.ts +1 -0
- package/lib/hooks/useOutline.js +9 -0
- package/lib/hooks/usePosition.d.ts +1 -0
- package/lib/hooks/usePosition.js +9 -0
- package/lib/hooks/usePrefix.d.ts +1 -0
- package/lib/hooks/usePrefix.js +10 -0
- package/lib/hooks/useRegistry.d.ts +2 -0
- package/lib/hooks/useRegistry.js +9 -0
- package/lib/hooks/useScreen.d.ts +1 -0
- package/lib/hooks/useScreen.js +8 -0
- package/lib/hooks/useSelected.d.ts +1 -0
- package/lib/hooks/useSelected.js +9 -0
- package/lib/hooks/useSelectedNode.d.ts +6 -0
- package/lib/hooks/useSelectedNode.js +17 -0
- package/lib/hooks/useSelection.d.ts +1 -0
- package/lib/hooks/useSelection.js +9 -0
- package/lib/hooks/useTheme.d.ts +1 -0
- package/lib/hooks/useTheme.js +9 -0
- package/lib/hooks/useTransformHelper.d.ts +1 -0
- package/lib/hooks/useTransformHelper.js +9 -0
- package/lib/hooks/useTree.d.ts +1 -0
- package/lib/hooks/useTree.js +9 -0
- package/lib/hooks/useTreeNode.d.ts +1 -0
- package/lib/hooks/useTreeNode.js +9 -0
- package/lib/hooks/useValidNodeOffsetRect.d.ts +2 -0
- package/lib/hooks/useValidNodeOffsetRect.js +58 -0
- package/lib/hooks/useViewport.d.ts +1 -0
- package/lib/hooks/useViewport.js +9 -0
- package/lib/hooks/useWorkbench.d.ts +1 -0
- package/lib/hooks/useWorkbench.js +9 -0
- package/lib/hooks/useWorkspace.d.ts +2 -0
- package/lib/hooks/useWorkspace.js +19 -0
- package/lib/icons/actions.d.ts +7 -0
- package/lib/icons/actions.js +34 -0
- package/lib/icons/add.d.ts +2 -0
- package/lib/icons/add.js +10 -0
- package/lib/icons/animations.d.ts +24 -0
- package/lib/icons/animations.js +27 -0
- package/lib/icons/boolean.d.ts +2 -0
- package/lib/icons/boolean.js +9 -0
- package/lib/icons/clone.d.ts +3 -0
- package/lib/icons/clone.js +9 -0
- package/lib/icons/close.d.ts +2 -0
- package/lib/icons/close.js +9 -0
- package/lib/icons/code.d.ts +2 -0
- package/lib/icons/code.js +8 -0
- package/lib/icons/command.d.ts +2 -0
- package/lib/icons/command.js +10 -0
- package/lib/icons/component.d.ts +2 -0
- package/lib/icons/component.js +8 -0
- package/lib/icons/container.d.ts +2 -0
- package/lib/icons/container.js +10 -0
- package/lib/icons/corner.d.ts +5 -0
- package/lib/icons/corner.js +11 -0
- package/lib/icons/delete.d.ts +2 -0
- package/lib/icons/delete.js +11 -0
- package/lib/icons/design.d.ts +2 -0
- package/lib/icons/design.js +9 -0
- package/lib/icons/display.d.ts +5 -0
- package/lib/icons/display.js +11 -0
- package/lib/icons/dragmove.d.ts +2 -0
- package/lib/icons/dragmove.js +9 -0
- package/lib/icons/expand.d.ts +2 -0
- package/lib/icons/expand.js +8 -0
- package/lib/icons/expression.d.ts +2 -0
- package/lib/icons/expression.js +8 -0
- package/lib/icons/eyes.d.ts +3 -0
- package/lib/icons/eyes.js +13 -0
- package/lib/icons/flex.d.ts +22 -0
- package/lib/icons/flex.js +28 -0
- package/lib/icons/flip.d.ts +2 -0
- package/lib/icons/flip.js +8 -0
- package/lib/icons/focus.d.ts +2 -0
- package/lib/icons/focus.js +8 -0
- package/lib/icons/font.d.ts +16 -0
- package/lib/icons/font.js +22 -0
- package/lib/icons/formula.d.ts +2 -0
- package/lib/icons/formula.js +8 -0
- package/lib/icons/freemove.d.ts +2 -0
- package/lib/icons/freemove.js +9 -0
- package/lib/icons/help.d.ts +2 -0
- package/lib/icons/help.js +10 -0
- package/lib/icons/hidden.d.ts +2 -0
- package/lib/icons/hidden.js +8 -0
- package/lib/icons/history.d.ts +2 -0
- package/lib/icons/history.js +9 -0
- package/lib/icons/image.d.ts +3 -0
- package/lib/icons/image.js +9 -0
- package/lib/icons/index.d.ts +53 -0
- package/lib/icons/index.js +69 -0
- package/lib/icons/json.d.ts +2 -0
- package/lib/icons/json.js +8 -0
- package/lib/icons/logo.d.ts +4 -0
- package/lib/icons/logo.js +7 -0
- package/lib/icons/menu.d.ts +2 -0
- package/lib/icons/menu.js +9 -0
- package/lib/icons/mobile.d.ts +2 -0
- package/lib/icons/mobile.js +10 -0
- package/lib/icons/move.d.ts +2 -0
- package/lib/icons/move.js +8 -0
- package/lib/icons/number.d.ts +2 -0
- package/lib/icons/number.js +9 -0
- package/lib/icons/outline.d.ts +2 -0
- package/lib/icons/outline.js +8 -0
- package/lib/icons/page.d.ts +2 -0
- package/lib/icons/page.js +11 -0
- package/lib/icons/pc.d.ts +2 -0
- package/lib/icons/pc.js +9 -0
- package/lib/icons/play.d.ts +2 -0
- package/lib/icons/play.js +8 -0
- package/lib/icons/position.d.ts +6 -0
- package/lib/icons/position.js +12 -0
- package/lib/icons/pushpin.d.ts +3 -0
- package/lib/icons/pushpin.js +11 -0
- package/lib/icons/recover.d.ts +2 -0
- package/lib/icons/recover.js +8 -0
- package/lib/icons/redo.d.ts +2 -0
- package/lib/icons/redo.js +8 -0
- package/lib/icons/remove.d.ts +2 -0
- package/lib/icons/remove.js +8 -0
- package/lib/icons/responsive.d.ts +2 -0
- package/lib/icons/responsive.js +11 -0
- package/lib/icons/return.d.ts +2 -0
- package/lib/icons/return.js +8 -0
- package/lib/icons/selection.d.ts +2 -0
- package/lib/icons/selection.js +8 -0
- package/lib/icons/setting.d.ts +2 -0
- package/lib/icons/setting.js +8 -0
- package/lib/icons/shadow.d.ts +5 -0
- package/lib/icons/shadow.js +11 -0
- package/lib/icons/shift.d.ts +2 -0
- package/lib/icons/shift.js +8 -0
- package/lib/icons/sources.d.ts +75 -0
- package/lib/icons/sources.js +551 -0
- package/lib/icons/text.d.ts +3 -0
- package/lib/icons/text.js +11 -0
- package/lib/icons/undo.d.ts +2 -0
- package/lib/icons/undo.js +9 -0
- package/lib/icons/upload.d.ts +2 -0
- package/lib/icons/upload.js +10 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +25 -0
- package/lib/locales/global.d.ts +17 -0
- package/lib/locales/global.js +18 -0
- package/lib/locales/icons.d.ts +133 -0
- package/lib/locales/icons.js +134 -0
- package/lib/locales/index.d.ts +1 -0
- package/lib/locales/index.js +11 -0
- package/lib/locales/operations.d.ts +51 -0
- package/lib/locales/operations.js +52 -0
- package/lib/locales/panels.d.ts +27 -0
- package/lib/locales/panels.js +28 -0
- package/lib/panels/CompositePanel.d.ts +22 -0
- package/lib/panels/CompositePanel.js +170 -0
- package/lib/panels/SettingsPanel.d.ts +6 -0
- package/lib/panels/SettingsPanel.js +98 -0
- package/lib/panels/SourceBarPanel.d.ts +4 -0
- package/lib/panels/SourceBarPanel.js +38 -0
- package/lib/panels/StudioPanel.d.ts +12 -0
- package/lib/panels/StudioPanel.js +51 -0
- package/lib/panels/ToolbarPanel.d.ts +3 -0
- package/lib/panels/ToolbarPanel.js +23 -0
- package/lib/panels/ViewPanel.d.ts +9 -0
- package/lib/panels/ViewPanel.js +83 -0
- package/lib/panels/ViewportPanel.d.ts +3 -0
- package/lib/panels/ViewportPanel.js +25 -0
- package/lib/panels/WorkspacePanel.d.ts +8 -0
- package/lib/panels/WorkspacePanel.js +28 -0
- package/lib/panels/index.d.ts +9 -0
- package/lib/panels/index.js +25 -0
- package/lib/panels/sourceBarPanel.less +4 -0
- package/lib/panels/styles.less +331 -0
- package/lib/simulators/MobileSimulator/body.d.ts +4 -0
- package/lib/simulators/MobileSimulator/body.js +63 -0
- package/lib/simulators/MobileSimulator/index.d.ts +7 -0
- package/lib/simulators/MobileSimulator/index.js +29 -0
- package/lib/simulators/MobileSimulator/styles.less +29 -0
- package/lib/simulators/PCSimulator/index.d.ts +7 -0
- package/lib/simulators/PCSimulator/index.js +26 -0
- package/lib/simulators/PCSimulator/styles.less +11 -0
- package/lib/simulators/ResponsiveSimulator/handle.d.ts +10 -0
- package/lib/simulators/ResponsiveSimulator/handle.js +35 -0
- package/lib/simulators/ResponsiveSimulator/index.d.ts +7 -0
- package/lib/simulators/ResponsiveSimulator/index.js +186 -0
- package/lib/simulators/ResponsiveSimulator/styles.less +56 -0
- package/lib/simulators/index.d.ts +3 -0
- package/lib/simulators/index.js +19 -0
- package/lib/theme.less +224 -0
- package/lib/types.d.ts +32 -0
- package/lib/types.js +2 -0
- package/lib/variables.less +1 -0
- package/lib/widgets/AuxToolWidget/Copy.d.ts +7 -0
- package/lib/widgets/AuxToolWidget/Copy.js +23 -0
- package/lib/widgets/AuxToolWidget/Cover.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/Cover.js +81 -0
- package/lib/widgets/AuxToolWidget/DashedBox.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/DashedBox.js +49 -0
- package/lib/widgets/AuxToolWidget/Delete.d.ts +7 -0
- package/lib/widgets/AuxToolWidget/Delete.js +23 -0
- package/lib/widgets/AuxToolWidget/DragHandler.d.ts +7 -0
- package/lib/widgets/AuxToolWidget/DragHandler.js +36 -0
- package/lib/widgets/AuxToolWidget/FreeSelection.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/FreeSelection.js +49 -0
- package/lib/widgets/AuxToolWidget/Helpers.d.ts +15 -0
- package/lib/widgets/AuxToolWidget/Helpers.js +130 -0
- package/lib/widgets/AuxToolWidget/Insertion.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/Insertion.js +76 -0
- package/lib/widgets/AuxToolWidget/ResizeHandler.d.ts +6 -0
- package/lib/widgets/AuxToolWidget/ResizeHandler.js +46 -0
- package/lib/widgets/AuxToolWidget/Selection.d.ts +8 -0
- package/lib/widgets/AuxToolWidget/Selection.js +96 -0
- package/lib/widgets/AuxToolWidget/Selector.d.ts +7 -0
- package/lib/widgets/AuxToolWidget/Selector.js +127 -0
- package/lib/widgets/AuxToolWidget/SnapLine.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/SnapLine.js +36 -0
- package/lib/widgets/AuxToolWidget/SpaceBlock.d.ts +2 -0
- package/lib/widgets/AuxToolWidget/SpaceBlock.js +94 -0
- package/lib/widgets/AuxToolWidget/TranslateHandler.d.ts +6 -0
- package/lib/widgets/AuxToolWidget/TranslateHandler.js +39 -0
- package/lib/widgets/AuxToolWidget/index.d.ts +6 -0
- package/lib/widgets/AuxToolWidget/index.js +61 -0
- package/lib/widgets/AuxToolWidget/styles.less +383 -0
- package/lib/widgets/ComponentTreeWidget/index.d.ts +15 -0
- package/lib/widgets/ComponentTreeWidget/index.js +135 -0
- package/lib/widgets/ComponentTreeWidget/styles.less +6 -0
- package/lib/widgets/DesignerToolsWidget/index.d.ts +10 -0
- package/lib/widgets/DesignerToolsWidget/index.js +138 -0
- package/lib/widgets/DesignerToolsWidget/styles.less +29 -0
- package/lib/widgets/DroppableWidget/index.d.ts +15 -0
- package/lib/widgets/DroppableWidget/index.js +49 -0
- package/lib/widgets/DroppableWidget/styles.less +11 -0
- package/lib/widgets/EmptyWidget/index.d.ts +6 -0
- package/lib/widgets/EmptyWidget/index.js +52 -0
- package/lib/widgets/EmptyWidget/styles.less +27 -0
- package/lib/widgets/GhostWidget/index.d.ts +3 -0
- package/lib/widgets/GhostWidget/index.js +61 -0
- package/lib/widgets/GhostWidget/styles.less +20 -0
- package/lib/widgets/HistoryWidget/index.d.ts +3 -0
- package/lib/widgets/HistoryWidget/index.js +34 -0
- package/lib/widgets/HistoryWidget/styles.less +23 -0
- package/lib/widgets/IconWidget/index.d.ts +22 -0
- package/lib/widgets/IconWidget/index.js +137 -0
- package/lib/widgets/IconWidget/styles.less +17 -0
- package/lib/widgets/NodeActionsWidget/index.d.ts +17 -0
- package/lib/widgets/NodeActionsWidget/index.js +54 -0
- package/lib/widgets/NodeActionsWidget/styles.less +53 -0
- package/lib/widgets/NodePathWidget/index.d.ts +7 -0
- package/lib/widgets/NodePathWidget/index.js +40 -0
- package/lib/widgets/NodePathWidget/styles.less +16 -0
- package/lib/widgets/NodeTitleWidget/index.d.ts +6 -0
- package/lib/widgets/NodeTitleWidget/index.js +39 -0
- package/lib/widgets/OutlineWidget/Insertion.d.ts +5 -0
- package/lib/widgets/OutlineWidget/Insertion.js +58 -0
- package/lib/widgets/OutlineWidget/OutlineNode.d.ts +10 -0
- package/lib/widgets/OutlineWidget/OutlineNode.js +169 -0
- package/lib/widgets/OutlineWidget/context.d.ts +8 -0
- package/lib/widgets/OutlineWidget/context.js +5 -0
- package/lib/widgets/OutlineWidget/index.d.ts +10 -0
- package/lib/widgets/OutlineWidget/index.js +94 -0
- package/lib/widgets/OutlineWidget/styles.less +195 -0
- package/lib/widgets/ResourceWidget/index.d.ts +12 -0
- package/lib/widgets/ResourceWidget/index.js +98 -0
- package/lib/widgets/ResourceWidget/styles.less +87 -0
- package/lib/widgets/SimpleResourceWidget/index.d.ts +10 -0
- package/lib/widgets/SimpleResourceWidget/index.js +48 -0
- package/lib/widgets/SimpleResourceWidget/styles.less +57 -0
- package/lib/widgets/TextWidget/index.d.ts +9 -0
- package/lib/widgets/TextWidget/index.js +58 -0
- package/lib/widgets/ViewToolsWidget/index.d.ts +8 -0
- package/lib/widgets/ViewToolsWidget/index.js +37 -0
- package/lib/widgets/index.d.ts +16 -0
- package/lib/widgets/index.js +32 -0
- package/package.json +50 -0
@@ -0,0 +1,383 @@
|
|
1
|
+
@import '../../variables.less';
|
2
|
+
|
3
|
+
@keyframes dn-animate-slide-to-top {
|
4
|
+
from {
|
5
|
+
transform: translateY(-10%);
|
6
|
+
opacity: 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
to {
|
10
|
+
transform: translateY(0);
|
11
|
+
opacity: 0.8;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.@{prefix-cls}-auxtool {
|
16
|
+
transform: perspective(1px) translate3d(0, 0, 0);
|
17
|
+
position: absolute;
|
18
|
+
width: 100%;
|
19
|
+
height: 100%;
|
20
|
+
top: 0;
|
21
|
+
left: 0;
|
22
|
+
pointer-events: none;
|
23
|
+
|
24
|
+
z-index: 9998;
|
25
|
+
}
|
26
|
+
|
27
|
+
.dn-aux-button {
|
28
|
+
button {
|
29
|
+
font-size: 12px !important;
|
30
|
+
display: flex;
|
31
|
+
align-items: center;
|
32
|
+
padding: 0 3px;
|
33
|
+
height: 20px;
|
34
|
+
color: var(--dn-aux-selector-btn-color); //#fff
|
35
|
+
background: var(--dn-aux-selector-btn-bg-color); //#1890ff
|
36
|
+
border-color: var(--dn-aux-selector-btn-border-color); //#1890ff
|
37
|
+
|
38
|
+
&:hover,
|
39
|
+
&:focus {
|
40
|
+
color: var(--dn-aux-selector-btn-hover-color); //#fff
|
41
|
+
background: var(--dn-aux-selector-btn-hover-bg-color); //#40a9ff
|
42
|
+
border-color: var(--dn-aux-selector-btn-hover-border-color); //#40a9ff
|
43
|
+
}
|
44
|
+
|
45
|
+
&:active {
|
46
|
+
color: var(--dn-aux-selector-btn-active-color); //#fff
|
47
|
+
background: var(--dn-aux-selector-btn-active-bg-color); //#096dd9
|
48
|
+
border-color: var(--dn-aux-selector-btn-active-border-color); //#096dd9
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.@{prefix-cls}-aux-cover-rect {
|
54
|
+
&.dragging {
|
55
|
+
background-color: var(--dn-aux-cover-rect-dragging-color);
|
56
|
+
}
|
57
|
+
|
58
|
+
&.dropping {
|
59
|
+
background-color: var(--dn-aux-cover-rect-dropping-color);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.@{prefix-cls}-aux-free-selection {
|
64
|
+
background-color: var(--dn-aux-free-selection-background-color);
|
65
|
+
border-color: var(--dn-aux-free-selection-border-color);
|
66
|
+
}
|
67
|
+
|
68
|
+
.@{prefix-cls}-aux-helpers {
|
69
|
+
position: absolute;
|
70
|
+
pointer-events: all;
|
71
|
+
z-index: 10;
|
72
|
+
user-select: none;
|
73
|
+
|
74
|
+
.dn-aux-button();
|
75
|
+
|
76
|
+
&.bottom-right {
|
77
|
+
top: 100%;
|
78
|
+
right: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
&.bottom-left {
|
82
|
+
top: 100%;
|
83
|
+
left: 0;
|
84
|
+
}
|
85
|
+
|
86
|
+
&.bottom-center {
|
87
|
+
top: 100%;
|
88
|
+
left: 50%;
|
89
|
+
transform: translateX(-50%);
|
90
|
+
}
|
91
|
+
|
92
|
+
&.inner-top-right {
|
93
|
+
top: -2px;
|
94
|
+
right: 2px;
|
95
|
+
}
|
96
|
+
|
97
|
+
&.inner-top-left {
|
98
|
+
top: -2px;
|
99
|
+
left: 2px;
|
100
|
+
}
|
101
|
+
|
102
|
+
&.inner-top-center {
|
103
|
+
top: -2px;
|
104
|
+
right: 2px;
|
105
|
+
}
|
106
|
+
|
107
|
+
&.inner-bottom-right {
|
108
|
+
bottom: -2px;
|
109
|
+
right: 2px;
|
110
|
+
}
|
111
|
+
|
112
|
+
&.inner-bottom-left {
|
113
|
+
bottom: -2px;
|
114
|
+
left: 2px;
|
115
|
+
}
|
116
|
+
|
117
|
+
&.inner-bottom-center {
|
118
|
+
bottom: -2px;
|
119
|
+
right: 2px;
|
120
|
+
}
|
121
|
+
|
122
|
+
&.top-right {
|
123
|
+
bottom: 100%;
|
124
|
+
right: 0;
|
125
|
+
}
|
126
|
+
|
127
|
+
&.top-left {
|
128
|
+
bottom: 100%;
|
129
|
+
left: 0;
|
130
|
+
}
|
131
|
+
|
132
|
+
&.top-center {
|
133
|
+
bottom: 100%;
|
134
|
+
left: 50%;
|
135
|
+
transform: translateX(-50%);
|
136
|
+
}
|
137
|
+
|
138
|
+
button {
|
139
|
+
span {
|
140
|
+
transform: scale(0.9);
|
141
|
+
margin-left: 2px;
|
142
|
+
|
143
|
+
&.@{prefix-cls}-icon {
|
144
|
+
transform: scale(1);
|
145
|
+
margin-left: 0;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
&-content {
|
151
|
+
display: flex;
|
152
|
+
flex-wrap: nowrap;
|
153
|
+
white-space: nowrap;
|
154
|
+
|
155
|
+
button {
|
156
|
+
font-size: 12px !important;
|
157
|
+
display: flex;
|
158
|
+
align-items: center;
|
159
|
+
padding: 0 3px;
|
160
|
+
height: 20px;
|
161
|
+
}
|
162
|
+
|
163
|
+
& > * {
|
164
|
+
margin-top: 4px;
|
165
|
+
margin-bottom: 4px;
|
166
|
+
margin-left: 2px;
|
167
|
+
|
168
|
+
&:first-child {
|
169
|
+
margin-left: 0;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
.@{prefix-cls}-aux-insertion {
|
176
|
+
background-color: var(--dn-aux-insertion-color);
|
177
|
+
}
|
178
|
+
|
179
|
+
.@{prefix-cls}-aux-dashed-box {
|
180
|
+
border: 1px dashed var(--dn-aux-dashed-box-color);
|
181
|
+
|
182
|
+
&-title {
|
183
|
+
color: var(--dn-aux-dashed-box-title-color);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
.@{prefix-cls}-aux-selection-box {
|
188
|
+
border: 2px solid var(--dn-aux-selection-box-border-color);
|
189
|
+
position: relative;
|
190
|
+
pointer-events: none;
|
191
|
+
|
192
|
+
&-inner {
|
193
|
+
position: absolute;
|
194
|
+
top: 0;
|
195
|
+
left: 0;
|
196
|
+
right: 0;
|
197
|
+
bottom: 0;
|
198
|
+
}
|
199
|
+
|
200
|
+
&-title {
|
201
|
+
color: var(--dn-aux-selection-box-color);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
.@{prefix-cls}-aux-selector {
|
206
|
+
.dn-aux-button();
|
207
|
+
|
208
|
+
&-menu {
|
209
|
+
margin-top: -4px;
|
210
|
+
animation: dn-animate-slide-to-top 0.2s;
|
211
|
+
opacity: 0.8;
|
212
|
+
|
213
|
+
button {
|
214
|
+
font-size: 12px !important;
|
215
|
+
display: flex;
|
216
|
+
align-items: center;
|
217
|
+
padding: 0 3px;
|
218
|
+
height: 20px;
|
219
|
+
margin-top: 2px;
|
220
|
+
}
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
.@{prefix-cls}-aux-drag-handler {
|
225
|
+
cursor: move;
|
226
|
+
}
|
227
|
+
|
228
|
+
.@{prefix-cls}-aux-node-resize-handler {
|
229
|
+
position: absolute;
|
230
|
+
width: 10px;
|
231
|
+
height: 10px;
|
232
|
+
pointer-events: all;
|
233
|
+
border-radius: 10px;
|
234
|
+
background-color: #fff;
|
235
|
+
border: 1px solid var(--dn-brand-color);
|
236
|
+
|
237
|
+
&.left-center {
|
238
|
+
left: 0;
|
239
|
+
top: 50%;
|
240
|
+
transform: translate(calc(-50% - 1px), -50%);
|
241
|
+
cursor: ew-resize;
|
242
|
+
}
|
243
|
+
|
244
|
+
&.right-center {
|
245
|
+
left: 100%;
|
246
|
+
top: 50%;
|
247
|
+
transform: translate(calc(-50% + 1px), -50%);
|
248
|
+
cursor: ew-resize;
|
249
|
+
}
|
250
|
+
|
251
|
+
&.center-top {
|
252
|
+
left: 50%;
|
253
|
+
top: 0;
|
254
|
+
transform: translate(-50%, calc(-50% - 1px));
|
255
|
+
cursor: ns-resize;
|
256
|
+
}
|
257
|
+
|
258
|
+
&.center-bottom {
|
259
|
+
left: 50%;
|
260
|
+
top: 100%;
|
261
|
+
transform: translate(-50%, calc(-50% + 1px));
|
262
|
+
cursor: ns-resize;
|
263
|
+
}
|
264
|
+
|
265
|
+
&.left-top {
|
266
|
+
left: 0;
|
267
|
+
top: 0;
|
268
|
+
transform: translate(calc(-50% + 1px), calc(-50% + 1px));
|
269
|
+
cursor: nwse-resize;
|
270
|
+
}
|
271
|
+
|
272
|
+
&.left-bottom {
|
273
|
+
left: 0;
|
274
|
+
top: 100%;
|
275
|
+
transform: translate(-50%, -50%);
|
276
|
+
cursor: nesw-resize;
|
277
|
+
}
|
278
|
+
|
279
|
+
&.right-bottom {
|
280
|
+
left: 100%;
|
281
|
+
top: 100%;
|
282
|
+
transform: translate(-50%, -50%);
|
283
|
+
cursor: nwse-resize;
|
284
|
+
}
|
285
|
+
|
286
|
+
&.right-top {
|
287
|
+
left: 100%;
|
288
|
+
top: 0;
|
289
|
+
transform: translate(-50%, -50%);
|
290
|
+
cursor: nesw-resize;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
.@{prefix-cls}-aux-node-translate-handler {
|
295
|
+
position: absolute;
|
296
|
+
display: flex;
|
297
|
+
align-items: center;
|
298
|
+
justify-content: center;
|
299
|
+
border-radius: 2px;
|
300
|
+
width: 40px;
|
301
|
+
height: 20px;
|
302
|
+
background: #1890ff;
|
303
|
+
opacity: 0.5;
|
304
|
+
pointer-events: all;
|
305
|
+
}
|
306
|
+
|
307
|
+
.@{prefix-cls}-aux-space-block-ruler-indicator {
|
308
|
+
position: absolute;
|
309
|
+
background-color: var(--dn-brand-color);
|
310
|
+
color: var(--dn-white);
|
311
|
+
border-radius: 8px;
|
312
|
+
z-index: 2;
|
313
|
+
display: flex;
|
314
|
+
align-items: center;
|
315
|
+
justify-content: center;
|
316
|
+
|
317
|
+
span {
|
318
|
+
margin: 0 6px;
|
319
|
+
display: inline-block;
|
320
|
+
font-size: 12px;
|
321
|
+
}
|
322
|
+
}
|
323
|
+
|
324
|
+
.@{prefix-cls}-aux-space-block-ruler-h {
|
325
|
+
position: absolute;
|
326
|
+
top: 50%;
|
327
|
+
left: 0;
|
328
|
+
transform: translate(0, -50%);
|
329
|
+
width: 100%;
|
330
|
+
height: 12px;
|
331
|
+
border-left: 1px solid var(--dn-brand-color);
|
332
|
+
border-right: 1px solid var(--dn-brand-color);
|
333
|
+
|
334
|
+
&::after {
|
335
|
+
content: '';
|
336
|
+
display: block;
|
337
|
+
position: absolute;
|
338
|
+
top: 50%;
|
339
|
+
left: 0;
|
340
|
+
right: 0;
|
341
|
+
transform: translate(0, -50%);
|
342
|
+
width: 100%;
|
343
|
+
height: 1px;
|
344
|
+
background-color: var(--dn-brand-color);
|
345
|
+
z-index: 1;
|
346
|
+
}
|
347
|
+
|
348
|
+
.@{prefix-cls}-aux-space-block-ruler-indicator {
|
349
|
+
left: 50%;
|
350
|
+
top: 50%;
|
351
|
+
transform: translate(-50%, -50%) scale(0.7);
|
352
|
+
}
|
353
|
+
}
|
354
|
+
|
355
|
+
.@{prefix-cls}-aux-space-block-ruler-v {
|
356
|
+
position: absolute;
|
357
|
+
top: 0;
|
358
|
+
left: 50%;
|
359
|
+
transform: translate(-50%, 0);
|
360
|
+
height: 100%;
|
361
|
+
width: 12px;
|
362
|
+
border-top: 1px solid var(--dn-brand-color);
|
363
|
+
border-bottom: 1px solid var(--dn-brand-color);
|
364
|
+
|
365
|
+
&::after {
|
366
|
+
content: '';
|
367
|
+
display: block;
|
368
|
+
position: absolute;
|
369
|
+
top: 0;
|
370
|
+
left: 50%;
|
371
|
+
transform: translate(-50%, 0);
|
372
|
+
height: 100%;
|
373
|
+
width: 1px;
|
374
|
+
background-color: var(--dn-brand-color);
|
375
|
+
z-index: 1;
|
376
|
+
}
|
377
|
+
|
378
|
+
.@{prefix-cls}-aux-space-block-ruler-indicator {
|
379
|
+
left: 50%;
|
380
|
+
top: 50%;
|
381
|
+
transform: translate(-50%, -50%) scale(0.7);
|
382
|
+
}
|
383
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IDesignerComponents } from '../../types';
|
3
|
+
import { TreeNode } from '@mdesignable/core';
|
4
|
+
import './styles.less';
|
5
|
+
export interface IComponentTreeWidgetProps {
|
6
|
+
style?: React.CSSProperties;
|
7
|
+
className?: string;
|
8
|
+
components: IDesignerComponents;
|
9
|
+
}
|
10
|
+
export interface ITreeNodeWidgetProps {
|
11
|
+
node: TreeNode;
|
12
|
+
children?: React.ReactChild;
|
13
|
+
}
|
14
|
+
export declare const TreeNodeWidget: React.FC<ITreeNodeWidgetProps>;
|
15
|
+
export declare const ComponentTreeWidget: React.FC<IComponentTreeWidgetProps>;
|
@@ -0,0 +1,135 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
14
|
+
if (k2 === undefined) k2 = k;
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
18
|
+
}
|
19
|
+
Object.defineProperty(o, k2, desc);
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
36
|
+
var __read = (this && this.__read) || function (o, n) {
|
37
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
38
|
+
if (!m) return o;
|
39
|
+
var i = m.call(o), r, ar = [], e;
|
40
|
+
try {
|
41
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
42
|
+
}
|
43
|
+
catch (error) { e = { error: error }; }
|
44
|
+
finally {
|
45
|
+
try {
|
46
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
47
|
+
}
|
48
|
+
finally { if (e) throw e.error; }
|
49
|
+
}
|
50
|
+
return ar;
|
51
|
+
};
|
52
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
53
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
54
|
+
if (ar || !(i in from)) {
|
55
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
56
|
+
ar[i] = from[i];
|
57
|
+
}
|
58
|
+
}
|
59
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
60
|
+
};
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
63
|
+
};
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
65
|
+
exports.ComponentTreeWidget = exports.TreeNodeWidget = void 0;
|
66
|
+
var react_1 = __importStar(require("react"));
|
67
|
+
var hooks_1 = require("../../hooks");
|
68
|
+
var context_1 = require("../../context");
|
69
|
+
var core_1 = require("@mdesignable/core");
|
70
|
+
var reactive_react_1 = require("@formily/reactive-react");
|
71
|
+
var classnames_1 = __importDefault(require("classnames"));
|
72
|
+
require("./styles.less");
|
73
|
+
exports.TreeNodeWidget = (0, reactive_react_1.observer)(function (props) {
|
74
|
+
var _a, _b;
|
75
|
+
var designer = (0, hooks_1.useDesigner)((_b = (_a = props.node) === null || _a === void 0 ? void 0 : _a.designerProps) === null || _b === void 0 ? void 0 : _b.effects);
|
76
|
+
var components = (0, hooks_1.useComponents)();
|
77
|
+
var node = props.node;
|
78
|
+
var renderChildren = function () {
|
79
|
+
var _a, _b;
|
80
|
+
if ((_a = node === null || node === void 0 ? void 0 : node.designerProps) === null || _a === void 0 ? void 0 : _a.selfRenderChildren)
|
81
|
+
return [];
|
82
|
+
return (_b = node === null || node === void 0 ? void 0 : node.children) === null || _b === void 0 ? void 0 : _b.map(function (child) {
|
83
|
+
return react_1.default.createElement(exports.TreeNodeWidget, { key: child.id, node: child });
|
84
|
+
});
|
85
|
+
};
|
86
|
+
var renderProps = function (extendsProps) {
|
87
|
+
var _a, _b, _c;
|
88
|
+
if (extendsProps === void 0) { extendsProps = {}; }
|
89
|
+
var props = __assign(__assign(__assign(__assign({}, (_a = node.designerProps) === null || _a === void 0 ? void 0 : _a.defaultProps), extendsProps), node.props), (_c = (_b = node.designerProps) === null || _b === void 0 ? void 0 : _b.getComponentProps) === null || _c === void 0 ? void 0 : _c.call(_b, node));
|
90
|
+
if (node.depth === 0) {
|
91
|
+
delete props.style;
|
92
|
+
}
|
93
|
+
return props;
|
94
|
+
};
|
95
|
+
var renderComponent = function () {
|
96
|
+
var _a, _b;
|
97
|
+
var componentName = node.componentName;
|
98
|
+
var Component = components[componentName];
|
99
|
+
var dataId = {};
|
100
|
+
if (Component) {
|
101
|
+
if (designer) {
|
102
|
+
dataId[(_a = designer === null || designer === void 0 ? void 0 : designer.props) === null || _a === void 0 ? void 0 : _a.nodeIdAttrName] = node.id;
|
103
|
+
}
|
104
|
+
return react_1.default.createElement.apply(react_1.default, __spreadArray([Component,
|
105
|
+
renderProps(dataId)], __read(renderChildren()), false));
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
if ((_b = node === null || node === void 0 ? void 0 : node.children) === null || _b === void 0 ? void 0 : _b.length) {
|
109
|
+
return react_1.default.createElement(react_1.Fragment, null, renderChildren());
|
110
|
+
}
|
111
|
+
}
|
112
|
+
};
|
113
|
+
if (!node)
|
114
|
+
return null;
|
115
|
+
if (node.hidden)
|
116
|
+
return null;
|
117
|
+
return react_1.default.createElement(context_1.TreeNodeContext.Provider, { value: node }, renderComponent());
|
118
|
+
});
|
119
|
+
exports.ComponentTreeWidget = (0, reactive_react_1.observer)(function (props) {
|
120
|
+
var _a, _b;
|
121
|
+
var tree = (0, hooks_1.useTree)();
|
122
|
+
var prefix = (0, hooks_1.usePrefix)('component-tree');
|
123
|
+
var designer = (0, hooks_1.useDesigner)();
|
124
|
+
var dataId = {};
|
125
|
+
if (designer && tree) {
|
126
|
+
dataId[(_a = designer === null || designer === void 0 ? void 0 : designer.props) === null || _a === void 0 ? void 0 : _a.nodeIdAttrName] = tree.id;
|
127
|
+
}
|
128
|
+
(0, react_1.useEffect)(function () {
|
129
|
+
core_1.GlobalRegistry.registerDesignerBehaviors(props.components);
|
130
|
+
}, []);
|
131
|
+
return (react_1.default.createElement("div", __assign({ style: __assign(__assign({}, props.style), (_b = tree === null || tree === void 0 ? void 0 : tree.props) === null || _b === void 0 ? void 0 : _b.style), className: (0, classnames_1.default)(prefix, props.className) }, dataId),
|
132
|
+
react_1.default.createElement(context_1.DesignerComponentsContext.Provider, { value: props.components },
|
133
|
+
react_1.default.createElement(exports.TreeNodeWidget, { node: tree }))));
|
134
|
+
});
|
135
|
+
exports.ComponentTreeWidget.displayName = 'ComponentTreeWidget';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './styles.less';
|
3
|
+
type DesignerToolsType = 'HISTORY' | 'CURSOR' | 'SCREEN_TYPE';
|
4
|
+
export type IDesignerToolsWidgetProps = {
|
5
|
+
className?: string;
|
6
|
+
style?: React.CSSProperties;
|
7
|
+
use?: DesignerToolsType[];
|
8
|
+
};
|
9
|
+
export declare const DesignerToolsWidget: React.FC<IDesignerToolsWidgetProps>;
|
10
|
+
export {};
|
@@ -0,0 +1,138 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.DesignerToolsWidget = void 0;
|
30
|
+
var react_1 = __importStar(require("react"));
|
31
|
+
var antd_1 = require("antd");
|
32
|
+
var reactive_react_1 = require("@formily/reactive-react");
|
33
|
+
var core_1 = require("@mdesignable/core");
|
34
|
+
var hooks_1 = require("../../hooks");
|
35
|
+
var IconWidget_1 = require("../IconWidget");
|
36
|
+
var classnames_1 = __importDefault(require("classnames"));
|
37
|
+
require("./styles.less");
|
38
|
+
exports.DesignerToolsWidget = (0, reactive_react_1.observer)(function (props) {
|
39
|
+
var screen = (0, hooks_1.useScreen)();
|
40
|
+
var cursor = (0, hooks_1.useCursor)();
|
41
|
+
var workbench = (0, hooks_1.useWorkbench)();
|
42
|
+
var history = (0, hooks_1.useHistory)();
|
43
|
+
var sizeRef = (0, react_1.useRef)({});
|
44
|
+
var prefix = (0, hooks_1.usePrefix)('designer-tools');
|
45
|
+
var renderHistoryController = function () {
|
46
|
+
if (!props.use.includes('HISTORY'))
|
47
|
+
return null;
|
48
|
+
return (react_1.default.createElement(antd_1.Button.Group, { size: "small", style: { marginRight: 20 } },
|
49
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: !(history === null || history === void 0 ? void 0 : history.allowUndo), onClick: function () {
|
50
|
+
history.undo();
|
51
|
+
} },
|
52
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Undo" })),
|
53
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: !(history === null || history === void 0 ? void 0 : history.allowRedo), onClick: function () {
|
54
|
+
history.redo();
|
55
|
+
} },
|
56
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Redo" }))));
|
57
|
+
};
|
58
|
+
var renderCursorController = function () {
|
59
|
+
if (workbench.type !== 'DESIGNABLE')
|
60
|
+
return null;
|
61
|
+
if (!props.use.includes('CURSOR'))
|
62
|
+
return null;
|
63
|
+
return (react_1.default.createElement(antd_1.Button.Group, { size: "small", style: { marginRight: 20 } },
|
64
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: cursor.type === core_1.CursorType.Normal, onClick: function () {
|
65
|
+
cursor.setType(core_1.CursorType.Normal);
|
66
|
+
} },
|
67
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Move" })),
|
68
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: cursor.type === core_1.CursorType.Selection, onClick: function () {
|
69
|
+
cursor.setType(core_1.CursorType.Selection);
|
70
|
+
} },
|
71
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Selection" }))));
|
72
|
+
};
|
73
|
+
var renderResponsiveController = function () {
|
74
|
+
if (!props.use.includes('SCREEN_TYPE'))
|
75
|
+
return null;
|
76
|
+
if (screen.type !== core_1.ScreenType.Responsive)
|
77
|
+
return null;
|
78
|
+
return (react_1.default.createElement(react_1.Fragment, null,
|
79
|
+
react_1.default.createElement(antd_1.InputNumber, { size: "small", value: screen.width, style: { width: 70, textAlign: 'center' }, onChange: function (value) {
|
80
|
+
sizeRef.current.width = value;
|
81
|
+
}, onPressEnter: function () {
|
82
|
+
screen.setSize(sizeRef.current.width, screen.height);
|
83
|
+
} }),
|
84
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { size: 10, infer: "Close", style: { padding: '0 3px', color: '#999' } }),
|
85
|
+
react_1.default.createElement(antd_1.InputNumber, { value: screen.height, size: "small", style: {
|
86
|
+
width: 70,
|
87
|
+
textAlign: 'center',
|
88
|
+
marginRight: 10,
|
89
|
+
}, onChange: function (value) {
|
90
|
+
sizeRef.current.height = value;
|
91
|
+
}, onPressEnter: function () {
|
92
|
+
screen.setSize(screen.width, sizeRef.current.height);
|
93
|
+
} }),
|
94
|
+
(screen.width !== '100%' || screen.height !== '100%') && (react_1.default.createElement(antd_1.Button, { size: "small", style: { marginRight: 20 }, onClick: function () {
|
95
|
+
screen.resetSize();
|
96
|
+
} },
|
97
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Recover" })))));
|
98
|
+
};
|
99
|
+
var renderScreenTypeController = function () {
|
100
|
+
if (!props.use.includes('SCREEN_TYPE'))
|
101
|
+
return null;
|
102
|
+
return (react_1.default.createElement(antd_1.Button.Group, { size: "small", style: { marginRight: 20 } },
|
103
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: screen.type === core_1.ScreenType.PC, onClick: function () {
|
104
|
+
screen.setType(core_1.ScreenType.PC);
|
105
|
+
} },
|
106
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "PC" })),
|
107
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: screen.type === core_1.ScreenType.Mobile, onClick: function () {
|
108
|
+
screen.setType(core_1.ScreenType.Mobile);
|
109
|
+
} },
|
110
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Mobile" })),
|
111
|
+
react_1.default.createElement(antd_1.Button, { size: "small", disabled: screen.type === core_1.ScreenType.Responsive, onClick: function () {
|
112
|
+
screen.setType(core_1.ScreenType.Responsive);
|
113
|
+
} },
|
114
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Responsive" }))));
|
115
|
+
};
|
116
|
+
var renderMobileController = function () {
|
117
|
+
if (!props.use.includes('SCREEN_TYPE'))
|
118
|
+
return null;
|
119
|
+
if (screen.type !== core_1.ScreenType.Mobile)
|
120
|
+
return;
|
121
|
+
return (react_1.default.createElement(antd_1.Button, { size: "small", style: { marginRight: 20 }, onClick: function () {
|
122
|
+
screen.setFlip(!screen.flip);
|
123
|
+
} },
|
124
|
+
react_1.default.createElement(IconWidget_1.IconWidget, { infer: "Flip", style: {
|
125
|
+
transition: 'all .15s ease-in',
|
126
|
+
transform: screen.flip ? 'rotate(-90deg)' : '',
|
127
|
+
} })));
|
128
|
+
};
|
129
|
+
return (react_1.default.createElement("div", { style: props.style, className: (0, classnames_1.default)(prefix, props.className) },
|
130
|
+
renderHistoryController(),
|
131
|
+
renderCursorController(),
|
132
|
+
renderScreenTypeController(),
|
133
|
+
renderMobileController(),
|
134
|
+
renderResponsiveController()));
|
135
|
+
});
|
136
|
+
exports.DesignerToolsWidget.defaultProps = {
|
137
|
+
use: ['HISTORY', 'CURSOR', 'SCREEN_TYPE'],
|
138
|
+
};
|