@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.
package/dist/editors.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lazy-4AJBZ-Eh.cjs"),r=()=>Promise.resolve().then(()=>require("./MarkdownEditorContainer-B4t1E65d.cjs"));exports.EditorThemes=o.EditorThemes;exports.LazyDialJsonEditor=o.LazyDialJsonEditor;exports.LazyDialMarkdownEditor=o.LazyDialMarkdownEditor;exports.LazyMarkdownEditor=o.LazyMarkdownEditor;exports.LazyDialMarkdownEditorContainer=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lazy-_W6FYhKg.cjs"),r=()=>Promise.resolve().then(()=>require("./MarkdownEditorContainer-B5aHwoYF.cjs"));exports.EditorThemes=o.EditorThemes;exports.LazyDialJsonEditor=o.LazyDialJsonEditor;exports.LazyDialMarkdownEditor=o.LazyDialMarkdownEditor;exports.LazyMarkdownEditor=o.LazyMarkdownEditor;exports.LazyDialMarkdownEditorContainer=r;
@@ -0,0 +1 @@
1
+ "use strict";var o=(r=>(r.dark="dark",r.light="light",r))(o||{});const e=()=>Promise.resolve().then(()=>require("./JsonEditor-Bxui5wJH.cjs")),i=()=>Promise.resolve().then(()=>require("./MarkdownEditor-Bapd1ycU.cjs")),a=()=>Promise.resolve().then(()=>require("./MarkdownEditor-BKtFs714.cjs"));exports.EditorThemes=o;exports.LazyDialJsonEditor=e;exports.LazyDialMarkdownEditor=i;exports.LazyMarkdownEditor=a;
@@ -14,6 +14,8 @@ export interface MarkdownEditorProps {
14
14
  id?: string;
15
15
  /** Accessible name for the underlying textarea. Use it only where no visible label exists to pair with `id`. */
16
16
  ariaLabel?: string;
17
+ /** Whether to show the bottom drag bar that resizes the editor height. */
18
+ showDragbar?: boolean;
17
19
  }
18
20
  /**
19
21
  * The 2.0 Markdown editor: a formatting toolbar (bold/italic/strikethrough,
@@ -35,5 +37,6 @@ export interface MarkdownEditorProps {
35
37
  * @param [defaultPreview='edit'] - Initial edit/live/preview mode
36
38
  * @param [id] - `id` of the underlying textarea, for a visible `<label htmlFor>`
37
39
  * @param [ariaLabel] - Accessible name for the underlying textarea
40
+ * @param [showDragbar=true] - Whether to show the bottom drag bar that resizes the editor height
38
41
  */
39
42
  export declare const MarkdownEditor: FC<MarkdownEditorProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.15.0-dev.49",
3
+ "version": "0.15.0-dev.50",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
1
- "use strict";const r=require("./lazy-4AJBZ-Eh.cjs"),o={[r.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"}},[r.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"}}};exports.EDITOR_THEMES_CONFIG=o;
@@ -1 +0,0 @@
1
- "use strict";var o=(r=>(r.dark="dark",r.light="light",r))(o||{});const e=()=>Promise.resolve().then(()=>require("./JsonEditor-Bqfq8lgO.cjs")),i=()=>Promise.resolve().then(()=>require("./MarkdownEditor-CjpaYr68.cjs")),a=()=>Promise.resolve().then(()=>require("./MarkdownEditor-CM2NGihS.cjs"));exports.EditorThemes=o;exports.LazyDialJsonEditor=e;exports.LazyDialMarkdownEditor=i;exports.LazyMarkdownEditor=a;