@marimo-team/frontend 0.18.5-dev168 → 0.18.5-dev171

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 (140) hide show
  1. package/dist/assets/{CellStatus-C5QfWAQj.js → CellStatus-ClrYbUob.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-B0tKPs5t.js → ConnectedDataExplorerComponent-KlUs_Sz3.js} +1 -1
  3. package/dist/assets/{ErrorBoundary-BYCO3_zw.js → ErrorBoundary-Drf1manw.js} +1 -1
  4. package/dist/assets/{ImperativeModal-7Thr73Oo.js → ImperativeModal-q6QlC2aZ.js} +1 -1
  5. package/dist/assets/{JsonOutput-NOfbbuUx.js → JsonOutput-CkeISXrs.js} +9 -9
  6. package/dist/assets/{LazyAnyLanguageCodeMirror-DIbHWNF6.js → LazyAnyLanguageCodeMirror-jpEDlD0M.js} +2 -2
  7. package/dist/assets/{MarimoErrorOutput-usFICLUe.js → MarimoErrorOutput-CO8cm8-0.js} +2 -2
  8. package/dist/assets/{RenderHTML-LxV1eecf.js → RenderHTML-D6fh5YLC.js} +1 -1
  9. package/dist/assets/{VisuallyHidden-BLp5kXtE.js → VisuallyHidden-BodIky8L.js} +1 -1
  10. package/dist/assets/{add-cell-with-ai-CEKGThxQ.js → add-cell-with-ai-B3V6Mgb9.js} +12 -12
  11. package/dist/assets/{add-database-form-DQyrphh9.js → add-database-form-C-K88iSC.js} +1 -1
  12. package/dist/assets/{agent-panel-CnTn12AW.js → agent-panel-BvLqBe3U.js} +6 -6
  13. package/dist/assets/{ai-model-dropdown-CxRols0L.js → ai-model-dropdown-D1nEKS8b.js} +1 -1
  14. package/dist/assets/{alert-dialog-B3T1GCoD.js → alert-dialog-k5KxevGr.js} +1 -1
  15. package/dist/assets/any-language-editor-DQu1Tt2N.js +3 -0
  16. package/dist/assets/{app-config-button-DtMP2_j5.js → app-config-button-BD5l-v4I.js} +1 -1
  17. package/dist/assets/{button-C9TEIJJh.js → button-DuYGqRtX.js} +1 -1
  18. package/dist/assets/{cache-panel-C-YLXsti.js → cache-panel-C1So4Zu3.js} +1 -1
  19. package/dist/assets/{capabilities-h9_pyvFv.js → capabilities-BmAOeMOK.js} +1 -1
  20. package/dist/assets/{capitalize-D4JsDDXI.js → capitalize-DQeWKRGx.js} +1 -1
  21. package/dist/assets/{cell-actions-DCZqhhwF.js → cell-actions-CJiaF9Tu.js} +1 -1
  22. package/dist/assets/cell-link-Hwo1QbqQ.js +1 -0
  23. package/dist/assets/{cells-DAR6V-0d.js → cells-rr1jjvJk.js} +33 -33
  24. package/dist/assets/{chat-components-CyY2c7cG.js → chat-components-DXJsXOD8.js} +1 -1
  25. package/dist/assets/{chat-display-BgCCmGdz.js → chat-display-C08N0rx5.js} +1 -1
  26. package/dist/assets/{chat-panel-ByuXM3gc.js → chat-panel-CNL6ANh8.js} +2 -2
  27. package/dist/assets/client-SMzMTiO_.js +4 -0
  28. package/dist/assets/{column-preview-DBqi4KCj.js → column-preview-BzvHnhPG.js} +1 -1
  29. package/dist/assets/command-palette-B_md1fzh.js +1 -0
  30. package/dist/assets/{command-BXWdrTY9.js → command-xU8ykulh.js} +1 -1
  31. package/dist/assets/{common-D10A9aix.js → common-_RAkDTpe.js} +1 -1
  32. package/dist/assets/{config-D3ojpe3F.js → config-cCkBQ_ER.js} +1 -1
  33. package/dist/assets/{copy-Bmkr29w4.js → copy-DRhpWiOq.js} +1 -1
  34. package/dist/assets/{copy-icon-qVgCqhII.js → copy-icon-B69c-352.js} +1 -1
  35. package/dist/assets/{createReducer-CaezzNVH.js → createReducer-DDa-hVe3.js} +1 -1
  36. package/dist/assets/{datasource-CW2RMV2e.js → datasource-DHbNHnua.js} +2 -2
  37. package/dist/assets/{dates-B2_O0-if.js → dates-CdsE1R40.js} +1 -1
  38. package/dist/assets/{dependency-graph-panel-CtlDdK0s.js → dependency-graph-panel-BGp5UzmZ.js} +3 -3
  39. package/dist/assets/{dialog-DIUTtzeB.js → dialog-DUEuLcT2.js} +1 -1
  40. package/dist/assets/{dist-vrNOUnFF.js → dist-DOFFh6Ii.js} +1 -1
  41. package/dist/assets/{documentation-panel-Cup0ghBs.js → documentation-panel-CuPlvIjJ.js} +1 -1
  42. package/dist/assets/{download-D3Uujsn_.js → download-DKRxBkYD.js} +1 -1
  43. package/dist/assets/edit-page-DAFshpgY.js +13 -0
  44. package/dist/assets/{error-banner-D2-5vgE4.js → error-banner-DU5Qb8a8.js} +1 -1
  45. package/dist/assets/{error-panel-DcRvXIwA.js → error-panel-CoYFpNUd.js} +1 -1
  46. package/dist/assets/{es-DCqUUmrq.js → es-YVwBDiDw.js} +1 -1
  47. package/dist/assets/{field-D2_0r7wT.js → field-DDKGFzpC.js} +1 -1
  48. package/dist/assets/{file-explorer-panel-9Bt20tRi.js → file-explorer-panel-BcpntT7Q.js} +1 -1
  49. package/dist/assets/{floating-outline-BTc4L5BF.js → floating-outline-CHprSkP6.js} +1 -1
  50. package/dist/assets/{focus-6-St0ai2.js → focus-D3ygI6Sy.js} +1 -1
  51. package/dist/assets/{form-1WOcPtE8.js → form-B_zRT4QS.js} +2 -2
  52. package/dist/assets/{formats-nh-sPUUZ.js → formats-B9CrBoaO.js} +1 -1
  53. package/dist/assets/{glide-data-editor-EdMWe-iv.js → glide-data-editor-Brckuic5.js} +1 -1
  54. package/dist/assets/{globals-CJb4gcmW.js → globals-D46Vbo5D.js} +1 -1
  55. package/dist/assets/{home-page-Lqy9A89-.js → home-page-DuPzZzUf.js} +2 -2
  56. package/dist/assets/hotkeys-uKX61F1_.js +1 -0
  57. package/dist/assets/{index-CIoUDThG.js → index-CQBtzy-J.js} +9 -9
  58. package/dist/assets/index-G6ss-VDT.css +2 -0
  59. package/dist/assets/{input-DP44ewsS.js → input-CaEtLL8p.js} +1 -1
  60. package/dist/assets/{kiosk-mode-C3lS9kUL.js → kiosk-mode-CTjr_Jn4.js} +1 -1
  61. package/dist/assets/{label-DJo0Eeb3.js → label-qwandMoh.js} +1 -1
  62. package/dist/assets/{layout-F63rlsGg.js → layout-CprHgyfx.js} +4 -4
  63. package/dist/assets/links-Cw9RjHIY.js +1 -0
  64. package/dist/assets/{logs-panel-fnMYUf4-.js → logs-panel-CFM-1lMP.js} +1 -1
  65. package/dist/assets/{maps-DELIOfTw.js → maps-s2pQkyf5.js} +1 -1
  66. package/dist/assets/{markdown-renderer-B9gYLzJX.js → markdown-renderer-DecoaRsV.js} +1 -1
  67. package/dist/assets/{mermaid-BUMgiGGr.js → mermaid-BPkO79lo.js} +1 -1
  68. package/dist/assets/{mode-D4GlAyEq.js → mode-BYulXE3t.js} +1 -1
  69. package/dist/assets/{multi-map-TecGBFLS.js → multi-map-fjX9ImVF.js} +1 -1
  70. package/dist/assets/{name-cell-input-BMtblyo6.js → name-cell-input-BGJDnv5Z.js} +1 -1
  71. package/dist/assets/{numbers-Ckcn6C-H.js → numbers-C9_R_vlY.js} +1 -1
  72. package/dist/assets/outline-panel-C-__7mIh.js +1 -0
  73. package/dist/assets/{packages-panel-DyC7zUxG.js → packages-panel-B4bQCG8Y.js} +1 -1
  74. package/dist/assets/{cell-editor-DJ1tY3mU.js → panel-context-Bee798AZ.js} +13 -13
  75. package/dist/assets/{panels-wYHy1fpG.js → panels-CuLZ4Xjj.js} +1 -1
  76. package/dist/assets/{process-output-D1GR6Ero.js → process-output-2gz8Uri2.js} +1 -1
  77. package/dist/assets/{readonly-python-code-CGnOB_RP.js → readonly-python-code-ihKi3Mrq.js} +1 -1
  78. package/dist/assets/{renderShortcut-CV_tqoEI.js → renderShortcut-D0Pei-OA.js} +1 -1
  79. package/dist/assets/{run-page-BLnJcKtg.js → run-page-Q1ifcEUY.js} +1 -1
  80. package/dist/assets/{runs-BbV5uZz6.js → runs-yuOchwkU.js} +1 -1
  81. package/dist/assets/scratchpad-panel-B75Qsjwz.js +1 -0
  82. package/dist/assets/{secrets-panel-K7EccfRa.js → secrets-panel-CDWmmmBS.js} +1 -1
  83. package/dist/assets/{select-BJ18Dxpd.js → select-D0g5GnIs.js} +1 -1
  84. package/dist/assets/{session-panel-C3rDPyig.js → session-panel-Bn5_JmbT.js} +1 -1
  85. package/dist/assets/{share-0dWXMs9M.js → share-CXQVxivL.js} +1 -1
  86. package/dist/assets/{slides-component-CZ76zal6.js → slides-component-DUIqQih1.js} +1 -1
  87. package/dist/assets/{snippets-panel-s0p4CCoa.js → snippets-panel-CVBBnX9H.js} +1 -1
  88. package/dist/assets/{spec-D9TFI5I_.js → spec-qp_XZeSS.js} +1 -1
  89. package/dist/assets/{state-DwSzcmzL.js → state-BHFBtWym.js} +1 -1
  90. package/dist/assets/{state-CGq6kn1k.js → state-CIznbe1J.js} +1 -1
  91. package/dist/assets/{state-BK5o1KAL.js → state-DNwec0Uj.js} +1 -1
  92. package/dist/assets/{switch-C8yab1pC.js → switch-iJj-D3dz.js} +1 -1
  93. package/dist/assets/{terminal-CA6CqpuO.js → terminal-CRIGvHBN.js} +1 -1
  94. package/dist/assets/{textarea-DBFtOima.js → textarea-DmNrZcLR.js} +1 -1
  95. package/dist/assets/{tooltip-BNPhCMFo.js → tooltip-CrRUCOBw.js} +1 -1
  96. package/dist/assets/tracing-D9h130fg.js +1 -0
  97. package/dist/assets/{tracing-panel-C-o1Db4W.js → tracing-panel-DaDvGMEN.js} +2 -2
  98. package/dist/assets/{type-drzC-SxF.js → type-BdyvjzTI.js} +1 -1
  99. package/dist/assets/{types-Bt3U-XJV.js → types-4-l_7Ws2.js} +1 -1
  100. package/dist/assets/{useAddCell-CNI3pgez.js → useAddCell-BpMe5DB-.js} +1 -1
  101. package/dist/assets/{useBoolean-C_vQizET.js → useBoolean-BDG41CyP.js} +1 -1
  102. package/dist/assets/{useCellActionButton-BbfiHu5s.js → useCellActionButton-Dh4wbVPA.js} +1 -1
  103. package/dist/assets/{useDeleteCell-B_jFiS1Y.js → useDeleteCell-DBzN8QcP.js} +1 -1
  104. package/dist/assets/{useIframeCapabilities-ZISlVepl.js → useIframeCapabilities-CU-WWxnz.js} +1 -1
  105. package/dist/assets/{useInstallPackage-CBvG269f.js → useInstallPackage-RldLPyJs.js} +1 -1
  106. package/dist/assets/{useLifecycle-BX7GmOQ5.js → useLifecycle-CmDXEyIC.js} +1 -1
  107. package/dist/assets/{useNotebookActions-BeM5fet2.js → useNotebookActions-DKyQBNlS.js} +1 -1
  108. package/dist/assets/useRunCells-BGzo-QMk.js +1 -0
  109. package/dist/assets/{useSplitCell-COPg5dJw.js → useSplitCell-CvKAuKQ_.js} +1 -1
  110. package/dist/assets/{useTheme-CuOCKnyR.js → useTheme-DfP1CWaW.js} +1 -1
  111. package/dist/assets/{utilities.esm-B7XtzwiJ.js → utilities.esm-CT3NbLA9.js} +2 -2
  112. package/dist/assets/{utils-Cxqw03y3.js → utils-CJJIceVn.js} +1 -1
  113. package/dist/assets/{vega-component-arPQXQS8.js → vega-component-CLrcy81y.js} +1 -1
  114. package/dist/assets/{write-secret-modal-CIbhcoWF.js → write-secret-modal-CLm48gMe.js} +1 -1
  115. package/dist/index.html +68 -68
  116. package/package.json +1 -1
  117. package/src/components/editor/actions/useNotebookActions.tsx +1 -1
  118. package/src/components/editor/chrome/panels/panel-context.tsx +34 -0
  119. package/src/components/editor/chrome/state.ts +30 -15
  120. package/src/components/editor/chrome/types.ts +67 -77
  121. package/src/components/editor/chrome/wrapper/app-chrome.tsx +216 -139
  122. package/src/components/editor/chrome/wrapper/sidebar.tsx +76 -43
  123. package/src/components/scratchpad/scratchpad.tsx +17 -4
  124. package/src/components/ui/reorderable-list.tsx +190 -31
  125. package/src/core/codemirror/cells/extensions.ts +7 -4
  126. package/src/core/hotkeys/__tests__/shortcuts.test.ts +61 -4
  127. package/src/core/hotkeys/shortcuts.ts +34 -2
  128. package/dist/assets/any-language-editor-CTAS1EXW.js +0 -3
  129. package/dist/assets/cell-link-DjST51KF.js +0 -1
  130. package/dist/assets/client-BQowSjqE.js +0 -4
  131. package/dist/assets/command-palette-CjFiCjws.js +0 -1
  132. package/dist/assets/edit-page-fJ4hHm67.js +0 -13
  133. package/dist/assets/hotkeys-D3ICc8RW.js +0 -1
  134. package/dist/assets/index-D-BWugLn.css +0 -2
  135. package/dist/assets/links-ZVVAwqm7.js +0 -1
  136. package/dist/assets/outline-panel-Blq76m9b.js +0 -1
  137. package/dist/assets/scratchpad-panel-CTJDEy90.js +0 -1
  138. package/dist/assets/tracing-VZVj-gEo.js +0 -1
  139. package/dist/assets/useRunCells-oeY0TrS1.js +0 -1
  140. /package/dist/assets/{cell-editor-Iey559K_.css → panel-context-Iey559K_.css} +0 -0
@@ -1 +1 @@
1
- import{s as z}from"./chunk-LvLJmgfZ.js";import"./useEvent-DlWF5OMa.js";import{t as P}from"./react-BGmjiNul.js";import{C as D}from"./cells-DAR6V-0d.js";import"./react-dom-C9fstfnp.js";import{t as I}from"./compiler-runtime-DeeZ7FnK.js";import{n as F}from"./constants-Bkp4R3bQ.js";import"./config-D3ojpe3F.js";import{t as O}from"./jsx-runtime-DN_bIXfG.js";import{i as W,t as g}from"./button-C9TEIJJh.js";import{t as q}from"./cn-C1rgT0yh.js";import{at as A}from"./dist-CAcX026F.js";import"./cjs-Bj40p_Np.js";import"./main-CwSdzVhm.js";import"./useNonce-EAuSVK-5.js";import{r as B}from"./requests-C0HaHO6a.js";import{n as $,t as G}from"./LazyAnyLanguageCodeMirror-DIbHWNF6.js";import{h as L}from"./select-BJ18Dxpd.js";import{t as R}from"./spinner-C1czjtp7.js";import{t as T}from"./plus-CHesBJpY.js";import"./dist-HGZzCB0y.js";import"./dist-CVj-_Iiz.js";import"./dist-BVf1IY4_.js";import"./dist-Cq_4nPfh.js";import"./dist-RKnr9SNh.js";import{r as U}from"./useTheme-CuOCKnyR.js";import"./Combination-D1TsGrBC.js";import{t as V}from"./tooltip-CvjcEpZC.js";import{a as J,c as K,i as Q,n as X,r as Y}from"./dialog-DIUTtzeB.js";import{n as Z}from"./ImperativeModal-7Thr73Oo.js";import{n as ee}from"./error-banner-D2-5vgE4.js";import{t as te}from"./RenderHTML-LxV1eecf.js";import"./purify.es-N-2faAGj.js";import{n as se}from"./useAsyncData-BJJJOr9W.js";import{a as re,o as le,r as oe,t as ie,u as ae}from"./command-BXWdrTY9.js";import{o as ne}from"./focus-6-St0ai2.js";import{t as me}from"./empty-state-B0XJ9ZUi.js";import{t as M}from"./kiosk-mode-C3lS9kUL.js";var E=I(),w=z(P(),1),s=z(O(),1);const ce=t=>{let e=(0,E.c)(6),{children:r}=t,{openModal:i,closeModal:o}=Z(),l;e[0]!==o||e[1]!==i?(l=()=>i((0,s.jsx)(de,{onClose:o})),e[0]=o,e[1]=i,e[2]=l):l=e[2];let a;return e[3]!==r||e[4]!==l?(a=(0,s.jsx)(W,{onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=a):a=e[5],a};var de=t=>{let e=(0,E.c)(4),{onClose:r}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(K,{children:"Contribute a Snippet"}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsxs)(J,{children:[i,(0,s.jsxs)(Y,{children:["Have a useful snippet you want to share with the community? Make a pull request"," ",(0,s.jsx)("a",{href:F.githubPage,target:"_blank",className:"underline",children:"on GitHub"}),"."]})]}),e[1]=o):o=e[1];let l;return e[2]===r?l=e[3]:(l=(0,s.jsxs)(X,{className:"max-w-md",children:[o,(0,s.jsx)(Q,{children:(0,s.jsx)(g,{"data-testid":"snippet-close-button",variant:"default",onClick:r,children:"Close"})})]}),e[2]=r,e[3]=l),l},C=I(),pe=[A.lineWrapping],he=()=>{let t=(0,C.c)(22),{readSnippets:e}=B(),[r,i]=w.useState(),o;t[0]===e?o=t[1]:(o=()=>e(),t[0]=e,t[1]=o);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=[],t[2]=l):l=t[2];let{data:a,error:m,isPending:N}=se(o,l);if(m){let n;return t[3]===m?n=t[4]:(n=(0,s.jsx)(ee,{error:m}),t[3]=m,t[4]=n),n}if(N||!a){let n;return t[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(R,{size:"medium",centered:!0}),t[5]=n):n=t[5],n}let _=r?"h-1/3":"h-full",p;t[6]===_?p=t[7]:(p=q("border-b rounded-none",_),t[6]=_,t[7]=p);let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsx)(re,{placeholder:"Search snippets...",className:"h-6 m-1",rootClassName:"flex-1 border-r"}),t[8]=h):h=t[8];let b,f;t[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsxs)("div",{className:"flex items-center w-full",children:[h,(0,s.jsx)(ce,{children:(0,s.jsx)("button",{className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:(0,s.jsx)(T,{className:"h-4 w-4"})})})]}),f=(0,s.jsx)(oe,{children:"No results"}),t[9]=b,t[10]=f):(b=t[9],f=t[10]);let x;t[11]===Symbol.for("react.memo_cache_sentinel")?(x=n=>i(n),t[11]=x):x=t[11];let u;t[12]===a.snippets?u=t[13]:(u=(0,s.jsx)(xe,{onSelect:x,snippets:a.snippets}),t[12]=a.snippets,t[13]=u);let c;t[14]!==p||t[15]!==u?(c=(0,s.jsxs)(ie,{className:p,children:[b,f,u]}),t[14]=p,t[15]=u,t[16]=c):c=t[16];let d;t[17]===r?d=t[18]:(d=(0,s.jsx)(w.Suspense,{children:(0,s.jsx)("div",{className:"h-2/3 snippet-viewer flex flex-col",children:r?(0,s.jsx)(fe,{snippet:r,onClose:()=>i(void 0)},r.title):(0,s.jsx)(me,{title:"",description:"Click on a snippet to view its content."})})}),t[17]=r,t[18]=d);let j;return t[19]!==d||t[20]!==c?(j=(0,s.jsxs)("div",{className:"flex-1 overflow-hidden",children:[c,d]}),t[19]=d,t[20]=c,t[21]=j):j=t[21],j},fe=t=>{let e=(0,C.c)(33),{snippet:r,onClose:i}=t,{theme:o}=U(),{createNewCell:l}=D(),a=ne(),m;e[0]!==l||e[1]!==a||e[2]!==r.sections?(m=()=>{for(let v of[...r.sections].reverse())v.code&&l({code:v.code,before:!1,cellId:a??"__end__",skipIfCodeExists:!0})},e[0]=l,e[1]=a,e[2]=r.sections,e[3]=m):m=e[3];let N=m,_;e[4]!==l||e[5]!==a?(_=v=>{l({code:v,before:!1,cellId:a??"__end__"})},e[4]=l,e[5]=a,e[6]=_):_=e[6];let p=_,h;e[7]===r.title?h=e[8]:(h=(0,s.jsx)("span",{children:r.title}),e[7]=r.title,e[8]=h);let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(L,{className:"h-4 w-4"}),e[9]=b):b=e[9];let f;e[10]===i?f=e[11]:(f=(0,s.jsx)(g,{size:"sm",variant:"ghost",onClick:i,className:"h-6 w-6 p-0 hover:bg-muted-foreground/10",children:b}),e[10]=i,e[11]=f);let x;e[12]!==h||e[13]!==f?(x=(0,s.jsxs)("div",{className:"text-sm font-semibold bg-muted border-y px-2 py-1 flex justify-between items-center",children:[h,f]}),e[12]=h,e[13]=f,e[14]=x):x=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)($,{className:"ml-2 h-4 w-4"}),e[15]=u):u=e[15];let c;e[16]===N?c=e[17]:(c=(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(M,{children:(0,s.jsxs)(g,{className:"float-right",size:"xs",variant:"outline",onClick:N,children:["Insert snippet",u]})})}),e[16]=N,e[17]=c);let d;if(e[18]!==p||e[19]!==r.sections||e[20]!==r.title||e[21]!==o){let v;e[23]!==p||e[24]!==r.title||e[25]!==o?(v=H=>{let{code:y,html:k,id:S}=H;return k?(0,s.jsx)("div",{children:te({html:k})},`${r.title}-${S}`):y?(0,s.jsxs)("div",{className:"relative hover-actions-parent pr-2",children:[(0,s.jsx)(M,{children:(0,s.jsx)(V,{content:"Insert snippet",children:(0,s.jsx)(g,{className:"absolute -top-2 -right-1 z-10 hover-action px-2 bg-background",size:"sm",variant:"outline",onClick:()=>{p(y)},children:(0,s.jsx)($,{className:"h-5 w-5"})})})}),(0,s.jsx)(w.Suspense,{children:(0,s.jsx)(G,{theme:o==="dark"?"dark":"light",language:"python",className:"cm border rounded overflow-hidden",extensions:pe,value:y,readOnly:!0},`${r.title}-${S}`)})]},`${r.title}-${S}`):null},e[23]=p,e[24]=r.title,e[25]=o,e[26]=v):v=e[26],d=r.sections.map(v),e[18]=p,e[19]=r.sections,e[20]=r.title,e[21]=o,e[22]=d}else d=e[22];let j;e[27]!==c||e[28]!==d?(j=(0,s.jsxs)("div",{className:"px-2 py-2 space-y-4 overflow-auto flex-1",children:[c,d]}),e[27]=c,e[28]=d,e[29]=j):j=e[29];let n;return e[30]!==j||e[31]!==x?(n=(0,s.jsxs)(s.Fragment,{children:[x,j]}),e[30]=j,e[31]=x,e[32]=n):n=e[32],n},xe=t=>{let e=(0,C.c)(7),{snippets:r,onSelect:i}=t,o;if(e[0]!==i||e[1]!==r){let a;e[3]===i?a=e[4]:(a=m=>(0,s.jsx)(le,{className:"rounded-none",onSelect:()=>i(m),children:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,s.jsx)("span",{className:"mt-1 text-accent-foreground",children:m.title})})},m.title),e[3]=i,e[4]=a),o=r.map(a),e[0]=i,e[1]=r,e[2]=o}else o=e[2];let l;return e[5]===o?l=e[6]:(l=(0,s.jsx)(ae,{className:"flex flex-col overflow-auto",children:o}),e[5]=o,e[6]=l),l};export{he as default};
1
+ import{s as z}from"./chunk-LvLJmgfZ.js";import"./useEvent-DlWF5OMa.js";import{t as P}from"./react-BGmjiNul.js";import{C as D}from"./cells-rr1jjvJk.js";import"./react-dom-C9fstfnp.js";import{t as I}from"./compiler-runtime-DeeZ7FnK.js";import{n as F}from"./constants-Bkp4R3bQ.js";import"./config-cCkBQ_ER.js";import{t as O}from"./jsx-runtime-DN_bIXfG.js";import{i as W,t as g}from"./button-DuYGqRtX.js";import{t as q}from"./cn-C1rgT0yh.js";import{at as A}from"./dist-CAcX026F.js";import"./cjs-Bj40p_Np.js";import"./main-CwSdzVhm.js";import"./useNonce-EAuSVK-5.js";import{r as B}from"./requests-C0HaHO6a.js";import{n as $,t as G}from"./LazyAnyLanguageCodeMirror-jpEDlD0M.js";import{h as L}from"./select-D0g5GnIs.js";import{t as R}from"./spinner-C1czjtp7.js";import{t as T}from"./plus-CHesBJpY.js";import"./dist-HGZzCB0y.js";import"./dist-CVj-_Iiz.js";import"./dist-BVf1IY4_.js";import"./dist-Cq_4nPfh.js";import"./dist-RKnr9SNh.js";import{r as U}from"./useTheme-DfP1CWaW.js";import"./Combination-D1TsGrBC.js";import{t as V}from"./tooltip-CvjcEpZC.js";import{a as J,c as K,i as Q,n as X,r as Y}from"./dialog-DUEuLcT2.js";import{n as Z}from"./ImperativeModal-q6QlC2aZ.js";import{n as ee}from"./error-banner-DU5Qb8a8.js";import{t as te}from"./RenderHTML-D6fh5YLC.js";import"./purify.es-N-2faAGj.js";import{n as se}from"./useAsyncData-BJJJOr9W.js";import{a as re,o as le,r as oe,t as ie,u as ae}from"./command-xU8ykulh.js";import{o as ne}from"./focus-D3ygI6Sy.js";import{t as me}from"./empty-state-B0XJ9ZUi.js";import{t as M}from"./kiosk-mode-CTjr_Jn4.js";var E=I(),w=z(P(),1),s=z(O(),1);const ce=t=>{let e=(0,E.c)(6),{children:r}=t,{openModal:i,closeModal:o}=Z(),l;e[0]!==o||e[1]!==i?(l=()=>i((0,s.jsx)(de,{onClose:o})),e[0]=o,e[1]=i,e[2]=l):l=e[2];let a;return e[3]!==r||e[4]!==l?(a=(0,s.jsx)(W,{onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=a):a=e[5],a};var de=t=>{let e=(0,E.c)(4),{onClose:r}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(K,{children:"Contribute a Snippet"}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsxs)(J,{children:[i,(0,s.jsxs)(Y,{children:["Have a useful snippet you want to share with the community? Make a pull request"," ",(0,s.jsx)("a",{href:F.githubPage,target:"_blank",className:"underline",children:"on GitHub"}),"."]})]}),e[1]=o):o=e[1];let l;return e[2]===r?l=e[3]:(l=(0,s.jsxs)(X,{className:"max-w-md",children:[o,(0,s.jsx)(Q,{children:(0,s.jsx)(g,{"data-testid":"snippet-close-button",variant:"default",onClick:r,children:"Close"})})]}),e[2]=r,e[3]=l),l},C=I(),pe=[A.lineWrapping],he=()=>{let t=(0,C.c)(22),{readSnippets:e}=B(),[r,i]=w.useState(),o;t[0]===e?o=t[1]:(o=()=>e(),t[0]=e,t[1]=o);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=[],t[2]=l):l=t[2];let{data:a,error:m,isPending:N}=se(o,l);if(m){let n;return t[3]===m?n=t[4]:(n=(0,s.jsx)(ee,{error:m}),t[3]=m,t[4]=n),n}if(N||!a){let n;return t[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(R,{size:"medium",centered:!0}),t[5]=n):n=t[5],n}let _=r?"h-1/3":"h-full",p;t[6]===_?p=t[7]:(p=q("border-b rounded-none",_),t[6]=_,t[7]=p);let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsx)(re,{placeholder:"Search snippets...",className:"h-6 m-1",rootClassName:"flex-1 border-r"}),t[8]=h):h=t[8];let b,f;t[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsxs)("div",{className:"flex items-center w-full",children:[h,(0,s.jsx)(ce,{children:(0,s.jsx)("button",{className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:(0,s.jsx)(T,{className:"h-4 w-4"})})})]}),f=(0,s.jsx)(oe,{children:"No results"}),t[9]=b,t[10]=f):(b=t[9],f=t[10]);let x;t[11]===Symbol.for("react.memo_cache_sentinel")?(x=n=>i(n),t[11]=x):x=t[11];let u;t[12]===a.snippets?u=t[13]:(u=(0,s.jsx)(xe,{onSelect:x,snippets:a.snippets}),t[12]=a.snippets,t[13]=u);let c;t[14]!==p||t[15]!==u?(c=(0,s.jsxs)(ie,{className:p,children:[b,f,u]}),t[14]=p,t[15]=u,t[16]=c):c=t[16];let d;t[17]===r?d=t[18]:(d=(0,s.jsx)(w.Suspense,{children:(0,s.jsx)("div",{className:"h-2/3 snippet-viewer flex flex-col",children:r?(0,s.jsx)(fe,{snippet:r,onClose:()=>i(void 0)},r.title):(0,s.jsx)(me,{title:"",description:"Click on a snippet to view its content."})})}),t[17]=r,t[18]=d);let j;return t[19]!==d||t[20]!==c?(j=(0,s.jsxs)("div",{className:"flex-1 overflow-hidden",children:[c,d]}),t[19]=d,t[20]=c,t[21]=j):j=t[21],j},fe=t=>{let e=(0,C.c)(33),{snippet:r,onClose:i}=t,{theme:o}=U(),{createNewCell:l}=D(),a=ne(),m;e[0]!==l||e[1]!==a||e[2]!==r.sections?(m=()=>{for(let v of[...r.sections].reverse())v.code&&l({code:v.code,before:!1,cellId:a??"__end__",skipIfCodeExists:!0})},e[0]=l,e[1]=a,e[2]=r.sections,e[3]=m):m=e[3];let N=m,_;e[4]!==l||e[5]!==a?(_=v=>{l({code:v,before:!1,cellId:a??"__end__"})},e[4]=l,e[5]=a,e[6]=_):_=e[6];let p=_,h;e[7]===r.title?h=e[8]:(h=(0,s.jsx)("span",{children:r.title}),e[7]=r.title,e[8]=h);let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(L,{className:"h-4 w-4"}),e[9]=b):b=e[9];let f;e[10]===i?f=e[11]:(f=(0,s.jsx)(g,{size:"sm",variant:"ghost",onClick:i,className:"h-6 w-6 p-0 hover:bg-muted-foreground/10",children:b}),e[10]=i,e[11]=f);let x;e[12]!==h||e[13]!==f?(x=(0,s.jsxs)("div",{className:"text-sm font-semibold bg-muted border-y px-2 py-1 flex justify-between items-center",children:[h,f]}),e[12]=h,e[13]=f,e[14]=x):x=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=(0,s.jsx)($,{className:"ml-2 h-4 w-4"}),e[15]=u):u=e[15];let c;e[16]===N?c=e[17]:(c=(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(M,{children:(0,s.jsxs)(g,{className:"float-right",size:"xs",variant:"outline",onClick:N,children:["Insert snippet",u]})})}),e[16]=N,e[17]=c);let d;if(e[18]!==p||e[19]!==r.sections||e[20]!==r.title||e[21]!==o){let v;e[23]!==p||e[24]!==r.title||e[25]!==o?(v=H=>{let{code:y,html:k,id:S}=H;return k?(0,s.jsx)("div",{children:te({html:k})},`${r.title}-${S}`):y?(0,s.jsxs)("div",{className:"relative hover-actions-parent pr-2",children:[(0,s.jsx)(M,{children:(0,s.jsx)(V,{content:"Insert snippet",children:(0,s.jsx)(g,{className:"absolute -top-2 -right-1 z-10 hover-action px-2 bg-background",size:"sm",variant:"outline",onClick:()=>{p(y)},children:(0,s.jsx)($,{className:"h-5 w-5"})})})}),(0,s.jsx)(w.Suspense,{children:(0,s.jsx)(G,{theme:o==="dark"?"dark":"light",language:"python",className:"cm border rounded overflow-hidden",extensions:pe,value:y,readOnly:!0},`${r.title}-${S}`)})]},`${r.title}-${S}`):null},e[23]=p,e[24]=r.title,e[25]=o,e[26]=v):v=e[26],d=r.sections.map(v),e[18]=p,e[19]=r.sections,e[20]=r.title,e[21]=o,e[22]=d}else d=e[22];let j;e[27]!==c||e[28]!==d?(j=(0,s.jsxs)("div",{className:"px-2 py-2 space-y-4 overflow-auto flex-1",children:[c,d]}),e[27]=c,e[28]=d,e[29]=j):j=e[29];let n;return e[30]!==j||e[31]!==x?(n=(0,s.jsxs)(s.Fragment,{children:[x,j]}),e[30]=j,e[31]=x,e[32]=n):n=e[32],n},xe=t=>{let e=(0,C.c)(7),{snippets:r,onSelect:i}=t,o;if(e[0]!==i||e[1]!==r){let a;e[3]===i?a=e[4]:(a=m=>(0,s.jsx)(le,{className:"rounded-none",onSelect:()=>i(m),children:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,s.jsx)("span",{className:"mt-1 text-accent-foreground",children:m.title})})},m.title),e[3]=i,e[4]=a),o=r.map(a),e[0]=i,e[1]=r,e[2]=o}else o=e[2];let l;return e[5]===o?l=e[6]:(l=(0,s.jsx)(ae,{className:"flex flex-col overflow-auto",children:o}),e[5]=o,e[6]=l),l};export{he as default};
@@ -1 +1 @@
1
- import{i as I}from"./useLifecycle-BX7GmOQ5.js";import{r as J}from"./type-drzC-SxF.js";import{t as p}from"./createLucideIcon-CW2xpJ57.js";import{t as R}from"./chart-no-axes-column-D42sFB6d.js";import{r as Z,t as ee}from"./table-BLx7B_us.js";import{t as te}from"./square-function-DxXFdbn8.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
1
+ import{i as I}from"./useLifecycle-CmDXEyIC.js";import{r as J}from"./type-BdyvjzTI.js";import{t as p}from"./createLucideIcon-CW2xpJ57.js";import{t as R}from"./chart-no-axes-column-D42sFB6d.js";import{r as Z,t as ee}from"./table-BLx7B_us.js";import{t as te}from"./square-function-DxXFdbn8.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
@@ -1 +1 @@
1
- import{p as i}from"./useEvent-DlWF5OMa.js";import{Kr as l,dn as o,fn as h}from"./cells-DAR6V-0d.js";import{d}from"./once-CTiSlR1m.js";import{t as m}from"./createLucideIcon-CW2xpJ57.js";var p=m("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),f="marimo:ai:chatState:v5";const v=i(null),u=l("marimo:ai:includeOtherCells",!0,h);function C(a){let t=new Map;for(let[s,e]of a.entries()){if(e.messages.length===0)continue;let c=d(e.messages,n=>n.id);t.set(s,{...e,messages:c})}return t}const r=l(f,{chats:new Map,activeChatId:null},o({toSerializable:a=>({chats:[...C(a.chats).entries()],activeChatId:a.activeChatId}),fromSerializable:a=>({chats:new Map(a.chats),activeChatId:a.activeChatId})})),I=i(a=>{let t=a(r);return t.activeChatId?t.chats.get(t.activeChatId):null},(a,t,s)=>{t(r,e=>({...e,activeChatId:s}))});export{p as a,u as i,v as n,r,I as t};
1
+ import{p as i}from"./useEvent-DlWF5OMa.js";import{Gr as l,dn as o,un as h}from"./cells-rr1jjvJk.js";import{d}from"./once-CTiSlR1m.js";import{t as m}from"./createLucideIcon-CW2xpJ57.js";var p=m("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),f="marimo:ai:chatState:v5";const v=i(null),u=l("marimo:ai:includeOtherCells",!0,o);function C(a){let t=new Map;for(let[s,e]of a.entries()){if(e.messages.length===0)continue;let c=d(e.messages,n=>n.id);t.set(s,{...e,messages:c})}return t}const r=l(f,{chats:new Map,activeChatId:null},h({toSerializable:a=>({chats:[...C(a.chats).entries()],activeChatId:a.activeChatId}),fromSerializable:a=>({chats:new Map(a.chats),activeChatId:a.activeChatId})})),I=i(a=>{let t=a(r);return t.activeChatId?t.chats.get(t.activeChatId):null},(a,t,s)=>{t(r,e=>({...e,activeChatId:s}))});export{p as a,u as i,v as n,r,I as t};
@@ -1 +1 @@
1
- import{u as o}from"./useEvent-DlWF5OMa.js";import{t}from"./createReducer-CaezzNVH.js";import{t as a}from"./uuid-ClFZlR7U.js";function d(){return{pendingCommands:[],isReady:!1}}var{reducer:f,createActions:g,valueAtom:r,useActions:i}=t(d,{addCommand:(n,m)=>{let e={id:a(),text:m,timestamp:Date.now()};return{...n,pendingCommands:[...n.pendingCommands,e]}},removeCommand:(n,m)=>({...n,pendingCommands:n.pendingCommands.filter(e=>e.id!==m)}),setReady:(n,m)=>({...n,isReady:m}),clearCommands:n=>({...n,pendingCommands:[]})});const s=()=>o(r);function p(){return i()}export{s as n,p as t};
1
+ import{u as o}from"./useEvent-DlWF5OMa.js";import{t}from"./createReducer-DDa-hVe3.js";import{t as a}from"./uuid-ClFZlR7U.js";function d(){return{pendingCommands:[],isReady:!1}}var{reducer:f,createActions:g,valueAtom:r,useActions:i}=t(d,{addCommand:(n,m)=>{let e={id:a(),text:m,timestamp:Date.now()};return{...n,pendingCommands:[...n.pendingCommands,e]}},removeCommand:(n,m)=>({...n,pendingCommands:n.pendingCommands.filter(e=>e.id!==m)}),setReady:(n,m)=>({...n,isReady:m}),clearCommands:n=>({...n,pendingCommands:[]})});const s=()=>o(r);function p(){return i()}export{s as n,p as t};