@flowgram.ai/form-materials 0.2.32 → 0.3.1

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 (84) hide show
  1. package/bin/index.ts +11 -5
  2. package/bin/materials.ts +9 -1
  3. package/dist/esm/index.js +1229 -1308
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.d.mts +162 -125
  6. package/dist/index.d.ts +162 -125
  7. package/dist/index.js +1380 -1463
  8. package/dist/index.js.map +1 -1
  9. package/package.json +5 -4
  10. package/src/components/batch-variable-selector/config.json +6 -2
  11. package/src/components/batch-variable-selector/index.tsx +1 -1
  12. package/src/components/code-editor/theme/light.ts +1 -1
  13. package/src/components/code-editor-mini/config.json +7 -0
  14. package/src/components/code-editor-mini/index.tsx +31 -0
  15. package/src/components/condition-row/config.json +10 -2
  16. package/src/components/condition-row/constants.ts +4 -0
  17. package/src/components/condition-row/hooks/useRule.ts +2 -2
  18. package/src/components/condition-row/index.tsx +1 -1
  19. package/src/components/condition-row/types.ts +3 -1
  20. package/src/components/constant-input/config.json +6 -3
  21. package/src/components/constant-input/index.tsx +10 -71
  22. package/src/components/constant-input/types.ts +6 -10
  23. package/src/components/display-flow-value/config.json +8 -0
  24. package/src/components/display-flow-value/index.tsx +59 -0
  25. package/src/components/display-inputs-values/config.json +9 -0
  26. package/src/components/display-inputs-values/index.tsx +27 -0
  27. package/src/components/display-inputs-values/styles.ts +12 -0
  28. package/src/components/display-outputs/config.json +10 -0
  29. package/src/components/display-outputs/index.tsx +58 -0
  30. package/src/components/display-outputs/styles.ts +12 -0
  31. package/src/components/display-schema-tag/config.json +10 -0
  32. package/src/components/display-schema-tag/index.tsx +44 -0
  33. package/src/components/display-schema-tag/styles.ts +28 -0
  34. package/src/components/display-schema-tree/config.json +11 -0
  35. package/src/components/display-schema-tree/index.tsx +74 -0
  36. package/src/components/display-schema-tree/styles.tsx +90 -0
  37. package/src/components/dynamic-value-input/config.json +11 -2
  38. package/src/components/dynamic-value-input/hooks.ts +53 -0
  39. package/src/components/dynamic-value-input/index.tsx +30 -28
  40. package/src/components/index.ts +6 -0
  41. package/src/components/inputs-values/config.json +2 -1
  42. package/src/components/inputs-values/types.ts +3 -1
  43. package/src/components/json-schema-editor/config.json +2 -2
  44. package/src/components/json-schema-editor/default-value.tsx +1 -1
  45. package/src/components/json-schema-editor/hooks.tsx +1 -1
  46. package/src/components/json-schema-editor/index.tsx +1 -1
  47. package/src/components/json-schema-editor/types.ts +1 -1
  48. package/src/components/type-selector/config.json +6 -2
  49. package/src/components/type-selector/index.tsx +47 -11
  50. package/src/components/variable-selector/config.json +6 -2
  51. package/src/components/variable-selector/index.tsx +1 -1
  52. package/src/components/variable-selector/use-variable-tree.tsx +14 -20
  53. package/src/effects/provide-json-schema-outputs/config.json +4 -5
  54. package/src/effects/provide-json-schema-outputs/index.ts +1 -3
  55. package/src/effects/sync-variable-title/index.ts +1 -0
  56. package/src/form-plugins/infer-inputs-plugin/config.json +3 -1
  57. package/src/form-plugins/infer-inputs-plugin/index.ts +2 -2
  58. package/src/index.ts +2 -1
  59. package/src/{typings/json-schema → plugins/disable-declaration-plugin}/config.json +1 -1
  60. package/src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts +31 -0
  61. package/src/plugins/disable-declaration-plugin/index.tsx +6 -0
  62. package/src/plugins/index.ts +7 -0
  63. package/src/plugins/json-schema-preset/config.json +9 -0
  64. package/src/plugins/json-schema-preset/create-type-preset-plugin.tsx +28 -0
  65. package/src/plugins/json-schema-preset/index.tsx +39 -0
  66. package/src/plugins/json-schema-preset/manager.ts +18 -0
  67. package/src/plugins/json-schema-preset/type-definition/array.tsx +23 -0
  68. package/src/plugins/json-schema-preset/type-definition/boolean.tsx +32 -0
  69. package/src/plugins/json-schema-preset/type-definition/index.tsx +24 -0
  70. package/src/plugins/json-schema-preset/type-definition/integer.tsx +24 -0
  71. package/src/plugins/json-schema-preset/type-definition/number.tsx +24 -0
  72. package/src/plugins/json-schema-preset/type-definition/object.tsx +23 -0
  73. package/src/plugins/json-schema-preset/type-definition/string.tsx +18 -0
  74. package/src/{utils → shared}/index.ts +0 -1
  75. package/src/typings/flow-value/config.json +4 -4
  76. package/src/typings/flow-value/index.ts +1 -1
  77. package/src/typings/index.ts +0 -1
  78. package/src/components/type-selector/constants.tsx +0 -364
  79. package/src/typings/json-schema/index.ts +0 -36
  80. package/src/utils/json-schema/config.json +0 -5
  81. package/src/utils/json-schema/index.ts +0 -180
  82. /package/src/{utils → shared}/format-legacy-refs/config.json +0 -0
  83. /package/src/{utils → shared}/format-legacy-refs/index.ts +0 -0
  84. /package/src/{utils → shared}/format-legacy-refs/readme.md +0 -0
package/bin/index.ts CHANGED
@@ -72,11 +72,17 @@ program
72
72
  const { allMaterials, allPackages } = bfsMaterials(material!, materials);
73
73
 
74
74
  // 4. Install the dependencies
75
- let flowgramPackage = `@flowgram.ai/editor`;
76
- if (projectInfo.flowgramVersion !== 'workspace:*') {
77
- flowgramPackage = `@flowgram.ai/editor@${projectInfo.flowgramVersion}`;
78
- }
79
- const packagesToInstall: string[] = [flowgramPackage, ...allPackages];
75
+ allPackages.push(`@flowgram.ai/editor`);
76
+ const packagesToInstall: string[] = allPackages.map((_pkg) => {
77
+ if (
78
+ _pkg.startsWith(`@flowgram.ai/`) &&
79
+ projectInfo.flowgramVersion !== 'workspace:*' &&
80
+ !_pkg.endsWith(`@${projectInfo.flowgramVersion}`)
81
+ ) {
82
+ return `${_pkg}@${projectInfo.flowgramVersion}`;
83
+ }
84
+ return _pkg;
85
+ });
80
86
 
81
87
  console.log(chalk.bold('These npm dependencies will be added to your project'));
82
88
  console.log(packagesToInstall);
package/bin/materials.ts CHANGED
@@ -22,7 +22,15 @@ export interface Material {
22
22
  [key: string]: any; // For other properties from config.json
23
23
  }
24
24
 
25
- const _types: string[] = ['components', 'effects', 'utils', 'typings', 'form-plugins', 'hooks'];
25
+ const _types: string[] = [
26
+ 'components',
27
+ 'effects',
28
+ 'plugins',
29
+ 'shared',
30
+ 'typings',
31
+ 'form-plugins',
32
+ 'hooks',
33
+ ];
26
34
 
27
35
  export function listAllMaterials(): Material[] {
28
36
  const _materials: Material[] = [];