@marimo-team/frontend 0.23.2-dev62 → 0.23.2-dev65
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/assets/{JsonOutput-Cib1YSyW.js → JsonOutput-B7SdSwth.js} +10 -10
- package/dist/assets/{add-connection-dialog-BEPj8ARO.js → add-connection-dialog-eBEz1Rlx.js} +1 -1
- package/dist/assets/{agent-panel-j9gn23Bw.js → agent-panel-DdQIPV4s.js} +1 -1
- package/dist/assets/{cell-editor-DzvGVpZ4.js → cell-editor-DTCP63YJ.js} +1 -1
- package/dist/assets/{column-preview-B9m4l29S.js → column-preview-M5tW9DeW.js} +1 -1
- package/dist/assets/{command-palette-NX0xxB_G.js → command-palette-ExiY3B81.js} +1 -1
- package/dist/assets/{edit-page-Omreus8k.js → edit-page-BTwAqki-.js} +3 -3
- package/dist/assets/{file-explorer-panel-Bep-85KO.js → file-explorer-panel-CuPnqR_c.js} +1 -1
- package/dist/assets/{form-DBaVPTFv.js → form-D76nZZF7.js} +1 -1
- package/dist/assets/{glide-data-editor-n2Pw7Fk9.js → glide-data-editor-CKiZFI5U.js} +16 -16
- package/dist/assets/{hooks-B2ArfcJq.js → hooks-BSyCiOiV.js} +1 -1
- package/dist/assets/{index-D6-su6XF.js → index-BRf5dlJi.js} +4 -4
- package/dist/assets/{layout-Cp0JtSeH.js → layout-BULJlgp-.js} +3 -3
- package/dist/assets/{panels-rhd1T559.js → panels-D7Ix_ZZ-.js} +1 -1
- package/dist/assets/{reveal-component-B_RnD8qR.js → reveal-component-BFqPeIsQ.js} +1 -1
- package/dist/assets/{run-page-DJpwa_b_.js → run-page-LlaD7bx4.js} +1 -1
- package/dist/assets/{scratchpad-panel-Ba0rcWha.js → scratchpad-panel-DEAn87uP.js} +1 -1
- package/dist/assets/{session-panel-DY3Z3ICZ.js → session-panel-DrVK3__u.js} +1 -1
- package/dist/assets/{slide-Bv2zR5_1.js → slide-szdKdcoM.js} +1 -1
- package/dist/assets/{state-DwYUxIVe.js → state-Do4CKYxK.js} +1 -1
- package/dist/assets/{useNotebookActions-BcUD5CgV.js → useNotebookActions-maZjRwJd.js} +1 -1
- package/dist/index.html +5 -5
- package/package.json +1 -1
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +14 -14
- package/src/components/data-table/__tests__/types.test.ts +34 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +6 -3
- package/src/components/data-table/column-summary/column-summary.tsx +1 -1
- package/src/components/data-table/types.ts +9 -7
- package/src/plugins/impl/DataEditorPlugin.tsx +7 -3
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +147 -149
- package/src/plugins/impl/data-editor/data-utils.ts +12 -11
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as k}from"./useEvent-D91BmmQi.js";import{o as j}from"./cells-BA9ZN5Xy.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_ as I,d as E}from"./useEventListener-BR0C1MaI.js";import{i as _}from"./utils-DIGrmLDO.js";import{h as N,x as P}from"./config-Calf6e81.js";import{s as z,u as D}from"./download-rCRPD7IF.js";import{r as $}from"./requests-DIwGYs0l.js";import{k as B}from"./layout-
|
|
1
|
+
var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as k}from"./useEvent-D91BmmQi.js";import{o as j}from"./cells-BA9ZN5Xy.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_ as I,d as E}from"./useEventListener-BR0C1MaI.js";import{i as _}from"./utils-DIGrmLDO.js";import{h as N,x as P}from"./config-Calf6e81.js";import{s as z,u as D}from"./download-rCRPD7IF.js";import{r as $}from"./requests-DIwGYs0l.js";import{k as B}from"./layout-BULJlgp-.js";import{t as H}from"./Deferred-Bk0r4KDZ.js";import{t as L}from"./use-toast-PYIpV284.js";import{t as x}from"./useInterval-BePSL0QQ.js";var R=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let i=this.inFlight.get(t);return!(i&&i.inputValue===e)}waitForInFlight(t,e){let i=this.inFlight.get(t);return i&&i.inputValue===e?i.deferred.promise:null}startCapture(t,e){let i=this.inFlight.get(t);i&&this.cancelEntry(i);let n=new AbortController,l=new H,u={controller:n,inputValue:e,deferred:l};return this.inFlight.set(t,u),{signal:n.signal,markCaptured:p=>{this.inFlight.get(t)===u&&(l.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===u&&(l.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,i]of this.inFlight)t.has(e)||(this.cancelEntry(i),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},Y=T(),M=5e3;function q(){let t=(0,Y.c)(14),e=k(_),{state:i}=k(N),n=e.auto_download.includes("markdown"),l=e.auto_download.includes("html"),u=e.auto_download.includes("ipynb"),p=i===P.OPEN,m=!n||!p,d=!l||!p,h=!u||!p,{autoExportAsHTML:a,autoExportAsIPYNB:s,autoExportAsMarkdown:r,updateCellOutputs:o}=$(),c=S(),f;t[0]===r?f=t[1]:(f=async()=>{await r({download:!1})},t[0]=r,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:M,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===a?w=t[5]:(w=async()=>{await a({download:!1,includeCode:!0,files:B.INSTANCE.filenames()})},t[4]=a,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:M,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==s||t[9]!==c||t[10]!==o?(F=async()=>{await A({takeScreenshots:()=>c({progress:D.indeterminate()}),updateCellOutputs:o}),await s({download:!1})},t[8]=s,t[9]=c,t[10]=o,t[11]=F):F=t[11];let y;t[12]===h?y=t[13]:(y={delayMs:M,whenVisible:!0,disabled:h,skipIfRunning:!0},t[12]=h,t[13]=y),x(F,y)}var G=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new R;function S(){let t=k(j);return async e=>{var d,h;let{progress:i}=e,n=new Set(E.keys(t));C.prune(n);let l=[],u=[];for(let[a,s]of E.entries(t)){let r=(d=s.output)==null?void 0:d.data;if((h=s.output)!=null&&h.mimetype&&G.has(s.output.mimetype)&&r)if(C.needsCapture(a,r))l.push([a,r]);else{let o=C.waitForInFlight(a,r);o&&u.push({cellId:a,promise:o})}}if(l.length===0&&u.length===0)return{};l.length>0&&i.addTotal(l.length);let p={};for(let[a,s]of l){let r=C.startCapture(a,s);try{let o=await z(a);if(r.signal.aborted)continue;if(!o){I.error(`Failed to capture screenshot for cell ${a}`),r.markFailed();continue}let c=["image/png",o];p[a]=c,r.markCaptured(c)}catch(o){I.error(`Error screenshotting cell ${a}:`,o),r.markFailed()}finally{i.increment(1)}}let m=await Promise.allSettled(u.map(({promise:a})=>a));for(let[a,{cellId:s}]of u.entries()){let r=m[a];r.status==="fulfilled"&&r.value&&(p[s]=r.value)}return p}}async function A(t){let{takeScreenshots:e,updateCellOutputs:i}=t;try{let n=await e();E.size(n)>0&&await i({cellIdsToOutput:n})}catch(n){I.error("Error updating cell outputs with screenshots:",n),L({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}export{q as n,S as r,A as t};
|