@epam/ai-dial-ui-kit 0.15.0-dev.48 → 0.15.0-dev.49
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/{JsonEditor-CpSpVa0v.cjs → JsonEditor-Bqfq8lgO.cjs} +1 -1
- package/dist/{MarkdownEditor-NYMcKLJy.cjs → MarkdownEditor-CM2NGihS.cjs} +1 -1
- package/dist/MarkdownEditor-CjpaYr68.cjs +1 -0
- package/dist/MarkdownEditorContainer-B4t1E65d.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +28 -26
- package/dist/components-manifest.json +9 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/{editor-Bc9xzKuR.cjs → editor-eZo55lDw.cjs} +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/lazy-4AJBZ-Eh.cjs +1 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
- package/package.json +1 -1
- package/dist/MarkdownEditor-CPzMv3lE.cjs +0 -1
- package/dist/MarkdownEditorContainer-DVPRplYf.cjs +0 -1
- package/dist/lazy-Cy9WobJf.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),u=require("./editor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),u=require("./editor-eZo55lDw.cjs"),d=require("@monaco-editor/react");function f(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=f(d),b=({value:e,onChange:o,onValidateJSON:t,options:a,currentTheme:n,themesConfig:i=u.EDITOR_THEMES_CONFIG})=>{function s(r){r?.editor?.defineTheme(n,i[n]),r.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=m;return c.jsx(l,{beforeMount:s,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:t,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...a??{}}})};exports.DialJsonEditor=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-4AJBZ-Eh.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const b=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:x,strikethrough:g,table:h,unorderedListCommand:C}=b;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(g,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(x,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(h,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=b;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m})=>{const I=j.useMemo(()=>M(),[]),x=j.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:g=>i?.(g||""),height:r,preview:u,commands:I,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-4AJBZ-Eh.cjs"),x=require("./merge-classes-BEJXjzkx.cjs"),g=({value:r,onChange:s,height:o=300,preview:i="edit",theme:a=u.EditorThemes.dark,className:n,placeholder:t,showDragbar:d=!0})=>{const l=t!==void 0&&!r;return e.jsxs("div",{"data-color-mode":a,className:x.mergeClasses("relative",n),children:[e.jsx(m,{value:r,onChange:c=>s?.(c||""),height:o,preview:i,visibleDragbar:d}),l&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:t})]})};exports.DialMarkdownEditor=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react");require("./editor-eZo55lDw.cjs");const N=require("./lazy-4AJBZ-Eh.cjs");require("@monaco-editor/react");const m=require("./Switch-DE6MrcqJ.cjs"),b=require("./MarkdownEditor-CjpaYr68.cjs"),g=({value:o,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=N.EditorThemes.dark,onValidateJSON:x,preview:j="edit",showDragbar:w=!0})=>{const C=n.useId(),[t,p]=n.useState(!1),[f,S]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-Bqfq8lgO.cjs")).then(s=>{S(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),E=n.useCallback(s=>{x?.(s)},[x]),r=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||r)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,r&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:C,onChange:s=>p(s)})})]})]}),r&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:o,onChange:h,onValidateJSON:E,currentTheme:u})}):e.jsx(b.DialMarkdownEditor,{value:o,onChange:h,height:c,preview:j,showDragbar:w,theme:u})]})})})};exports.DialMarkdownEditorContainer=g;
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { EditorThemes as
|
|
4
|
-
import { mergeClasses as
|
|
5
|
-
const
|
|
6
|
-
value:
|
|
7
|
-
onChange:
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import p from "@uiw/react-md-editor";
|
|
3
|
+
import { EditorThemes as f } from "../../types/editor.js";
|
|
4
|
+
import { mergeClasses as x } from "../../utils/merge-classes.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
value: e,
|
|
7
|
+
onChange: t,
|
|
8
8
|
height: i = 300,
|
|
9
|
-
preview:
|
|
10
|
-
theme:
|
|
9
|
+
preview: a = "edit",
|
|
10
|
+
theme: s = f.dark,
|
|
11
11
|
className: d,
|
|
12
|
-
placeholder:
|
|
12
|
+
placeholder: o,
|
|
13
|
+
showDragbar: m = !0
|
|
13
14
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
const l = o !== void 0 && !e;
|
|
16
|
+
return /* @__PURE__ */ c(
|
|
16
17
|
"div",
|
|
17
18
|
{
|
|
18
|
-
"data-color-mode":
|
|
19
|
-
className:
|
|
19
|
+
"data-color-mode": s,
|
|
20
|
+
className: x("relative", d),
|
|
20
21
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
22
|
+
/* @__PURE__ */ r(
|
|
23
|
+
p,
|
|
23
24
|
{
|
|
24
|
-
value:
|
|
25
|
-
onChange: (
|
|
25
|
+
value: e,
|
|
26
|
+
onChange: (n) => t?.(n || ""),
|
|
26
27
|
height: i,
|
|
27
|
-
preview:
|
|
28
|
+
preview: a,
|
|
29
|
+
visibleDragbar: m
|
|
28
30
|
}
|
|
29
31
|
),
|
|
30
|
-
|
|
32
|
+
l && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40", children: o })
|
|
31
33
|
]
|
|
32
34
|
}
|
|
33
35
|
);
|
|
34
36
|
};
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
u as DialMarkdownEditor
|
|
37
39
|
};
|
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
2
|
+
import { useId as J, useState as u, useEffect as S, useCallback as x } from "react";
|
|
3
3
|
import "../../constants/editor.js";
|
|
4
|
-
import { EditorThemes as
|
|
4
|
+
import { EditorThemes as b } from "../../types/editor.js";
|
|
5
5
|
import "@monaco-editor/react";
|
|
6
|
-
import { DialSwitch as
|
|
7
|
-
import { DialMarkdownEditor as
|
|
8
|
-
import { DialLabel as
|
|
9
|
-
const
|
|
6
|
+
import { DialSwitch as v } from "../Switch/Switch.js";
|
|
7
|
+
import { DialMarkdownEditor as y } from "./MarkdownEditor.js";
|
|
8
|
+
import { DialLabel as j } from "../Label/Label.js";
|
|
9
|
+
const q = ({
|
|
10
10
|
value: s,
|
|
11
11
|
onChangeValue: l,
|
|
12
|
-
label:
|
|
12
|
+
label: i,
|
|
13
13
|
headerContent: d,
|
|
14
14
|
switcherLabel: a,
|
|
15
15
|
height: c = 300,
|
|
16
|
-
theme: m =
|
|
16
|
+
theme: m = b.dark,
|
|
17
17
|
onValidateJSON: f,
|
|
18
|
-
preview: C = "edit"
|
|
18
|
+
preview: C = "edit",
|
|
19
|
+
showDragbar: N = !0
|
|
19
20
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const w = J(), [t, D] = u(!1), [p, E] = u(null);
|
|
22
|
+
S(() => {
|
|
23
|
+
t && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
24
|
+
E(() => o.DialJsonEditor);
|
|
24
25
|
});
|
|
25
|
-
}, [
|
|
26
|
-
const h =
|
|
26
|
+
}, [t]);
|
|
27
|
+
const h = x(
|
|
27
28
|
(o) => {
|
|
28
29
|
l?.(o);
|
|
29
30
|
},
|
|
30
31
|
[l]
|
|
31
|
-
),
|
|
32
|
+
), g = x(
|
|
32
33
|
(o) => {
|
|
33
34
|
f?.(o);
|
|
34
35
|
},
|
|
35
36
|
[f]
|
|
36
37
|
), n = !!a;
|
|
37
38
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
38
|
-
(
|
|
39
|
-
|
|
39
|
+
(i || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
40
|
+
i && /* @__PURE__ */ e(j, { label: i }),
|
|
40
41
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
41
42
|
d,
|
|
42
43
|
n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
43
|
-
|
|
44
|
+
v,
|
|
44
45
|
{
|
|
45
|
-
isOn:
|
|
46
|
+
isOn: t,
|
|
46
47
|
label: a,
|
|
47
|
-
switchId:
|
|
48
|
-
onChange: (o) =>
|
|
48
|
+
switchId: w,
|
|
49
|
+
onChange: (o) => D(o)
|
|
49
50
|
}
|
|
50
51
|
) })
|
|
51
52
|
] })
|
|
52
53
|
] }),
|
|
53
|
-
n &&
|
|
54
|
+
n && t ? /* @__PURE__ */ e(
|
|
54
55
|
"div",
|
|
55
56
|
{
|
|
56
57
|
className: "border border-primary rounded",
|
|
@@ -60,23 +61,24 @@ const $ = ({
|
|
|
60
61
|
{
|
|
61
62
|
value: s,
|
|
62
63
|
onChange: h,
|
|
63
|
-
onValidateJSON:
|
|
64
|
+
onValidateJSON: g,
|
|
64
65
|
currentTheme: m
|
|
65
66
|
}
|
|
66
67
|
)
|
|
67
68
|
}
|
|
68
69
|
) : /* @__PURE__ */ e(
|
|
69
|
-
|
|
70
|
+
y,
|
|
70
71
|
{
|
|
71
72
|
value: s,
|
|
72
73
|
onChange: h,
|
|
73
74
|
height: c,
|
|
74
75
|
preview: C,
|
|
76
|
+
showDragbar: N,
|
|
75
77
|
theme: m
|
|
76
78
|
}
|
|
77
79
|
)
|
|
78
80
|
] }) }) });
|
|
79
81
|
};
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
q as DialMarkdownEditorContainer
|
|
82
84
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-10-07T21:
|
|
2
|
+
"version": "0.15.0-dev.49",
|
|
3
|
+
"generatedAt": "2026-10-07T21:57:59.763Z",
|
|
4
4
|
"kit": {
|
|
5
5
|
"name": "@epam/ai-dial-ui-kit",
|
|
6
6
|
"description": "A modern UI kit for building AI DIAL interfaces with React",
|
|
@@ -10041,6 +10041,13 @@
|
|
|
10041
10041
|
"type": "ReactNode",
|
|
10042
10042
|
"required": false,
|
|
10043
10043
|
"description": "Content to display when the editor is empty"
|
|
10044
|
+
},
|
|
10045
|
+
{
|
|
10046
|
+
"name": "showDragbar",
|
|
10047
|
+
"type": "boolean",
|
|
10048
|
+
"required": false,
|
|
10049
|
+
"defaultValue": "true",
|
|
10050
|
+
"description": "Whether to show the bottom drag bar that resizes the editor height"
|
|
10044
10051
|
}
|
|
10045
10052
|
],
|
|
10046
10053
|
"examples": [
|