@e-llm-studio/requirement-ai 0.0.230 → 0.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("./CompletionPanel.module.css.js"),s=require("../../icons/CDIcon.js"),l=require("lucide-react");const a=({customIcons:a,customStyles:i,currentUserStory:r,panelStyles:c,showPanel:d=!1,children:u,onToggleStateChange:p,completionPanelConfig:m})=>{var g,f,j,v,C;const[h,k]=o.useState(!!d),x=null!==(g=null==r?void 0:r.completion_percentage)&&void 0!==g?g:0,y=o.useRef(null),b=o.useRef(null),{isMarkingComplete:_=!1,markedComplete:w=!1,onMarkAsComplete:P}=null!=m?m:{},S=()=>{k(!1),null==p||p(!1)},O=e=>{e.stopPropagation(),k(e=>{const o=!e;return null==p||p(o),o})};return o.useEffect(()=>{if(!h)return;const e=e=>{b.current&&!b.current.contains(e.target)&&S()},o=e=>{"Escape"===e.key&&(k(!1),null==p||p(!1))};return document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[h,p]),e.jsxs("div",Object.assign({ref:b,className:n.default.triggerWrapper,style:null==c?void 0:c.triggerWrapperStyle},{children:[!d&&e.jsx(e.Fragment,{children:u?e.jsx("div",Object.assign({className:n.default.completionButton,style:null==c?void 0:c.completionButtonStyle,onClick:O},{children:u})):e.jsx("button",Object.assign({ref:y,className:n.default.completionIconButton,style:null==c?void 0:c.completionIconButtonStyle,onClick:O},{children:e.jsx(s.default,{})}))}),h&&e.jsx("div",Object.assign({className:`${n.default.dropdown} ${d?n.default.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==c?void 0:c.dropdownStyle),d?null==c?void 0:c.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:e.jsx(t.default,{aiReason:{explanation:(null===(f=r.completion_decision_factors)||void 0===f?void 0:f.explanation)||"",relevance_score:(null===(j=r.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(v=r.completion_decision_factors)||void 0===v?void 0:v.score_reason)||"",gap:(null===(C=r.completion_decision_factors)||void 0===C?void 0:C.gap)||"",id:"completion-cd"},customIcons:a,customStyles:i,footer:e.jsxs("div",Object.assign({className:n.default.markCompleteContainer},{children:[e.jsx("h4",Object.assign({className:n.default.markCompleteTitle},{children:"Mark this section as complete?"})),e.jsxs("p",Object.assign({className:n.default.markCompleteDescription},{children:["AI estimates this section is"," ",x,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e.jsxs("button",Object.assign({className:n.default.markCompleteButton,disabled:_||w,onClick:e=>{e.stopPropagation(),null==P||P(),S()}},{children:[_?e.jsx(l.Loader2,{size:18,className:n.default.markCompleteSpinner}):e.jsx(l.Check,{size:18,strokeWidth:3,className:n.default.markCompleteIcon}),e.jsx("span",{children:w?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};exports.CompletionPanel=a,exports.default=a;
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as s}from"react";import l from"../ai-reasoning/AiReasoningCitationContent.js";import a from"./CompletionPanel.module.css.js";import r from"../../icons/CDIcon.js";import{Loader2 as c,Check as m}from"lucide-react";const p=({customIcons:p,customStyles:d,currentUserStory:u,panelStyles:g,showPanel:v=!1,children:C,onToggleStateChange:h,completionPanelConfig:k})=>{var f,y,j,b,w;const[_,P]=t(!!v),S=null!==(f=null==u?void 0:u.completion_percentage)&&void 0!==f?f:0,N=i(null),O=i(null),{isMarkingComplete:I=!1,markedComplete:D=!1,onMarkAsComplete:M}=null!=k?k:{},B=()=>{P(!1),null==h||h(!1)},x=e=>{e.stopPropagation(),P(e=>{const o=!e;return null==h||h(o),o})};return s(()=>{if(!_)return;const e=e=>{O.current&&!O.current.contains(e.target)&&B()},o=e=>{"Escape"===e.key&&(P(!1),null==h||h(!1))};return document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[_,h]),e("div",Object.assign({ref:O,className:a.triggerWrapper,style:null==g?void 0:g.triggerWrapperStyle},{children:[!v&&o(n,{children:C?o("div",Object.assign({className:a.completionButton,style:null==g?void 0:g.completionButtonStyle,onClick:x},{children:C})):o("button",Object.assign({ref:N,className:a.completionIconButton,style:null==g?void 0:g.completionIconButtonStyle,onClick:x},{children:o(r,{})}))}),_&&o("div",Object.assign({className:`${a.dropdown} ${v?a.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==g?void 0:g.dropdownStyle),v?null==g?void 0:g.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:o(l,{aiReason:{explanation:(null===(y=u.completion_decision_factors)||void 0===y?void 0:y.explanation)||"",relevance_score:(null===(j=u.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(b=u.completion_decision_factors)||void 0===b?void 0:b.score_reason)||"",gap:(null===(w=u.completion_decision_factors)||void 0===w?void 0:w.gap)||"",id:"completion-cd"},customIcons:p,customStyles:d,footer:e("div",Object.assign({className:a.markCompleteContainer},{children:[o("h4",Object.assign({className:a.markCompleteTitle},{children:"Mark this section as complete?"})),e("p",Object.assign({className:a.markCompleteDescription},{children:["AI estimates this section is"," ",S,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e("button",Object.assign({className:a.markCompleteButton,disabled:I||D,onClick:e=>{e.stopPropagation(),null==M||M(),B()}},{children:[I?o(c,{size:18,className:a.markCompleteSpinner}):o(m,{size:18,strokeWidth:3,className:a.markCompleteIcon}),o("span",{children:D?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};export{p as CompletionPanel,p as default};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,uBAAuB,EACvB,cAAc,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACH,2BAA2B,EAC9B,MAAM,8CAA8C,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,eAAO,MAAM,eAAe;iBAUX,cAAc;kBACb,uBAAuB;sBACnB,qBAAqB,GAAG,UAAU;;;eAGzC,SAAS;oCACW,OAAO,KAAK,IAAI;;6CA6LlD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|