{"id":13559219,"url":"https://github.com/ghostiam/vue-blocks","last_synced_at":"2025-04-03T14:31:39.692Z","repository":{"id":39211876,"uuid":"120264328","full_name":"ghostiam/vue-blocks","owner":"ghostiam","description":"Vue2 dataflow graph editor","archived":true,"fork":false,"pushed_at":"2022-12-12T02:59:20.000Z","size":1745,"stargazers_count":278,"open_issues_count":27,"forks_count":61,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-02T12:52:15.919Z","etag":null,"topics":["blocks","blueprints","dataflow","editor","graph","visual-programming","vuejs2","workflow"],"latest_commit_sha":null,"homepage":"https://ghostiam.github.io/vue-blocks/index.html","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostiam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-05T06:29:54.000Z","updated_at":"2024-06-24T11:28:31.000Z","dependencies_parsed_at":"2023-01-27T12:16:22.294Z","dependency_job_id":null,"html_url":"https://github.com/ghostiam/vue-blocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostiam%2Fvue-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostiam%2Fvue-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostiam%2Fvue-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostiam%2Fvue-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostiam","download_url":"https://codeload.github.com/ghostiam/vue-blocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222978357,"owners_count":17067508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blocks","blueprints","dataflow","editor","graph","visual-programming","vuejs2","workflow"],"created_at":"2024-08-01T12:05:26.189Z","updated_at":"2024-11-04T10:31:13.323Z","avatar_url":"https://github.com/ghostiam.png","language":"Vue","funding_links":[],"categories":["Vue","others"],"sub_categories":[],"readme":"## Vue-Blocks\n\n### Demo\n\n[Demo](https://ghostiam.github.io/vue-blocks/index.html)\n\n### Basic usage\n\n``` html\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n    \u003cVueBlocksContainer\n      ref=\"container\"\n      :blocksContent=\"blocks\"\n      :scene.sync=\"scene\"\n      class=\"container\"/\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import VueBlocksContainer from '...path.../vue-blocks/src'\n\n  export default {\n    name: 'App',\n    components: {\n      VueBlocksContainer\n    },\n    data: function () {\n      return {\n        blocks: [\n          {\n            name: 'test',\n            title: 'Test block',\n            family: 'Test',\n            description: 'Description text',\n            fields: [\n              {\n                name: 'in1',\n                type: 'event',\n                attr: 'input'\n              },\n              {\n                name: 'in2',\n                type: 'event',\n                attr: 'input'\n              },\n              {\n                name: 'out1',\n                type: 'event',\n                attr: 'output'\n              },\n              {\n                name: 'out2',\n                type: 'event',\n                attr: 'output'\n              }\n            ]\n          }\n        ],\n        scene: {\n          blocks: [\n            {\n              id: 1,\n              x: 0,\n              y: 0,\n              name: 'test',\n              title: 'Test block',\n              values: {\n                property: [\n                  {\n                    name: 'message',\n                    type: 'string'\n                  }\n                ]\n              }\n            },\n            {\n              id: 2,\n              x: 0,\n              y: 50,\n              name: 'test',\n              title: 'Test block 2',\n              values: {\n                property: [\n                  {\n                    name: 'message',\n                    type: 'string'\n                  }\n                ]\n              }\n            }\n          ],\n          links: [],\n          container: {\n            centerX: 0,\n            centerY: 0,\n            scale: 1\n          }\n        }\n      }\n    }\n  }\n\u003c/script\u003e\n\n\n\u003cstyle\u003e\n  html, body {\n    margin: 0;\n    padding: 0;\n  }\n\n  html {\n    width: 100vw;\n    height: 100vh;\n  }\n\n  body,\n  #app,\n  .container {\n    width: 100%;\n    height: 100%;\n  }\n\u003c/style\u003e\n```\n\n### Props\n\n#### blocksContent\n\nType: `Array.\u003cNode\u003e`\u003cbr\u003e\nRequired: `true`\u003cbr\u003e\nDefault: `[]`\n\nObject `Node`:\n```\n{\n  name: 'name-node',\n  title: 'Title node',\n  family: 'family - just for grouping',\n  description: 'Description text',\n  fields: Array.\u003cNodeField\u003e\n}\n```\n\nObject `NodeField`: \n```\n{\n  name: 'name',\n  type: 'type-name', // not used\n  attr: 'attribute' // input/output or custom\n  'other': - for custom\n}\n```\n\nCustom attributes are available in `scene.blocks[index].values.YourAttrName`\n\n#### scene\n\nType: `Object`\u003cbr\u003e\nRequired: `false`\u003cbr\u003e\nDefault: \n```\n{\n  blocks: [],\n  links: [],\n  container: {}\n}\n```\n\nObject `Scene`:\n```\n{\n  blocks: Array.\u003cBlock\u003e,\n  links: Array.\u003cBlockLinks\u003e,\n  container: {\n   centerX: number\n   centerY: number\n   scale: number\n  }\n}\n```\n\nObject `Block`:\n```\n{\n  id: number,\n  x: number,\n  y: number,\n  name: string,\n  title: string,\n  values: {\n    customAttribute: [ // show \"NodeField\"\n      name: NodeField (without name and attr fields)\n    ]\n  }\n}\n```\n\nObject `BlockLinks`:\n```\n{\n  id: number, // ID\n  originID: number, // Origin block ID\n  originSlot: number, // Origin block slot number\n  targetID: number, // Target block ID\n  targetSlot: number // Target block slot number\n}\n```\n\n## Build Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run serve\n\n# build for production with minification\nnpm run build\n\n# build for github pages\nnpm run build:docs\n\n```\n\n## License\n\n[MIT license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostiam%2Fvue-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostiam%2Fvue-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostiam%2Fvue-blocks/lists"}