@flowgram.ai/form-materials 0.5.5 → 0.5.7

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 (208) 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 +4 -1
  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-mini/index.js +2 -16
  7. package/dist/cjs/components/condition-context/hooks/use-condition.js +17 -1
  8. package/dist/cjs/components/condition-row/index.js +26 -12
  9. package/dist/cjs/components/condition-row/styles.css +19 -0
  10. package/dist/cjs/components/coze-editor-extensions/extensions/inputs-tree.js +2 -2
  11. package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +44 -15
  12. package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
  13. package/dist/cjs/components/db-condition-row/index.js +29 -14
  14. package/dist/cjs/components/db-condition-row/styles.css +30 -0
  15. package/dist/cjs/components/display-inputs-values/index.js +3 -2
  16. package/dist/cjs/components/display-inputs-values/styles.css +6 -0
  17. package/dist/cjs/components/display-outputs/index.js +5 -4
  18. package/dist/cjs/components/display-outputs/styles.css +6 -0
  19. package/dist/cjs/components/display-schema-tag/index.js +7 -4
  20. package/dist/cjs/components/display-schema-tag/styles.css +21 -0
  21. package/dist/cjs/components/display-schema-tree/index.js +12 -7
  22. package/dist/cjs/components/display-schema-tree/styles.css +64 -0
  23. package/dist/cjs/components/dynamic-value-input/index.js +9 -5
  24. package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +23 -30
  25. package/dist/cjs/components/inputs-values/index.js +5 -3
  26. package/dist/cjs/components/inputs-values/styles.css +13 -0
  27. package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
  28. package/dist/cjs/components/inputs-values-tree/index.js +3 -2
  29. package/dist/cjs/components/inputs-values-tree/row.js +19 -15
  30. package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
  31. package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
  32. package/dist/cjs/components/json-schema-editor/icon.js +70 -0
  33. package/dist/cjs/components/json-schema-editor/index.js +37 -25
  34. package/dist/cjs/components/json-schema-editor/styles.css +113 -0
  35. package/dist/cjs/components/prompt-editor/editor.js +16 -6
  36. package/dist/cjs/components/prompt-editor/styles.css +10 -0
  37. package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
  38. package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
  39. package/dist/cjs/components/variable-selector/context.js +7 -3
  40. package/dist/cjs/components/variable-selector/index.js +16 -10
  41. package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
  42. package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
  43. package/dist/cjs/effects/validate-when-variable-sync/index.js +3 -3
  44. package/dist/cjs/shared/inject-material/index.js +1 -1
  45. package/dist/esm/components/batch-outputs/index.mjs +5 -3
  46. package/dist/esm/components/batch-outputs/styles.css +13 -0
  47. package/dist/esm/components/blur-input/index.mjs +4 -1
  48. package/dist/esm/components/code-editor/editor.mjs +16 -11
  49. package/dist/esm/components/code-editor/styles.css +4 -0
  50. package/dist/esm/components/code-editor-mini/index.mjs +2 -6
  51. package/dist/esm/components/condition-context/hooks/use-condition.mjs +18 -2
  52. package/dist/esm/components/condition-row/index.mjs +26 -12
  53. package/dist/esm/components/condition-row/styles.css +19 -0
  54. package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +3 -3
  55. package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +45 -16
  56. package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
  57. package/dist/esm/components/db-condition-row/index.mjs +29 -14
  58. package/dist/esm/components/db-condition-row/styles.css +30 -0
  59. package/dist/esm/components/display-inputs-values/index.mjs +3 -2
  60. package/dist/esm/components/display-inputs-values/styles.css +6 -0
  61. package/dist/esm/components/display-outputs/index.mjs +5 -4
  62. package/dist/esm/components/display-outputs/styles.css +6 -0
  63. package/dist/esm/components/display-schema-tag/index.mjs +8 -5
  64. package/dist/esm/components/display-schema-tag/styles.css +21 -0
  65. package/dist/esm/components/display-schema-tree/index.mjs +12 -7
  66. package/dist/esm/components/display-schema-tree/styles.css +64 -0
  67. package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
  68. package/dist/esm/components/dynamic-value-input/styles.css +48 -0
  69. package/dist/esm/components/inputs-values/index.mjs +5 -3
  70. package/dist/esm/components/inputs-values/styles.css +13 -0
  71. package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
  72. package/dist/esm/components/inputs-values-tree/index.mjs +3 -2
  73. package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
  74. package/dist/esm/components/inputs-values-tree/styles.css +85 -0
  75. package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
  76. package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
  77. package/dist/esm/components/json-schema-editor/index.mjs +36 -24
  78. package/dist/esm/components/json-schema-editor/styles.css +113 -0
  79. package/dist/esm/components/prompt-editor/editor.mjs +16 -6
  80. package/dist/esm/components/prompt-editor/styles.css +10 -0
  81. package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
  82. package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
  83. package/dist/esm/components/variable-selector/context.mjs +7 -3
  84. package/dist/esm/components/variable-selector/index.mjs +17 -11
  85. package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
  86. package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
  87. package/dist/esm/effects/validate-when-variable-sync/index.mjs +3 -3
  88. package/dist/esm/shared/inject-material/index.mjs +1 -1
  89. package/dist/tsconfig.tsbuildinfo +1 -1
  90. package/dist/types/components/batch-outputs/index.d.ts +1 -0
  91. package/dist/types/components/code-editor/editor.d.ts +1 -0
  92. package/dist/types/components/condition-context/hooks/use-condition.d.ts +16 -1
  93. package/dist/types/components/condition-row/index.d.ts +5 -1
  94. package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
  95. package/dist/types/components/db-condition-row/index.d.ts +4 -0
  96. package/dist/types/components/db-condition-row/types.d.ts +0 -1
  97. package/dist/types/components/display-inputs-values/index.d.ts +1 -0
  98. package/dist/types/components/display-outputs/index.d.ts +1 -0
  99. package/dist/types/components/display-schema-tag/index.d.ts +1 -0
  100. package/dist/types/components/display-schema-tree/index.d.ts +1 -0
  101. package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
  102. package/dist/types/components/inputs-values/index.d.ts +1 -0
  103. package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
  104. package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
  105. package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
  106. package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
  107. package/dist/types/components/json-schema-editor/index.d.ts +1 -0
  108. package/dist/types/components/prompt-editor/editor.d.ts +1 -0
  109. package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
  110. package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
  111. package/dist/types/components/variable-selector/context.d.ts +16 -3
  112. package/dist/types/components/variable-selector/index.d.ts +1 -0
  113. package/package.json +7 -10
  114. package/src/components/batch-outputs/index.tsx +5 -5
  115. package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
  116. package/src/components/blur-input/index.tsx +4 -1
  117. package/src/components/code-editor/editor.tsx +19 -14
  118. package/src/components/code-editor/styles.css +11 -0
  119. package/src/components/code-editor-mini/index.tsx +2 -9
  120. package/src/components/condition-context/hooks/use-condition.tsx +51 -7
  121. package/src/components/condition-row/index.tsx +27 -22
  122. package/src/components/condition-row/{styles.tsx → styles.css} +10 -11
  123. package/src/components/coze-editor-extensions/extensions/inputs-tree.tsx +3 -3
  124. package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +35 -22
  125. package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
  126. package/src/components/db-condition-row/index.tsx +29 -26
  127. package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
  128. package/src/components/db-condition-row/types.ts +0 -1
  129. package/src/components/display-inputs-values/index.tsx +3 -3
  130. package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
  131. package/src/components/display-outputs/index.tsx +5 -5
  132. package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
  133. package/src/components/display-schema-tag/index.tsx +7 -7
  134. package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
  135. package/src/components/display-schema-tree/index.tsx +10 -10
  136. package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
  137. package/src/components/dynamic-value-input/index.tsx +6 -6
  138. package/src/components/dynamic-value-input/{styles.tsx → styles.css} +8 -12
  139. package/src/components/inputs-values/index.tsx +5 -5
  140. package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
  141. package/src/components/inputs-values-tree/icon.tsx +28 -0
  142. package/src/components/inputs-values-tree/index.tsx +3 -3
  143. package/src/components/inputs-values-tree/row.tsx +25 -27
  144. package/src/components/inputs-values-tree/styles.css +94 -0
  145. package/src/components/json-schema-editor/default-value.tsx +2 -4
  146. package/src/components/json-schema-editor/icon.tsx +28 -0
  147. package/src/components/json-schema-editor/index.tsx +45 -50
  148. package/src/components/json-schema-editor/styles.css +135 -0
  149. package/src/components/prompt-editor/editor.tsx +18 -7
  150. package/src/components/prompt-editor/styles.css +14 -0
  151. package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
  152. package/src/components/prompt-editor-with-variables/index.tsx +13 -5
  153. package/src/components/variable-selector/context.tsx +22 -2
  154. package/src/components/variable-selector/index.tsx +24 -14
  155. package/src/components/variable-selector/styles.css +70 -0
  156. package/src/components/variable-selector/use-variable-tree.tsx +9 -1
  157. package/src/effects/validate-when-variable-sync/index.ts +7 -3
  158. package/src/shared/inject-material/index.tsx +1 -1
  159. package/dist/cjs/components/batch-outputs/styles.js +0 -60
  160. package/dist/cjs/components/condition-row/styles.js +0 -78
  161. package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
  162. package/dist/cjs/components/db-condition-row/styles.js +0 -94
  163. package/dist/cjs/components/display-inputs-values/styles.js +0 -51
  164. package/dist/cjs/components/display-outputs/styles.js +0 -51
  165. package/dist/cjs/components/display-schema-tag/styles.js +0 -71
  166. package/dist/cjs/components/display-schema-tree/styles.js +0 -135
  167. package/dist/cjs/components/dynamic-value-input/styles.js +0 -108
  168. package/dist/cjs/components/inputs-values/styles.js +0 -60
  169. package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
  170. package/dist/cjs/components/json-schema-editor/styles.js +0 -231
  171. package/dist/cjs/components/prompt-editor/styles.js +0 -55
  172. package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
  173. package/dist/cjs/components/prompt-editor-with-variables/editor.js +0 -48
  174. package/dist/cjs/components/variable-selector/styles.js +0 -114
  175. package/dist/esm/components/batch-outputs/styles.mjs +0 -13
  176. package/dist/esm/components/condition-row/styles.mjs +0 -22
  177. package/dist/esm/components/db-condition-row/styles.mjs +0 -32
  178. package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
  179. package/dist/esm/components/display-outputs/styles.mjs +0 -7
  180. package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
  181. package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
  182. package/dist/esm/components/inputs-values/styles.mjs +0 -13
  183. package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
  184. package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
  185. package/dist/esm/components/prompt-editor/styles.mjs +0 -11
  186. package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
  187. package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
  188. package/dist/types/components/batch-outputs/styles.d.ts +0 -6
  189. package/dist/types/components/condition-row/styles.d.ts +0 -9
  190. package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
  191. package/dist/types/components/db-condition-row/styles.d.ts +0 -12
  192. package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
  193. package/dist/types/components/display-outputs/styles.d.ts +0 -5
  194. package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
  195. package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
  196. package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
  197. package/dist/types/components/inputs-values/styles.d.ts +0 -6
  198. package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
  199. package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
  200. package/dist/types/components/prompt-editor/styles.d.ts +0 -7
  201. package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -11
  202. package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
  203. package/dist/types/components/variable-selector/styles.d.ts +0 -14
  204. package/src/components/inputs-values-tree/styles.tsx +0 -128
  205. package/src/components/json-schema-editor/styles.tsx +0 -168
  206. package/src/components/prompt-editor/styles.tsx +0 -18
  207. package/src/components/prompt-editor-with-inputs/editor.tsx +0 -25
  208. package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
@@ -11,7 +11,7 @@ import {
11
11
  useTypeManager,
12
12
  } from '@flowgram.ai/json-schema';
13
13
 
14
- import { HorizontalLine, TreeItem, TreeLevel, TreeRow, TreeTitle } from './styles';
14
+ import './styles.css';
15
15
 
16
16
  interface PropsType {
17
17
  value?: IJsonSchema;
@@ -45,15 +45,15 @@ function SchemaTree(props: PropsType) {
45
45
  const childEntries = Object.entries(properties || {});
46
46
 
47
47
  return (
48
- <TreeItem depth={depth} key={parentKey || 'root'}>
49
- <TreeRow>
50
- {depth !== 0 && <HorizontalLine />}
48
+ <div className={`gedit-m-display-schema-tree-item depth-${depth}`} key={parentKey || 'root'}>
49
+ <div className="gedit-m-display-schema-tree-row">
50
+ {depth !== 0 && <div className="gedit-m-display-schema-tree-horizontal-line" />}
51
51
  {showIcon &&
52
52
  icon &&
53
53
  React.cloneElement(icon, {
54
54
  className: 'tree-icon',
55
55
  })}
56
- <TreeTitle>
56
+ <div className="gedit-m-display-schema-tree-title">
57
57
  {parentKey ? (
58
58
  <>
59
59
  {`${parentKey} (`}
@@ -63,15 +63,15 @@ function SchemaTree(props: PropsType) {
63
63
  ) : (
64
64
  title
65
65
  )}
66
- </TreeTitle>
67
- </TreeRow>
66
+ </div>
67
+ </div>
68
68
  {childEntries?.length ? (
69
- <TreeLevel>
69
+ <div className="gedit-m-display-schema-tree-level">
70
70
  {childEntries.map(([key, value]) => (
71
71
  <SchemaTree key={key} {...props} parentKey={key} value={value} depth={depth + 1} />
72
72
  ))}
73
- </TreeLevel>
73
+ </div>
74
74
  ) : null}
75
- </TreeItem>
75
+ </div>
76
76
  );
77
77
  }
@@ -3,13 +3,11 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
 
6
- import styled, { css } from 'styled-components';
7
-
8
- export const TreeRow = styled.div`
6
+ .gedit-m-display-schema-tree-row {
9
7
  display: flex;
10
8
  align-items: center;
11
9
 
12
- .tree-icon {
10
+ & .tree-icon {
13
11
  margin-right: 8px;
14
12
  width: 14px;
15
13
  height: 14px;
@@ -17,14 +15,14 @@ export const TreeRow = styled.div`
17
15
 
18
16
  height: 27px;
19
17
  white-space: nowrap;
20
- `;
18
+ }
21
19
 
22
- export const HorizontalLine = styled.div`
20
+ .gedit-m-display-schema-tree-horizontal-line {
23
21
  position: relative;
24
22
 
25
23
  &::before,
26
24
  &::after {
27
- content: '';
25
+ content: "";
28
26
  position: absolute;
29
27
  background-color: var(--semi-color-text-3);
30
28
  }
@@ -35,14 +33,14 @@ export const HorizontalLine = styled.div`
35
33
  width: 15px;
36
34
  height: 1px;
37
35
  }
38
- `;
36
+ }
39
37
 
40
- export const TreeTitle = styled.div`
41
- // overflow: hidden;
42
- // text-overflow: ellipsis;
43
- `;
38
+ .gedit-m-display-schema-tree-title {
39
+ /* overflow: hidden;
40
+ text-overflow: ellipsis; */
41
+ }
44
42
 
45
- export const TreeLevel = styled.div`
43
+ .gedit-m-display-schema-tree-level {
46
44
  padding-left: 30px;
47
45
  position: relative;
48
46
 
@@ -55,13 +53,13 @@ export const TreeLevel = styled.div`
55
53
  left: -22px;
56
54
  width: 1px;
57
55
  } */
58
- `;
56
+ }
59
57
 
60
- export const TreeItem = styled.div<{ depth: number }>`
58
+ .gedit-m-display-schema-tree-item {
61
59
  position: relative;
62
60
 
63
61
  &::before {
64
- content: '';
62
+ content: "";
65
63
  position: absolute;
66
64
  background-color: var(--semi-color-text-3);
67
65
  }
@@ -80,11 +78,7 @@ export const TreeItem = styled.div<{ depth: number }>`
80
78
  left: -22px;
81
79
  }
82
80
 
83
- ${(props) =>
84
- props.depth === 0 &&
85
- css`
86
- &::before {
87
- width: 0px !important;
88
- }
89
- `}
90
- `;
81
+ &.depth-0::before {
82
+ width: 0px !important;
83
+ }
84
+ }
@@ -20,7 +20,7 @@ import { InjectVariableSelector } from '@/components/variable-selector';
20
20
  import { TypeSelector } from '@/components/type-selector';
21
21
  import { ConstantInput, ConstantInputStrategy } from '@/components/constant-input';
22
22
 
23
- import { UIContainer, UIMain, UITrigger, UIType } from './styles';
23
+ import './styles.css';
24
24
  import { useIncludeSchema, useRefVariable, useSelectSchema } from './hooks';
25
25
 
26
26
  interface PropsType {
@@ -144,11 +144,11 @@ export function DynamicValueInput({
144
144
  );
145
145
 
146
146
  return (
147
- <UIContainer style={style}>
148
- <UIType>{renderTypeSelector()}</UIType>
149
- <UIMain>{renderMain()}</UIMain>
150
- <UITrigger>{renderTrigger()}</UITrigger>
151
- </UIContainer>
147
+ <div className="gedit-m-dynamic-value-input-container" style={style}>
148
+ <div className="gedit-m-dynamic-value-input-type">{renderTypeSelector()}</div>
149
+ <div className="gedit-m-dynamic-value-input-main">{renderMain()}</div>
150
+ <div className="gedit-m-dynamic-value-input-trigger">{renderTrigger()}</div>
151
+ </div>
152
152
  );
153
153
  }
154
154
 
@@ -3,21 +3,17 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
 
6
- import styled from 'styled-components';
7
-
8
- export const UIContainer = styled.div`
6
+ .gedit-m-dynamic-value-input-container {
9
7
  display: flex;
10
8
  align-items: center;
11
9
  border-radius: 4px;
12
10
  border: 1px solid var(--semi-color-border);
13
11
  line-height: normal;
14
-
15
12
  overflow: hidden;
16
-
17
13
  background-color: var(--semi-color-fill-0);
18
- `;
14
+ }
19
15
 
20
- export const UIMain = styled.div`
16
+ .gedit-m-dynamic-value-input-main {
21
17
  flex-grow: 1;
22
18
  overflow: hidden;
23
19
  min-width: 0;
@@ -48,16 +44,16 @@ export const UIMain = styled.div`
48
44
  border-radius: 0;
49
45
  word-break: break-all;
50
46
  }
51
- `;
47
+ }
52
48
 
53
- export const UIType = styled.div`
49
+ .gedit-m-dynamic-value-input-type {
54
50
  & .semi-button {
55
51
  border-radius: 0;
56
52
  }
57
- `;
53
+ }
58
54
 
59
- export const UITrigger = styled.div`
55
+ .gedit-m-dynamic-value-input-trigger {
60
56
  & .semi-button {
61
57
  border-radius: 0;
62
58
  }
63
- `;
59
+ }
@@ -15,7 +15,7 @@ import { InjectDynamicValueInput } from '@/components/dynamic-value-input';
15
15
  import { BlurInput } from '@/components/blur-input';
16
16
 
17
17
  import { PropsType } from './types';
18
- import { UIRow, UIRows } from './styles';
18
+ import './styles.css';
19
19
 
20
20
  export function InputsValues({
21
21
  value,
@@ -34,9 +34,9 @@ export function InputsValues({
34
34
 
35
35
  return (
36
36
  <div>
37
- <UIRows style={style}>
37
+ <div className="gedit-m-inputs-values-rows" style={style}>
38
38
  {list.map((item) => (
39
- <UIRow key={item.id}>
39
+ <div className="gedit-m-inputs-values-row" key={item.id}>
40
40
  <BlurInput
41
41
  style={{ width: 100, minWidth: 100, maxWidth: 100 }}
42
42
  disabled={readonly}
@@ -64,9 +64,9 @@ export function InputsValues({
64
64
  size="small"
65
65
  onClick={() => remove(item.id)}
66
66
  />
67
- </UIRow>
67
+ </div>
68
68
  ))}
69
- </UIRows>
69
+ </div>
70
70
  <Button
71
71
  disabled={readonly}
72
72
  icon={<IconPlus />}
@@ -3,17 +3,15 @@
3
3
  * SPDX-License-Identifier: MIT
4
4
  */
5
5
 
6
- import styled from 'styled-components';
7
-
8
- export const UIRows = styled.div`
6
+ .gedit-m-inputs-values-rows {
9
7
  display: flex;
10
8
  flex-direction: column;
11
9
  gap: 10px;
12
10
  margin-bottom: 10px;
13
- `;
11
+ }
14
12
 
15
- export const UIRow = styled.div`
13
+ .gedit-m-inputs-values-row {
16
14
  display: flex;
17
15
  align-items: flex-start;
18
16
  gap: 5px;
19
- `;
17
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import React from 'react';
7
+
8
+ import Icon from '@douyinfe/semi-icons';
9
+
10
+ const iconAddChildrenSvg = (
11
+ <svg
12
+ className="icon-icon icon-icon-coz_add_node "
13
+ width="1em"
14
+ height="1em"
15
+ viewBox="0 0 24 24"
16
+ fill="currentColor"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ >
19
+ <path
20
+ fillRule="evenodd"
21
+ clipRule="evenodd"
22
+ d="M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
23
+ ></path>
24
+ <path d="M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"></path>
25
+ </svg>
26
+ );
27
+
28
+ export const IconAddChildren = () => <Icon size="small" svg={iconAddChildrenSvg} />;
@@ -13,7 +13,7 @@ import { FlowValueUtils, IFlowValue, IInputsValues } from '@/shared';
13
13
  import { useObjectList } from '@/hooks';
14
14
 
15
15
  import { PropsType } from './types';
16
- import { UITreeItems } from './styles';
16
+ import './styles.css';
17
17
  import { InputValueRow } from './row';
18
18
 
19
19
  export function InputsValuesTree(props: PropsType) {
@@ -29,7 +29,7 @@ export function InputsValuesTree(props: PropsType) {
29
29
 
30
30
  return (
31
31
  <div>
32
- <UITreeItems>
32
+ <div className="gedit-m-inputs-values-tree-tree-items">
33
33
  {list.map((item) => (
34
34
  <InputValueRow
35
35
  key={item.id}
@@ -43,7 +43,7 @@ export function InputsValuesTree(props: PropsType) {
43
43
  constantProps={constantProps}
44
44
  />
45
45
  ))}
46
- </UITreeItems>
46
+ </div>
47
47
  <Button
48
48
  style={{ marginTop: 10, marginLeft: 16 }}
49
49
  disabled={readonly}
@@ -13,20 +13,11 @@ import { IFlowConstantValue } from '@/shared';
13
13
  import { ConstantInputStrategy } from '@/components/constant-input';
14
14
 
15
15
  import { PropsType } from './types';
16
- import {
17
- IconAddChildren,
18
- UIActions,
19
- UICollapseTrigger,
20
- UICollapsible,
21
- UIRow,
22
- UITreeItemLeft,
23
- UITreeItemMain,
24
- UITreeItemRight,
25
- UITreeItems,
26
- } from './styles';
16
+ import './styles.css';
27
17
  import { useChildList } from './hooks/use-child-list';
28
18
  import { InjectDynamicValueInput } from '../dynamic-value-input';
29
19
  import { BlurInput } from '../blur-input';
20
+ import { IconAddChildren } from './icon';
30
21
 
31
22
  const AddObjectChildStrategy: ConstantInputStrategy = {
32
23
  hit: (schema) => schema.type === 'object',
@@ -88,16 +79,23 @@ export function InputValueRow(
88
79
 
89
80
  return (
90
81
  <>
91
- <UITreeItemLeft $isLast={$isLast} $showLine={$level > 0} $showCollapse={hasChildren}>
82
+ <div
83
+ className={`gedit-m-inputs-values-tree-tree-item-left ${$level > 0 ? 'show-line' : ''} ${
84
+ $isLast ? 'is-last' : ''
85
+ } ${hasChildren ? 'show-collapse' : ''}`}
86
+ >
92
87
  {hasChildren && (
93
- <UICollapseTrigger onClick={() => setCollapse((_collapse) => !_collapse)}>
88
+ <div
89
+ className="gedit-m-inputs-values-tree-collapse-trigger"
90
+ onClick={() => setCollapse((_collapse) => !_collapse)}
91
+ >
94
92
  {collapse ? <IconChevronDown size="small" /> : <IconChevronRight size="small" />}
95
- </UICollapseTrigger>
93
+ </div>
96
94
  )}
97
- </UITreeItemLeft>
98
- <UITreeItemRight>
99
- <UITreeItemMain>
100
- <UIRow>
95
+ </div>
96
+ <div className="gedit-m-inputs-values-tree-tree-item-right">
97
+ <div className="gedit-m-inputs-values-tree-tree-item-main">
98
+ <div className="gedit-m-inputs-values-tree-row">
101
99
  <BlurInput
102
100
  style={{ width: 100, minWidth: 100, maxWidth: 100 }}
103
101
  disabled={readonly}
@@ -117,7 +115,7 @@ export function InputValueRow(
117
115
  strategies,
118
116
  }}
119
117
  />
120
- <UIActions>
118
+ <div className="gedit-m-inputs-values-tree-actions">
121
119
  {canAddField && (
122
120
  <IconButton
123
121
  disabled={readonly}
@@ -141,12 +139,12 @@ export function InputValueRow(
141
139
  size="small"
142
140
  onClick={() => onRemove?.()}
143
141
  />
144
- </UIActions>
145
- </UIRow>
146
- </UITreeItemMain>
142
+ </div>
143
+ </div>
144
+ </div>
147
145
  {hasChildren && (
148
- <UICollapsible $collapse={collapse}>
149
- <UITreeItems $shrink={true}>
146
+ <div className={`gedit-m-inputs-values-tree-collapsible ${collapse ? 'collapse' : ''}`}>
147
+ <div className="gedit-m-inputs-values-tree-tree-items shrink">
150
148
  {list.map((_item, index) => (
151
149
  <InputValueRow
152
150
  readonly={readonly}
@@ -168,10 +166,10 @@ export function InputValueRow(
168
166
  $isLast={index === list.length - 1}
169
167
  />
170
168
  ))}
171
- </UITreeItems>
172
- </UICollapsible>
169
+ </div>
170
+ </div>
173
171
  )}
174
- </UITreeItemRight>
172
+ </div>
175
173
  </>
176
174
  );
177
175
  }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ .gedit-m-inputs-values-tree-container {
7
+ }
8
+
9
+ .gedit-m-inputs-values-tree-row {
10
+ display: flex;
11
+ align-items: flex-start;
12
+ gap: 5px;
13
+ }
14
+
15
+ .gedit-m-inputs-values-tree-collapse-trigger {
16
+ cursor: pointer;
17
+ margin-right: 5px;
18
+ }
19
+
20
+ .gedit-m-inputs-values-tree-tree-items {
21
+ display: grid;
22
+ grid-template-columns: auto 1fr;
23
+ }
24
+
25
+ .gedit-m-inputs-values-tree-tree-items.shrink {
26
+ padding-left: 3px;
27
+ margin-top: 10px;
28
+ }
29
+
30
+ .gedit-m-inputs-values-tree-tree-item-left {
31
+ grid-column: 1;
32
+ position: relative;
33
+ width: 16px;
34
+ }
35
+
36
+ .gedit-m-inputs-values-tree-tree-item-left.show-line::before {
37
+ /* 竖线 */
38
+ content: "";
39
+ height: var(--line-height, 100%);
40
+ position: absolute;
41
+ left: -14px;
42
+ top: -16px;
43
+ width: 1px;
44
+ background: #d9d9d9;
45
+ display: block;
46
+ }
47
+
48
+ .gedit-m-inputs-values-tree-tree-item-left.show-line::after {
49
+ /* 横线 */
50
+ content: "";
51
+ position: absolute;
52
+ left: -14px; /* 横线起点和竖线对齐 */
53
+ top: 8px; /* 跟随你的行高调整 */
54
+ width: var(--line-width, 30px); /* 横线长度 */
55
+ height: 1px;
56
+ background: #d9d9d9;
57
+ display: block;
58
+ }
59
+
60
+ .gedit-m-inputs-values-tree-tree-item-left.show-line.is-last::before {
61
+ height: 24px;
62
+ }
63
+
64
+ .gedit-m-inputs-values-tree-tree-item-left.show-line.show-collapse::after {
65
+ width: 12px;
66
+ }
67
+
68
+ .gedit-m-inputs-values-tree-tree-item-right {
69
+ grid-column: 2;
70
+ margin-bottom: 10px;
71
+
72
+ &:last-child {
73
+ margin-bottom: 0px;
74
+ }
75
+ }
76
+
77
+ .gedit-m-inputs-values-tree-tree-item-main {
78
+ display: flex;
79
+ flex-direction: column;
80
+ gap: 10px;
81
+ position: relative;
82
+ }
83
+
84
+ .gedit-m-inputs-values-tree-collapsible {
85
+ display: none;
86
+ }
87
+
88
+ .gedit-m-inputs-values-tree-collapsible.collapse {
89
+ display: block;
90
+ }
91
+
92
+ .gedit-m-inputs-values-tree-actions {
93
+ white-space: nowrap;
94
+ }
@@ -10,8 +10,6 @@ import { I18n } from '@flowgram.ai/editor';
10
10
 
11
11
  import { ConstantInput } from '@/components/constant-input';
12
12
 
13
- import { ConstantInputWrapper } from './styles';
14
-
15
13
  /**
16
14
  * Renders the corresponding default value input component based on different data types.
17
15
  * @param props - Component properties, including value, type, placeholder, onChange.
@@ -26,7 +24,7 @@ export function DefaultValue(props: {
26
24
  const { value, schema, onChange, placeholder } = props;
27
25
 
28
26
  return (
29
- <ConstantInputWrapper>
27
+ <div className="gedit-m-json-schema-editor-constant-input-wrapper">
30
28
  <ConstantInput
31
29
  value={value}
32
30
  onChange={(_v) => onChange(_v)}
@@ -34,6 +32,6 @@ export function DefaultValue(props: {
34
32
  placeholder={placeholder ?? I18n.t('Default value if parameter is not provided')}
35
33
  enableMultiLineStr
36
34
  />
37
- </ConstantInputWrapper>
35
+ </div>
38
36
  );
39
37
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import React from 'react';
7
+
8
+ import Icon from '@douyinfe/semi-icons';
9
+
10
+ const iconAddChildrenSvg = (
11
+ <svg
12
+ className="icon-icon icon-icon-coz_add_node "
13
+ width="1em"
14
+ height="1em"
15
+ viewBox="0 0 24 24"
16
+ fill="currentColor"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ >
19
+ <path
20
+ fillRule="evenodd"
21
+ clipRule="evenodd"
22
+ d="M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
23
+ ></path>
24
+ <path d="M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"></path>
25
+ </svg>
26
+ );
27
+
28
+ export const IconAddChildren = () => <Icon size="small" svg={iconAddChildrenSvg} />;