@andrewyang/ai-workflow-editor 0.1.1 → 0.1.3

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 ADDED
@@ -0,0 +1,64 @@
1
+ # AI Workflow Editor
2
+
3
+ A powerful workflow editor component for Vue 3, featuring AI-assisted generation and SysML support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @andrewyang/ai-workflow-editor
9
+ # or
10
+ yarn add @andrewyang/ai-workflow-editor
11
+ # or
12
+ pnpm add @andrewyang/ai-workflow-editor
13
+ ```
14
+
15
+ ## Peer Dependencies
16
+
17
+ Ensure you have the following peer dependencies installed:
18
+
19
+ - `vue` >= 3.4.0
20
+ - `element-plus` >= 2.0.0
21
+
22
+ ## Usage
23
+
24
+ ### Import Styles
25
+
26
+ In your entry file (e.g., `main.ts` or `App.vue`):
27
+
28
+ ```typescript
29
+ import 'element-plus/dist/index.css'
30
+ import '@andrewyang/ai-workflow-editor/style.css'
31
+ ```
32
+
33
+ ### Use Component
34
+
35
+ ```vue
36
+ <template>
37
+ <AiWorkflowEditor
38
+ :default-llm-config="llmConfig"
39
+ @save="onSave"
40
+ />
41
+ </template>
42
+
43
+ <script setup lang="ts">
44
+ import { AiWorkflowEditor } from '@andrewyang/ai-workflow-editor'
45
+
46
+ const llmConfig = {
47
+ provider: 'openai',
48
+ apiKey: 'your-api-key',
49
+ model: 'gpt-4'
50
+ }
51
+
52
+ const onSave = (workflow) => {
53
+ console.log('Saved workflow:', workflow)
54
+ }
55
+ </script>
56
+ ```
57
+
58
+ ### Use Composable
59
+
60
+ ```typescript
61
+ import { useAi } from '@andrewyang/ai-workflow-editor'
62
+
63
+ const { generateWorkflow, loading, error } = useAi()
64
+ ```