@flowgram.ai/form-materials 0.1.0-alpha.15 → 0.1.0-alpha.17

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 (272) hide show
  1. package/bin/run.sh +3 -2
  2. package/dist/cjs/components/blur-input/index.js +2 -12
  3. package/dist/cjs/components/code-editor/editor-all.js +52 -0
  4. package/dist/cjs/components/code-editor/editor-json.js +71 -0
  5. package/dist/cjs/components/code-editor/editor-python.js +63 -0
  6. package/dist/cjs/components/code-editor/editor-shell.js +63 -0
  7. package/dist/cjs/components/code-editor/editor-sql.js +71 -0
  8. package/dist/cjs/components/code-editor/editor-ts.js +80 -0
  9. package/dist/cjs/components/code-editor/editor.js +45 -57
  10. package/dist/cjs/components/code-editor/factory.js +96 -0
  11. package/dist/cjs/components/code-editor/index.js +31 -28
  12. package/dist/cjs/components/code-editor/theme/dark.js +120 -50
  13. package/dist/cjs/components/code-editor/theme/light.js +110 -61
  14. package/dist/cjs/components/code-editor/utils.js +1 -0
  15. package/dist/cjs/components/condition-context/context.js +59 -0
  16. package/dist/cjs/components/condition-context/hooks/use-condition.js +97 -0
  17. package/dist/cjs/components/condition-context/index.js +47 -0
  18. package/dist/cjs/components/condition-context/op.js +117 -0
  19. package/dist/cjs/components/condition-row/index.js +43 -26
  20. package/dist/cjs/components/condition-row/types.js +1 -35
  21. package/dist/cjs/components/{prompt-editor-with-inputs/inputs-picker.js → coze-editor-extensions/extensions/inputs-tree.js} +70 -2
  22. package/dist/cjs/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tag.js +4 -3
  23. package/dist/cjs/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tree.js +13 -7
  24. package/dist/cjs/components/coze-editor-extensions/index.js +86 -0
  25. package/dist/cjs/components/db-condition-row/index.js +59 -34
  26. package/dist/cjs/components/display-schema-tree/index.js +2 -2
  27. package/dist/cjs/components/index.js +49 -4
  28. package/dist/cjs/components/json-editor-with-variables/editor.js +10 -7
  29. package/dist/cjs/components/prompt-editor-with-inputs/editor.js +2 -2
  30. package/dist/cjs/components/prompt-editor-with-variables/editor.js +3 -4
  31. package/dist/cjs/components/{condition-row/hooks/useRule.js → sql-editor-with-variables/editor.js} +19 -34
  32. package/dist/cjs/components/sql-editor-with-variables/index.js +57 -0
  33. package/dist/cjs/components/type-selector/index.js +2 -2
  34. package/dist/cjs/components/variable-selector/use-variable-tree.js +1 -2
  35. package/dist/cjs/effects/provide-batch-input/index.js +1 -1
  36. package/dist/cjs/effects/provide-json-schema-outputs/index.js +1 -1
  37. package/dist/cjs/form-plugins/batch-outputs-plugin/index.js +9 -2
  38. package/dist/cjs/form-plugins/infer-assign-plugin/index.js +1 -1
  39. package/dist/cjs/form-plugins/infer-inputs-plugin/index.js +30 -3
  40. package/dist/cjs/index.js +44 -2
  41. package/dist/cjs/plugins/json-schema-preset/create-type-preset-plugin.js +1 -0
  42. package/dist/cjs/plugins/json-schema-preset/index.js +3 -13
  43. package/dist/cjs/{components/code-editor/init-worker.js → plugins/json-schema-preset/react.js} +18 -23
  44. package/dist/cjs/plugins/json-schema-preset/type-definition/array.js +33 -4
  45. package/dist/cjs/plugins/json-schema-preset/type-definition/boolean.js +23 -0
  46. package/dist/cjs/plugins/json-schema-preset/type-definition/date-time.js +31 -2
  47. package/dist/cjs/plugins/json-schema-preset/type-definition/index.js +9 -1
  48. package/dist/cjs/plugins/json-schema-preset/type-definition/integer.js +34 -1
  49. package/dist/cjs/plugins/json-schema-preset/type-definition/map.js +54 -0
  50. package/dist/cjs/plugins/json-schema-preset/type-definition/number.js +34 -1
  51. package/dist/cjs/plugins/json-schema-preset/type-definition/object.js +9 -4
  52. package/dist/cjs/plugins/json-schema-preset/type-definition/string.js +30 -1
  53. package/dist/cjs/plugins/json-schema-preset/types.js +18 -0
  54. package/dist/cjs/shared/flow-value/utils.js +22 -8
  55. package/dist/cjs/shared/inject-material/index.js +2 -1
  56. package/dist/esm/components/blur-input/index.mjs +2 -2
  57. package/dist/esm/components/code-editor/editor-all.mjs +18 -0
  58. package/dist/esm/components/code-editor/editor-json.mjs +16 -0
  59. package/dist/esm/components/code-editor/editor-python.mjs +8 -0
  60. package/dist/esm/components/code-editor/editor-shell.mjs +8 -0
  61. package/dist/esm/components/code-editor/editor-sql.mjs +16 -0
  62. package/dist/esm/components/code-editor/editor-ts.mjs +22 -0
  63. package/dist/esm/components/code-editor/editor.mjs +38 -33
  64. package/dist/esm/components/code-editor/factory.mjs +36 -0
  65. package/dist/esm/components/code-editor/index.mjs +8 -5
  66. package/dist/esm/components/code-editor/theme/dark.mjs +117 -50
  67. package/dist/esm/components/code-editor/theme/light.mjs +108 -62
  68. package/dist/esm/components/code-editor/utils.mjs +1 -0
  69. package/dist/esm/components/condition-context/context.mjs +19 -0
  70. package/dist/esm/components/condition-context/hooks/use-condition.mjs +63 -0
  71. package/dist/esm/components/condition-context/index.mjs +4 -0
  72. package/dist/esm/components/condition-context/op.mjs +80 -0
  73. package/dist/esm/components/condition-row/index.mjs +45 -28
  74. package/dist/esm/components/condition-row/types.mjs +0 -18
  75. package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +135 -0
  76. package/dist/esm/components/{json-editor-with-variables → coze-editor-extensions}/extensions/variable-tag.mjs +4 -3
  77. package/dist/esm/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tree.mjs +13 -7
  78. package/dist/esm/components/coze-editor-extensions/index.mjs +18 -0
  79. package/dist/esm/components/db-condition-row/index.mjs +59 -34
  80. package/dist/esm/components/display-schema-tree/index.mjs +1 -1
  81. package/dist/esm/components/index.mjs +5 -2
  82. package/dist/esm/components/json-editor-with-variables/editor.mjs +10 -7
  83. package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +2 -2
  84. package/dist/esm/components/prompt-editor-with-variables/editor.mjs +3 -4
  85. package/dist/esm/components/sql-editor-with-variables/editor.mjs +19 -0
  86. package/dist/esm/components/sql-editor-with-variables/index.mjs +5 -0
  87. package/dist/esm/components/type-selector/index.mjs +1 -1
  88. package/dist/esm/components/variable-selector/use-variable-tree.mjs +1 -2
  89. package/dist/esm/effects/provide-batch-input/index.mjs +2 -2
  90. package/dist/esm/effects/provide-json-schema-outputs/index.mjs +2 -2
  91. package/dist/esm/form-plugins/batch-outputs-plugin/index.mjs +10 -3
  92. package/dist/esm/form-plugins/infer-assign-plugin/index.mjs +2 -2
  93. package/dist/esm/form-plugins/infer-inputs-plugin/index.mjs +31 -4
  94. package/dist/esm/index.mjs +2 -2
  95. package/dist/esm/plugins/json-schema-preset/create-type-preset-plugin.mjs +2 -1
  96. package/dist/esm/plugins/json-schema-preset/index.mjs +3 -13
  97. package/dist/esm/plugins/json-schema-preset/react.mjs +14 -0
  98. package/dist/esm/plugins/json-schema-preset/type-definition/array.mjs +33 -4
  99. package/dist/esm/plugins/json-schema-preset/type-definition/boolean.mjs +23 -0
  100. package/dist/esm/plugins/json-schema-preset/type-definition/date-time.mjs +31 -2
  101. package/dist/esm/plugins/json-schema-preset/type-definition/index.mjs +7 -2
  102. package/dist/esm/plugins/json-schema-preset/type-definition/integer.mjs +34 -1
  103. package/dist/esm/plugins/json-schema-preset/type-definition/map.mjs +20 -0
  104. package/dist/esm/plugins/json-schema-preset/type-definition/number.mjs +34 -1
  105. package/dist/esm/plugins/json-schema-preset/type-definition/object.mjs +9 -4
  106. package/dist/esm/plugins/json-schema-preset/type-definition/string.mjs +30 -1
  107. package/dist/esm/plugins/json-schema-preset/types.mjs +0 -0
  108. package/dist/esm/shared/flow-value/utils.mjs +22 -8
  109. package/dist/esm/shared/inject-material/index.mjs +2 -1
  110. package/dist/tsconfig.tsbuildinfo +1 -1
  111. package/dist/types/components/blur-input/index.d.ts +7 -1
  112. package/dist/types/components/code-editor/editor-all.d.ts +8 -0
  113. package/dist/types/components/code-editor/editor-json.d.ts +6 -0
  114. package/dist/types/components/code-editor/editor-python.d.ts +6 -0
  115. package/dist/types/components/code-editor/editor-shell.d.ts +6 -0
  116. package/dist/types/components/code-editor/editor-sql.d.ts +6 -0
  117. package/dist/types/components/code-editor/editor-ts.d.ts +6 -0
  118. package/dist/types/components/code-editor/editor.d.ts +3 -4
  119. package/dist/types/components/code-editor/factory.d.ts +13 -0
  120. package/dist/types/components/code-editor/index.d.ts +7 -2
  121. package/dist/types/components/code-editor/theme/dark.d.ts +29 -0
  122. package/dist/types/components/code-editor/theme/light.d.ts +24 -0
  123. package/dist/types/components/code-editor/utils.d.ts +1 -1
  124. package/dist/types/components/code-editor-mini/index.d.ts +3 -0
  125. package/dist/types/components/condition-context/context.d.ts +14 -0
  126. package/dist/types/components/condition-context/hooks/use-condition.d.ts +29 -0
  127. package/dist/types/components/condition-context/index.d.ts +8 -0
  128. package/dist/types/components/condition-context/op.d.ts +22 -0
  129. package/dist/types/components/condition-context/types.d.ts +14 -0
  130. package/dist/types/components/condition-row/index.d.ts +4 -7
  131. package/dist/types/components/condition-row/types.d.ts +0 -24
  132. package/dist/types/components/{prompt-editor-with-inputs/inputs-picker.d.ts → coze-editor-extensions/extensions/inputs-tree.d.ts} +5 -0
  133. package/dist/types/components/{json-editor-with-variables → coze-editor-extensions}/extensions/variable-tree.d.ts +3 -1
  134. package/dist/types/components/coze-editor-extensions/index.d.ts +18 -0
  135. package/dist/types/components/db-condition-row/index.d.ts +4 -3
  136. package/dist/types/components/db-condition-row/types.d.ts +0 -8
  137. package/dist/types/components/display-schema-tree/index.d.ts +1 -1
  138. package/dist/types/components/dynamic-value-input/index.d.ts +3 -1
  139. package/dist/types/components/index.d.ts +4 -1
  140. package/dist/types/components/sql-editor-with-variables/editor.d.ts +9 -0
  141. package/dist/types/components/sql-editor-with-variables/index.d.ts +6 -0
  142. package/dist/types/components/type-selector/index.d.ts +3 -1
  143. package/dist/types/components/variable-selector/index.d.ts +4 -2
  144. package/dist/types/form-plugins/batch-outputs-plugin/index.d.ts +4 -0
  145. package/dist/types/form-plugins/infer-inputs-plugin/index.d.ts +4 -0
  146. package/dist/types/index.d.ts +1 -1
  147. package/dist/types/plugins/json-schema-preset/create-type-preset-plugin.d.ts +1 -1
  148. package/dist/types/plugins/json-schema-preset/index.d.ts +3 -7
  149. package/dist/types/plugins/json-schema-preset/react.d.ts +11 -0
  150. package/dist/types/plugins/json-schema-preset/type-definition/array.d.ts +1 -1
  151. package/dist/types/plugins/json-schema-preset/type-definition/boolean.d.ts +1 -1
  152. package/dist/types/plugins/json-schema-preset/type-definition/date-time.d.ts +1 -1
  153. package/dist/types/plugins/json-schema-preset/type-definition/index.d.ts +3 -1
  154. package/dist/types/plugins/json-schema-preset/type-definition/integer.d.ts +1 -1
  155. package/dist/types/plugins/json-schema-preset/type-definition/map.d.ts +6 -0
  156. package/dist/types/plugins/json-schema-preset/type-definition/number.d.ts +1 -1
  157. package/dist/types/plugins/json-schema-preset/type-definition/object.d.ts +1 -1
  158. package/dist/types/plugins/json-schema-preset/type-definition/string.d.ts +1 -1
  159. package/dist/types/plugins/json-schema-preset/{manager.d.ts → types.d.ts} +5 -0
  160. package/dist/types/shared/flow-value/utils.d.ts +3 -1
  161. package/dist/types/shared/inject-material/index.d.ts +6 -4
  162. package/dist/types/validate/validate-flow-value/index.d.ts +1 -1
  163. package/package.json +56 -17
  164. package/src/components/blur-input/index.tsx +9 -1
  165. package/src/components/code-editor/editor-all.tsx +30 -0
  166. package/src/components/code-editor/editor-json.tsx +25 -0
  167. package/src/components/code-editor/editor-python.tsx +18 -0
  168. package/src/components/code-editor/editor-shell.tsx +18 -0
  169. package/src/components/code-editor/editor-sql.tsx +24 -0
  170. package/src/components/code-editor/editor-ts.tsx +31 -0
  171. package/src/components/code-editor/editor.tsx +45 -36
  172. package/src/components/code-editor/factory.tsx +61 -0
  173. package/src/components/code-editor/index.tsx +7 -7
  174. package/src/components/code-editor/theme/dark.ts +62 -77
  175. package/src/components/code-editor/theme/light.ts +60 -91
  176. package/src/components/code-editor/utils.ts +4 -0
  177. package/src/components/code-editor-mini/index.tsx +3 -0
  178. package/src/components/condition-context/context.tsx +28 -0
  179. package/src/components/condition-context/hooks/use-condition.tsx +99 -0
  180. package/src/components/condition-context/index.tsx +14 -0
  181. package/src/components/condition-context/op.ts +86 -0
  182. package/src/components/condition-context/types.ts +22 -0
  183. package/src/components/condition-row/index.tsx +44 -22
  184. package/src/components/condition-row/types.ts +0 -30
  185. package/src/components/{prompt-editor-with-inputs/inputs-picker.tsx → coze-editor-extensions/extensions/inputs-tree.tsx} +95 -5
  186. package/src/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tag.tsx +6 -3
  187. package/src/components/{prompt-editor-with-variables → coze-editor-extensions}/extensions/variable-tree.tsx +12 -3
  188. package/src/components/coze-editor-extensions/index.tsx +33 -0
  189. package/src/components/db-condition-row/index.tsx +76 -24
  190. package/src/components/db-condition-row/types.ts +0 -13
  191. package/src/components/display-schema-tree/index.tsx +6 -4
  192. package/src/components/index.ts +29 -1
  193. package/src/components/json-editor-with-variables/editor.tsx +7 -8
  194. package/src/components/prompt-editor-with-inputs/editor.tsx +2 -3
  195. package/src/components/prompt-editor-with-variables/editor.tsx +3 -5
  196. package/src/components/sql-editor-with-variables/editor.tsx +28 -0
  197. package/src/components/sql-editor-with-variables/index.tsx +12 -0
  198. package/src/components/type-selector/index.tsx +2 -3
  199. package/src/components/variable-selector/index.tsx +2 -2
  200. package/src/components/variable-selector/use-variable-tree.tsx +7 -4
  201. package/src/effects/provide-batch-input/index.ts +1 -2
  202. package/src/effects/provide-json-schema-outputs/index.ts +1 -2
  203. package/src/form-plugins/batch-outputs-plugin/index.ts +64 -46
  204. package/src/form-plugins/infer-assign-plugin/index.ts +1 -2
  205. package/src/form-plugins/infer-inputs-plugin/index.ts +62 -14
  206. package/src/index.ts +19 -0
  207. package/src/plugins/json-schema-preset/create-type-preset-plugin.tsx +4 -2
  208. package/src/plugins/json-schema-preset/index.tsx +4 -20
  209. package/src/plugins/json-schema-preset/react.tsx +31 -0
  210. package/src/plugins/json-schema-preset/type-definition/array.tsx +13 -4
  211. package/src/plugins/json-schema-preset/type-definition/boolean.tsx +17 -1
  212. package/src/plugins/json-schema-preset/type-definition/date-time.tsx +21 -2
  213. package/src/plugins/json-schema-preset/type-definition/index.tsx +10 -1
  214. package/src/plugins/json-schema-preset/type-definition/integer.tsx +19 -1
  215. package/src/plugins/json-schema-preset/type-definition/map.tsx +31 -0
  216. package/src/plugins/json-schema-preset/type-definition/number.tsx +19 -1
  217. package/src/plugins/json-schema-preset/type-definition/object.tsx +9 -4
  218. package/src/plugins/json-schema-preset/type-definition/string.tsx +19 -1
  219. package/src/plugins/json-schema-preset/{manager.ts → types.ts} +7 -0
  220. package/src/shared/flow-value/utils.ts +22 -9
  221. package/src/shared/inject-material/index.tsx +10 -6
  222. package/src/validate/validate-flow-value/index.tsx +1 -2
  223. package/dist/cjs/components/code-editor/language-features.js +0 -21
  224. package/dist/cjs/components/condition-row/constants.js +0 -165
  225. package/dist/cjs/components/condition-row/hooks/useOp.js +0 -78
  226. package/dist/cjs/components/db-condition-row/hooks/use-left.js +0 -86
  227. package/dist/cjs/components/db-condition-row/hooks/use-op.js +0 -79
  228. package/dist/cjs/components/json-editor-with-variables/extensions/variable-tag.js +0 -151
  229. package/dist/cjs/components/json-editor-with-variables/extensions/variable-tree.js +0 -97
  230. package/dist/cjs/components/prompt-editor-with-inputs/extensions/inputs-tree.js +0 -101
  231. package/dist/cjs/components/prompt-editor-with-variables/styles.js +0 -89
  232. package/dist/esm/components/code-editor/init-worker.mjs +0 -19
  233. package/dist/esm/components/code-editor/language-features.mjs +0 -15
  234. package/dist/esm/components/condition-row/constants.mjs +0 -128
  235. package/dist/esm/components/condition-row/hooks/useOp.mjs +0 -44
  236. package/dist/esm/components/condition-row/hooks/useRule.mjs +0 -34
  237. package/dist/esm/components/db-condition-row/hooks/use-left.mjs +0 -52
  238. package/dist/esm/components/db-condition-row/hooks/use-op.mjs +0 -45
  239. package/dist/esm/components/json-editor-with-variables/extensions/variable-tree.mjs +0 -63
  240. package/dist/esm/components/prompt-editor-with-inputs/extensions/inputs-tree.mjs +0 -67
  241. package/dist/esm/components/prompt-editor-with-inputs/inputs-picker.mjs +0 -70
  242. package/dist/esm/components/prompt-editor-with-variables/extensions/variable-tag.mjs +0 -117
  243. package/dist/esm/components/prompt-editor-with-variables/styles.mjs +0 -36
  244. package/dist/types/components/code-editor/init-worker.d.ts +0 -5
  245. package/dist/types/components/code-editor/language-features.d.ts +0 -5
  246. package/dist/types/components/condition-row/constants.d.ts +0 -7
  247. package/dist/types/components/condition-row/hooks/useOp.d.ts +0 -18
  248. package/dist/types/components/condition-row/hooks/useRule.d.ts +0 -9
  249. package/dist/types/components/db-condition-row/hooks/use-left.d.ts +0 -18
  250. package/dist/types/components/db-condition-row/hooks/use-op.d.ts +0 -18
  251. package/dist/types/components/prompt-editor-with-inputs/extensions/inputs-tree.d.ts +0 -9
  252. package/dist/types/components/prompt-editor-with-variables/extensions/variable-tag.d.ts +0 -5
  253. package/dist/types/components/prompt-editor-with-variables/extensions/variable-tree.d.ts +0 -6
  254. package/dist/types/components/prompt-editor-with-variables/styles.d.ts +0 -9
  255. package/src/components/code-editor/init-worker.ts +0 -27
  256. package/src/components/code-editor/language-features.ts +0 -23
  257. package/src/components/condition-row/constants.ts +0 -134
  258. package/src/components/condition-row/hooks/useOp.tsx +0 -56
  259. package/src/components/condition-row/hooks/useRule.ts +0 -35
  260. package/src/components/db-condition-row/hooks/use-left.tsx +0 -66
  261. package/src/components/db-condition-row/hooks/use-op.tsx +0 -59
  262. package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +0 -174
  263. package/src/components/json-editor-with-variables/extensions/variable-tree.tsx +0 -83
  264. package/src/components/prompt-editor-with-inputs/extensions/inputs-tree.tsx +0 -94
  265. package/src/components/prompt-editor-with-variables/styles.tsx +0 -44
  266. /package/dist/cjs/{plugins/json-schema-preset/manager.js → components/condition-context/types.js} +0 -0
  267. /package/dist/cjs/components/{json-editor-with-variables → coze-editor-extensions}/styles.js +0 -0
  268. /package/dist/esm/{plugins/json-schema-preset/manager.mjs → components/condition-context/types.mjs} +0 -0
  269. /package/dist/esm/components/{json-editor-with-variables → coze-editor-extensions}/styles.mjs +0 -0
  270. /package/dist/types/components/{json-editor-with-variables → coze-editor-extensions}/extensions/variable-tag.d.ts +0 -0
  271. /package/dist/types/components/{json-editor-with-variables → coze-editor-extensions}/styles.d.ts +0 -0
  272. /package/src/components/{json-editor-with-variables → coze-editor-extensions}/styles.tsx +0 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { ConditionOpConfigs } from './types';
6
+ export declare enum ConditionPresetOp {
7
+ EQ = "eq",
8
+ NEQ = "neq",
9
+ GT = "gt",
10
+ GTE = "gte",
11
+ LT = "lt",
12
+ LTE = "lte",
13
+ IN = "in",
14
+ NIN = "nin",
15
+ CONTAINS = "contains",
16
+ NOT_CONTAINS = "not_contains",
17
+ IS_EMPTY = "is_empty",
18
+ IS_NOT_EMPTY = "is_not_empty",
19
+ IS_TRUE = "is_true",
20
+ IS_FALSE = "is_false"
21
+ }
22
+ export declare const defaultConditionOpConfigs: ConditionOpConfigs;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { type IJsonSchema } from '@flowgram.ai/json-schema';
6
+ export interface ConditionOpConfig {
7
+ label: string;
8
+ abbreviation: string;
9
+ rightDisplay?: string;
10
+ }
11
+ export type OpKey = string;
12
+ export type ConditionOpConfigs = Record<OpKey, ConditionOpConfig>;
13
+ export type IConditionRule = Record<OpKey, string | IJsonSchema | null>;
14
+ export type IConditionRuleFactory = (schema?: IJsonSchema) => Record<OpKey, string | IJsonSchema | null>;
@@ -3,20 +3,17 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
- import { ConditionRowValueType, IRules, OpConfigs } from './types';
6
+ import { IConditionRule, ConditionOpConfigs } from '../condition-context';
7
+ import { ConditionRowValueType } from './types';
7
8
  interface PropTypes {
8
9
  value?: ConditionRowValueType;
9
10
  onChange: (value?: ConditionRowValueType) => void;
10
11
  style?: React.CSSProperties;
11
12
  readonly?: boolean;
12
13
  ruleConfig?: {
13
- ops?: OpConfigs;
14
- rules?: IRules;
14
+ ops?: ConditionOpConfigs;
15
+ rules?: Record<string, IConditionRule>;
15
16
  };
16
17
  }
17
18
  export declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes): React.JSX.Element;
18
- export declare namespace ConditionRow {
19
- var defaultRules: IRules;
20
- var defaultOpConfigs: OpConfigs;
21
- }
22
19
  export { type ConditionRowValueType };
@@ -3,30 +3,6 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import { IFlowConstantRefValue, IFlowRefValue } from '../../shared';
6
- export declare enum Op {
7
- EQ = "eq",
8
- NEQ = "neq",
9
- GT = "gt",
10
- GTE = "gte",
11
- LT = "lt",
12
- LTE = "lte",
13
- IN = "in",
14
- NIN = "nin",
15
- CONTAINS = "contains",
16
- NOT_CONTAINS = "not_contains",
17
- IS_EMPTY = "is_empty",
18
- IS_NOT_EMPTY = "is_not_empty",
19
- IS_TRUE = "is_true",
20
- IS_FALSE = "is_false"
21
- }
22
- export interface OpConfig {
23
- label: string;
24
- abbreviation: string;
25
- rightDisplay?: string;
26
- }
27
- export type OpConfigs = Record<string, OpConfig>;
28
- export type IRule = Partial<Record<string, string | null>>;
29
- export type IRules = Record<string, IRule>;
30
6
  export interface ConditionRowValueType {
31
7
  left?: IFlowRefValue;
32
8
  operator?: string;
@@ -3,7 +3,12 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
+ import { IFlowValue } from '../../../shared';
6
7
  export declare function InputsPicker({ inputsValues, onSelect, }: {
7
8
  inputsValues: any;
8
9
  onSelect: (v: string) => void;
9
10
  }): React.JSX.Element;
11
+ export declare function InputsTree({ inputsValues, triggerCharacters, }: {
12
+ inputsValues: Record<string, IFlowValue>;
13
+ triggerCharacters?: string[];
14
+ }): React.JSX.Element;
@@ -3,4 +3,6 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
- export declare function VariableTree(): React.JSX.Element;
6
+ export declare function VariableTree({ triggerCharacters, }: {
7
+ triggerCharacters?: string[];
8
+ }): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const EditorVariableTree: import("react").FC<{
6
+ triggerCharacters?: string[];
7
+ }> & {
8
+ renderKey?: string;
9
+ };
10
+ export declare const EditorVariableTagInject: import("react").FC<unknown> & {
11
+ renderKey?: string;
12
+ };
13
+ export declare const EditorInputsTree: import("react").FC<{
14
+ inputsValues: Record<string, import("../../shared").IFlowValue>;
15
+ triggerCharacters?: string[];
16
+ }> & {
17
+ renderKey?: string;
18
+ };
@@ -3,7 +3,8 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
- import { DBConditionOptionType, DBConditionRowValueType, IRules, OpConfigs } from './types';
6
+ import { type ConditionOpConfigs, type IConditionRule } from '../condition-context';
7
+ import { DBConditionOptionType, DBConditionRowValueType } from './types';
7
8
  interface PropTypes {
8
9
  value?: DBConditionRowValueType;
9
10
  onChange: (value?: DBConditionRowValueType) => void;
@@ -11,8 +12,8 @@ interface PropTypes {
11
12
  options?: DBConditionOptionType[];
12
13
  readonly?: boolean;
13
14
  ruleConfig?: {
14
- ops?: OpConfigs;
15
- rules?: IRules;
15
+ ops?: ConditionOpConfigs;
16
+ rules?: Record<string, IConditionRule>;
16
17
  };
17
18
  }
18
19
  export declare function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig, }: PropTypes): React.JSX.Element;
@@ -4,14 +4,6 @@
4
4
  */
5
5
  import { IJsonSchema } from '@flowgram.ai/json-schema';
6
6
  import { IFlowConstantRefValue } from '../../shared';
7
- export interface OpConfig {
8
- label: string;
9
- abbreviation: string;
10
- rightDisplay?: string;
11
- }
12
- export type OpConfigs = Record<string, OpConfig>;
13
- export type IRule = Partial<Record<string, string | null>>;
14
- export type IRules = Record<string, IRule>;
15
7
  export interface DBConditionRowValueType {
16
8
  left?: string;
17
9
  schema?: IJsonSchema;
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
- import { IJsonSchema, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
6
+ import { type IJsonSchema, type JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
7
7
  interface PropsType {
8
8
  value?: IJsonSchema;
9
9
  parentKey?: string;
@@ -23,5 +23,7 @@ export declare function DynamicValueInput({ value, onChange, readonly, style, sc
23
23
  export declare namespace DynamicValueInput {
24
24
  var renderKey: string;
25
25
  }
26
- export declare const InjectDynamicValueInput: React.FC<PropsType>;
26
+ export declare const InjectDynamicValueInput: React.FC<PropsType> & {
27
+ renderKey?: string;
28
+ };
27
29
  export {};
@@ -7,10 +7,12 @@ export { AssignRows } from './assign-rows';
7
7
  export { BatchOutputs } from './batch-outputs';
8
8
  export { BatchVariableSelector } from './batch-variable-selector';
9
9
  export { BlurInput } from './blur-input';
10
- export { CodeEditor, type CodeEditorPropsType } from './code-editor';
10
+ export { BaseCodeEditor, CodeEditor, JsonCodeEditor, PythonCodeEditor, SQLCodeEditor, ShellCodeEditor, TypeScriptCodeEditor, type CodeEditorPropsType, } from './code-editor';
11
11
  export { CodeEditorMini } from './code-editor-mini';
12
+ export { ConditionPresetOp, ConditionProvider, type ConditionOpConfig, type ConditionOpConfigs, type IConditionRule, type IConditionRuleFactory, useCondition, useConditionContext, } from './condition-context';
12
13
  export { ConditionRow, type ConditionRowValueType } from './condition-row';
13
14
  export { ConstantInput, type ConstantInputStrategy } from './constant-input';
15
+ export { EditorInputsTree, EditorVariableTagInject, EditorVariableTree, } from './coze-editor-extensions';
14
16
  export { DBConditionRow, type DBConditionOptionType, type DBConditionRowValueType, } from './db-condition-row';
15
17
  export { DisplayFlowValue } from './display-flow-value';
16
18
  export { DisplayInputsValueAllInTag, DisplayInputsValues } from './display-inputs-values';
@@ -25,5 +27,6 @@ export { JsonSchemaEditor } from './json-schema-editor';
25
27
  export { PromptEditor, type PromptEditorPropsType } from './prompt-editor';
26
28
  export { PromptEditorWithInputs, type PromptEditorWithInputsProps, } from './prompt-editor-with-inputs';
27
29
  export { PromptEditorWithVariables, type PromptEditorWithVariablesProps, } from './prompt-editor-with-variables';
30
+ export { SQLEditorWithVariables, type SQLEditorWithVariablesProps, } from './sql-editor-with-variables';
28
31
  export { InjectTypeSelector, TypeSelector, getTypeSelectValue, parseTypeSelectValue, type TypeSelectorProps, } from './type-selector';
29
32
  export { InjectVariableSelector, VariableSelector, VariableSelectorProvider, useVariableTree, type VariableSelectorProps, } from './variable-selector';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import React from 'react';
6
+ import { type CodeEditorPropsType } from '../code-editor';
7
+ export interface SQLEditorWithVariablesProps extends Omit<CodeEditorPropsType, 'languageId'> {
8
+ }
9
+ export declare function SQLEditorWithVariables(props: SQLEditorWithVariablesProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export declare const SQLEditorWithVariables: import("react").LazyExoticComponent<typeof import("./editor").SQLEditorWithVariables>;
6
+ export type { SQLEditorWithVariablesProps } from './editor';
@@ -20,4 +20,6 @@ export declare function TypeSelector(props: TypeSelectorProps): React.JSX.Elemen
20
20
  export declare namespace TypeSelector {
21
21
  var renderKey: string;
22
22
  }
23
- export declare const InjectTypeSelector: React.FC<TypeSelectorProps>;
23
+ export declare const InjectTypeSelector: React.FC<TypeSelectorProps> & {
24
+ renderKey?: string;
25
+ };
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { IJsonSchema } from '@flowgram.ai/json-schema';
7
- import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
7
+ import { type TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
8
8
  import { useVariableTree } from './use-variable-tree';
9
9
  export interface VariableSelectorProps {
10
10
  value?: string[];
@@ -25,5 +25,7 @@ export declare const VariableSelector: {
25
25
  ({ value, config, onChange, style, readonly, includeSchema, excludeSchema, hasError, triggerRender, }: VariableSelectorProps): React.JSX.Element;
26
26
  renderKey: string;
27
27
  };
28
- export declare const InjectVariableSelector: React.FC<VariableSelectorProps>;
28
+ export declare const InjectVariableSelector: React.FC<VariableSelectorProps> & {
29
+ renderKey?: string;
30
+ };
29
31
  export { VariableSelectorProvider } from './context';
@@ -9,4 +9,8 @@ export declare const provideBatchOutputsEffect: EffectOptions[];
9
9
  */
10
10
  export declare const createBatchOutputsFormPlugin: FormPluginCreator<{
11
11
  outputKey: string;
12
+ /**
13
+ * if set, infer json schema to inferTargetKey when submit
14
+ */
15
+ inferTargetKey?: string;
12
16
  }>;
@@ -6,6 +6,10 @@ interface InputConfig {
6
6
  sourceKey: string;
7
7
  targetKey: string;
8
8
  scope?: 'private' | 'public';
9
+ /**
10
+ * For backend runtime, constant schema is redundant, so we can choose to ignore it
11
+ */
12
+ ignoreConstantSchema?: boolean;
9
13
  }
10
14
  export declare const createInferInputsPlugin: import("@flowgram.ai/node").FormPluginCreator<InputConfig>;
11
15
  export {};
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export { AssignRow, AssignRows, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, type AssignValueType, type CodeEditorPropsType, type ConditionRowValueType, type ConstantInputStrategy, type DBConditionOptionType, type DBConditionRowValueType, type JsonEditorWithVariablesProps, type PromptEditorPropsType, type PromptEditorWithInputsProps, type PromptEditorWithVariablesProps, type TypeSelectorProps, type VariableSelectorProps, useVariableTree, } from './components';
5
+ export { AssignRow, AssignRows, BaseCodeEditor, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, ConditionPresetOp, ConditionProvider, ConditionRow, ConstantInput, DBConditionRow, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, EditorInputsTree, EditorVariableTagInject, EditorVariableTree, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonCodeEditor, JsonEditorWithVariables, JsonSchemaEditor, PromptEditor, PromptEditorWithInputs, PromptEditorWithVariables, PythonCodeEditor, SQLCodeEditor, SQLEditorWithVariables, ShellCodeEditor, TypeScriptCodeEditor, TypeSelector, VariableSelector, VariableSelectorProvider, getTypeSelectValue, parseTypeSelectValue, type AssignValueType, type CodeEditorPropsType, type ConditionOpConfig, type ConditionOpConfigs, type ConditionRowValueType, type ConstantInputStrategy, type DBConditionOptionType, type DBConditionRowValueType, type IConditionRule, type IConditionRuleFactory, type JsonEditorWithVariablesProps, type PromptEditorPropsType, type PromptEditorWithInputsProps, type PromptEditorWithVariablesProps, type SQLEditorWithVariablesProps, type TypeSelectorProps, type VariableSelectorProps, useCondition, useConditionContext, useVariableTree, } from './components';
6
6
  export { autoRenameRefEffect, listenRefSchemaChange, listenRefValueChange, provideBatchInputEffect, provideJsonSchemaOutputs, syncVariableTitle, validateWhenVariableSync, } from './effects';
7
7
  export { createBatchOutputsFormPlugin, createInferAssignPlugin, createInferInputsPlugin, provideBatchOutputsEffect, } from './form-plugins';
8
8
  export { useObjectList } from './hooks';
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { JsonSchemaTypeRegistry } from './manager';
5
+ import { JsonSchemaTypeRegistry } from './types';
6
6
  export declare const createTypePresetPlugin: import("@flowgram.ai/core").PluginCreator<{
7
7
  types?: Partial<JsonSchemaTypeRegistry> & Pick<JsonSchemaTypeRegistry, "type">[];
8
8
  unregisterTypes?: string[];
@@ -2,12 +2,8 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import React from 'react';
6
- import { type IJsonSchema, JsonSchemaUtils, JsonSchemaTypeManager, type JsonSchemaBasicType } from '@flowgram.ai/json-schema';
7
- import { type JsonSchemaTypeRegistry, type ConstantRendererProps } from './manager';
5
+ import { type JsonSchemaBasicType, JsonSchemaUtils, type IJsonSchema } from '@flowgram.ai/json-schema';
6
+ import { type ConstantRendererProps, type JsonSchemaTypeRegistry } from './types';
7
+ import { useTypeManager, JsonSchemaTypePresetProvider } from './react';
8
8
  import { createTypePresetPlugin } from './create-type-preset-plugin';
9
- declare const useTypeManager: () => JsonSchemaTypeManager<IJsonSchema, JsonSchemaTypeRegistry>;
10
- declare const JsonSchemaTypePresetProvider: ({ types, children, }: React.PropsWithChildren<{
11
- types: JsonSchemaTypeRegistry[];
12
- }>) => React.JSX.Element;
13
9
  export { createTypePresetPlugin, useTypeManager, JsonSchemaTypePresetProvider, JsonSchemaUtils, type IJsonSchema, type JsonSchemaTypeRegistry, type ConstantRendererProps, type JsonSchemaBasicType, };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import React from 'react';
6
+ import { type IJsonSchema, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
7
+ import { type JsonSchemaTypeRegistry } from './types';
8
+ export declare const useTypeManager: () => JsonSchemaTypeManager<IJsonSchema, JsonSchemaTypeRegistry>;
9
+ export declare const JsonSchemaTypePresetProvider: ({ types, children, }: React.PropsWithChildren<{
10
+ types: JsonSchemaTypeRegistry[];
11
+ }>) => React.JSX.Element;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const arrayRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const booleanRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const dateTimeRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,4 +2,6 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export declare const jsonSchemaTypePreset: Partial<import("..").JsonSchemaTypeRegistry<any>>[];
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
+ export declare const jsonSchemaTypePreset: Partial<JsonSchemaTypeRegistry<any>>[];
7
+ export declare const initRegistries: () => void;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const integerRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
+ export declare const mapRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const numberRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const objectRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- import { type JsonSchemaTypeRegistry } from '../manager';
5
+ import { type JsonSchemaTypeRegistry } from '../types';
6
6
  export declare const stringRegistry: Partial<JsonSchemaTypeRegistry>;
@@ -3,6 +3,7 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import { JsonSchemaTypeRegistry as OriginJsonSchemaTypeRegistry } from '@flowgram.ai/json-schema';
6
+ import { IConditionRule, IConditionRuleFactory } from '../../components/condition-context/types';
6
7
  export interface ConstantRendererProps<Value = any> {
7
8
  value?: Value;
8
9
  onChange?: (value: Value) => void;
@@ -14,4 +15,8 @@ export interface JsonSchemaTypeRegistry<Value = any> extends OriginJsonSchemaTyp
14
15
  * Render Constant Input
15
16
  */
16
17
  ConstantRenderer: React.FC<ConstantRendererProps<Value>>;
18
+ /**
19
+ * Condition Rules
20
+ */
21
+ conditionRule?: IConditionRule | IConditionRuleFactory;
17
22
  }
@@ -37,11 +37,13 @@ export declare namespace FlowValueUtils {
37
37
  * @returns A generator of flow values
38
38
  */
39
39
  function traverse(value: any, options: {
40
- includeTypes?: FlowValueType[];
40
+ includeTypes: FlowValueType[];
41
41
  path?: string;
42
+ pathArr?: string[];
42
43
  }): Generator<{
43
44
  value: IFlowValue;
44
45
  path: string;
46
+ pathArr: string[];
45
47
  }>;
46
48
  /**
47
49
  * Get all key paths in the template value
@@ -3,6 +3,9 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
+ type WithRenderKey<T> = T & {
7
+ renderKey?: string;
8
+ };
6
9
  /**
7
10
  * Creates a material component wrapper with dependency injection support
8
11
  *
@@ -39,8 +42,7 @@ import React from 'react';
39
42
  * @param params.renderKey - Custom render key name, highest priority
40
43
  * @returns Wrapper component with dependency injection support
41
44
  */
42
- export declare function createInjectMaterial<Props>(Component: React.FC<Props> & {
43
- renderKey?: string;
44
- }, params?: {
45
+ export declare function createInjectMaterial<Props>(Component: WithRenderKey<React.FC<Props> | React.ExoticComponent<Props>>, params?: {
45
46
  renderKey?: string;
46
- }): React.FC<Props>;
47
+ }): WithRenderKey<React.FC<Props>>;
48
+ export {};
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import { FeedbackLevel, FlowNodeEntity } from '@flowgram.ai/editor';
6
- import { IFlowValue } from '../../shared';
6
+ import { type IFlowValue } from '../../shared';
7
7
  interface Context {
8
8
  node: FlowNodeEntity;
9
9
  required?: boolean;
package/package.json CHANGED
@@ -1,17 +1,55 @@
1
1
  {
2
2
  "name": "@flowgram.ai/form-materials",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.17",
4
4
  "homepage": "https://flowgram.ai/",
5
5
  "repository": "https://github.com/bytedance/flowgram.ai",
6
6
  "license": "MIT",
7
7
  "exports": {
8
- "types": "./dist/types/index.d.ts",
9
- "import": "./dist/esm/index.mjs",
10
- "require": "./dist/cjs/index.js"
8
+ ".": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "import": "./dist/esm/index.mjs",
11
+ "require": "./dist/cjs/index.js"
12
+ },
13
+ "./components/*": {
14
+ "types": "./dist/types/components/*/index.d.ts",
15
+ "import": "./dist/esm/components/*/index.mjs",
16
+ "require": "./dist/cjs/components/*/index.js"
17
+ },
18
+ "./effects/*": {
19
+ "types": "./dist/types/effects/*/index.d.ts",
20
+ "import": "./dist/esm/effects/*/index.mjs",
21
+ "require": "./dist/cjs/effects/*/index.js"
22
+ },
23
+ "./hooks/*": {
24
+ "types": "./dist/types/hooks/*/index.d.ts",
25
+ "import": "./dist/esm/hooks/*/index.mjs",
26
+ "require": "./dist/cjs/hooks/*/index.js"
27
+ },
28
+ "./shared/*": {
29
+ "types": "./dist/types/shared/*/index.d.ts",
30
+ "import": "./dist/esm/shared/*/index.mjs",
31
+ "require": "./dist/cjs/shared/*/index.js"
32
+ },
33
+ "./form-plugins/*": {
34
+ "types": "./dist/types/form-plugins/*/index.d.ts",
35
+ "import": "./dist/esm/form-plugins/*/index.mjs",
36
+ "require": "./dist/cjs/form-plugins/*/index.js"
37
+ },
38
+ "./plugins/*": {
39
+ "types": "./dist/types/plugins/*/index.d.ts",
40
+ "import": "./dist/esm/plugins/*/index.mjs",
41
+ "require": "./dist/cjs/plugins/*/index.js"
42
+ },
43
+ "./validate/*": {
44
+ "types": "./dist/types/validate/*/index.d.ts",
45
+ "import": "./dist/esm/validate/*/index.mjs",
46
+ "require": "./dist/cjs/validate/*/index.js"
47
+ }
11
48
  },
12
49
  "main": "./dist/cjs/index.js",
13
50
  "module": "./dist/esm/index.mjs",
14
51
  "types": "./dist/types/index.d.ts",
52
+ "sideEffects": false,
15
53
  "bin": {
16
54
  "flowgram-form-materials": "./bin/run.sh"
17
55
  },
@@ -22,49 +60,50 @@
22
60
  ],
23
61
  "dependencies": {
24
62
  "@douyinfe/semi-icons": "^2.80.0",
25
- "@douyinfe/semi-illustrations": "^2.80.0",
26
63
  "@douyinfe/semi-ui": "^2.80.0",
27
64
  "lodash-es": "^4.17.21",
28
- "nanoid": "^4.0.2",
65
+ "nanoid": "^5.0.9",
29
66
  "immer": "~10.1.1",
30
67
  "@codemirror/view": "~6.38.0",
31
68
  "@codemirror/state": "~6.5.2",
32
69
  "zod": "^3.24.4",
33
- "@flowgram.ai/json-schema": "0.1.0-alpha.15",
34
- "@flowgram.ai/coze-editor": "0.1.0-alpha.15",
35
- "@flowgram.ai/editor": "0.1.0-alpha.15"
70
+ "@flowgram.ai/editor": "0.1.0-alpha.17",
71
+ "@flowgram.ai/json-schema": "0.1.0-alpha.17",
72
+ "@flowgram.ai/coze-editor": "0.1.0-alpha.17"
36
73
  },
37
74
  "devDependencies": {
38
75
  "@types/lodash-es": "^4.17.12",
39
76
  "@types/node": "^18",
40
77
  "@types/react": "^18",
41
78
  "@types/react-dom": "^18",
42
- "@types/inquirer": "9.0.7",
79
+ "@types/inquirer": "^9.0.9",
43
80
  "@types/styled-components": "^5",
44
81
  "eslint": "^8.54.0",
45
82
  "react": "^18",
46
83
  "react-dom": "^18",
47
84
  "styled-components": "^5",
48
85
  "typescript": "^5.8.3",
49
- "vitest": "^0.34.6",
86
+ "vitest": "^3.2.4",
50
87
  "@rslib/core": "~0.12.4",
88
+ "cross-env": "~7.0.3",
51
89
  "@rsbuild/plugin-react": "^1.1.1",
52
- "@flowgram.ai/ts-config": "0.1.0-alpha.15",
53
- "@flowgram.ai/eslint-config": "0.1.0-alpha.15"
90
+ "date-fns": "~4.1.0",
91
+ "@flowgram.ai/eslint-config": "0.1.0-alpha.17",
92
+ "@flowgram.ai/ts-config": "0.1.0-alpha.17"
54
93
  },
55
94
  "peerDependencies": {
56
95
  "react": ">=16.8",
57
96
  "react-dom": ">=16.8",
58
- "styled-components": ">=4"
97
+ "styled-components": ">=5"
59
98
  },
60
99
  "publishConfig": {
61
100
  "access": "public",
62
101
  "registry": "https://registry.npmjs.org/"
63
102
  },
64
103
  "scripts": {
65
- "build": "rslib build",
66
- "build:fast": "rslib build",
67
- "build:watch": "rslib build",
104
+ "build": "cross-env NODE_ENV=production rslib build",
105
+ "build:fast": "cross-env NODE_ENV=development rslib build",
106
+ "build:watch": "npm run build:fast",
68
107
  "name-export": "node scripts/name-export.js",
69
108
  "clean": "rimraf dist",
70
109
  "test": "exit 0",
@@ -3,9 +3,17 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
 
6
+ /* eslint-disable react/prop-types */
7
+ /**
8
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
9
+ * SPDX-License-Identifier: MIT
10
+ */
11
+
6
12
  import React, { useEffect, useState } from 'react';
7
13
 
8
- import Input, { InputProps } from '@douyinfe/semi-ui/lib/es/input';
14
+ import { Input } from '@douyinfe/semi-ui';
15
+
16
+ type InputProps = React.ComponentPropsWithoutRef<typeof Input>;
9
17
 
10
18
  export function BlurInput(props: InputProps) {
11
19
  const [value, setValue] = useState('');