@cravern/bpmn-flow-designer 1.0.8 → 1.0.9
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 +13 -151
- package/dist/App.d.ts +15 -2
- package/dist/App.d.ts.map +1 -0
- package/dist/dist/index.umd.d.ts +2 -0
- package/dist/dist/index.umd.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34174 -17295
- package/dist/index.umd.js +297 -74
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/package.json +44 -22
- package/dist/index.css +0 -2
package/README.md
CHANGED
|
@@ -1,158 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
|
|
3
|
+
</div>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# Run and deploy your AI Studio app
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
This contains everything you need to run your app locally.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- **BPMN Diagram Support**: Create and edit BPMN diagrams
|
|
9
|
-
- **AI-Powered**: Integration with Google's Generative AI for intelligent suggestions
|
|
10
|
-
- **Beautiful UI**: Built with Tailwind CSS for a modern, responsive design
|
|
11
|
-
- **TypeScript Support**: Full TypeScript type definitions included
|
|
12
|
-
- **React 18+ Compatible**: Works with React 18 and React 19
|
|
9
|
+
View your app in AI Studio: https://ai.studio/apps/drive/1T5RxWNtwMo7anyaqY3VRKVCDzKWZNbKZ
|
|
13
10
|
|
|
14
|
-
##
|
|
11
|
+
## Run Locally
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
npm install @cravern/bpmn-flow-designer
|
|
18
|
-
```
|
|
13
|
+
**Prerequisites:** Node.js
|
|
19
14
|
|
|
20
|
-
## Usage
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
import "@cravern/bpmn-flow-designer/style.css";
|
|
28
|
-
|
|
29
|
-
function App() {
|
|
30
|
-
return <BpmnFlowDesigner />;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default App;
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Requirements
|
|
37
|
-
|
|
38
|
-
This package requires the following peer dependencies:
|
|
39
|
-
|
|
40
|
-
- `react` ^18.0.0 or ^19.0.0
|
|
41
|
-
- `react-dom` ^18.0.0 or ^19.0.0
|
|
42
|
-
|
|
43
|
-
### CSS Styles
|
|
44
|
-
|
|
45
|
-
You must import the stylesheet to use this component:
|
|
46
|
-
|
|
47
|
-
```jsx
|
|
48
|
-
import "@cravern/bpmn-flow-designer/style.css";
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The package includes:
|
|
52
|
-
|
|
53
|
-
- **Tailwind CSS**: Utility-first CSS framework
|
|
54
|
-
- **Lucide React Icons**: Beautiful, accessible icons
|
|
55
|
-
- **BPMN-JS Styles**: Styling for BPMN diagram components
|
|
56
|
-
|
|
57
|
-
### External Dependencies
|
|
58
|
-
|
|
59
|
-
The component also requires these libraries to be included in your project for full functionality:
|
|
60
|
-
|
|
61
|
-
```html
|
|
62
|
-
<!-- BPMN-JS Library and Styles -->
|
|
63
|
-
<link
|
|
64
|
-
rel="stylesheet"
|
|
65
|
-
href="https://unpkg.com/bpmn-js@18.1.0/dist/assets/diagram-js.css"
|
|
66
|
-
/>
|
|
67
|
-
<link
|
|
68
|
-
rel="stylesheet"
|
|
69
|
-
href="https://unpkg.com/bpmn-js@18.1.0/dist/assets/bpmn-font/css/bpmn.css"
|
|
70
|
-
/>
|
|
71
|
-
<script src="https://unpkg.com/bpmn-js@18.1.0/dist/bpmn-modeler.development.js"></script>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Or install BPMN-JS as a package:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm install bpmn-js
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## API
|
|
81
|
-
|
|
82
|
-
### BpmnFlowDesigner Component
|
|
83
|
-
|
|
84
|
-
The main component that provides the BPMN flow designer interface.
|
|
85
|
-
|
|
86
|
-
```jsx
|
|
87
|
-
<BpmnFlowDesigner />
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
The component manages:
|
|
91
|
-
|
|
92
|
-
- Business process organization
|
|
93
|
-
- Capability definitions
|
|
94
|
-
- Business cycle management
|
|
95
|
-
- Work practice documentation
|
|
96
|
-
- BPMN diagram creation and editing
|
|
97
|
-
|
|
98
|
-
## Environment Variables
|
|
99
|
-
|
|
100
|
-
If using AI-powered features, set your Gemini API key:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
VITE_GEMINI_API_KEY=your_api_key_here
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
or in `.env.local`:
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
GEMINI_API_KEY=your_api_key_here
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Development
|
|
113
|
-
|
|
114
|
-
### Prerequisites
|
|
115
|
-
|
|
116
|
-
- Node.js 16+
|
|
117
|
-
- npm or yarn
|
|
118
|
-
|
|
119
|
-
### Setup
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
git clone <repository>
|
|
123
|
-
cd bpmn-flow-designer
|
|
124
|
-
npm install
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Running Locally
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
npm run dev
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Building
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
npm run build
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
This will:
|
|
140
|
-
|
|
141
|
-
1. Generate TypeScript declarations
|
|
142
|
-
2. Build ES and UMD modules
|
|
143
|
-
3. Extract and bundle CSS
|
|
144
|
-
|
|
145
|
-
## Browser Support
|
|
146
|
-
|
|
147
|
-
- Chrome (latest)
|
|
148
|
-
- Firefox (latest)
|
|
149
|
-
- Safari (latest)
|
|
150
|
-
- Edge (latest)
|
|
151
|
-
|
|
152
|
-
## License
|
|
153
|
-
|
|
154
|
-
MIT
|
|
155
|
-
|
|
156
|
-
## Support
|
|
157
|
-
|
|
158
|
-
For issues, questions, or contributions, please visit the project repository.
|
|
16
|
+
1. Install dependencies:
|
|
17
|
+
`npm install`
|
|
18
|
+
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
|
|
19
|
+
3. Run the app:
|
|
20
|
+
`npm run dev`
|
package/dist/App.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface BpmnDesignerProps {
|
|
3
|
+
initialXml?: string;
|
|
4
|
+
onSave?: (xml: string) => void;
|
|
5
|
+
onBack?: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
geminiApiKey?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* BpmnDesigner - A reusable BPMN 2.0 flow designer component.
|
|
11
|
+
* Can be installed and used in any React application.
|
|
12
|
+
*/
|
|
13
|
+
export declare const BpmnDesigner: React.FC<BpmnDesignerProps>;
|
|
14
|
+
declare const App: () => import("react/jsx-runtime").JSX.Element;
|
|
3
15
|
export default App;
|
|
16
|
+
//# sourceMappingURL=App.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../App.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAkC3D,UAAU,iBAAiB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAkOpD,CAAC;AAGF,QAAA,MAAM,GAAG,+CAOR,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.d.ts","sourceRoot":"","sources":["../index.umd.js"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":""}
|