evalution 2.0.5 → 2.0.6
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/{check-BKU5_IhU.d.ts → check-BTQoueDx.d.ts} +10 -2
- package/dist/checks/index.d.ts +1 -1
- package/dist/cli/index.js +16 -4
- package/dist/client/assets/{DatasetView-dWZOCEO1.js → DatasetView-DGDsJxna.js} +12 -12
- package/dist/client/assets/{EvalRunView-Cm1YhpbN.js → EvalRunView-BN9V0ARc.js} +1 -1
- package/dist/client/assets/{EvalView-By5XAZnh.js → EvalView-BQBrzhCH.js} +1 -1
- package/dist/client/assets/{data-grid-overlay-editor-BuUUbLjU.js → data-grid-overlay-editor-5rXbIGLa.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-B5z7-guY.js → highlighted-body-KPVGNVTW-_PBSQg1b.js} +1 -1
- package/dist/client/assets/{index-BK0ALIOn.js → index-B5TkxPbo.js} +131 -131
- package/dist/client/assets/{number-overlay-editor-DIsrCfnq.js → number-overlay-editor-DsFqIfVX.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/{dataset-types-D-Fsbg8B.d.ts → dataset-types-0N5KYU1i.d.ts} +10 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +10 -5
- package/dist/{local-database-trace-provider-Dy64Lll3.js → local-database-trace-provider-Ygd0PVZQ.js} +46 -9
- package/dist/{trace-BLjFYF9G.d.ts → trace-BEwHfdpe.d.ts} +1 -1
- package/dist/views/datasets/index.d.ts +1 -1
- package/dist/views/datasets/index.js +5 -0
- package/dist/views/index.d.ts +2 -2
- package/dist/views/react/index.d.ts +1 -1
- package/package.json +6 -6
package/dist/client/assets/{number-overlay-editor-DIsrCfnq.js → number-overlay-editor-DsFqIfVX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as Y,r as O}from"./index-BK0ALIOn.js";import{s as Be}from"./DatasetView-dWZOCEO1.js";const Fe=Be("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function pe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var ee;(function(e){e.event="event",e.props="prop"})(ee||(ee={}));function q(){}function _e(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,f){return i===t[f]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function xe(e){return z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function ye(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Me(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=Me(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function de(e){var t=O.useRef(e);t.current=e;var r=O.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],f=a[1]||"";return{beforeDecimal:i,afterDecimal:f,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function be(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function ge(e,t){return Array(t+1).join(e)}function Ve(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var f=1+i,p=a.length;return f<0?a="0."+ge("0",Math.abs(f))+a:f>=p?a=a+ge("0",f-p):a=(a.substring(0,f)||"0")+"."+a.substring(f),r+a}function me(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,f=a.afterDecimal,p=a.hasNegation,m=parseFloat("0."+(f||"0")),x=f.length<=t?"0."+f:m.toFixed(t),h=x.split("."),s=i;i&&Number(h[0])&&(s=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var S=be(h[1]||"",t,r),y=p?"-":"",l=n?".":"";return""+y+s+l+S}function J(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ne=_e(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,f){f===void 0&&(f=$e);var p=a.findIndex(function(k){return k}),m=e.slice(0,p);!t&&!r.startsWith(m)&&(t=m,r=m+r,n=n+m.length);for(var x=r.length,h=e.length,s={},S=new Array(x),y=0;y<x;y++){S[y]=-1;for(var l=0,I=h;l<I;l++){var C=f({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:l});if(C&&s[l]!==!0){S[y]=l,s[l]=!0;break}}}for(var g=n;g<x&&(S[g]===-1||!i(r[g]));)g++;var B=g===x||S[g]===-1?h:S[g];for(g=n-1;g>0&&S[g]===-1;)g--;var F=g===-1||S[g]===-1?0:S[g]+1;return F>B?B:n-F<B-n?F:B}function he(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function we(e,t,r,n,a,i){i===void 0&&(i=q);var f=de(function(l,I){var C,g;return xe(l)?(g="",C=""):typeof l=="number"||I?(g=typeof l=="number"?Ve(l):l,C=n(g)):(g=a(l,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),p=O.useState(function(){return f(z(e)?t:e,r)}),m=p[0],x=p[1],h=de(function(l,I){l.formattedValue!==m.formattedValue&&x({formattedValue:l.formattedValue,numAsString:l.value}),i(l,I)}),s=e,S=r;z(e)&&(s=m.numAsString,S=!0);var y=f(s,S);return O.useMemo(function(){x(y)},[y.formattedValue]),O.useEffect(function(){if(!z(t)&&z(e)&&m.formattedValue!==""){var l=parseFloat(m.numAsString);h({formattedValue:m.formattedValue,value:m.numAsString,floatValue:isNaN(l)?void 0:l},{event:void 0,source:ee.props})}},[]),[m,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,f=e.format;f===void 0&&(f=ze);var p=e.removeFormatting;p===void 0&&(p=qe);var m=e.defaultValue,x=e.valueIsNumericString,h=e.onValueChange,s=e.isAllowed,S=e.onChange;S===void 0&&(S=q);var y=e.onKeyDown;y===void 0&&(y=q);var l=e.onMouseUp;l===void 0&&(l=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=pe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),H=we(g,m,!!x,f,p,h),P=H[0],V=P.formattedValue,M=P.numAsString,W=H[1],L=O.useRef(),U=O.useRef({formattedValue:V,numAsString:M}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},Q=O.useState(!1),te=Q[0],d=Q[1],c=O.useRef(null),N=O.useRef({setCaretTimeout:null,focusTimeout:null});O.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=f,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(J(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&J(o,u)},0))},T=function(o,u,v){return he(o,u,B(o),v)},X=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=he(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=X(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};O.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||M!==v)&&$(A(V,M),{event:void 0,source:ee.props})},[V,M]);var re=c.current?ce(c.current):void 0,ne=typeof window<"u"?O.useLayoutEffect:O.useEffect;ne(function(){var o=c.current;if(V!==U.current.formattedValue&&o){var u=X(U.current.formattedValue,V,re);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=L.current?Pe(L.current,w.selectionEnd):Ne(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=p(o,D),K=R(b);if(b=p(K,void 0),s&&!s(A(K,b))){var G=u.target,Z=ce(G),le=X(o,V,Z);return G.value=V,E(G,le,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},fe=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;L.current={selectionStart:v,selectionEnd:w+u}},Ie=function(o){var u=o.target,v=u.value,w=ue(v,o,ee.event);w&&S(o),L.current=void 0},Ce=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),fe(u,K);return}var Z=b;if(G){var le=v==="ArrowLeft"?"left":"right";Z=T(D,b,le),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=T(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=T(D,b,"left"));Z!==b&&E(u,Z,D),y(o),fe(u,K)},Ee=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=T(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),l(o),fe(u)},Re=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;c.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=T(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Ae=function(o){c.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Oe=te&&We()?"numeric":void 0,ve=Object.assign({inputMode:Oe},j,{type:t,value:V,onChange:Ie,onKeyDown:Ce,onMouseUp:Ee,onFocus:Re,onBlur:Ae});if(r==="text")return a?Y.createElement(Y.Fragment,null,a(V,j)||null):Y.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Te=n;return Y.createElement(Te,Object.assign({},ve,{ref:i}))}return Y.createElement("input",Object.assign({},ve,{ref:i}))}function Se(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var f=t.allowNegative,p=t.thousandsGroupStyle;if(p===void 0&&(p="thousand"),e===""||e==="-")return e;var m=ie(t),x=m.thousandSeparator,h=m.decimalSeparator,s=r!==0&&e.indexOf(".")!==-1||r&&n,S=se(e,f),y=S.beforeDecimal,l=S.afterDecimal,I=S.addNegation;return r!==void 0&&(l=be(l,r,!!n)),x&&(y=Le(y,x,p)),a&&(y=a+y),i&&(l=l+i),I&&(y="-"+y),e=y+(s&&h||"")+l,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+ye(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var f=r.suffix;f===void 0&&(f="");var p=r.decimalScale,m=t.from,x=t.to,h=x.start,s=x.end,S=ie(r),y=S.allowedDecimalSeparators,l=S.decimalSeparator,I=e[s]===l;if(ae(e)&&(e===i||e===f)&&t.lastValue==="")return e;if(s-h===1&&y.indexOf(e[h])!==-1){var C=p===0?"":l;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(c,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:c.startsWith("--")?(A=!1,E=!0):f.startsWith("-")&&c.length===f.length?A=!1:c[0]==="-"&&(A=!0);var T=A?1:0;return E&&(T=2),T&&(c=c.substring(T),N-=T,R-=T),{value:c,start:N,end:R,hasNegation:A}},B=g(e,h,s),F=B.hasNegation;n=B,e=n.value,h=n.start,s=n.end;var k=g(t.lastValue,m.start,m.end),j=k.start,H=k.end,P=k.value,V=e.substring(h,s);e.length&&P.length&&(j>P.length-f.length||H<i.length)&&!(V&&f.startsWith(V))&&(e=P);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),e=e.substring(M),s-=M;var W=e.length,L=e.length-f.length;e.endsWith(f)?W=L:(s>L||s>e.length-f.length)&&(W=s),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(l))||[]).join("");var U=e.indexOf(l);e=e.replace(new RegExp(ye(l),"g"),function(c,N){return N===U?".":""});var $=se(e,a),Q=$.beforeDecimal,te=$.afterDecimal,d=$.addNegation;return x.end-x.start<m.end-m.start&&Q===""&&I&&!parseFloat(te)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var f=e.length;return a.fill(!1,f-n.length+1,f+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
1
|
+
import{ad as Y,r as O}from"./index-B5TkxPbo.js";import{s as Be}from"./DatasetView-DGDsJxna.js";const Fe=Be("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function pe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var ee;(function(e){e.event="event",e.props="prop"})(ee||(ee={}));function q(){}function _e(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,f){return i===t[f]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function xe(e){return z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function ye(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Me(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=Me(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function de(e){var t=O.useRef(e);t.current=e;var r=O.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],f=a[1]||"";return{beforeDecimal:i,afterDecimal:f,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function be(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function ge(e,t){return Array(t+1).join(e)}function Ve(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var f=1+i,p=a.length;return f<0?a="0."+ge("0",Math.abs(f))+a:f>=p?a=a+ge("0",f-p):a=(a.substring(0,f)||"0")+"."+a.substring(f),r+a}function me(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,f=a.afterDecimal,p=a.hasNegation,m=parseFloat("0."+(f||"0")),x=f.length<=t?"0."+f:m.toFixed(t),h=x.split("."),s=i;i&&Number(h[0])&&(s=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},h[0]));var S=be(h[1]||"",t,r),y=p?"-":"",l=n?".":"";return""+y+s+l+S}function J(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ne=_e(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,f){f===void 0&&(f=$e);var p=a.findIndex(function(k){return k}),m=e.slice(0,p);!t&&!r.startsWith(m)&&(t=m,r=m+r,n=n+m.length);for(var x=r.length,h=e.length,s={},S=new Array(x),y=0;y<x;y++){S[y]=-1;for(var l=0,I=h;l<I;l++){var C=f({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:l});if(C&&s[l]!==!0){S[y]=l,s[l]=!0;break}}}for(var g=n;g<x&&(S[g]===-1||!i(r[g]));)g++;var B=g===x||S[g]===-1?h:S[g];for(g=n-1;g>0&&S[g]===-1;)g--;var F=g===-1||S[g]===-1?0:S[g]+1;return F>B?B:n-F<B-n?F:B}function he(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function we(e,t,r,n,a,i){i===void 0&&(i=q);var f=de(function(l,I){var C,g;return xe(l)?(g="",C=""):typeof l=="number"||I?(g=typeof l=="number"?Ve(l):l,C=n(g)):(g=a(l,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),p=O.useState(function(){return f(z(e)?t:e,r)}),m=p[0],x=p[1],h=de(function(l,I){l.formattedValue!==m.formattedValue&&x({formattedValue:l.formattedValue,numAsString:l.value}),i(l,I)}),s=e,S=r;z(e)&&(s=m.numAsString,S=!0);var y=f(s,S);return O.useMemo(function(){x(y)},[y.formattedValue]),O.useEffect(function(){if(!z(t)&&z(e)&&m.formattedValue!==""){var l=parseFloat(m.numAsString);h({formattedValue:m.formattedValue,value:m.numAsString,floatValue:isNaN(l)?void 0:l},{event:void 0,source:ee.props})}},[]),[m,h]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,f=e.format;f===void 0&&(f=ze);var p=e.removeFormatting;p===void 0&&(p=qe);var m=e.defaultValue,x=e.valueIsNumericString,h=e.onValueChange,s=e.isAllowed,S=e.onChange;S===void 0&&(S=q);var y=e.onKeyDown;y===void 0&&(y=q);var l=e.onMouseUp;l===void 0&&(l=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=pe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),H=we(g,m,!!x,f,p,h),P=H[0],V=P.formattedValue,M=P.numAsString,W=H[1],L=O.useRef(),U=O.useRef({formattedValue:V,numAsString:M}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},Q=O.useState(!1),te=Q[0],d=Q[1],c=O.useRef(null),N=O.useRef({setCaretTimeout:null,focusTimeout:null});O.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=f,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(J(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&J(o,u)},0))},T=function(o,u,v){return he(o,u,B(o),v)},X=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=he(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=X(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};O.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||M!==v)&&$(A(V,M),{event:void 0,source:ee.props})},[V,M]);var re=c.current?ce(c.current):void 0,ne=typeof window<"u"?O.useLayoutEffect:O.useEffect;ne(function(){var o=c.current;if(V!==U.current.formattedValue&&o){var u=X(U.current.formattedValue,V,re);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=L.current?Pe(L.current,w.selectionEnd):Ne(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=p(o,D),K=R(b);if(b=p(K,void 0),s&&!s(A(K,b))){var G=u.target,Z=ce(G),le=X(o,V,Z);return G.value=V,E(G,le,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},fe=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;L.current={selectionStart:v,selectionEnd:w+u}},Ie=function(o){var u=o.target,v=u.value,w=ue(v,o,ee.event);w&&S(o),L.current=void 0},Ce=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),fe(u,K);return}var Z=b;if(G){var le=v==="ArrowLeft"?"left":"right";Z=T(D,b,le),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=T(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=T(D,b,"left"));Z!==b&&E(u,Z,D),y(o),fe(u,K)},Ee=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=T(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),l(o),fe(u)},Re=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;c.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=T(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Ae=function(o){c.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Oe=te&&We()?"numeric":void 0,ve=Object.assign({inputMode:Oe},j,{type:t,value:V,onChange:Ie,onKeyDown:Ce,onMouseUp:Ee,onFocus:Re,onBlur:Ae});if(r==="text")return a?Y.createElement(Y.Fragment,null,a(V,j)||null):Y.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Te=n;return Y.createElement(Te,Object.assign({},ve,{ref:i}))}return Y.createElement("input",Object.assign({},ve,{ref:i}))}function Se(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var f=t.allowNegative,p=t.thousandsGroupStyle;if(p===void 0&&(p="thousand"),e===""||e==="-")return e;var m=ie(t),x=m.thousandSeparator,h=m.decimalSeparator,s=r!==0&&e.indexOf(".")!==-1||r&&n,S=se(e,f),y=S.beforeDecimal,l=S.afterDecimal,I=S.addNegation;return r!==void 0&&(l=be(l,r,!!n)),x&&(y=Le(y,x,p)),a&&(y=a+y),i&&(l=l+i),I&&(y="-"+y),e=y+(s&&h||"")+l,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+ye(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var f=r.suffix;f===void 0&&(f="");var p=r.decimalScale,m=t.from,x=t.to,h=x.start,s=x.end,S=ie(r),y=S.allowedDecimalSeparators,l=S.decimalSeparator,I=e[s]===l;if(ae(e)&&(e===i||e===f)&&t.lastValue==="")return e;if(s-h===1&&y.indexOf(e[h])!==-1){var C=p===0?"":l;e=e.substring(0,h)+C+e.substring(h+1,e.length)}var g=function(c,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:c.startsWith("--")?(A=!1,E=!0):f.startsWith("-")&&c.length===f.length?A=!1:c[0]==="-"&&(A=!0);var T=A?1:0;return E&&(T=2),T&&(c=c.substring(T),N-=T,R-=T),{value:c,start:N,end:R,hasNegation:A}},B=g(e,h,s),F=B.hasNegation;n=B,e=n.value,h=n.start,s=n.end;var k=g(t.lastValue,m.start,m.end),j=k.start,H=k.end,P=k.value,V=e.substring(h,s);e.length&&P.length&&(j>P.length-f.length||H<i.length)&&!(V&&f.startsWith(V))&&(e=P);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),e=e.substring(M),s-=M;var W=e.length,L=e.length-f.length;e.endsWith(f)?W=L:(s>L||s>e.length-f.length)&&(W=s),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(l))||[]).join("");var U=e.indexOf(l);e=e.replace(new RegExp(ye(l),"g"),function(c,N){return N===U?".":""});var $=se(e,a),Q=$.beforeDecimal,te=$.afterDecimal,d=$.addNegation;return x.end-x.start<m.end-m.start&&Q===""&&I&&!parseFloat(te)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var f=e.length;return a.fill(!1,f-n.length+1,f+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
2
2
|
Decimal separator can't be same as thousand separator.
|
|
3
3
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
4
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
package/dist/client/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
9
9
|
<title>Evalution</title>
|
|
10
10
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-B5TkxPbo.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-KCv8AeiY.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
@@ -17,13 +17,21 @@ type ExecutionInput = /** A value typed into the panel. */{
|
|
|
17
17
|
/**
|
|
18
18
|
* An object assembled from per-property inputs, so a resource can fill one
|
|
19
19
|
* field of an otherwise hand-edited object — `toolsContext`'s `db` beside
|
|
20
|
-
* its typed-in ids.
|
|
21
|
-
* any slot has yet.
|
|
20
|
+
* its typed-in ids.
|
|
22
21
|
*/
|
|
23
22
|
| {
|
|
24
23
|
kind: "object";
|
|
25
24
|
properties: Record<string, ExecutionInput>;
|
|
26
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* An array assembled from per-element inputs, so a resource can fill one
|
|
28
|
+
* element of an otherwise hand-edited array — a seeded task's `taskId`
|
|
29
|
+
* beside typed-in ids.
|
|
30
|
+
*/
|
|
31
|
+
| {
|
|
32
|
+
kind: "array";
|
|
33
|
+
elements: ExecutionInput[];
|
|
34
|
+
}
|
|
27
35
|
/**
|
|
28
36
|
* One of the run's named resource instances ({@link RunResources}), or one
|
|
29
37
|
* of its outputs — created by the provider at run time, once per run
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as FieldValues, $t as ValueCatalogGroup, A as DatasetRowsOverview, An as TraceCheckResult, At as SpanImagePart, B as AnnotationEvent, Bt as TraceChangeEvent, C as DatasetFieldShape, Cn as EvalRunProgress, Ct as ResourceInfo, D as DatasetRow, Dn as EvalTraceRun, Dt as SourceSpan, E as DatasetProviderInfo, En as EvalSummary, Et as RunResources, F as KnownColumnSpec, Ft as SpanTextPart, G as ChangeEventType, Gt as TraceLiveEvent, H as AnnotationKind, Ht as TraceEvalRun, I as AddPromptContext, It as SpanToolCallPart, J as ConflictChoices, Jt as TraceStreamEvent, K as ChatPromptUpdates, Kt as TraceProviderInfo, L as AddPromptField, Lt as SpanToolResultPart, M as ColumnPath, Mt as SpanMessage, N as DatasetColumnSpec, Nt as SpanMessageRole, O as DatasetRowSource, On as NewEvalDefinition, Ot as Span, P as ForeignColumnSpec, Pt as SpanReasoningPart, Q as ExtractedProps, Qt as ValueCatalog, R as Annotation, Rt as ToolSpanDetails, S as DatasetField, Sn as EvalRun, St as RebaseResult, T as DatasetPathChild, Tn as EvalRunSummary, Tt as ResourceScope, U as AnnotationSource, Ut as TraceGroup$1, V as AnnotationEventOp, Vt as TraceChangeType, W as CalleeBinding, Wt as TraceGroupQuery$1, X as ExecuteResponse, Xt as TraceWithSpans, Y as ExecuteRequest, Yt as TraceSummary, Z as ExecutionInput, Zt as UpdatePromptResponse, _ as isStandardSchema, _n as EvalInputs, _t as PromptStyle, a as check, an as VersionId, at as NormalizedPrompt, b as DatasetChangeEvent, bn as EvalRowResult, bt as PropValue, c as ResolvedResourceInputs, cn as EvalArmSpec, ct as NormalizedQuestionsPrompt, d as ResourceInput, dn as EvalCheck, dt as PendingConflicts, en as ValueCatalogPreset, et as InputLayout, f as ResourceInputs, fn as EvalCheckOutcome, ft as PromptChangeEvent, g as isResource, gn as EvalDefinitionPatch, gt as PromptRef, h as StaticResourceDefinition, hn as EvalDefinition, ht as PromptProviderInfo, i as CheckRun, in as VariationInfo, it as NormalizedParameter, j as DatasetSummary, jt as SpanKind, k as DatasetRowUpdate, kn as NewEvalRun, kt as SpanContentPart, l as Resource, ln as EvalChangeEvent, lt as NormalizedToolCall, m as ResourceOutputDefinition, mn as EvalCounts, mt as PromptInputSources, n as CheckDefinition, nn as VariationConflict, nt as NormalizedChatPrompt, o as isCheck, on as VersionInfo, ot as NormalizedPromptBase, p as ResourceInstance, pn as EvalCheckResult, pt as PromptID, q as CheckInfo, qt as TraceQuery$1, r as CheckOutcome, rn as VariationId, rt as NormalizedMessage, s as DynamicResourceDefinition, sn as EvalArm, st as NormalizedPromptUpdates, t as Check, tn as ValueFactory, tt as LLMSpanDetails, u as ResourceDefinition, un as EvalChangeType, ut as ParsedPrompt, v as resource, vn as EvalProviderInfo, vt as PropDefinition, w as DatasetInstanceShape, wn as EvalRunStatus, wt as ResourceInstanceInput, x as DatasetChangeType, xn as EvalRowStatus, xt as QuestionsPromptUpdates, y as Dataset, yn as EvalResults, yt as PropType, z as AnnotationChanges, zt as Trace } from "./check-
|
|
1
|
+
import { $ as FieldValues, $t as ValueCatalogGroup, A as DatasetRowsOverview, An as TraceCheckResult, At as SpanImagePart, B as AnnotationEvent, Bt as TraceChangeEvent, C as DatasetFieldShape, Cn as EvalRunProgress, Ct as ResourceInfo, D as DatasetRow, Dn as EvalTraceRun, Dt as SourceSpan, E as DatasetProviderInfo, En as EvalSummary, Et as RunResources, F as KnownColumnSpec, Ft as SpanTextPart, G as ChangeEventType, Gt as TraceLiveEvent, H as AnnotationKind, Ht as TraceEvalRun, I as AddPromptContext, It as SpanToolCallPart, J as ConflictChoices, Jt as TraceStreamEvent, K as ChatPromptUpdates, Kt as TraceProviderInfo, L as AddPromptField, Lt as SpanToolResultPart, M as ColumnPath, Mt as SpanMessage, N as DatasetColumnSpec, Nt as SpanMessageRole, O as DatasetRowSource, On as NewEvalDefinition, Ot as Span, P as ForeignColumnSpec, Pt as SpanReasoningPart, Q as ExtractedProps, Qt as ValueCatalog, R as Annotation, Rt as ToolSpanDetails, S as DatasetField, Sn as EvalRun, St as RebaseResult, T as DatasetPathChild, Tn as EvalRunSummary, Tt as ResourceScope, U as AnnotationSource, Ut as TraceGroup$1, V as AnnotationEventOp, Vt as TraceChangeType, W as CalleeBinding, Wt as TraceGroupQuery$1, X as ExecuteResponse, Xt as TraceWithSpans, Y as ExecuteRequest, Yt as TraceSummary, Z as ExecutionInput, Zt as UpdatePromptResponse, _ as isStandardSchema, _n as EvalInputs, _t as PromptStyle, a as check, an as VersionId, at as NormalizedPrompt, b as DatasetChangeEvent, bn as EvalRowResult, bt as PropValue, c as ResolvedResourceInputs, cn as EvalArmSpec, ct as NormalizedQuestionsPrompt, d as ResourceInput, dn as EvalCheck, dt as PendingConflicts, en as ValueCatalogPreset, et as InputLayout, f as ResourceInputs, fn as EvalCheckOutcome, ft as PromptChangeEvent, g as isResource, gn as EvalDefinitionPatch, gt as PromptRef, h as StaticResourceDefinition, hn as EvalDefinition, ht as PromptProviderInfo, i as CheckRun, in as VariationInfo, it as NormalizedParameter, j as DatasetSummary, jt as SpanKind, k as DatasetRowUpdate, kn as NewEvalRun, kt as SpanContentPart, l as Resource, ln as EvalChangeEvent, lt as NormalizedToolCall, m as ResourceOutputDefinition, mn as EvalCounts, mt as PromptInputSources, n as CheckDefinition, nn as VariationConflict, nt as NormalizedChatPrompt, o as isCheck, on as VersionInfo, ot as NormalizedPromptBase, p as ResourceInstance, pn as EvalCheckResult, pt as PromptID, q as CheckInfo, qt as TraceQuery$1, r as CheckOutcome, rn as VariationId, rt as NormalizedMessage, s as DynamicResourceDefinition, sn as EvalArm, st as NormalizedPromptUpdates, t as Check, tn as ValueFactory, tt as LLMSpanDetails, u as ResourceDefinition, un as EvalChangeType, ut as ParsedPrompt, v as resource, vn as EvalProviderInfo, vt as PropDefinition, w as DatasetInstanceShape, wn as EvalRunStatus, wt as ResourceInstanceInput, x as DatasetChangeType, xn as EvalRowStatus, xt as QuestionsPromptUpdates, y as Dataset, yn as EvalResults, yt as PropType, z as AnnotationChanges, zt as Trace } from "./check-BTQoueDx.js";
|
|
2
2
|
import { a as NormalizedOtlpEvent, i as decodeOtlpProtobuf, n as mergeSpans, o as NormalizedOtlpSpan, r as OtlpTraceIngestor, s as normalizeOtlpRequest, t as TraceEventIngestor } from "./trace-event-ingestor-D2zmkQm1.js";
|
|
3
3
|
import { Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { PropDefinition as PropDefinition$1, PropValue as PropValue$1 } from "ts-proppy";
|
|
@@ -332,10 +332,11 @@ interface InputSlot {
|
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
334
|
* Flatten `definitions` into every slot a source could be matched against —
|
|
335
|
-
* each parameter, plus the object properties nested inside it
|
|
335
|
+
* each parameter, plus the object properties nested inside it, plus one
|
|
336
|
+
* element slot (`ELEMENT_SLOT`) per array for all of its elements.
|
|
336
337
|
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
338
|
+
* Unions are not descended into: a union has no one shape for a path to
|
|
339
|
+
* name.
|
|
339
340
|
*
|
|
340
341
|
* @param definitions - The parameters to flatten.
|
|
341
342
|
* @param prefix - Path prefix, used when recursing.
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as promptIdOf, Ct as registerFreshImportHook, D as DEFAULT_QUERY_TIMEOUT_MS, E as DEFAULT_MAX_QUERY_ROWS, F as DatasetNotFoundError, I as DatasetValidationError, L as DEFAULT_EVAL_CONCURRENCY, O as SqlQueryError, R as EvalRunRefusedError, S as VariationConflictError, St as isFreshImportHookRegistered, T as EvalNotFoundError, _ as assertSqliteFile, _t as isStandardSchema, a as CloudTraceProvider, at as collectInputSlots, b as rollupSpans, bt as isVariationLoaderHookRegistered, c as LocalEvalProvider, d as runEvalMigrations, dt as DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, f as LocalDirectoryDatasetProvider, ft as ResourceRegistry, g as runMigrations, gt as isResource, h as MIGRATIONS_TABLE, ht as isValidInstanceName, i as BaseTraceProvider, it as stampReceipts, l as openLocalEvalProvider, lt as namedBindings, m as runDatasetMigrations, mt as resourceParameterNames, n as TursoTraceProvider, nt as resolveExecutionInput, o as WorkspaceSync, ot as findInputCycle, p as TursoDatasetProvider, pt as parameterDetails, r as TRACE_QUERY_SCHEMA, rt as resolveExecutionInputs, s as DatabaseSync, st as inputReferenceProblems, t as LocalDatabaseTraceProvider, tt as matchSourcesToSlots, u as TursoEvalProvider, ut as DEFAULT_PLAYGROUND_IGNORE_PATTERNS, v as createLocalTursoClient, vt as resource, w as toPromptRef, xt as registerVariationLoaderHook, y as mkdirSelfIgnoring, yt as LocalFileProvider, z as EvalRunner } from "./local-database-trace-provider-
|
|
1
|
+
import { C as promptIdOf, Ct as registerFreshImportHook, D as DEFAULT_QUERY_TIMEOUT_MS, E as DEFAULT_MAX_QUERY_ROWS, F as DatasetNotFoundError, I as DatasetValidationError, L as DEFAULT_EVAL_CONCURRENCY, O as SqlQueryError, R as EvalRunRefusedError, S as VariationConflictError, St as isFreshImportHookRegistered, T as EvalNotFoundError, _ as assertSqliteFile, _t as isStandardSchema, a as CloudTraceProvider, at as collectInputSlots, b as rollupSpans, bt as isVariationLoaderHookRegistered, c as LocalEvalProvider, d as runEvalMigrations, dt as DEFAULT_PLAYGROUND_INCLUDE_PATTERNS, f as LocalDirectoryDatasetProvider, ft as ResourceRegistry, g as runMigrations, gt as isResource, h as MIGRATIONS_TABLE, ht as isValidInstanceName, i as BaseTraceProvider, it as stampReceipts, l as openLocalEvalProvider, lt as namedBindings, m as runDatasetMigrations, mt as resourceParameterNames, n as TursoTraceProvider, nt as resolveExecutionInput, o as WorkspaceSync, ot as findInputCycle, p as TursoDatasetProvider, pt as parameterDetails, r as TRACE_QUERY_SCHEMA, rt as resolveExecutionInputs, s as DatabaseSync, st as inputReferenceProblems, t as LocalDatabaseTraceProvider, tt as matchSourcesToSlots, u as TursoEvalProvider, ut as DEFAULT_PLAYGROUND_IGNORE_PATTERNS, v as createLocalTursoClient, vt as resource, w as toPromptRef, xt as registerVariationLoaderHook, y as mkdirSelfIgnoring, yt as LocalFileProvider, z as EvalRunner } from "./local-database-trace-provider-Ygd0PVZQ.js";
|
|
2
2
|
import { _ as isCheck, g as check, n as builtinCheck, r as builtinCheckInfos } from "./checks-Cq97JU-h.js";
|
|
3
3
|
import { a as readKind, c as normalizeOtlpRequest, f as shortId, i as mapStatus, l as isEditable, n as OtlpTraceIngestor, o as mergeSpans, r as llmAndPrompt, s as decodeOtlpProtobuf, t as TraceEventIngestor } from "./trace-event-ingestor-Bu2FKHC4.js";
|
|
4
4
|
import "node:module";
|
|
@@ -1688,9 +1688,8 @@ const PRIMITIVE_FLAGS = ts.TypeFlags.StringLike | ts.TypeFlags.NumberLike | ts.T
|
|
|
1688
1688
|
* see {@link PRIMITIVE_FLAGS}), a function, or a type `isOpaqueType` calls
|
|
1689
1689
|
* unconstructible (a class-instance handle, an all-method interface) — the
|
|
1690
1690
|
* same {@link isOpaqueType} the `PropDefinition` side uses to decide `kind:
|
|
1691
|
-
* 'opaque'` rather than `'object'`.
|
|
1692
|
-
*
|
|
1693
|
-
* shape, so a saved selection could not name one reliably.
|
|
1691
|
+
* 'opaque'` rather than `'object'`. Unions are not descended into either;
|
|
1692
|
+
* an array gets one {@link ELEMENT_SLOT} for all its elements.
|
|
1694
1693
|
*/
|
|
1695
1694
|
function collectSlotTypes(roots, typeChecker, location) {
|
|
1696
1695
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -1698,7 +1697,13 @@ function collectSlotTypes(roots, typeChecker, location) {
|
|
|
1698
1697
|
if (slots.size >= MAX_SLOTS) return;
|
|
1699
1698
|
slots.set(prefix, type);
|
|
1700
1699
|
if (depth + 1 >= 4) return;
|
|
1701
|
-
|
|
1700
|
+
const array = typeChecker.getNonNullableType(type);
|
|
1701
|
+
if (typeChecker.isArrayType(array)) {
|
|
1702
|
+
const [element] = typeChecker.getTypeArguments(array);
|
|
1703
|
+
if (element) walk(`${prefix}.[]`, element, depth + 1);
|
|
1704
|
+
return;
|
|
1705
|
+
}
|
|
1706
|
+
if (type.isUnion()) return;
|
|
1702
1707
|
if (typeChecker.isTupleType(type)) return;
|
|
1703
1708
|
if (type.flags & PRIMITIVE_FLAGS) return;
|
|
1704
1709
|
if (type.isIntersection() && type.types.some((t) => t.flags & PRIMITIVE_FLAGS)) return;
|
package/dist/{local-database-trace-provider-Dy64Lll3.js → local-database-trace-provider-Ygd0PVZQ.js}
RENAMED
|
@@ -1217,11 +1217,20 @@ var ResourceRegistry = class {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
};
|
|
1219
1219
|
/**
|
|
1220
|
+
* Whether slot `path` is (or is inside) an array's {@link ELEMENT_SLOT}: a
|
|
1221
|
+
* slot sources are matched against, but not one an `input` reference can
|
|
1222
|
+
* name, since it stands for no one element.
|
|
1223
|
+
*/
|
|
1224
|
+
function isElementSlot(path) {
|
|
1225
|
+
return path.split(".").includes("[]");
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1220
1228
|
* Flatten `definitions` into every slot a source could be matched against —
|
|
1221
|
-
* each parameter, plus the object properties nested inside it
|
|
1229
|
+
* each parameter, plus the object properties nested inside it, plus one
|
|
1230
|
+
* element slot (`ELEMENT_SLOT`) per array for all of its elements.
|
|
1222
1231
|
*
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1232
|
+
* Unions are not descended into: a union has no one shape for a path to
|
|
1233
|
+
* name.
|
|
1225
1234
|
*
|
|
1226
1235
|
* @param definitions - The parameters to flatten.
|
|
1227
1236
|
* @param prefix - Path prefix, used when recursing.
|
|
@@ -1235,7 +1244,12 @@ function collectInputSlots(definitions, prefix = "", depth = 0) {
|
|
|
1235
1244
|
name: def.name,
|
|
1236
1245
|
type: def.type
|
|
1237
1246
|
});
|
|
1238
|
-
if (
|
|
1247
|
+
if (depth + 1 >= 4) continue;
|
|
1248
|
+
if (def.type.kind === "object") slots.push(...collectInputSlots(def.type.properties, path, depth + 1));
|
|
1249
|
+
else if (def.type.kind === "array") slots.push(...collectInputSlots([{
|
|
1250
|
+
...def.type.element,
|
|
1251
|
+
name: "[]"
|
|
1252
|
+
}], path, depth + 1));
|
|
1239
1253
|
}
|
|
1240
1254
|
return slots;
|
|
1241
1255
|
}
|
|
@@ -1271,6 +1285,7 @@ function locationKey(loc) {
|
|
|
1271
1285
|
const KNOWN_KINDS = new Set(Object.keys({
|
|
1272
1286
|
value: true,
|
|
1273
1287
|
object: true,
|
|
1288
|
+
array: true,
|
|
1274
1289
|
input: true,
|
|
1275
1290
|
instance: true,
|
|
1276
1291
|
dataset: true
|
|
@@ -1280,6 +1295,7 @@ function instanceNames(input) {
|
|
|
1280
1295
|
switch (input.kind) {
|
|
1281
1296
|
case "instance": return [input.name];
|
|
1282
1297
|
case "object": return Object.values(input.properties).flatMap(instanceNames);
|
|
1298
|
+
case "array": return input.elements.flatMap(instanceNames);
|
|
1283
1299
|
default: return [];
|
|
1284
1300
|
}
|
|
1285
1301
|
}
|
|
@@ -1298,6 +1314,14 @@ function findRefs(bindings, unsupported) {
|
|
|
1298
1314
|
path: `${at.path}.${k}`
|
|
1299
1315
|
});
|
|
1300
1316
|
break;
|
|
1317
|
+
case "array":
|
|
1318
|
+
node.elements.forEach((child, i) => {
|
|
1319
|
+
walk(child, "instance" in at ? at : {
|
|
1320
|
+
half: at.half,
|
|
1321
|
+
path: `${at.path}.${i}`
|
|
1322
|
+
});
|
|
1323
|
+
});
|
|
1324
|
+
break;
|
|
1301
1325
|
case "input":
|
|
1302
1326
|
found.push({
|
|
1303
1327
|
at,
|
|
@@ -1373,11 +1397,15 @@ function findInputCycle(bindings) {
|
|
|
1373
1397
|
if (cycle) return cycle;
|
|
1374
1398
|
}
|
|
1375
1399
|
}
|
|
1376
|
-
/**
|
|
1400
|
+
/**
|
|
1401
|
+
* Every slot path an `input` reference into `signature` can name, by half:
|
|
1402
|
+
* every slot but an array's {@link ELEMENT_SLOT}s.
|
|
1403
|
+
*/
|
|
1377
1404
|
function slotPaths(signature) {
|
|
1405
|
+
const referenceable = (params) => new Set(collectInputSlots(params).map((s) => s.path).filter((p) => !isElementSlot(p)));
|
|
1378
1406
|
return {
|
|
1379
|
-
function:
|
|
1380
|
-
execute:
|
|
1407
|
+
function: referenceable(signature.functionParameters),
|
|
1408
|
+
execute: referenceable(signature.executeParameters ?? [])
|
|
1381
1409
|
};
|
|
1382
1410
|
}
|
|
1383
1411
|
/**
|
|
@@ -1514,6 +1542,7 @@ async function resolveWithin(input, resolver, context, chain) {
|
|
|
1514
1542
|
const entries = await Promise.all(Object.entries(input.properties).map(async ([k, v]) => [k, await recurse(v)]));
|
|
1515
1543
|
return Object.fromEntries(entries);
|
|
1516
1544
|
}
|
|
1545
|
+
case "array": return Promise.all(input.elements.map((element) => recurse(element)));
|
|
1517
1546
|
case "instance":
|
|
1518
1547
|
if (!resolver) throw new Error(`Cannot resolve resource '${input.name}': this provider does not offer resources.`);
|
|
1519
1548
|
return resolver.acquire(input.name, input.output);
|
|
@@ -1815,6 +1844,12 @@ function parseInput(value, path, columns) {
|
|
|
1815
1844
|
kind: "object",
|
|
1816
1845
|
properties: Object.fromEntries(Object.entries(value.properties).map(([k, v]) => [k, recurse(v, `${path}.properties.${k}`)]))
|
|
1817
1846
|
};
|
|
1847
|
+
case "array":
|
|
1848
|
+
if (!Array.isArray(value.elements)) throw new InvalidCellError(`${path}.elements must be an array`);
|
|
1849
|
+
return {
|
|
1850
|
+
kind: "array",
|
|
1851
|
+
elements: value.elements.map((v, i) => recurse(v, `${path}.elements.${i}`))
|
|
1852
|
+
};
|
|
1818
1853
|
case "instance":
|
|
1819
1854
|
if (typeof value.name !== "string" || value.name === "") throw new InvalidCellError(`${path}.name must be a non-empty string`);
|
|
1820
1855
|
if (value.output !== void 0 && typeof value.output !== "string") throw new InvalidCellError(`${path}.output must be a string`);
|
|
@@ -1839,8 +1874,8 @@ function parseInput(value, path, columns) {
|
|
|
1839
1874
|
field: value.field
|
|
1840
1875
|
};
|
|
1841
1876
|
}
|
|
1842
|
-
throw new InvalidCellError(`${path} is a column reference; a dataset cell must hold a value, object, resource, or slot reference`);
|
|
1843
|
-
default: throw new InvalidCellError(`${path}.kind must be "value", "object", "instance", or "input"`);
|
|
1877
|
+
throw new InvalidCellError(`${path} is a column reference; a dataset cell must hold a value, object, array, resource, or slot reference`);
|
|
1878
|
+
default: throw new InvalidCellError(`${path}.kind must be "value", "object", "array", "instance", or "input"`);
|
|
1844
1879
|
}
|
|
1845
1880
|
}
|
|
1846
1881
|
/**
|
|
@@ -1899,6 +1934,7 @@ function columnRefs(input) {
|
|
|
1899
1934
|
switch (input.kind) {
|
|
1900
1935
|
case "dataset": return [input.field];
|
|
1901
1936
|
case "object": return Object.values(input.properties).flatMap(columnRefs);
|
|
1937
|
+
case "array": return input.elements.flatMap(columnRefs);
|
|
1902
1938
|
default: return [];
|
|
1903
1939
|
}
|
|
1904
1940
|
}
|
|
@@ -1907,6 +1943,7 @@ function slotRefs(input) {
|
|
|
1907
1943
|
switch (input.kind) {
|
|
1908
1944
|
case "input": return [input];
|
|
1909
1945
|
case "object": return Object.values(input.properties).flatMap(slotRefs);
|
|
1946
|
+
case "array": return input.elements.flatMap(slotRefs);
|
|
1910
1947
|
default: return [];
|
|
1911
1948
|
}
|
|
1912
1949
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset } from "./dataset-types-
|
|
1
|
+
import { i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset } from "./dataset-types-0N5KYU1i.js";
|
|
2
2
|
import { TraceWithSpans } from "@evalution/sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/views/view.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as ResourceInstanceInput, a as ColumnPath, c as PathRow, d as childInputs, f as fieldPath, g as ExecutionInput, h as resolveColumnPath, l as PathValue, m as readColumnPath, n as DatasetRow, o as InstanceArgument, p as instancePath, r as DatasetRowUpdate, s as MAX_REFERENCE_HOPS, u as ResolvedPath } from "../../dataset-types-
|
|
1
|
+
import { _ as ResourceInstanceInput, a as ColumnPath, c as PathRow, d as childInputs, f as fieldPath, g as ExecutionInput, h as resolveColumnPath, l as PathValue, m as readColumnPath, n as DatasetRow, o as InstanceArgument, p as instancePath, r as DatasetRowUpdate, s as MAX_REFERENCE_HOPS, u as ResolvedPath } from "../../dataset-types-0N5KYU1i.js";
|
|
2
2
|
|
|
3
3
|
//#region src/views/datasets/index.d.ts
|
|
4
4
|
/** Where an instance reference sits in a row. */
|
|
@@ -126,6 +126,11 @@ function referencesIn(input, path, site, out) {
|
|
|
126
126
|
case "object":
|
|
127
127
|
for (const [key, child] of Object.entries(input.properties)) referencesIn(child, [...path, key], site, out);
|
|
128
128
|
break;
|
|
129
|
+
case "array":
|
|
130
|
+
input.elements.forEach((child, i) => {
|
|
131
|
+
referencesIn(child, [...path, String(i)], site, out);
|
|
132
|
+
});
|
|
133
|
+
break;
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
/** Every instance reference in the row: from where, to which instance and output. */
|
package/dist/views/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as ResourceInstanceInput, g as ExecutionInput, i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, v as RunResources } from "../dataset-types-
|
|
2
|
-
import { _ as VIEW_TAG, a as DatasetViewContext, b as ViewProps, c as DatasetViewSubject, d as ActionEffect, f as SendAction, g as MountedView, h as SurfaceState, i as traceView, l as SelectedRow, m as SurfaceAction, n as TraceViewDefinition, o as DatasetViewDefinition, p as Surface, r as TraceViewProps, s as DatasetViewProps, t as TraceViewContext, u as datasetView, v as View, x as isView, y as ViewDefinition } from "../trace-
|
|
1
|
+
import { _ as ResourceInstanceInput, g as ExecutionInput, i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, v as RunResources } from "../dataset-types-0N5KYU1i.js";
|
|
2
|
+
import { _ as VIEW_TAG, a as DatasetViewContext, b as ViewProps, c as DatasetViewSubject, d as ActionEffect, f as SendAction, g as MountedView, h as SurfaceState, i as traceView, l as SelectedRow, m as SurfaceAction, n as TraceViewDefinition, o as DatasetViewDefinition, p as Surface, r as TraceViewProps, s as DatasetViewProps, t as TraceViewContext, u as datasetView, v as View, x as isView, y as ViewDefinition } from "../trace-BEwHfdpe.js";
|
|
3
3
|
import { Span, Trace, TraceWithSpans } from "@evalution/sdk";
|
|
4
4
|
|
|
5
5
|
//#region src/views/protocol.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ViewProps, g as MountedView, l as SelectedRow, r as TraceViewProps, s as DatasetViewProps } from "../../trace-
|
|
1
|
+
import { b as ViewProps, g as MountedView, l as SelectedRow, r as TraceViewProps, s as DatasetViewProps } from "../../trace-BEwHfdpe.js";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/views/react/index.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evalution",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "TypeScript AI Prompt Playground - Edit and execute AI prompts with live preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"node": ">=22.18.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@evalution/sdk": "2.0.
|
|
46
|
+
"@evalution/sdk": "2.0.6",
|
|
47
47
|
"@hono/node-server": "^2.0.4",
|
|
48
48
|
"@lydell/node-pty": "^1.2.0-beta.12",
|
|
49
49
|
"@modelcontextprotocol/client": "^2.2.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"hono": "^4.12.23",
|
|
62
62
|
"minimatch": "^10.2.4",
|
|
63
63
|
"remark-breaks": "^4.0.0",
|
|
64
|
-
"ts-proppy": "0.3.
|
|
64
|
+
"ts-proppy": "^0.3.4",
|
|
65
65
|
"ws": "^8.21.0",
|
|
66
66
|
"zod": "^4.6.5"
|
|
67
67
|
},
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"@ai-sdk/openai": "^4.0.73",
|
|
98
98
|
"@ai-sdk/typesafe-ai": "^3.0.5",
|
|
99
99
|
"@biomejs/biome": "^2.5.0",
|
|
100
|
-
"@evalution/gemini-interactions-sdk": "2.0.
|
|
101
|
-
"@evalution/typesafe-sdk": "2.0.
|
|
102
|
-
"@evalution/vercel-ai-sdk": "2.0.
|
|
100
|
+
"@evalution/gemini-interactions-sdk": "2.0.6",
|
|
101
|
+
"@evalution/typesafe-sdk": "2.0.6",
|
|
102
|
+
"@evalution/vercel-ai-sdk": "2.0.6",
|
|
103
103
|
"@glideapps/glide-data-grid": "6.0.4-alpha24",
|
|
104
104
|
"@google/genai": "^2.9.0",
|
|
105
105
|
"@playwright/experimental-ct-react": "^1.58.2",
|