@flowgram.ai/form-materials 0.3.4 → 0.3.6

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 (95) hide show
  1. package/bin/index.ts +5 -19
  2. package/bin/materials.ts +31 -89
  3. package/bin/project.ts +4 -0
  4. package/bin/utils/import.ts +127 -0
  5. package/bin/utils/traverse-file.ts +60 -0
  6. package/dist/esm/index.js +383 -488
  7. package/dist/esm/index.js.map +1 -1
  8. package/dist/index.d.mts +64 -6
  9. package/dist/index.d.ts +64 -6
  10. package/dist/index.js +625 -730
  11. package/dist/index.js.map +1 -1
  12. package/package.json +5 -5
  13. package/src/components/assign-row/index.tsx +4 -4
  14. package/src/components/assign-rows/index.tsx +1 -1
  15. package/src/components/batch-outputs/index.tsx +4 -3
  16. package/src/components/batch-outputs/types.ts +1 -1
  17. package/src/components/batch-variable-selector/index.tsx +1 -1
  18. package/src/components/code-editor-mini/index.tsx +1 -1
  19. package/src/components/condition-row/hooks/useRule.ts +2 -1
  20. package/src/components/condition-row/index.tsx +5 -4
  21. package/src/components/condition-row/types.ts +1 -1
  22. package/src/components/constant-input/index.tsx +5 -2
  23. package/src/components/constant-input/types.ts +1 -1
  24. package/src/components/display-flow-value/index.tsx +2 -2
  25. package/src/components/display-inputs-values/index.tsx +3 -2
  26. package/src/components/display-outputs/index.tsx +2 -1
  27. package/src/components/display-schema-tag/index.tsx +3 -2
  28. package/src/components/display-schema-tree/index.tsx +2 -1
  29. package/src/components/dynamic-value-input/hooks.ts +1 -1
  30. package/src/components/dynamic-value-input/index.tsx +13 -9
  31. package/src/components/inputs-values/index.tsx +7 -5
  32. package/src/components/inputs-values/types.ts +3 -3
  33. package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +1 -1
  34. package/src/components/json-editor-with-variables/index.tsx +2 -1
  35. package/src/components/json-schema-editor/default-value.tsx +11 -105
  36. package/src/components/json-schema-editor/hooks.tsx +53 -94
  37. package/src/components/json-schema-editor/index.tsx +11 -8
  38. package/src/components/json-schema-editor/styles.tsx +0 -29
  39. package/src/components/prompt-editor/types.tsx +1 -1
  40. package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +2 -1
  41. package/src/components/prompt-editor-with-inputs/index.tsx +3 -2
  42. package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +1 -1
  43. package/src/components/prompt-editor-with-variables/extensions/variable-tree.tsx +1 -1
  44. package/src/components/prompt-editor-with-variables/index.tsx +2 -1
  45. package/src/components/type-selector/index.tsx +7 -3
  46. package/src/components/variable-selector/index.tsx +7 -4
  47. package/src/components/variable-selector/use-variable-tree.tsx +1 -1
  48. package/src/effects/auto-rename-ref/index.ts +1 -1
  49. package/src/effects/listen-ref-schema-change/index.ts +1 -1
  50. package/src/effects/listen-ref-value-change/index.ts +1 -1
  51. package/src/effects/provide-batch-input/index.ts +1 -1
  52. package/src/form-plugins/batch-outputs-plugin/index.ts +1 -1
  53. package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
  54. package/src/form-plugins/infer-inputs-plugin/index.ts +1 -1
  55. package/src/shared/index.ts +1 -0
  56. package/src/shared/inject-material/README.md +170 -0
  57. package/src/shared/inject-material/README.zh.md +174 -0
  58. package/src/shared/inject-material/index.tsx +87 -0
  59. package/src/components/assign-row/config.json +0 -11
  60. package/src/components/assign-rows/config.json +0 -11
  61. package/src/components/batch-outputs/config.json +0 -13
  62. package/src/components/batch-variable-selector/config.json +0 -9
  63. package/src/components/code-editor/config.json +0 -10
  64. package/src/components/code-editor-mini/config.json +0 -7
  65. package/src/components/condition-row/config.json +0 -13
  66. package/src/components/constant-input/config.json +0 -9
  67. package/src/components/display-flow-value/config.json +0 -8
  68. package/src/components/display-inputs-values/config.json +0 -9
  69. package/src/components/display-outputs/config.json +0 -10
  70. package/src/components/display-schema-tag/config.json +0 -10
  71. package/src/components/display-schema-tree/config.json +0 -11
  72. package/src/components/dynamic-value-input/config.json +0 -14
  73. package/src/components/inputs-values/config.json +0 -13
  74. package/src/components/json-editor-with-variables/config.json +0 -13
  75. package/src/components/json-schema-editor/config.json +0 -13
  76. package/src/components/json-schema-editor/utils.ts +0 -29
  77. package/src/components/prompt-editor/config.json +0 -9
  78. package/src/components/prompt-editor-with-inputs/config.json +0 -13
  79. package/src/components/prompt-editor-with-variables/config.json +0 -13
  80. package/src/components/type-selector/config.json +0 -9
  81. package/src/components/variable-selector/config.json +0 -9
  82. package/src/effects/auto-rename-ref/config.json +0 -5
  83. package/src/effects/listen-ref-schema-change/config.json +0 -10
  84. package/src/effects/listen-ref-value-change/config.json +0 -9
  85. package/src/effects/provide-batch-input/config.json +0 -5
  86. package/src/effects/provide-json-schema-outputs/config.json +0 -7
  87. package/src/effects/sync-variable-title/config.json +0 -5
  88. package/src/effects/validate-when-variable-sync/config.json +0 -5
  89. package/src/form-plugins/batch-outputs-plugin/config.json +0 -7
  90. package/src/form-plugins/infer-assign-plugin/config.json +0 -7
  91. package/src/form-plugins/infer-inputs-plugin/config.json +0 -9
  92. package/src/hooks/use-object-list/config.json +0 -8
  93. package/src/shared/format-legacy-refs/config.json +0 -5
  94. package/src/typings/flow-value/config.json +0 -7
  95. package/src/validate/validate-flow-value/config.json +0 -7
@@ -1,13 +0,0 @@
1
- {
2
- "name": "prompt-editor-with-inputs",
3
- "depMaterials": [
4
- "prompt-editor",
5
- "flow-value"
6
- ],
7
- "depPackages": [
8
- "@coze-editor/editor@0.1.0-alpha.879fbb",
9
- "@codemirror/view",
10
- "styled-components",
11
- "@douyinfe/semi-ui"
12
- ]
13
- }
@@ -1,13 +0,0 @@
1
- {
2
- "name": "prompt-editor-with-variables",
3
- "depMaterials": [
4
- "variable-selector",
5
- "prompt-editor"
6
- ],
7
- "depPackages": [
8
- "@coze-editor/editor@0.1.0-alpha.879fbb",
9
- "@codemirror/view",
10
- "styled-components",
11
- "@douyinfe/semi-ui"
12
- ]
13
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "type-selector",
3
- "depMaterials": [],
4
- "depPackages": [
5
- "@douyinfe/semi-ui",
6
- "@douyinfe/semi-icons",
7
- "@flowgram.ai/json-schema"
8
- ]
9
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "variable-selector",
3
- "depMaterials": [],
4
- "depPackages": [
5
- "@douyinfe/semi-ui",
6
- "styled-components",
7
- "@flowgram.ai/json-schema"
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "auto-rename-ref",
3
- "depMaterials": ["flow-value"],
4
- "depPackages": ["lodash"]
5
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "listen-ref-schema-change",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": [
7
- "lodash",
8
- "@flowgram.ai/json-schema"
9
- ]
10
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "listen-ref-value-change",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": [
7
- "lodash"
8
- ]
9
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "provide-batch-input",
3
- "depMaterials": ["flow-value"],
4
- "depPackages": []
5
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "provide-json-schema-outputs",
3
- "depMaterials": [],
4
- "depPackages": [
5
- "@flowgram.ai/json-schema"
6
- ]
7
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "sync-variable-title",
3
- "depMaterials": [],
4
- "depPackages": []
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "validate-when-variable-sync",
3
- "depMaterials": [],
4
- "depPackages": []
5
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "batch-outputs-plugin",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "infer-assign-plugin",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": []
7
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "infer-inputs-plugin",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": [
7
- "@flowgram.ai/json-schema"
8
- ]
9
- }
@@ -1,8 +0,0 @@
1
- {
2
- "name": "use-object-list",
3
- "depMaterials": [],
4
- "depPackages": [
5
- "lodash",
6
- "nanoid"
7
- ]
8
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "format-legacy-ref",
3
- "depMaterials": [],
4
- "depPackages": []
5
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "flow-value",
3
- "depMaterials": [],
4
- "depPackages": [
5
- "@flowgram.ai/json-schema"
6
- ]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "validate-flow-value",
3
- "depMaterials": [
4
- "flow-value"
5
- ],
6
- "depPackages": []
7
- }