@flowgram.ai/form-materials 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) 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/code-editor/editor.js +16 -12
  4. package/dist/cjs/components/code-editor/styles.css +4 -0
  5. package/dist/cjs/components/code-editor-mini/index.js +2 -16
  6. package/dist/cjs/components/condition-row/index.js +14 -12
  7. package/dist/cjs/components/condition-row/styles.css +19 -0
  8. package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +28 -10
  9. package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
  10. package/dist/cjs/components/db-condition-row/index.js +16 -13
  11. package/dist/cjs/components/db-condition-row/styles.css +30 -0
  12. package/dist/cjs/components/display-inputs-values/index.js +3 -2
  13. package/dist/cjs/components/display-inputs-values/styles.css +6 -0
  14. package/dist/cjs/components/display-outputs/index.js +3 -2
  15. package/dist/cjs/components/display-outputs/styles.css +6 -0
  16. package/dist/cjs/components/display-schema-tag/index.js +7 -4
  17. package/dist/cjs/components/display-schema-tag/styles.css +21 -0
  18. package/dist/cjs/components/display-schema-tree/index.js +12 -7
  19. package/dist/cjs/components/display-schema-tree/styles.css +64 -0
  20. package/dist/cjs/components/dynamic-value-input/index.js +9 -5
  21. package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +23 -30
  22. package/dist/cjs/components/inputs-values/index.js +5 -3
  23. package/dist/cjs/components/inputs-values/styles.css +13 -0
  24. package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
  25. package/dist/cjs/components/inputs-values-tree/index.js +3 -2
  26. package/dist/cjs/components/inputs-values-tree/row.js +19 -15
  27. package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
  28. package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
  29. package/dist/cjs/components/json-schema-editor/icon.js +70 -0
  30. package/dist/cjs/components/json-schema-editor/index.js +37 -25
  31. package/dist/cjs/components/json-schema-editor/styles.css +113 -0
  32. package/dist/cjs/components/prompt-editor/editor.js +16 -6
  33. package/dist/cjs/components/prompt-editor/styles.css +10 -0
  34. package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
  35. package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
  36. package/dist/cjs/components/variable-selector/context.js +7 -3
  37. package/dist/cjs/components/variable-selector/index.js +16 -10
  38. package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
  39. package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
  40. package/dist/esm/components/batch-outputs/index.mjs +5 -3
  41. package/dist/esm/components/batch-outputs/styles.css +13 -0
  42. package/dist/esm/components/code-editor/editor.mjs +16 -11
  43. package/dist/esm/components/code-editor/styles.css +4 -0
  44. package/dist/esm/components/code-editor-mini/index.mjs +2 -6
  45. package/dist/esm/components/condition-row/index.mjs +14 -12
  46. package/dist/esm/components/condition-row/styles.css +19 -0
  47. package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +29 -11
  48. package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
  49. package/dist/esm/components/db-condition-row/index.mjs +16 -13
  50. package/dist/esm/components/db-condition-row/styles.css +30 -0
  51. package/dist/esm/components/display-inputs-values/index.mjs +3 -2
  52. package/dist/esm/components/display-inputs-values/styles.css +6 -0
  53. package/dist/esm/components/display-outputs/index.mjs +3 -2
  54. package/dist/esm/components/display-outputs/styles.css +6 -0
  55. package/dist/esm/components/display-schema-tag/index.mjs +8 -5
  56. package/dist/esm/components/display-schema-tag/styles.css +21 -0
  57. package/dist/esm/components/display-schema-tree/index.mjs +12 -7
  58. package/dist/esm/components/display-schema-tree/styles.css +64 -0
  59. package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
  60. package/dist/esm/components/dynamic-value-input/styles.css +48 -0
  61. package/dist/esm/components/inputs-values/index.mjs +5 -3
  62. package/dist/esm/components/inputs-values/styles.css +13 -0
  63. package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
  64. package/dist/esm/components/inputs-values-tree/index.mjs +3 -2
  65. package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
  66. package/dist/esm/components/inputs-values-tree/styles.css +85 -0
  67. package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
  68. package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
  69. package/dist/esm/components/json-schema-editor/index.mjs +36 -24
  70. package/dist/esm/components/json-schema-editor/styles.css +113 -0
  71. package/dist/esm/components/prompt-editor/editor.mjs +16 -6
  72. package/dist/esm/components/prompt-editor/styles.css +10 -0
  73. package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
  74. package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
  75. package/dist/esm/components/variable-selector/context.mjs +7 -3
  76. package/dist/esm/components/variable-selector/index.mjs +17 -11
  77. package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
  78. package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
  79. package/dist/tsconfig.tsbuildinfo +1 -1
  80. package/dist/types/components/batch-outputs/index.d.ts +1 -0
  81. package/dist/types/components/code-editor/editor.d.ts +1 -0
  82. package/dist/types/components/condition-row/index.d.ts +5 -1
  83. package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
  84. package/dist/types/components/db-condition-row/index.d.ts +4 -0
  85. package/dist/types/components/db-condition-row/types.d.ts +0 -1
  86. package/dist/types/components/display-inputs-values/index.d.ts +1 -0
  87. package/dist/types/components/display-outputs/index.d.ts +1 -0
  88. package/dist/types/components/display-schema-tag/index.d.ts +1 -0
  89. package/dist/types/components/display-schema-tree/index.d.ts +1 -0
  90. package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
  91. package/dist/types/components/inputs-values/index.d.ts +1 -0
  92. package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
  93. package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
  94. package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
  95. package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
  96. package/dist/types/components/json-schema-editor/index.d.ts +1 -0
  97. package/dist/types/components/prompt-editor/editor.d.ts +1 -0
  98. package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
  99. package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
  100. package/dist/types/components/variable-selector/context.d.ts +16 -3
  101. package/dist/types/components/variable-selector/index.d.ts +1 -0
  102. package/package.json +7 -10
  103. package/src/components/batch-outputs/index.tsx +5 -5
  104. package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
  105. package/src/components/code-editor/editor.tsx +19 -14
  106. package/src/components/code-editor/styles.css +11 -0
  107. package/src/components/code-editor-mini/index.tsx +2 -9
  108. package/src/components/condition-row/index.tsx +15 -22
  109. package/src/components/condition-row/{styles.tsx → styles.css} +10 -11
  110. package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +18 -13
  111. package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
  112. package/src/components/db-condition-row/index.tsx +17 -26
  113. package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
  114. package/src/components/db-condition-row/types.ts +0 -1
  115. package/src/components/display-inputs-values/index.tsx +3 -3
  116. package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
  117. package/src/components/display-outputs/index.tsx +3 -3
  118. package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
  119. package/src/components/display-schema-tag/index.tsx +7 -7
  120. package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
  121. package/src/components/display-schema-tree/index.tsx +10 -10
  122. package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
  123. package/src/components/dynamic-value-input/index.tsx +6 -6
  124. package/src/components/dynamic-value-input/{styles.tsx → styles.css} +8 -12
  125. package/src/components/inputs-values/index.tsx +5 -5
  126. package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
  127. package/src/components/inputs-values-tree/icon.tsx +28 -0
  128. package/src/components/inputs-values-tree/index.tsx +3 -3
  129. package/src/components/inputs-values-tree/row.tsx +25 -27
  130. package/src/components/inputs-values-tree/styles.css +94 -0
  131. package/src/components/json-schema-editor/default-value.tsx +2 -4
  132. package/src/components/json-schema-editor/icon.tsx +28 -0
  133. package/src/components/json-schema-editor/index.tsx +45 -50
  134. package/src/components/json-schema-editor/styles.css +135 -0
  135. package/src/components/prompt-editor/editor.tsx +18 -7
  136. package/src/components/prompt-editor/styles.css +14 -0
  137. package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
  138. package/src/components/prompt-editor-with-variables/index.tsx +13 -5
  139. package/src/components/variable-selector/context.tsx +22 -2
  140. package/src/components/variable-selector/index.tsx +24 -14
  141. package/src/components/variable-selector/styles.css +70 -0
  142. package/src/components/variable-selector/use-variable-tree.tsx +9 -1
  143. package/dist/cjs/components/batch-outputs/styles.js +0 -60
  144. package/dist/cjs/components/condition-row/styles.js +0 -78
  145. package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
  146. package/dist/cjs/components/db-condition-row/styles.js +0 -94
  147. package/dist/cjs/components/display-inputs-values/styles.js +0 -51
  148. package/dist/cjs/components/display-outputs/styles.js +0 -51
  149. package/dist/cjs/components/display-schema-tag/styles.js +0 -71
  150. package/dist/cjs/components/display-schema-tree/styles.js +0 -135
  151. package/dist/cjs/components/dynamic-value-input/styles.js +0 -108
  152. package/dist/cjs/components/inputs-values/styles.js +0 -60
  153. package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
  154. package/dist/cjs/components/json-schema-editor/styles.js +0 -231
  155. package/dist/cjs/components/prompt-editor/styles.js +0 -55
  156. package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
  157. package/dist/cjs/components/prompt-editor-with-variables/editor.js +0 -48
  158. package/dist/cjs/components/variable-selector/styles.js +0 -114
  159. package/dist/esm/components/batch-outputs/styles.mjs +0 -13
  160. package/dist/esm/components/condition-row/styles.mjs +0 -22
  161. package/dist/esm/components/db-condition-row/styles.mjs +0 -32
  162. package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
  163. package/dist/esm/components/display-outputs/styles.mjs +0 -7
  164. package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
  165. package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
  166. package/dist/esm/components/inputs-values/styles.mjs +0 -13
  167. package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
  168. package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
  169. package/dist/esm/components/prompt-editor/styles.mjs +0 -11
  170. package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
  171. package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
  172. package/dist/types/components/batch-outputs/styles.d.ts +0 -6
  173. package/dist/types/components/condition-row/styles.d.ts +0 -9
  174. package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
  175. package/dist/types/components/db-condition-row/styles.d.ts +0 -12
  176. package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
  177. package/dist/types/components/display-outputs/styles.d.ts +0 -5
  178. package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
  179. package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
  180. package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
  181. package/dist/types/components/inputs-values/styles.d.ts +0 -6
  182. package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
  183. package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
  184. package/dist/types/components/prompt-editor/styles.d.ts +0 -7
  185. package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -11
  186. package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
  187. package/dist/types/components/variable-selector/styles.d.ts +0 -14
  188. package/src/components/inputs-values-tree/styles.tsx +0 -128
  189. package/src/components/json-schema-editor/styles.tsx +0 -168
  190. package/src/components/prompt-editor/styles.tsx +0 -18
  191. package/src/components/prompt-editor-with-inputs/editor.tsx +0 -25
  192. package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
@@ -0,0 +1,19 @@
1
+ .gedit-m-condition-row-container {
2
+ align-items: center;
3
+ gap: 4px;
4
+ display: flex;
5
+ }
6
+
7
+ .gedit-m-condition-row-left, .gedit-m-condition-row-right {
8
+ width: 100%;
9
+ }
10
+
11
+ .gedit-m-condition-row-values {
12
+ flex-direction: column;
13
+ flex-grow: 1;
14
+ align-items: center;
15
+ gap: 4px;
16
+ display: flex;
17
+ overflow: hidden;
18
+ }
19
+
@@ -3,11 +3,11 @@ import { useLayoutEffect } from "react";
3
3
  import { isEqual, last } from "lodash-es";
4
4
  import { Disposable, DisposableCollection, useCurrentScope } from "@flowgram.ai/editor";
5
5
  import { useInjector } from "@flowgram.ai/coze-editor/react";
6
- import { Popover } from "@douyinfe/semi-ui";
6
+ import { Popover, Tag } from "@douyinfe/semi-ui";
7
7
  import { IconIssueStroked } from "@douyinfe/semi-icons";
8
8
  import { Decoration, EditorView, MatchDecorator, ViewPlugin, WidgetType } from "@codemirror/view";
9
9
  import { polyfillCreateRoot } from "../../../shared/index.mjs";
10
- import { UIPopoverContent, UIRootTitle, UITag, UIVarName } from "../styles.mjs";
10
+ import "../styles.css";
11
11
  class VariableTagWidget extends WidgetType {
12
12
  constructor({ keyPath, scope }){
13
13
  super(), this.toDispose = new DisposableCollection(), this.renderIcon = (icon)=>{
@@ -25,32 +25,50 @@ class VariableTagWidget extends WidgetType {
25
25
  this.scope = scope;
26
26
  }
27
27
  renderVariable(v) {
28
- if (!v) return void this.root.render(/*#__PURE__*/ jsx(UITag, {
29
- prefixIcon: /*#__PURE__*/ jsx(IconIssueStroked, {}),
28
+ if (!v) return void this.root.render(/*#__PURE__*/ jsxs(Tag, {
29
+ className: "gedit-m-coze-editor-tag",
30
30
  color: "amber",
31
- children: "Unknown"
31
+ children: [
32
+ /*#__PURE__*/ jsx(IconIssueStroked, {
33
+ style: {
34
+ marginRight: '4px'
35
+ }
36
+ }),
37
+ /*#__PURE__*/ jsx("span", {
38
+ children: "Unknown"
39
+ })
40
+ ]
32
41
  }));
33
42
  const rootField = last(v.parentFields) || v;
34
43
  const isRoot = v === rootField;
35
- const rootTitle = /*#__PURE__*/ jsx(UIRootTitle, {
44
+ const rootTitle = /*#__PURE__*/ jsx("span", {
45
+ className: "gedit-m-coze-editor-root-title",
36
46
  children: rootField.meta?.title ? `${rootField.meta.title} ${isRoot ? '' : '-'} ` : ''
37
47
  });
38
48
  const rootIcon = this.renderIcon(rootField?.meta.icon);
39
49
  this.root.render(/*#__PURE__*/ jsx(Popover, {
40
- content: /*#__PURE__*/ jsxs(UIPopoverContent, {
50
+ content: /*#__PURE__*/ jsxs("div", {
51
+ className: "gedit-m-coze-editor-popover-content",
41
52
  children: [
42
53
  rootIcon,
43
54
  rootTitle,
44
- /*#__PURE__*/ jsx(UIVarName, {
55
+ /*#__PURE__*/ jsx("span", {
56
+ className: "gedit-m-coze-editor-var-name",
45
57
  children: v?.keyPath.slice(1).join('.')
46
58
  })
47
59
  ]
48
60
  }),
49
- children: /*#__PURE__*/ jsxs(UITag, {
50
- prefixIcon: rootIcon,
61
+ children: /*#__PURE__*/ jsxs(Tag, {
62
+ className: "gedit-m-coze-editor-tag",
63
+ style: {
64
+ display: 'inline-flex',
65
+ alignItems: 'center'
66
+ },
51
67
  children: [
68
+ rootIcon,
52
69
  rootTitle,
53
- !isRoot && /*#__PURE__*/ jsx(UIVarName, {
70
+ !isRoot && /*#__PURE__*/ jsx("span", {
71
+ className: "gedit-m-coze-editor-var-name",
54
72
  children: v?.key
55
73
  })
56
74
  ]
@@ -0,0 +1,37 @@
1
+ .gedit-m-coze-editor-root-title {
2
+ text-overflow: ellipsis;
3
+ white-space: nowrap;
4
+ min-width: 20px;
5
+ color: var(--semi-color-text-2);
6
+ margin-right: 4px;
7
+ overflow: hidden;
8
+ }
9
+
10
+ .gedit-m-coze-editor-var-name {
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ overflow: hidden;
14
+ }
15
+
16
+ .gedit-m-coze-editor-tag {
17
+ justify-content: flex-start;
18
+ align-items: center;
19
+ max-width: 300px;
20
+ display: inline-flex;
21
+
22
+ & .semi-tag-content-center {
23
+ justify-content: flex-start;
24
+ }
25
+
26
+ &.semi-tag {
27
+ margin: 0 5px;
28
+ }
29
+ }
30
+
31
+ .gedit-m-coze-editor-popover-content {
32
+ justify-content: flex-start;
33
+ align-items: center;
34
+ padding: 10px;
35
+ display: inline-flex;
36
+ }
37
+
@@ -6,12 +6,8 @@ import { IconChevronDownStroked } from "@douyinfe/semi-icons";
6
6
  import { useTypeManager } from "../../plugins/index.mjs";
7
7
  import { InjectDynamicValueInput } from "../dynamic-value-input/index.mjs";
8
8
  import { useCondition } from "../condition-context/index.mjs";
9
- import { UIContainer, UILeft, UIOperator, UIOptionLabel, UIRight, UISelect, UIValues } from "./styles.mjs";
10
- const defaultRuleConfig = {
11
- ops: {},
12
- rules: {}
13
- };
14
- function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig = defaultRuleConfig }) {
9
+ import "./styles.css";
10
+ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig }) {
15
11
  const { left, operator, right } = value || {};
16
12
  const typeManager = useTypeManager();
17
13
  const leftSchema = useMemo(()=>options?.find((item)=>item.value === left)?.schema, [
@@ -23,7 +19,8 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
23
19
  operator,
24
20
  ruleConfig
25
21
  });
26
- const renderDBOptionSelect = ()=>/*#__PURE__*/ jsx(UISelect, {
22
+ const renderDBOptionSelect = ()=>/*#__PURE__*/ jsx(Select, {
23
+ className: "gedit-m-db-condition-row-select",
27
24
  disabled: readonly,
28
25
  size: "small",
29
26
  style: {
@@ -35,7 +32,8 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
35
32
  left: v
36
33
  }),
37
34
  optionList: options?.map((item)=>({
38
- label: /*#__PURE__*/ jsxs(UIOptionLabel, {
35
+ label: /*#__PURE__*/ jsxs("div", {
36
+ className: "gedit-m-db-condition-row-option-label",
39
37
  children: [
40
38
  /*#__PURE__*/ jsx(Icon, {
41
39
  size: "small",
@@ -69,18 +67,23 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
69
67
  })
70
68
  })
71
69
  });
72
- return /*#__PURE__*/ jsxs(UIContainer, {
70
+ return /*#__PURE__*/ jsxs("div", {
71
+ className: "gedit-m-db-condition-row-container",
73
72
  style: style,
74
73
  children: [
75
- /*#__PURE__*/ jsx(UIOperator, {
74
+ /*#__PURE__*/ jsx("div", {
75
+ className: "gedit-m-db-condition-row-operator",
76
76
  children: renderOpSelect()
77
77
  }),
78
- /*#__PURE__*/ jsxs(UIValues, {
78
+ /*#__PURE__*/ jsxs("div", {
79
+ className: "gedit-m-db-condition-row-values",
79
80
  children: [
80
- /*#__PURE__*/ jsx(UILeft, {
81
+ /*#__PURE__*/ jsx("div", {
82
+ className: "gedit-m-db-condition-row-left",
81
83
  children: renderDBOptionSelect()
82
84
  }),
83
- /*#__PURE__*/ jsx(UIRight, {
85
+ /*#__PURE__*/ jsx("div", {
86
+ className: "gedit-m-db-condition-row-right",
84
87
  children: targetSchema ? /*#__PURE__*/ jsx(InjectDynamicValueInput, {
85
88
  readonly: readonly || !rule,
86
89
  value: right,
@@ -0,0 +1,30 @@
1
+ .gedit-m-db-condition-row-container {
2
+ align-items: center;
3
+ gap: 4px;
4
+ display: flex;
5
+ }
6
+
7
+ .gedit-m-db-condition-row-left, .gedit-m-db-condition-row-right {
8
+ width: 100%;
9
+ }
10
+
11
+ .gedit-m-db-condition-row-values {
12
+ flex-direction: column;
13
+ flex-grow: 1;
14
+ align-items: center;
15
+ gap: 4px;
16
+ display: flex;
17
+ }
18
+
19
+ .gedit-m-db-condition-row-option-label {
20
+ align-items: center;
21
+ gap: 10px;
22
+ display: flex;
23
+ }
24
+
25
+ .gedit-m-db-condition-row-select {
26
+ & .semi-select-selection {
27
+ margin-left: 5px;
28
+ }
29
+ }
30
+
@@ -4,11 +4,12 @@ import { isPlainObject } from "lodash-es";
4
4
  import { useScopeAvailable } from "@flowgram.ai/editor";
5
5
  import { FlowValueUtils } from "../../shared/index.mjs";
6
6
  import { DisplayFlowValue } from "../display-flow-value/index.mjs";
7
- import { DisplayInputsWrapper } from "./styles.mjs";
7
+ import "./styles.css";
8
8
  import { DisplaySchemaTag } from "../display-schema-tag/index.mjs";
9
9
  function DisplayInputsValues({ value, showIconInTree }) {
10
10
  const childEntries = Object.entries(value || {});
11
- return /*#__PURE__*/ jsx(DisplayInputsWrapper, {
11
+ return /*#__PURE__*/ jsx("div", {
12
+ className: "gedit-m-display-inputs-wrapper",
12
13
  children: childEntries.map(([key, value])=>{
13
14
  if (FlowValueUtils.isFlowValue(value)) return /*#__PURE__*/ jsx(DisplayFlowValue, {
14
15
  title: key,
@@ -0,0 +1,6 @@
1
+ .gedit-m-display-inputs-wrapper {
2
+ flex-wrap: wrap;
3
+ gap: 5px;
4
+ display: flex;
5
+ }
6
+
@@ -3,7 +3,7 @@ import { useEffect } from "react";
3
3
  import { JsonSchemaUtils } from "@flowgram.ai/json-schema";
4
4
  import { useCurrentScope, useRefresh } from "@flowgram.ai/editor";
5
5
  import { DisplaySchemaTag } from "../display-schema-tag/index.mjs";
6
- import { DisplayOutputsWrapper } from "./styles.mjs";
6
+ import "./styles.css";
7
7
  function DisplayOutputs({ value, showIconInTree, displayFromScope }) {
8
8
  const scope = useCurrentScope();
9
9
  const refresh = useRefresh();
@@ -26,7 +26,8 @@ function DisplayOutputs({ value, showIconInTree, displayFromScope }) {
26
26
  return acm;
27
27
  }, {}) : value?.properties || {};
28
28
  const childEntries = Object.entries(properties || {});
29
- return /*#__PURE__*/ jsx(DisplayOutputsWrapper, {
29
+ return /*#__PURE__*/ jsx("div", {
30
+ className: "gedit-m-display-outputs-wrapper",
30
31
  children: childEntries.map(([key, schema])=>/*#__PURE__*/ jsx(DisplaySchemaTag, {
31
32
  title: key,
32
33
  value: schema,
@@ -0,0 +1,6 @@
1
+ .gedit-m-display-outputs-wrapper {
2
+ flex-wrap: wrap;
3
+ gap: 5px;
4
+ display: flex;
5
+ }
6
+
@@ -1,29 +1,32 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import react from "react";
3
- import { Popover } from "@douyinfe/semi-ui";
3
+ import { Popover, Tag } from "@douyinfe/semi-ui";
4
4
  import { useTypeManager } from "../../plugins/index.mjs";
5
5
  import { DisplaySchemaTree } from "../display-schema-tree/index.mjs";
6
- import { PopoverContent, StyledTag, TitleSpan } from "./styles.mjs";
6
+ import "./styles.css";
7
7
  function DisplaySchemaTag({ value = {}, showIconInTree, title, warning }) {
8
8
  const typeManager = useTypeManager();
9
9
  const icon = typeManager?.getDisplayIcon(value) || typeManager.getDisplayIcon({
10
10
  type: 'unknown'
11
11
  });
12
12
  return /*#__PURE__*/ jsx(Popover, {
13
- content: /*#__PURE__*/ jsx(PopoverContent, {
13
+ content: /*#__PURE__*/ jsx("div", {
14
+ className: "gedit-m-display-schema-tag-popover-content",
14
15
  children: /*#__PURE__*/ jsx(DisplaySchemaTree, {
15
16
  value: value,
16
17
  typeManager: typeManager,
17
18
  showIcon: showIconInTree
18
19
  })
19
20
  }),
20
- children: /*#__PURE__*/ jsxs(StyledTag, {
21
+ children: /*#__PURE__*/ jsxs(Tag, {
21
22
  color: warning ? 'amber' : 'white',
23
+ className: "gedit-m-display-schema-tag-tag",
22
24
  children: [
23
25
  icon && /*#__PURE__*/ react.cloneElement(icon, {
24
26
  className: 'tag-icon'
25
27
  }),
26
- title && /*#__PURE__*/ jsx(TitleSpan, {
28
+ title && /*#__PURE__*/ jsx("span", {
29
+ className: "gedit-m-display-schema-tag-title",
27
30
  children: title
28
31
  })
29
32
  ]
@@ -0,0 +1,21 @@
1
+ .gedit-m-display-schema-tag-popover-content {
2
+ padding: 10px;
3
+ }
4
+
5
+ .gedit-m-display-schema-tag-tag {
6
+ padding: 4px;
7
+
8
+ & .tag-icon {
9
+ width: 12px;
10
+ height: 12px;
11
+ }
12
+ }
13
+
14
+ .gedit-m-display-schema-tag-title {
15
+ text-overflow: ellipsis;
16
+ margin-top: -1px;
17
+ margin-left: 4px;
18
+ display: inline-block;
19
+ overflow: hidden;
20
+ }
21
+
@@ -1,7 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import react from "react";
3
3
  import { useTypeManager } from "@flowgram.ai/json-schema";
4
- import { HorizontalLine, TreeItem, TreeLevel, TreeRow, TreeTitle } from "./styles.mjs";
4
+ import "./styles.css";
5
5
  function DisplaySchemaTree(props) {
6
6
  return /*#__PURE__*/ jsx(SchemaTree, {
7
7
  ...props
@@ -15,16 +15,20 @@ function SchemaTree(props) {
15
15
  const icon = typeManager?.getDisplayIcon(schema);
16
16
  let properties = drilldown && config ? config.getTypeSchemaProperties(schema) : {};
17
17
  const childEntries = Object.entries(properties || {});
18
- return /*#__PURE__*/ jsxs(TreeItem, {
19
- depth: depth,
18
+ return /*#__PURE__*/ jsxs("div", {
19
+ className: `gedit-m-display-schema-tree-item depth-${depth}`,
20
20
  children: [
21
- /*#__PURE__*/ jsxs(TreeRow, {
21
+ /*#__PURE__*/ jsxs("div", {
22
+ className: "gedit-m-display-schema-tree-row",
22
23
  children: [
23
- 0 !== depth && /*#__PURE__*/ jsx(HorizontalLine, {}),
24
+ 0 !== depth && /*#__PURE__*/ jsx("div", {
25
+ className: "gedit-m-display-schema-tree-horizontal-line"
26
+ }),
24
27
  showIcon && icon && /*#__PURE__*/ react.cloneElement(icon, {
25
28
  className: 'tree-icon'
26
29
  }),
27
- /*#__PURE__*/ jsx(TreeTitle, {
30
+ /*#__PURE__*/ jsx("div", {
31
+ className: "gedit-m-display-schema-tree-title",
28
32
  children: parentKey ? /*#__PURE__*/ jsxs(Fragment, {
29
33
  children: [
30
34
  `${parentKey} (`,
@@ -35,7 +39,8 @@ function SchemaTree(props) {
35
39
  })
36
40
  ]
37
41
  }),
38
- childEntries?.length ? /*#__PURE__*/ jsx(TreeLevel, {
42
+ childEntries?.length ? /*#__PURE__*/ jsx("div", {
43
+ className: "gedit-m-display-schema-tree-level",
39
44
  children: childEntries.map(([key, value])=>/*#__PURE__*/ jsx(SchemaTree, {
40
45
  ...props,
41
46
  parentKey: key,
@@ -0,0 +1,64 @@
1
+ .gedit-m-display-schema-tree-row {
2
+ align-items: center;
3
+ display: flex;
4
+
5
+ & .tree-icon {
6
+ width: 14px;
7
+ height: 14px;
8
+ margin-right: 8px;
9
+ }
10
+
11
+ white-space: nowrap;
12
+ height: 27px;
13
+ }
14
+
15
+ .gedit-m-display-schema-tree-horizontal-line {
16
+ position: relative;
17
+
18
+ &:before, &:after {
19
+ content: "";
20
+ background-color: var(--semi-color-text-3);
21
+ position: absolute;
22
+ }
23
+
24
+ &:after {
25
+ width: 15px;
26
+ height: 1px;
27
+ top: 0;
28
+ right: 6px;
29
+ }
30
+ }
31
+
32
+ .gedit-m-display-schema-tree-level {
33
+ padding-left: 30px;
34
+ position: relative;
35
+ }
36
+
37
+ .gedit-m-display-schema-tree-item {
38
+ position: relative;
39
+
40
+ &:before {
41
+ content: "";
42
+ background-color: var(--semi-color-text-3);
43
+ position: absolute;
44
+ }
45
+
46
+ &:not(:last-child):before {
47
+ width: 1px;
48
+ top: 0;
49
+ bottom: 0;
50
+ left: -22px;
51
+ }
52
+
53
+ &:last-child:before {
54
+ width: 1px;
55
+ height: 14px;
56
+ top: 0;
57
+ left: -22px;
58
+ }
59
+
60
+ &.depth-0:before {
61
+ width: 0 !important;
62
+ }
63
+ }
64
+
@@ -7,7 +7,7 @@ import { createInjectMaterial } from "../../shared/index.mjs";
7
7
  import { InjectVariableSelector } from "../variable-selector/index.mjs";
8
8
  import { TypeSelector } from "../type-selector/index.mjs";
9
9
  import { ConstantInput } from "../constant-input/index.mjs";
10
- import { UIContainer, UIMain, UITrigger, UIType } from "./styles.mjs";
10
+ import "./styles.css";
11
11
  import { useIncludeSchema, useRefVariable, useSelectSchema } from "./hooks.mjs";
12
12
  const DEFAULT_VALUE = {
13
13
  type: 'constant',
@@ -117,16 +117,20 @@ function DynamicValueInput({ value, onChange, readonly, style, schema: schemaFro
117
117
  })
118
118
  })
119
119
  });
120
- return /*#__PURE__*/ jsxs(UIContainer, {
120
+ return /*#__PURE__*/ jsxs("div", {
121
+ className: "gedit-m-dynamic-value-input-container",
121
122
  style: style,
122
123
  children: [
123
- /*#__PURE__*/ jsx(UIType, {
124
+ /*#__PURE__*/ jsx("div", {
125
+ className: "gedit-m-dynamic-value-input-type",
124
126
  children: renderTypeSelector()
125
127
  }),
126
- /*#__PURE__*/ jsx(UIMain, {
128
+ /*#__PURE__*/ jsx("div", {
129
+ className: "gedit-m-dynamic-value-input-main",
127
130
  children: renderMain()
128
131
  }),
129
- /*#__PURE__*/ jsx(UITrigger, {
132
+ /*#__PURE__*/ jsx("div", {
133
+ className: "gedit-m-dynamic-value-input-trigger",
130
134
  children: renderTrigger()
131
135
  })
132
136
  ]
@@ -0,0 +1,48 @@
1
+ .gedit-m-dynamic-value-input-container {
2
+ border: 1px solid var(--semi-color-border);
3
+ background-color: var(--semi-color-fill-0);
4
+ border-radius: 4px;
5
+ align-items: center;
6
+ line-height: normal;
7
+ display: flex;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .gedit-m-dynamic-value-input-main {
12
+ border-left: 1px solid var(--semi-color-border);
13
+ border-right: 1px solid var(--semi-color-border);
14
+ flex-grow: 1;
15
+ min-width: 0;
16
+ overflow: hidden;
17
+
18
+ & .semi-tree-select, & .semi-input-number, & .semi-select {
19
+ border: none;
20
+ border-radius: 0;
21
+ width: 100%;
22
+ }
23
+
24
+ & .semi-input-wrapper, & .semi-input-textarea-wrapper {
25
+ border: none;
26
+ border-radius: 0;
27
+ }
28
+
29
+ & .semi-input-textarea {
30
+ word-break: break-all;
31
+ border: none;
32
+ border-radius: 0;
33
+ padding: 2px 6px;
34
+ }
35
+ }
36
+
37
+ .gedit-m-dynamic-value-input-type {
38
+ & .semi-button {
39
+ border-radius: 0;
40
+ }
41
+ }
42
+
43
+ .gedit-m-dynamic-value-input-trigger {
44
+ & .semi-button {
45
+ border-radius: 0;
46
+ }
47
+ }
48
+
@@ -6,7 +6,7 @@ import { IconDelete, IconPlus } from "@douyinfe/semi-icons";
6
6
  import { useObjectList } from "../../hooks/index.mjs";
7
7
  import { InjectDynamicValueInput } from "../dynamic-value-input/index.mjs";
8
8
  import { BlurInput } from "../blur-input/index.mjs";
9
- import { UIRow, UIRows } from "./styles.mjs";
9
+ import "./styles.css";
10
10
  function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError }) {
11
11
  const { list, updateKey, updateValue, remove, add } = useObjectList({
12
12
  value,
@@ -15,9 +15,11 @@ function InputsValues({ value, onChange, style, readonly, constantProps, schema,
15
15
  });
16
16
  return /*#__PURE__*/ jsxs("div", {
17
17
  children: [
18
- /*#__PURE__*/ jsx(UIRows, {
18
+ /*#__PURE__*/ jsx("div", {
19
+ className: "gedit-m-inputs-values-rows",
19
20
  style: style,
20
- children: list.map((item)=>/*#__PURE__*/ jsxs(UIRow, {
21
+ children: list.map((item)=>/*#__PURE__*/ jsxs("div", {
22
+ className: "gedit-m-inputs-values-row",
21
23
  children: [
22
24
  /*#__PURE__*/ jsx(BlurInput, {
23
25
  style: {
@@ -0,0 +1,13 @@
1
+ .gedit-m-inputs-values-rows {
2
+ flex-direction: column;
3
+ gap: 10px;
4
+ margin-bottom: 10px;
5
+ display: flex;
6
+ }
7
+
8
+ .gedit-m-inputs-values-row {
9
+ align-items: flex-start;
10
+ gap: 5px;
11
+ display: flex;
12
+ }
13
+
@@ -0,0 +1,26 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import semi_icons from "@douyinfe/semi-icons";
4
+ const iconAddChildrenSvg = /*#__PURE__*/ jsxs("svg", {
5
+ className: "icon-icon icon-icon-coz_add_node ",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24",
9
+ fill: "currentColor",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ children: [
12
+ /*#__PURE__*/ jsx("path", {
13
+ fillRule: "evenodd",
14
+ clipRule: "evenodd",
15
+ 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"
16
+ }),
17
+ /*#__PURE__*/ jsx("path", {
18
+ 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"
19
+ })
20
+ ]
21
+ });
22
+ const IconAddChildren = ()=>/*#__PURE__*/ jsx(semi_icons, {
23
+ size: "small",
24
+ svg: iconAddChildrenSvg
25
+ });
26
+ export { IconAddChildren };
@@ -5,7 +5,7 @@ import { Button } from "@douyinfe/semi-ui";
5
5
  import { IconPlus } from "@douyinfe/semi-icons";
6
6
  import { FlowValueUtils } from "../../shared/index.mjs";
7
7
  import { useObjectList } from "../../hooks/index.mjs";
8
- import { UITreeItems } from "./styles.mjs";
8
+ import "./styles.css";
9
9
  import { InputValueRow } from "./row.mjs";
10
10
  function InputsValuesTree(props) {
11
11
  const { value, onChange, readonly, hasError, constantProps } = props;
@@ -16,7 +16,8 @@ function InputsValuesTree(props) {
16
16
  });
17
17
  return /*#__PURE__*/ jsxs("div", {
18
18
  children: [
19
- /*#__PURE__*/ jsx(UITreeItems, {
19
+ /*#__PURE__*/ jsx("div", {
20
+ className: "gedit-m-inputs-values-tree-tree-items",
20
21
  children: list.map((item)=>/*#__PURE__*/ jsx(InputValueRow, {
21
22
  keyName: item.key,
22
23
  value: item.value,