@marimo-team/frontend 0.25.3-dev105 → 0.25.3-dev111
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/{CellStatus-DVrvejMC.js → CellStatus-_Aw9_foI.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-Dft8R6l5.js → ConnectedDataExplorerComponent-BRgqbAsc.js} +1 -1
- package/dist/assets/{ErrorBoundary-0akNKvJm.js → ErrorBoundary-DxSzjvbx.js} +2 -2
- package/dist/assets/{JsonOutput-DeUmpc_f.js → JsonOutput-B7pGj79O.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-BazxeAYV.js → MarimoErrorOutput-Bzo6Bkp5.js} +1 -1
- package/dist/assets/{RenderHTML-CbAdeual.js → RenderHTML-D6AC0IhC.js} +1 -1
- package/dist/assets/{RunButton-CjKwgCFU.js → RunButton-BjYsPiKa.js} +1 -1
- package/dist/assets/__vite-browser-external-CC-8m5lM.js +1 -0
- package/dist/assets/__vite-browser-external-XYxUVbCI.js +1 -0
- package/dist/assets/{add-cell-with-ai-BKVEws3J.js → add-cell-with-ai-DlpS2-wQ.js} +4 -4
- package/dist/assets/{add-connection-dialog-DS7LTz1T.js → add-connection-dialog-CyNAB_W2.js} +1 -1
- package/dist/assets/{agent-panel-B34QcdOK.js → agent-panel-_lzeDJ1g.js} +1 -1
- package/dist/assets/{ai-model-dropdown-DqFJCFVR.js → ai-model-dropdown-DSTTUxpi.js} +1 -1
- package/dist/assets/{app-config-button-CVh4UKi9.js → app-config-button-ChYKLsLO.js} +1 -1
- package/dist/assets/{blob-Bw0ZQoLx.js → blob-DTYOX-m5.js} +1 -1
- package/dist/assets/{cell-editor-DQ0io5Ye.js → cell-editor-Beg8ahPA.js} +2 -2
- package/dist/assets/{cell-link-DvOIu6A3.js → cell-link-D3rkqgbU.js} +1 -1
- package/dist/assets/{cells-Do-63MKT.js → cells-2HETnlvE.js} +5 -5
- package/dist/assets/{chat-display-DnkhBxdh.js → chat-display-0GIEXLvN.js} +1 -1
- package/dist/assets/{chat-panel-CN3qoX9G.js → chat-panel-BuWn4Z_F.js} +1 -1
- package/dist/assets/{chat-ui-B54K5qqr.js → chat-ui-X0s3vvdf.js} +1 -1
- package/dist/assets/{column-preview-DmxzHzaW.js → column-preview-yI7-INkZ.js} +1 -1
- package/dist/assets/{command-palette-CciCeRhy.js → command-palette-D6WLW1Ie.js} +1 -1
- package/dist/assets/{common-BCyx7t1i.js → common-DgXKwblm.js} +1 -1
- package/dist/assets/{components-CDvWXfXq.js → components-CuMhY4Sf.js} +1 -1
- package/dist/assets/{datasource-DieftweT.js → datasource-D9JMcEAP.js} +1 -1
- package/dist/assets/{dependency-graph-panel-IfcqTHgq.js → dependency-graph-panel-BVJWPCvw.js} +3 -3
- package/dist/assets/{documentation-panel-DeLCgVcq.js → documentation-panel--wI4XHso.js} +1 -1
- package/dist/assets/{download-BzfVCqUq.js → download-Dod42wfD.js} +1 -1
- package/dist/assets/{edit-page-HMyk4cWw.js → edit-page-DQIDFr6D.js} +4 -4
- package/dist/assets/{error-entries-DjjWrbt4.js → error-entries-D00nWhWE.js} +1 -1
- package/dist/assets/{error-panel-CiG3JJA3.js → error-panel-CcN_1PWf.js} +1 -1
- package/dist/assets/{feedback-button-B8zVQEi6.js → feedback-button-ByGgqUsX.js} +1 -1
- package/dist/assets/feedback-button-tbWwJ_t6.js +1 -0
- package/dist/assets/{file-explorer-panel-BPD8Q0L-.js → file-explorer-panel-eTEqtMPW.js} +1 -1
- package/dist/assets/{file-name-input-CdkF9K3I.js → file-name-input-D5SfTNWh.js} +1 -1
- package/dist/assets/{floating-outline-TfDWJXBm.js → floating-outline-B-k3P_AO.js} +1 -1
- package/dist/assets/{gallery-page-BJpenPdQ.js → gallery-page-BzbMhDHi.js} +1 -1
- package/dist/assets/{glide-data-editor-DO15Nm-R.js → glide-data-editor-BMqhUrHI.js} +1 -1
- package/dist/assets/{home-page-mvqldGvD.js → home-page-BvA1BCmX.js} +1 -1
- package/dist/assets/{hooks-C4AJfqV0.js → hooks-CaRBg2ni.js} +1 -1
- package/dist/assets/{index-C2XzUsS7.js → index-BK10QsEp.js} +9 -9
- package/dist/assets/{layout-1kSh6fBF.js → layout-C-NAerIZ.js} +3 -3
- package/dist/assets/{logs-panel--QbHo7uS.js → logs-panel-B3T1GFBk.js} +1 -1
- package/dist/assets/{markdown-renderer-DJ7H8Rps.js → markdown-renderer-BhiTvxtL.js} +1 -1
- package/dist/assets/{name-cell-input-6Gd19S8T.js → name-cell-input-CgAObR6N.js} +1 -1
- package/dist/assets/{outline-panel-CjKvunvX.js → outline-panel-BhBb7Vqw.js} +1 -1
- package/dist/assets/{packages-panel-Gyrqi-MZ.js → packages-panel-Dz8rOIrh.js} +1 -1
- package/dist/assets/{panel-accordion-state-D49TNCLQ.js → panel-accordion-state-ZsUdpAYn.js} +1 -1
- package/dist/assets/{panels-DfbxoeGa.js → panels-BYAbCxyB.js} +1 -1
- package/dist/assets/{process-output-CgkoeA1-.js → process-output-CeOMwE17.js} +1 -1
- package/dist/assets/{readonly-code-display-BMbl_4BR.js → readonly-code-display-TvOC7ESE.js} +1 -1
- package/dist/assets/{readonly-python-code-BnPfpOJM.js → readonly-python-code-Cqkfdeyo.js} +1 -1
- package/dist/assets/{reveal-component-D84yAzG7.js → reveal-component-y06O6YuH.js} +1 -1
- package/dist/assets/{run-page-B10s8Pre.js → run-page-WQVzpHJp.js} +1 -1
- package/dist/assets/{runtime-details-state-Bkmgb59p.js → runtime-details-state-CKqJSfSR.js} +1 -1
- package/dist/assets/{save-worker-pCkSHhuz.js → save-worker-hzK9hmkP.js} +1 -1
- package/dist/assets/{scratchpad-panel-DtyjJ3yN.js → scratchpad-panel-BW_HfG5l.js} +1 -1
- package/dist/assets/{session-panel-Chaq1do8.js → session-panel-CdHdKUCF.js} +1 -1
- package/dist/assets/{snippets-panel-BaZmddOW.js → snippets-panel-DYLWOLYw.js} +1 -1
- package/dist/assets/{spec-uCpVvaAR.js → spec-DlH4Mp7d.js} +1 -1
- package/dist/assets/{state-CqnCwHhY.js → state-DZN9vZ6z.js} +1 -1
- package/dist/assets/{state-Db73TZVD.js → state-Djmjs8Ik.js} +2 -2
- package/dist/assets/{tracing-C2vQMUI0.js → tracing-B0J2ctTm.js} +1 -1
- package/dist/assets/{tracing-panel-B4L2S2ac.js → tracing-panel-C1OCpoeE.js} +2 -2
- package/dist/assets/{tree-actions-JXDiioHK.js → tree-actions-sjBxIglc.js} +1 -1
- package/dist/assets/{useAddCell-CP3HIjGl.js → useAddCell-CaXnFGki.js} +1 -1
- package/dist/assets/{useCellActionButton-yi1_-emd.js → useCellActionButton-CJ90CMEj.js} +1 -1
- package/dist/assets/{useDeleteCell-BPLwyClM.js → useDeleteCell-D9N85822.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-DmBiydXO.js → useDependencyPanelTab-CzAE0cm-.js} +1 -1
- package/dist/assets/{useNotebookActions-CfmgcJGx.js → useNotebookActions-CTKkktJB.js} +1 -1
- package/dist/assets/{useRunCells-jF-7tJkw.js → useRunCells-DGakx8hj.js} +1 -1
- package/dist/assets/{useSplitCell-B6zWL8Zf.js → useSplitCell-AK5BKPGM.js} +1 -1
- package/dist/assets/{worker-bSCjCvwz.js → worker-C_3ZriwH.js} +1 -1
- package/dist/index.html +21 -21
- package/package.json +2 -2
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
- package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
- package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
- package/src/components/data-table/charts/charts.tsx +5 -5
- package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
- package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
- package/src/components/dependency-graph/elements.ts +24 -21
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
- package/src/components/editor/output/ansi-reduce.ts +30 -23
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
- package/src/core/ai/tools/base.ts +16 -7
- package/src/core/ai/tools/edit-notebook-tool.ts +47 -45
- package/src/core/ai/tools/registry.ts +13 -8
- package/src/core/ai/tools/sample-tool.ts +6 -7
- package/src/core/cells/__tests__/session.test.ts +117 -36
- package/src/core/codemirror/__tests__/setup.test.ts +28 -28
- package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
- package/src/core/codemirror/language/extension.ts +8 -8
- package/src/core/codemirror/language/languages/markdown.ts +8 -6
- package/src/core/codemirror/language/languages/python.ts +13 -7
- package/src/core/codemirror/language/languages/sql/sql.ts +9 -7
- package/src/core/codemirror/language/types.ts +7 -7
- package/src/core/codemirror/rtc/extension.ts +24 -12
- package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/codemirror/utils.ts +1 -0
- package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
- package/src/core/static/__tests__/files.test.ts +38 -10
- package/src/hooks/useDebounce.ts +1 -2
- package/src/hooks/useEventListener.ts +1 -2
- package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +15 -18
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
- package/src/plugins/impl/plotly/selection.ts +25 -19
- package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
- package/src/utils/tracer.ts +9 -5
- package/dist/assets/__vite-browser-external-8vDMR0Kk.js +0 -1
- package/dist/assets/__vite-browser-external-mKcnhO20.js +0 -1
- package/dist/assets/feedback-button-DQdMkSvR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{dr as n,ur as r}from"./cells-Do-63MKT.js";import{t as i}from"./compiler-runtime-BrajqUja.js";import{g as a}from"./useEventListener-CjDeLqFC.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-CkGm8X7m.js";import{t as c}from"./ban-YzvUro5I.js";import{a as l,n as u,o as d,t as f}from"./toDate-DOj9Q6uC.js";import{t as p}from"./ellipsis-63DyBLHQ.js";import{t as m}from"./refresh-cw-Qw1f8Jhy.js";import{t as h}from"./workflow-cw-0b9g5.js";import{t as g}from"./useDateFormatter-DA-62E-Y.js";import{i as _,n as v,r as y,t as b}from"./en-US-Buu61juQ.js";import{t as x}from"./multi-icon-DL465pPF.js";function S(e,t){let n=+f(e)-f(t);return n<0?-1:n>0?1:n}function C(e){return u(e,Date.now())}function w(e,t,n){let[r,i]=v(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function T(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function E(e,t){return+f(e)-f(t)}function D(e,t){let n=f(e,t?.in);return n.setHours(23,59,59,999),n}function O(e,t){let n=f(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function k(e,t){let n=f(e,t?.in);return+D(n,t)==+O(n,t)}function A(e,t,n){let[r,i,a]=v(n?.in,e,e,t),o=S(i,a),s=Math.abs(w(i,a));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let c=S(i,a)===-o;k(r)&&s===1&&S(r,a)===1&&(c=!1);let l=o*(s-+c);return l===0?0:l}function j(e,t,n){let r=E(e,t)/1e3;return T(n?.roundingMethod)(r)}function M(e,t,n){let r=_(),i=n?.locale??r.locale??b,a=S(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=v(n?.in,...a>0?[t,e]:[e,t]),u=j(c,s),f=(y(c)-y(s))/1e3,p=Math.round((u-f)/60),m;if(p<2)return n?.includeSeconds?u<5?i.formatDistance(`lessThanXSeconds`,5,o):u<10?i.formatDistance(`lessThanXSeconds`,10,o):u<20?i.formatDistance(`lessThanXSeconds`,20,o):u<40?i.formatDistance(`halfAMinute`,0,o):u<60?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,1,o):p===0?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,p,o);if(p<45)return i.formatDistance(`xMinutes`,p,o);if(p<90)return i.formatDistance(`aboutXHours`,1,o);if(p<1440){let e=Math.round(p/60);return i.formatDistance(`aboutXHours`,e,o)}if(p<2520)return i.formatDistance(`xDays`,1,o);if(p<43200){let e=Math.round(p/l);return i.formatDistance(`xDays`,e,o)}if(p<86400)return m=Math.round(p/d),i.formatDistance(`aboutXMonths`,m,o);if(m=A(c,s),m<12){let e=Math.round(p/d);return i.formatDistance(`xMonths`,e,o)}{let e=m%12,t=Math.trunc(m/12);return e<3?i.formatDistance(`aboutXYears`,t,o):e<9?i.formatDistance(`overXYears`,t,o):i.formatDistance(`almostXYears`,t+1,o)}}function N(e,t){return M(e,C(e),t)}var P=i(),F=e(t(),1);function I(e){let t=(0,P.c)(2),[n]=(0,F.useState)(e),[i,a]=(0,F.useState)(e),o,s;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=setInterval(()=>{a(r.now().toMilliseconds())},17);return()=>clearInterval(e)},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,F.useEffect)(o,s),i-n}var L=o(),R=e=>{let t=(0,P.c)(79),{editing:i,status:o,disabled:l,staleInputs:u,edited:d,interrupted:f,elapsedTime:g,runStartTimestamp:_,lastRunStartTimestamp:v,uninstantiated:y}=e;if(!i)return null;let b=_??v,S;t[0]===b?S=t[1]:(S=b?(0,L.jsx)(B,{lastRanTime:b}):null,t[0]=b,t[1]=S);let C=S;if(l&&o===`running`)return a.error(`CellStatusComponent: disabled and running`),null;if(l&&u){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is stale, but it's disabled and can't be run`}),t[2]=e):e=t[2];let n;t[3]===C?n=t[4]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[3]=C,t[4]=n);let r;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`stale`,children:(0,L.jsxs)(x,{children:[(0,L.jsx)(c,{className:`h-5 w-5`,strokeWidth:1.5}),(0,L.jsx)(m,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[5]=r):r=t[5];let i;return t[6]===n?i=t[7]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[6]=n,t[7]=i),i}if(l){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is disabled`}),t[8]=e):e=t[8];let n;t[9]===C?n=t[10]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[9]=C,t[10]=n);let r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-disabled`,"data-testid":`cell-status`,"data-status":`disabled`,children:(0,L.jsx)(c,{className:`h-5 w-5`,strokeWidth:1.5})}),t[11]=r):r=t[11];let i;return t[12]===n?i=t[13]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[12]=n,t[13]=i),i}if(!u&&o===`disabled-transitively`){let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`An ancestor of this cell is disabled, so it can't be run`}),t[14]=e):e=t[14];let n;t[15]===C?n=t[16]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[15]=C,t[16]=n);let r;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`disabled-transitively`,children:(0,L.jsxs)(x,{layerTop:!0,children:[(0,L.jsx)(h,{className:`h-5 w-5`,strokeWidth:1.5}),(0,L.jsx)(c,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[17]=r):r=t[17];let i;return t[18]===n?i=t[19]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[18]=n,t[19]=i),i}if(u&&o===`disabled-transitively`){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is stale, but an ancestor is disabled so it can't be run`}),t[20]=e):e=t[20];let n;t[21]===C?n=t[22]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[21]=C,t[22]=n);let r;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`stale`,children:(0,L.jsxs)(x,{children:[(0,L.jsx)(m,{className:`h-5 w-5`,strokeWidth:1}),(0,L.jsx)(c,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[23]=r):r=t[23];let i;return t[24]===n?i=t[25]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[24]=n,t[25]=i),i}if(o===`running`){let e;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is running`}),t[26]=e):e=t[26];let n;t[27]===C?n=t[28]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[27]=C,t[28]=n);let i;t[29]===_?i=t[30]:(i=r.fromSeconds(_)||r.now(),t[29]=_,t[30]=i);let a;t[31]===i?a=t[32]:(a=(0,L.jsx)(`div`,{className:`cell-status-icon elapsed-time running`,"data-testid":`cell-status`,"data-status":`running`,children:(0,L.jsx)(V,{startTime:i})}),t[31]=i,t[32]=a);let o;return t[33]!==n||t[34]!==a?(o=(0,L.jsx)(s,{content:n,usePortal:!0,children:a}),t[33]=n,t[34]=a,t[35]=o):o=t[35],o}if(o===`queued`){let e;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is queued to run`}),t[36]=e):e=t[36];let n;t[37]===C?n=t[38]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[37]=C,t[38]=n);let r;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-queued`,"data-testid":`cell-status`,"data-status":`queued`,children:(0,L.jsx)(p,{className:`h-5 w-5`,strokeWidth:1.5})}),t[39]=r):r=t[39];let i;return t[40]===n?i=t[41]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[40]=n,t[41]=i),i}if(d||f||u||y){let e;t[42]===g?e=t[43]:(e=n(g),t[42]=g,t[43]=e);let r=e,i;t[44]!==g||t[45]!==r?(i=g?(0,L.jsx)(z,{elapsedTime:r}):null,t[44]=g,t[45]=r,t[46]=i):i=t[46];let a=i,o,c=``;if(y)o=`This cell has not yet been run`;else if(f){o=`This cell was interrupted when it was last run`;let e;t[47]===a?e=t[48]:(e=(0,L.jsxs)(`span`,{children:[`This cell ran for `,a,` before being interrupted`]}),t[47]=a,t[48]=e),c=e}else if(d){o=`This cell has been modified since it was last run`;let e;t[49]===a?e=t[50]:(e=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[49]=a,t[50]=e),c=e}else{o=`This cell has not been run with the latest inputs`;let e;t[51]===a?e=t[52]:(e=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[51]=a,t[52]=e),c=e}let l;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,L.jsx)(`div`,{className:`cell-status-stale`,"data-testid":`cell-status`,"data-status":`outdated`,children:(0,L.jsx)(m,{className:`h-5 w-5`,strokeWidth:1.5})}),t[53]=l):l=t[53];let u;t[54]===o?u=t[55]:(u=(0,L.jsx)(s,{content:o,usePortal:!0,children:l}),t[54]=o,t[55]=u);let p;t[56]!==g||t[57]!==r||t[58]!==C||t[59]!==c?(p=g&&(0,L.jsx)(s,{content:(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[c,C]}),usePortal:!0,children:(0,L.jsx)(`div`,{className:`elapsed-time hover-action`,"data-testid":`cell-status`,"data-status":`outdated`,children:(0,L.jsx)(`span`,{children:r})})}),t[56]=g,t[57]=r,t[58]=C,t[59]=c,t[60]=p):p=t[60];let h;return t[61]!==u||t[62]!==p?(h=(0,L.jsxs)(`div`,{className:`cell-status-icon flex items-center gap-2`,children:[u,p]}),t[61]=u,t[62]=p,t[63]=h):h=t[63],h}if(g!==null){let e;t[64]===g?e=t[65]:(e=n(g),t[64]=g,t[65]=e);let r=e,i;t[66]!==g||t[67]!==r?(i=g?(0,L.jsx)(z,{elapsedTime:r}):null,t[66]=g,t[67]=r,t[68]=i):i=t[68];let a=i,o;t[69]===a?o=t[70]:(o=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[69]=a,t[70]=o);let c;t[71]!==C||t[72]!==o?(c=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[o,C]}),t[71]=C,t[72]=o,t[73]=c):c=t[73];let l;t[74]===r?l=t[75]:(l=(0,L.jsx)(`div`,{className:`cell-status-icon elapsed-time hover-action`,"data-testid":`cell-status`,"data-status":`idle`,children:(0,L.jsx)(`span`,{children:r})}),t[74]=r,t[75]=l);let u;return t[76]!==c||t[77]!==l?(u=(0,L.jsx)(s,{content:c,usePortal:!0,children:l}),t[76]=c,t[77]=l,t[78]=u):u=t[78],u}return null},z=e=>{let t=(0,P.c)(2),n;return t[0]===e.elapsedTime?n=t[1]:(n=(0,L.jsx)(`span`,{className:`tracking-wide font-semibold`,children:e.elapsedTime}),t[0]=e.elapsedTime,t[1]=n),n},B=e=>{let t=(0,P.c)(4),n=new Date(e.lastRanTime*1e3),r=new Date,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={hour:`numeric`,minute:`numeric`,second:`numeric`,fractionalSecondDigits:3,hour12:!0},t[0]=i):i=t[0];let a=g(i),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o={month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,fractionalSecondDigits:3,hour12:!0},t[1]=o):o=t[1];let s=g(o),c=n.toDateString()===r.toDateString()?a:s,l=N(n),u;return t[2]===l?u=t[3]:(u=(0,L.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,l,` ago)`]}),t[2]=l,t[3]=u),(0,L.jsxs)(`span`,{children:[`Ran at`,` `,(0,L.jsx)(`strong`,{className:`tracking-wide font-semibold`,children:c.format(n)}),` `,u]})},V=e=>{let t=(0,P.c)(6),r;t[0]===e.startTime?r=t[1]:(r=e.startTime.toMilliseconds(),t[0]=e.startTime,t[1]=r);let i=I(r),a;t[2]===i?a=t[3]:(a=n(i),t[2]=i,t[3]=a);let o;return t[4]===a?o=t[5]:(o=(0,L.jsx)(`span`,{children:a}),t[4]=a,t[5]=o),o};export{z as n,R as t};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{dr as n,ur as r}from"./cells-2HETnlvE.js";import{t as i}from"./compiler-runtime-BrajqUja.js";import{g as a}from"./useEventListener-CjDeLqFC.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-CkGm8X7m.js";import{t as c}from"./ban-YzvUro5I.js";import{a as l,n as u,o as d,t as f}from"./toDate-DOj9Q6uC.js";import{t as p}from"./ellipsis-63DyBLHQ.js";import{t as m}from"./refresh-cw-Qw1f8Jhy.js";import{t as h}from"./workflow-cw-0b9g5.js";import{t as g}from"./useDateFormatter-DA-62E-Y.js";import{i as _,n as v,r as y,t as b}from"./en-US-Buu61juQ.js";import{t as x}from"./multi-icon-DL465pPF.js";function S(e,t){let n=+f(e)-f(t);return n<0?-1:n>0?1:n}function C(e){return u(e,Date.now())}function w(e,t,n){let[r,i]=v(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function T(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function E(e,t){return+f(e)-f(t)}function D(e,t){let n=f(e,t?.in);return n.setHours(23,59,59,999),n}function O(e,t){let n=f(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function k(e,t){let n=f(e,t?.in);return+D(n,t)==+O(n,t)}function A(e,t,n){let[r,i,a]=v(n?.in,e,e,t),o=S(i,a),s=Math.abs(w(i,a));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let c=S(i,a)===-o;k(r)&&s===1&&S(r,a)===1&&(c=!1);let l=o*(s-+c);return l===0?0:l}function j(e,t,n){let r=E(e,t)/1e3;return T(n?.roundingMethod)(r)}function M(e,t,n){let r=_(),i=n?.locale??r.locale??b,a=S(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=v(n?.in,...a>0?[t,e]:[e,t]),u=j(c,s),f=(y(c)-y(s))/1e3,p=Math.round((u-f)/60),m;if(p<2)return n?.includeSeconds?u<5?i.formatDistance(`lessThanXSeconds`,5,o):u<10?i.formatDistance(`lessThanXSeconds`,10,o):u<20?i.formatDistance(`lessThanXSeconds`,20,o):u<40?i.formatDistance(`halfAMinute`,0,o):u<60?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,1,o):p===0?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,p,o);if(p<45)return i.formatDistance(`xMinutes`,p,o);if(p<90)return i.formatDistance(`aboutXHours`,1,o);if(p<1440){let e=Math.round(p/60);return i.formatDistance(`aboutXHours`,e,o)}if(p<2520)return i.formatDistance(`xDays`,1,o);if(p<43200){let e=Math.round(p/l);return i.formatDistance(`xDays`,e,o)}if(p<86400)return m=Math.round(p/d),i.formatDistance(`aboutXMonths`,m,o);if(m=A(c,s),m<12){let e=Math.round(p/d);return i.formatDistance(`xMonths`,e,o)}{let e=m%12,t=Math.trunc(m/12);return e<3?i.formatDistance(`aboutXYears`,t,o):e<9?i.formatDistance(`overXYears`,t,o):i.formatDistance(`almostXYears`,t+1,o)}}function N(e,t){return M(e,C(e),t)}var P=i(),F=e(t(),1);function I(e){let t=(0,P.c)(2),[n]=(0,F.useState)(e),[i,a]=(0,F.useState)(e),o,s;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=setInterval(()=>{a(r.now().toMilliseconds())},17);return()=>clearInterval(e)},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,F.useEffect)(o,s),i-n}var L=o(),R=e=>{let t=(0,P.c)(79),{editing:i,status:o,disabled:l,staleInputs:u,edited:d,interrupted:f,elapsedTime:g,runStartTimestamp:_,lastRunStartTimestamp:v,uninstantiated:y}=e;if(!i)return null;let b=_??v,S;t[0]===b?S=t[1]:(S=b?(0,L.jsx)(B,{lastRanTime:b}):null,t[0]=b,t[1]=S);let C=S;if(l&&o===`running`)return a.error(`CellStatusComponent: disabled and running`),null;if(l&&u){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is stale, but it's disabled and can't be run`}),t[2]=e):e=t[2];let n;t[3]===C?n=t[4]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[3]=C,t[4]=n);let r;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`stale`,children:(0,L.jsxs)(x,{children:[(0,L.jsx)(c,{className:`h-5 w-5`,strokeWidth:1.5}),(0,L.jsx)(m,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[5]=r):r=t[5];let i;return t[6]===n?i=t[7]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[6]=n,t[7]=i),i}if(l){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is disabled`}),t[8]=e):e=t[8];let n;t[9]===C?n=t[10]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[9]=C,t[10]=n);let r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-disabled`,"data-testid":`cell-status`,"data-status":`disabled`,children:(0,L.jsx)(c,{className:`h-5 w-5`,strokeWidth:1.5})}),t[11]=r):r=t[11];let i;return t[12]===n?i=t[13]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[12]=n,t[13]=i),i}if(!u&&o===`disabled-transitively`){let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`An ancestor of this cell is disabled, so it can't be run`}),t[14]=e):e=t[14];let n;t[15]===C?n=t[16]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[15]=C,t[16]=n);let r;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`disabled-transitively`,children:(0,L.jsxs)(x,{layerTop:!0,children:[(0,L.jsx)(h,{className:`h-5 w-5`,strokeWidth:1.5}),(0,L.jsx)(c,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[17]=r):r=t[17];let i;return t[18]===n?i=t[19]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[18]=n,t[19]=i),i}if(u&&o===`disabled-transitively`){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is stale, but an ancestor is disabled so it can't be run`}),t[20]=e):e=t[20];let n;t[21]===C?n=t[22]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[21]=C,t[22]=n);let r;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-stale`,"data-testid":`cell-status`,"data-status":`stale`,children:(0,L.jsxs)(x,{children:[(0,L.jsx)(m,{className:`h-5 w-5`,strokeWidth:1}),(0,L.jsx)(c,{className:`h-3 w-3`,strokeWidth:2.5})]})}),t[23]=r):r=t[23];let i;return t[24]===n?i=t[25]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[24]=n,t[25]=i),i}if(o===`running`){let e;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is running`}),t[26]=e):e=t[26];let n;t[27]===C?n=t[28]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[27]=C,t[28]=n);let i;t[29]===_?i=t[30]:(i=r.fromSeconds(_)||r.now(),t[29]=_,t[30]=i);let a;t[31]===i?a=t[32]:(a=(0,L.jsx)(`div`,{className:`cell-status-icon elapsed-time running`,"data-testid":`cell-status`,"data-status":`running`,children:(0,L.jsx)(V,{startTime:i})}),t[31]=i,t[32]=a);let o;return t[33]!==n||t[34]!==a?(o=(0,L.jsx)(s,{content:n,usePortal:!0,children:a}),t[33]=n,t[34]=a,t[35]=o):o=t[35],o}if(o===`queued`){let e;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(`span`,{children:`This cell is queued to run`}),t[36]=e):e=t[36];let n;t[37]===C?n=t[38]:(n=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e,C]}),t[37]=C,t[38]=n);let r;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`div`,{className:`cell-status-icon cell-status-queued`,"data-testid":`cell-status`,"data-status":`queued`,children:(0,L.jsx)(p,{className:`h-5 w-5`,strokeWidth:1.5})}),t[39]=r):r=t[39];let i;return t[40]===n?i=t[41]:(i=(0,L.jsx)(s,{content:n,usePortal:!0,children:r}),t[40]=n,t[41]=i),i}if(d||f||u||y){let e;t[42]===g?e=t[43]:(e=n(g),t[42]=g,t[43]=e);let r=e,i;t[44]!==g||t[45]!==r?(i=g?(0,L.jsx)(z,{elapsedTime:r}):null,t[44]=g,t[45]=r,t[46]=i):i=t[46];let a=i,o,c=``;if(y)o=`This cell has not yet been run`;else if(f){o=`This cell was interrupted when it was last run`;let e;t[47]===a?e=t[48]:(e=(0,L.jsxs)(`span`,{children:[`This cell ran for `,a,` before being interrupted`]}),t[47]=a,t[48]=e),c=e}else if(d){o=`This cell has been modified since it was last run`;let e;t[49]===a?e=t[50]:(e=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[49]=a,t[50]=e),c=e}else{o=`This cell has not been run with the latest inputs`;let e;t[51]===a?e=t[52]:(e=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[51]=a,t[52]=e),c=e}let l;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,L.jsx)(`div`,{className:`cell-status-stale`,"data-testid":`cell-status`,"data-status":`outdated`,children:(0,L.jsx)(m,{className:`h-5 w-5`,strokeWidth:1.5})}),t[53]=l):l=t[53];let u;t[54]===o?u=t[55]:(u=(0,L.jsx)(s,{content:o,usePortal:!0,children:l}),t[54]=o,t[55]=u);let p;t[56]!==g||t[57]!==r||t[58]!==C||t[59]!==c?(p=g&&(0,L.jsx)(s,{content:(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[c,C]}),usePortal:!0,children:(0,L.jsx)(`div`,{className:`elapsed-time hover-action`,"data-testid":`cell-status`,"data-status":`outdated`,children:(0,L.jsx)(`span`,{children:r})})}),t[56]=g,t[57]=r,t[58]=C,t[59]=c,t[60]=p):p=t[60];let h;return t[61]!==u||t[62]!==p?(h=(0,L.jsxs)(`div`,{className:`cell-status-icon flex items-center gap-2`,children:[u,p]}),t[61]=u,t[62]=p,t[63]=h):h=t[63],h}if(g!==null){let e;t[64]===g?e=t[65]:(e=n(g),t[64]=g,t[65]=e);let r=e,i;t[66]!==g||t[67]!==r?(i=g?(0,L.jsx)(z,{elapsedTime:r}):null,t[66]=g,t[67]=r,t[68]=i):i=t[68];let a=i,o;t[69]===a?o=t[70]:(o=(0,L.jsxs)(`span`,{children:[`This cell took `,a,` to run`]}),t[69]=a,t[70]=o);let c;t[71]!==C||t[72]!==o?(c=(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[o,C]}),t[71]=C,t[72]=o,t[73]=c):c=t[73];let l;t[74]===r?l=t[75]:(l=(0,L.jsx)(`div`,{className:`cell-status-icon elapsed-time hover-action`,"data-testid":`cell-status`,"data-status":`idle`,children:(0,L.jsx)(`span`,{children:r})}),t[74]=r,t[75]=l);let u;return t[76]!==c||t[77]!==l?(u=(0,L.jsx)(s,{content:c,usePortal:!0,children:l}),t[76]=c,t[77]=l,t[78]=u):u=t[78],u}return null},z=e=>{let t=(0,P.c)(2),n;return t[0]===e.elapsedTime?n=t[1]:(n=(0,L.jsx)(`span`,{className:`tracking-wide font-semibold`,children:e.elapsedTime}),t[0]=e.elapsedTime,t[1]=n),n},B=e=>{let t=(0,P.c)(4),n=new Date(e.lastRanTime*1e3),r=new Date,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={hour:`numeric`,minute:`numeric`,second:`numeric`,fractionalSecondDigits:3,hour12:!0},t[0]=i):i=t[0];let a=g(i),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o={month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,fractionalSecondDigits:3,hour12:!0},t[1]=o):o=t[1];let s=g(o),c=n.toDateString()===r.toDateString()?a:s,l=N(n),u;return t[2]===l?u=t[3]:(u=(0,L.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,l,` ago)`]}),t[2]=l,t[3]=u),(0,L.jsxs)(`span`,{children:[`Ran at`,` `,(0,L.jsx)(`strong`,{className:`tracking-wide font-semibold`,children:c.format(n)}),` `,u]})},V=e=>{let t=(0,P.c)(6),r;t[0]===e.startTime?r=t[1]:(r=e.startTime.toMilliseconds(),t[0]=e.startTime,t[1]=r);let i=I(r),a;t[2]===i?a=t[3]:(a=n(i),t[2]=i,t[3]=a);let o;return t[4]===a?o=t[5]:(o=(0,L.jsx)(`span`,{children:a}),t[4]=a,t[5]=o),o};export{z as n,R as t};
|