Skip to content

Commit e97f4ba

Browse files
Deploy to GitHub pages
0 parents  commit e97f4ba

File tree

115 files changed

+8571
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+8571
-0
lines changed

.nojekyll

Whitespace-only changes.

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
reaflow.dev

assets/Basic.stories-84c4d4ab.js

+520
Large diffs are not rendered by default.

assets/Basics-10dd212d.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import{j as e}from"./jsx-runtime-9c4ae004.js";import"./chunk-HLWAVYOI-fce3c28f.js";import{M as r,C as i}from"./index-8e905c69.js";import{Simple as a}from"./Basic.stories-84c4d4ab.js";import{u as o}from"./index-2ef8b458.js";import"./index-1b03fe98.js";import"./iframe-ace6960f.js";import"../sb-preview/runtime.js";import"./react-18-5df836b6.js";import"./index-6fd5a17b.js";import"./chunk-EIRT5I3Z-f0a10e90.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-d7bb098e.js";import"./index-356e4a49.js";import"./Icon-046b6023.js";import"./IntersectionQuery-1c2e7c35.js";import"./crudHelpers-031fd461.js";import"./graphHelpers-fa49f917.js";function t(s){const n=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code",pre:"pre"},o(),s.components);return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Docs/Getting Started/Basics"}),`
2+
`,e.jsx(n.h1,{id:"basics",children:"Basics"}),`
3+
`,e.jsx(n.h2,{id:"your-first-diagram",children:"Your First Diagram"}),`
4+
`,e.jsxs(n.p,{children:["Let's build our first diagram by defining some ",e.jsx(n.code,{children:"nodes"})," and ",e.jsx(n.code,{children:"edges"}),`.
5+
Nodes are the blocks and edges are the relationships between the blocks.`]}),`
6+
`,e.jsxs(n.p,{children:["The data shapes require one property of ",e.jsx(n.code,{children:"id"})," but you can pass ",e.jsx(n.code,{children:"text"}),`
7+
or `,e.jsx(n.code,{children:"icon"}),` to them to show some sort of indication what it represents.
8+
The `,e.jsx(n.code,{children:"id"})," property can be any ",e.jsx(n.code,{children:"string"}),` but for demonstration purposes
9+
we are going to use some basic strings.`]}),`
10+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`const nodes = [
11+
{
12+
id: '1',
13+
text: '1'
14+
},
15+
{
16+
id: '2',
17+
text: '2'
18+
}
19+
];
20+
21+
const edges = [
22+
{
23+
id: '1-2',
24+
from: '1',
25+
to: '2'
26+
}
27+
];
28+
`})}),`
29+
`,e.jsxs(n.p,{children:["These shapes above will create two elements ",e.jsx(n.code,{children:"1"})," and ",e.jsx(n.code,{children:"2"}),` and create
30+
a relationship between them. Once we have this defined, we can simply
31+
pass these properties to the `,e.jsx(n.code,{children:"Canvas"})," and it will do the rest!"]}),`
32+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-jsx",children:`import React from 'react';
33+
import { Canvas } from 'reaflow';
34+
35+
export const MyDiagram = () => (
36+
<Canvas
37+
nodes={nodes}
38+
edges={edges}
39+
/>
40+
);
41+
`})}),`
42+
`,e.jsx(n.p,{children:"This will render a graph like this:"}),`
43+
`,e.jsx(i,{of:a})]})}function O(s={}){const{wrapper:n}=Object.assign({},o(),s.components);return n?e.jsx(n,Object.assign({},s,{children:e.jsx(t,s)})):t(s)}export{O as default};

assets/Color-6VNJS4EI-bd55fa6a.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/Community-493303cd.js

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/Components-a6c0f215.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import{j as e}from"./jsx-runtime-9c4ae004.js";import"./chunk-HLWAVYOI-fce3c28f.js";import{M as i,A as o}from"./index-8e905c69.js";import{C as t,N as c,E as h,P as l,M as a,A as x,R as j,L as m,I as p}from"./Icon-046b6023.js";import"./index-1b03fe98.js";import"./IntersectionQuery-1c2e7c35.js";import{u as d}from"./index-2ef8b458.js";import"./iframe-ace6960f.js";import"../sb-preview/runtime.js";import"./react-18-5df836b6.js";import"./index-6fd5a17b.js";import"./chunk-EIRT5I3Z-f0a10e90.js";import"./_commonjs-dynamic-modules-302442b1.js";import"./index-d7bb098e.js";import"./index-356e4a49.js";function r(s){const n=Object.assign({h1:"h1",p:"p",ul:"ul",li:"li",h2:"h2",code:"code"},d(),s.components);return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Docs/Getting Started/Components"}),`
2+
`,e.jsx(n.h1,{id:"components",children:"Components"}),`
3+
`,e.jsx(n.p,{children:`The library uses a variety of components internally that you can
4+
customize.`}),`
5+
`,e.jsxs(n.ul,{children:[`
6+
`,e.jsx(n.li,{children:"Canvas - The root component"}),`
7+
`,e.jsx(n.li,{children:"Node - The node element component"}),`
8+
`,e.jsx(n.li,{children:"Edge - The connector between nodes"}),`
9+
`,e.jsx(n.li,{children:"Port - The exit points of a node"}),`
10+
`,e.jsx(n.li,{children:"Marker Arrow - The shape used to connect show direction on the edges"}),`
11+
`,e.jsx(n.li,{children:"Add - The shape used on edges to show dropping between edges"}),`
12+
`,e.jsx(n.li,{children:"Remove - The shape used on nodes and edges to remove each"}),`
13+
`,e.jsx(n.li,{children:"Label - The component used by nodes and edges to show text"}),`
14+
`,e.jsx(n.li,{children:"Icon - The component used by nodes to show an icon"}),`
15+
`]}),`
16+
`,e.jsx(n.p,{children:"Below are the props from each component."}),`
17+
`,e.jsx(n.h2,{id:"canvas",children:e.jsx(n.code,{children:"Canvas"})}),`
18+
`,e.jsx(o,{of:t}),`
19+
`,e.jsx(n.h2,{id:"node",children:e.jsx(n.code,{children:"Node"})}),`
20+
`,e.jsx(o,{of:c}),`
21+
`,e.jsx(n.h2,{id:"edge",children:e.jsx(n.code,{children:"Edge"})}),`
22+
`,e.jsx(o,{of:h}),`
23+
`,e.jsx(n.h2,{id:"port",children:e.jsx(n.code,{children:"Port"})}),`
24+
`,e.jsx(o,{of:l}),`
25+
`,e.jsx(n.h2,{id:"markerarrow",children:e.jsx(n.code,{children:"MarkerArrow"})}),`
26+
`,e.jsx(o,{of:a}),`
27+
`,e.jsx(n.h2,{id:"add",children:e.jsx(n.code,{children:"Add"})}),`
28+
`,e.jsx(o,{of:x}),`
29+
`,e.jsx(n.h2,{id:"remove",children:e.jsx(n.code,{children:"Remove"})}),`
30+
`,e.jsx(o,{of:j}),`
31+
`,e.jsx(n.h2,{id:"label",children:e.jsx(n.code,{children:"Label"})}),`
32+
`,e.jsx(o,{of:m}),`
33+
`,e.jsx(n.h2,{id:"icon",children:e.jsx(n.code,{children:"Icon"})}),`
34+
`,e.jsx(o,{of:p})]})}function D(s={}){const{wrapper:n}=Object.assign({},d(),s.components);return n?e.jsx(n,Object.assign({},s,{children:e.jsx(r,s)})):r(s)}export{D as default};

assets/Contributing-75c88a66.js

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/Controls.stories-1392b2e8.js

+245
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/Crud-c3790d64.js

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)