@flowgram.ai/form-materials 0.1.0-alpha.18 → 0.1.0-alpha.19

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 (227) hide show
  1. package/dist/cjs/components/batch-outputs/index.js +5 -3
  2. package/dist/cjs/components/batch-outputs/styles.css +13 -0
  3. package/dist/cjs/components/blur-input/index.js +1 -0
  4. package/dist/cjs/components/code-editor/editor.js +16 -12
  5. package/dist/cjs/components/code-editor/styles.css +4 -0
  6. package/dist/cjs/components/code-editor/theme/dark.js +1 -1
  7. package/dist/cjs/components/code-editor/theme/light.js +1 -1
  8. package/dist/cjs/components/code-editor-mini/index.js +2 -16
  9. package/dist/cjs/components/condition-context/hooks/use-condition.js +17 -1
  10. package/dist/cjs/components/condition-row/index.js +26 -12
  11. package/dist/cjs/components/condition-row/styles.css +19 -0
  12. package/dist/cjs/components/coze-editor-extensions/extensions/inputs-tree.js +2 -2
  13. package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +31 -11
  14. package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
  15. package/dist/cjs/components/db-condition-row/index.js +29 -14
  16. package/dist/cjs/components/db-condition-row/styles.css +30 -0
  17. package/dist/cjs/components/display-inputs-values/index.js +3 -2
  18. package/dist/cjs/components/display-inputs-values/styles.css +6 -0
  19. package/dist/cjs/components/display-outputs/index.js +5 -4
  20. package/dist/cjs/components/display-outputs/styles.css +6 -0
  21. package/dist/cjs/components/display-schema-tag/index.js +7 -4
  22. package/dist/cjs/components/display-schema-tag/styles.css +21 -0
  23. package/dist/cjs/components/display-schema-tree/index.js +12 -7
  24. package/dist/cjs/components/display-schema-tree/styles.css +64 -0
  25. package/dist/cjs/components/dynamic-value-input/index.js +9 -5
  26. package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +24 -30
  27. package/dist/cjs/components/inputs-values/index.js +5 -3
  28. package/dist/cjs/components/inputs-values/styles.css +13 -0
  29. package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
  30. package/dist/cjs/components/inputs-values-tree/index.js +4 -3
  31. package/dist/cjs/components/inputs-values-tree/row.js +19 -15
  32. package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
  33. package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
  34. package/dist/cjs/components/json-schema-editor/hooks.js +55 -48
  35. package/dist/cjs/components/json-schema-editor/icon.js +70 -0
  36. package/dist/cjs/components/json-schema-editor/index.js +37 -25
  37. package/dist/cjs/components/json-schema-editor/styles.css +113 -0
  38. package/dist/cjs/components/prompt-editor/editor.js +16 -6
  39. package/dist/cjs/components/prompt-editor/styles.css +10 -0
  40. package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
  41. package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
  42. package/dist/cjs/components/variable-selector/context.js +7 -3
  43. package/dist/cjs/components/variable-selector/index.js +16 -10
  44. package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
  45. package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
  46. package/dist/cjs/shared/inject-material/index.js +1 -1
  47. package/dist/esm/components/batch-outputs/index.mjs +5 -3
  48. package/dist/esm/components/batch-outputs/styles.css +13 -0
  49. package/dist/esm/components/blur-input/index.mjs +1 -0
  50. package/dist/esm/components/code-editor/editor.mjs +16 -11
  51. package/dist/esm/components/code-editor/styles.css +4 -0
  52. package/dist/esm/components/code-editor/theme/dark.mjs +1 -1
  53. package/dist/esm/components/code-editor/theme/light.mjs +1 -1
  54. package/dist/esm/components/code-editor-mini/index.mjs +2 -6
  55. package/dist/esm/components/condition-context/hooks/use-condition.mjs +18 -2
  56. package/dist/esm/components/condition-row/index.mjs +26 -12
  57. package/dist/esm/components/condition-row/styles.css +19 -0
  58. package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +3 -3
  59. package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +32 -12
  60. package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
  61. package/dist/esm/components/db-condition-row/index.mjs +29 -14
  62. package/dist/esm/components/db-condition-row/styles.css +30 -0
  63. package/dist/esm/components/display-inputs-values/index.mjs +3 -2
  64. package/dist/esm/components/display-inputs-values/styles.css +6 -0
  65. package/dist/esm/components/display-outputs/index.mjs +5 -4
  66. package/dist/esm/components/display-outputs/styles.css +6 -0
  67. package/dist/esm/components/display-schema-tag/index.mjs +8 -5
  68. package/dist/esm/components/display-schema-tag/styles.css +21 -0
  69. package/dist/esm/components/display-schema-tree/index.mjs +12 -7
  70. package/dist/esm/components/display-schema-tree/styles.css +64 -0
  71. package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
  72. package/dist/esm/components/dynamic-value-input/styles.css +48 -0
  73. package/dist/esm/components/inputs-values/index.mjs +5 -3
  74. package/dist/esm/components/inputs-values/styles.css +13 -0
  75. package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
  76. package/dist/esm/components/inputs-values-tree/index.mjs +4 -3
  77. package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
  78. package/dist/esm/components/inputs-values-tree/styles.css +85 -0
  79. package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
  80. package/dist/esm/components/json-schema-editor/hooks.mjs +55 -48
  81. package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
  82. package/dist/esm/components/json-schema-editor/index.mjs +36 -24
  83. package/dist/esm/components/json-schema-editor/styles.css +113 -0
  84. package/dist/esm/components/prompt-editor/editor.mjs +16 -6
  85. package/dist/esm/components/prompt-editor/styles.css +10 -0
  86. package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
  87. package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
  88. package/dist/esm/components/variable-selector/context.mjs +7 -3
  89. package/dist/esm/components/variable-selector/index.mjs +17 -11
  90. package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
  91. package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
  92. package/dist/esm/shared/inject-material/index.mjs +1 -1
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/dist/types/components/batch-outputs/index.d.ts +1 -0
  95. package/dist/types/components/blur-input/index.d.ts +1 -1
  96. package/dist/types/components/code-editor/editor.d.ts +1 -0
  97. package/dist/types/components/condition-context/hooks/use-condition.d.ts +16 -1
  98. package/dist/types/components/condition-row/index.d.ts +5 -1
  99. package/dist/types/components/coze-editor-extensions/extensions/inputs-tree.d.ts +3 -3
  100. package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
  101. package/dist/types/components/coze-editor-extensions/index.d.ts +1 -1
  102. package/dist/types/components/db-condition-row/index.d.ts +4 -0
  103. package/dist/types/components/db-condition-row/types.d.ts +0 -1
  104. package/dist/types/components/display-inputs-values/index.d.ts +3 -1
  105. package/dist/types/components/display-outputs/index.d.ts +1 -0
  106. package/dist/types/components/display-schema-tag/index.d.ts +1 -0
  107. package/dist/types/components/display-schema-tree/index.d.ts +1 -0
  108. package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
  109. package/dist/types/components/inputs-values/index.d.ts +1 -0
  110. package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
  111. package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
  112. package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
  113. package/dist/types/components/inputs-values-tree/types.d.ts +3 -2
  114. package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
  115. package/dist/types/components/json-schema-editor/index.d.ts +1 -0
  116. package/dist/types/components/prompt-editor/editor.d.ts +1 -0
  117. package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
  118. package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
  119. package/dist/types/components/variable-selector/context.d.ts +16 -3
  120. package/dist/types/components/variable-selector/index.d.ts +1 -0
  121. package/dist/types/index.d.ts +1 -1
  122. package/dist/types/shared/flow-value/index.d.ts +1 -1
  123. package/dist/types/shared/flow-value/types.d.ts +3 -0
  124. package/dist/types/shared/index.d.ts +1 -1
  125. package/package.json +7 -10
  126. package/src/components/batch-outputs/index.tsx +5 -5
  127. package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
  128. package/src/components/blur-input/index.tsx +2 -1
  129. package/src/components/code-editor/editor.tsx +19 -14
  130. package/src/components/code-editor/styles.css +11 -0
  131. package/src/components/code-editor/theme/dark.ts +1 -1
  132. package/src/components/code-editor/theme/light.ts +1 -1
  133. package/src/components/code-editor-mini/index.tsx +2 -9
  134. package/src/components/condition-context/hooks/use-condition.tsx +51 -7
  135. package/src/components/condition-row/index.tsx +27 -22
  136. package/src/components/condition-row/{styles.tsx → styles.css} +11 -11
  137. package/src/components/coze-editor-extensions/extensions/inputs-tree.tsx +7 -6
  138. package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +19 -14
  139. package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
  140. package/src/components/db-condition-row/index.tsx +29 -26
  141. package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
  142. package/src/components/db-condition-row/types.ts +0 -1
  143. package/src/components/display-inputs-values/index.tsx +5 -4
  144. package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
  145. package/src/components/display-outputs/index.tsx +5 -5
  146. package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
  147. package/src/components/display-schema-tag/index.tsx +7 -7
  148. package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
  149. package/src/components/display-schema-tree/index.tsx +10 -10
  150. package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
  151. package/src/components/dynamic-value-input/index.tsx +6 -6
  152. package/src/components/dynamic-value-input/{styles.tsx → styles.css} +9 -12
  153. package/src/components/inputs-values/index.tsx +5 -5
  154. package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
  155. package/src/components/inputs-values-tree/icon.tsx +28 -0
  156. package/src/components/inputs-values-tree/index.tsx +8 -6
  157. package/src/components/inputs-values-tree/row.tsx +25 -27
  158. package/src/components/inputs-values-tree/styles.css +94 -0
  159. package/src/components/inputs-values-tree/types.ts +3 -2
  160. package/src/components/json-schema-editor/default-value.tsx +2 -4
  161. package/src/components/json-schema-editor/hooks.tsx +60 -53
  162. package/src/components/json-schema-editor/icon.tsx +28 -0
  163. package/src/components/json-schema-editor/index.tsx +45 -50
  164. package/src/components/json-schema-editor/styles.css +135 -0
  165. package/src/components/prompt-editor/editor.tsx +18 -7
  166. package/src/components/prompt-editor/styles.css +14 -0
  167. package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
  168. package/src/components/prompt-editor-with-variables/index.tsx +13 -5
  169. package/src/components/variable-selector/context.tsx +22 -2
  170. package/src/components/variable-selector/index.tsx +24 -14
  171. package/src/components/variable-selector/styles.css +70 -0
  172. package/src/components/variable-selector/use-variable-tree.tsx +9 -1
  173. package/src/index.ts +1 -0
  174. package/src/shared/flow-value/index.ts +1 -0
  175. package/src/shared/flow-value/types.ts +4 -0
  176. package/src/shared/index.ts +1 -0
  177. package/src/shared/inject-material/index.tsx +1 -1
  178. package/dist/cjs/components/batch-outputs/styles.js +0 -60
  179. package/dist/cjs/components/condition-row/styles.js +0 -77
  180. package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
  181. package/dist/cjs/components/db-condition-row/styles.js +0 -94
  182. package/dist/cjs/components/display-inputs-values/styles.js +0 -51
  183. package/dist/cjs/components/display-outputs/styles.js +0 -51
  184. package/dist/cjs/components/display-schema-tag/styles.js +0 -71
  185. package/dist/cjs/components/display-schema-tree/styles.js +0 -135
  186. package/dist/cjs/components/dynamic-value-input/styles.js +0 -107
  187. package/dist/cjs/components/inputs-values/styles.js +0 -60
  188. package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
  189. package/dist/cjs/components/json-schema-editor/styles.js +0 -231
  190. package/dist/cjs/components/prompt-editor/styles.js +0 -55
  191. package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
  192. package/dist/cjs/components/prompt-editor-with-variables/editor.js +0 -48
  193. package/dist/cjs/components/variable-selector/styles.js +0 -114
  194. package/dist/esm/components/batch-outputs/styles.mjs +0 -13
  195. package/dist/esm/components/condition-row/styles.mjs +0 -21
  196. package/dist/esm/components/db-condition-row/styles.mjs +0 -32
  197. package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
  198. package/dist/esm/components/display-outputs/styles.mjs +0 -7
  199. package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
  200. package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
  201. package/dist/esm/components/inputs-values/styles.mjs +0 -13
  202. package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
  203. package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
  204. package/dist/esm/components/prompt-editor/styles.mjs +0 -11
  205. package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
  206. package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
  207. package/dist/types/components/batch-outputs/styles.d.ts +0 -6
  208. package/dist/types/components/condition-row/styles.d.ts +0 -9
  209. package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
  210. package/dist/types/components/db-condition-row/styles.d.ts +0 -12
  211. package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
  212. package/dist/types/components/display-outputs/styles.d.ts +0 -5
  213. package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
  214. package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
  215. package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
  216. package/dist/types/components/inputs-values/styles.d.ts +0 -6
  217. package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
  218. package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
  219. package/dist/types/components/prompt-editor/styles.d.ts +0 -7
  220. package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -10
  221. package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
  222. package/dist/types/components/variable-selector/styles.d.ts +0 -14
  223. package/src/components/inputs-values-tree/styles.tsx +0 -128
  224. package/src/components/json-schema-editor/styles.tsx +0 -168
  225. package/src/components/prompt-editor/styles.tsx +0 -18
  226. package/src/components/prompt-editor-with-inputs/editor.tsx +0 -24
  227. package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
@@ -1,12 +1,12 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { I18n } from "@flowgram.ai/editor";
4
- import { Popover } from "@douyinfe/semi-ui";
4
+ import { Popover, Tag, TreeSelect } from "@douyinfe/semi-ui";
5
5
  import { IconChevronDownStroked, IconIssueStroked } from "@douyinfe/semi-icons";
6
6
  import { createInjectMaterial } from "../../shared/index.mjs";
7
7
  import { useVariableTree } from "./use-variable-tree.mjs";
8
- import { UIPopoverContent, UIRootTitle, UITag, UITreeSelect, UIVarName } from "./styles.mjs";
9
8
  import { VariableSelectorProvider, useVariableSelectorContext } from "./context.mjs";
9
+ import "./styles.css";
10
10
  const VariableSelector = ({ value, config = {}, onChange, style, readonly = false, includeSchema, excludeSchema, hasError, triggerRender })=>{
11
11
  const { skipVariable } = useVariableSelectorContext();
12
12
  const treeData = useVariableTree({
@@ -35,21 +35,23 @@ const VariableSelector = ({ value, config = {}, onChange, style, readonly = fals
35
35
  return icon;
36
36
  };
37
37
  return /*#__PURE__*/ jsx(Fragment, {
38
- children: /*#__PURE__*/ jsx(UITreeSelect, {
38
+ children: /*#__PURE__*/ jsx(TreeSelect, {
39
+ className: `gedit-m-variable-selector-tree-select ${hasError ? 'error' : ''}`,
39
40
  dropdownMatchSelectWidth: false,
40
41
  disabled: readonly,
41
42
  treeData: treeData,
42
43
  size: "small",
43
44
  value: treeValue,
44
45
  clearIcon: null,
45
- $error: hasError,
46
46
  style: style,
47
47
  validateStatus: hasError ? 'error' : void 0,
48
+ dropdownClassName: "gedit-m-variable-selector-dropdown",
48
49
  onChange: (_, _config)=>{
49
50
  onChange(_config.keyPath);
50
51
  },
51
52
  renderSelectedItem: (_option)=>{
52
- if (!_option?.keyPath) return /*#__PURE__*/ jsx(UITag, {
53
+ if (!_option?.keyPath) return /*#__PURE__*/ jsx(Tag, {
54
+ className: "gedit-m-variable-selector-tag",
53
55
  prefixIcon: /*#__PURE__*/ jsx(IconIssueStroked, {}),
54
56
  color: "amber",
55
57
  closable: !readonly,
@@ -57,28 +59,32 @@ const VariableSelector = ({ value, config = {}, onChange, style, readonly = fals
57
59
  children: config?.notFoundContent ?? 'Undefined'
58
60
  });
59
61
  const rootIcon = renderIcon(_option.rootMeta?.icon || _option?.icon);
60
- const rootTitle = /*#__PURE__*/ jsx(UIRootTitle, {
62
+ const rootTitle = /*#__PURE__*/ jsx("div", {
63
+ className: "gedit-m-variable-selector-root-title",
61
64
  children: _option.rootMeta?.title ? `${_option.rootMeta?.title} ${_option.isRoot ? '' : '-'} ` : null
62
65
  });
63
66
  return /*#__PURE__*/ jsx("div", {
64
67
  children: /*#__PURE__*/ jsx(Popover, {
65
- content: /*#__PURE__*/ jsxs(UIPopoverContent, {
68
+ content: /*#__PURE__*/ jsxs("div", {
69
+ className: "gedit-m-variable-selector-tag-pop",
66
70
  children: [
67
71
  rootIcon,
68
72
  rootTitle,
69
- /*#__PURE__*/ jsx(UIVarName, {
73
+ /*#__PURE__*/ jsx("div", {
74
+ className: "gedit-m-variable-selector-var-name",
70
75
  children: _option.keyPath.slice(1).join('.')
71
76
  })
72
77
  ]
73
78
  }),
74
- children: /*#__PURE__*/ jsxs(UITag, {
79
+ children: /*#__PURE__*/ jsxs(Tag, {
80
+ className: "gedit-m-variable-selector-tag",
75
81
  prefixIcon: rootIcon,
76
82
  closable: !readonly,
77
83
  onClose: ()=>onChange(void 0),
78
84
  children: [
79
85
  rootTitle,
80
- !_option.isRoot && /*#__PURE__*/ jsx(UIVarName, {
81
- $inSelector: true,
86
+ !_option.isRoot && /*#__PURE__*/ jsx("div", {
87
+ className: "gedit-m-variable-selector-var-name in-selector",
82
88
  children: _option.label
83
89
  })
84
90
  ]
@@ -1,54 +1,45 @@
1
- /**
2
- * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
- * SPDX-License-Identifier: MIT
4
- */
5
-
6
- import styled, { css } from 'styled-components';
7
- import { Tag, TreeSelect } from '@douyinfe/semi-ui';
8
-
9
- export const UIRootTitle = styled.div`
10
- margin-right: 4px;
11
- min-width: 20px;
12
- overflow: hidden;
1
+ .gedit-m-variable-selector-root-title {
13
2
  text-overflow: ellipsis;
14
3
  white-space: nowrap;
4
+ min-width: 20px;
15
5
  color: var(--semi-color-text-2);
16
- `;
17
-
18
- export const UIVarName = styled.div<{ $inSelector?: boolean }>`
6
+ margin-right: 4px;
19
7
  overflow: hidden;
8
+ }
9
+
10
+ .gedit-m-variable-selector-var-name {
20
11
  text-overflow: ellipsis;
21
12
  white-space: nowrap;
13
+ overflow: hidden;
22
14
 
23
- ${({ $inSelector }) =>
24
- $inSelector &&
25
- css`
26
- min-width: 50%;
27
- `}
28
- `;
15
+ &.in-selector {
16
+ min-width: 50%;
17
+ }
18
+ }
29
19
 
30
- export const UITag = styled(Tag)`
20
+ .gedit-m-variable-selector-tag {
21
+ justify-content: flex-start;
22
+ align-items: center;
31
23
  width: 100%;
24
+ height: 22px;
25
+ margin: 0;
32
26
  display: flex;
33
- align-items: center;
34
- justify-content: flex-start;
35
27
 
36
28
  & .semi-tag-content-center {
37
29
  justify-content: flex-start;
38
30
  }
31
+ }
39
32
 
40
- &.semi-tag {
41
- margin: 0;
42
- height: 22px;
43
- }
44
- `;
33
+ .gedit-m-variable-selector-tree-select {
34
+ outline: none;
45
35
 
46
- export const UITreeSelect = styled(TreeSelect)<{ $error?: boolean }>`
47
- outline: ${({ $error }) => ($error ? '1px solid red' : 'none')};
36
+ &.error {
37
+ outline: 1px solid red;
38
+ }
48
39
 
49
40
  & .semi-tree-select-selection {
50
- padding: 0px;
51
41
  height: 22px;
42
+ padding: 0;
52
43
  }
53
44
 
54
45
  & .semi-tree-select-selection-content {
@@ -58,12 +49,18 @@ export const UITreeSelect = styled(TreeSelect)<{ $error?: boolean }>`
58
49
  & .semi-tree-select-selection-placeholder {
59
50
  padding-left: 10px;
60
51
  }
61
- `;
52
+ }
62
53
 
63
- export const UIPopoverContent = styled.div`
54
+ .gedit-m-variable-selector-tag-pop {
55
+ white-space: nowrap;
56
+ justify-content: flex-start;
57
+ align-items: center;
64
58
  padding: 10px;
65
59
  display: inline-flex;
66
- align-items: center;
67
- justify-content: flex-start;
68
- white-space: nowrap;
69
- `;
60
+ }
61
+
62
+ .gedit-m-variable-selector-dropdown {
63
+ max-height: 300px;
64
+ overflow: auto;
65
+ }
66
+
@@ -3,8 +3,10 @@ import { useCallback } from "react";
3
3
  import { JsonSchemaUtils, useTypeManager } from "@flowgram.ai/json-schema";
4
4
  import { ASTMatch, useAvailableVariables } from "@flowgram.ai/editor";
5
5
  import { Icon } from "@douyinfe/semi-ui";
6
+ import { useVariableSelectorContext } from "./context.mjs";
6
7
  function useVariableTree(params) {
7
- const { includeSchema, excludeSchema, skipVariable } = params;
8
+ const context = useVariableSelectorContext();
9
+ const { includeSchema = context.includeSchema, excludeSchema = context.excludeSchema, skipVariable = context.skipVariable } = params;
8
10
  const typeManager = useTypeManager();
9
11
  const variables = useAvailableVariables();
10
12
  const getVariableTypeIcon = useCallback((variable)=>{
@@ -4,7 +4,7 @@ function createInjectMaterial(Component, params) {
4
4
  const renderKey = params?.renderKey || Component.renderKey || Component.name || '';
5
5
  const InjectComponent = (props)=>{
6
6
  const container = usePlaygroundContainer();
7
- if (!container?.isBound(FlowRendererRegistry)) return /*#__PURE__*/ react.createElement(Component, {
7
+ if (!container?.isBound?.(FlowRendererRegistry)) return /*#__PURE__*/ react.createElement(Component, {
8
8
  ...props
9
9
  });
10
10
  const rendererRegistry = container.get(FlowRendererRegistry);
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/styles.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor-all.tsx","../src/components/code-editor/editor-json.tsx","../src/components/code-editor/editor-python.tsx","../src/components/code-editor/editor-shell.tsx","../src/components/code-editor/editor-sql.tsx","../src/components/code-editor/editor-ts.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/factory.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-context/context.tsx","../src/components/condition-context/index.tsx","../src/components/condition-context/op.ts","../src/components/condition-context/types.ts","../src/components/condition-context/hooks/use-condition.tsx","../src/components/condition-row/index.tsx","../src/components/condition-row/styles.tsx","../src/components/condition-row/types.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/coze-editor-extensions/index.tsx","../src/components/coze-editor-extensions/styles.tsx","../src/components/coze-editor-extensions/extensions/inputs-tree.tsx","../src/components/coze-editor-extensions/extensions/variable-tag.tsx","../src/components/coze-editor-extensions/extensions/variable-tree.tsx","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/styles.tsx","../src/components/db-condition-row/types.ts","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-inputs-values/styles.ts","../src/components/display-outputs/index.tsx","../src/components/display-outputs/styles.ts","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tag/styles.ts","../src/components/display-schema-tree/index.tsx","../src/components/display-schema-tree/styles.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/dynamic-value-input/styles.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/styles.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/styles.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/styles.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/styles.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/editor.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-variables/editor.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/sql-editor-with-variables/editor.tsx","../src/components/sql-editor-with-variables/index.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/styles.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/react.tsx","../src/plugins/json-schema-preset/types.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/map.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.9.2"}
1
+ {"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor-all.tsx","../src/components/code-editor/editor-json.tsx","../src/components/code-editor/editor-python.tsx","../src/components/code-editor/editor-shell.tsx","../src/components/code-editor/editor-sql.tsx","../src/components/code-editor/editor-ts.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/factory.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-context/context.tsx","../src/components/condition-context/index.tsx","../src/components/condition-context/op.ts","../src/components/condition-context/types.ts","../src/components/condition-context/hooks/use-condition.tsx","../src/components/condition-row/index.tsx","../src/components/condition-row/types.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/coze-editor-extensions/index.tsx","../src/components/coze-editor-extensions/extensions/inputs-tree.tsx","../src/components/coze-editor-extensions/extensions/variable-tag.tsx","../src/components/coze-editor-extensions/extensions/variable-tree.tsx","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/types.ts","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-outputs/index.tsx","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tree/index.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/icon.tsx","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/icon.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/sql-editor-with-variables/editor.tsx","../src/components/sql-editor-with-variables/index.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/react.tsx","../src/plugins/json-schema-preset/types.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/map.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.9.2"}
@@ -4,4 +4,5 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { PropsType } from './types';
7
+ import './styles.css';
7
8
  export declare function BatchOutputs(props: PropsType): React.JSX.Element;
@@ -8,6 +8,6 @@
8
8
  */
9
9
  import React from 'react';
10
10
  import { Input } from '@douyinfe/semi-ui';
11
- type InputProps = React.ComponentPropsWithoutRef<typeof Input>;
11
+ type InputProps = React.ComponentPropsWithRef<typeof Input>;
12
12
  export declare function BlurInput(props: InputProps): React.JSX.Element;
13
13
  export {};
@@ -5,6 +5,7 @@
5
5
  import React from 'react';
6
6
  import { InferValues } from '@flowgram.ai/coze-editor/react';
7
7
  import preset from '@flowgram.ai/coze-editor/preset-code';
8
+ import './styles.css';
8
9
  type Preset = typeof preset;
9
10
  type Options = Partial<InferValues<Preset[number]>>;
10
11
  export interface CodeEditorPropsType extends React.PropsWithChildren<{}> {
@@ -5,9 +5,24 @@
5
5
  import { IJsonSchema } from '@flowgram.ai/json-schema';
6
6
  import { IConditionRule, ConditionOpConfigs } from '../types';
7
7
  interface HooksParams {
8
+ /**
9
+ * Left schema of condition
10
+ */
8
11
  leftSchema?: IJsonSchema;
12
+ /**
13
+ * Operator of condition
14
+ */
9
15
  operator?: string;
10
16
  /**
17
+ * If op is not in opOptionList, clear it
18
+ */
19
+ onClearOp?: () => void;
20
+ /**
21
+ * If targetSchema updated, clear it
22
+ */
23
+ onClearRight?: () => void;
24
+ /**
25
+ * @deprecated use ConditionProvider instead
11
26
  * custom rule config
12
27
  */
13
28
  ruleConfig?: {
@@ -15,7 +30,7 @@ interface HooksParams {
15
30
  rules?: Record<string, IConditionRule>;
16
31
  };
17
32
  }
18
- export declare function useCondition({ leftSchema, operator, ruleConfig }: HooksParams): {
33
+ export declare function useCondition({ leftSchema, operator, onClearOp, onClearRight, ruleConfig, }: HooksParams): {
19
34
  rule: IConditionRule | undefined;
20
35
  opConfig: import("..").ConditionOpConfig;
21
36
  opOptionList: {
@@ -5,15 +5,19 @@
5
5
  import React from 'react';
6
6
  import { IConditionRule, ConditionOpConfigs } from '../condition-context';
7
7
  import { ConditionRowValueType } from './types';
8
+ import './styles.css';
8
9
  interface PropTypes {
9
10
  value?: ConditionRowValueType;
10
11
  onChange: (value?: ConditionRowValueType) => void;
11
12
  style?: React.CSSProperties;
12
13
  readonly?: boolean;
14
+ /**
15
+ * @deprecated use ConditionContext instead to pass ruleConfig to multiple
16
+ */
13
17
  ruleConfig?: {
14
18
  ops?: ConditionOpConfigs;
15
19
  rules?: Record<string, IConditionRule>;
16
20
  };
17
21
  }
18
- export declare function ConditionRow({ style, value, onChange, readonly, ruleConfig, }: PropTypes): React.JSX.Element;
22
+ export declare function ConditionRow({ style, value, onChange, readonly, ruleConfig }: PropTypes): React.JSX.Element;
19
23
  export { type ConditionRowValueType };
@@ -3,12 +3,12 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
- import { IFlowValue } from '../../../shared';
6
+ import { IInputsValues } from '../../../shared/flow-value/types';
7
7
  export declare function InputsPicker({ inputsValues, onSelect, }: {
8
- inputsValues: any;
8
+ inputsValues: IInputsValues;
9
9
  onSelect: (v: string) => void;
10
10
  }): React.JSX.Element;
11
11
  export declare function InputsTree({ inputsValues, triggerCharacters, }: {
12
- inputsValues: Record<string, IFlowValue>;
12
+ inputsValues: IInputsValues;
13
13
  triggerCharacters?: string[];
14
14
  }): React.JSX.Element;
@@ -2,4 +2,5 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
+ import '../styles.css';
5
6
  export declare function VariableTagInject(): null;
@@ -11,7 +11,7 @@ export declare const EditorVariableTagInject: import("react").FC<unknown> & {
11
11
  renderKey?: string;
12
12
  };
13
13
  export declare const EditorInputsTree: import("react").FC<{
14
- inputsValues: Record<string, import("../../shared").IFlowValue>;
14
+ inputsValues: import("../../shared").IInputsValues;
15
15
  triggerCharacters?: string[];
16
16
  }> & {
17
17
  renderKey?: string;
@@ -5,12 +5,16 @@
5
5
  import React from 'react';
6
6
  import { type ConditionOpConfigs, type IConditionRule } from '../condition-context';
7
7
  import { DBConditionOptionType, DBConditionRowValueType } from './types';
8
+ import './styles.css';
8
9
  interface PropTypes {
9
10
  value?: DBConditionRowValueType;
10
11
  onChange: (value?: DBConditionRowValueType) => void;
11
12
  style?: React.CSSProperties;
12
13
  options?: DBConditionOptionType[];
13
14
  readonly?: boolean;
15
+ /**
16
+ * @deprecated use ConditionContext instead to pass ruleConfig to multiple
17
+ */
14
18
  ruleConfig?: {
15
19
  ops?: ConditionOpConfigs;
16
20
  rules?: Record<string, IConditionRule>;
@@ -6,7 +6,6 @@ import { IJsonSchema } from '@flowgram.ai/json-schema';
6
6
  import { IFlowConstantRefValue } from '../../shared';
7
7
  export interface DBConditionRowValueType {
8
8
  left?: string;
9
- schema?: IJsonSchema;
10
9
  operator?: string;
11
10
  right?: IFlowConstantRefValue;
12
11
  }
@@ -3,8 +3,10 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
+ import { IInputsValues } from '../../shared/flow-value';
7
+ import './styles.css';
6
8
  interface PropsType {
7
- value?: any;
9
+ value?: IInputsValues;
8
10
  showIconInTree?: boolean;
9
11
  }
10
12
  export declare function DisplayInputsValues({ value, showIconInTree }: PropsType): React.JSX.Element;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { IJsonSchema, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
7
+ import './styles.css';
7
8
  interface PropsType {
8
9
  value?: IJsonSchema;
9
10
  showIconInTree?: boolean;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { IJsonSchema } from '@flowgram.ai/json-schema';
7
+ import './styles.css';
7
8
  interface PropsType {
8
9
  title?: JSX.Element | string;
9
10
  value?: IJsonSchema;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { type IJsonSchema, type JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
7
+ import './styles.css';
7
8
  interface PropsType {
8
9
  value?: IJsonSchema;
9
10
  parentKey?: string;
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  import { IJsonSchema } from '@flowgram.ai/json-schema';
7
7
  import { IFlowConstantRefValue } from '../../shared';
8
8
  import { ConstantInputStrategy } from '../constant-input';
9
+ import './styles.css';
9
10
  interface PropsType {
10
11
  value?: IFlowConstantRefValue;
11
12
  onChange: (value?: IFlowConstantRefValue) => void;
@@ -4,4 +4,5 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { PropsType } from './types';
7
+ import './styles.css';
7
8
  export declare function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError, }: PropsType): 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
+ import React from 'react';
6
+ export declare const IconAddChildren: () => React.JSX.Element;
@@ -4,4 +4,5 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { PropsType } from './types';
7
+ import './styles.css';
7
8
  export declare function InputsValuesTree(props: PropsType): React.JSX.Element;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { PropsType } from './types';
7
+ import './styles.css';
7
8
  export declare function InputValueRow(props: {
8
9
  keyName?: string;
9
10
  value?: any;
@@ -3,10 +3,11 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import { IJsonSchema } from '@flowgram.ai/json-schema';
6
+ import { IInputsValues } from '../../shared';
6
7
  import { ConstantInputStrategy } from '../constant-input';
7
8
  export interface PropsType {
8
- value?: any;
9
- onChange: (value?: any) => void;
9
+ value?: IInputsValues;
10
+ onChange: (value?: IInputsValues) => void;
10
11
  readonly?: boolean;
11
12
  hasError?: boolean;
12
13
  schema?: IJsonSchema;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import React from 'react';
6
+ export declare const IconAddChildren: () => React.JSX.Element;
@@ -5,6 +5,7 @@
5
5
  import React from 'react';
6
6
  import { IJsonSchema } from '@flowgram.ai/json-schema';
7
7
  import { ConfigType } from './types';
8
+ import './styles.css';
8
9
  export declare function JsonSchemaEditor(props: {
9
10
  value?: IJsonSchema;
10
11
  onChange?: (value: IJsonSchema) => void;
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  import { InferValues } from '@flowgram.ai/coze-editor/react';
7
7
  import preset from '@flowgram.ai/coze-editor/preset-prompt';
8
8
  import { PropsType } from './types';
9
+ import './styles.css';
9
10
  type Preset = typeof preset;
10
11
  type Options = Partial<InferValues<Preset[number]>>;
11
12
  export interface PromptEditorPropsType extends PropsType {
@@ -2,5 +2,10 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export declare const PromptEditorWithInputs: import("react").LazyExoticComponent<typeof import("./editor").PromptEditorWithInputs>;
6
- export type { PromptEditorWithInputsProps } from './editor';
5
+ import React from 'react';
6
+ import type { IInputsValues } from '../../shared/flow-value';
7
+ import { PromptEditorPropsType } from '../prompt-editor';
8
+ export interface PromptEditorWithInputsProps extends PromptEditorPropsType {
9
+ inputsValues: IInputsValues;
10
+ }
11
+ export declare function PromptEditorWithInputs({ inputsValues, ...restProps }: PromptEditorWithInputsProps): React.JSX.Element;
@@ -2,5 +2,8 @@
2
2
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
- export declare const PromptEditorWithVariables: import("react").LazyExoticComponent<typeof import("./editor").PromptEditorWithVariables>;
6
- export type { PromptEditorWithVariablesProps } from './editor';
5
+ import React from 'react';
6
+ import { PromptEditorPropsType } from '../prompt-editor';
7
+ export interface PromptEditorWithVariablesProps extends PromptEditorPropsType {
8
+ }
9
+ export declare function PromptEditorWithVariables(props: PromptEditorWithVariablesProps): React.JSX.Element;
@@ -3,14 +3,27 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  import React from 'react';
6
+ import { IJsonSchema } from '@flowgram.ai/json-schema';
6
7
  import { BaseVariableField } from '@flowgram.ai/editor';
8
+ type VariableField = BaseVariableField<{
9
+ icon?: string | JSX.Element;
10
+ title?: string;
11
+ disabled?: boolean;
12
+ }>;
7
13
  export declare const VariableSelectorContext: React.Context<{
8
- skipVariable?: (variable?: BaseVariableField) => boolean;
14
+ includeSchema?: IJsonSchema | IJsonSchema[];
15
+ excludeSchema?: IJsonSchema | IJsonSchema[];
16
+ skipVariable?: (variable: VariableField) => boolean;
9
17
  }>;
10
18
  export declare const useVariableSelectorContext: () => {
11
- skipVariable?: (variable?: BaseVariableField) => boolean;
19
+ includeSchema?: IJsonSchema | IJsonSchema[];
20
+ excludeSchema?: IJsonSchema | IJsonSchema[];
21
+ skipVariable?: (variable: VariableField) => boolean;
12
22
  };
13
- export declare const VariableSelectorProvider: ({ children, skipVariable, }: {
23
+ export declare const VariableSelectorProvider: ({ children, skipVariable, includeSchema, excludeSchema, }: {
14
24
  skipVariable?: (variable?: BaseVariableField) => boolean;
25
+ includeSchema?: IJsonSchema | IJsonSchema[];
26
+ excludeSchema?: IJsonSchema | IJsonSchema[];
15
27
  children: React.ReactNode;
16
28
  }) => React.JSX.Element;
29
+ export {};
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  import { IJsonSchema } from '@flowgram.ai/json-schema';
7
7
  import { type TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
8
8
  import { useVariableTree } from './use-variable-tree';
9
+ import './styles.css';
9
10
  export interface VariableSelectorProps {
10
11
  value?: string[];
11
12
  config?: {
@@ -7,5 +7,5 @@ export { autoRenameRefEffect, listenRefSchemaChange, listenRefValueChange, provi
7
7
  export { createBatchOutputsFormPlugin, createInferAssignPlugin, createInferInputsPlugin, provideBatchOutputsEffect, } from './form-plugins';
8
8
  export { useObjectList } from './hooks';
9
9
  export { JsonSchemaTypePresetProvider, JsonSchemaUtils, createDisableDeclarationPlugin, createTypePresetPlugin, type ConstantRendererProps, type IJsonSchema, type JsonSchemaBasicType, type JsonSchemaTypeRegistry, useTypeManager, } from './plugins';
10
- export { FlowValueUtils, createInjectMaterial, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, polyfillCreateRoot, type FlowValueType, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, unstableSetCreateRoot, withSuspense, } from './shared';
10
+ export { FlowValueUtils, createInjectMaterial, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, polyfillCreateRoot, type FlowValueType, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IInputsValues, type IPolyfillRoot, unstableSetCreateRoot, withSuspense, } from './shared';
11
11
  export { validateFlowValue } from './validate';
@@ -3,4 +3,4 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
  export { FlowValueUtils } from './utils';
6
- export { type IFlowValueExtra, type FlowValueType, type IFlowValue, type IFlowConstantValue, type IFlowRefValue, type IFlowExpressionValue, type IFlowTemplateValue, type IFlowConstantRefValue, } from './types';
6
+ export { type IFlowValueExtra, type FlowValueType, type IFlowValue, type IFlowConstantValue, type IFlowRefValue, type IFlowExpressionValue, type IFlowTemplateValue, type IFlowConstantRefValue, type IInputsValues, } from './types';
@@ -30,3 +30,6 @@ export interface IFlowTemplateValue {
30
30
  }
31
31
  export type IFlowValue = IFlowConstantValue | IFlowRefValue | IFlowExpressionValue | IFlowTemplateValue;
32
32
  export type IFlowConstantRefValue = IFlowConstantValue | IFlowRefValue;
33
+ export interface IInputsValues {
34
+ [key: string]: IInputsValues | IFlowValue | undefined;
35
+ }
@@ -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 { FlowValueUtils, type FlowValueType, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, } from './flow-value';
5
+ export { FlowValueUtils, type FlowValueType, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IInputsValues, } from './flow-value';
6
6
  export { formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, } from './format-legacy-refs';
7
7
  export { createInjectMaterial } from './inject-material';
8
8
  export { lazySuspense, withSuspense } from './lazy-suspense';