@e-llm-studio/requirement-ai 0.0.239 → 0.0.241

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./Editor/constants/editorConfig.js"),n=require("./Editor/Editor.js"),a=require("../../store/ref.context.js"),o=require("@lexical/html"),l=require("turndown"),s=require("turndown-plugin-gfm"),i=require("../UnsavedChangesPopup/UnsavedChangesPopup.js"),c=require("../../../../utils/tagHelper.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=new(u(l).default)({headingStyle:"atx",codeBlockStyle:"fenced"}),p=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");d.keep(["ins","del","mark"]),d.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",a=r.textContent||"";return`<a href="${o=n,p(o).replace(/"/g,"&quot;")}">${p(a)}</a>`;var o}}),d.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),d.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),d.use(s.tables);const h=e=>(e||"").replace(/\r\n/g,"\n").trim(),g=t.forwardRef(({type:l,value:s,handleUpdateState:u,onBlur:p,placeholder:g,minHeight:f,height:m,mode:E,doNotShowBorderInViewMode:v,onEditBlocked:S,onSaveUnsavedChanges:A,onDiscardUnsavedChanges:$,isSavingUnsavedChanges:y=!1},b)=>{const w=t.useRef(null),[x,C]=t.useState({type:l,value:s}),[q,N]=t.useState(0),[R,T]=t.useState(!1),_=t.useRef(s),B=t.useRef(s),j=t.useRef(Boolean(s)),{contentRef:I,setContentRef:L}=a.useRefStore();t.useEffect(()=>{C(e=>({...e,value:s})),_.current=s,B.current=s,j.current=Boolean(s),T(!1)},[s]),t.useImperativeHandle(b,()=>({requestClose:()=>!("edit"===E&&h(_.current)!==h(B.current))||(T(!0),!1)}),[E]);return t.useEffect(()=>{const e=()=>{I&&I.current&&N(I.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[I]),e.jsxs("div",{style:{position:"relative",width:"100%",height:m,minHeight:f},children:[R&&e.jsx(i.UnsavedChangesPopup,{isSaving:y,onSave:async()=>{await(null==A?void 0:A()),_.current=B.current,T(!1)},onDiscard:()=>{B.current=_.current,null==$||$(),T(!1)}}),e.jsx(n.default,{minHeight:f,height:m,placeholder:g||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=o.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)});const n=["upt","manual","ins","del","preserved"];function a(e,t){const r=e.cloneNode(!0),o=new Map;r.querySelectorAll(n.join(",")).forEach(e=>{if(e===r)return;const n=`%%NESTED${o.size}%%`;o.set(n,a(e,t)),e.replaceWith(n)});let l=t.turndown(r.innerHTML);o.forEach((e,t)=>{l=l.replace(t,e)});const s=Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),i=e.tagName.toLowerCase();return s?`<${i} ${s}>${l}</${i}>`:`<${i}>${l}</${i}>`}r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});const l=[];r.querySelectorAll("invisible").forEach((e,t)=>{l.push(e.outerHTML),e.replaceWith(r.createTextNode(`%%INVISIBLE_${t}%%`))});const s=[];["manual","upt"].forEach(e=>{r.querySelectorAll(e).forEach((e,t)=>{s.push(a(e,d)),e.replaceWith(r.createTextNode(`%%REVIEW_${s.length-1}%%`))})});const i=[];r.querySelectorAll("table").forEach((e,t)=>{i.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let p=d.turndown(r.body.innerHTML);for(let e=s.length-1;e>=0;e--)p=p.replace(`%%REVIEW\\_${e}%%`,` ${s[e]} `);l.forEach((e,t)=>{p=p.replace(new RegExp(`%%INVISIBLE\\\\*_${t}%%`,"g"),` ${e} `)}),i.forEach((e,t)=>{p=p.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),p=p.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),p=p.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),p=p.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),p=p.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),p=p.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>");["upt","manual","del","ins","preserved"].forEach(e=>{p=c.mergeTagAcrossParagraphs(p,e)}),p=c.unescapeTagIds(p,["manual","upt"]),j.current&&(_.current=p,j.current=!1),B.current=p,((e,t)=>{u(e,t)})("prompt",p)})},toolbarConfig:r.DEFAULT_TOOLBAR_CONFIG,editorRef:w,mode:E,initialString:{type:x.type,value:x.value},dynamicHeight:q,onBlur:p,doNotShowBorderInViewMode:v||!1,onEditBlocked:S})]})});g.displayName="RichTextEditor",exports.default=g;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./Editor/constants/editorConfig.js"),n=require("./Editor/Editor.js"),a=require("../../store/ref.context.js"),o=require("@lexical/html"),l=require("turndown"),s=require("turndown-plugin-gfm"),c=require("../UnsavedChangesPopup/UnsavedChangesPopup.js"),i=require("../../../../utils/tagHelper.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=new(u(l).default)({headingStyle:"atx",codeBlockStyle:"fenced"}),p=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");d.keep(["ins","del","mark"]),d.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",a=r.textContent||"";return`<a href="${o=n,p(o).replace(/"/g,"&quot;")}">${p(a)}</a>`;var o}}),d.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),d.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),d.use(s.tables);const h=e=>(e||"").replace(/\r\n/g,"\n").trim(),g=t.forwardRef(({type:l,value:s,handleUpdateState:u,onBlur:p,placeholder:g,minHeight:f,height:m,mode:E,doNotShowBorderInViewMode:v,onEditBlocked:S,onSaveUnsavedChanges:A,onDiscardUnsavedChanges:$,isSavingUnsavedChanges:y=!1},x)=>{const b=t.useRef(null),[w,C]=t.useState({type:l,value:s}),[q,N]=t.useState(0),[R,T]=t.useState(!1),_=t.useRef(s),B=t.useRef(s),j=t.useRef(Boolean(s)),{contentRef:I,setContentRef:L}=a.useRefStore();t.useEffect(()=>{C(e=>({...e,value:s})),_.current=s,B.current=s,j.current=Boolean(s),T(!1)},[s]),t.useImperativeHandle(x,()=>({requestClose:()=>!("edit"===E&&h(_.current)!==h(B.current))||(T(!0),!1)}),[E]);return t.useEffect(()=>{const e=()=>{I&&I.current&&N(I.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[I]),e.jsxs("div",{style:{position:"relative",width:"100%",height:m,minHeight:f},children:[R&&e.jsx(c.UnsavedChangesPopup,{isSaving:y,onSave:async()=>{await(null==A?void 0:A()),_.current=B.current,T(!1)},onDiscard:()=>{B.current=_.current,null==$||$(),T(!1)}}),e.jsx(n.default,{minHeight:f,height:m,placeholder:g||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=o.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code").forEach(e=>{e.textContent=e.textContent||""}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)});const n=["upt","manual","ins","del","preserved"];function a(e,t){const r=e.cloneNode(!0),o=new Map;r.querySelectorAll(n.join(",")).forEach(e=>{if(e===r)return;const n=`%%NESTED${o.size}%%`;o.set(n,a(e,t)),e.replaceWith(n)});let l=t.turndown(r.innerHTML);o.forEach((e,t)=>{l=l.replace(t,e)});const s=Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),c=e.tagName.toLowerCase();return s?`<${c} ${s}>${l}</${c}>`:`<${c}>${l}</${c}>`}r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});const l=[];r.querySelectorAll("invisible").forEach((e,t)=>{l.push(e.outerHTML),e.replaceWith(r.createTextNode(`%%INVISIBLE_${t}%%`))});const s=[];["manual","upt"].forEach(e=>{r.querySelectorAll(e).forEach((e,t)=>{s.push(a(e,d)),e.replaceWith(r.createTextNode(`%%REVIEW_${s.length-1}%%`))})});const c=[];r.querySelectorAll("table").forEach((e,t)=>{c.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let p=d.turndown(r.body.innerHTML);for(let e=s.length-1;e>=0;e--)p=p.replace(`%%REVIEW\\_${e}%%`,` ${s[e]} `);l.forEach((e,t)=>{p=p.replace(new RegExp(`%%INVISIBLE\\\\*_${t}%%`,"g"),` ${e} `)}),c.forEach((e,t)=>{p=p.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),p=p.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),p=p.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),p=p.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),p=p.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),p=p.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>"),p=p.replace(/<code([^>]*)>\s*<span[^>]*>([\s\S]*?)<\/span>\s*<\/code>/g,"<code$1>$2</code>");["upt","manual","del","ins","preserved"].forEach(e=>{p=i.mergeTagAcrossParagraphs(p,e)}),p=i.unescapeTagIds(p,["manual","upt"]),j.current&&(_.current=p,j.current=!1),B.current=p,((e,t)=>{u(e,t)})("prompt",p)})},toolbarConfig:r.DEFAULT_TOOLBAR_CONFIG,editorRef:b,mode:E,initialString:{type:w.type,value:w.value},dynamicHeight:q,onBlur:p,doNotShowBorderInViewMode:v||!1,onEditBlocked:S})]})});g.displayName="RichTextEditor",exports.default=g;
2
2
  //# sourceMappingURL=RichTextEditor.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),l=require("../../../UserStoryImport/lib/cn.js"),a=require("./segment.module.css.js"),i=require("./deleteSegmentDialog.module.css.js"),s=require("./ExampleComponentWrapper.js"),o=require("../ai-reasoning/AiReasoningCitationContent.js"),d=require("./SegmentLoader.js");require("./segment-common.css.js");var r=require("../../store/markdown-context.js"),u=require("@mui/material/Dialog"),c=require("@mui/material/IconButton"),m=require("./DeleteSegmentsDialog.js"),p=require("@mui/material/Tooltip"),g=require("./EditSegmentDialog.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=x(t),f=x(u),y=x(c),h=x(p);exports.default=({id:u="Segment",label:c,children:p,segmentUUID:x,decisionStrength:j=80,aiReason:C,customStyles:S,customIcons:b,aiReasoningCitationCustomStyles:I,segmentExampleComponent:E,handleViewGlossary:w,isUpdatedSegment:D,onOpen:k,onDelete:q,onEdit:N,customDeleteStyles:B,customDeleteIcons:M,enabledSegmentActions:$})=>{var z,A;const{citationsMetadata:L,updateCitationsMetadata:R}=t.useContext(r.MarkdownStateContext),[W,U]=v.default.useState(!1),[T,F]=v.default.useState(!1),[G,V]=v.default.useState(!1),[H,O]=v.default.useState(""),[P,X]=v.default.useState(!1),{prefix:_,inner:K}=t.useMemo(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=c?c:""),[c]);v.default.useEffect(()=>{G||O(K)},[G,K]);const J=async()=>{if(N){const e=H.toLowerCase();await N(e)}V(!1),X(!1)},Q=()=>V(!1),Y=(null==M?void 0:M.editIcon)||e.jsx(n.Pencil,{size:14}),Z=(null==M?void 0:M.checkIcon)||e.jsx(n.Check,{size:16,color:"#16A34A"}),ee=(null==M?void 0:M.crossIcon)||e.jsx(n.X,{size:16,color:"#DC2626"}),te=t.useMemo(()=>L.get(x),[L,x]),ne=t.useMemo(()=>(null==te?void 0:te.open)||!1,[te]),le=t.useMemo(()=>te&&"loading"===te.state,[te]),ae=async()=>{const e=!ne;if(U(!1),console.log("citation metadata::",e,C),e&&!(null==C?void 0:C.reason)){R(x,t=>{if(t){const e={...t};return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),await(null==k?void 0:k())}finally{R(x,t=>{if(t){const n={...t};return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),R(x,t=>{if(t){const n={...t};return n.open=e,n}return{open:e,state:le?"loading":"ready"}})};return e.jsxs("div",{className:`segment-wrapper-${u} ${a.default.segmentWrapper}`,style:{...null==S?void 0:S.segmentWrapper,display:"inline-flex",verticalAlign:"middle"},children:[e.jsxs("div",{className:`segment-${u}-container segmentContainer ${D?"updatedSegmentContainer":""}`,style:{...null==S?void 0:S.container},children:[e.jsx("span",{className:`segment-${u} segmentLabel ${D?"updatedSegmentLabel":""}`,style:{...null==S?void 0:S.label},children:D?p:c}),e.jsx("button",{className:`${a.default.segmentExplanationButtonContainer}`,style:{...null==S?void 0:S.buttonContainer},onClick:ae,children:e.jsx(n.ArrowUpRight,{className:l.cn(D&&a.default.updatedChevronIcon,a.default.cheveronIcon),style:{...null==S?void 0:S.cheveronIcon}})})]}),ne&&e.jsx(f.default,{open:!0,onClose:ae,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root"),children:e.jsxs("div",{style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[G?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[_&&e.jsx("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==S?void 0:S.label},children:_}),e.jsxs("div",{className:a.default.editInputWrapper,style:null==S?void 0:S.editInputWrapper,children:[e.jsx("input",{value:H,onChange:e=>O(e.target.value),className:a.default.editInput,style:{...null==S?void 0:S.editInput,color:(null===(z=null==S?void 0:S.label)||void 0===z?void 0:z.color)?String(S.label.color):"#3B82F6",textTransform:"uppercase"},autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&J(),"Escape"===e.key&&Q()}}),e.jsx(y.default,{onClick:()=>{H!==K?(R(x,e=>e?{...e,open:!1}:{open:!1,state:le?"loading":"ready"}),X(!0)):V(!1)},size:"small",style:null==S?void 0:S.editCheckIcon,children:Z}),e.jsx(y.default,{onClick:Q,size:"small",style:null==S?void 0:S.editCrossIcon,children:ee})]})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==S?void 0:S.label},children:null!=c?c:"SEGMENT NAME"}),(null==$?void 0:$.includes("edit"))&&e.jsx(h.default,{title:"Edit segment",placement:"top",arrow:!0,children:e.jsx("button",{onClick:()=>V(!0),className:a.default.headerEditButton,style:null==S?void 0:S.editIconButton,children:Y})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexShrink:0,...null==S?void 0:S.headerActionsContainer},children:[(null==$?void 0:$.includes("delete"))&&e.jsx(h.default,{title:"Delete segment",placement:"top",arrow:!0,children:e.jsxs("button",{onClick:()=>{U(!1),F(!0),R(x,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:le?"loading":"ready"}})},className:i.default.headerDeleteButton,children:[e.jsx(n.Trash2,{size:14}),"Delete"]})}),e.jsx(y.default,{"aria-label":"close",onClick:ae,sx:e=>({padding:"4px",color:e.palette.grey[500]}),children:e.jsx(n.X,{size:20})})]})]}),le?e.jsx(d.default,{customStyles:null==S?void 0:S.loadingSkeleton}):e.jsxs(e.Fragment,{children:[W&&!D&&e.jsx("div",{style:{marginBottom:16},children:e.jsx(s.default,{label:null!=c?c:"",segmentExampleComponent:E,customStyles:{...null==S?void 0:S.segmentExample,exampleContainer:{...null===(A=null==S?void 0:S.segmentExample)||void 0===A?void 0:A.exampleContainer,width:"100%"}},handleCancelExample:()=>{U(!1)}})}),D&&e.jsx("div",{style:{marginBottom:16},children:e.jsx("div",{className:`segment-${u}-container segmentContainer updatedSegmentContainer`,style:{...null==S?void 0:S.container},children:e.jsx("span",{className:`segment-${u} segmentLabel updatedSegmentLabel`,style:{...null==S?void 0:S.label},children:p})})}),e.jsx("div",{children:e.jsx(o.default,{aiReason:C,customStyles:{...I,aiReasoningContent:{...null==I?void 0:I.aiReasoningContent,headerBar:{width:"auto"}},aiReasoningAccordion:{header:{width:"auto"}}},customIcons:b,isSegmentExplanation:!0,handleViewGlossary:w?()=>{R(x,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:le?"loading":"ready"}}),null==w||w(u)}:void 0,handleViewExample:E?()=>{U(!0)}:void 0,isUpdatedSegment:D})})]})]})}),e.jsx(m.default,{open:T,onHide:()=>{F(!1)},customDeleteStyles:B,customDeleteIcons:M,onDelete:async e=>{await(null==q?void 0:q(e))}}),e.jsx(g.default,{open:P,onHide:()=>{X(!1),V(!1)},customStyles:B,customIcons:M,onConfirm:J})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),l=require("../../../UserStoryImport/lib/cn.js"),a=require("./segment.module.css.js"),i=require("./deleteSegmentDialog.module.css.js"),o=require("./ExampleComponentWrapper.js"),s=require("../ai-reasoning/AiReasoningCitationContent.js"),r=require("./SegmentLoader.js");require("./segment-common.css.js");var d=require("../../store/markdown-context.js"),u=require("@mui/material/Dialog"),c=require("@mui/material/IconButton"),m=require("./DeleteSegmentsDialog.js"),p=require("@mui/material/Tooltip"),g=require("./EditSegmentDialog.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=x(t),f=x(u),y=x(c),h=x(p);exports.default=({id:u="Segment",label:c,children:p,segmentUUID:x,decisionStrength:j=80,aiReason:C,customStyles:S,customIcons:b,aiReasoningCitationCustomStyles:I,segmentExampleComponent:w,handleViewGlossary:E,isUpdatedSegment:D,onOpen:k,onDelete:q,onEdit:N,customDeleteStyles:B,customDeleteIcons:L,enabledSegmentActions:M,segmentDataList:$,onShowNotification:z})=>{var A,R;const{citationsMetadata:W,updateCitationsMetadata:U}=t.useContext(d.MarkdownStateContext),[T,F]=v.default.useState(!1),[G,V]=v.default.useState(!1),[_,H]=v.default.useState(!1),[O,P]=v.default.useState(""),[X,K]=v.default.useState(!1),{prefix:J,inner:Q}=t.useMemo(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=c?c:""),[c]);v.default.useEffect(()=>{_||P(Q)},[_,Q]);const Y=async()=>{if(N){const e=O.toLowerCase();U(x,e=>e?{...e,open:!1}:{open:!1,state:ie?"loading":"ready"}),await N(e)}H(!1),K(!1)},Z=()=>H(!1),ee=(null==L?void 0:L.editIcon)||e.jsx(n.Pencil,{size:14}),te=(null==L?void 0:L.checkIcon)||e.jsx(n.Check,{size:16,color:"#16A34A"}),ne=(null==L?void 0:L.crossIcon)||e.jsx(n.X,{size:16,color:"#DC2626"}),le=t.useMemo(()=>W.get(x),[W,x]),ae=t.useMemo(()=>(null==le?void 0:le.open)||!1,[le]),ie=t.useMemo(()=>le&&"loading"===le.state,[le]),oe=async()=>{const e=!ae;if(F(!1),console.log("citation metadata::",e,C),e&&!(null==C?void 0:C.reason)){U(x,t=>{if(t){const e={...t};return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),await(null==k?void 0:k())}finally{U(x,t=>{if(t){const n={...t};return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),U(x,t=>{if(t){const n={...t};return n.open=e,n}return{open:e,state:ie?"loading":"ready"}})};return e.jsxs("div",{className:`segment-wrapper-${u} ${a.default.segmentWrapper}`,style:{...null==S?void 0:S.segmentWrapper,display:"inline-flex",verticalAlign:"middle"},children:[e.jsxs("div",{className:`segment-${u}-container segmentContainer ${D?"updatedSegmentContainer":""}`,style:{...null==S?void 0:S.container},children:[e.jsx("span",{className:`segment-${u} segmentLabel ${D?"updatedSegmentLabel":""}`,style:{...null==S?void 0:S.label},children:D?p:c}),e.jsx("button",{className:`${a.default.segmentExplanationButtonContainer}`,style:{...null==S?void 0:S.buttonContainer},onClick:oe,children:e.jsx(n.ArrowUpRight,{className:l.cn(D&&a.default.updatedChevronIcon,a.default.cheveronIcon),style:{...null==S?void 0:S.cheveronIcon}})})]}),ae&&e.jsx(f.default,{open:!0,onClose:oe,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root"),children:e.jsxs("div",{style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[_?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[J&&e.jsx("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==S?void 0:S.label},children:J}),e.jsxs("div",{className:a.default.editInputWrapper,style:null==S?void 0:S.editInputWrapper,children:[e.jsx("input",{value:O,onChange:e=>P(e.target.value),className:a.default.editInput,style:{...null==S?void 0:S.editInput,color:(null===(A=null==S?void 0:S.label)||void 0===A?void 0:A.color)?String(S.label.color):"#3B82F6",textTransform:"uppercase"},autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&Y(),"Escape"===e.key&&Z()}}),e.jsx(y.default,{onClick:()=>{if(O===Q||""===O.trim())return void H(!1);const e=O.toLowerCase().trim();if(null==$?void 0:$.some(t=>t.segment_name.toLowerCase().trim()===e))return null==z||z("error","Error","Segment name already exists!"),U(x,e=>e?{...e,open:!1}:{open:!1,state:ie?"loading":"ready"}),void H(!1);K(!0)},size:"small",style:null==S?void 0:S.editCheckIcon,children:te}),e.jsx(y.default,{onClick:Z,size:"small",style:null==S?void 0:S.editCrossIcon,children:ne})]})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==S?void 0:S.label},children:null!=c?c:"SEGMENT NAME"}),(null==M?void 0:M.includes("edit"))&&e.jsx(h.default,{title:"Edit segment",placement:"top",arrow:!0,children:e.jsx("button",{onClick:()=>H(!0),className:a.default.headerEditButton,style:null==S?void 0:S.editIconButton,children:ee})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexShrink:0,...null==S?void 0:S.headerActionsContainer},children:[(null==M?void 0:M.includes("delete"))&&e.jsx(h.default,{title:"Delete segment",placement:"top",arrow:!0,children:e.jsxs("button",{onClick:()=>{F(!1),V(!0),U(x,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:ie?"loading":"ready"}})},className:i.default.headerDeleteButton,children:[e.jsx(n.Trash2,{size:14}),"Delete"]})}),e.jsx(y.default,{"aria-label":"close",onClick:oe,sx:e=>({padding:"4px",color:e.palette.grey[500]}),children:e.jsx(n.X,{size:20})})]})]}),ie?e.jsx(r.default,{customStyles:null==S?void 0:S.loadingSkeleton}):e.jsxs(e.Fragment,{children:[T&&!D&&e.jsx("div",{style:{marginBottom:16},children:e.jsx(o.default,{label:null!=c?c:"",segmentExampleComponent:w,customStyles:{...null==S?void 0:S.segmentExample,exampleContainer:{...null===(R=null==S?void 0:S.segmentExample)||void 0===R?void 0:R.exampleContainer,width:"100%"}},handleCancelExample:()=>{F(!1)}})}),D&&e.jsx("div",{style:{marginBottom:16},children:e.jsx("div",{className:`segment-${u}-container segmentContainer updatedSegmentContainer`,style:{...null==S?void 0:S.container},children:e.jsx("span",{className:`segment-${u} segmentLabel updatedSegmentLabel`,style:{...null==S?void 0:S.label},children:p})})}),e.jsx("div",{children:e.jsx(s.default,{aiReason:C,customStyles:{...I,aiReasoningContent:{...null==I?void 0:I.aiReasoningContent,headerBar:{width:"auto"}},aiReasoningAccordion:{header:{width:"auto"}}},customIcons:b,isSegmentExplanation:!0,handleViewGlossary:E?()=>{U(x,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:ie?"loading":"ready"}}),null==E||E(u)}:void 0,handleViewExample:w?()=>{F(!0)}:void 0,isUpdatedSegment:D})})]})]})}),e.jsx(m.default,{open:G,onHide:()=>{V(!1)},customDeleteStyles:B,customDeleteIcons:L,onDelete:async e=>{await(null==q?void 0:q(e))}}),e.jsx(g.default,{open:X,onHide:()=>{K(!1),H(!1)},customStyles:B,customIcons:L,onConfirm:Y})]})};
2
2
  //# sourceMappingURL=Segment.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("./Segment.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=t(require("dompurify"));exports.default=({id:t,children:o,props:i,segmentComponentConfig:d,customStyles:s,customIcons:a,extractText:u,isUpdatedSegment:r=!1,blockId:v,customDeleteStyles:m,customDeleteIcons:g})=>{var c,p,S,h,I,f,y,C,b,x,D,_,j,E,U,W,k,A,F;const L=(null==i?void 0:i.id)||"Segment",q=(null==i?void 0:i.decisionstrength)||"80",{segmentDataList:w,getSegmentExampleComponent:O,handleViewGlossary:R,upadatedSegmentDataList:B,handleFetchUpdatedSegmentDetails:G,handleFetchSegmentDetails:M,handleDeleteSegment:T,handleEditSegment:V,enabledSegmentActions:z}=d||{},H=r?null==B?void 0:B.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==L?void 0:L.split("-"))||void 0===n?void 0:n[0])}):null==w?void 0:w.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==L?void 0:L.split("-"))||void 0===n?void 0:n[0])}),P={id:L,reason:null!==(c=null==H?void 0:H.reason)&&void 0!==c?c:"",gap:null!==(p=null==H?void 0:H.gap)&&void 0!==p?p:"",explanation:null!==(S=null==H?void 0:H.explanation)&&void 0!==S?S:"",relevance_score:null!==(h=null==H?void 0:H.relevance_score)&&void 0!==h?h:0,isOpen:!1};let J;const K=u(o),N=i["data-table"];let Q="";if(N&&!r)try{Q=decodeURIComponent(atob(N))}catch(e){console.error("Failed to decode data-table for segment",L,e)}const X=l.default.sanitize(Q),Y=()=>e.jsx("div",{dangerouslySetInnerHTML:{__html:X}});return H||!M||r||null==M||M(L),L&&H&&O&&!r&&(J=N?e.jsx(Y,{}):O(L,K,H.segment_type)),e.jsx(n.default,{id:L,segmentUUID:t,label:null!==(I=null==H?void 0:H.label)&&void 0!==I?I:null==H?void 0:H.segment_name,decisionStrength:q,aiReason:P,customIcons:a,aiReasoningCitationCustomStyles:s,segmentExampleComponent:J,handleViewGlossary:R,customStyles:{segmentWrapper:null===(f=null==s?void 0:s.segment)||void 0===f?void 0:f.segmentWrapper,container:null===(y=null==s?void 0:s.segment)||void 0===y?void 0:y.container,label:null===(C=null==s?void 0:s.segment)||void 0===C?void 0:C.label,decisionStrength:null===(b=null==s?void 0:s.segment)||void 0===b?void 0:b.decisionStrength,buttonContainer:null===(x=null==s?void 0:s.segment)||void 0===x?void 0:x.buttonContainer,cheveronIcon:null===(D=null==s?void 0:s.segment)||void 0===D?void 0:D.cheveronIcon,segmentExample:null===(_=null==s?void 0:s.segment)||void 0===_?void 0:_.segmentExample,loadingSkeleton:null===(j=null==s?void 0:s.segment)||void 0===j?void 0:j.SegmentLoadingSkeletonStyles,editInputWrapper:null===(E=null==s?void 0:s.segment)||void 0===E?void 0:E.editInputWrapper,editInput:null===(U=null==s?void 0:s.segment)||void 0===U?void 0:U.editInput,editCheckIcon:null===(W=null==s?void 0:s.segment)||void 0===W?void 0:W.editCheckIcon,editCrossIcon:null===(k=null==s?void 0:s.segment)||void 0===k?void 0:k.editCrossIcon,headerActionsContainer:null===(A=null==s?void 0:s.segment)||void 0===A?void 0:A.headerActionsContainer,editIconButton:null===(F=null==s?void 0:s.segment)||void 0===F?void 0:F.editIconButton},isUpdatedSegment:r,onOpen:async()=>{!H&&r&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),await(null==G?void 0:G(L)))},onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,{...H,segment_uuid:L},v),H)return null==T?void 0:T(e,{...H,segment_uuid:L},v)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",H,e),H&&V)return null==V?void 0:V(H,e)},customDeleteStyles:m,customDeleteIcons:g,enabledSegmentActions:z,children:o},L)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("./Segment.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(require("dompurify"));exports.default=({id:t,children:l,props:i,segmentComponentConfig:d,customStyles:s,customIcons:a,extractText:u,isUpdatedSegment:r=!1,blockId:v,customDeleteStyles:m,customDeleteIcons:c})=>{var g,p,S,h,I,f,y,C,b,x,D,_,j,E,U,W,k,w,L;const A=(null==i?void 0:i.id)||"Segment",F=(null==i?void 0:i.decisionstrength)||"80",{segmentDataList:q,getSegmentExampleComponent:O,handleViewGlossary:R,upadatedSegmentDataList:B,handleFetchUpdatedSegmentDetails:G,handleFetchSegmentDetails:M,handleDeleteSegment:N,handleEditSegment:T,enabledSegmentActions:V,onShowNotification:z}=d||{},H=r?null==B?void 0:B.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==A?void 0:A.split("-"))||void 0===n?void 0:n[0])}):null==q?void 0:q.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==A?void 0:A.split("-"))||void 0===n?void 0:n[0])}),P={id:A,reason:null!==(g=null==H?void 0:H.reason)&&void 0!==g?g:"",gap:null!==(p=null==H?void 0:H.gap)&&void 0!==p?p:"",explanation:null!==(S=null==H?void 0:H.explanation)&&void 0!==S?S:"",relevance_score:null!==(h=null==H?void 0:H.relevance_score)&&void 0!==h?h:0,isOpen:!1};let J;const K=u(l),Q=i["data-table"];let X="";if(Q&&!r)try{X=decodeURIComponent(atob(Q))}catch(e){console.error("Failed to decode data-table for segment",A,e)}const Y=o.default.sanitize(X),Z=()=>e.jsx("div",{dangerouslySetInnerHTML:{__html:Y}});return H||!M||r||null==M||M(A),A&&H&&O&&!r&&(J=Q?e.jsx(Z,{}):O(A,K,H.segment_type)),e.jsx(n.default,{id:A,segmentUUID:t,label:null!==(I=null==H?void 0:H.label)&&void 0!==I?I:null==H?void 0:H.segment_name,decisionStrength:F,aiReason:P,customIcons:a,aiReasoningCitationCustomStyles:s,segmentExampleComponent:J,handleViewGlossary:R,customStyles:{segmentWrapper:null===(f=null==s?void 0:s.segment)||void 0===f?void 0:f.segmentWrapper,container:null===(y=null==s?void 0:s.segment)||void 0===y?void 0:y.container,label:null===(C=null==s?void 0:s.segment)||void 0===C?void 0:C.label,decisionStrength:null===(b=null==s?void 0:s.segment)||void 0===b?void 0:b.decisionStrength,buttonContainer:null===(x=null==s?void 0:s.segment)||void 0===x?void 0:x.buttonContainer,cheveronIcon:null===(D=null==s?void 0:s.segment)||void 0===D?void 0:D.cheveronIcon,segmentExample:null===(_=null==s?void 0:s.segment)||void 0===_?void 0:_.segmentExample,loadingSkeleton:null===(j=null==s?void 0:s.segment)||void 0===j?void 0:j.SegmentLoadingSkeletonStyles,editInputWrapper:null===(E=null==s?void 0:s.segment)||void 0===E?void 0:E.editInputWrapper,editInput:null===(U=null==s?void 0:s.segment)||void 0===U?void 0:U.editInput,editCheckIcon:null===(W=null==s?void 0:s.segment)||void 0===W?void 0:W.editCheckIcon,editCrossIcon:null===(k=null==s?void 0:s.segment)||void 0===k?void 0:k.editCrossIcon,headerActionsContainer:null===(w=null==s?void 0:s.segment)||void 0===w?void 0:w.headerActionsContainer,editIconButton:null===(L=null==s?void 0:s.segment)||void 0===L?void 0:L.editIconButton},isUpdatedSegment:r,onOpen:async()=>{!H&&r&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),await(null==G?void 0:G(A)))},onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,{...H,segment_uuid:A},v),H)return null==N?void 0:N(e,{...H,segment_uuid:A},v)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",H,e),H&&T)return null==T?void 0:T(H,e)},customDeleteStyles:m,customDeleteIcons:c,enabledSegmentActions:V,segmentDataList:q,onShowNotification:(e,n,t)=>{z&&z(e,n,t)},children:l},A)};
2
2
  //# sourceMappingURL=SegmentWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#d633840d;border-radius:.3rem;box-sizing:border-box;color:#d63384;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#f0f2f5;border-radius:.3rem;box-sizing:border-box;color:#323232;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};
2
2
  //# sourceMappingURL=UserStoryWithCitation.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useRef as n,useState as o,useEffect as a,useImperativeHandle as l}from"react";import{DEFAULT_TOOLBAR_CONFIG as i}from"./Editor/constants/editorConfig.js";import c from"./Editor/Editor.js";import{useRefStore as s}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import d from"turndown";import{tables as p}from"turndown-plugin-gfm";import{UnsavedChangesPopup as h}from"../UnsavedChangesPopup/UnsavedChangesPopup.js";import{mergeTagAcrossParagraphs as g,unescapeTagIds as m}from"../../../../utils/tagHelper.js";const f=new d({headingStyle:"atx",codeBlockStyle:"fenced"}),E=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");f.keep(["ins","del","mark"]),f.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",o=r.textContent||"";return`<a href="${a=n,E(a).replace(/"/g,"&quot;")}">${E(o)}</a>`;var a}}),f.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),f.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),f.use(p);const v=e=>(e||"").replace(/\r\n/g,"\n").trim(),$=r(({type:r,value:d,handleUpdateState:p,onBlur:E,placeholder:$,minHeight:A,height:S,mode:w,doNotShowBorderInViewMode:y,onEditBlocked:b,onSaveUnsavedChanges:x,onDiscardUnsavedChanges:C,isSavingUnsavedChanges:N=!1},B)=>{const T=n(null),[q,L]=o({type:r,value:d}),[_,H]=o(0),[I,R]=o(!1),j=n(d),k=n(d),M=n(Boolean(d)),{contentRef:P,setContentRef:U}=s();a(()=>{L(e=>({...e,value:d})),j.current=d,k.current=d,M.current=Boolean(d),R(!1)},[d]),l(B,()=>({requestClose:()=>!("edit"===w&&v(j.current)!==v(k.current))||(R(!0),!1)}),[w]);return a(()=>{const e=()=>{P&&P.current&&H(P.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[P]),e("div",{style:{position:"relative",width:"100%",height:S,minHeight:A},children:[I&&t(h,{isSaving:N,onSave:async()=>{await(null==x?void 0:x()),j.current=k.current,R(!1)},onDiscard:()=>{k.current=j.current,null==C||C(),R(!1)}}),t(c,{minHeight:A,height:S,placeholder:$||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=u(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)});const n=["upt","manual","ins","del","preserved"];function o(e,t){const r=e.cloneNode(!0),a=new Map;r.querySelectorAll(n.join(",")).forEach(e=>{if(e===r)return;const n=`%%NESTED${a.size}%%`;a.set(n,o(e,t)),e.replaceWith(n)});let l=t.turndown(r.innerHTML);a.forEach((e,t)=>{l=l.replace(t,e)});const i=Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),c=e.tagName.toLowerCase();return i?`<${c} ${i}>${l}</${c}>`:`<${c}>${l}</${c}>`}r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});const a=[];r.querySelectorAll("invisible").forEach((e,t)=>{a.push(e.outerHTML),e.replaceWith(r.createTextNode(`%%INVISIBLE_${t}%%`))});const l=[];["manual","upt"].forEach(e=>{r.querySelectorAll(e).forEach((e,t)=>{l.push(o(e,f)),e.replaceWith(r.createTextNode(`%%REVIEW_${l.length-1}%%`))})});const i=[];r.querySelectorAll("table").forEach((e,t)=>{i.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let c=f.turndown(r.body.innerHTML);for(let e=l.length-1;e>=0;e--)c=c.replace(`%%REVIEW\\_${e}%%`,` ${l[e]} `);a.forEach((e,t)=>{c=c.replace(new RegExp(`%%INVISIBLE\\\\*_${t}%%`,"g"),` ${e} `)}),i.forEach((e,t)=>{c=c.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),c=c.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),c=c.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),c=c.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),c=c.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),c=c.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>");["upt","manual","del","ins","preserved"].forEach(e=>{c=g(c,e)}),c=m(c,["manual","upt"]),M.current&&(j.current=c,M.current=!1),k.current=c,((e,t)=>{p(e,t)})("prompt",c)})},toolbarConfig:i,editorRef:T,mode:w,initialString:{type:q.type,value:q.value},dynamicHeight:_,onBlur:E,doNotShowBorderInViewMode:y||!1,onEditBlocked:b})]})});$.displayName="RichTextEditor";export{$ as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useRef as n,useState as o,useEffect as a,useImperativeHandle as l}from"react";import{DEFAULT_TOOLBAR_CONFIG as c}from"./Editor/constants/editorConfig.js";import i from"./Editor/Editor.js";import{useRefStore as s}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import d from"turndown";import{tables as p}from"turndown-plugin-gfm";import{UnsavedChangesPopup as h}from"../UnsavedChangesPopup/UnsavedChangesPopup.js";import{mergeTagAcrossParagraphs as g,unescapeTagIds as m}from"../../../../utils/tagHelper.js";const f=new d({headingStyle:"atx",codeBlockStyle:"fenced"}),E=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");f.keep(["ins","del","mark"]),f.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",o=r.textContent||"";return`<a href="${a=n,E(a).replace(/"/g,"&quot;")}">${E(o)}</a>`;var a}}),f.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),f.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),f.use(p);const v=e=>(e||"").replace(/\r\n/g,"\n").trim(),$=r(({type:r,value:d,handleUpdateState:p,onBlur:E,placeholder:$,minHeight:S,height:A,mode:y,doNotShowBorderInViewMode:w,onEditBlocked:b,onSaveUnsavedChanges:x,onDiscardUnsavedChanges:C,isSavingUnsavedChanges:N=!1},B)=>{const T=n(null),[q,L]=o({type:r,value:d}),[_,H]=o(0),[I,R]=o(!1),j=n(d),k=n(d),M=n(Boolean(d)),{contentRef:P,setContentRef:U}=s();a(()=>{L(e=>({...e,value:d})),j.current=d,k.current=d,M.current=Boolean(d),R(!1)},[d]),l(B,()=>({requestClose:()=>!("edit"===y&&v(j.current)!==v(k.current))||(R(!0),!1)}),[y]);return a(()=>{const e=()=>{P&&P.current&&H(P.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[P]),e("div",{style:{position:"relative",width:"100%",height:A,minHeight:S},children:[I&&t(h,{isSaving:N,onSave:async()=>{await(null==x?void 0:x()),j.current=k.current,R(!1)},onDiscard:()=>{k.current=j.current,null==C||C(),R(!1)}}),t(i,{minHeight:S,height:A,placeholder:$||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=u(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code").forEach(e=>{e.textContent=e.textContent||""}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)});const n=["upt","manual","ins","del","preserved"];function o(e,t){const r=e.cloneNode(!0),a=new Map;r.querySelectorAll(n.join(",")).forEach(e=>{if(e===r)return;const n=`%%NESTED${a.size}%%`;a.set(n,o(e,t)),e.replaceWith(n)});let l=t.turndown(r.innerHTML);a.forEach((e,t)=>{l=l.replace(t,e)});const c=Array.from(e.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),i=e.tagName.toLowerCase();return c?`<${i} ${c}>${l}</${i}>`:`<${i}>${l}</${i}>`}r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});const a=[];r.querySelectorAll("invisible").forEach((e,t)=>{a.push(e.outerHTML),e.replaceWith(r.createTextNode(`%%INVISIBLE_${t}%%`))});const l=[];["manual","upt"].forEach(e=>{r.querySelectorAll(e).forEach((e,t)=>{l.push(o(e,f)),e.replaceWith(r.createTextNode(`%%REVIEW_${l.length-1}%%`))})});const c=[];r.querySelectorAll("table").forEach((e,t)=>{c.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let i=f.turndown(r.body.innerHTML);for(let e=l.length-1;e>=0;e--)i=i.replace(`%%REVIEW\\_${e}%%`,` ${l[e]} `);a.forEach((e,t)=>{i=i.replace(new RegExp(`%%INVISIBLE\\\\*_${t}%%`,"g"),` ${e} `)}),c.forEach((e,t)=>{i=i.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),i=i.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),i=i.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),i=i.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),i=i.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),i=i.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>"),i=i.replace(/<code([^>]*)>\s*<span[^>]*>([\s\S]*?)<\/span>\s*<\/code>/g,"<code$1>$2</code>");["upt","manual","del","ins","preserved"].forEach(e=>{i=g(i,e)}),i=m(i,["manual","upt"]),M.current&&(j.current=i,M.current=!1),k.current=i,((e,t)=>{p(e,t)})("prompt",i)})},toolbarConfig:c,editorRef:T,mode:y,initialString:{type:q.type,value:q.value},dynamicHeight:_,onBlur:E,doNotShowBorderInViewMode:w||!1,onEditBlocked:b})]})});$.displayName="RichTextEditor";export{$ as default};
2
2
  //# sourceMappingURL=RichTextEditor.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import l,{useContext as o,useMemo as i}from"react";import{Pencil as a,Check as s,X as r,ArrowUpRight as d,Trash2 as c}from"lucide-react";import{cn as m}from"../../../UserStoryImport/lib/cn.js";import p from"./segment.module.css.js";import u from"./deleteSegmentDialog.module.css.js";import g from"./ExampleComponentWrapper.js";import y from"../ai-reasoning/AiReasoningCitationContent.js";import h from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as v}from"../../store/markdown-context.js";import f from"@mui/material/Dialog";import C from"@mui/material/IconButton";import S from"./DeleteSegmentsDialog.js";import x from"@mui/material/Tooltip";import b from"./EditSegmentDialog.js";const I=({id:I="Segment",label:E,children:w,segmentUUID:D,decisionStrength:N=80,aiReason:k,customStyles:j,customIcons:B,aiReasoningCitationCustomStyles:$,segmentExampleComponent:z,handleViewGlossary:L,isUpdatedSegment:W,onOpen:A,onDelete:R,onEdit:U,customDeleteStyles:M,customDeleteIcons:T,enabledSegmentActions:G})=>{var V,F;const{citationsMetadata:H,updateCitationsMetadata:K}=o(v),[O,q]=l.useState(!1),[J,P]=l.useState(!1),[Q,X]=l.useState(!1),[Y,Z]=l.useState(""),[_,ee]=l.useState(!1),{prefix:te,inner:ne}=i(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=E?E:""),[E]);l.useEffect(()=>{Q||Z(ne)},[Q,ne]);const le=async()=>{if(U){const e=Y.toLowerCase();await U(e)}X(!1),ee(!1)},oe=()=>X(!1),ie=(null==T?void 0:T.editIcon)||e(a,{size:14}),ae=(null==T?void 0:T.checkIcon)||e(s,{size:16,color:"#16A34A"}),se=(null==T?void 0:T.crossIcon)||e(r,{size:16,color:"#DC2626"}),re=i(()=>H.get(D),[H,D]),de=i(()=>(null==re?void 0:re.open)||!1,[re]),ce=i(()=>re&&"loading"===re.state,[re]),me=async()=>{const e=!de;if(q(!1),console.log("citation metadata::",e,k),e&&!(null==k?void 0:k.reason)){K(D,t=>{if(t){const e={...t};return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),await(null==A?void 0:A())}finally{K(D,t=>{if(t){const n={...t};return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),K(D,t=>{if(t){const n={...t};return n.open=e,n}return{open:e,state:ce?"loading":"ready"}})};return t("div",{className:`segment-wrapper-${I} ${p.segmentWrapper}`,style:{...null==j?void 0:j.segmentWrapper,display:"inline-flex",verticalAlign:"middle"},children:[t("div",{className:`segment-${I}-container segmentContainer ${W?"updatedSegmentContainer":""}`,style:{...null==j?void 0:j.container},children:[e("span",{className:`segment-${I} segmentLabel ${W?"updatedSegmentLabel":""}`,style:{...null==j?void 0:j.label},children:W?w:E}),e("button",{className:`${p.segmentExplanationButtonContainer}`,style:{...null==j?void 0:j.buttonContainer},onClick:me,children:e(d,{className:m(W&&p.updatedChevronIcon,p.cheveronIcon),style:{...null==j?void 0:j.cheveronIcon}})})]}),de&&e(f,{open:!0,onClose:me,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root"),children:t("div",{style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[t("div",Q?{style:{display:"flex",alignItems:"center",gap:"8px"},children:[te&&e("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==j?void 0:j.label},children:te}),t("div",{className:p.editInputWrapper,style:null==j?void 0:j.editInputWrapper,children:[e("input",{value:Y,onChange:e=>Z(e.target.value),className:p.editInput,style:{...null==j?void 0:j.editInput,color:(null===(V=null==j?void 0:j.label)||void 0===V?void 0:V.color)?String(j.label.color):"#3B82F6",textTransform:"uppercase"},autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&le(),"Escape"===e.key&&oe()}}),e(C,{onClick:()=>{Y!==ne?(K(D,e=>e?{...e,open:!1}:{open:!1,state:ce?"loading":"ready"}),ee(!0)):X(!1)},size:"small",style:null==j?void 0:j.editCheckIcon,children:ae}),e(C,{onClick:oe,size:"small",style:null==j?void 0:j.editCrossIcon,children:se})]})]}:{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==j?void 0:j.label},children:null!=E?E:"SEGMENT NAME"}),(null==G?void 0:G.includes("edit"))&&e(x,{title:"Edit segment",placement:"top",arrow:!0,children:e("button",{onClick:()=>X(!0),className:p.headerEditButton,style:null==j?void 0:j.editIconButton,children:ie})})]}),t("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexShrink:0,...null==j?void 0:j.headerActionsContainer},children:[(null==G?void 0:G.includes("delete"))&&e(x,{title:"Delete segment",placement:"top",arrow:!0,children:t("button",{onClick:()=>{q(!1),P(!0),K(D,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:ce?"loading":"ready"}})},className:u.headerDeleteButton,children:[e(c,{size:14}),"Delete"]})}),e(C,{"aria-label":"close",onClick:me,sx:e=>({padding:"4px",color:e.palette.grey[500]}),children:e(r,{size:20})})]})]}),ce?e(h,{customStyles:null==j?void 0:j.loadingSkeleton}):t(n,{children:[O&&!W&&e("div",{style:{marginBottom:16},children:e(g,{label:null!=E?E:"",segmentExampleComponent:z,customStyles:{...null==j?void 0:j.segmentExample,exampleContainer:{...null===(F=null==j?void 0:j.segmentExample)||void 0===F?void 0:F.exampleContainer,width:"100%"}},handleCancelExample:()=>{q(!1)}})}),W&&e("div",{style:{marginBottom:16},children:e("div",{className:`segment-${I}-container segmentContainer updatedSegmentContainer`,style:{...null==j?void 0:j.container},children:e("span",{className:`segment-${I} segmentLabel updatedSegmentLabel`,style:{...null==j?void 0:j.label},children:w})})}),e("div",{children:e(y,{aiReason:k,customStyles:{...$,aiReasoningContent:{...null==$?void 0:$.aiReasoningContent,headerBar:{width:"auto"}},aiReasoningAccordion:{header:{width:"auto"}}},customIcons:B,isSegmentExplanation:!0,handleViewGlossary:L?()=>{K(D,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:ce?"loading":"ready"}}),null==L||L(I)}:void 0,handleViewExample:z?()=>{q(!0)}:void 0,isUpdatedSegment:W})})]})]})}),e(S,{open:J,onHide:()=>{P(!1)},customDeleteStyles:M,customDeleteIcons:T,onDelete:async e=>{await(null==R?void 0:R(e))}}),e(b,{open:_,onHide:()=>{ee(!1),X(!1)},customStyles:M,customIcons:T,onConfirm:le})]})};export{I as default};
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{useContext as l,useMemo as i}from"react";import{Pencil as a,Check as s,X as r,ArrowUpRight as d,Trash2 as m}from"lucide-react";import{cn as c}from"../../../UserStoryImport/lib/cn.js";import p from"./segment.module.css.js";import u from"./deleteSegmentDialog.module.css.js";import g from"./ExampleComponentWrapper.js";import y from"../ai-reasoning/AiReasoningCitationContent.js";import v from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as h}from"../../store/markdown-context.js";import f from"@mui/material/Dialog";import C from"@mui/material/IconButton";import S from"./DeleteSegmentsDialog.js";import x from"@mui/material/Tooltip";import b from"./EditSegmentDialog.js";const I=({id:I="Segment",label:E,children:w,segmentUUID:D,decisionStrength:N=80,aiReason:k,customStyles:j,customIcons:B,aiReasoningCitationCustomStyles:L,segmentExampleComponent:$,handleViewGlossary:z,isUpdatedSegment:W,onOpen:A,onDelete:R,onEdit:U,customDeleteStyles:M,customDeleteIcons:T,enabledSegmentActions:G,segmentDataList:V,onShowNotification:F})=>{var H,K;const{citationsMetadata:O,updateCitationsMetadata:_}=l(h),[q,J]=o.useState(!1),[P,Q]=o.useState(!1),[X,Y]=o.useState(!1),[Z,ee]=o.useState(""),[te,ne]=o.useState(!1),{prefix:oe,inner:le}=i(()=>(e=>{const t=e.match(/^(.*?)\s*\{([^}]+)\}\s*$/);return!t||t.length<3?{prefix:"",inner:e}:{prefix:t[1].trim(),inner:t[2].trim()}})(null!=E?E:""),[E]);o.useEffect(()=>{X||ee(le)},[X,le]);const ie=async()=>{if(U){const e=Z.toLowerCase();_(D,e=>e?{...e,open:!1}:{open:!1,state:pe?"loading":"ready"}),await U(e)}Y(!1),ne(!1)},ae=()=>Y(!1),se=(null==T?void 0:T.editIcon)||e(a,{size:14}),re=(null==T?void 0:T.checkIcon)||e(s,{size:16,color:"#16A34A"}),de=(null==T?void 0:T.crossIcon)||e(r,{size:16,color:"#DC2626"}),me=i(()=>O.get(D),[O,D]),ce=i(()=>(null==me?void 0:me.open)||!1,[me]),pe=i(()=>me&&"loading"===me.state,[me]),ue=async()=>{const e=!ce;if(J(!1),console.log("citation metadata::",e,k),e&&!(null==k?void 0:k.reason)){_(D,t=>{if(t){const e={...t};return e.state="loading",e}return{open:e,state:"loading"}});try{console.log("citation metadata:: onopen"),await(null==A?void 0:A())}finally{_(D,t=>{if(t){const n={...t};return n.state="ready",n.open=e,n}return{open:e,state:"ready"}})}}else console.log("citation metadata:: else block"),_(D,t=>{if(t){const n={...t};return n.open=e,n}return{open:e,state:pe?"loading":"ready"}})};return t("div",{className:`segment-wrapper-${I} ${p.segmentWrapper}`,style:{...null==j?void 0:j.segmentWrapper,display:"inline-flex",verticalAlign:"middle"},children:[t("div",{className:`segment-${I}-container segmentContainer ${W?"updatedSegmentContainer":""}`,style:{...null==j?void 0:j.container},children:[e("span",{className:`segment-${I} segmentLabel ${W?"updatedSegmentLabel":""}`,style:{...null==j?void 0:j.label},children:W?w:E}),e("button",{className:`${p.segmentExplanationButtonContainer}`,style:{...null==j?void 0:j.buttonContainer},onClick:ue,children:e(d,{className:c(W&&p.updatedChevronIcon,p.cheveronIcon),style:{...null==j?void 0:j.cheveronIcon}})})]}),ce&&e(f,{open:!0,onClose:ue,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root"),children:t("div",{style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[t("div",X?{style:{display:"flex",alignItems:"center",gap:"8px"},children:[oe&&e("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==j?void 0:j.label},children:oe}),t("div",{className:p.editInputWrapper,style:null==j?void 0:j.editInputWrapper,children:[e("input",{value:Z,onChange:e=>ee(e.target.value),className:p.editInput,style:{...null==j?void 0:j.editInput,color:(null===(H=null==j?void 0:j.label)||void 0===H?void 0:H.color)?String(j.label.color):"#3B82F6",textTransform:"uppercase"},autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&ie(),"Escape"===e.key&&ae()}}),e(C,{onClick:()=>{if(Z===le||""===Z.trim())return void Y(!1);const e=Z.toLowerCase().trim();if(null==V?void 0:V.some(t=>t.segment_name.toLowerCase().trim()===e))return null==F||F("error","Error","Segment name already exists!"),_(D,e=>e?{...e,open:!1}:{open:!1,state:pe?"loading":"ready"}),void Y(!1);ne(!0)},size:"small",style:null==j?void 0:j.editCheckIcon,children:re}),e(C,{onClick:ae,size:"small",style:null==j?void 0:j.editCrossIcon,children:de})]})]}:{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e("span",{className:"segmentLabel",style:{fontSize:18,fontWeight:600,...null==j?void 0:j.label},children:null!=E?E:"SEGMENT NAME"}),(null==G?void 0:G.includes("edit"))&&e(x,{title:"Edit segment",placement:"top",arrow:!0,children:e("button",{onClick:()=>Y(!0),className:p.headerEditButton,style:null==j?void 0:j.editIconButton,children:se})})]}),t("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexShrink:0,...null==j?void 0:j.headerActionsContainer},children:[(null==G?void 0:G.includes("delete"))&&e(x,{title:"Delete segment",placement:"top",arrow:!0,children:t("button",{onClick:()=>{J(!1),Q(!0),_(D,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:pe?"loading":"ready"}})},className:u.headerDeleteButton,children:[e(m,{size:14}),"Delete"]})}),e(C,{"aria-label":"close",onClick:ue,sx:e=>({padding:"4px",color:e.palette.grey[500]}),children:e(r,{size:20})})]})]}),pe?e(v,{customStyles:null==j?void 0:j.loadingSkeleton}):t(n,{children:[q&&!W&&e("div",{style:{marginBottom:16},children:e(g,{label:null!=E?E:"",segmentExampleComponent:$,customStyles:{...null==j?void 0:j.segmentExample,exampleContainer:{...null===(K=null==j?void 0:j.segmentExample)||void 0===K?void 0:K.exampleContainer,width:"100%"}},handleCancelExample:()=>{J(!1)}})}),W&&e("div",{style:{marginBottom:16},children:e("div",{className:`segment-${I}-container segmentContainer updatedSegmentContainer`,style:{...null==j?void 0:j.container},children:e("span",{className:`segment-${I} segmentLabel updatedSegmentLabel`,style:{...null==j?void 0:j.label},children:w})})}),e("div",{children:e(y,{aiReason:k,customStyles:{...L,aiReasoningContent:{...null==L?void 0:L.aiReasoningContent,headerBar:{width:"auto"}},aiReasoningAccordion:{header:{width:"auto"}}},customIcons:B,isSegmentExplanation:!0,handleViewGlossary:z?()=>{_(D,e=>{if(e){const t={...e};return t.open=!1,t}return{open:!1,state:pe?"loading":"ready"}}),null==z||z(I)}:void 0,handleViewExample:$?()=>{J(!0)}:void 0,isUpdatedSegment:W})})]})]})}),e(S,{open:P,onHide:()=>{Q(!1)},customDeleteStyles:M,customDeleteIcons:T,onDelete:async e=>{await(null==R?void 0:R(e))}}),e(b,{open:te,onHide:()=>{ne(!1),Y(!1)},customStyles:M,customIcons:T,onConfirm:ie})]})};export{I as default};
2
2
  //# sourceMappingURL=Segment.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import n from"./Segment.js";import t from"dompurify";const o=({id:o,children:l,props:i,segmentComponentConfig:d,customStyles:s,customIcons:a,extractText:u,isUpdatedSegment:r=!1,blockId:v,customDeleteStyles:m,customDeleteIcons:g})=>{var c,p,S,h,I,C,y,D,b,f,x,_,E,U,W,k,A,F,L;const w=(null==i?void 0:i.id)||"Segment",R=(null==i?void 0:i.decisionstrength)||"80",{segmentDataList:j,getSegmentExampleComponent:B,handleViewGlossary:G,upadatedSegmentDataList:O,handleFetchUpdatedSegmentDetails:T,handleFetchSegmentDetails:V,handleDeleteSegment:z,handleEditSegment:H,enabledSegmentActions:M}=d||{},q=r?null==O?void 0:O.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==w?void 0:w.split("-"))||void 0===n?void 0:n[0])}):null==j?void 0:j.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==w?void 0:w.split("-"))||void 0===n?void 0:n[0])}),J={id:w,reason:null!==(c=null==q?void 0:q.reason)&&void 0!==c?c:"",gap:null!==(p=null==q?void 0:q.gap)&&void 0!==p?p:"",explanation:null!==(S=null==q?void 0:q.explanation)&&void 0!==S?S:"",relevance_score:null!==(h=null==q?void 0:q.relevance_score)&&void 0!==h?h:0,isOpen:!1};let K;const N=u(l),P=i["data-table"];let Q="";if(P&&!r)try{Q=decodeURIComponent(atob(P))}catch(e){console.error("Failed to decode data-table for segment",w,e)}const X=t.sanitize(Q),Y=()=>e("div",{dangerouslySetInnerHTML:{__html:X}});return q||!V||r||null==V||V(w),w&&q&&B&&!r&&(K=P?e(Y,{}):B(w,N,q.segment_type)),e(n,{id:w,segmentUUID:o,label:null!==(I=null==q?void 0:q.label)&&void 0!==I?I:null==q?void 0:q.segment_name,decisionStrength:R,aiReason:J,customIcons:a,aiReasoningCitationCustomStyles:s,segmentExampleComponent:K,handleViewGlossary:G,customStyles:{segmentWrapper:null===(C=null==s?void 0:s.segment)||void 0===C?void 0:C.segmentWrapper,container:null===(y=null==s?void 0:s.segment)||void 0===y?void 0:y.container,label:null===(D=null==s?void 0:s.segment)||void 0===D?void 0:D.label,decisionStrength:null===(b=null==s?void 0:s.segment)||void 0===b?void 0:b.decisionStrength,buttonContainer:null===(f=null==s?void 0:s.segment)||void 0===f?void 0:f.buttonContainer,cheveronIcon:null===(x=null==s?void 0:s.segment)||void 0===x?void 0:x.cheveronIcon,segmentExample:null===(_=null==s?void 0:s.segment)||void 0===_?void 0:_.segmentExample,loadingSkeleton:null===(E=null==s?void 0:s.segment)||void 0===E?void 0:E.SegmentLoadingSkeletonStyles,editInputWrapper:null===(U=null==s?void 0:s.segment)||void 0===U?void 0:U.editInputWrapper,editInput:null===(W=null==s?void 0:s.segment)||void 0===W?void 0:W.editInput,editCheckIcon:null===(k=null==s?void 0:s.segment)||void 0===k?void 0:k.editCheckIcon,editCrossIcon:null===(A=null==s?void 0:s.segment)||void 0===A?void 0:A.editCrossIcon,headerActionsContainer:null===(F=null==s?void 0:s.segment)||void 0===F?void 0:F.headerActionsContainer,editIconButton:null===(L=null==s?void 0:s.segment)||void 0===L?void 0:L.editIconButton},isUpdatedSegment:r,onOpen:async()=>{!q&&r&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),await(null==T?void 0:T(w)))},onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,{...q,segment_uuid:w},v),q)return null==z?void 0:z(e,{...q,segment_uuid:w},v)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",q,e),q&&H)return null==H?void 0:H(q,e)},customDeleteStyles:m,customDeleteIcons:g,enabledSegmentActions:M,children:l},w)};export{o as default};
1
+ import{jsx as e}from"react/jsx-runtime";import n from"./Segment.js";import t from"dompurify";const o=({id:o,children:l,props:i,segmentComponentConfig:d,customStyles:s,customIcons:a,extractText:u,isUpdatedSegment:m=!1,blockId:r,customDeleteStyles:v,customDeleteIcons:g})=>{var c,p,S,h,I,C,f,D,y,b,x,_,E,U,W,k,w,L,A;const F=(null==i?void 0:i.id)||"Segment",R=(null==i?void 0:i.decisionstrength)||"80",{segmentDataList:j,getSegmentExampleComponent:B,handleViewGlossary:G,upadatedSegmentDataList:N,handleFetchUpdatedSegmentDetails:O,handleFetchSegmentDetails:T,handleDeleteSegment:V,handleEditSegment:z,enabledSegmentActions:H,onShowNotification:M}=d||{},q=m?null==N?void 0:N.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==F?void 0:F.split("-"))||void 0===n?void 0:n[0])}):null==j?void 0:j.find(e=>{var n;return String(e.segment_id)===String(null===(n=null==F?void 0:F.split("-"))||void 0===n?void 0:n[0])}),J={id:F,reason:null!==(c=null==q?void 0:q.reason)&&void 0!==c?c:"",gap:null!==(p=null==q?void 0:q.gap)&&void 0!==p?p:"",explanation:null!==(S=null==q?void 0:q.explanation)&&void 0!==S?S:"",relevance_score:null!==(h=null==q?void 0:q.relevance_score)&&void 0!==h?h:0,isOpen:!1};let K;const P=u(l),Q=i["data-table"];let X="";if(Q&&!m)try{X=decodeURIComponent(atob(Q))}catch(e){console.error("Failed to decode data-table for segment",F,e)}const Y=t.sanitize(X),Z=()=>e("div",{dangerouslySetInnerHTML:{__html:Y}});return q||!T||m||null==T||T(F),F&&q&&B&&!m&&(K=Q?e(Z,{}):B(F,P,q.segment_type)),e(n,{id:F,segmentUUID:o,label:null!==(I=null==q?void 0:q.label)&&void 0!==I?I:null==q?void 0:q.segment_name,decisionStrength:R,aiReason:J,customIcons:a,aiReasoningCitationCustomStyles:s,segmentExampleComponent:K,handleViewGlossary:G,customStyles:{segmentWrapper:null===(C=null==s?void 0:s.segment)||void 0===C?void 0:C.segmentWrapper,container:null===(f=null==s?void 0:s.segment)||void 0===f?void 0:f.container,label:null===(D=null==s?void 0:s.segment)||void 0===D?void 0:D.label,decisionStrength:null===(y=null==s?void 0:s.segment)||void 0===y?void 0:y.decisionStrength,buttonContainer:null===(b=null==s?void 0:s.segment)||void 0===b?void 0:b.buttonContainer,cheveronIcon:null===(x=null==s?void 0:s.segment)||void 0===x?void 0:x.cheveronIcon,segmentExample:null===(_=null==s?void 0:s.segment)||void 0===_?void 0:_.segmentExample,loadingSkeleton:null===(E=null==s?void 0:s.segment)||void 0===E?void 0:E.SegmentLoadingSkeletonStyles,editInputWrapper:null===(U=null==s?void 0:s.segment)||void 0===U?void 0:U.editInputWrapper,editInput:null===(W=null==s?void 0:s.segment)||void 0===W?void 0:W.editInput,editCheckIcon:null===(k=null==s?void 0:s.segment)||void 0===k?void 0:k.editCheckIcon,editCrossIcon:null===(w=null==s?void 0:s.segment)||void 0===w?void 0:w.editCrossIcon,headerActionsContainer:null===(L=null==s?void 0:s.segment)||void 0===L?void 0:L.headerActionsContainer,editIconButton:null===(A=null==s?void 0:s.segment)||void 0===A?void 0:A.editIconButton},isUpdatedSegment:m,onOpen:async()=>{!q&&m&&(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),await(null==O?void 0:O(F)))},onDelete:e=>{if(console.log("SegmentWrapper: onDelete",e,{...q,segment_uuid:F},r),q)return null==V?void 0:V(e,{...q,segment_uuid:F},r)},onEdit:e=>{if(console.log("SegmentWrapper: onEdit",q,e),q&&z)return null==z?void 0:z(q,e)},customDeleteStyles:v,customDeleteIcons:g,enabledSegmentActions:H,segmentDataList:j,onShowNotification:(e,n,t)=>{M&&M(e,n,t)},children:l},F)};export{o as default};
2
2
  //# sourceMappingURL=SegmentWrapper.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#d633840d;border-radius:.3rem;box-sizing:border-box;color:#d63384;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#f0f2f5;border-radius:.3rem;box-sizing:border-box;color:#323232;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=UserStoryWithCitation.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AA8DA,UAAU,eAAe;IACvB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAG,IAAI,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,OAAO,CAAC;CAC7B;AAKD,QAAA,MAAM,cAAc,kHAoTlB,CAAC;AAIH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AA8DA,UAAU,eAAe;IACvB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAG,IAAI,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,OAAO,CAAC;CAC7B;AAKD,QAAA,MAAM,cAAc,kHA+TlB,CAAC;AAIH,eAAe,cAAc,CAAC"}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { AiReasoningCustomStyles, SegmentStyles, TAIReasoning, UserStoryIcons, DeleteDialogIcons } from '../../types/aiReasoning.type';
3
3
  import './segment-common.css';
4
4
  import { DeleteScope } from './DeleteSegmentsDialog';
5
- import { TSegmentComponentConfig } from '../../types/segment.type';
5
+ import { TSegment, TSegmentComponentConfig } from '../../types/segment.type';
6
6
  interface SegmentProps {
7
7
  id?: string;
8
8
  label?: string;
@@ -21,6 +21,8 @@ interface SegmentProps {
21
21
  customDeleteStyles?: SegmentStyles;
22
22
  customDeleteIcons?: DeleteDialogIcons;
23
23
  enabledSegmentActions?: TSegmentComponentConfig["enabledSegmentActions"];
24
+ segmentDataList?: TSegment[];
25
+ onShowNotification?: (type: 'error' | 'success' | 'info', title: string, message: string) => void;
24
26
  }
25
27
  declare const Segment: React.FC<SegmentProps>;
26
28
  export default Segment;
@@ -1 +1 @@
1
- {"version":3,"file":"Segment.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/Segment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAQvI,OAAO,sBAAsB,CAAA;AAI7B,OAA4B,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,UAAU,YAAY;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAC,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,+BAA+B,CAAC,EAAE,uBAAuB,CAAC;IAC1D,uBAAuB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtC,kBAAkB,CAAC,EAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAC,OAAO,CAAA;IACzB,MAAM,CAAC,EAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,qBAAqB,CAAC,EAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;CAE1E;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwcnC,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"Segment.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/Segment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAQvI,OAAO,sBAAsB,CAAA;AAI7B,OAA4B,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,UAAU,YAAY;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAC,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,+BAA+B,CAAC,EAAE,uBAAuB,CAAC;IAC1D,uBAAuB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtC,kBAAkB,CAAC,EAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAC,OAAO,CAAA;IACzB,MAAM,CAAC,EAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,qBAAqB,CAAC,EAAC,uBAAuB,CAAC,uBAAuB,CAAC,CAAA;IACvE,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrG;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAydnC,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/SegmentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,EAAY,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAgB,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAI9F,UAAU,mBAAmB;IACzB,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;IACX,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;IACjD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC;IAC/C,gBAAgB,CAAC,EAAC,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAGD,QAAA,MAAM,cAAc,8JAYjB,mBAAmB,4CA4GrB,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"SegmentWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/segment/SegmentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,EAAY,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAgB,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAI9F,UAAU,mBAAmB;IACzB,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;IACX,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;IACjD,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC;IAC/C,gBAAgB,CAAC,EAAC,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAGD,QAAA,MAAM,cAAc,8JAYjB,mBAAmB,4CAkHrB,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -26,5 +26,6 @@ export type TSegmentComponentConfig = {
26
26
  handleDeleteSegment?: (scope: DeleteScope, segment: TUniqueSegment, blockId?: string) => Promise<void>;
27
27
  handleEditSegment?: (segment: TSegment, newLabel: string) => Promise<void>;
28
28
  enabledSegmentActions?: TSegmentActions[];
29
+ onShowNotification?: (type: 'error' | 'success' | 'info', title: string, message: string) => void;
29
30
  };
30
31
  //# sourceMappingURL=segment.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"segment.type.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/types/segment.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAC,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,uBAAuB,GAAG;IAClC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,uBAAuB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,yBAAyB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,gCAAgC,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,KAAK,GAAG,CAAC,OAAO,CAAC;IAClH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,qBAAqB,CAAC,EAAC,eAAe,EAAE,CAAA;CAC3C,CAAA"}
1
+ {"version":3,"file":"segment.type.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/types/segment.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAC,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,uBAAuB,GAAG;IAClC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,uBAAuB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,yBAAyB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,gCAAgC,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,KAAK,GAAG,CAAC,OAAO,CAAC;IAClH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,qBAAqB,CAAC,EAAC,eAAe,EAAE,CAAA;IACxC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrG,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.239",
3
+ "version": "0.0.241",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",