@marimo-team/frontend 0.25.2-dev16 → 0.25.2-dev17

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 (99) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-SJEQJzCV.js → ConnectedDataExplorerComponent-DXfDBqxd.js} +1 -1
  2. package/dist/assets/{ErrorBoundary-DfqW9IUs.js → ErrorBoundary-CFLwe8Ze.js} +2 -2
  3. package/dist/assets/{LazyAnyLanguageCodeMirror-C98DNvLI.js → LazyAnyLanguageCodeMirror-CsgLA3va.js} +2 -2
  4. package/dist/assets/{RunButton-DJzt1mSu.js → RunButton-D_s-sd2x.js} +1 -1
  5. package/dist/assets/__vite-browser-external-BgsHWynV.js +1 -0
  6. package/dist/assets/__vite-browser-external-DMJaCYJh.js +1 -0
  7. package/dist/assets/{abnfDiagram-VCTEODGH-DH1E0zmF.js → abnfDiagram-VCTEODGH-D5tJbQeG.js} +1 -1
  8. package/dist/assets/{add-cell-with-ai-CQ0NJGhf.js → add-cell-with-ai-B24OH9H6.js} +1 -1
  9. package/dist/assets/{agent-panel-NZbe8xZk.js → agent-panel-B_qO2bWj.js} +1 -1
  10. package/dist/assets/{ai-model-dropdown-DyxQD71x.js → ai-model-dropdown-JVLsIAq8.js} +1 -1
  11. package/dist/assets/{any-language-editor-DSFQIVxN.js → any-language-editor-ByNR_ywf.js} +1 -1
  12. package/dist/assets/{app-config-button-BTPBl4_2.js → app-config-button-BhSn-gsg.js} +1 -1
  13. package/dist/assets/{architectureDiagram-5GKGNRK7-BgJ_V-GG.js → architectureDiagram-5GKGNRK7-ei7xMm1r.js} +1 -1
  14. package/dist/assets/{blockDiagram-I7D4REHJ-D6iyPUKh.js → blockDiagram-I7D4REHJ-CyR9Ul7M.js} +1 -1
  15. package/dist/assets/{cache-panel-Bj3iVsJP.js → cache-panel-CEi1EBGS.js} +1 -1
  16. package/dist/assets/{chat-display-D25pQ44L.js → chat-display-CnHKReih.js} +1 -1
  17. package/dist/assets/{chat-panel-CRY5ojsb.js → chat-panel-DOiv1y2X.js} +1 -1
  18. package/dist/assets/{chat-ui-B10N8GmS.js → chat-ui-CNxh8sq2.js} +1 -1
  19. package/dist/assets/{chunk-IMKFNOWR-DODdy9e0.js → chunk-IMKFNOWR-Cd9j8nZh.js} +1 -1
  20. package/dist/assets/{chunk-SHT3W25Y-3TeJ3lTg.js → chunk-SHT3W25Y-DX2hjCHE.js} +1 -1
  21. package/dist/assets/{chunk-SVP7TREG-Ct777wRM.js → chunk-SVP7TREG-BG9ncnm8.js} +1 -1
  22. package/dist/assets/{chunk-TICWLB2K-Da2jAi52.js → chunk-TICWLB2K-CXqaaib0.js} +1 -1
  23. package/dist/assets/{classDiagram-ZZMXUADV-D_m4oZbW.js → classDiagram-ZZMXUADV-B7P73oZ6.js} +1 -1
  24. package/dist/assets/{classDiagram-v2-VYDZK3BY-D_m4oZbW.js → classDiagram-v2-VYDZK3BY-B7P73oZ6.js} +1 -1
  25. package/dist/assets/{code-visibility-BKljCCDE.js → code-visibility-Du9q6YD9.js} +1 -1
  26. package/dist/assets/{command-palette-CMMJENXb.js → command-palette-CCW_vYbZ.js} +1 -1
  27. package/dist/assets/{common--XEpP1qz.js → common-BtNTv98d.js} +1 -1
  28. package/dist/assets/{components-jvm8P_df.js → components-C7tokapA.js} +1 -1
  29. package/dist/assets/{components-CjhZlMUm.js → components-Dude5nxX.js} +1 -1
  30. package/dist/assets/{cynefinDiagram-5FMLGOSQ-CPh1Kbrt.js → cynefinDiagram-5FMLGOSQ-Bu4DHCOG.js} +1 -1
  31. package/dist/assets/{dagre-CCiXgITG.js → dagre-C6qWzvFC.js} +1 -1
  32. package/dist/assets/{dagre-GXQ25YYZ-Cmt7670G.js → dagre-GXQ25YYZ-BmrdKMbI.js} +1 -1
  33. package/dist/assets/{data-grid-overlay-editor-DyC_M0HR.js → data-grid-overlay-editor-Cb2XMloM.js} +1 -1
  34. package/dist/assets/{dependency-graph-panel-CjZLuif-.js → dependency-graph-panel-D_ASPsTd.js} +1 -1
  35. package/dist/assets/{diagram-S7CK7UJ4-CxNSdES-.js → diagram-S7CK7UJ4-BDpM8zF-.js} +1 -1
  36. package/dist/assets/{diagram-UQ7AKVKN-l3mxspw1.js → diagram-UQ7AKVKN-CQR8YVAL.js} +1 -1
  37. package/dist/assets/{diagram-VX7I27RA-DKqeljt_.js → diagram-VX7I27RA-DbCxuEs-.js} +1 -1
  38. package/dist/assets/{diagram-Z3DM3KII-HVdOjDbt.js → diagram-Z3DM3KII-BKxCNKna.js} +1 -1
  39. package/dist/assets/{documentation-panel-t_M1iwCC.js → documentation-panel-DPhNGiXk.js} +1 -1
  40. package/dist/assets/{ebnfDiagram-PWID7BFC-0I5huAVM.js → ebnfDiagram-PWID7BFC-BS79e_zB.js} +1 -1
  41. package/dist/assets/{edit-page-DWfzY74t.js → edit-page-C8WCkElH.js} +4 -4
  42. package/dist/assets/{erDiagram-RLTQ6QDP-NAbTbXjD.js → erDiagram-RLTQ6QDP-CC6zQ_6k.js} +1 -1
  43. package/dist/assets/{error-panel-CeTSJtUe.js → error-panel-DFho45LA.js} +1 -1
  44. package/dist/assets/{feedback-button-CBs10NBs.js → feedback-button-TolU0QDp.js} +1 -1
  45. package/dist/assets/{file-explorer-panel-C7cGx9oC.js → file-explorer-panel-D7bpT_0P.js} +1 -1
  46. package/dist/assets/{file-name-input-gZ0zN0YL.js → file-name-input-CY6Qaixx.js} +1 -1
  47. package/dist/assets/{flowDiagram-HODETNUW-COt8nhXr.js → flowDiagram-HODETNUW-Bzuwsjnt.js} +1 -1
  48. package/dist/assets/{gallery-page-CHk490Ij.js → gallery-page-DJrPLIap.js} +1 -1
  49. package/dist/assets/{glide-data-editor-BzhWriSb.js → glide-data-editor-C4GmjdPG.js} +4 -4
  50. package/dist/assets/{graphlib-C_spNDqd.js → graphlib-CGBEs_CH.js} +1 -1
  51. package/dist/assets/has-DtJ36W7t.js +1 -0
  52. package/dist/assets/{home-page-BFnrrxp4.js → home-page-oxUJbwGR.js} +1 -1
  53. package/dist/assets/{index-BcSrlbHM.js → index-BwQosu9I.js} +9 -9
  54. package/dist/assets/{infoDiagram-27XIBGKW-Bnx33qrL.js → infoDiagram-27XIBGKW-DlnSsJkR.js} +1 -1
  55. package/dist/assets/{ishikawaDiagram-5VMMS53U-C6D132Ye.js → ishikawaDiagram-5VMMS53U-CSy37q4N.js} +1 -1
  56. package/dist/assets/{kanban-definition-UXKFOSKX-DaPCFz2C.js → kanban-definition-UXKFOSKX-CNqM52De.js} +1 -1
  57. package/dist/assets/{logs-panel-ybY8Mxrs.js → logs-panel-CtYvAjh9.js} +1 -1
  58. package/dist/assets/{mermaid-CUmBqzux.js → mermaid-BzCpEEZq.js} +4 -4
  59. package/dist/assets/{mindmap-definition-YA3MSWOX-CAgHHWv8.js → mindmap-definition-YA3MSWOX-Cj7kbST_.js} +1 -1
  60. package/dist/assets/{number-overlay-editor-BKaQSt37.js → number-overlay-editor-B-F0mRTv.js} +1 -1
  61. package/dist/assets/{outline-panel-DqPPL53_.js → outline-panel-B7MwNvlJ.js} +1 -1
  62. package/dist/assets/{packages-panel-CkSE_jbL.js → packages-panel-fIaUSNlv.js} +1 -1
  63. package/dist/assets/{panels-CrsfjzMc.js → panels-BZIdXTmc.js} +3 -3
  64. package/dist/assets/{pegDiagram-XKGWAZYB-BUSVb7nn.js → pegDiagram-XKGWAZYB-DcQKM41f.js} +1 -1
  65. package/dist/assets/{pieDiagram-E7YTZNPT-BOiuXITO.js → pieDiagram-E7YTZNPT-CUwu-m6V.js} +1 -1
  66. package/dist/assets/{process-output-CaAyA3CM.js → process-output-cU1z3S-I.js} +1 -1
  67. package/dist/assets/{railroadDiagram-O6MQD6OU-ydhTE-wy.js → railroadDiagram-O6MQD6OU-DxIHx-lA.js} +1 -1
  68. package/dist/assets/{requirementDiagram-BXWQKSXE-C988Cjar.js → requirementDiagram-BXWQKSXE-DIYVMyso.js} +1 -1
  69. package/dist/assets/{reveal-component-BxZHPrkV.js → reveal-component-DaZd_kMN.js} +1 -1
  70. package/dist/assets/{run-page-CXWsnvDf.js → run-page-BRVOMHdN.js} +1 -1
  71. package/dist/assets/{save-worker-Dw8ybFWq.js → save-worker-C880NC3o.js} +5 -5
  72. package/dist/assets/{scratchpad-panel-BPaH8KYi.js → scratchpad-panel-c7wFH-Oy.js} +1 -1
  73. package/dist/assets/{secrets-panel-DE2hDf__.js → secrets-panel-BHTitTsn.js} +1 -1
  74. package/dist/assets/{sequenceDiagram-WJ2MYXX4-C9eah9w8.js → sequenceDiagram-WJ2MYXX4-Dpk7sDmM.js} +1 -1
  75. package/dist/assets/{session-panel-Dpf8Kgy4.js → session-panel-BxnQsdxG.js} +1 -1
  76. package/dist/assets/{snippets-panel-CUaWd17V.js → snippets-panel-0tEz9in4.js} +1 -1
  77. package/dist/assets/{stateDiagram-D77RDMKH-7hEMSq3i.js → stateDiagram-D77RDMKH-qc3pRefj.js} +1 -1
  78. package/dist/assets/{stateDiagram-v2-MP3YSRHH-xImADxvl.js → stateDiagram-v2-MP3YSRHH-5IvDXqsU.js} +1 -1
  79. package/dist/assets/{swimlanes-42K2YHIH-Ts2LZKz6.js → swimlanes-42K2YHIH-DgC5Wl89.js} +1 -1
  80. package/dist/assets/{swimlanesDiagram-VR7AAH4N-OT8RyMny.js → swimlanesDiagram-VR7AAH4N-C_5IKZd0.js} +1 -1
  81. package/dist/assets/{swiper-component-DYo3pC2G.js → swiper-component-DKugJxYx.js} +1 -1
  82. package/dist/assets/{terminal-Dgf6yfKc.js → terminal-CT_PG6vP.js} +1 -1
  83. package/dist/assets/{timeline-definition-24CTP7MA-C5CrYwY2.js → timeline-definition-24CTP7MA-cli6EBSm.js} +1 -1
  84. package/dist/assets/{tracing-D3AehqB_.js → tracing-CoGFo6np.js} +1 -1
  85. package/dist/assets/{tracing-panel-DYQLU9U_.js → tracing-panel-DUzJo6UI.js} +2 -2
  86. package/dist/assets/{useCellActionButton-B3O3lQMF.js → useCellActionButton-BmylHRt-.js} +1 -1
  87. package/dist/assets/{vega-component-GpNt78cG.js → vega-component-B2Yw2uV8.js} +1 -1
  88. package/dist/assets/{vega-embed-container-DDuXVXkl.js → vega-embed-container-BUSjkWO5.js} +1 -1
  89. package/dist/assets/{vennDiagram-4TSXK5OY-CI7kwUQq.js → vennDiagram-4TSXK5OY-CFpSG_nk.js} +1 -1
  90. package/dist/assets/{wardleyDiagram-VM6X3IG4-BPv9pTcr.js → wardleyDiagram-VM6X3IG4-CZvydTGr.js} +1 -1
  91. package/dist/assets/{worker-ByzyDs4N.js → worker-B5tVfGoh.js} +6 -6
  92. package/dist/assets/{xychartDiagram-S5SC5T6Z-Cfi8QnEy.js → xychartDiagram-S5SC5T6Z-F8wRthiY.js} +1 -1
  93. package/dist/index.html +3 -3
  94. package/package.json +1 -1
  95. package/src/core/wasm/__tests__/bootstrap.test.ts +33 -1
  96. package/src/core/wasm/worker/bootstrap.ts +22 -3
  97. package/dist/assets/__vite-browser-external-Cw9Ccr_O.js +0 -1
  98. package/dist/assets/__vite-browser-external-DBuuG05M.js +0 -1
  99. package/dist/assets/has-BWZ6BWpX.js +0 -1
@@ -1,4 +1,4 @@
1
- import{t as e}from"./linear-0eij_aAG.js";import{n as t}from"./ordinal-BdBDtYTt.js";import{t as n}from"./range-EplFIxc7.js";import{v as r}from"./step-CriubqJO.js";import{i}from"./chunk-75Z2AOVW-BzzYECN7.js";import{n as a}from"./init-ZlXS9mIS.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as s}from"./src-Cyu5G-Tr.js";import{D as c,H as l,K as u,U as d,a as f,b as p,c as m,f as h,v as g,w as _,y as v,z as y}from"./chunk-DU6HZSFF-BlpgvKzl.js";import"./chunk-PWAF6VOD-BZoBqp8x.js";import{t as b}from"./chunk-GMAD6QVW-hv6IsAru.js";import{p as x}from"./mermaid-CUmBqzux.js";function S(){var e=t().unknown(void 0),r=e.domain,i=e.range,o=0,s=1,c,l,u=!1,d=0,f=0,p=.5;delete e.unknown;function m(){var e=r().length,t=s<o,a=t?s:o,m=t?o:s;c=(m-a)/Math.max(1,e-d+f*2),u&&(c=Math.floor(c)),a+=(m-a-c*(e-d))*p,l=c*(1-d),u&&(a=Math.round(a),l=Math.round(l));var h=n(e).map(function(e){return a+c*e});return i(t?h.reverse():h)}return e.domain=function(e){return arguments.length?(r(e),m()):r()},e.range=function(e){return arguments.length?([o,s]=e,o=+o,s=+s,m()):[o,s]},e.rangeRound=function(e){return[o,s]=e,o=+o,s=+s,u=!0,m()},e.bandwidth=function(){return l},e.step=function(){return c},e.round=function(e){return arguments.length?(u=!!e,m()):u},e.padding=function(e){return arguments.length?(d=Math.min(1,f=+e),m()):d},e.paddingInner=function(e){return arguments.length?(d=Math.min(1,e),m()):d},e.paddingOuter=function(e){return arguments.length?(f=+e,m()):f},e.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),m()):p},e.copy=function(){return S(r(),[o,s]).round(u).paddingInner(d).paddingOuter(f).align(p)},a.apply(m(),arguments)}var C=(function(){var e=o(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:o(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:o(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:r,36:i,37:a,38:s}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:r,36:i,37:a,38:s}),e(t,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],36:i,37:a,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(c,[2,36]),e(c,[2,37]),e(c,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:r,36:i,37:a,38:s}),{1:[2,3]},e(c,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),e(E,[2,40]),e(E,[2,41]),e(D,[2,42]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(D,[2,52]),e(D,[2,53]),e(T,[2,10]),e(T,[2,24],{32:41,31:56,24:x,29:S}),e(T,[2,26]),e(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,11]),e(T,[2,32],{35:60,29:C}),e(T,[2,34]),{33:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},e(T,[2,14]),{17:66,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,43]),e(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(T,[2,33]),{29:[1,70]},e(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(k,[2,23],{30:[1,73]}),e(T,[2,15]),e(T,[2,28]),e(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,35]),e(T,[2,19]),{25:75,27:64,29:O},e(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:o(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:o(function(e){var t=this,n=[0],r=[],i=[null],a=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}o(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}o(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{t as e}from"./linear-0eij_aAG.js";import{n as t}from"./ordinal-BdBDtYTt.js";import{t as n}from"./range-EplFIxc7.js";import{v as r}from"./step-CriubqJO.js";import{i}from"./chunk-75Z2AOVW-BzzYECN7.js";import{n as a}from"./init-ZlXS9mIS.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as s}from"./src-Cyu5G-Tr.js";import{D as c,H as l,K as u,U as d,a as f,b as p,c as m,f as h,v as g,w as _,y as v,z as y}from"./chunk-DU6HZSFF-BlpgvKzl.js";import"./chunk-PWAF6VOD-BZoBqp8x.js";import{t as b}from"./chunk-GMAD6QVW-hv6IsAru.js";import{p as x}from"./mermaid-BzCpEEZq.js";function S(){var e=t().unknown(void 0),r=e.domain,i=e.range,o=0,s=1,c,l,u=!1,d=0,f=0,p=.5;delete e.unknown;function m(){var e=r().length,t=s<o,a=t?s:o,m=t?o:s;c=(m-a)/Math.max(1,e-d+f*2),u&&(c=Math.floor(c)),a+=(m-a-c*(e-d))*p,l=c*(1-d),u&&(a=Math.round(a),l=Math.round(l));var h=n(e).map(function(e){return a+c*e});return i(t?h.reverse():h)}return e.domain=function(e){return arguments.length?(r(e),m()):r()},e.range=function(e){return arguments.length?([o,s]=e,o=+o,s=+s,m()):[o,s]},e.rangeRound=function(e){return[o,s]=e,o=+o,s=+s,u=!0,m()},e.bandwidth=function(){return l},e.step=function(){return c},e.round=function(e){return arguments.length?(u=!!e,m()):u},e.padding=function(e){return arguments.length?(d=Math.min(1,f=+e),m()):d},e.paddingInner=function(e){return arguments.length?(d=Math.min(1,e),m()):d},e.paddingOuter=function(e){return arguments.length?(f=+e,m()):f},e.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),m()):p},e.copy=function(){return S(r(),[o,s]).round(u).paddingInner(d).paddingOuter(f).align(p)},a.apply(m(),arguments)}var C=(function(){var e=o(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:o(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:o(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:r,36:i,37:a,38:s}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:r,36:i,37:a,38:s}),e(t,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],36:i,37:a,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(c,[2,36]),e(c,[2,37]),e(c,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:r,36:i,37:a,38:s}),{1:[2,3]},e(c,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),e(E,[2,40]),e(E,[2,41]),e(D,[2,42]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(D,[2,52]),e(D,[2,53]),e(T,[2,10]),e(T,[2,24],{32:41,31:56,24:x,29:S}),e(T,[2,26]),e(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,11]),e(T,[2,32],{35:60,29:C}),e(T,[2,34]),{33:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},e(T,[2,14]),{17:66,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,43]),e(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(T,[2,33]),{29:[1,70]},e(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(k,[2,23],{30:[1,73]}),e(T,[2,15]),e(T,[2,28]),e(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,35]),e(T,[2,19]),{25:75,27:64,29:O},e(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:o(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:o(function(e){var t=this,n=[0],r=[],i=[null],a=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}o(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}o(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:o(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:o(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:o(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:o(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:o(function(){return this._more=!0,this},`more`),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:o(function(e){this.unput(this.match.slice(e))},`less`),pastInput:o(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:o(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:o(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
package/dist/index.html CHANGED
@@ -66,7 +66,7 @@
66
66
  <marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
67
67
  <!-- /TODO -->
68
68
  <title>{{ title }}</title>
69
- <script type="module" crossorigin src="./assets/index-BcSrlbHM.js"></script>
69
+ <script type="module" crossorigin src="./assets/index-BwQosu9I.js"></script>
70
70
  <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B0Z9INg1.js">
71
71
  <link rel="modulepreload" crossorigin href="./assets/react-CUdNIagt.js">
72
72
  <link rel="modulepreload" crossorigin href="./assets/compiler-runtime-BQ9S8nyo.js">
@@ -144,11 +144,11 @@
144
144
  <link rel="modulepreload" crossorigin href="./assets/copy-RyCOE8jo.js">
145
145
  <link rel="modulepreload" crossorigin href="./assets/copy-B--GzTEX.js">
146
146
  <link rel="modulepreload" crossorigin href="./assets/copy-icon-DQuttmjH.js">
147
- <link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-DfqW9IUs.js">
147
+ <link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-CFLwe8Ze.js">
148
148
  <link rel="modulepreload" crossorigin href="./assets/config-2Nts63h2.js">
149
149
  <link rel="modulepreload" crossorigin href="./assets/chevron-right-DOPs2jx8.js">
150
150
  <link rel="modulepreload" crossorigin href="./assets/dropdown-menu-Crx6knLg.js">
151
- <link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-C98DNvLI.js">
151
+ <link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-CsgLA3va.js">
152
152
  <link rel="modulepreload" crossorigin href="./assets/hat-glasses-DVgK5i5l.js">
153
153
  <link rel="modulepreload" crossorigin href="./assets/package-BeYhVWvM.js">
154
154
  <link rel="modulepreload" crossorigin href="./assets/errors-D9vyuMar.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.25.2-dev16",
3
+ "version": "0.25.2-dev17",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -3,7 +3,7 @@
3
3
  import { loadPyodide } from "pyodide";
4
4
  import type { PyodideInterface } from "pyodide";
5
5
  import { beforeEach, describe, expect, it, vi } from "vitest";
6
- import { DefaultWasmController } from "../worker/bootstrap";
6
+ import { DefaultWasmController, requirementName } from "../worker/bootstrap";
7
7
 
8
8
  vi.mock("pyodide", () => ({ loadPyodide: vi.fn() }));
9
9
  vi.mock("../worker/getMarimoWheel", () => ({
@@ -61,3 +61,35 @@ describe("WASM runtime sources", () => {
61
61
  expect(controller.requirePyodide).toBe(pyodide);
62
62
  });
63
63
  });
64
+
65
+ describe("requirementName", () => {
66
+ it("returns the distribution name for a bare requirement", () => {
67
+ expect(requirementName("pandas")).toBe("pandas");
68
+ });
69
+
70
+ it.each([
71
+ ["pandas==2.1.0", "pandas"],
72
+ ["pandas>=2", "pandas"],
73
+ ["pandas<=2", "pandas"],
74
+ ["pandas~=2.1", "pandas"],
75
+ ["pandas!=2.0", "pandas"],
76
+ ["nltools===0.6.0.dev2", "nltools"],
77
+ ])("cuts the specifier off %s", (requirement, expected) => {
78
+ expect(requirementName(requirement)).toBe(expected);
79
+ });
80
+
81
+ it("cuts extras and markers", () => {
82
+ expect(requirementName("rich[jupyter]>=13")).toBe("rich");
83
+ expect(requirementName('cowsay==6.1; sys_platform == "emscripten"')).toBe(
84
+ "cowsay",
85
+ );
86
+ });
87
+
88
+ it("cuts a URL requirement at the name", () => {
89
+ expect(requirementName("pkg @ https://example.com/pkg.whl")).toBe("pkg");
90
+ });
91
+
92
+ it("tolerates surrounding whitespace", () => {
93
+ expect(requirementName(" pandas >= 2 ")).toBe("pandas");
94
+ });
95
+ });
@@ -30,6 +30,17 @@ type SessionResources = [
30
30
  // 3.b Install from micropip
31
31
  // 4. Initialize the notebook
32
32
 
33
+ /**
34
+ * The distribution name of a PEP 508 requirement: "pandas>=2" -> "pandas".
35
+ *
36
+ * Extras, markers and URL forms are all cut at their first delimiter, which is
37
+ * enough for the "already installed" lookups this is used for.
38
+ */
39
+ export function requirementName(requirement: string): string {
40
+ // Trim first: a leading space would otherwise split into an empty name.
41
+ return requirement.trim().split(/[[<>=!~;@\s]/)[0];
42
+ }
43
+
33
44
  export class DefaultWasmController implements WasmController {
34
45
  protected pyodide: PyodideInterface | null = null;
35
46
  private packageLoadQueue = Promise.resolve();
@@ -314,18 +325,26 @@ export class DefaultWasmController implements WasmController {
314
325
  });
315
326
  loadSpan.end();
316
327
 
317
- // Load from micropip
328
+ // Load from micropip.
329
+ //
330
+ // `imports` are PEP 508 requirements and may carry a version specifier
331
+ // ("pandas>=2", "nltools==0.6.0.dev2"). micropip wants them whole, but the
332
+ // "do we already have this?" checks below are keyed by name, so compare on
333
+ // the name and install the requirement.
318
334
  loadSpan = t.startSpan("micropip.install");
319
335
  const missingPackages = imports.filter(
320
- (pkg) => !pyodide.loadedPackages[pkg],
336
+ (pkg) => !pyodide.loadedPackages[requirementName(pkg)],
321
337
  );
322
338
  if (missingPackages.length > 0) {
339
+ const byName = missingPackages.map(
340
+ (pkg) => [requirementName(pkg), pkg] as const,
341
+ );
323
342
  await pyodide
324
343
  .runPythonAsync(`
325
344
  import micropip
326
345
  import sys
327
346
  # Filter out builtins
328
- missing = [p for p in ${JSON.stringify(missingPackages)} if p not in sys.modules]
347
+ missing = [req for name, req in ${JSON.stringify(byName)} if name not in sys.modules]
329
348
  if len(missing) > 0:
330
349
  print("Loading from micropip:", missing)
331
350
  await micropip.install(missing)
@@ -1 +0,0 @@
1
- import{t as e}from"./save-worker-Dw8ybFWq.js";var t=e(((e,t)=>{t.exports={}}));export default t();
@@ -1 +0,0 @@
1
- import{t as e}from"./worker-ByzyDs4N.js";var t=e(((e,t)=>{t.exports={}}));export default t();
@@ -1 +0,0 @@
1
- import{Wa as e}from"./index-BcSrlbHM.js";var t=Object.prototype.hasOwnProperty;function n(e,n){return e!=null&&t.call(e,n)}function r(t,r){return t!=null&&e(t,r,n)}export{r as t};