@epam/ai-dial-ui-kit 0.15.0-dev.49 → 0.15.0-dev.50

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-_W6FYhKg.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[a.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.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}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,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},...t??{}}})};exports.DialJsonEditor=k;
@@ -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-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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-_W6FYhKg.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 h=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:g,strikethrough:x,table:j,unorderedListCommand:C}=h;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(x,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(g,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(j,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=h;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,showDragbar:I=!0})=>{const g=b.useMemo(()=>M(),[]),x=b.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:j=>i?.(j||""),height:r,preview:u,visibleDragbar:I,commands:g,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
@@ -1 +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;
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-_W6FYhKg.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"),m=require("./Switch-DE6MrcqJ.cjs"),N=require("./lazy-_W6FYhKg.cjs"),b=require("./MarkdownEditor-Bapd1ycU.cjs"),g=({value:r,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-Bxui5wJH.cjs")).then(s=>{S(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),E=n.useCallback(s=>{x?.(s)},[x]),o=!!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||o)&&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,o&&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)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:E,currentTheme:u})}):e.jsx(b.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,showDragbar:w,theme:u})]})})})};exports.DialMarkdownEditorContainer=g;
@@ -1,29 +1,27 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { useId as J, useState as u, useEffect as S, useCallback as x } from "react";
3
- import "../../constants/editor.js";
4
- import { EditorThemes as b } from "../../types/editor.js";
5
- import "@monaco-editor/react";
6
- import { DialSwitch as v } from "../Switch/Switch.js";
3
+ import { DialSwitch as b } from "../Switch/Switch.js";
4
+ import { EditorThemes as v } from "../../types/editor.js";
7
5
  import { DialMarkdownEditor as y } from "./MarkdownEditor.js";
8
6
  import { DialLabel as j } from "../Label/Label.js";
9
- const q = ({
7
+ const B = ({
10
8
  value: s,
11
9
  onChangeValue: l,
12
- label: i,
10
+ label: t,
13
11
  headerContent: d,
14
12
  switcherLabel: a,
15
13
  height: c = 300,
16
- theme: m = b.dark,
14
+ theme: m = v.dark,
17
15
  onValidateJSON: f,
18
16
  preview: C = "edit",
19
17
  showDragbar: N = !0
20
18
  }) => {
21
- const w = J(), [t, D] = u(!1), [p, E] = u(null);
19
+ const w = J(), [n, D] = u(!1), [p, E] = u(null);
22
20
  S(() => {
23
- t && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
21
+ n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
24
22
  E(() => o.DialJsonEditor);
25
23
  });
26
- }, [t]);
24
+ }, [n]);
27
25
  const h = x(
28
26
  (o) => {
29
27
  l?.(o);
@@ -34,16 +32,16 @@ const q = ({
34
32
  f?.(o);
35
33
  },
36
34
  [f]
37
- ), n = !!a;
35
+ ), i = !!a;
38
36
  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: [
39
- (i || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
40
- i && /* @__PURE__ */ e(j, { label: i }),
37
+ (t || d || i) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
38
+ t && /* @__PURE__ */ e(j, { label: t }),
41
39
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
42
40
  d,
43
- n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
44
- v,
41
+ i && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
42
+ b,
45
43
  {
46
- isOn: t,
44
+ isOn: n,
47
45
  label: a,
48
46
  switchId: w,
49
47
  onChange: (o) => D(o)
@@ -51,7 +49,7 @@ const q = ({
51
49
  ) })
52
50
  ] })
53
51
  ] }),
54
- n && t ? /* @__PURE__ */ e(
52
+ i && n ? /* @__PURE__ */ e(
55
53
  "div",
56
54
  {
57
55
  className: "border border-primary rounded",
@@ -80,5 +78,5 @@ const q = ({
80
78
  ] }) }) });
81
79
  };
82
80
  export {
83
- q as DialMarkdownEditorContainer
81
+ B as DialMarkdownEditorContainer
84
82
  };
@@ -1,41 +1,43 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useMemo as r } from "react";
3
- import g from "@uiw/react-md-editor";
4
- import { EditorThemes as k } from "../../../types/editor.js";
5
- import { mergeClasses as w } from "../../../utils/merge-classes.js";
6
- import { getMarkdownFormattingCommands as x, getMarkdownExtraCommands as C } from "./constants.js";
7
- const b = ({
8
- value: m,
9
- onChange: t,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useMemo as o } from "react";
3
+ import k from "@uiw/react-md-editor";
4
+ import { EditorThemes as w } from "../../../types/editor.js";
5
+ import { mergeClasses as x } from "../../../utils/merge-classes.js";
6
+ import { getMarkdownFormattingCommands as C, getMarkdownExtraCommands as h } from "./constants.js";
7
+ const j = ({
8
+ value: t,
9
+ onChange: m,
10
10
  height: a = 300,
11
- theme: e = k.light,
12
- className: d,
13
- placeholder: i,
14
- defaultPreview: n = "edit",
15
- id: s,
16
- ariaLabel: l
11
+ theme: e = w.light,
12
+ className: i,
13
+ placeholder: d,
14
+ defaultPreview: s = "edit",
15
+ id: n,
16
+ ariaLabel: l,
17
+ showDragbar: p = !0
17
18
  }) => {
18
- const p = r(() => x(), []), c = r(() => C(), []);
19
- return /* @__PURE__ */ o(
19
+ const c = o(() => C(), []), f = o(() => h(), []);
20
+ return /* @__PURE__ */ r(
20
21
  "div",
21
22
  {
22
23
  "data-color-mode": e,
23
- className: w("dial-kit-markdown-editor", d),
24
- children: /* @__PURE__ */ o(
25
- g,
24
+ className: x("dial-kit-markdown-editor", i),
25
+ children: /* @__PURE__ */ r(
26
+ k,
26
27
  {
27
- value: m,
28
- onChange: (f) => t?.(f || ""),
28
+ value: t,
29
+ onChange: (g) => m?.(g || ""),
29
30
  height: a,
30
- preview: n,
31
- commands: p,
32
- extraCommands: c,
33
- textareaProps: { placeholder: i, id: s, "aria-label": l }
31
+ preview: s,
32
+ visibleDragbar: p,
33
+ commands: c,
34
+ extraCommands: f,
35
+ textareaProps: { placeholder: d, id: n, "aria-label": l }
34
36
  }
35
37
  )
36
38
  }
37
39
  );
38
40
  };
39
41
  export {
40
- b as MarkdownEditor
42
+ j as MarkdownEditor
41
43
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.15.0-dev.49",
3
- "generatedAt": "2026-10-07T21:57:59.763Z",
2
+ "version": "0.15.0-dev.50",
3
+ "generatedAt": "2026-10-07T22:13:33.462Z",
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",
@@ -1007,6 +1007,13 @@
1007
1007
  "type": "string",
1008
1008
  "required": false,
1009
1009
  "description": "Accessible name for the underlying textarea"
1010
+ },
1011
+ {
1012
+ "name": "showDragbar",
1013
+ "type": "boolean",
1014
+ "required": false,
1015
+ "defaultValue": "true",
1016
+ "description": "Whether to show the bottom drag bar that resizes the editor height"
1010
1017
  }
1011
1018
  ],
1012
1019
  "examples": [