@andrewyang/ai-workflow-editor 0.1.0 → 0.1.2

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.
Files changed (85) hide show
  1. package/README.md +64 -0
  2. package/dist/ai-workflow-editor.css +1 -0
  3. package/dist/ai-workflow-editor.es.js +37398 -0
  4. package/dist/ai-workflow-editor.umd.js +164 -0
  5. package/dist/components/AiWorkflowEditor.d.ts +45 -0
  6. package/dist/components/ai/AiChatPanel.d.ts +21 -0
  7. package/dist/components/editor/Canvas.d.ts +31 -0
  8. package/dist/components/editor/FormatPanel.d.ts +23 -0
  9. package/dist/components/editor/NodePanel.d.ts +2 -0
  10. package/dist/components/editor/Toolbar.d.ts +14 -0
  11. package/dist/components/editor/nodes/AiNode.d.ts +28 -0
  12. package/dist/components/editor/nodes/NormalNode.d.ts +28 -0
  13. package/dist/components/editor/nodes/SysmlBlockNode.d.ts +28 -0
  14. package/dist/components/editor/nodes/SysmlRequirementNode.d.ts +28 -0
  15. package/dist/components/editor/nodes/SysmlUseCaseNode.d.ts +28 -0
  16. package/dist/composables/useAi.d.ts +13 -0
  17. package/dist/index.d.ts +5 -0
  18. package/dist/types/ai.d.ts +15 -0
  19. package/dist/types/workflow.d.ts +49 -0
  20. package/dist/utils/llmAdapter.d.ts +18 -0
  21. package/package.json +34 -9
  22. package/.nuxt/app.config.mjs +0 -18
  23. package/.nuxt/components.d.ts +0 -910
  24. package/.nuxt/dev/index.mjs +0 -4103
  25. package/.nuxt/dev/index.mjs.map +0 -1
  26. package/.nuxt/dist/server/client.manifest.mjs +0 -4
  27. package/.nuxt/dist/server/client.precomputed.mjs +0 -1
  28. package/.nuxt/dist/server/server.mjs +0 -1
  29. package/.nuxt/i18n-route-resources.mjs +0 -3
  30. package/.nuxt/imports.d.ts +0 -43
  31. package/.nuxt/manifest/latest.json +0 -1
  32. package/.nuxt/manifest/meta/dev.json +0 -1
  33. package/.nuxt/nitro.json +0 -17
  34. package/.nuxt/nuxt.d.ts +0 -24
  35. package/.nuxt/nuxt.json +0 -9
  36. package/.nuxt/schema/nuxt.schema.d.ts +0 -17
  37. package/.nuxt/schema/nuxt.schema.json +0 -3
  38. package/.nuxt/tsconfig.json +0 -234
  39. package/.nuxt/tsconfig.server.json +0 -185
  40. package/.nuxt/types/app-defaults.d.ts +0 -7
  41. package/.nuxt/types/app.config.d.ts +0 -31
  42. package/.nuxt/types/build.d.ts +0 -29
  43. package/.nuxt/types/builder-env.d.ts +0 -1
  44. package/.nuxt/types/components.d.ts +0 -915
  45. package/.nuxt/types/i18n-plugin.d.ts +0 -123
  46. package/.nuxt/types/imports.d.ts +0 -993
  47. package/.nuxt/types/middleware.d.ts +0 -17
  48. package/.nuxt/types/nitro-config.d.ts +0 -14
  49. package/.nuxt/types/nitro-imports.d.ts +0 -170
  50. package/.nuxt/types/nitro-layouts.d.ts +0 -17
  51. package/.nuxt/types/nitro-nuxt.d.ts +0 -39
  52. package/.nuxt/types/nitro-routes.d.ts +0 -17
  53. package/.nuxt/types/nitro.d.ts +0 -3
  54. package/.nuxt/types/plugins.d.ts +0 -43
  55. package/.nuxt/types/schema.d.ts +0 -213
  56. package/.nuxt/types/vue-shim.d.ts +0 -0
  57. package/.trae/rules/rule.md +0 -38
  58. package/.vscode/settings.json +0 -5
  59. package/nuxt.config.ts +0 -38
  60. package/pnpm-lock.yaml +0 -24
  61. package/src/app.vue +0 -46
  62. package/src/components/AiWorkflowEditor.vue +0 -142
  63. package/src/components/ai/AiChatPanel.vue +0 -135
  64. package/src/components/ai/AiGenerator.vue +0 -62
  65. package/src/components/editor/Canvas.vue +0 -175
  66. package/src/components/editor/FormatPanel.vue +0 -327
  67. package/src/components/editor/NodePanel.vue +0 -240
  68. package/src/components/editor/PropertyPanel.vue +0 -348
  69. package/src/components/editor/Toolbar.vue +0 -49
  70. package/src/components/editor/nodes/AiNode.vue +0 -77
  71. package/src/components/editor/nodes/NormalNode.vue +0 -75
  72. package/src/components/editor/nodes/SysmlBlockNode.vue +0 -72
  73. package/src/components/editor/nodes/SysmlRequirementNode.vue +0 -72
  74. package/src/components/editor/nodes/SysmlUseCaseNode.vue +0 -62
  75. package/src/composables/useAi.ts +0 -82
  76. package/src/i18n.config.ts +0 -5
  77. package/src/locales/en.json +0 -106
  78. package/src/locales/zh.json +0 -106
  79. package/src/plugins/aiWorkflowEditor.ts +0 -6
  80. package/src/types/ai.ts +0 -7
  81. package/src/types/workflow.ts +0 -25
  82. package/src/utils/llmAdapter.ts +0 -46
  83. package/tsconfig.json +0 -3
  84. package/uno.config.ts +0 -15
  85. package//345/211/215/347/253/257/345/256/232/345/210/266/345/274/200/345/217/221/357/274/232ai-workflow-editor/345/274/200/345/217/221/350/256/241/345/210/222.md +0 -655
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
+ ```