@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/index.d.mts
CHANGED
|
@@ -264,6 +264,8 @@ type PropsType$1 = React$1.PropsWithChildren<{
|
|
|
264
264
|
onChange: (value?: IFlowTemplateValue) => void;
|
|
265
265
|
readonly?: boolean;
|
|
266
266
|
hasError?: boolean;
|
|
267
|
+
placeholder?: string;
|
|
268
|
+
activeLinePlaceholder?: string;
|
|
267
269
|
style?: React$1.CSSProperties;
|
|
268
270
|
}>;
|
|
269
271
|
|
package/dist/index.d.ts
CHANGED
|
@@ -264,6 +264,8 @@ type PropsType$1 = React$1.PropsWithChildren<{
|
|
|
264
264
|
onChange: (value?: IFlowTemplateValue) => void;
|
|
265
265
|
readonly?: boolean;
|
|
266
266
|
hasError?: boolean;
|
|
267
|
+
placeholder?: string;
|
|
268
|
+
activeLinePlaceholder?: string;
|
|
267
269
|
style?: React$1.CSSProperties;
|
|
268
270
|
}>;
|
|
269
271
|
|
package/dist/index.js
CHANGED
|
@@ -2144,7 +2144,16 @@ var jinja_default = JinjaHighlight;
|
|
|
2144
2144
|
|
|
2145
2145
|
// src/components/prompt-editor/index.tsx
|
|
2146
2146
|
function PromptEditor(props) {
|
|
2147
|
-
const {
|
|
2147
|
+
const {
|
|
2148
|
+
value,
|
|
2149
|
+
onChange,
|
|
2150
|
+
readonly,
|
|
2151
|
+
placeholder,
|
|
2152
|
+
activeLinePlaceholder,
|
|
2153
|
+
style,
|
|
2154
|
+
hasError,
|
|
2155
|
+
children
|
|
2156
|
+
} = props || {};
|
|
2148
2157
|
return /* @__PURE__ */ import_react24.default.createElement(UIContainer4, { $hasError: hasError, style }, /* @__PURE__ */ import_react24.default.createElement(import_react25.EditorProvider, null, /* @__PURE__ */ import_react24.default.createElement(
|
|
2149
2158
|
import_react25.Renderer,
|
|
2150
2159
|
{
|
|
@@ -2152,13 +2161,14 @@ function PromptEditor(props) {
|
|
|
2152
2161
|
defaultValue: String(value?.content),
|
|
2153
2162
|
options: {
|
|
2154
2163
|
readOnly: readonly,
|
|
2155
|
-
editable: !readonly
|
|
2164
|
+
editable: !readonly,
|
|
2165
|
+
placeholder
|
|
2156
2166
|
},
|
|
2157
2167
|
onChange: (e) => {
|
|
2158
2168
|
onChange({ type: "template", content: e.value });
|
|
2159
2169
|
}
|
|
2160
2170
|
}
|
|
2161
|
-
), /* @__PURE__ */ import_react24.default.createElement(markdown_default, null), /* @__PURE__ */ import_react24.default.createElement(language_support_default, null), /* @__PURE__ */ import_react24.default.createElement(jinja_default, null), children));
|
|
2171
|
+
), activeLinePlaceholder && /* @__PURE__ */ import_react24.default.createElement(import_react25.ActiveLinePlaceholder, null, activeLinePlaceholder), /* @__PURE__ */ import_react24.default.createElement(markdown_default, null), /* @__PURE__ */ import_react24.default.createElement(language_support_default, null), /* @__PURE__ */ import_react24.default.createElement(jinja_default, null), children));
|
|
2162
2172
|
}
|
|
2163
2173
|
|
|
2164
2174
|
// src/components/prompt-editor-with-variables/index.tsx
|