@flowgram.ai/form-materials 0.2.25 → 0.2.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowgram.ai/form-materials",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "homepage": "https://flowgram.ai/",
5
5
  "repository": "https://github.com/bytedance/flowgram.ai",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "@coze-editor/editor": "0.1.0-alpha.879fbb",
34
34
  "@codemirror/view": "~6.38.0",
35
35
  "@codemirror/state": "~6.5.2",
36
- "@flowgram.ai/editor": "0.2.25"
36
+ "@flowgram.ai/editor": "0.2.26"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/lodash": "^4.14.137",
@@ -49,8 +49,8 @@
49
49
  "tsup": "^8.0.1",
50
50
  "typescript": "^5.0.4",
51
51
  "vitest": "^0.34.6",
52
- "@flowgram.ai/eslint-config": "0.2.25",
53
- "@flowgram.ai/ts-config": "0.2.25"
52
+ "@flowgram.ai/ts-config": "0.2.26",
53
+ "@flowgram.ai/eslint-config": "0.2.26"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": ">=16.8",
@@ -5,6 +5,8 @@
5
5
 
6
6
  import { useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
+ import { omit } from 'lodash';
9
+
8
10
  import { IJsonSchema } from '../../typings';
9
11
  import { PropertyValueType } from './types';
10
12
 
@@ -113,7 +115,7 @@ export function usePropertiesEdit(
113
115
  continue;
114
116
  }
115
117
 
116
- nextProperties[_property.name] = _property;
118
+ nextProperties[_property.name] = omit(_property, ['key', 'name', 'isPropertyRequired']);
117
119
 
118
120
  if (_property.isPropertyRequired) {
119
121
  nextRequired.push(_property.name);
@@ -26,6 +26,7 @@ export function PromptEditor(props: PropsType) {
26
26
  style,
27
27
  hasError,
28
28
  children,
29
+ disableMarkdownHighlight,
29
30
  } = props || {};
30
31
 
31
32
  const editorRef = useRef<EditorAPI | null>(null);
@@ -58,7 +59,7 @@ export function PromptEditor(props: PropsType) {
58
59
  {activeLinePlaceholder && (
59
60
  <ActiveLinePlaceholder>{activeLinePlaceholder}</ActiveLinePlaceholder>
60
61
  )}
61
- <MarkdownHighlight />
62
+ {!disableMarkdownHighlight && <MarkdownHighlight />}
62
63
  <LanguageSupport />
63
64
  <JinjaHighlight />
64
65
  {children}
@@ -14,5 +14,6 @@ export type PropsType = React.PropsWithChildren<{
14
14
  hasError?: boolean;
15
15
  placeholder?: string;
16
16
  activeLinePlaceholder?: string;
17
+ disableMarkdownHighlight?: boolean;
17
18
  style?: React.CSSProperties;
18
19
  }>;