@e-llm-studio/requirement-ai 0.0.165 → 0.0.166

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("tslib"),t=function(t){function r(e){return t.call(this,e)||this}return e.__extends(r,t),r.getType=function(){return"delete"},r.clone=function(e){return new r(e.__key)},r.prototype.createDOM=function(){var e=document.createElement("del");return e.style.textDecoration="line-through",e.style.textDecorationColor="#dc2626",e.style.textDecorationThickness="2px",e.contentEditable="false",e},r.prototype.updateDOM=function(){return!1},r.importDOM=function(){return{del:function(){return{conversion:n,priority:1}}}},r.prototype.exportDOM=function(){var e=document.createElement("del");return e.style.color="#dc2626",e.style.textDecoration="line-through",e.style.textDecorationColor="#dc2626",e.style.textDecorationThickness="2px",{element:e}},r.importJSON=function(){return new r},r.prototype.exportJSON=function(){return e.__assign(e.__assign({},t.prototype.exportJSON.call(this)),{type:"delete",version:1})},r.prototype.isInline=function(){return!0},r.prototype.canBeEmpty=function(){return!1},r.prototype.canInsertTextBefore=function(){return!1},r.prototype.canInsertTextAfter=function(){return!1},r.prototype.canMergeWith=function(){return!1},r}(require("lexical").ElementNode);function n(){return{node:new t}}exports.DeleteNode=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=function(t){function n(e,r){void 0===e&&(e=crypto.randomUUID());var n=t.call(this,r)||this;return n.__reviewId=e,n}return e.__extends(n,t),n.getType=function(){return"delete"},n.clone=function(e){return new n(e.__reviewId,e.__key)},n.prototype.createDOM=function(){var e=document.createElement("del");return e.setAttribute("data-review-id",this.__reviewId),e.style.textDecoration="line-through",e.style.textDecorationColor="#dc2626",e.style.textDecorationThickness="2px",e.contentEditable="false",e},n.prototype.updateDOM=function(){return!1},n.importDOM=function(){return{del:function(){return{conversion:r,priority:1}}}},n.prototype.exportDOM=function(){var e=document.createElement("del");return e.setAttribute("data-review-id",this.__reviewId),e.style.color="#dc2626",e.style.textDecoration="line-through",e.style.textDecorationColor="#dc2626",e.style.textDecorationThickness="2px",{element:e}},n.importJSON=function(e){return new n(e.reviewId)},n.prototype.exportJSON=function(){return e.__assign(e.__assign({},t.prototype.exportJSON.call(this)),{type:"delete",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n.prototype.canBeEmpty=function(){return!1},n.prototype.canInsertTextBefore=function(){return!1},n.prototype.canInsertTextAfter=function(){return!1},n.prototype.canMergeWith=function(){return!1},n}(require("lexical").ElementNode);function r(e){var r=e.getAttribute("data-review-id")||crypto.randomUUID();return{node:new t(r)}}exports.DeleteNode=t;
2
2
  //# sourceMappingURL=DeleteNode.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=function(t){function n(e,r,n){void 0===e&&(e=""),void 0===r&&(r=crypto.randomUUID());var o=t.call(this,e,n)||this;return o.__reviewId=r,o}return e.__extends(n,t),n.getType=function(){return"insert"},n.clone=function(e){return new n(e.__text,e.__reviewId,e.__key)},n.prototype.createDOM=function(e){var r=t.prototype.createDOM.call(this,e),n=document.createElement("ins");return n.setAttribute("data-review-id",this.__reviewId),n.style.backgroundColor="#dbeafe",n.style.color="#1e3a8a",n.style.textDecoration="none",n.style.padding="1px 2px",n.style.borderRadius="2px",n.appendChild(r),n},n.prototype.updateDOM=function(){return!1},n.importDOM=function(){return{ins:function(){return{conversion:r,priority:1}}}},n.prototype.exportDOM=function(){var e=document.createElement("ins");return e.setAttribute("data-review-id",this.__reviewId),e.style.backgroundColor="#dbeafe",e.style.color="#1e3a8a",e.style.textDecoration="none",e.style.padding="1px 2px",e.style.borderRadius="2px",e.textContent=this.getTextContent(),{element:e}},n.importJSON=function(e){var t=new n(e.text,e.reviewId);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t},n.prototype.exportJSON=function(){return e.__assign(e.__assign({},t.prototype.exportJSON.call(this)),{type:"insert",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n.prototype.canInsertTextBefore=function(){return!0},n.prototype.canInsertTextAfter=function(){return!0},n}(require("lexical").TextNode);function r(e){var r=e.getAttribute("data-review-id")||crypto.randomUUID();return{node:new t(e.textContent||"",r)}}exports.InsertNode=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=function(t){function n(e,r){void 0===e&&(e=crypto.randomUUID());var n=t.call(this,r)||this;return n.__reviewId=e,n}return e.__extends(n,t),n.getType=function(){return"insert"},n.clone=function(e){return new n(e.__reviewId,e.__key)},n.prototype.createDOM=function(e){var t=document.createElement("ins");return t.setAttribute("data-review-id",this.__reviewId),t.style.backgroundColor="#dbeafe",t.style.color="#1e3a8a",t.style.textDecoration="none",t.style.padding="1px 2px",t.style.borderRadius="2px",t},n.prototype.updateDOM=function(e,t,r){return e.__reviewId!==this.__reviewId},n.importDOM=function(){return{ins:function(){return{conversion:r,priority:1}}}},n.prototype.exportDOM=function(e){var t=document.createElement("ins");return t.setAttribute("data-review-id",this.__reviewId),t.style.backgroundColor="#dbeafe",t.style.color="#1e3a8a",t.style.textDecoration="none",t.style.padding="1px 2px",t.style.borderRadius="2px",{element:t}},n.importJSON=function(e){var t=new n(e.reviewId);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t},n.prototype.exportJSON=function(){return e.__assign(e.__assign({},t.prototype.exportJSON.call(this)),{type:"insert",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n}(require("lexical").ElementNode);function r(e){var r=e.getAttribute("data-review-id")||crypto.randomUUID();return{node:new t(r)}}exports.InsertNode=t;
2
2
  //# sourceMappingURL=InsertNode.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),l=require("../../utils/user-story.utils.js"),s=require("../userstory-with-citation/UserStoryWithCitation.js"),a=require("./PartialRequirementContent.module.css.js"),o=require("@mui/material"),r=require("../RequirementAIWrapper/RequirementAIWrapper.js"),d=require("../RichTextEditor/RichTextEditor.js"),u=function(u){var v,c,m,g,_,y,C,f,p,q,S,j,h,x,R,P,w,B,b=u.loadingPartialRequirements,N=u.localUserStory,A=u.setLocalUserStory,k=u.onCraFlowDiffAgentAction,E=u.disableEditing,D=u.isCraflow,T=void 0===D||D,U=u.onCraAccept,W=u.onCraReject,F=i.useState(!1),I=F[0],M=F[1],z=i.useState(""),L=z[0],H=z[1],O=r.useRequirementAI(),V=O.customStyles,X=O.segmentComponentConfig;i.useEffect(function(){E&&M(!1)},[E]),i.useEffect(function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value)},[N]);if(b)return t.jsx("div",e.__assign({className:a.default.skeletonWrapper,style:null===(v=null==V?void 0:V.PartialRequirementContentStyles)||void 0===v?void 0:v.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t.jsx("div",{className:a.default.skeletonLine,style:null===(i=null==V?void 0:V.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var G=!L||""===L.trim();return t.jsxs("div",e.__assign({className:a.default.wrapper,style:null===(c=null==V?void 0:V.PartialRequirementContentStyles)||void 0===c?void 0:c.wrapper},{children:[t.jsx("div",e.__assign({className:a.default.actionBar,style:null===(m=null==V?void 0:V.PartialRequirementContentStyles)||void 0===m?void 0:m.actionBar},{children:I?t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({className:a.default.editingBadge,style:null===(C=null==V?void 0:V.PartialRequirementContentStyles)||void 0===C?void 0:C.editingBadge},{children:[t.jsx("span",{className:a.default.editingDot,style:null===(f=null==V?void 0:V.PartialRequirementContentStyles)||void 0===f?void 0:f.editingDot}),"Editing"]})),t.jsx("div",{className:a.default.btnDivider,style:null===(p=null==V?void 0:V.PartialRequirementContentStyles)||void 0===p?void 0:p.btnDivider}),t.jsx(o.Tooltip,e.__assign({title:G?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e.__assign({},null===(q=null==V?void 0:V.PartialRequirementContentStyles)||void 0===q?void 0:q.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:a.default.saveBtn,style:e.__assign(e.__assign(e.__assign({},null===(S=null==V?void 0:V.PartialRequirementContentStyles)||void 0===S?void 0:S.actionBtn),null===(j=null==V?void 0:V.PartialRequirementContentStyles)||void 0===j?void 0:j.saveBtn),{opacity:G?.5:1,cursor:G?"not-allowed":"pointer"}),onClick:function(){G||(A(function(t){var i=e.__assign(e.__assign({},t[0]),{value:L});return null==k||k("accept",[i]),[i]}),M(!1))},disabled:G},{children:t.jsx(n.Save,{size:16})}))})})),t.jsx("button",e.__assign({className:a.default.cancelBtn,style:e.__assign(e.__assign({},null===(h=null==V?void 0:V.PartialRequirementContentStyles)||void 0===h?void 0:h.actionBtn),null===(x=null==V?void 0:V.PartialRequirementContentStyles)||void 0===x?void 0:x.cancelBtn),onClick:function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value),M(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t.jsx(n.X,{size:16})}))]}):t.jsx(o.Tooltip,e.__assign({title:E?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e.__assign({},null===(g=null==V?void 0:V.PartialRequirementContentStyles)||void 0===g?void 0:g.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:a.default.editBtn,style:e.__assign(e.__assign(e.__assign({},null===(_=null==V?void 0:V.PartialRequirementContentStyles)||void 0===_?void 0:_.actionBtn),null===(y=null==V?void 0:V.PartialRequirementContentStyles)||void 0===y?void 0:y.editBtn),{opacity:E?.5:1,cursor:E?"not-allowed":"pointer"}),onClick:function(){E||M(!0)},disabled:E,"aria-label":"Edit requirement"},{children:t.jsx(n.Pencil,{size:16})}))})}))})),I?t.jsx("div",e.__assign({className:a.default.editorContainer,style:null===(R=null==V?void 0:V.PartialRequirementContentStyles)||void 0===R?void 0:R.editorContainer},{children:t.jsx(d.default,{minHeight:"100%",height:"100%",type:"string",value:l.formatMarkdown((null===(P=null==N?void 0:N[0])||void 0===P?void 0:P.value)||""),handleUpdateState:function(e,t){H(t)},doNotShowBorderInViewMode:!1,mode:"edit"})})):t.jsx("div",e.__assign({className:a.default.viewContainer,style:null===(w=null==V?void 0:V.PartialRequirementContentStyles)||void 0===w?void 0:w.viewContainer},{children:t.jsx(s.default,{message:l.formatMarkdown((null===(B=null==N?void 0:N[0])||void 0===B?void 0:B.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:N,setCraUserStory:A,onCraFlowDiffAgentAction:k,displayActionButtons:!I},isCraflow:T,onCraAccept:U,onCraReject:W,customStyles:null==V?void 0:V.UserStoryWithCitationCustomStyles,segmentComponentConfig:X})}))]}))};exports.PartialRequirementContent=u,exports.default=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),l=require("../../utils/user-story.utils.js"),s=require("../userstory-with-citation/UserStoryWithCitation.js"),o=require("./PartialRequirementContent.module.css.js"),a=require("@mui/material"),r=require("../RequirementAIWrapper/RequirementAIWrapper.js"),d=require("../RichTextEditor/RichTextEditor.js"),u=function(u){var v,c,m,g,y,_,p,f,C,q,S,j,h,x,R,P,w,B,b=u.loadingPartialRequirements,N=u.localUserStory,A=u.setLocalUserStory,E=u.onCraFlowDiffAgentAction,k=u.disableEditing,U=u.isCraflow,D=void 0===U||U,T=u.onCraAccept,W=u.onCraReject,F=i.useState(!1),I=F[0],M=F[1],z=i.useState(""),L=z[0],H=z[1],O=r.useRequirementAI(),V=O.customStyles,X=O.segmentComponentConfig;i.useEffect(function(){k&&M(!1)},[k]),i.useEffect(function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value)},[N]);if(b)return t.jsx("div",e.__assign({className:o.default.skeletonWrapper,style:null===(v=null==V?void 0:V.PartialRequirementContentStyles)||void 0===v?void 0:v.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t.jsx("div",{className:o.default.skeletonLine,style:null===(i=null==V?void 0:V.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var G=!L||""===L.trim();return t.jsxs("div",e.__assign({className:o.default.wrapper,style:null===(c=null==V?void 0:V.PartialRequirementContentStyles)||void 0===c?void 0:c.wrapper},{children:[t.jsx("div",e.__assign({className:o.default.actionBar,style:null===(m=null==V?void 0:V.PartialRequirementContentStyles)||void 0===m?void 0:m.actionBar},{children:I?t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({className:o.default.editingBadge,style:null===(p=null==V?void 0:V.PartialRequirementContentStyles)||void 0===p?void 0:p.editingBadge},{children:[t.jsx("span",{className:o.default.editingDot,style:null===(f=null==V?void 0:V.PartialRequirementContentStyles)||void 0===f?void 0:f.editingDot}),"Editing"]})),t.jsx("div",{className:o.default.btnDivider,style:null===(C=null==V?void 0:V.PartialRequirementContentStyles)||void 0===C?void 0:C.btnDivider}),t.jsx(a.Tooltip,e.__assign({title:G?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e.__assign({},null===(q=null==V?void 0:V.PartialRequirementContentStyles)||void 0===q?void 0:q.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:o.default.saveBtn,style:e.__assign(e.__assign(e.__assign({},null===(S=null==V?void 0:V.PartialRequirementContentStyles)||void 0===S?void 0:S.actionBtn),null===(j=null==V?void 0:V.PartialRequirementContentStyles)||void 0===j?void 0:j.saveBtn),{opacity:G?.5:1,cursor:G?"not-allowed":"pointer"}),onClick:function(){G||(A(function(t){var i=e.__assign(e.__assign({},t[0]),{value:l.postprocessUserStoryAfterEdit(L)});return null==E||E("accept",[i]),[i]}),M(!1))},disabled:G},{children:t.jsx(n.Save,{size:16})}))})})),t.jsx("button",e.__assign({className:o.default.cancelBtn,style:e.__assign(e.__assign({},null===(h=null==V?void 0:V.PartialRequirementContentStyles)||void 0===h?void 0:h.actionBtn),null===(x=null==V?void 0:V.PartialRequirementContentStyles)||void 0===x?void 0:x.cancelBtn),onClick:function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value),M(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t.jsx(n.X,{size:16})}))]}):t.jsx(a.Tooltip,e.__assign({title:k?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e.__assign({},null===(g=null==V?void 0:V.PartialRequirementContentStyles)||void 0===g?void 0:g.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:o.default.editBtn,style:e.__assign(e.__assign(e.__assign({},null===(y=null==V?void 0:V.PartialRequirementContentStyles)||void 0===y?void 0:y.actionBtn),null===(_=null==V?void 0:V.PartialRequirementContentStyles)||void 0===_?void 0:_.editBtn),{opacity:k?.5:1,cursor:k?"not-allowed":"pointer"}),onClick:function(){k||M(!0)},disabled:k,"aria-label":"Edit requirement"},{children:t.jsx(n.Pencil,{size:16})}))})}))})),I?t.jsx("div",e.__assign({className:o.default.editorContainer,style:null===(R=null==V?void 0:V.PartialRequirementContentStyles)||void 0===R?void 0:R.editorContainer},{children:t.jsx(d.default,{minHeight:"100%",height:"100%",type:"string",value:l.preprocessUserStoryForEdit(l.formatMarkdown((null===(P=null==N?void 0:N[0])||void 0===P?void 0:P.value)||"")||""),handleUpdateState:function(e,t){H(t)},doNotShowBorderInViewMode:!1,mode:"edit"})})):t.jsx("div",e.__assign({className:o.default.viewContainer,style:null===(w=null==V?void 0:V.PartialRequirementContentStyles)||void 0===w?void 0:w.viewContainer},{children:t.jsx(s.default,{message:l.formatMarkdown((null===(B=null==N?void 0:N[0])||void 0===B?void 0:B.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:N,setCraUserStory:A,onCraFlowDiffAgentAction:E,displayActionButtons:!I},isCraflow:D,onCraAccept:T,onCraReject:W,customStyles:null==V?void 0:V.UserStoryWithCitationCustomStyles,segmentComponentConfig:X})}))]}))};exports.PartialRequirementContent=u,exports.default=u;
2
2
  //# sourceMappingURL=PartialRequirementContent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.formatMarkdown=function(r){try{return r=null==r?void 0:r.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,function(r,e){var t=e.split("."),n=" ".repeat(t.length-1);return"".concat(n).concat(e,".")})}catch(r){console.error("Error in formatMarkdown",r)}},exports.replaceTitleSection=function(r,e){try{if(r){return r.replace(/\*\*Title\*\* ?: ([\s\S]*?)\n\n\*\*Description\*\*/,"**Title** : ".concat(e,"\n\n**Description**"))}}catch(e){return console.error("Error in replaceTitleSection:",e),r}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'")};exports.formatMarkdown=function(e){try{return e=null==e?void 0:e.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,function(e,t){var r=t.split("."),c=" ".repeat(r.length-1);return"".concat(c).concat(t,".")})}catch(e){console.error("Error in formatMarkdown",e)}},exports.postprocessUserStoryAfterEdit=function(t){console.log("postprocessUserStoryAfterEdit::input",t);var r=t.replace(/<del([^>]*?)data-review-id="([^"]*)"([^>]*)>([\s\S]*?)<\/del>([\s\S]*?)<ins([^>]*?)data-review-id="([^"]*)"([^>]*)>([\s\S]*?)<\/ins>/g,function(t,r,c,o,n,a,i,s,p,l){var d=e(c);if(d!==e(s))return t;var u="".concat(r).concat(o).replace(/\s+/g," ").trim(),f="".concat(i).concat(p).replace(/\s+/g," ").trim(),g=u?"<del ".concat(u,">").concat(n,"</del>"):"<del>".concat(n,"</del>"),v=f?"<ins ".concat(f,">").concat(l,"</ins>"):"<ins>".concat(l,"</ins>");return'<upt id="'.concat(decodeURIComponent(d),'">').concat(g).concat(a).concat(v,"</upt>")});return console.log("postprocessUserStoryAfterEdit::output",r),r},exports.preprocessUserStoryForEdit=function(e){var t=e.replace(/<upt\s+id="([^"]*)">([\s\S]*?)<\/upt>/g,function(e,t,r){var c=encodeURIComponent(t);return r.replace(/<del>/,'<del id="'.concat(c,'" data-review-id="').concat(c,'">')).replace(/<ins>/,'<ins id="'.concat(c,'" data-review-id="').concat(c,'">'))});return console.log("postprocessUserStoryAfterEdit::output",t),t},exports.replaceTitleSection=function(e,t){try{if(e){return e.replace(/\*\*Title\*\* ?: ([\s\S]*?)\n\n\*\*Description\*\*/,"**Title** : ".concat(t,"\n\n**Description**"))}}catch(t){return console.error("Error in replaceTitleSection:",t),e}};
2
2
  //# sourceMappingURL=user-story.utils.js.map
@@ -1,2 +1,2 @@
1
- import{__extends as t,__assign as e}from"tslib";import{ElementNode as n}from"lexical";var r=function(n){function r(t){return n.call(this,t)||this}return t(r,n),r.getType=function(){return"delete"},r.clone=function(t){return new r(t.__key)},r.prototype.createDOM=function(){var t=document.createElement("del");return t.style.textDecoration="line-through",t.style.textDecorationColor="#dc2626",t.style.textDecorationThickness="2px",t.contentEditable="false",t},r.prototype.updateDOM=function(){return!1},r.importDOM=function(){return{del:function(){return{conversion:o,priority:1}}}},r.prototype.exportDOM=function(){var t=document.createElement("del");return t.style.color="#dc2626",t.style.textDecoration="line-through",t.style.textDecorationColor="#dc2626",t.style.textDecorationThickness="2px",{element:t}},r.importJSON=function(){return new r},r.prototype.exportJSON=function(){return e(e({},n.prototype.exportJSON.call(this)),{type:"delete",version:1})},r.prototype.isInline=function(){return!0},r.prototype.canBeEmpty=function(){return!1},r.prototype.canInsertTextBefore=function(){return!1},r.prototype.canInsertTextAfter=function(){return!1},r.prototype.canMergeWith=function(){return!1},r}(n);function o(){return{node:new r}}export{r as DeleteNode};
1
+ import{__extends as t,__assign as e}from"tslib";import{ElementNode as r}from"lexical";var n=function(r){function n(t,e){void 0===t&&(t=crypto.randomUUID());var n=r.call(this,e)||this;return n.__reviewId=t,n}return t(n,r),n.getType=function(){return"delete"},n.clone=function(t){return new n(t.__reviewId,t.__key)},n.prototype.createDOM=function(){var t=document.createElement("del");return t.setAttribute("data-review-id",this.__reviewId),t.style.textDecoration="line-through",t.style.textDecorationColor="#dc2626",t.style.textDecorationThickness="2px",t.contentEditable="false",t},n.prototype.updateDOM=function(){return!1},n.importDOM=function(){return{del:function(){return{conversion:o,priority:1}}}},n.prototype.exportDOM=function(){var t=document.createElement("del");return t.setAttribute("data-review-id",this.__reviewId),t.style.color="#dc2626",t.style.textDecoration="line-through",t.style.textDecorationColor="#dc2626",t.style.textDecorationThickness="2px",{element:t}},n.importJSON=function(t){return new n(t.reviewId)},n.prototype.exportJSON=function(){return e(e({},r.prototype.exportJSON.call(this)),{type:"delete",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n.prototype.canBeEmpty=function(){return!1},n.prototype.canInsertTextBefore=function(){return!1},n.prototype.canInsertTextAfter=function(){return!1},n.prototype.canMergeWith=function(){return!1},n}(r);function o(t){var e=t.getAttribute("data-review-id")||crypto.randomUUID();return{node:new n(e)}}export{n as DeleteNode};
2
2
  //# sourceMappingURL=DeleteNode.js.map
@@ -1,2 +1,2 @@
1
- import{__extends as t,__assign as e}from"tslib";import{TextNode as r}from"lexical";var n=function(r){function n(t,e,n){void 0===t&&(t=""),void 0===e&&(e=crypto.randomUUID());var o=r.call(this,t,n)||this;return o.__reviewId=e,o}return t(n,r),n.getType=function(){return"insert"},n.clone=function(t){return new n(t.__text,t.__reviewId,t.__key)},n.prototype.createDOM=function(t){var e=r.prototype.createDOM.call(this,t),n=document.createElement("ins");return n.setAttribute("data-review-id",this.__reviewId),n.style.backgroundColor="#dbeafe",n.style.color="#1e3a8a",n.style.textDecoration="none",n.style.padding="1px 2px",n.style.borderRadius="2px",n.appendChild(e),n},n.prototype.updateDOM=function(){return!1},n.importDOM=function(){return{ins:function(){return{conversion:o,priority:1}}}},n.prototype.exportDOM=function(){var t=document.createElement("ins");return t.setAttribute("data-review-id",this.__reviewId),t.style.backgroundColor="#dbeafe",t.style.color="#1e3a8a",t.style.textDecoration="none",t.style.padding="1px 2px",t.style.borderRadius="2px",t.textContent=this.getTextContent(),{element:t}},n.importJSON=function(t){var e=new n(t.text,t.reviewId);return e.setFormat(t.format),e.setDetail(t.detail),e.setMode(t.mode),e.setStyle(t.style),e},n.prototype.exportJSON=function(){return e(e({},r.prototype.exportJSON.call(this)),{type:"insert",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n.prototype.canInsertTextBefore=function(){return!0},n.prototype.canInsertTextAfter=function(){return!0},n}(r);function o(t){var e=t.getAttribute("data-review-id")||crypto.randomUUID();return{node:new n(t.textContent||"",e)}}export{n as InsertNode};
1
+ import{__extends as e,__assign as t}from"tslib";import{ElementNode as r}from"lexical";var n=function(r){function n(e,t){void 0===e&&(e=crypto.randomUUID());var n=r.call(this,t)||this;return n.__reviewId=e,n}return e(n,r),n.getType=function(){return"insert"},n.clone=function(e){return new n(e.__reviewId,e.__key)},n.prototype.createDOM=function(e){var t=document.createElement("ins");return t.setAttribute("data-review-id",this.__reviewId),t.style.backgroundColor="#dbeafe",t.style.color="#1e3a8a",t.style.textDecoration="none",t.style.padding="1px 2px",t.style.borderRadius="2px",t},n.prototype.updateDOM=function(e,t,r){return e.__reviewId!==this.__reviewId},n.importDOM=function(){return{ins:function(){return{conversion:o,priority:1}}}},n.prototype.exportDOM=function(e){var t=document.createElement("ins");return t.setAttribute("data-review-id",this.__reviewId),t.style.backgroundColor="#dbeafe",t.style.color="#1e3a8a",t.style.textDecoration="none",t.style.padding="1px 2px",t.style.borderRadius="2px",{element:t}},n.importJSON=function(e){var t=new n(e.reviewId);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t},n.prototype.exportJSON=function(){return t(t({},r.prototype.exportJSON.call(this)),{type:"insert",version:1,reviewId:this.__reviewId})},n.prototype.isInline=function(){return!0},n}(r);function o(e){var t=e.getAttribute("data-review-id")||crypto.randomUUID();return{node:new n(t)}}export{n as InsertNode};
2
2
  //# sourceMappingURL=InsertNode.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import{Pencil as r,Save as a,X as d}from"lucide-react";import{formatMarkdown as s}from"../../utils/user-story.utils.js";import u from"../userstory-with-citation/UserStoryWithCitation.js";import v from"./PartialRequirementContent.module.css.js";import{Tooltip as c}from"@mui/material";import{useRequirementAI as m}from"../RequirementAIWrapper/RequirementAIWrapper.js";import p from"../RichTextEditor/RichTextEditor.js";var y=function(y){var C,f,h,S,R,g,q,P,w,B,b,N,A,j,D,k,E,U,x=y.loadingPartialRequirements,W=y.localUserStory,T=y.setLocalUserStory,z=y.onCraFlowDiffAgentAction,F=y.disableEditing,I=y.isCraflow,L=void 0===I||I,H=y.onCraAccept,M=y.onCraReject,V=l(!1),G=V[0],J=V[1],K=l(""),O=K[0],Q=K[1],X=m(),Y=X.customStyles,Z=X.segmentComponentConfig;o(function(){F&&J(!1)},[F]),o(function(){var e;Q(null===(e=null==W?void 0:W[0])||void 0===e?void 0:e.value)},[W]);if(x)return t("div",e({className:v.skeletonWrapper,style:null===(C=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===C?void 0:C.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t("div",{className:v.skeletonLine,style:null===(i=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var $=!O||""===O.trim();return i("div",e({className:v.wrapper,style:null===(f=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===f?void 0:f.wrapper},{children:[t("div",e({className:v.actionBar,style:null===(h=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===h?void 0:h.actionBar},{children:G?i(n,{children:[i("span",e({className:v.editingBadge,style:null===(q=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===q?void 0:q.editingBadge},{children:[t("span",{className:v.editingDot,style:null===(P=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===P?void 0:P.editingDot}),"Editing"]})),t("div",{className:v.btnDivider,style:null===(w=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===w?void 0:w.btnDivider}),t(c,e({title:$?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e({},null===(B=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===B?void 0:B.headerTooltip)}}},{children:t("span",{children:t("button",e({className:v.saveBtn,style:e(e(e({},null===(b=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===b?void 0:b.actionBtn),null===(N=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===N?void 0:N.saveBtn),{opacity:$?.5:1,cursor:$?"not-allowed":"pointer"}),onClick:function(){$||(T(function(t){var i=e(e({},t[0]),{value:O});return null==z||z("accept",[i]),[i]}),J(!1))},disabled:$},{children:t(a,{size:16})}))})})),t("button",e({className:v.cancelBtn,style:e(e({},null===(A=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===A?void 0:A.actionBtn),null===(j=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===j?void 0:j.cancelBtn),onClick:function(){var e;Q(null===(e=null==W?void 0:W[0])||void 0===e?void 0:e.value),J(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t(d,{size:16})}))]}):t(c,e({title:F?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e({},null===(S=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===S?void 0:S.headerTooltip)}}},{children:t("span",{children:t("button",e({className:v.editBtn,style:e(e(e({},null===(R=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===R?void 0:R.actionBtn),null===(g=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===g?void 0:g.editBtn),{opacity:F?.5:1,cursor:F?"not-allowed":"pointer"}),onClick:function(){F||J(!0)},disabled:F,"aria-label":"Edit requirement"},{children:t(r,{size:16})}))})}))})),t("div",G?e({className:v.editorContainer,style:null===(D=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===D?void 0:D.editorContainer},{children:t(p,{minHeight:"100%",height:"100%",type:"string",value:s((null===(k=null==W?void 0:W[0])||void 0===k?void 0:k.value)||""),handleUpdateState:function(e,t){Q(t)},doNotShowBorderInViewMode:!1,mode:"edit"})}):e({className:v.viewContainer,style:null===(E=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===E?void 0:E.viewContainer},{children:t(u,{message:s((null===(U=null==W?void 0:W[0])||void 0===U?void 0:U.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:W,setCraUserStory:T,onCraFlowDiffAgentAction:z,displayActionButtons:!G},isCraflow:L,onCraAccept:H,onCraReject:M,customStyles:null==Y?void 0:Y.UserStoryWithCitationCustomStyles,segmentComponentConfig:Z})}))]}))};export{y as PartialRequirementContent,y as default};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import{Pencil as r,Save as a,X as d}from"lucide-react";import{preprocessUserStoryForEdit as s,formatMarkdown as u,postprocessUserStoryAfterEdit as v}from"../../utils/user-story.utils.js";import c from"../userstory-with-citation/UserStoryWithCitation.js";import m from"./PartialRequirementContent.module.css.js";import{Tooltip as p}from"@mui/material";import{useRequirementAI as y}from"../RequirementAIWrapper/RequirementAIWrapper.js";import C from"../RichTextEditor/RichTextEditor.js";var f=function(f){var h,S,R,g,q,P,w,B,b,N,A,j,D,k,E,U,x,W,T=f.loadingPartialRequirements,z=f.localUserStory,F=f.setLocalUserStory,I=f.onCraFlowDiffAgentAction,L=f.disableEditing,H=f.isCraflow,M=void 0===H||H,V=f.onCraAccept,G=f.onCraReject,J=l(!1),K=J[0],O=J[1],Q=l(""),X=Q[0],Y=Q[1],Z=y(),$=Z.customStyles,_=Z.segmentComponentConfig;o(function(){L&&O(!1)},[L]),o(function(){var e;Y(null===(e=null==z?void 0:z[0])||void 0===e?void 0:e.value)},[z]);if(T)return t("div",e({className:m.skeletonWrapper,style:null===(h=null==$?void 0:$.PartialRequirementContentStyles)||void 0===h?void 0:h.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t("div",{className:m.skeletonLine,style:null===(i=null==$?void 0:$.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var ee=!X||""===X.trim();return i("div",e({className:m.wrapper,style:null===(S=null==$?void 0:$.PartialRequirementContentStyles)||void 0===S?void 0:S.wrapper},{children:[t("div",e({className:m.actionBar,style:null===(R=null==$?void 0:$.PartialRequirementContentStyles)||void 0===R?void 0:R.actionBar},{children:K?i(n,{children:[i("span",e({className:m.editingBadge,style:null===(w=null==$?void 0:$.PartialRequirementContentStyles)||void 0===w?void 0:w.editingBadge},{children:[t("span",{className:m.editingDot,style:null===(B=null==$?void 0:$.PartialRequirementContentStyles)||void 0===B?void 0:B.editingDot}),"Editing"]})),t("div",{className:m.btnDivider,style:null===(b=null==$?void 0:$.PartialRequirementContentStyles)||void 0===b?void 0:b.btnDivider}),t(p,e({title:ee?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e({},null===(N=null==$?void 0:$.PartialRequirementContentStyles)||void 0===N?void 0:N.headerTooltip)}}},{children:t("span",{children:t("button",e({className:m.saveBtn,style:e(e(e({},null===(A=null==$?void 0:$.PartialRequirementContentStyles)||void 0===A?void 0:A.actionBtn),null===(j=null==$?void 0:$.PartialRequirementContentStyles)||void 0===j?void 0:j.saveBtn),{opacity:ee?.5:1,cursor:ee?"not-allowed":"pointer"}),onClick:function(){ee||(F(function(t){var i=e(e({},t[0]),{value:v(X)});return null==I||I("accept",[i]),[i]}),O(!1))},disabled:ee},{children:t(a,{size:16})}))})})),t("button",e({className:m.cancelBtn,style:e(e({},null===(D=null==$?void 0:$.PartialRequirementContentStyles)||void 0===D?void 0:D.actionBtn),null===(k=null==$?void 0:$.PartialRequirementContentStyles)||void 0===k?void 0:k.cancelBtn),onClick:function(){var e;Y(null===(e=null==z?void 0:z[0])||void 0===e?void 0:e.value),O(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t(d,{size:16})}))]}):t(p,e({title:L?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e({},null===(g=null==$?void 0:$.PartialRequirementContentStyles)||void 0===g?void 0:g.headerTooltip)}}},{children:t("span",{children:t("button",e({className:m.editBtn,style:e(e(e({},null===(q=null==$?void 0:$.PartialRequirementContentStyles)||void 0===q?void 0:q.actionBtn),null===(P=null==$?void 0:$.PartialRequirementContentStyles)||void 0===P?void 0:P.editBtn),{opacity:L?.5:1,cursor:L?"not-allowed":"pointer"}),onClick:function(){L||O(!0)},disabled:L,"aria-label":"Edit requirement"},{children:t(r,{size:16})}))})}))})),t("div",K?e({className:m.editorContainer,style:null===(E=null==$?void 0:$.PartialRequirementContentStyles)||void 0===E?void 0:E.editorContainer},{children:t(C,{minHeight:"100%",height:"100%",type:"string",value:s(u((null===(U=null==z?void 0:z[0])||void 0===U?void 0:U.value)||"")||""),handleUpdateState:function(e,t){Y(t)},doNotShowBorderInViewMode:!1,mode:"edit"})}):e({className:m.viewContainer,style:null===(x=null==$?void 0:$.PartialRequirementContentStyles)||void 0===x?void 0:x.viewContainer},{children:t(c,{message:u((null===(W=null==z?void 0:z[0])||void 0===W?void 0:W.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:z,setCraUserStory:F,onCraFlowDiffAgentAction:I,displayActionButtons:!K},isCraflow:M,onCraAccept:V,onCraReject:G,customStyles:null==$?void 0:$.UserStoryWithCitationCustomStyles,segmentComponentConfig:_})}))]}))};export{f as PartialRequirementContent,f as default};
2
2
  //# sourceMappingURL=PartialRequirementContent.js.map
@@ -1,2 +1,2 @@
1
- function r(r){try{return r=null==r?void 0:r.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,function(r,n){var t=n.split("."),e=" ".repeat(t.length-1);return"".concat(e).concat(n,".")})}catch(r){console.error("Error in formatMarkdown",r)}}var n=function(r,n){try{if(r){return r.replace(/\*\*Title\*\* ?: ([\s\S]*?)\n\n\*\*Description\*\*/,"**Title** : ".concat(n,"\n\n**Description**"))}}catch(n){return console.error("Error in replaceTitleSection:",n),r}};export{r as formatMarkdown,n as replaceTitleSection};
1
+ function e(e){try{return e=null==e?void 0:e.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,function(e,t){var c=t.split("."),r=" ".repeat(c.length-1);return"".concat(r).concat(t,".")})}catch(e){console.error("Error in formatMarkdown",e)}}var t=function(e,t){try{if(e){return e.replace(/\*\*Title\*\* ?: ([\s\S]*?)\n\n\*\*Description\*\*/,"**Title** : ".concat(t,"\n\n**Description**"))}}catch(t){return console.error("Error in replaceTitleSection:",t),e}},c=function(e){var t=e.replace(/<upt\s+id="([^"]*)">([\s\S]*?)<\/upt>/g,function(e,t,c){var r=encodeURIComponent(t);return c.replace(/<del>/,'<del id="'.concat(r,'" data-review-id="').concat(r,'">')).replace(/<ins>/,'<ins id="'.concat(r,'" data-review-id="').concat(r,'">'))});return console.log("postprocessUserStoryAfterEdit::output",t),t},r=function(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'")},n=function(e){console.log("postprocessUserStoryAfterEdit::input",e);var t=e.replace(/<del([^>]*?)data-review-id="([^"]*)"([^>]*)>([\s\S]*?)<\/del>([\s\S]*?)<ins([^>]*?)data-review-id="([^"]*)"([^>]*)>([\s\S]*?)<\/ins>/g,function(e,t,c,n,o,a,i,l,s,p){var d=r(c);if(d!==r(l))return e;var u="".concat(t).concat(n).replace(/\s+/g," ").trim(),g="".concat(i).concat(s).replace(/\s+/g," ").trim(),f=u?"<del ".concat(u,">").concat(o,"</del>"):"<del>".concat(o,"</del>"),v=g?"<ins ".concat(g,">").concat(p,"</ins>"):"<ins>".concat(p,"</ins>");return'<upt id="'.concat(decodeURIComponent(d),'">').concat(f).concat(a).concat(v,"</upt>")});return console.log("postprocessUserStoryAfterEdit::output",t),t};export{e as formatMarkdown,n as postprocessUserStoryAfterEdit,c as preprocessUserStoryForEdit,t as replaceTitleSection};
2
2
  //# sourceMappingURL=user-story.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequirementAiTest.d.ts","sourceRoot":"","sources":["../../../src/RequirementAiTest.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAA2B,cAAc,EAAE,aAAa,EAAE,MAAM,+EAA+E,CAAC;AAKvJ,QAAA,MAAM,iBAAiB,+CAomHtB,CAAC;AAiVF,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAoH7C,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAoV3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,YACrB,cAAc,EAAE,GAAG,aAAa,EAAE;;;;;CA0B5C,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"RequirementAiTest.d.ts","sourceRoot":"","sources":["../../../src/RequirementAiTest.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAA2B,cAAc,EAAE,aAAa,EAAE,MAAM,+EAA+E,CAAC;AAKvJ,QAAA,MAAM,iBAAiB,+CA6mHtB,CAAC;AAiVF,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAoH7C,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAoV3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,YACrB,cAAc,EAAE,GAAG,aAAa,EAAE;;;;;CA0B5C,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
@@ -1,17 +1,22 @@
1
1
  import { ElementNode, NodeKey, DOMConversionMap, SerializedElementNode } from "lexical";
2
- export type SerializedDeleteNode = SerializedElementNode;
2
+ export type SerializedDeleteNode = SerializedElementNode & {
3
+ type: "delete";
4
+ version: 1;
5
+ reviewId: string;
6
+ };
3
7
  export declare class DeleteNode extends ElementNode {
8
+ __reviewId: string;
4
9
  static getType(): string;
5
10
  static clone(node: DeleteNode): DeleteNode;
6
- constructor(key?: NodeKey);
11
+ constructor(reviewId?: string, key?: NodeKey);
7
12
  createDOM(): HTMLElement;
8
13
  updateDOM(): false;
9
14
  static importDOM(): DOMConversionMap | null;
10
15
  exportDOM(): {
11
16
  element: HTMLModElement;
12
17
  };
13
- static importJSON(): DeleteNode;
14
- exportJSON(): SerializedElementNode;
18
+ static importJSON(serializedNode: SerializedDeleteNode): DeleteNode;
19
+ exportJSON(): SerializedDeleteNode;
15
20
  isInline(): true;
16
21
  canBeEmpty(): false;
17
22
  canInsertTextBefore(): false;
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,gBAAgB,EAEhB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAEzD,qBAAa,UAAW,SAAQ,WAAW;IACzC,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;gBAI9B,GAAG,CAAC,EAAE,OAAO;IAIzB,SAAS,IAAI,WAAW;IAaxB,SAAS,IAAI,KAAK;IAIlB,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAS3C,SAAS;;;IAYT,MAAM,CAAC,UAAU,IAAI,UAAU;IAI/B,UAAU,IAAI,qBAAqB;IAQnC,QAAQ,IAAI,IAAI;IAIhB,UAAU,IAAI,KAAK;IAInB,mBAAmB,IAAI,KAAK;IAI9B,kBAAkB,IAAI,KAAK;IAI3B,YAAY,IAAI,KAAK;CAGpB"}
1
+ {"version":3,"file":"DeleteNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,gBAAgB,EAEhB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG;IACzD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,UAAW,SAAQ,WAAW;IACzC,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;gBAKxC,QAAQ,GAAE,MAA4B,EACtC,GAAG,CAAC,EAAE,OAAO;IAMf,SAAS,IAAI,WAAW;IAgBxB,SAAS,IAAI,KAAK;IAIlB,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAS3C,SAAS;;;IAeT,MAAM,CAAC,UAAU,CACf,cAAc,EAAE,oBAAoB,GACnC,UAAU;IAIb,UAAU,IAAI,oBAAoB;IASlC,QAAQ,IAAI,IAAI;IAIhB,UAAU,IAAI,KAAK;IAInB,mBAAmB,IAAI,KAAK;IAI9B,kBAAkB,IAAI,KAAK;IAI3B,YAAY,IAAI,KAAK;CAGpB"}
@@ -1,24 +1,20 @@
1
- import { TextNode, NodeKey, SerializedTextNode, DOMConversionMap, EditorConfig } from "lexical";
2
- export type SerializedInsertNode = SerializedTextNode & {
1
+ import { ElementNode, NodeKey, SerializedElementNode, DOMConversionMap, EditorConfig, LexicalEditor, DOMExportOutput } from "lexical";
2
+ export type SerializedInsertNode = SerializedElementNode & {
3
3
  type: "insert";
4
4
  version: 1;
5
5
  reviewId: string;
6
6
  };
7
- export declare class InsertNode extends TextNode {
7
+ export declare class InsertNode extends ElementNode {
8
8
  __reviewId: string;
9
9
  static getType(): string;
10
10
  static clone(node: InsertNode): InsertNode;
11
- constructor(text?: string, reviewId?: string, key?: NodeKey);
11
+ constructor(reviewId?: string, key?: NodeKey);
12
12
  createDOM(config: EditorConfig): HTMLElement;
13
- updateDOM(): boolean;
13
+ updateDOM(prevNode: InsertNode, dom: HTMLElement, config: EditorConfig): boolean;
14
14
  static importDOM(): DOMConversionMap | null;
15
- exportDOM(): {
16
- element: HTMLModElement;
17
- };
15
+ exportDOM(editor: LexicalEditor): DOMExportOutput;
18
16
  static importJSON(serializedNode: SerializedInsertNode): InsertNode;
19
17
  exportJSON(): SerializedInsertNode;
20
- isInline(): true;
21
- canInsertTextBefore(): boolean;
22
- canInsertTextAfter(): boolean;
18
+ isInline(): boolean;
23
19
  }
24
20
  //# sourceMappingURL=InsertNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InsertNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAEhB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,UAAW,SAAQ,QAAQ;IACtC,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;gBASxC,IAAI,GAAE,MAAW,EACjB,QAAQ,GAAE,MAA4B,EACtC,GAAG,CAAC,EAAE,OAAO;IAWf,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAsB5C,SAAS,IAAI,OAAO;IAQpB,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAa3C,SAAS;;;IAwBT,MAAM,CAAC,UAAU,CACf,cAAc,EAAE,oBAAoB,GACnC,UAAU;IAcb,UAAU,IAAI,oBAAoB;IAalC,QAAQ,IAAI,IAAI;IAIhB,mBAAmB,IAAI,OAAO;IAI9B,kBAAkB,IAAI,OAAO;CAG9B"}
1
+ {"version":3,"file":"InsertNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,gBAAgB,EAEhB,YAAY,EACZ,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG;IACzD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,UAAW,SAAQ,WAAW;IACzC,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;gBAKxC,QAAQ,GAAE,MAA4B,EACtC,GAAG,CAAC,EAAE,OAAO;IAUf,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAa5C,SAAS,CACP,QAAQ,EAAE,UAAU,EACpB,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO;IAQV,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAa3C,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe;IAiBjD,MAAM,CAAC,UAAU,CACf,cAAc,EAAE,oBAAoB,GACnC,UAAU;IAQb,UAAU,IAAI,oBAAoB;IAalC,QAAQ,IAAI,OAAO;CAGpB"}
@@ -11,4 +11,6 @@ export declare const removeAllTagsAndContent: (inputString: string) => string;
11
11
  */
12
12
  export declare function removeMarkdownLinks(markdown: string): string;
13
13
  export declare const replaceTitleSection: (original: string | undefined, newTitle: string) => string | undefined;
14
+ export declare const preprocessUserStoryForEdit: (input: string) => string;
15
+ export declare const postprocessUserStoryAfterEdit: (input: string) => string;
14
16
  //# sourceMappingURL=user-story.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-story.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/utils/user-story.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,sBAa1C;AAED,eAAO,MAAM,cAAc,QAAS,MAAM,cAAc,MAAM,WAM7D,CAAA;AAED,eAAO,MAAM,iCAAiC,cAAe,UAAU,WAAW,MAAM,eAAe,MAAM,gBAAgB,MAAM,uBAgBlI,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAAE,EAAE,MAAM,UAmBxD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,UAgB9C;AAED,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,WAwB1D,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,eAAO,MAAM,mBAAmB,aAAc,MAAM,GAAG,SAAS,YAAY,MAAM,uBAUjF,CAAA"}
1
+ {"version":3,"file":"user-story.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/RequirementAI/utils/user-story.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,sBAa1C;AAED,eAAO,MAAM,cAAc,QAAS,MAAM,cAAc,MAAM,WAM7D,CAAA;AAED,eAAO,MAAM,iCAAiC,cAAe,UAAU,WAAW,MAAM,eAAe,MAAM,gBAAgB,MAAM,uBAgBlI,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAAE,EAAE,MAAM,UAmBxD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,UAgB9C;AAED,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,WAwB1D,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,eAAO,MAAM,mBAAmB,aAAc,MAAM,GAAG,SAAS,YAAY,MAAM,uBAUjF,CAAA;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,WAavD,CAAA;AAWD,eAAO,MAAM,6BAA6B,UAAW,MAAM,WA6B1D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.165",
3
+ "version": "0.0.166",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",