@e-llm-studio/requirement-ai 0.0.139 → 0.0.140

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=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),i=require("../../store/ref.context.js"),a=require("@lexical/html"),u=require("turndown"),c=require("turndown-plugin-gfm");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=new(l(u).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),d.addRule("citation-source-anchor",{filter:function(e){var t;return"A"===e.nodeName&&!0===(null===(t=e.getAttribute("href"))||void 0===t?void 0:t.startsWith("ai_reasoning$"))},replacement:function(e,t){return t.outerHTML||""}}),d.use(c.tables);exports.default=function(u){var c=u.type,l=u.value,f=u.handleUpdateState,s=u.onBlur,h=u.placeholder,m=u.minHeight,p=u.height,g=u.mode,v=u.doNotShowBorderInViewMode,E=r.useRef(null),x=r.useState({type:c,value:l}),w=x[0],y=x[1],S=r.useState(0),q=S[0],b=S[1],C=i.useRefStore(),_=C.contentRef;C.setContentRef;r.useEffect(function(){y(function(t){return e.__assign(e.__assign({},t),{value:l})})},[l]);return r.useEffect(function(){var e=function(){_&&_.current&&b(_.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[_]),t.jsx(t.Fragment,{children:t.jsx(o.default,{minHeight:m,height:p,placeholder:h||"Enter some text...",onChange:function(e,t){e.read(function(){var e=a.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)});var n=[];r.querySelectorAll("table").forEach(function(e,t){n.push(e.outerHTML);var o=r.createElement("p");o.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(o)});var o=d.turndown(r.body.innerHTML);n.forEach(function(e,t){o=o.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),function(e,t){f(e,t)}("prompt",o=o.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"))})},toolbarConfig:n.DEFAULT_TOOLBAR_CONFIG,editorRef:E,mode:g,initialString:{type:w.type,value:w.value},dynamicHeight:q,onBlur:s,doNotShowBorderInViewMode:v||!1})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),i=require("../../store/ref.context.js"),a=require("@lexical/html"),u=require("turndown"),l=require("turndown-plugin-gfm");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=new(c(u).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.keep(function(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}),d.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),d.use(l.tables);exports.default=function(u){var l=u.type,c=u.value,f=u.handleUpdateState,s=u.onBlur,h=u.placeholder,p=u.minHeight,g=u.height,m=u.mode,v=u.doNotShowBorderInViewMode,E=r.useRef(null),x=r.useState({type:l,value:c}),y=x[0],S=x[1],b=r.useState(0),q=b[0],w=b[1],A=i.useRefStore(),_=A.contentRef;A.setContentRef;r.useEffect(function(){S(function(t){return e.__assign(e.__assign({},t),{value:c})})},[c]);return r.useEffect(function(){var e=function(){_&&_.current&&w(_.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[_]),t.jsx(t.Fragment,{children:t.jsx(o.default,{minHeight:p,height:g,placeholder:h||"Enter some text...",onChange:function(e,t){e.read(function(){var e=a.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});var n=[];r.querySelectorAll("table").forEach(function(e,t){n.push(e.outerHTML);var o=r.createElement("p");o.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(o)});var o=d.turndown(r.body.innerHTML);n.forEach(function(e,t){o=o.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),function(e,t){f(e,t)}("prompt",o=o.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"))})},toolbarConfig:n.DEFAULT_TOOLBAR_CONFIG,editorRef:E,mode:m,initialString:{type:y.type,value:y.value},dynamicHeight:q,onBlur:s,doNotShowBorderInViewMode:v||!1})})};
2
2
  //# sourceMappingURL=RichTextEditor.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,Fragment as n}from"react/jsx-runtime";import{useRef as r,useState as o,useEffect as i}from"react";import{DEFAULT_TOOLBAR_CONFIG as a}from"./Editor/constants/editorConfig.js";import c from"./Editor/Editor.js";import{useRefStore as l}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import d from"turndown";import{tables as f}from"turndown-plugin-gfm";var m=new d({headingStyle:"atx",codeBlockStyle:"fenced"});m.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),m.addRule("citation-source-anchor",{filter:function(e){var t;return"A"===e.nodeName&&!0===(null===(t=e.getAttribute("href"))||void 0===t?void 0:t.startsWith("ai_reasoning$"))},replacement:function(e,t){return t.outerHTML||""}}),m.use(f);var p=function(d){var f=d.type,p=d.value,h=d.handleUpdateState,s=d.onBlur,g=d.placeholder,v=d.minHeight,E=d.height,w=d.mode,x=d.doNotShowBorderInViewMode,y=r(null),C=o({type:f,value:p}),S=C[0],b=C[1],A=o(0),B=A[0],H=A[1],L=l(),T=L.contentRef;L.setContentRef;i(function(){b(function(t){return e(e({},t),{value:p})})},[p]);return i(function(){var e=function(){T&&T.current&&H(T.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[T]),t(n,{children:t(c,{minHeight:v,height:E,placeholder:g||"Enter some text...",onChange:function(e,t){e.read(function(){var e=u(t,null),n=(new DOMParser).parseFromString(e,"text/html");n.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),n.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)});var r=[];n.querySelectorAll("table").forEach(function(e,t){r.push(e.outerHTML);var o=n.createElement("p");o.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(o)});var o=m.turndown(n.body.innerHTML);r.forEach(function(e,t){o=o.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),function(e,t){h(e,t)}("prompt",o=o.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"))})},toolbarConfig:a,editorRef:y,mode:w,initialString:{type:S.type,value:S.value},dynamicHeight:B,onBlur:s,doNotShowBorderInViewMode:x||!1})})};export{p as default};
1
+ import{__assign as e}from"tslib";import{jsx as t,Fragment as r}from"react/jsx-runtime";import{useRef as n,useState as o,useEffect as i}from"react";import{DEFAULT_TOOLBAR_CONFIG as a}from"./Editor/constants/editorConfig.js";import l from"./Editor/Editor.js";import{useRefStore as c}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import d from"turndown";import{tables as f}from"turndown-plugin-gfm";var m=new d({headingStyle:"atx",codeBlockStyle:"fenced"});m.keep(function(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}),m.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),m.use(f);var p=function(d){var f=d.type,p=d.value,h=d.handleUpdateState,s=d.onBlur,g=d.placeholder,v=d.minHeight,E=d.height,w=d.mode,x=d.doNotShowBorderInViewMode,y=n(null),A=o({type:f,value:p}),S=A[0],b=A[1],C=o(0),B=C[0],H=C[1],L=c(),N=L.contentRef;L.setContentRef;i(function(){b(function(t){return e(e({},t),{value:p})})},[p]);return i(function(){var e=function(){N&&N.current&&H(N.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[N]),t(r,{children:t(l,{minHeight:v,height:E,placeholder:g||"Enter some text...",onChange:function(e,t){e.read(function(){var e=u(t,null),r=(new DOMParser).parseFromString(e,"text/html");r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))});var n=[];r.querySelectorAll("table").forEach(function(e,t){n.push(e.outerHTML);var o=r.createElement("p");o.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(o)});var o=m.turndown(r.body.innerHTML);n.forEach(function(e,t){o=o.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),function(e,t){h(e,t)}("prompt",o=o.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"))})},toolbarConfig:a,editorRef:y,mode:w,initialString:{type:S.type,value:S.value},dynamicHeight:B,onBlur:s,doNotShowBorderInViewMode:x||!1})})};export{p as default};
2
2
  //# sourceMappingURL=RichTextEditor.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;AAEvJ,QAAA,MAAM,iBAAiB,+CAu3EtB,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;AAEvJ,QAAA,MAAM,iBAAiB,+CA6mGtB,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 +1 @@
1
- {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AA8BA,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,CAAA;CACpC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,QAAA,MAAM,cAAc,gHAUjB,eAAe,4CAiHjB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AA4BA,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,CAAA;CACpC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,QAAA,MAAM,cAAc,gHAUjB,eAAe,4CAwHjB,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",