diff --git a/dist/meta-diagram.cjs.development.js.map b/dist/meta-diagram.cjs.development.js.map index 82703e0..7b3abb1 100644 --- a/dist/meta-diagram.cjs.development.js.map +++ b/dist/meta-diagram.cjs.development.js.map @@ -1 +1 @@ -{"version":3,"file":"meta-diagram.cjs.development.js","sources":["../src/models/MetaOptions.ts","../src/models/MetaNode.ts","../src/models/MetaLink.ts","../src/models/ComponentsMap.ts","../src/constants.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/helpers/linksHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/theme.ts","../src/models/Position.ts","../src/index.tsx"],"sourcesContent":["import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n"],"names":["MetaOptions","constructor","id","name","shape","options","set","getId","get","getShape","MetaNode","position","children","MetaLink","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","ComponentsMap","nodesMap","linksMap","nodes","links","ReactDiagramMetaTypes","MetaNodeModel","NodeModel","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","getNode","find","n","getLinkModel","metaLink","link","Object","fromEntries","source","target","setSourcePort","getPort","setTargetPort","undefined","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","borderColor","width","border","borderTop","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","CursorActive","toString","alt","Cursor","MoveActive","Move","Divider","Node","IconActive","Icon","FullscreenActive","Fullscreen","applicationTheme","params","components","MuiCssBaseline","styleOverrides","MuiList","root","padding","background","borderRadius","alignItems","justifyContent","marginBottom","opacity","boxShadow","color","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","height","backgroundColor","customVariables","Position","x","y","_","container","canvasContainer","MetaDiagram","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","ml","filter","mlm","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customThemeVariables","CssBaseline","CanvasWidget","canvasClassName"],"mappings":";;;;;;;;;;;;;;;;;MAGaA;EAGXC,YACEC,IACAC,MACAC,OACAC;IAEA,KAAKA,OAAL,GAAeA,OAAf;IACA,KAAKA,OAAL,CAAaC,GAAb,CAAiB,IAAjB,EAAuBJ,EAAvB;IACA,KAAKG,OAAL,CAAaC,GAAb,CAAiB,MAAjB,EAAyBH,IAAzB;IACA,KAAKE,OAAL,CAAaC,GAAb,CAAiB,OAAjB,EAA0BF,KAA1B;;;EAGFG,KAAK;IACH,OAAO,KAAKF,OAAL,CAAaG,GAAb,CAAiB,IAAjB,CAAP;;;EAGFC,QAAQ;IACN,OAAO,KAAKJ,OAAL,CAAaG,GAAb,CAAiB,OAAjB,CAAP;;;;;MCpBSE;EAIXT,YACEC,IACAC,MACAC,OACAO,UACAN;IAEA,KAAKO,QAAL,GAAgB,EAAhB;IACAP,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBK,QAAxB;IACA,KAAKN,OAAL,GAAe,IAAIL,WAAJ,CAAgBE,EAAhB,EAAoBC,IAApB,EAA0BC,KAA1B,EAAiCC,OAAjC,CAAf;;;;;MCbSQ;EAOXZ,YACEC,IACAC,MACAC,OACAU,UACAC,cACAC,UACAC,cACAZ;IAEA,KAAKS,QAAL,GAAgBA,QAAhB;IACA,KAAKC,YAAL,GAAoBA,YAApB;IACA,KAAKC,QAAL,GAAgBA,QAAhB;IACA,KAAKC,YAAL,GAAoBA,YAApB;IACA,KAAKZ,OAAL,GAAe,IAAIL,WAAJ,CAAgBE,EAAhB,EAAoBC,IAApB,EAA0BC,KAA1B,EAAiCC,OAAjC,CAAf;;;EAGFa,WAAW;IACT,OAAO,KAAKJ,QAAZ;;;EAGFK,eAAe;IACb,OAAO,KAAKJ,YAAZ;;;EAGFK,WAAW;IACT,OAAO,KAAKJ,QAAZ;;;EAGFK,eAAe;IACb,OAAO,KAAKJ,YAAZ;;;;;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oB,MAAM,CAAC6I,QAAP,CAAgB/I,KAAhB;EAEA,MAAMgJ,kBAAkB,GAAGd,gBAAgB,GACvCA,gBADuC,GAEvC7D,OAAO,CAACwD,SAFZ;EAIA,OACErI,mBAAA,CAACyJ,sBAAD;IAAeC,KAAK,EAAEC,oBAAW,CAACD,KAAK,CAACf,SAAD,oBAACA,SAAS,CAAEiB,oBAAZ,CAAN;GAAjC,EACE5J,mBAAA,CAAC6J,WAAD,MAAA,CADF,EAEE7J,mBAAA,CAACgF,YAAD;IAAKC,SAAS,EAAEuE;GAAhB,EACExJ,mBAAA,CAAC4E,OAAD,MAAA,CADF,EAEE5E,mBAAA,CAAC8J,4BAAD;IACE7E,SAAS,mBAAmB0D,SAAjB,oBAAiBA,SAAS,CAAEoB;IACvCrJ,MAAM,EAAEA;GAFV,CAFF,CAFF,CADF;AAYD,CArDD;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"meta-diagram.cjs.development.js","sources":["../src/models/MetaOptions.ts","../src/models/MetaNode.ts","../src/models/MetaLink.ts","../src/models/ComponentsMap.ts","../src/constants.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/helpers/linksHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/theme.ts","../src/models/Position.ts","../src/index.tsx"],"sourcesContent":["import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n"],"names":["MetaOptions","constructor","id","name","shape","options","set","getId","get","getShape","MetaNode","position","children","MetaLink","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","ComponentsMap","nodesMap","linksMap","nodes","links","ReactDiagramMetaTypes","MetaNodeModel","NodeModel","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","getNode","find","n","getLinkModel","metaLink","link","Object","fromEntries","source","target","setSourcePort","getPort","setTargetPort","undefined","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","borderColor","width","border","borderTop","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","CursorActive","toString","alt","Cursor","MoveActive","Move","Divider","Node","IconActive","Icon","FullscreenActive","Fullscreen","applicationTheme","params","components","MuiCssBaseline","styleOverrides","MuiList","root","padding","background","borderRadius","alignItems","justifyContent","marginBottom","opacity","boxShadow","color","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","height","backgroundColor","customVariables","Position","x","y","_","container","canvasContainer","MetaDiagram","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","ml","filter","mlm","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customThemeVariables","CssBaseline","CanvasWidget","canvasClassName"],"mappings":";;;;;;;;;;;;;;;;;MAGaA;EAGXC,YACEC,IACAC,MACAC,OACAC;IAEA,KAAKA,OAAL,GAAeA,OAAf;IACA,KAAKA,OAAL,CAAaC,GAAb,CAAiB,IAAjB,EAAuBJ,EAAvB;IACA,KAAKG,OAAL,CAAaC,GAAb,CAAiB,MAAjB,EAAyBH,IAAzB;IACA,KAAKE,OAAL,CAAaC,GAAb,CAAiB,OAAjB,EAA0BF,KAA1B;;;EAGFG,KAAK;IACH,OAAO,KAAKF,OAAL,CAAaG,GAAb,CAAiB,IAAjB,CAAP;;;EAGFC,QAAQ;IACN,OAAO,KAAKJ,OAAL,CAAaG,GAAb,CAAiB,OAAjB,CAAP;;;;;MCpBSE;EAIXT,YACEC,IACAC,MACAC,OACAO,UACAN;IAEA,KAAKO,QAAL,GAAgB,EAAhB;IACAP,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBK,QAAxB;IACA,KAAKN,OAAL,GAAe,IAAIL,WAAJ,CAAgBE,EAAhB,EAAoBC,IAApB,EAA0BC,KAA1B,EAAiCC,OAAjC,CAAf;;;;;MCbSQ;EAOXZ,YACEC,IACAC,MACAC,OACAU,UACAC,cACAC,UACAC,cACAZ;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AAM3J,KAAK,GAAGmJ,SAAS,CAACS,GAAV,CACZC,EAAE,IAAI,IAAI1J,aAAJ,CAAkBkC,MAAM,CAACC,WAAP,CAAmBuH,EAAE,CAACjL,OAAH,CAAWA,OAA9B,CAAlB,CADM,CAAd;EAGA,MAAMqB,KAAK,GAAGmJ,SAAS,CACpBQ,GADW,CACPE,EAAE,IAAI5H,YAAY,CAAC4H,EAAD,EAAK9J,KAAL,CADX,EAEX+J,MAFW,CAEJC,GAAG,IAAIA,GAAG,KAAKpH,SAFX,CAAd;;EAIAzB,KAAK,CAAC8I,MAAN,CAAa,GAAGjK,KAAhB,EAAuB,GAAGC,KAA1B;;EAGAoB,MAAM,CAAC6I,QAAP,CAAgB/I,KAAhB;EAEA,MAAMgJ,kBAAkB,GAAGd,gBAAgB,GACvCA,gBADuC,GAEvC7D,OAAO,CAACwD,SAFZ;EAIA,OACErI,mBAAA,CAACyJ,sBAAD;IAAeC,KAAK,EAAEC,oBAAW,CAACD,KAAK,CAACf,SAAD,oBAACA,SAAS,CAAEiB,oBAAZ,CAAN;GAAjC,EACE5J,mBAAA,CAAC6J,WAAD,MAAA,CADF,EAEE7J,mBAAA,CAACgF,YAAD;IAAKC,SAAS,EAAEuE;GAAhB,EACExJ,mBAAA,CAAC4E,OAAD,MAAA,CADF,EAEE5E,mBAAA,CAAC8J,4BAAD;IACE7E,SAAS,mBAAmB0D,SAAjB,oBAAiBA,SAAS,CAAEoB;IACvCrJ,MAAM,EAAEA;GAFV,CAFF,CAFF,CADF;AAYD,CArDD;;;;;;;;;;"} diff --git a/dist/meta-diagram.cjs.production.min.js.map b/dist/meta-diagram.cjs.production.min.js.map index 9a9fac4..4eb588c 100644 --- a/dist/meta-diagram.cjs.production.min.js.map +++ b/dist/meta-diagram.cjs.production.min.js.map @@ -1 +1 @@ -{"version":3,"file":"meta-diagram.cjs.production.min.js","sources":["../src/constants.ts","../src/models/MetaOptions.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/index.tsx","../src/models/ComponentsMap.ts","../src/models/MetaLink.ts","../src/models/MetaNode.ts","../src/models/Position.ts","../src/helpers/linksHelper.ts","../src/theme.ts"],"sourcesContent":["export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n"],"names":["ReactDiagramMetaTypes","MetaOptions","constructor","id","name","shape","options","this","set","getId","get","getShape","MetaNodeModel","NodeModel","super","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","_model$getOptions","getNode","nodes","find","n","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","& .MuiDivider-root","borderColor","width","border","borderTop","& img","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","toString","alt","Divider","_","container","height","canvasContainer","background","nodesMap","linksMap","links","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","position","children","x","y","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","Object","fromEntries","ml","metaLink","link","source","target","setSourcePort","getPort","setTargetPort","getLinkModel","filter","mlm","undefined","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customVariables","customThemeVariables","params","components","MuiCssBaseline","styleOverrides","MuiList","root","&.customSwitch","padding","borderRadius","& .MuiListItemButton-root","alignItems","justifyContent","&:not(:last-child)","marginBottom","&.Mui-disabled","opacity","&.Mui-selected","boxShadow","& .MuiTypography-root","color","& .MuiChip-root","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","backgroundColor","&:hover","applicationTheme","CssBaseline","CanvasWidget","canvasClassName"],"mappings":"8IAAYA,yRCGCC,EAGXC,YACEC,EACAC,EACAC,EACAC,GAEAC,KAAKD,QAAUA,EACfC,KAAKD,QAAQE,IAAI,KAAML,GACvBI,KAAKD,QAAQE,IAAI,OAAQJ,GACzBG,K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K,QACD3K,gBAACyE,OAAIC,UAAW2D,GACdrI,gBAACqE,QACDrE,gBAAC4K,gBACClG,kCAA4BmC,SAAAA,EAAWgE,iBACvCnK,OAAQA,UMoJF+H"} \ No newline at end of file +{"version":3,"file":"meta-diagram.cjs.production.min.js","sources":["../src/constants.ts","../src/models/MetaOptions.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/index.tsx","../src/models/ComponentsMap.ts","../src/models/MetaLink.ts","../src/models/MetaNode.ts","../src/models/Position.ts","../src/helpers/linksHelper.ts","../src/theme.ts"],"sourcesContent":["export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n"],"names":["ReactDiagramMetaTypes","MetaOptions","constructor","id","name","shape","options","this","set","getId","get","getShape","MetaNodeModel","NodeModel","super","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","_model$getOptions","getNode","nodes","find","n","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","& .MuiDivider-root","borderColor","width","border","borderTop","& img","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","toString","alt","Divider","_","container","height","canvasContainer","background","nodesMap","linksMap","links","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","position","children","x","y","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","Object","fromEntries","ml","metaLink","link","source","target","setSourcePort","getPort","setTargetPort","getLinkModel","filter","mlm","undefined","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customVariables","customThemeVariables","params","components","MuiCssBaseline","styleOverrides","MuiList","root","&.customSwitch","padding","borderRadius","& .MuiListItemButton-root","alignItems","justifyContent","&:not(:last-child)","marginBottom","&.Mui-disabled","opacity","&.Mui-selected","boxShadow","& .MuiTypography-root","color","& .MuiChip-root","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","backgroundColor","&:hover","applicationTheme","CssBaseline","CanvasWidget","canvasClassName"],"mappings":"8IAAYA,yRCGCC,EAGXC,YACEC,EACAC,EACAC,EACAC,GAEAC,KAAKD,QAAUA,EACfC,KAAKD,QAAQE,IAAI,KAAML,GACvBI,KAAKD,QAAQE,IAAI,OAAQJ,GACzBG,KAAKD,QAAQE,IAAI,QAASH,GAG5BI,QACE,OAAOF,KAAKD,QAAQI,IAAI,MAG1BC,WACE,OAAOJ,KAAKD,QAAQI,IAAI,WDvB5B,SAAYV,GACVA,6BACAA,6BAFF,CAAYA,IAAAA,aEGCY,UAAsBC,YACjCX,YAAYI,EAAU,IACpBQ,MAAM,IACDR,EACHS,KAAMf,EAAsBgB,YAK9BT,KAAKU,QACH,IAAIC,mBAAiB,CACnBC,IAAI,EACJf,KAAM,QAGVG,KAAKU,QACH,IAAIC,mBAAiB,CACnBC,IAAI,EACJf,KAAM,gBCnBDgB,EAAoB,IACxBC,iDCGIC,UAAwBC,uBAGnCrB,YAAYsB,GACVV,MAAMd,EAAsBgB,WAC5BT,KAAKiB,cAAgBA,EAGvBC,gBACE,OAAO,IAAIb,EAGbc,oBAAoBC,GAClB,GAAIpB,KAAKiB,cAAcI,IAAID,EAAME,MAAMvB,QAAQD,OAAQ,CACrD,MAAMyB,EAAqBvB,KAAKiB,cAAcd,IAC5CiB,EAAME,MAAMvB,QAAQD,OAGtB,OAAOgB,gBAACS,GAAmBC,OAAQxB,KAAKwB,OAAQF,MAAOF,EAAME,QAG/D,OAAOR,gBAACD,eCxBCY,UAAsBC,mBACjC/B,YAAYI,EAAU,IACpBQ,MAAM,IACDR,EACHS,KAAMf,EAAsBkC,mBCDrBC,UAAwBC,qBAGnClC,YAAYsB,GACVV,MAAMd,EAAsBkC,WAC5B3B,KAAKiB,cAAgBA,EAGvBC,gBACE,OAAO,IAAIO,EAGbK,oBACER,EACAS,EACAC,SAGA,GAAIhC,KAAKiB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,aAAc,MACdG,eAAgB,SAChBkB,gBAAiB3I,EACjB4I,UAAW,CACTD,gBAAiB3I,GAEnB0H,qBAAsB,CACpBC,aAAc,WAEhBG,iBAAkB,CAChBa,gBAAiBlI,EACjBmI,UAAW,CACTD,gBAAiBlI,IAGrBmH,iBAAkB,CAChBC,QAAS,UAUrBgB,CAAiB,IACZjJ,KACAgH,ON5JDzI,gBAAC2K,QACD3K,gBAACyE,OAAIC,UAAW2D,GACdrI,gBAACqE,QACDrE,gBAAC4K,gBACClG,kCAA4BmC,SAAAA,EAAWgE,iBACvCnK,OAAQA,UMoJF+H"} diff --git a/dist/meta-diagram.esm.js.map b/dist/meta-diagram.esm.js.map index 3cb94c9..fd2f609 100644 --- a/dist/meta-diagram.esm.js.map +++ b/dist/meta-diagram.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"meta-diagram.esm.js","sources":["../src/models/MetaOptions.ts","../src/models/MetaNode.ts","../src/models/MetaLink.ts","../src/models/ComponentsMap.ts","../src/constants.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/helpers/linksHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/theme.ts","../src/models/Position.ts","../src/index.tsx"],"sourcesContent":["import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n"],"names":["MetaOptions","constructor","id","name","shape","options","set","getId","get","getShape","MetaNode","position","children","MetaLink","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","ComponentsMap","nodesMap","linksMap","nodes","links","ReactDiagramMetaTypes","MetaNodeModel","NodeModel","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","getNode","find","n","getLinkModel","metaLink","link","Object","fromEntries","source","target","setSourcePort","getPort","setTargetPort","undefined","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","borderColor","width","border","borderTop","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","CursorActive","toString","alt","Cursor","MoveActive","Move","Divider","Node","IconActive","Icon","FullscreenActive","Fullscreen","applicationTheme","params","components","MuiCssBaseline","styleOverrides","MuiList","root","padding","background","borderRadius","alignItems","justifyContent","marginBottom","opacity","boxShadow","color","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","height","backgroundColor","customVariables","Position","x","y","_","container","canvasContainer","MetaDiagram","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","ml","filter","mlm","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customThemeVariables","CssBaseline","CanvasWidget","canvasClassName"],"mappings":";;;;;;;;;MAGaA;EAGXC,YACEC,IACAC,MACAC,OACAC;IAEA,KAAKA,OAAL,GAAeA,OAAf;IACA,KAAKA,OAAL,CAAaC,GAAb,CAAiB,IAAjB,EAAuBJ,EAAvB;IACA,KAAKG,OAAL,CAAaC,GAAb,CAAiB,MAAjB,EAAyBH,IAAzB;IACA,KAAKE,OAAL,CAAaC,GAAb,CAAiB,OAAjB,EAA0BF,KAA1B;;;EAGFG,KAAK;IACH,OAAO,KAAKF,OAAL,CAAaG,GAAb,CAAiB,IAAjB,CAAP;;;EAGFC,QAAQ;IACN,OAAO,KAAKJ,OAAL,CAAaG,GAAb,CAAiB,OAAjB,CAAP;;;;;MCpBSE;EAIXT,YACEC,IACAC,MACAC,OACAO,UACAN;IAEA,KAAKO,QAAL,GAAgB,EAAhB;IACAP,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBK,QAAxB;IACA,KAAKN,OAAL,GAAe,IAAIL,WAAJ,CAAgBE,EAAhB,EAAoBC,IAApB,EAA0BC,KAA1B,EAAiCC,OAAjC,CAAf;;;;;MCbSQ;EAOXZ,YACEC,IACAC,MACAC,OACAU,UACAC,cACAC,UACAC,cACAZ;IAEA,KAAKS,QAAL,GAAgBA,QAAhB;IACA,KAAKC,YAAL,GAAoBA,YA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kC,MAAM,CAACC,WAAP,CAAmBuH,EAAE,CAACjL,OAAH,CAAWA,OAA9B,CAAlB,CADM,CAAd;EAGA,MAAMqB,KAAK,GAAGmJ,SAAS,CACpBQ,GADW,CACPE,EAAE,IAAI5H,YAAY,CAAC4H,EAAD,EAAK9J,KAAL,CADX,EAEX+J,MAFW,CAEJC,GAAG,IAAIA,GAAG,KAAKpH,SAFX,CAAd;;EAIAzB,KAAK,CAAC8I,MAAN,CAAa,GAAGjK,KAAhB,EAAuB,GAAGC,KAA1B;;EAGAoB,MAAM,CAAC6I,QAAP,CAAgB/I,KAAhB;EAEA,MAAMgJ,kBAAkB,GAAGd,gBAAgB,GACvCA,gBADuC,GAEvC7D,OAAO,CAACwD,SAFZ;EAIA,OACErI,aAAA,CAACyJ,aAAD;IAAeC,KAAK,EAAEC,WAAW,CAACD,KAAK,CAACf,SAAD,oBAACA,SAAS,CAAEiB,oBAAZ,CAAN;GAAjC,EACE5J,aAAA,CAAC6J,WAAD,MAAA,CADF,EAEE7J,aAAA,CAACgF,KAAD;IAAKC,SAAS,EAAEuE;GAAhB,EACExJ,aAAA,CAAC4E,OAAD,MAAA,CADF,EAEE5E,aAAA,CAAC8J,YAAD;IACE7E,SAAS,mBAAmB0D,SAAjB,oBAAiBA,SAAS,CAAEoB;IACvCrJ,MAAM,EAAEA;GAFV,CAFF,CAFF,CADF;AAYD,CArDD;;;;;"} \ No newline at end of file +{"version":3,"file":"meta-diagram.esm.js","sources":["../src/models/MetaOptions.ts","../src/models/MetaNode.ts","../src/models/MetaLink.ts","../src/models/ComponentsMap.ts","../src/constants.ts","../src/react-diagrams/MetaNodeModel.ts","../src/components/UnknownTypeWidget.tsx","../src/react-diagrams/MetaNodeFactory.tsx","../src/react-diagrams/MetaLinkModel.ts","../src/react-diagrams/MetaLinkFactory.tsx","../src/helpers/nodesHelper.ts","../src/helpers/linksHelper.ts","../src/components/assets/styles/variables.ts","../src/components/Sidebar.tsx","../src/theme.ts","../src/models/Position.ts","../src/index.tsx"],"sourcesContent":["import { IShape } from './IShape';\nimport { IId } from './IId';\n\nexport class MetaOptions implements IShape, IId {\n options: Map;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n options: Map\n ) {\n this.options = options;\n this.options.set('id', id);\n this.options.set('name', name);\n this.options.set('shape', shape);\n }\n\n getId(): string {\n return this.options.get('id');\n }\n\n getShape(): string {\n return this.options.get('shape');\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { Position } from './Position';\n\nexport class MetaNode {\n children: MetaNode[];\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n position: Position,\n options: Map\n ) {\n this.children = [];\n options.set('position', position);\n this.options = new MetaOptions(id, name, shape, options);\n }\n}\n","import { MetaOptions } from './MetaOptions';\nimport { ILink } from './ILink';\n\nexport class MetaLink implements ILink {\n sourceId: string;\n sourcePortId: string;\n targetId: string;\n targetPortId: string;\n options: MetaOptions;\n\n constructor(\n id: string,\n name: string,\n shape: string,\n sourceId: string,\n sourcePortId: string,\n targetId: string,\n targetPortId: string,\n options: Map\n ) {\n this.sourceId = sourceId;\n this.sourcePortId = sourcePortId;\n this.targetId = targetId;\n this.targetPortId = targetPortId;\n this.options = new MetaOptions(id, name, shape, options);\n }\n\n getSourceId(): string {\n return this.sourceId;\n }\n\n getSourcePortId(): string {\n return this.sourcePortId;\n }\n\n getTargetId(): string {\n return this.targetId;\n }\n\n getTargetPortId(): string {\n return this.targetPortId;\n }\n}\n","import React from 'react';\n\nexport class ComponentsMap {\n nodes: Map;\n links: Map;\n\n constructor(\n nodesMap: Map,\n linksMap: Map\n ) {\n this.nodes = nodesMap;\n this.links = linksMap;\n }\n}\n","export enum ReactDiagramMetaTypes {\n META_NODE = 'meta-node-type',\n META_LINK = 'meta-link-type',\n}\n","import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeModel extends NodeModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_NODE,\n });\n\n // set up an in and out port\n\n this.addPort(\n new DefaultPortModel({\n in: true,\n name: 'in',\n })\n );\n this.addPort(\n new DefaultPortModel({\n in: false,\n name: 'out',\n })\n );\n }\n}\n","import React from 'react';\n\nexport const UnknownTypeWidget = () => {\n return
Unknown Type
;\n};\n","import { AbstractReactFactory } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './MetaNodeModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport React from 'react';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaNodeFactory extends AbstractReactFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_NODE);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaNodeModel();\n }\n\n generateReactWidget(event: any): JSX.Element {\n if (this.componentsMap.has(event.model.options.shape)) {\n const ReactComponentType = this.componentsMap.get(\n event.model.options.shape\n );\n // @ts-ignore\n return ;\n }\n // TODO: Generate default node instead\n return ;\n }\n}\n","import { DefaultLinkModel } from '@projectstorm/react-diagrams';\nimport { ReactDiagramMetaTypes } from '../constants';\n\nexport class MetaLinkModel extends DefaultLinkModel {\n constructor(options = {}) {\n super({\n ...options,\n type: ReactDiagramMetaTypes.META_LINK,\n });\n }\n}\n","import { MetaLinkModel } from './MetaLinkModel';\nimport { UnknownTypeWidget } from '../components/UnknownTypeWidget';\nimport { ReactDiagramMetaTypes } from '../constants';\nimport React from 'react';\nimport { DefaultLinkFactory } from '@projectstorm/react-diagrams';\n\nexport class MetaLinkFactory extends DefaultLinkFactory {\n componentsMap: Map;\n\n constructor(componentsMap: Map) {\n super(ReactDiagramMetaTypes.META_LINK);\n this.componentsMap = componentsMap;\n }\n\n generateModel() {\n return new MetaLinkModel();\n }\n\n generateLinkSegment(\n model: MetaLinkModel,\n selected: boolean,\n path: string\n ): JSX.Element {\n // @ts-ignore\n if (this.componentsMap.has(model.getOptions()?.shape)) {\n const ReactComponentType = this.componentsMap.get(\n // @ts-ignore\n model.getOptions().shape\n );\n\n return (\n // @ts-ignore\n \n );\n }\n // TODO: Generate default link instead\n return ;\n }\n}\n","import { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\n\nexport function getNode(\n id: string,\n nodes: MetaNodeModel[]\n): MetaNodeModel | undefined {\n return nodes.find(n => n.getOptions().id === id);\n}\n","import { MetaLink } from '../models/MetaLink';\nimport { MetaLinkModel } from '../react-diagrams/MetaLinkModel';\nimport { MetaNodeModel } from '../react-diagrams/MetaNodeModel';\nimport { getNode } from './nodesHelper';\n\nexport function getLinkModel(\n metaLink: MetaLink,\n nodes: MetaNodeModel[]\n): MetaLinkModel | undefined {\n const link = new MetaLinkModel(Object.fromEntries(metaLink.options.options));\n const source = getNode(metaLink.getSourceId(), nodes);\n const target = getNode(metaLink.getTargetId(), nodes);\n if (source && target) {\n link.setSourcePort(source.getPort(metaLink.getSourcePortId()));\n link.setTargetPort(target.getPort(metaLink.getTargetPortId()));\n return link;\n }\n return undefined;\n}\n","const vars = {\n fontFamily: 'Inter, sans-serif',\n primaryBg: '#f1f1f1',\n textWhite: '#FFFFFF',\n chipTextColor: '#F2F2F7',\n chipBgColor: 'rgba(60, 60, 67, 0.4)',\n\n chipPrimaryTextColor: 'rgba(255, 255, 255, 0.8)',\n chipPrimaryBgColor: 'rgba(0, 122, 255, 0.6)',\n\n breadcrumbLinkColor: '#A2A2A2',\n breadcrumbTextColor: '#292929',\n\n buttonPrimaryBgColor: '4353FF',\n buttonPrimaryBgHoverColor: '#3443E1',\n buttonPrimaryDisabledBgColor: 'rgba(0, 122, 255, 0.4)',\n\n listItemActiveBg: '#007AFF',\n listSelectedTextColor: '#3C3C43',\n listBoxShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.04)',\n listBorderColor: 'rgba(0, 0, 0, 0.04)',\n\n dividerColor: 'rgba(118, 120, 125, 0.12)',\n\n dropdownBg: 'rgba(246, 246, 248, 0.8)',\n dropdownTextColor: 'rgba(60, 60, 67, 0.6)',\n\n overlayColor: 'rgba(0, 0, 0, 0.4)',\n\n progressBg: '#E5E5E5',\n progressBar: '#017AFF',\n progressShadow: 'inset 0 0 0.0625rem #E3E3E3',\n\n switchShadow:\n '0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.1875rem 0.0625rem rgba(0, 0, 0, 0.06)',\n\n sidebarBg: '#ffffff',\n sidebarShadow: `0 0 3.75rem rgba(0, 0, 0, 0.1),\n 0 0.5rem 2.5rem -0.625rem rgba(0, 0, 0, 0.1)`,\n canvasBg: '#fff',\n showPropertiesButtonBg: '#161A1E',\n nodeBorderColor: '#18A0FB',\n nodePointerBg: '#fff',\n nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',\n nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'\n};\n\nexport default vars;\n","import React from 'react';\nimport { Box } from '@mui/system';\nimport { makeStyles } from '@mui/styles';\nimport vars from './assets/styles/variables';\nimport { Divider, List, ListItemButton, ListItemIcon } from '@mui/material';\nimport Move from './assets/svg/move.svg';\nimport MoveActive from './assets/svg/move-active.svg';\nimport Icon from './assets/svg/icon.svg';\nimport IconActive from './assets/svg/icon-active.svg';\nimport Node from './assets/svg/node.svg';\nimport Cursor from './assets/svg/cursor.svg';\nimport CursorActive from './assets/svg/cursor-active.svg';\nimport Fullscreen from './assets/svg/fullscreen.svg';\nimport FullscreenActive from './assets/svg/fullscreen-active.svg';\n\nconst { dividerColor } = vars;\n\nconst useStyles = makeStyles(() => ({\n node: {\n margin: '0.25rem 0',\n '& .MuiDivider-root': {\n borderColor: dividerColor,\n width: 'calc(100% - 1.5rem)',\n margin: '0 auto',\n border: 'none',\n borderTop: '0.0625rem solid',\n },\n\n '& img': {\n display: 'block',\n margin: '1rem 0',\n },\n },\n}));\n\nconst Sidebar = () => {\n const classes = useStyles();\n const [selected, setSelected] = React.useState(\"1\");\n\n return (\n \n \n setSelected(\"1\")}>\n \n {selected === \"1\" ? : }\n \n \n\n setSelected(\"2\")}>\n \n {selected === \"2\" ? : }\n\n \n \n \n\n \n \n \n \n \n\n \n setSelected(\"3\")}>\n \n {selected === \"3\" ? : }\n \n \n\n setSelected(\"4\")}>\n \n {selected === \"4\" ? : }\n \n \n \n \n );\n};\n\nexport default Sidebar;\n","import vars from './components/assets/styles/variables';\n\ntype ThemeVars = {\n [key: string]: any;\n};\n\nconst applicationTheme = (params: ThemeVars) => {\n const {\n primaryBg,\n fontFamily,\n chipTextColor,\n chipBgColor,\n textWhite,\n listItemActiveBg,\n listSelectedTextColor,\n listBoxShadow,\n listBorderColor,\n sidebarBg,\n sidebarShadow,\n canvasBg,\n showPropertiesButtonBg,\n nodeBorderColor,\n nodePointerBg,\n nodeButtonTextColor,\n nodeButtonLineColor,\n } = params;\n return {\n components: {\n MuiCssBaseline: {\n styleOverrides: `\n html {\n background: ${primaryBg};\n font-family: ${fontFamily};\n }\n body {\n background-color:${primaryBg};\n font-family: ${fontFamily};\n font-size: 1rem;\n }\n .sidebar {\n z-index: 5;\n width: 4rem;\n background: ${sidebarBg};\n box-shadow: ${sidebarShadow};\n border-radius: 2rem;\n position: fixed;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n }\n\n .sidebar.right {\n left: auto;\n right: 1rem;\n }\n\n .sidebar .MuiList-root {\n padding: 0.75rem\n }\n\n .canvas-widget {\n height: 100%;\n width: 100%;\n background-color: ${canvasBg};\n }\n\n .node {\n border: solid 0.0625rem;\n border-radius: 50%;\n width: 10rem;\n height: 10rem;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n position: relative;\n }\n\n .node img {\n margin-bottom: 0.25rem\n }\n\n .node p {\n font-weight: 500;\n font-size: 0.8125rem;\n line-height: 1.25rem;\n letter-spacing: -0.005rem;\n margin: 0;\n }\n\n .node-button.MuiButton-root {\n background-color: ${showPropertiesButtonBg};\n border-radius: 1.125rem;\n font-weight: 600;\n font-size: 0.8125rem;\n display: flex;\n line-height: 1rem;\n letter-spacing: -0.025625rem;\n color: ${nodeButtonTextColor};\n margin: 0 !important;\n width: 9.625rem;\n padding: 0;\n height: 2.25rem;\n position: absolute;\n top: -2.625rem;\n font-family: ${fontFamily};\n text-transform: none;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .node-button.MuiButton-root:hover {\n background-color: ${showPropertiesButtonBg};\n }\n\n .node-button .icon {\n width: 1rem;\n border: solid 0.0625rem;\n height: 1rem;\n border-radius: 50%;\n margin-right: 1.25rem;\n position: relative;\n }\n\n .node-button .icon:after {\n content: \"\";\n height: 1.75rem;\n width: 0.0625rem;\n display: block;\n position: absolute;\n right: -0.625rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: ${nodeButtonLineColor};\n }\n\n .nodes {\n width: 10rem;\n height: 10rem;\n border: 0.09375rem solid ${nodeBorderColor};\n z-index: 99999;\n position: absolute;\n }\n\n .node .pointer {\n width: 0.625rem;\n height: 0.625rem;\n background: ${nodePointerBg};\n border: 0.09375rem solid ${nodeBorderColor};\n border-radius: 0.125rem;\n position: absolute;\n }\n `,\n },\n MuiList: {\n styleOverrides: {\n root: {\n '&.customSwitch': {\n padding: '0.125rem',\n background: chipTextColor,\n borderRadius: '0.5rem',\n display: 'flex',\n '& .MuiListItemButton-root': {\n padding: '0.25rem 0.75rem',\n borderRadius: '0.4375rem',\n width: '10.59375rem',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:not(:last-child)': {\n marginBottom: '0',\n },\n '&.Mui-disabled': {\n opacity: 1,\n },\n '&.Mui-selected': {\n background: textWhite,\n boxShadow: listBoxShadow,\n border: `0.03125rem solid ${listBorderColor}`,\n '& .MuiTypography-root': {\n color: listSelectedTextColor,\n },\n },\n },\n '& .MuiChip-root': {\n marginLeft: '0.25rem',\n },\n '& .MuiTypography-root': {\n fontWeight: 500,\n fontSize: '0.8125rem',\n lineHeight: '1.25rem',\n letterSpacing: '-0.005rem',\n color: chipBgColor,\n margin: 0,\n },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n minWidth: 'inherit',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n padding: 0,\n width: '2.5rem',\n height: '2.5rem',\n borderRadius: '50%',\n justifyContent: 'center',\n backgroundColor: chipTextColor,\n '&:hover': {\n backgroundColor: chipTextColor,\n },\n '&:not(:last-child)': {\n marginBottom: '0.75rem',\n },\n '&.Mui-selected': {\n backgroundColor: listItemActiveBg,\n '&:hover': {\n backgroundColor: listItemActiveBg,\n },\n },\n '&.Mui-disabled': {\n opacity: 0.8,\n },\n },\n },\n },\n },\n };\n};\n\nexport default (customVariables: ThemeVars) =>\n applicationTheme({\n ...vars,\n ...customVariables,\n });\n","export class Position {\n x: number;\n y: number;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n}\n","import * as React from 'react';\nimport { MetaNode } from './models/MetaNode';\nimport { MetaLink } from './models/MetaLink';\nimport { ComponentsMap } from './models/ComponentsMap';\nimport createEngine, { DiagramModel } from '@projectstorm/react-diagrams';\nimport { MetaNodeFactory } from './react-diagrams/MetaNodeFactory';\nimport { MetaLinkFactory } from './react-diagrams/MetaLinkFactory';\nimport { CanvasWidget } from '@projectstorm/react-canvas-core';\nimport { MetaNodeModel } from './react-diagrams/MetaNodeModel';\nimport { getLinkModel } from './helpers/linksHelper';\nimport { makeStyles } from '@mui/styles';\nimport Sidebar from './components/Sidebar';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport theme from './theme';\nimport { Box } from '@mui/material';\n\nconst useStyles = makeStyles(_ => ({\n container: {\n height: '100%',\n width: '100%',\n },\n canvasContainer: {\n height: '100%',\n width: '100%',\n background: '#fffff',\n },\n}));\n\ninterface MetaDiagramProps {\n metaNodes: MetaNode[];\n metaLinks: MetaLink[];\n componentsMap: ComponentsMap;\n wrapperClassName?: string;\n canvasClassName?: string;\n metaTheme: {\n customThemeVariables: {};\n canvasClassName: string;\n };\n}\n\nconst MetaDiagram = ({\n metaNodes,\n metaLinks,\n componentsMap,\n wrapperClassName,\n metaTheme,\n}: MetaDiagramProps) => {\n const classes = useStyles();\n\n // set up the diagram engine\n const engine = createEngine();\n\n engine\n .getNodeFactories()\n // @ts-ignore\n .registerFactory(new MetaNodeFactory(componentsMap.nodes));\n\n engine\n .getLinkFactories()\n // @ts-ignore\n .registerFactory(new MetaLinkFactory(componentsMap.links));\n\n // set up the diagram model\n\n const model = new DiagramModel();\n const nodes = metaNodes.map(\n mn => new MetaNodeModel(Object.fromEntries(mn.options.options))\n );\n const links = metaLinks\n .map(ml => getLinkModel(ml, nodes))\n .filter(mlm => mlm !== undefined);\n // @ts-ignore\n model.addAll(...nodes, ...links);\n\n // load model into engine\n engine.setModel(model);\n\n const containerClassName = wrapperClassName\n ? wrapperClassName\n : classes.container;\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default MetaDiagram;\nexport { MetaNode, MetaLink, MetaNodeModel, ComponentsMap };\nexport { MetaLinkModel } from './react-diagrams/MetaLinkModel';\nexport { Position } from './models/Position';\n"],"names":["MetaOptions","constructor","id","name","shape","options","set","getId","get","getShape","MetaNode","position","children","MetaLink","sourceId","sourcePortId","targetId","targetPortId","getSourceId","getSourcePortId","getTargetId","getTargetPortId","ComponentsMap","nodesMap","linksMap","nodes","links","ReactDiagramMetaTypes","MetaNodeModel","NodeModel","type","META_NODE","addPort","DefaultPortModel","in","UnknownTypeWidget","React","MetaNodeFactory","AbstractReactFactory","componentsMap","generateModel","generateReactWidget","event","has","model","ReactComponentType","engine","MetaLinkModel","DefaultLinkModel","META_LINK","MetaLinkFactory","DefaultLinkFactory","generateLinkSegment","selected","path","getOptions","getNode","find","n","getLinkModel","metaLink","link","Object","fromEntries","source","target","setSourcePort","getPort","setTargetPort","undefined","vars","fontFamily","primaryBg","textWhite","chipTextColor","chipBgColor","chipPrimaryTextColor","chipPrimaryBgColor","breadcrumbLinkColor","breadcrumbTextColor","buttonPrimaryBgColor","buttonPrimaryBgHoverColor","buttonPrimaryDisabledBgColor","listItemActiveBg","listSelectedTextColor","listBoxShadow","listBorderColor","dividerColor","dropdownBg","dropdownTextColor","overlayColor","progressBg","progressBar","progressShadow","switchShadow","sidebarBg","sidebarShadow","canvasBg","showPropertiesButtonBg","nodeBorderColor","nodePointerBg","nodeButtonTextColor","nodeButtonLineColor","useStyles","makeStyles","node","margin","borderColor","width","border","borderTop","display","Sidebar","classes","setSelected","useState","Box","className","List","disablePadding","component","ListItemButton","onClick","ListItemIcon","src","Buffer","CursorActive","toString","alt","Cursor","MoveActive","Move","Divider","Node","IconActive","Icon","FullscreenActive","Fullscreen","applicationTheme","params","components","MuiCssBaseline","styleOverrides","MuiList","root","padding","background","borderRadius","alignItems","justifyContent","marginBottom","opacity","boxShadow","color","marginLeft","fontWeight","fontSize","lineHeight","letterSpacing","MuiListItemIcon","minWidth","MuiListItemButton","height","backgroundColor","customVariables","Position","x","y","_","container","canvasContainer","MetaDiagram","metaNodes","metaLinks","wrapperClassName","metaTheme","createEngine","getNodeFactories","registerFactory","getLinkFactories","DiagramModel","map","mn","ml","filter","mlm","addAll","setModel","containerClassName","ThemeProvider","theme","createTheme","customThemeVariables","CssBaseline","CanvasWidget","canvasClassName"],"mappings":";;;;;;;;;MAGaA;EAGXC,YACEC,IACAC,MACAC,OACAC;IAEA,KAAKA,OAAL,GAAeA,OAAf;IACA,KAAKA,OAAL,CAAaC,GAAb,CAAiB,IAAjB,EAAuBJ,EAAvB;IACA,KAAKG,OAAL,CAAaC,GAAb,CAAiB,MAAjB,EAAyBH,IAAzB;IACA,KAAKE,OAAL,CAAaC,GAAb,CAAiB,OAAjB,EAA0BF,KAA1B;;;EAGFG,KAAK;IACH,OAAO,KAAKF,OAAL,CAAaG,GAAb,CAAiB,IAAjB,CAAP;;;EAGFC,QAAQ;IACN,OAAO,KAAKJ,OAAL,CAAaG,GAAb,CAAiB,OAAjB,CAAP;;;;;MCpB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;"} diff --git a/dist/theme.d.ts b/dist/theme.d.ts index 4cbe1e1..e4c5d3e 100644 --- a/dist/theme.d.ts +++ b/dist/theme.d.ts @@ -1,90 +1,90 @@ -declare type ThemeVars = { - [key: string]: any; -}; -declare const _default: (customVariables: ThemeVars) => { - components: { - MuiCssBaseline: { - styleOverrides: string; - }; - MuiList: { - styleOverrides: { - root: { - '&.customSwitch': { - padding: string; - background: any; - borderRadius: string; - display: string; - '& .MuiListItemButton-root': { - padding: string; - borderRadius: string; - width: string; - display: string; - alignItems: string; - justifyContent: string; - '&:not(:last-child)': { - marginBottom: string; - }; - '&.Mui-disabled': { - opacity: number; - }; - '&.Mui-selected': { - background: any; - boxShadow: any; - border: string; - '& .MuiTypography-root': { - color: any; - }; - }; - }; - '& .MuiChip-root': { - marginLeft: string; - }; - '& .MuiTypography-root': { - fontWeight: number; - fontSize: string; - lineHeight: string; - letterSpacing: string; - color: any; - margin: number; - }; - }; - }; - }; - }; - MuiListItemIcon: { - styleOverrides: { - root: { - minWidth: string; - }; - }; - }; - MuiListItemButton: { - styleOverrides: { - root: { - padding: number; - width: string; - height: string; - borderRadius: string; - justifyContent: string; - backgroundColor: any; - '&:hover': { - backgroundColor: any; - }; - '&:not(:last-child)': { - marginBottom: string; - }; - '&.Mui-selected': { - backgroundColor: any; - '&:hover': { - backgroundColor: any; - }; - }; - '&.Mui-disabled': { - opacity: number; - }; - }; - }; - }; - }; -}; -export default _default; +declare type ThemeVars = { + [key: string]: any; +}; +declare const _default: (customVariables: ThemeVars) => { + components: { + MuiCssBaseline: { + styleOverrides: string; + }; + MuiList: { + styleOverrides: { + root: { + '&.customSwitch': { + padding: string; + background: any; + borderRadius: string; + display: string; + '& .MuiListItemButton-root': { + padding: string; + borderRadius: string; + width: string; + display: string; + alignItems: string; + justifyContent: string; + '&:not(:last-child)': { + marginBottom: string; + }; + '&.Mui-disabled': { + opacity: number; + }; + '&.Mui-selected': { + background: any; + boxShadow: any; + border: string; + '& .MuiTypography-root': { + color: any; + }; + }; + }; + '& .MuiChip-root': { + marginLeft: string; + }; + '& .MuiTypography-root': { + fontWeight: number; + fontSize: string; + lineHeight: string; + letterSpacing: string; + color: any; + margin: number; + }; + }; + }; + }; + }; + MuiListItemIcon: { + styleOverrides: { + root: { + minWidth: string; + }; + }; + }; + MuiListItemButton: { + styleOverrides: { + root: { + padding: number; + width: string; + height: string; + borderRadius: string; + justifyContent: string; + backgroundColor: any; + '&:hover': { + backgroundColor: any; + }; + '&:not(:last-child)': { + marginBottom: string; + }; + '&.Mui-selected': { + backgroundColor: any; + '&:hover': { + backgroundColor: any; + }; + }; + '&.Mui-disabled': { + opacity: number; + }; + }; + }; + }; + }; +}; +export default _default;