@flowgram.ai/form-materials 0.2.21 → 0.2.22
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/dist/esm/index.js +14 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/code-editor/config.json +1 -1
- package/src/components/json-editor-with-variables/config.json +1 -1
- package/src/components/prompt-editor/config.json +1 -1
- package/src/components/prompt-editor/index.tsx +15 -2
- package/src/components/prompt-editor/types.tsx +2 -0
- package/src/components/prompt-editor-with-inputs/config.json +1 -1
- package/src/components/prompt-editor-with-variables/config.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1952,7 +1952,7 @@ function BatchOutputs(props) {
|
|
|
1952
1952
|
|
|
1953
1953
|
// src/components/prompt-editor/index.tsx
|
|
1954
1954
|
import React15 from "react";
|
|
1955
|
-
import { Renderer, EditorProvider } from "@coze-editor/editor/react";
|
|
1955
|
+
import { Renderer, EditorProvider, ActiveLinePlaceholder } from "@coze-editor/editor/react";
|
|
1956
1956
|
import preset from "@coze-editor/editor/preset-prompt";
|
|
1957
1957
|
|
|
1958
1958
|
// src/components/prompt-editor/styles.tsx
|
|
@@ -2084,7 +2084,16 @@ var jinja_default = JinjaHighlight;
|
|
|
2084
2084
|
|
|
2085
2085
|
// src/components/prompt-editor/index.tsx
|
|
2086
2086
|
function PromptEditor(props) {
|
|
2087
|
-
const {
|
|
2087
|
+
const {
|
|
2088
|
+
value,
|
|
2089
|
+
onChange,
|
|
2090
|
+
readonly,
|
|
2091
|
+
placeholder,
|
|
2092
|
+
activeLinePlaceholder,
|
|
2093
|
+
style,
|
|
2094
|
+
hasError,
|
|
2095
|
+
children
|
|
2096
|
+
} = props || {};
|
|
2088
2097
|
return /* @__PURE__ */ React15.createElement(UIContainer4, { $hasError: hasError, style }, /* @__PURE__ */ React15.createElement(EditorProvider, null, /* @__PURE__ */ React15.createElement(
|
|
2089
2098
|
Renderer,
|
|
2090
2099
|
{
|
|
@@ -2092,13 +2101,14 @@ function PromptEditor(props) {
|
|
|
2092
2101
|
defaultValue: String(value?.content),
|
|
2093
2102
|
options: {
|
|
2094
2103
|
readOnly: readonly,
|
|
2095
|
-
editable: !readonly
|
|
2104
|
+
editable: !readonly,
|
|
2105
|
+
placeholder
|
|
2096
2106
|
},
|
|
2097
2107
|
onChange: (e) => {
|
|
2098
2108
|
onChange({ type: "template", content: e.value });
|
|
2099
2109
|
}
|
|
2100
2110
|
}
|
|
2101
|
-
), /* @__PURE__ */ React15.createElement(markdown_default, null), /* @__PURE__ */ React15.createElement(language_support_default, null), /* @__PURE__ */ React15.createElement(jinja_default, null), children));
|
|
2111
|
+
), activeLinePlaceholder && /* @__PURE__ */ React15.createElement(ActiveLinePlaceholder, null, activeLinePlaceholder), /* @__PURE__ */ React15.createElement(markdown_default, null), /* @__PURE__ */ React15.createElement(language_support_default, null), /* @__PURE__ */ React15.createElement(jinja_default, null), children));
|
|
2102
2112
|
}
|
|
2103
2113
|
|
|
2104
2114
|
// src/components/prompt-editor-with-variables/index.tsx
|