@cravern/bpmn-flow-designer 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,20 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
|
|
3
|
-
</div>
|
|
1
|
+
# BPMN Flow Designer
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Enterprise BPMN Flow Designer - A React-based tool for designing and managing business process models.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
## Installation
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @cravern/bpmn-flow-designer
|
|
9
|
+
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## ⚠️ Important: BPMN-JS Dependency
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
This package requires **BPMN-JS** to be loaded in your application. The component expects `BpmnJS` to be available globally.
|
|
14
14
|
|
|
15
|
+
### Setup Step 1: Include BPMN-JS
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Add these to your `index.html`:
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<!-- BPMN-JS Styles -->
|
|
21
|
+
<link
|
|
22
|
+
rel="stylesheet"
|
|
23
|
+
href="https://unpkg.com/bpmn-js@18.1.0/dist/assets/diagram-js.css"
|
|
24
|
+
/>
|
|
25
|
+
<link
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
href="https://unpkg.com/bpmn-js@18.1.0/dist/assets/bpmn-font/css/bpmn.css"
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
<!-- BPMN-JS Library -->
|
|
31
|
+
<script src="https://unpkg.com/bpmn-js@18.1.0/dist/bpmn-modeler.development.js"></script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Setup Step 2: Import and Use
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { BPMNFlowDesigner } from "@cravern/bpmn-flow-designer";
|
|
38
|
+
import "@cravern/bpmn-flow-designer/dist/style.css";
|
|
39
|
+
|
|
40
|
+
function App() {
|
|
41
|
+
const handleSave = (xml: string) => {
|
|
42
|
+
console.log("BPMN XML:", xml);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return <BPMNFlowDesigner title="My BPMN Designer" onSave={handleSave} />;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Component Props
|
|
50
|
+
|
|
51
|
+
- **initialXml** (string): Initial BPMN 2.0 XML diagram
|
|
52
|
+
- **onSave** (function): Callback when user saves diagram
|
|
53
|
+
- **onBack** (function): Back button callback
|
|
54
|
+
- **title** (string): Component title
|
|
55
|
+
- **geminiApiKey** (string, optional): API key for AI features
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcss.config.d.cts","sourceRoot":"","sources":["../postcss.config.cjs"],"names":[],"mappings":""}
|
package/dist/style.css
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.hidden{display:none}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bpmn-designer{display:flex;flex-direction:row;height:100vh;background:#fff;color:#1f2937;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif;overflow:hidden}.bpmn-sidebar{width:20rem;border-right:1px solid #e5e7eb;background:#f8fafc;display:flex;flex-direction:column;position:relative;z-index:20;overflow:hidden}.bpmn-content{flex:1 1 auto;min-width:0}.p-6{padding:1.5rem}.p-3{padding:.75rem}.rounded-xl{border-radius:.75rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind.config.d.cts","sourceRoot":"","sources":["../tailwind.config.cjs"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cravern/bpmn-flow-designer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Enterprise BPMN Flow Designer - A React-based tool for designing and managing business process models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"dev": "vite",
|
|
22
|
-
"build": "vite build",
|
|
22
|
+
"build": "vite build && npm run build:css",
|
|
23
|
+
"build:css": "tailwindcss -i src/style.css -o dist/style.css --minify",
|
|
23
24
|
"preview": "vite preview",
|
|
24
25
|
"type-check": "tsc --noEmit"
|
|
25
26
|
},
|
|
@@ -56,11 +57,15 @@
|
|
|
56
57
|
"@types/react": "^19.0.0",
|
|
57
58
|
"@types/react-dom": "^19.0.0",
|
|
58
59
|
"@vitejs/plugin-react": "^5.0.0",
|
|
60
|
+
"autoprefixer": "^10.4.14",
|
|
61
|
+
"postcss": "^8.4.21",
|
|
62
|
+
"tailwindcss": "^3.4.7",
|
|
59
63
|
"typescript": "~5.8.2",
|
|
60
64
|
"vite": "^6.2.0",
|
|
61
65
|
"vite-plugin-dts": "^4.5.4"
|
|
62
66
|
},
|
|
63
67
|
"peerDependencies": {
|
|
68
|
+
"bpmn-js": "^18.0.0",
|
|
64
69
|
"react": "^18.0.0 || ^19.0.0",
|
|
65
70
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
66
71
|
}
|