@cozeloop/prompt-components 0.0.1 → 0.0.2
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/edenx.config.d.ts +2 -0
- package/dist/{es/basic-editor/extensions/go-syntax.js → go-syntax-067c4f5d.mjs} +16 -9
- package/dist/go-syntax-4deb0289.js +8 -0
- package/dist/{es/basic-editor/extensions/go-theme.js → go-theme-062a6df6.mjs} +3 -4
- package/dist/go-theme-fbd8a4fa.js +1 -0
- package/dist/index.cjs +61 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2788 -0
- package/dist/{types → src}/basic-editor/custom-facet.d.ts +2 -1
- package/dist/src/basic-editor/diff.d.ts +16 -0
- package/dist/src/basic-editor/extensions/go-syntax.d.ts +71 -0
- package/dist/src/basic-editor/extensions/go-template.d.ts +1 -0
- package/dist/{types → src}/basic-editor/extensions/go-theme.d.ts +1 -1
- package/dist/src/basic-editor/extensions/jinja.d.ts +4 -0
- package/dist/{types → src}/basic-editor/extensions/keymap.d.ts +3 -2
- package/dist/src/basic-editor/extensions/language-support.d.ts +2 -0
- package/dist/src/basic-editor/extensions/markdown.d.ts +2 -0
- package/dist/src/basic-editor/extensions/search/dom/icon.d.ts +59 -0
- package/dist/src/basic-editor/extensions/search/dom/match-count.d.ts +14 -0
- package/dist/src/basic-editor/extensions/search/index.d.ts +1 -0
- package/dist/src/basic-editor/extensions/search/panel.d.ts +33 -0
- package/dist/src/basic-editor/extensions/search/theme.d.ts +1 -0
- package/dist/src/basic-editor/extensions/validation.d.ts +8 -0
- package/dist/src/basic-editor/extensions/variable.d.ts +11 -0
- package/dist/src/basic-editor/index.d.ts +29 -0
- package/dist/{types → src}/code-editor/index.d.ts +1 -1
- package/dist/src/code-editor/json-editor.d.ts +18 -0
- package/dist/src/code-editor/raw-text-editor.d.ts +11 -0
- package/dist/{types → src}/consts/index.d.ts +1 -1
- package/dist/src/dev-layout/index.d.ts +7 -0
- package/dist/{types → src}/index.d.ts +7 -7
- package/dist/src/mermaid-diagram/index.d.ts +12 -0
- package/dist/src/mermaid-diagram/use-svg-pan-zoom.d.ts +12 -0
- package/dist/{types → src}/mermaid-diagram/utils.d.ts +1 -1
- package/dist/src/model-config-editor/basic-type.d.ts +13 -0
- package/dist/src/model-config-editor/model-config-form.d.ts +13 -0
- package/dist/src/model-config-editor/popover-type.d.ts +19 -0
- package/dist/src/model-select/index.d.ts +27 -0
- package/dist/src/model-select/model-option/index.d.ts +25 -0
- package/dist/src/model-select/model-option-group/index.d.ts +16 -0
- package/dist/src/prompt-editor/index.d.ts +31 -0
- package/dist/src/prompt-editor/message-type-select.d.ts +11 -0
- package/dist/src/schema-editor/index.d.ts +11 -0
- package/dist/{types → src}/utils/base.d.ts +5 -4
- package/dist/src/utils/model-config.d.ts +5 -0
- package/dist/style.css +1 -0
- package/dist/test-build.d.ts +7 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +15 -5
- package/dist/es/basic-editor/custom-facet.js +0 -9
- package/dist/es/basic-editor/diff.js +0 -138
- package/dist/es/basic-editor/extensions/go-template.js +0 -16
- package/dist/es/basic-editor/extensions/jinja.js +0 -80
- package/dist/es/basic-editor/extensions/keymap.js +0 -442
- package/dist/es/basic-editor/extensions/language-support.js +0 -12
- package/dist/es/basic-editor/extensions/markdown.js +0 -58
- package/dist/es/basic-editor/extensions/search/dom/icon.js +0 -250
- package/dist/es/basic-editor/extensions/search/dom/match-count.js +0 -33
- package/dist/es/basic-editor/extensions/search/index.js +0 -18
- package/dist/es/basic-editor/extensions/search/panel.js +0 -418
- package/dist/es/basic-editor/extensions/search/theme.js +0 -184
- package/dist/es/basic-editor/extensions/validation.js +0 -84
- package/dist/es/basic-editor/extensions/validation.module.js +0 -5
- package/dist/es/basic-editor/extensions/validation_module.css +0 -7
- package/dist/es/basic-editor/extensions/variable.js +0 -178
- package/dist/es/basic-editor/index.js +0 -171
- package/dist/es/code-editor/code-editor.js +0 -83
- package/dist/es/code-editor/index.js +0 -12
- package/dist/es/code-editor/json-editor.js +0 -157
- package/dist/es/code-editor/raw-text-editor.js +0 -46
- package/dist/es/code-editor/text-editor.js +0 -41
- package/dist/es/code-editor/themes/coze-dark.js +0 -112
- package/dist/es/code-editor/themes/coze-light.js +0 -118
- package/dist/es/consts/index.js +0 -12
- package/dist/es/dev-layout/index.js +0 -35
- package/dist/es/index.js +0 -66
- package/dist/es/mermaid-diagram/index.js +0 -148
- package/dist/es/mermaid-diagram/index.module.js +0 -5
- package/dist/es/mermaid-diagram/index_module.css +0 -4
- package/dist/es/mermaid-diagram/use-svg-pan-zoom.js +0 -49
- package/dist/es/mermaid-diagram/utils.js +0 -74
- package/dist/es/model-config-editor/basic-type.js +0 -73
- package/dist/es/model-config-editor/index.module.js +0 -5
- package/dist/es/model-config-editor/index_module.css +0 -8
- package/dist/es/model-config-editor/model-config-form.js +0 -130
- package/dist/es/model-config-editor/popover-type.js +0 -118
- package/dist/es/model-select/index.js +0 -136
- package/dist/es/model-select/index.module.js +0 -5
- package/dist/es/model-select/index_module.css +0 -14
- package/dist/es/model-select/model-option/index.js +0 -161
- package/dist/es/model-select/model-option/index.module.js +0 -5
- package/dist/es/model-select/model-option/index_module.css +0 -23
- package/dist/es/model-select/model-option-group/index.js +0 -44
- package/dist/es/prompt-editor/index.js +0 -188
- package/dist/es/prompt-editor/index.module.js +0 -5
- package/dist/es/prompt-editor/index_module.css +0 -71
- package/dist/es/prompt-editor/message-type-select.js +0 -74
- package/dist/es/schema-editor/index.js +0 -43
- package/dist/es/utils/base.js +0 -53
- package/dist/es/utils/model-config.js +0 -32
- package/dist/lib/basic-editor/custom-facet.js +0 -33
- package/dist/lib/basic-editor/diff.js +0 -167
- package/dist/lib/basic-editor/extensions/go-syntax.js +0 -146
- package/dist/lib/basic-editor/extensions/go-template.js +0 -50
- package/dist/lib/basic-editor/extensions/go-theme.js +0 -1091
- package/dist/lib/basic-editor/extensions/jinja.js +0 -100
- package/dist/lib/basic-editor/extensions/keymap.js +0 -465
- package/dist/lib/basic-editor/extensions/language-support.js +0 -32
- package/dist/lib/basic-editor/extensions/markdown.js +0 -78
- package/dist/lib/basic-editor/extensions/search/dom/icon.js +0 -291
- package/dist/lib/basic-editor/extensions/search/dom/match-count.js +0 -67
- package/dist/lib/basic-editor/extensions/search/index.js +0 -38
- package/dist/lib/basic-editor/extensions/search/panel.js +0 -429
- package/dist/lib/basic-editor/extensions/search/theme.js +0 -208
- package/dist/lib/basic-editor/extensions/validation.js +0 -118
- package/dist/lib/basic-editor/extensions/validation.module.js +0 -25
- package/dist/lib/basic-editor/extensions/validation_module.css +0 -7
- package/dist/lib/basic-editor/extensions/variable.js +0 -190
- package/dist/lib/basic-editor/index.js +0 -193
- package/dist/lib/code-editor/code-editor.js +0 -117
- package/dist/lib/code-editor/index.js +0 -40
- package/dist/lib/code-editor/json-editor.js +0 -184
- package/dist/lib/code-editor/raw-text-editor.js +0 -70
- package/dist/lib/code-editor/text-editor.js +0 -75
- package/dist/lib/code-editor/themes/coze-dark.js +0 -136
- package/dist/lib/code-editor/themes/coze-light.js +0 -142
- package/dist/lib/consts/index.js +0 -38
- package/dist/lib/dev-layout/index.js +0 -69
- package/dist/lib/index.js +0 -110
- package/dist/lib/mermaid-diagram/index.js +0 -174
- package/dist/lib/mermaid-diagram/index.module.js +0 -25
- package/dist/lib/mermaid-diagram/index_module.css +0 -4
- package/dist/lib/mermaid-diagram/use-svg-pan-zoom.js +0 -83
- package/dist/lib/mermaid-diagram/utils.js +0 -98
- package/dist/lib/model-config-editor/basic-type.js +0 -105
- package/dist/lib/model-config-editor/index.module.js +0 -25
- package/dist/lib/model-config-editor/index_module.css +0 -8
- package/dist/lib/model-config-editor/model-config-form.js +0 -149
- package/dist/lib/model-config-editor/popover-type.js +0 -145
- package/dist/lib/model-select/index.js +0 -170
- package/dist/lib/model-select/index.module.js +0 -25
- package/dist/lib/model-select/index_module.css +0 -14
- package/dist/lib/model-select/model-option/index.js +0 -188
- package/dist/lib/model-select/model-option/index.module.js +0 -25
- package/dist/lib/model-select/model-option/index_module.css +0 -23
- package/dist/lib/model-select/model-option-group/index.js +0 -75
- package/dist/lib/prompt-editor/index.js +0 -218
- package/dist/lib/prompt-editor/index.module.js +0 -25
- package/dist/lib/prompt-editor/index_module.css +0 -71
- package/dist/lib/prompt-editor/message-type-select.js +0 -108
- package/dist/lib/schema-editor/index.js +0 -77
- package/dist/lib/utils/base.js +0 -82
- package/dist/lib/utils/model-config.js +0 -57
- package/dist/types/basic-editor/diff.d.ts +0 -15
- package/dist/types/basic-editor/extensions/go-syntax.d.ts +0 -71
- package/dist/types/basic-editor/extensions/go-template.d.ts +0 -1
- package/dist/types/basic-editor/extensions/jinja.d.ts +0 -6
- package/dist/types/basic-editor/extensions/language-support.d.ts +0 -2
- package/dist/types/basic-editor/extensions/markdown.d.ts +0 -2
- package/dist/types/basic-editor/extensions/search/dom/icon.d.ts +0 -59
- package/dist/types/basic-editor/extensions/search/dom/match-count.d.ts +0 -14
- package/dist/types/basic-editor/extensions/search/index.d.ts +0 -1
- package/dist/types/basic-editor/extensions/search/panel.d.ts +0 -32
- package/dist/types/basic-editor/extensions/search/theme.d.ts +0 -1
- package/dist/types/basic-editor/extensions/validation.d.ts +0 -10
- package/dist/types/basic-editor/extensions/variable.d.ts +0 -14
- package/dist/types/basic-editor/index.d.ts +0 -28
- package/dist/types/code-editor/code-editor.d.ts +0 -23
- package/dist/types/code-editor/json-editor.d.ts +0 -17
- package/dist/types/code-editor/raw-text-editor.d.ts +0 -11
- package/dist/types/code-editor/text-editor.d.ts +0 -23
- package/dist/types/code-editor/themes/coze-dark.d.ts +0 -1
- package/dist/types/code-editor/themes/coze-light.d.ts +0 -1
- package/dist/types/dev-layout/index.d.ts +0 -13
- package/dist/types/mermaid-diagram/index.d.ts +0 -12
- package/dist/types/mermaid-diagram/use-svg-pan-zoom.d.ts +0 -17
- package/dist/types/model-config-editor/basic-type.d.ts +0 -19
- package/dist/types/model-config-editor/model-config-form.d.ts +0 -14
- package/dist/types/model-config-editor/popover-type.d.ts +0 -25
- package/dist/types/model-select/index.d.ts +0 -38
- package/dist/types/model-select/model-option/index.d.ts +0 -30
- package/dist/types/model-select/model-option-group/index.d.ts +0 -15
- package/dist/types/prompt-editor/index.d.ts +0 -30
- package/dist/types/prompt-editor/message-type-select.d.ts +0 -16
- package/dist/types/schema-editor/index.d.ts +0 -18
- package/dist/types/utils/model-config.d.ts +0 -4
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var message_type_select_exports = {};
|
|
30
|
-
__export(message_type_select_exports, {
|
|
31
|
-
MessageTypeSelect: () => MessageTypeSelect
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(message_type_select_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_icons = require("@coze-arch/coze-design/icons");
|
|
38
|
-
var import_coze_design = require("@coze-arch/coze-design");
|
|
39
|
-
var import_index = __toESM(require("./index.module"));
|
|
40
|
-
function MessageTypeSelect({
|
|
41
|
-
value,
|
|
42
|
-
onChange,
|
|
43
|
-
disabled,
|
|
44
|
-
messageTypeList = []
|
|
45
|
-
}) {
|
|
46
|
-
var _a, _b, _c, _d;
|
|
47
|
-
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
48
|
-
if (disabled) {
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
-
import_coze_design.Typography.Text,
|
|
51
|
-
{
|
|
52
|
-
size: "small",
|
|
53
|
-
type: "tertiary",
|
|
54
|
-
className: (0, import_classnames.default)("px-2", import_index.default["role-display"], "variable-text"),
|
|
55
|
-
children: (_b = ((_a = messageTypeList.find((it) => it.value === value)) == null ? void 0 : _a.label) || value) != null ? _b : "-"
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
import_coze_design.Menu,
|
|
61
|
-
{
|
|
62
|
-
visible,
|
|
63
|
-
trigger: "custom",
|
|
64
|
-
position: "bottomLeft",
|
|
65
|
-
showTick: false,
|
|
66
|
-
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
import_coze_design.Menu.SubMenu,
|
|
68
|
-
{
|
|
69
|
-
mode: "selection",
|
|
70
|
-
selectedKeys: [`${value}`],
|
|
71
|
-
onSelectionChange: (v) => {
|
|
72
|
-
onChange == null ? void 0 : onChange(Number(v));
|
|
73
|
-
setVisible(false);
|
|
74
|
-
},
|
|
75
|
-
children: messageTypeList == null ? void 0 : messageTypeList.map((it) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
-
import_coze_design.Menu.Item,
|
|
77
|
-
{
|
|
78
|
-
itemKey: `${it.value}`,
|
|
79
|
-
className: (0, import_classnames.default)("!px-2", {
|
|
80
|
-
"coz-mg-primary": `${it}` === `${value}`
|
|
81
|
-
}),
|
|
82
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coze_design.Typography.Text, { className: "variable-text", children: it.label })
|
|
83
|
-
},
|
|
84
|
-
it.value
|
|
85
|
-
))
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
onClickOutSide: () => setVisible(false),
|
|
89
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
90
|
-
import_coze_design.Button,
|
|
91
|
-
{
|
|
92
|
-
size: "mini",
|
|
93
|
-
color: "secondary",
|
|
94
|
-
onClick: () => setVisible(true),
|
|
95
|
-
className: (0, import_classnames.default)(import_index.default["role-display"], "variable-text"),
|
|
96
|
-
children: [
|
|
97
|
-
(_d = ((_c = messageTypeList.find((it) => it.value === value)) == null ? void 0 : _c.label) || value) != null ? _d : "-",
|
|
98
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.IconCozNodeExpand, { className: "ml-0.5" })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
106
|
-
0 && (module.exports = {
|
|
107
|
-
MessageTypeSelect
|
|
108
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var schema_editor_exports = {};
|
|
30
|
-
__export(schema_editor_exports, {
|
|
31
|
-
SchemaEditor: () => SchemaEditor
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(schema_editor_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_classnames = __toESM(require("classnames"));
|
|
36
|
-
var import_code_editor = require("../code-editor");
|
|
37
|
-
const SchemaEditor = ({
|
|
38
|
-
value,
|
|
39
|
-
onChange,
|
|
40
|
-
placeholder,
|
|
41
|
-
readOnly,
|
|
42
|
-
language,
|
|
43
|
-
className
|
|
44
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
-
"div",
|
|
46
|
-
{
|
|
47
|
-
className: (0, import_classnames.default)(
|
|
48
|
-
"w-full h-[500px] border border-solid coz-stroke-primary rounded-[4px] overflow-hidden relative bg-white",
|
|
49
|
-
{ "opacity-70": readOnly },
|
|
50
|
-
className
|
|
51
|
-
),
|
|
52
|
-
children: language === "json" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
-
import_code_editor.BaseJsonEditor,
|
|
54
|
-
{
|
|
55
|
-
className: "w-full h-full overflow-y-auto",
|
|
56
|
-
onChange,
|
|
57
|
-
value: value || "",
|
|
58
|
-
placeholder,
|
|
59
|
-
readonly: readOnly,
|
|
60
|
-
borderRadius: 4
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
-
import_code_editor.BaseRawTextEditor,
|
|
64
|
-
{
|
|
65
|
-
className: "w-full h-full overflow-y-auto",
|
|
66
|
-
onChange,
|
|
67
|
-
value: value || "",
|
|
68
|
-
placeholder,
|
|
69
|
-
readonly: readOnly
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
-
0 && (module.exports = {
|
|
76
|
-
SchemaEditor
|
|
77
|
-
});
|
package/dist/lib/utils/base.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var base_exports = {};
|
|
20
|
-
__export(base_exports, {
|
|
21
|
-
convertNumberToThousands: () => convertNumberToThousands,
|
|
22
|
-
handleScrollToBottom: () => handleScrollToBottom,
|
|
23
|
-
messageId: () => messageId,
|
|
24
|
-
recordToArray: () => recordToArray,
|
|
25
|
-
safeParseJson: () => safeParseJson,
|
|
26
|
-
sleep: () => sleep
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(base_exports);
|
|
29
|
-
var import_lodash_es = require("lodash-es");
|
|
30
|
-
const safeParseJson = (jsonString, fallback) => {
|
|
31
|
-
try {
|
|
32
|
-
if (jsonString) {
|
|
33
|
-
return JSON.parse(jsonString);
|
|
34
|
-
}
|
|
35
|
-
} catch (e) {
|
|
36
|
-
return fallback;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const HEIGHT_BUFFER = 20;
|
|
40
|
-
const handleScrollToBottom = (e, callback) => {
|
|
41
|
-
const { scrollTop, clientHeight, scrollHeight } = e.currentTarget;
|
|
42
|
-
if (scrollTop + clientHeight + HEIGHT_BUFFER >= scrollHeight) {
|
|
43
|
-
callback();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
function sleep(timer = 600) {
|
|
47
|
-
return new Promise((resolve) => {
|
|
48
|
-
setTimeout(() => resolve(), timer);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
const messageId = () => {
|
|
52
|
-
const date = /* @__PURE__ */ new Date();
|
|
53
|
-
return date.getTime() + (0, import_lodash_es.uniqueId)();
|
|
54
|
-
};
|
|
55
|
-
const thousand = 1e3;
|
|
56
|
-
const convertNumberToThousands = (num) => {
|
|
57
|
-
if (!num) {
|
|
58
|
-
return 0;
|
|
59
|
-
}
|
|
60
|
-
const number = Number(num);
|
|
61
|
-
if (number < thousand) {
|
|
62
|
-
return number;
|
|
63
|
-
} else {
|
|
64
|
-
return `${(number / thousand).toFixed(1)} K`;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
function recordToArray(record) {
|
|
68
|
-
return Object.entries(record).map(([key, value]) => ({
|
|
69
|
-
label: key,
|
|
70
|
-
value
|
|
71
|
-
// 将值转换为字符串,如果值为 undefined 则不设置
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
-
0 && (module.exports = {
|
|
76
|
-
convertNumberToThousands,
|
|
77
|
-
handleScrollToBottom,
|
|
78
|
-
messageId,
|
|
79
|
-
recordToArray,
|
|
80
|
-
safeParseJson,
|
|
81
|
-
sleep
|
|
82
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var model_config_exports = {};
|
|
20
|
-
__export(model_config_exports, {
|
|
21
|
-
convertModelToModelConfig: () => convertModelToModelConfig,
|
|
22
|
-
renderModelOfflineTag: () => renderModelOfflineTag
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(model_config_exports);
|
|
25
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
var import_fornax_ml_flow = require("@flow-infra/idl/fornax_ml_flow");
|
|
27
|
-
var import_coze_design = require("@coze-arch/coze-design");
|
|
28
|
-
var import_model_config_form = require("../model-config-editor/model-config-form");
|
|
29
|
-
var import_consts = require("../consts");
|
|
30
|
-
const convertModelToModelConfig = (model) => {
|
|
31
|
-
var _a, _b, _c, _d;
|
|
32
|
-
return {
|
|
33
|
-
id: model == null ? void 0 : model.id,
|
|
34
|
-
name: model == null ? void 0 : model.displayName,
|
|
35
|
-
provider: model == null ? void 0 : model.provider,
|
|
36
|
-
provider_model_id: model == null ? void 0 : model.identification,
|
|
37
|
-
temperature: (0, import_model_config_form.convertInt64ToNumber)((_a = model == null ? void 0 : model.defaultRuntimeParam) == null ? void 0 : _a.temperature),
|
|
38
|
-
max_tokens: (0, import_model_config_form.convertInt64ToNumber)(
|
|
39
|
-
((_b = model == null ? void 0 : model.defaultRuntimeParam) == null ? void 0 : _b.maxTokens) || import_consts.DEFAULT_MAX_TOKENS
|
|
40
|
-
),
|
|
41
|
-
top_p: (0, import_model_config_form.convertInt64ToNumber)((_c = model == null ? void 0 : model.defaultRuntimeParam) == null ? void 0 : _c.topP),
|
|
42
|
-
function_call_mode: (_d = model == null ? void 0 : model.ability) == null ? void 0 : _d.functionCallEnabled
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
const renderModelOfflineTag = (model) => {
|
|
46
|
-
if ((model == null ? void 0 : model.modelStatus) === import_fornax_ml_flow.ModelStatus.Offlining) {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coze_design.Tag, { color: "yellow", className: "flex-shrink-0", size: "mini", children: "下线中" });
|
|
48
|
-
} else if ((model == null ? void 0 : model.modelStatus) === import_fornax_ml_flow.ModelStatus.Unavailable) {
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coze_design.Tag, { color: "red", className: "flex-shrink-0", size: "mini", children: "已下线" });
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
};
|
|
53
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
-
0 && (module.exports = {
|
|
55
|
-
convertModelToModelConfig,
|
|
56
|
-
renderModelOfflineTag
|
|
57
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
export interface PromptDiffEditorRef {
|
|
3
|
-
goToPreviousChunk: () => void;
|
|
4
|
-
goToNextChunk?: () => void;
|
|
5
|
-
}
|
|
6
|
-
interface PromptDiffEditorProps {
|
|
7
|
-
oldValue?: string;
|
|
8
|
-
newValue?: string;
|
|
9
|
-
autoScrollToBottom?: boolean;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
editorAble?: boolean;
|
|
12
|
-
onChange?: (value: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const PromptDiffEditor: import("react").ForwardRefExoticComponent<PromptDiffEditorProps & import("react").RefAttributes<PromptDiffEditorRef>>;
|
|
15
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
declare const tmLanguage: {
|
|
2
|
-
foldingStartMarker: string;
|
|
3
|
-
foldingStopMarker: string;
|
|
4
|
-
name: string;
|
|
5
|
-
patterns: {
|
|
6
|
-
begin: string;
|
|
7
|
-
beginCaptures: {
|
|
8
|
-
'0': {
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
end: string;
|
|
13
|
-
endCaptures: {
|
|
14
|
-
'0': {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
patterns: ({
|
|
19
|
-
match: string;
|
|
20
|
-
name: string;
|
|
21
|
-
begin?: undefined;
|
|
22
|
-
end?: undefined;
|
|
23
|
-
beginCaptures?: undefined;
|
|
24
|
-
endCaptures?: undefined;
|
|
25
|
-
patterns?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
begin: string;
|
|
28
|
-
end: string;
|
|
29
|
-
name: string;
|
|
30
|
-
match?: undefined;
|
|
31
|
-
beginCaptures?: undefined;
|
|
32
|
-
endCaptures?: undefined;
|
|
33
|
-
patterns?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
begin: string;
|
|
36
|
-
beginCaptures: {
|
|
37
|
-
'0': {
|
|
38
|
-
name: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
end: string;
|
|
42
|
-
endCaptures: {
|
|
43
|
-
'0': {
|
|
44
|
-
name: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
name: string;
|
|
48
|
-
patterns: {
|
|
49
|
-
include: string;
|
|
50
|
-
}[];
|
|
51
|
-
match?: undefined;
|
|
52
|
-
})[];
|
|
53
|
-
}[];
|
|
54
|
-
repository: {
|
|
55
|
-
string_escaped_char: {
|
|
56
|
-
patterns: {
|
|
57
|
-
match: string;
|
|
58
|
-
name: string;
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
61
|
-
string_placeholder: {
|
|
62
|
-
patterns: {
|
|
63
|
-
match: string;
|
|
64
|
-
name: string;
|
|
65
|
-
}[];
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
scopeName: string;
|
|
69
|
-
uuid: string;
|
|
70
|
-
};
|
|
71
|
-
export { tmLanguage };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const goExtension: import("@codemirror/state").Extension[];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
interface IconProps extends Record<string, unknown> {
|
|
2
|
-
checked?: boolean;
|
|
3
|
-
checkable?: boolean;
|
|
4
|
-
onchange?: () => void;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare abstract class Icon {
|
|
8
|
-
readonly dom: HTMLElement;
|
|
9
|
-
_checked?: boolean;
|
|
10
|
-
private _disabled?;
|
|
11
|
-
private checkable?;
|
|
12
|
-
constructor(attr?: IconProps);
|
|
13
|
-
abstract getSVG(): HTMLSpanElement;
|
|
14
|
-
get checked(): boolean | undefined;
|
|
15
|
-
set checked(checked: boolean | undefined);
|
|
16
|
-
get disabled(): boolean | undefined;
|
|
17
|
-
set disabled(disabled: boolean | undefined);
|
|
18
|
-
}
|
|
19
|
-
export declare class IconCaseSensitive extends Icon {
|
|
20
|
-
constructor(attr?: IconProps);
|
|
21
|
-
getSVG(): HTMLSpanElement;
|
|
22
|
-
}
|
|
23
|
-
export declare class IconRegExp extends Icon {
|
|
24
|
-
constructor(attr?: IconProps);
|
|
25
|
-
getSVG(): HTMLSpanElement;
|
|
26
|
-
}
|
|
27
|
-
export declare class IconWholeWord extends Icon {
|
|
28
|
-
constructor(attr?: IconProps);
|
|
29
|
-
getSVG(): HTMLSpanElement;
|
|
30
|
-
}
|
|
31
|
-
export declare class IconArrowUp extends Icon {
|
|
32
|
-
constructor(attr?: IconProps);
|
|
33
|
-
getSVG(): HTMLSpanElement;
|
|
34
|
-
}
|
|
35
|
-
export declare class IconArrowDown extends Icon {
|
|
36
|
-
constructor(attr?: IconProps);
|
|
37
|
-
getSVG(): HTMLSpanElement;
|
|
38
|
-
}
|
|
39
|
-
export declare class IconReplace extends Icon {
|
|
40
|
-
constructor(attr?: IconProps);
|
|
41
|
-
getSVG(): HTMLSpanElement;
|
|
42
|
-
}
|
|
43
|
-
export declare class IconReplaceAll extends Icon {
|
|
44
|
-
constructor(attr?: IconProps);
|
|
45
|
-
getSVG(): HTMLSpanElement;
|
|
46
|
-
}
|
|
47
|
-
export declare class IconClose extends Icon {
|
|
48
|
-
constructor(attr?: IconProps);
|
|
49
|
-
getSVG(): HTMLSpanElement;
|
|
50
|
-
}
|
|
51
|
-
export declare class IconEnter extends Icon {
|
|
52
|
-
constructor(attr?: IconProps);
|
|
53
|
-
getSVG(): HTMLSpanElement;
|
|
54
|
-
}
|
|
55
|
-
export declare class IconChevronRight extends Icon {
|
|
56
|
-
constructor(attr?: IconProps);
|
|
57
|
-
getSVG(): HTMLSpanElement;
|
|
58
|
-
}
|
|
59
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface CountData {
|
|
2
|
-
matchIndex: number;
|
|
3
|
-
matchCount: number;
|
|
4
|
-
searching?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare class MatchCount {
|
|
7
|
-
_data: CountData;
|
|
8
|
-
dom: HTMLDivElement;
|
|
9
|
-
constructor(data?: CountData);
|
|
10
|
-
update(): void;
|
|
11
|
-
get data(): CountData;
|
|
12
|
-
set data(data: CountData);
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const search: () => import("@codemirror/state").Extension[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type EditorView, type Panel, type ViewUpdate } from '@codemirror/view';
|
|
2
|
-
import { type EditorState } from '@codemirror/state';
|
|
3
|
-
import { SearchQuery } from '@codemirror/search';
|
|
4
|
-
import { MatchCount } from './dom/match-count';
|
|
5
|
-
import { IconCaseSensitive, IconRegExp, IconWholeWord, IconArrowUp, IconArrowDown, IconReplace, IconReplaceAll, IconChevronRight } from './dom/icon';
|
|
6
|
-
export declare class SearchPanel implements Panel {
|
|
7
|
-
readonly view: EditorView;
|
|
8
|
-
searchField: HTMLInputElement;
|
|
9
|
-
replaceField: HTMLInputElement;
|
|
10
|
-
matchCount: MatchCount;
|
|
11
|
-
caseField: IconCaseSensitive;
|
|
12
|
-
reField: IconRegExp;
|
|
13
|
-
wordField: IconWholeWord;
|
|
14
|
-
expand: IconChevronRight;
|
|
15
|
-
arrowUp: IconArrowUp;
|
|
16
|
-
arrowDown: IconArrowDown;
|
|
17
|
-
replace: IconReplace;
|
|
18
|
-
replaceAll: IconReplaceAll;
|
|
19
|
-
dom: HTMLElement;
|
|
20
|
-
query: SearchQuery;
|
|
21
|
-
constructor(view: EditorView);
|
|
22
|
-
private initExpandButton;
|
|
23
|
-
private initSearchLine;
|
|
24
|
-
private initReplaceLine;
|
|
25
|
-
commit(): void;
|
|
26
|
-
keydown(e: KeyboardEvent): void;
|
|
27
|
-
updateMatchCount(state: EditorState, query: SearchQuery): void;
|
|
28
|
-
update(update: ViewUpdate): void;
|
|
29
|
-
setQuery(query: SearchQuery): void;
|
|
30
|
-
mount(): void;
|
|
31
|
-
get top(): boolean;
|
|
32
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const theme: import("@codemirror/state").Extension;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type VariableType } from './variable';
|
|
3
|
-
export declare function Validation({
|
|
4
|
-
variables,
|
|
5
|
-
isNormalTemplate
|
|
6
|
-
}: {
|
|
7
|
-
variables?: VariableType[];
|
|
8
|
-
isNormalTemplate?: boolean;
|
|
9
|
-
}): ReactNode;
|
|
10
|
-
export default Validation;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface VariableType {
|
|
2
|
-
/** 变量名字 */
|
|
3
|
-
key?: string;
|
|
4
|
-
/** 变量值/mock值 */
|
|
5
|
-
value?: string;
|
|
6
|
-
}
|
|
7
|
-
declare function Variable({
|
|
8
|
-
variables,
|
|
9
|
-
isGoTemplate
|
|
10
|
-
}: {
|
|
11
|
-
variables: VariableType[];
|
|
12
|
-
isGoTemplate?: boolean;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export default Variable;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import { type VariableType } from './extensions/variable';
|
|
3
|
-
export interface PromptBasicEditorProps {
|
|
4
|
-
defaultValue?: string;
|
|
5
|
-
height?: number;
|
|
6
|
-
minHeight?: number;
|
|
7
|
-
maxHeight?: number;
|
|
8
|
-
fontSize?: number;
|
|
9
|
-
variables?: VariableType[];
|
|
10
|
-
forbidVariables?: boolean;
|
|
11
|
-
linePlaceholder?: string;
|
|
12
|
-
forbidJinjaHighlight?: boolean;
|
|
13
|
-
readOnly?: boolean;
|
|
14
|
-
customExtensions?: Extension[];
|
|
15
|
-
autoScrollToBottom?: boolean;
|
|
16
|
-
isGoTemplate?: boolean;
|
|
17
|
-
isJinja2Template?: boolean;
|
|
18
|
-
onChange?: (value: string) => void;
|
|
19
|
-
onBlur?: () => void;
|
|
20
|
-
onFocus?: () => void;
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
canSearch?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface PromptBasicEditorRef {
|
|
25
|
-
setEditorValue: (value?: string) => void;
|
|
26
|
-
insertText?: (text: string) => void;
|
|
27
|
-
}
|
|
28
|
-
export declare const PromptBasicEditor: import("react").ForwardRefExoticComponent<PromptBasicEditorProps & import("react").RefAttributes<PromptBasicEditorRef>>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const CodeEditor: (props: import("@coze-editor/editor/react").InferRendererProps<(import("@coze-editor/editor/react").ExtensionPluginSpec | import("@coze-editor/editor/react").OptionPluginSpec<"fontSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"placeholder", string | HTMLElement> | import("@coze-editor/editor/react").OptionPluginSpec<"readOnly", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"editable", boolean> | import("@coze-editor/editor/react").EventPluginSpec<"focus", symbol> | import("@coze-editor/editor/react").EventPluginSpec<"blur", symbol> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mousedown"> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mouseup"> | import("@coze-editor/editor/react").APIPluginSpec<"getValue", [], string> | import("@coze-editor/editor/react").APIPluginSpec<"focus", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"blur", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"getCursorPosition", [], number> | import("@coze-editor/editor/react").OptionPluginSpec<"minHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"maxHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"height", string | number> | import("@coze-editor/editor/react").APIPluginSpec<"undo", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"redo", [], void> | import("@coze-editor/editor/react").OptionPluginSpec<"editerHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"borderRadius", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"padding", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"lineHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"lineWrapping", boolean> | import("@coze-editor/editor/react").APIPluginSpec<"setValue", [value: string], void> | import("@coze-editor/editor/react").APIPluginSpec<"replaceText", [options: {
|
|
2
|
-
from: number;
|
|
3
|
-
to: number;
|
|
4
|
-
text: string;
|
|
5
|
-
cursorOffset?: number;
|
|
6
|
-
scrollIntoView?: boolean;
|
|
7
|
-
userEvent?: string;
|
|
8
|
-
}], void> | import("@coze-editor/editor/react").APIPluginSpec<"setCursorPosition", [pos: number], void> | import("@coze-editor/editor/react").APIPluginSpec<"disableKeybindings", [keys: string[]], void> | import("@coze-editor/editor/react").APIPluginSpec<"updateASTDecorations", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"transformTextInSelection", [transformer: (text: string) => string | undefined], void> | import("@coze-editor/editor/react").APIPluginSpec<"getSelection", [], {
|
|
9
|
-
from: number;
|
|
10
|
-
to: number;
|
|
11
|
-
anchor: number;
|
|
12
|
-
head: number;
|
|
13
|
-
}> | import("@coze-editor/editor/react").APIPluginSpec<"getLineInfoAtPosition", [pos: number], import("@codemirror/state").Line> | import("@coze-editor/editor/react").EventPluginSpec<"selectionChange", {
|
|
14
|
-
selection: {
|
|
15
|
-
from: number;
|
|
16
|
-
to: number;
|
|
17
|
-
head: number;
|
|
18
|
-
anchor: number;
|
|
19
|
-
};
|
|
20
|
-
update: import("@codemirror/view").ViewUpdate;
|
|
21
|
-
}> | import("@coze-editor/editor/react").EventPluginSpec<"change", {
|
|
22
|
-
value: string;
|
|
23
|
-
}> | import("@coze-editor/editor/react").OptionPluginSpec<"tabSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"scrollBeyondLastLine", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"uri", string> | import("@coze-editor/editor/react").OptionPluginSpec<"theme", string> | import("@coze-editor/editor/react").OptionPluginSpec<"languageId", string> | import("@coze-editor/editor/react").OptionPluginSpec<"transformer", import("@coze-editor/editor/preset-code").Transformer> | import("@coze-editor/editor/react").OptionPluginSpec<"overlayScrollbar", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"lineNumbersGutter", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"foldGutter", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"colorizeBrackets", unknown> | import("@coze-editor/editor/react").APIPluginSpec<"validate", [], void>)[]>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface BaseJsonEditorProps {
|
|
3
|
-
value: string;
|
|
4
|
-
onChange?: (value: string) => void;
|
|
5
|
-
className?: string;
|
|
6
|
-
dataTestID?: string;
|
|
7
|
-
placeholder?: string | HTMLElement;
|
|
8
|
-
isDarkTheme?: boolean;
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
minHeight?: string | number;
|
|
11
|
-
maxHeight?: string | number;
|
|
12
|
-
editerHeight?: string | number;
|
|
13
|
-
padding?: string | number;
|
|
14
|
-
borderRadius?: string | number;
|
|
15
|
-
}
|
|
16
|
-
export declare const BaseJsonEditor: React.ForwardRefExoticComponent<BaseJsonEditorProps & React.RefAttributes<unknown>>;
|
|
17
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface RawTextEditorProps {
|
|
2
|
-
value: string;
|
|
3
|
-
onChange?: (value?: string) => void;
|
|
4
|
-
className?: string;
|
|
5
|
-
readonly?: boolean;
|
|
6
|
-
dataTestID?: string;
|
|
7
|
-
placeholder?: string | HTMLElement;
|
|
8
|
-
minHeight?: string | number;
|
|
9
|
-
}
|
|
10
|
-
export declare const BaseRawTextEditor: import("react").ForwardRefExoticComponent<RawTextEditorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export {};
|