@marimo-team/frontend 0.24.1-dev110 → 0.24.1-dev112

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.
Files changed (85) hide show
  1. package/dist/assets/{CellStatus-CjUjb2Cd.js → CellStatus-DjaaE1KV.js} +1 -1
  2. package/dist/assets/{JsonOutput-BYSpdF43.js → JsonOutput-6STJL9Rn.js} +5 -5
  3. package/dist/assets/{LazyAnyLanguageCodeMirror-DW3ALk8T.js → LazyAnyLanguageCodeMirror-BnkWE9wV.js} +2 -2
  4. package/dist/assets/{MarimoErrorOutput-bK1H5Vq4.js → MarimoErrorOutput-BTqTZeiu.js} +1 -1
  5. package/dist/assets/RenderHTML-DUXIAUaj.js +1 -0
  6. package/dist/assets/{RunButton-BUopNmyI.js → RunButton-aYiWB8Ga.js} +1 -1
  7. package/dist/assets/{VisuallyHidden-D_iGuoaT.js → VisuallyHidden-dPzEOlg8.js} +1 -1
  8. package/dist/assets/{add-cell-with-ai-BCbCncNA.js → add-cell-with-ai-l_Dax5pU.js} +1 -1
  9. package/dist/assets/{add-connection-dialog-CFI3g7Qq.js → add-connection-dialog-CpvZ5BqX.js} +1 -1
  10. package/dist/assets/{agent-panel-CIGDXQtn.js → agent-panel-CbdAoVgG.js} +1 -1
  11. package/dist/assets/{ai-model-dropdown-BDhRgfa7.js → ai-model-dropdown-jVyB16Bq.js} +1 -1
  12. package/dist/assets/any-language-editor-B6cFLupW.js +1 -0
  13. package/dist/assets/{app-config-button-Cw9RXSId.js → app-config-button-CHSwEEzP.js} +1 -1
  14. package/dist/assets/{blob-8opSUf-R.js → blob-CoYb7D0i.js} +1 -1
  15. package/dist/assets/{cell-editor-D7fjZc8_.js → cell-editor-Bo1CBkuH.js} +1 -1
  16. package/dist/assets/{cell-link-RjRAdD7j.js → cell-link-CJvbR4gk.js} +1 -1
  17. package/dist/assets/{cells-qgj2MHef.js → cells-C3Vs2g0_.js} +55 -55
  18. package/dist/assets/{chat-display-Do0NHXRI.js → chat-display-CkS1h-qA.js} +1 -1
  19. package/dist/assets/{chat-panel-6aXBvTGv.js → chat-panel-Bl8KhsjW.js} +1 -1
  20. package/dist/assets/{chat-ui-B1jxuQMJ.js → chat-ui-lhVS3XhN.js} +1 -1
  21. package/dist/assets/{column-preview-Bnrq4bEC.js → column-preview-CBydN0D3.js} +1 -1
  22. package/dist/assets/{command-palette-CYaDy4p2.js → command-palette-D0yWoZzd.js} +1 -1
  23. package/dist/assets/{common-UY3q-fId.js → common-BANLqpaV.js} +1 -1
  24. package/dist/assets/{components-CxHV3A2M.js → components-DC6fLfDw.js} +1 -1
  25. package/dist/assets/{datasource-CslkWQXu.js → datasource-DB4KqePX.js} +1 -1
  26. package/dist/assets/{dependency-graph-panel-CIZwnr8N.js → dependency-graph-panel-LHjxAlPl.js} +1 -1
  27. package/dist/assets/{documentation-panel-IkGXd5w4.js → documentation-panel-2myTueGx.js} +1 -1
  28. package/dist/assets/{download-BenVNUUc.js → download-VyhuV4Af.js} +1 -1
  29. package/dist/assets/{edit-page-DvStrWEF.js → edit-page-CVhnUbM-.js} +4 -4
  30. package/dist/assets/{error-entries-VeWh8139.js → error-entries-DZjQ7yIb.js} +1 -1
  31. package/dist/assets/{error-panel-DvGxCCbV.js → error-panel-BpAXL0Jx.js} +1 -1
  32. package/dist/assets/{file-explorer-panel-CC4C9SnN.js → file-explorer-panel-BN6gd4XO.js} +1 -1
  33. package/dist/assets/{file-icons-BrEKrCwx.js → file-icons-DqdK7VJg.js} +1 -1
  34. package/dist/assets/{file-name-input-Bwd3-2qW.js → file-name-input-oiyzcfEJ.js} +1 -1
  35. package/dist/assets/{floating-outline-D2mRNu22.js → floating-outline-DPSwhBkV.js} +1 -1
  36. package/dist/assets/{gallery-page-eCWVVsFK.js → gallery-page-7DdjmUx5.js} +1 -1
  37. package/dist/assets/{glide-data-editor-Dcp6006R.js → glide-data-editor-Di4wZ4hd.js} +1 -1
  38. package/dist/assets/{home-page-C8yicSrb.js → home-page-Bp96aSro.js} +1 -1
  39. package/dist/assets/{index-BHZDiHTq.js → index-DppxBBTx.js} +3 -3
  40. package/dist/assets/{input-Ddnr8OdM.js → input-BBJ8nAOd.js} +1 -1
  41. package/dist/assets/{layout-BBzwwt8g.js → layout-Cx8C7K25.js} +3 -3
  42. package/dist/assets/{logs-panel-B09Cp9bZ.js → logs-panel-D0bWZKWJ.js} +1 -1
  43. package/dist/assets/{markdown-renderer-DoyGe3kU.js → markdown-renderer-CZ3YygMD.js} +1 -1
  44. package/dist/assets/{name-cell-input-Cj0SeUpU.js → name-cell-input-Bu4JMe_U.js} +1 -1
  45. package/dist/assets/{outline-panel-D7oPCNxa.js → outline-panel-C1xIywWA.js} +1 -1
  46. package/dist/assets/{packages-panel-DvNqZ6hB.js → packages-panel-DTJ-O5EO.js} +1 -1
  47. package/dist/assets/{pair-with-agent-modal-B--3Xpp8.js → pair-with-agent-modal-DdhoVv9s.js} +1 -1
  48. package/dist/assets/{panel-accordion-state-D4JACsZ3.js → panel-accordion-state-Cx3vYbsP.js} +1 -1
  49. package/dist/assets/{panels-BTHaPtUZ.js → panels-CywQefR1.js} +1 -1
  50. package/dist/assets/{process-output-BRGOvb2f.js → process-output-BisIKywr.js} +1 -1
  51. package/dist/assets/{readonly-code-display-CUFQn5sY.js → readonly-code-display-BkxE6y3G.js} +1 -1
  52. package/dist/assets/{readonly-python-code-C-Iv7xif.js → readonly-python-code-BsJxWR9t.js} +1 -1
  53. package/dist/assets/{reveal-component-CawytCeQ.js → reveal-component-BNl5Zqif.js} +1 -1
  54. package/dist/assets/{run-page-DrxVLavD.js → run-page-RG1gHn8i.js} +1 -1
  55. package/dist/assets/{scratchpad-panel-DUioP0f7.js → scratchpad-panel-DnSgF--Q.js} +1 -1
  56. package/dist/assets/{secrets-panel-C9n7VrlP.js → secrets-panel-BKccjNx4.js} +1 -1
  57. package/dist/assets/{session-panel-DiKPWSPU.js → session-panel-BXwF6uCv.js} +1 -1
  58. package/dist/assets/{skeleton-BDmfpU3X.js → skeleton-DIGKSCaR.js} +1 -1
  59. package/dist/assets/{snippets-panel-DgFciIZH.js → snippets-panel-Bs7D-2J3.js} +1 -1
  60. package/dist/assets/{state-D2WJm4i8.js → state-C5o_oPeD.js} +1 -1
  61. package/dist/assets/{state-BJNrXOAk.js → state-DqwSj41I.js} +1 -1
  62. package/dist/assets/{tracing-DfeL2FvL.js → tracing-PQRp5Y6N.js} +1 -1
  63. package/dist/assets/{tracing-panel-_RFJ1V2H.js → tracing-panel-BnrbDAGz.js} +2 -2
  64. package/dist/assets/{tree-actions-591V0MzS.js → tree-actions-C-1KQPVN.js} +1 -1
  65. package/dist/assets/{useAddCell-DcOC1-46.js → useAddCell-qRhXgYb3.js} +1 -1
  66. package/dist/assets/{useCellActionButton-BkFPMNO9.js → useCellActionButton-C__VM-4x.js} +1 -1
  67. package/dist/assets/{useDeleteCell-Co6v3eGu.js → useDeleteCell-xTUoM-wW.js} +1 -1
  68. package/dist/assets/{useDependencyPanelTab-B432gP68.js → useDependencyPanelTab-DbotHB0-.js} +1 -1
  69. package/dist/assets/{useNotebookActions-AeYQuSXc.js → useNotebookActions-DIcNvfxA.js} +1 -1
  70. package/dist/assets/{useRunCells-B0cXvtXO.js → useRunCells-Bno18PcV.js} +1 -1
  71. package/dist/assets/{useSplitCell-JMnmcTxP.js → useSplitCell-DigdAFdD.js} +1 -1
  72. package/dist/assets/{write-secret-modal-DgqX3xEF.js → write-secret-modal-BJCzwShk.js} +1 -1
  73. package/dist/index.html +23 -23
  74. package/package.json +1 -1
  75. package/src/components/data-table/__tests__/column-explorer.test.tsx +3 -2
  76. package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +7 -3
  77. package/src/components/editor/connections/secret-combobox.tsx +3 -1
  78. package/src/components/editor/file-tree/renderers.tsx +4 -2
  79. package/src/components/forms/form.tsx +6 -4
  80. package/src/components/ui/input.tsx +5 -1
  81. package/src/plugins/core/RenderHTML.tsx +6 -4
  82. package/src/plugins/impl/code/any-language-editor.tsx +7 -4
  83. package/src/stories/cell.stories.tsx +15 -11
  84. package/dist/assets/RenderHTML-Djj3QRVt.js +0 -1
  85. package/dist/assets/any-language-editor-DKw9aXIK.js +0 -1
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-CBDbhulC.js";import{_r as n,gr as r}from"./cells-qgj2MHef.js";import{t as i}from"./compiler-runtime-CYIjoINj.js";import{g as a}from"./useEventListener-92uWqz-P.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-BO5vfMvm.js";import{t as c}from"./ban-CwXfMsC1.js";import{c as l,l as u,n as d,t as f}from"./toDate-hGYJX0Ha.js";import{t as p}from"./ellipsis-Dfik_tuW.js";import{t as m}from"./refresh-cw-Bf-rx_aV.js";import{t as h}from"./workflow-SJ9KZapt.js";import{t as g}from"./useDateFormatter-BiqAQ-zI.js";import{i as _,n as v,r as y,t as b}from"./en-US-yTIMUO13.js";import{t as x}from"./multi-icon-COhkNiC1.js";function S(e,t){let n=f(e)-+f(t);return n<0?-1:n>0?1:n}function C(e){return d(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]),d=j(c,s),f=(y(c)-y(s))/1e3,p=Math.round((d-f)/60),m;if(p<2)return n?.includeSeconds?d<5?i.formatDistance(`lessThanXSeconds`,5,o):d<10?i.formatDistance(`lessThanXSeconds`,10,o):d<20?i.formatDistance(`lessThanXSeconds`,20,o):d<40?i.formatDistance(`halfAMinute`,0,o):d<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/u),i.formatDistance(`aboutXMonths`,m,o);if(m=A(c,s),m<12){let e=Math.round(p/u);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,F.useRef)(e),[n,i]=(0,F.useState)(e);return(0,F.useEffect)(()=>{let e=setInterval(()=>{i(r.now().toMilliseconds())},17);return()=>clearInterval(e)},[]),n-t.current}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-CBDbhulC.js";import{_r as n,gr as r}from"./cells-C3Vs2g0_.js";import{t as i}from"./compiler-runtime-CYIjoINj.js";import{g as a}from"./useEventListener-92uWqz-P.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-BO5vfMvm.js";import{t as c}from"./ban-CwXfMsC1.js";import{c as l,l as u,n as d,t as f}from"./toDate-hGYJX0Ha.js";import{t as p}from"./ellipsis-Dfik_tuW.js";import{t as m}from"./refresh-cw-Bf-rx_aV.js";import{t as h}from"./workflow-SJ9KZapt.js";import{t as g}from"./useDateFormatter-BiqAQ-zI.js";import{i as _,n as v,r as y,t as b}from"./en-US-yTIMUO13.js";import{t as x}from"./multi-icon-COhkNiC1.js";function S(e,t){let n=f(e)-+f(t);return n<0?-1:n>0?1:n}function C(e){return d(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]),d=j(c,s),f=(y(c)-y(s))/1e3,p=Math.round((d-f)/60),m;if(p<2)return n?.includeSeconds?d<5?i.formatDistance(`lessThanXSeconds`,5,o):d<10?i.formatDistance(`lessThanXSeconds`,10,o):d<20?i.formatDistance(`lessThanXSeconds`,20,o):d<40?i.formatDistance(`halfAMinute`,0,o):d<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/u),i.formatDistance(`aboutXMonths`,m,o);if(m=A(c,s),m<12){let e=Math.round(p/u);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,F.useRef)(e),[n,i]=(0,F.useState)(e);return(0,F.useEffect)(()=>{let e=setInterval(()=>{i(r.now().toMilliseconds())},17);return()=>clearInterval(e)},[]),n-t.current}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};