@marimo-team/islands 0.25.2-dev99 → 0.25.3-dev141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-BZmqc_F0.js → ConnectedDataExplorerComponent-CNSxdKyJ.js} +15 -15
- package/dist/{ErrorBoundary-CXkr_IcB.js → ErrorBoundary-Cg59O3xL.js} +12 -12
- package/dist/{ImageComparisonComponent-Cpfz30OZ.js → ImageComparisonComponent-uU8FSKZE.js} +3 -3
- package/dist/{Plot-CTyjbQDT.js → Plot-DdYOe1UK.js} +2 -2
- package/dist/{abnfDiagram-VCTEODGH-C_Lmaa2j.js → abnfDiagram-VCTEODGH-DQDjNXt3.js} +3 -3
- package/dist/{any-language-editor-BFzqhOBR.js → any-language-editor-B9REGlD9.js} +7 -7
- package/dist/{architectureDiagram-5GKGNRK7-BKMataHB.js → architectureDiagram-5GKGNRK7-Nmls7Wxn.js} +5 -5
- package/dist/assets/__vite-browser-external-BXYkiFsk.js +1 -0
- package/dist/assets/worker-HPY9fbhz.js +114 -0
- package/dist/{blockDiagram-I7D4REHJ-BeHOjyDk.js → blockDiagram-I7D4REHJ-Cg25UrxT.js} +9 -9
- package/dist/{button-BtsM2UqM.js → button-CvjkwdSk.js} +5 -5
- package/dist/{c4Diagram-7LVT6UL2-Bao10t_O.js → c4Diagram-7LVT6UL2-BxFgrnNV.js} +7 -7
- package/dist/{capabilities-A5jrzjCJ.js → capabilities-CQ5IjhzL.js} +1 -1
- package/dist/{cells-DZi0ioak.js → cells-C8iCYvLU.js} +6644 -5604
- package/dist/{channel-BxCkvUgE.js → channel-CPObtJXj.js} +1 -1
- package/dist/{chat-ui-CwOWzoSO.js → chat-ui-BDpymeoe.js} +1589 -1396
- package/dist/{check-CNP79M3A.js → check-EDwSwP89.js} +1 -1
- package/dist/{chunk-4HAMMTFA-CH7Gpamd.js → chunk-4HAMMTFA-D4eFPyFh.js} +5 -5
- package/dist/{chunk-75Z2AOVW-AI7CvgKn.js → chunk-75Z2AOVW-D7gxIs2Q.js} +1 -1
- package/dist/{chunk-DU6HZSFF-BSvuTkX4.js → chunk-DU6HZSFF-BwiyaNpg.js} +1 -1
- package/dist/{chunk-F27PBJKO-CLshwT9T.js → chunk-F27PBJKO-ufseIn5y.js} +1 -1
- package/dist/{chunk-GMAD6QVW-wnHcn-lH.js → chunk-GMAD6QVW-BhaJx0X3.js} +3 -3
- package/dist/{chunk-GVQU2GXP-7O2p8hut.js → chunk-GVQU2GXP-Cwbt-lF0.js} +2 -2
- package/dist/{chunk-IMKFNOWR-Bu0Vh_Yi.js → chunk-IMKFNOWR-CoIFEo-1.js} +5 -5
- package/dist/{chunk-L3NEJ4N5-B9_Alrxb.js → chunk-L3NEJ4N5-n-zgIVSy.js} +5 -5
- package/dist/{chunk-OSK3NFVY-PeQPH2fD.js → chunk-OSK3NFVY-DXa-Cxbn.js} +6 -6
- package/dist/{chunk-P2QGCYS3-D9twiFuU.js → chunk-P2QGCYS3-B_Zd3-X0.js} +1 -1
- package/dist/{chunk-POPQ4Y6H-BUiNs18s.js → chunk-POPQ4Y6H-hYOXbYH_.js} +1 -1
- package/dist/{chunk-PWAF6VOD-D8S9NPCy.js → chunk-PWAF6VOD-CQw5qATZ.js} +1 -1
- package/dist/{chunk-SHT3W25Y-B2dyNZ31.js → chunk-SHT3W25Y-lHiGx3ZC.js} +7 -7
- package/dist/{chunk-SVP7TREG-D7UPvB10.js → chunk-SVP7TREG-BvsHIrY_.js} +2 -2
- package/dist/{chunk-TICWLB2K-BNaGoadd.js → chunk-TICWLB2K-BC8YIm_n.js} +5 -5
- package/dist/{chunk-YOKDWASO-DrWbKnxA.js → chunk-YOKDWASO-DPZk8vhS.js} +6 -6
- package/dist/classDiagram-ZZMXUADV-Bt98lkkv.js +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-D9bfbcC3.js +30 -0
- package/dist/{code-visibility-pPjYsRTH.js → code-visibility-Da3iitn_.js} +8 -8
- package/dist/{common-CkvBp0B4.js → common-C6FHcu5p.js} +6574 -7877
- package/dist/{compiler-runtime-Cj8ZWiNS.js → compiler-runtime-CldRdSsv.js} +2 -2
- package/dist/{copy-icon-BY7jgcaV.js → copy-icon-Ft7t9bqz.js} +6 -6
- package/dist/{cynefinDiagram-5FMLGOSQ-CCDn4Z9e.js → cynefinDiagram-5FMLGOSQ-CgWra7wt.js} +3 -3
- package/dist/{dagre-GXQ25YYZ-BJiUO_SV.js → dagre-GXQ25YYZ-CFZ8-35c.js} +10 -10
- package/dist/{data-grid-overlay-editor-L6ELxFAh.js → data-grid-overlay-editor-mJt3Pg4S.js} +7 -7
- package/dist/{data-grid-types-BucVmDDp.js → data-grid-types-BH_r7g7l.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BZfxFNRR.js → diagram-S7CK7UJ4-lCNQrW7d.js} +4 -4
- package/dist/{diagram-UQ7AKVKN-1xcsiIMg.js → diagram-UQ7AKVKN-CQPQ6pP_.js} +3 -3
- package/dist/{diagram-VSXAHHWV-DPAWJ9Nw.js → diagram-VSXAHHWV-BJWcVVJY.js} +2 -2
- package/dist/{diagram-VX7I27RA-DmRsnHYY.js → diagram-VX7I27RA-Cf3b0llz.js} +5 -5
- package/dist/{diagram-Z3DM3KII--b49ryKx.js → diagram-Z3DM3KII-Bt4QLrpn.js} +3 -3
- package/dist/{dialog-CmExhUDI.js → dialog-CEBFZNyc.js} +6 -6
- package/dist/{dist-CcyKTBTF.js → dist-DpBpA_n1.js} +2 -2
- package/dist/{dropdown-menu-Cz4TdOJh.js → dropdown-menu-CP_qCYHC.js} +139 -139
- package/dist/{ebnfDiagram-PWID7BFC-rSwVyh4y.js → ebnfDiagram-PWID7BFC-D3NAyPFY.js} +3 -3
- package/dist/{erDiagram-RLTQ6QDP-Bfd3iAoC.js → erDiagram-RLTQ6QDP-Tlu09_Nm.js} +12 -12
- package/dist/{error-banner-D30nA9nE.js → error-banner-Da600cwz.js} +6 -6
- package/dist/{error-entries-BovkFYNy.js → error-entries-CzoYkIQZ.js} +2 -2
- package/dist/{esm-DAVrGVKP.js → esm-AMFssoNp.js} +4 -4
- package/dist/{feedback-button-D-pV0Qji.js → feedback-button-DaPwHIdM.js} +13 -13
- package/dist/flowDiagram-HODETNUW-CAYbpJmV.js +16 -0
- package/dist/{formats-DhhbdyAH.js → formats-BGh2thRc.js} +6 -6
- package/dist/{ganttDiagram-EL5Y4UJY-B4m_YsKa.js → ganttDiagram-EL5Y4UJY-BQT16JSc.js} +2 -2
- package/dist/{gitGraphDiagram-WWUBYQGX-QRBbvWXh.js → gitGraphDiagram-WWUBYQGX-D5nSIzdE.js} +2 -2
- package/dist/{glide-data-editor-D6CfYwdr.js → glide-data-editor-Ctz2mH6k.js} +60 -60
- package/dist/{glide-utils-BVJ4fkxX.js → glide-utils-DJyqh0EM.js} +4 -4
- package/dist/{globals-BwK9YGrX.js → globals-EpFoRj_E.js} +3 -3
- package/dist/{highlighted-body-KPVGNVTW-Ad3MKZ18.js → highlighted-body-KPVGNVTW-zwjq21tf.js} +4 -4
- package/dist/{html-to-image-Cn1_16-x.js → html-to-image-CZY1pIZH.js} +17 -17
- package/dist/{infoDiagram-27XIBGKW-DVQFYvhg.js → infoDiagram-27XIBGKW-XrDxhr0x.js} +2 -2
- package/dist/{ishikawaDiagram-5VMMS53U-viPND-nm.js → ishikawaDiagram-5VMMS53U-CD1muzov.js} +3 -3
- package/dist/{journeyDiagram-3NMN7TZE-BeeJdJo3.js → journeyDiagram-3NMN7TZE-BaLqn-dZ.js} +2 -2
- package/dist/{jsx-runtime-DgDPJV9S.js → jsx-runtime-3BD1kT0s.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Dcl_ECO9.js → kanban-definition-UXKFOSKX-Dg9W142_.js} +9 -9
- package/dist/{katex-BNCmKUol.js → katex-BIdZGsyO.js} +141 -116
- package/dist/{label-DQO1jFjf.js → label-BDKF3Afc.js} +10 -10
- package/dist/{loader-Cm-ATtou.js → loader-BQOfjTIJ.js} +1 -1
- package/dist/main.js +499 -467
- package/dist/{mermaid-BfhcnSj-.js → mermaid-CiAXjLpA.js} +56 -56
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +2 -0
- package/dist/{mhchem-BEc7A1or.js → mhchem-CdWPJK6g.js} +1 -1
- package/dist/{mindmap-definition-YA3MSWOX-BdxxhF-5.js → mindmap-definition-YA3MSWOX-DgCidgYJ.js} +11 -11
- package/dist/{number-overlay-editor-tMylyldi.js → number-overlay-editor-CtxrummL.js} +5 -5
- package/dist/{pegDiagram-XKGWAZYB-Du5p2s0w.js → pegDiagram-XKGWAZYB-coOYYKB6.js} +3 -3
- package/dist/{pieDiagram-E7YTZNPT-DJg-SOIq.js → pieDiagram-E7YTZNPT-BnXTc3bj.js} +3 -3
- package/dist/{process-output-CUG57KRp.js → process-output-e4jj9Ijt.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-keLfFx9f.js → quadrantDiagram-AXDQQJYC-Ccw0xMjN.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-C0ojm-6_.js → railroadDiagram-O6MQD6OU-B28-u83n.js} +3 -3
- package/dist/{react-dom-BUgJ-ab_.js → react-dom-DUmH0GXv.js} +29 -21
- package/dist/{react-ofJbxM4x.js → react-sHtZdjeP.js} +103 -94
- package/dist/{react-vega-ewj7q_U5.js → react-vega-BED0DjiB.js} +3 -3
- package/dist/{requirementDiagram-BXWQKSXE-CNwNBmI3.js → requirementDiagram-BXWQKSXE-CdYCTMu0.js} +11 -11
- package/dist/{reveal-component-LXUMcqWX.js → reveal-component-DrIXvR_7.js} +906 -878
- package/dist/{sankeyDiagram-P5KCCOFB-Bh4EsJox.js → sankeyDiagram-P5KCCOFB-ELvOcnZH.js} +1 -1
- package/dist/{select-Bs-nmvm6.js → select-BButFi-d.js} +11 -11
- package/dist/{sequenceDiagram-WJ2MYXX4-DQaW5qBG.js → sequenceDiagram-WJ2MYXX4-CM3aRAe_.js} +4 -4
- package/dist/{spec-DVsoMvYT.js → spec-BwarBpUJ.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-BDa515QC.js → stateDiagram-D77RDMKH-DOZUMVj8.js} +13 -13
- package/dist/stateDiagram-v2-MP3YSRHH-CISYxma6.js +30 -0
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-M4IdGi8J.js → swimlanes-42K2YHIH-BkSppxp8.js} +10 -10
- package/dist/swimlanesDiagram-VR7AAH4N-c8G5pGxC.js +30 -0
- package/dist/{swiper-component-CpN-hewZ.js → swiper-component-DKntyn8p.js} +5 -5
- package/dist/{timeline-definition-24CTP7MA-DH-kvakg.js → timeline-definition-24CTP7MA-CaMQayqK.js} +3 -3
- package/dist/{toDate-vEi5kTfY.js → toDate-BNJf01u1.js} +7 -7
- package/dist/{toast-DfEpJedt.js → toast-B9UMEi8u.js} +9 -9
- package/dist/{tooltip-CuNWg2ay.js → tooltip-BO1REbqs.js} +7 -7
- package/dist/{use-restore-focus-kmgwrL8q.js → use-restore-focus-BEM7sFWl.js} +2042 -1827
- package/dist/{use-vega-container-remeasure-4DwJbPWu.js → use-vega-container-remeasure-Bz4PZMtt.js} +2 -2
- package/dist/{useAsyncData-rkAlR_vh.js → useAsyncData-Deh5kszT.js} +3 -3
- package/dist/{useDateFormatter-C-tz65rD.js → useDateFormatter-D8XruNGG.js} +4 -4
- package/dist/{useDeepCompareMemoize-BlHFBj5_.js → useDeepCompareMemoize-DXwzRINI.js} +2 -2
- package/dist/{useIframeCapabilities-C1Bt04Iz.js → useIframeCapabilities-DBETvvPl.js} +2 -2
- package/dist/{useLifecycle-B68iY077.js → useLifecycle-j7D9uD1o.js} +6 -6
- package/dist/{useTheme-BwSgeAFb.js → useTheme-CRnjkku0.js} +7 -7
- package/dist/{vega-component-C-bPttRN.js → vega-component-DG29TAB7.js} +14 -14
- package/dist/{vega-embed-container-sSR5hAsy.js → vega-embed-container-BNHE18G9.js} +5 -5
- package/dist/{vennDiagram-4TSXK5OY-d5g7XeiI.js → vennDiagram-4TSXK5OY-CF8pfaK3.js} +3 -3
- package/dist/{wardleyDiagram-VM6X3IG4-BfX3bSzR.js → wardleyDiagram-VM6X3IG4-dGPu39d-.js} +3 -3
- package/dist/{xychartDiagram-S5SC5T6Z-C1QsLZg7.js → xychartDiagram-S5SC5T6Z-CP6-9q56.js} +5 -5
- package/package.json +21 -21
- package/src/components/data-table/__tests__/column_formatting.test.ts +30 -0
- package/src/components/data-table/__tests__/columns.test.tsx +70 -0
- package/src/components/data-table/column-formatting/feature.ts +20 -1
- package/src/components/data-table/columns.tsx +25 -18
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +4 -3
- package/src/components/editor/output/console/ConsoleOutput.tsx +5 -3
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +18 -0
- package/src/components/storage/__tests__/storage-file-viewer.test.tsx +2 -1
- package/src/core/cells/__tests__/document-roundtrip.test.ts +16 -0
- package/src/core/codemirror/copilot/__tests__/completion-integration.test.ts +447 -0
- package/src/core/codemirror/copilot/__tests__/inline-completion.test.ts +395 -0
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +511 -2
- package/src/core/codemirror/copilot/__tests__/rpc-cancellation.test.ts +201 -0
- package/src/core/codemirror/copilot/extension.ts +22 -11
- package/src/core/codemirror/copilot/language-server.ts +109 -60
- package/src/core/codemirror/language/__tests__/sql.test.ts +4 -3
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +138 -26
- package/src/core/codemirror/language/embedded/embedded-python.ts +47 -13
- package/src/core/codemirror/language/embedded/latex.ts +20 -13
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +18 -11
- package/src/core/islands/bridge.ts +2 -2
- package/src/core/kernel/messages.ts +4 -7
- package/src/core/network/__tests__/api.test.ts +114 -1
- package/src/core/network/api.ts +3 -2
- package/src/core/wasm/bridge.ts +2 -2
- package/src/core/wasm/worker/types.ts +2 -2
- package/src/css/katex-css.test.ts +1 -1
- package/src/css/katex.min.css +6 -1
- package/src/hooks/__tests__/useEventListener.test.tsx +45 -1
- package/src/hooks/useEventListener.ts +6 -1
- package/src/plugins/impl/NumberPlugin.tsx +20 -3
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +159 -1
- package/dist/assets/__vite-browser-external-BqAtzd2P.js +0 -1
- package/dist/assets/worker-Bf8dt6S-.js +0 -109
- package/dist/classDiagram-ZZMXUADV-Bbo2n384.js +0 -30
- package/dist/classDiagram-v2-VYDZK3BY-xR8cGP0r.js +0 -30
- package/dist/flowDiagram-HODETNUW-D7IBKS12.js +0 -16
- package/dist/mermaid-HWGCJPDP-DYCzSILp.js +0 -2
- package/dist/stateDiagram-v2-MP3YSRHH-ChNddepZ.js +0 -30
- package/dist/swimlanesDiagram-VR7AAH4N-FUSwmzEp.js +0 -30
package/dist/{use-vega-container-remeasure-4DwJbPWu.js → use-vega-container-remeasure-Bz4PZMtt.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { t as n } from "./compiler-runtime-
|
|
2
|
+
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
+
import { t as n } from "./compiler-runtime-CldRdSsv.js";
|
|
4
4
|
//#region src/plugins/impl/vega/use-vega-container-remeasure.ts
|
|
5
5
|
var r = n(), i = /* @__PURE__ */ e(t(), 1);
|
|
6
6
|
function a(e, t) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { t as n } from "./compiler-runtime-
|
|
4
|
-
import { A as r } from "./useTheme-
|
|
2
|
+
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
+
import { t as n } from "./compiler-runtime-CldRdSsv.js";
|
|
4
|
+
import { A as r } from "./useTheme-CRnjkku0.js";
|
|
5
5
|
import { t as i } from "./invariant-DLmrl-hA.js";
|
|
6
6
|
//#region src/hooks/useAsyncData.ts
|
|
7
7
|
var a = n(), o = /* @__PURE__ */ e(t(), 1), s = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { h as n } from "./tooltip-
|
|
4
|
-
import { i as r } from "./label-
|
|
2
|
+
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
+
import { h as n } from "./tooltip-BO1REbqs.js";
|
|
4
|
+
import { i as r } from "./label-BDKF3Afc.js";
|
|
5
5
|
var i = n("chart-pie", [["path", {
|
|
6
6
|
d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
|
|
7
7
|
key: "pzmjnu"
|
|
@@ -131,7 +131,7 @@ function _(e, t) {
|
|
|
131
131
|
throw Error("Unexpected hour cycle result");
|
|
132
132
|
}
|
|
133
133
|
//#endregion
|
|
134
|
-
//#region ../node_modules/.pnpm/react-aria@3.52.1_react-dom@19.
|
|
134
|
+
//#region ../node_modules/.pnpm/react-aria@3.52.1_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-aria/dist/private/i18n/useDateFormatter.mjs
|
|
135
135
|
function v(e) {
|
|
136
136
|
e = c(e ?? {}, y);
|
|
137
137
|
let { locale: t } = r();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { k as n } from "./useTheme-
|
|
2
|
+
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
+
import { k as n } from "./useTheme-CRnjkku0.js";
|
|
4
4
|
//#region src/hooks/useDeepCompareMemoize.ts
|
|
5
5
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
6
6
|
function i(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./compiler-runtime-
|
|
2
|
-
import { t } from "./capabilities-
|
|
1
|
+
import { t as e } from "./compiler-runtime-CldRdSsv.js";
|
|
2
|
+
import { t } from "./capabilities-CQ5IjhzL.js";
|
|
3
3
|
//#region src/hooks/useIframeCapabilities.ts
|
|
4
4
|
var n = e();
|
|
5
5
|
function r() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as t, h as n, r } from "./button-
|
|
3
|
-
import { t as i } from "./react-
|
|
4
|
-
import { t as a } from "./compiler-runtime-
|
|
5
|
-
import { h as o } from "./tooltip-
|
|
6
|
-
import { t as s } from "./jsx-runtime-
|
|
7
|
-
import { E as c, w as l } from "./useTheme-
|
|
2
|
+
import { g as t, h as n, r } from "./button-CvjkwdSk.js";
|
|
3
|
+
import { t as i } from "./react-sHtZdjeP.js";
|
|
4
|
+
import { t as a } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
+
import { h as o } from "./tooltip-BO1REbqs.js";
|
|
6
|
+
import { t as s } from "./jsx-runtime-3BD1kT0s.js";
|
|
7
|
+
import { E as c, w as l } from "./useTheme-CRnjkku0.js";
|
|
8
8
|
var u = o("calendar", [
|
|
9
9
|
["path", {
|
|
10
10
|
d: "M8 2v4",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, r as t } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { a as n, g as r, s as i } from "./button-
|
|
3
|
-
import { t as a } from "./react-
|
|
4
|
-
import { t as o } from "./compiler-runtime-
|
|
5
|
-
import { C as s, F as c, L as l, M as u, O as d, P as f, S as p, j as m, v as h } from "./use-restore-focus-
|
|
2
|
+
import { a as n, g as r, s as i } from "./button-CvjkwdSk.js";
|
|
3
|
+
import { t as a } from "./react-sHtZdjeP.js";
|
|
4
|
+
import { t as o } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
+
import { C as s, F as c, L as l, M as u, O as d, P as f, S as p, j as m, v as h } from "./use-restore-focus-BEM7sFWl.js";
|
|
6
6
|
import { l as g, t as _ } from "./_baseMerge-BiGRwuqv.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/mergeWith.js
|
|
8
8
|
var v = g(function(e, t, n, r) {
|
|
@@ -64,7 +64,7 @@ function E(e, t) {
|
|
|
64
64
|
return e !== e && t !== t;
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
|
-
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.
|
|
67
|
+
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.3.0_react@19.3.0/node_modules/jotai/esm/vanilla/internals.mjs
|
|
68
68
|
var D = /* @__PURE__ */ t({
|
|
69
69
|
INTERNAL_addPendingPromiseToDependency: () => N,
|
|
70
70
|
INTERNAL_buildStoreRev3: () => we,
|
|
@@ -438,7 +438,7 @@ function we(...e) {
|
|
|
438
438
|
return t;
|
|
439
439
|
}
|
|
440
440
|
//#endregion
|
|
441
|
-
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.
|
|
441
|
+
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.3.0_react@19.3.0/node_modules/jotai/esm/vanilla.mjs
|
|
442
442
|
var Te = 0;
|
|
443
443
|
function R(e, t) {
|
|
444
444
|
let n = `atom${++Te}`, r = { toString() {
|
|
@@ -460,7 +460,7 @@ function ke() {
|
|
|
460
460
|
return Oe ||= z(), Oe;
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
|
-
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.
|
|
463
|
+
//#region ../node_modules/.pnpm/jotai@2.20.3_@babel+core@7.29.0_@babel+template@7.28.6_@types+react@19.3.0_react@19.3.0/node_modules/jotai/esm/react.mjs
|
|
464
464
|
var B = (0, y.createContext)(void 0);
|
|
465
465
|
function V(e) {
|
|
466
466
|
let t = (0, y.useContext)(B);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as t, h as n, m as r, o as i } from "./button-
|
|
3
|
-
import { t as a } from "./react-
|
|
4
|
-
import { t as o } from "./compiler-runtime-
|
|
5
|
-
import { t as s } from "./tooltip-
|
|
6
|
-
import {
|
|
7
|
-
import { t as u } from "./jsx-runtime-
|
|
8
|
-
import { n as d } from "./error-banner-
|
|
2
|
+
import { g as t, h as n, m as r, o as i } from "./button-CvjkwdSk.js";
|
|
3
|
+
import { t as a } from "./react-sHtZdjeP.js";
|
|
4
|
+
import { t as o } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
+
import { t as s } from "./tooltip-BO1REbqs.js";
|
|
6
|
+
import { S as c, a as l } from "./toDate-BNJf01u1.js";
|
|
7
|
+
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
8
|
+
import { n as d } from "./error-banner-Da600cwz.js";
|
|
9
9
|
import { t as f } from "./debounce-C3jyATpc.js";
|
|
10
|
-
import { A as p, n as ee } from "./useTheme-
|
|
10
|
+
import { A as p, n as ee } from "./useTheme-CRnjkku0.js";
|
|
11
11
|
import { c as m } from "./arrays-CN1djC4k.js";
|
|
12
12
|
import { t as te } from "./objects-CzUgoMIF.js";
|
|
13
|
-
import { t as h } from "./useAsyncData-
|
|
14
|
-
import { a as ne, i as re, n as ie, t as g } from "./formats-
|
|
13
|
+
import { t as h } from "./useAsyncData-Deh5kszT.js";
|
|
14
|
+
import { a as ne, i as re, n as ie, t as g } from "./formats-BGh2thRc.js";
|
|
15
15
|
import { M as ae, n as oe } from "./vega-loader.browser-DNST6uVf.js";
|
|
16
|
-
import { t as se } from "./react-vega-
|
|
17
|
-
import { a as ce, n as _ } from "./loader-
|
|
18
|
-
import { t as le } from "./useDeepCompareMemoize-
|
|
16
|
+
import { t as se } from "./react-vega-BED0DjiB.js";
|
|
17
|
+
import { a as ce, n as _ } from "./loader-BQOfjTIJ.js";
|
|
18
|
+
import { t as le } from "./useDeepCompareMemoize-DXwzRINI.js";
|
|
19
19
|
import { t as ue } from "./semaphore-89jsoHtS.js";
|
|
20
|
-
import { t as de } from "./use-vega-container-remeasure-
|
|
20
|
+
import { t as de } from "./use-vega-container-remeasure-Bz4PZMtt.js";
|
|
21
21
|
//#region src/plugins/impl/vega/fix-relative-url.ts
|
|
22
22
|
var fe = /* @__PURE__ */ e(a(), 1), pe = o();
|
|
23
23
|
function me(e) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { t as n } from "./compiler-runtime-
|
|
4
|
-
import { t as r } from "./jsx-runtime-
|
|
2
|
+
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
+
import { t as n } from "./compiler-runtime-CldRdSsv.js";
|
|
4
|
+
import { t as r } from "./jsx-runtime-3BD1kT0s.js";
|
|
5
5
|
import { M as i } from "./vega-loader.browser-DNST6uVf.js";
|
|
6
|
-
import { n as a } from "./react-vega-
|
|
7
|
-
import { t as o } from "./use-vega-container-remeasure-
|
|
6
|
+
import { n as a } from "./react-vega-BED0DjiB.js";
|
|
7
|
+
import { t as o } from "./use-vega-container-remeasure-Bz4PZMtt.js";
|
|
8
8
|
//#region src/components/charts/vega-embed-container.tsx
|
|
9
9
|
var s = n(), c = /* @__PURE__ */ e(t(), 1), l = r();
|
|
10
10
|
function u(e) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as e } from "./chunk-75Z2AOVW-
|
|
1
|
+
import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
2
2
|
import { t } from "./src-CA_m4ONl.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
|
-
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-
|
|
4
|
+
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
5
|
import { t as _ } from "./rough.esm-CtV9AnV1.js";
|
|
6
|
-
import { p as v } from "./mermaid-
|
|
6
|
+
import { p as v } from "./mermaid-CiAXjLpA.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
|
|
8
8
|
var y = (e, t) => p(e, "a", -t), b = 1e-10;
|
|
9
9
|
function x(e, t) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as e } from "./chunk-75Z2AOVW-
|
|
1
|
+
import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
2
2
|
import { n as t } from "./src-CA_m4ONl.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
|
-
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-
|
|
5
|
-
import { p as m } from "./mermaid-
|
|
4
|
+
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
|
+
import { p as m } from "./mermaid-CiAXjLpA.js";
|
|
6
6
|
import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
7
7
|
import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
|
|
@@ -2,14 +2,14 @@ import { t as e } from "./linear-Cnaq3Tfb.js";
|
|
|
2
2
|
import { n as t } from "./ordinal-c7efuCSS.js";
|
|
3
3
|
import { t as n } from "./range-BAIvbVHp.js";
|
|
4
4
|
import { q as r } from "./cubic-OaEBhQPK.js";
|
|
5
|
-
import { i } from "./chunk-75Z2AOVW-
|
|
5
|
+
import { i } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
6
6
|
import { n as a } from "./init-Ix4LXMlt.js";
|
|
7
7
|
import { n as o } from "./src-CA_m4ONl.js";
|
|
8
8
|
import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
9
|
-
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-
|
|
10
|
-
import "./chunk-PWAF6VOD-
|
|
11
|
-
import { t as b } from "./chunk-GMAD6QVW-
|
|
12
|
-
import { p as x } from "./mermaid-
|
|
9
|
+
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-BwiyaNpg.js";
|
|
10
|
+
import "./chunk-PWAF6VOD-CQw5qATZ.js";
|
|
11
|
+
import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
|
|
12
|
+
import { p as x } from "./mermaid-CiAXjLpA.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
|
|
14
14
|
function S() {
|
|
15
15
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/islands",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3-dev141",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./unstable_internal/*": "./src/*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ai-sdk/react": "^4.0.
|
|
24
|
+
"@ai-sdk/react": "^4.0.110",
|
|
25
25
|
"@anywidget/types": "^0.4.0",
|
|
26
26
|
"@codemirror/autocomplete": "^6.20.3",
|
|
27
27
|
"@codemirror/commands": "^6.11.1",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"@glideapps/glide-data-grid": "6.0.4-alpha24",
|
|
47
47
|
"@hookform/resolvers": "^5.9.1",
|
|
48
48
|
"@img-comparison-slider/react": "^8.0.2",
|
|
49
|
-
"@internationalized/date": "^3.12.
|
|
49
|
+
"@internationalized/date": "^3.12.4",
|
|
50
50
|
"@lezer/common": "^1.5.2",
|
|
51
51
|
"@lezer/highlight": "^1.2.3",
|
|
52
52
|
"@lezer/lr": "^1.4.10",
|
|
53
53
|
"@lezer/markdown": "^1.7.2",
|
|
54
54
|
"@lezer/python": "^1.1.19",
|
|
55
|
-
"@marimo-team/codemirror-ai": "^0.3.
|
|
56
|
-
"@marimo-team/codemirror-languageserver": "^2.0.
|
|
55
|
+
"@marimo-team/codemirror-ai": "^0.3.10",
|
|
56
|
+
"@marimo-team/codemirror-languageserver": "^2.0.1",
|
|
57
57
|
"@marimo-team/codemirror-mcp": "^0.1.7",
|
|
58
58
|
"@marimo-team/codemirror-sql": "^0.3.0",
|
|
59
59
|
"@marimo-team/llm-info": "workspace:*",
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
"@radix-ui/react-icons": "~1.3.2",
|
|
66
66
|
"@radix-ui/react-use-controllable-state": "~1.2.6",
|
|
67
67
|
"@replit/codemirror-vim": "^6.4.0",
|
|
68
|
-
"@revealjs/react": "^0.2.
|
|
68
|
+
"@revealjs/react": "^0.2.2",
|
|
69
69
|
"@streamdown/math": "^1.0.2",
|
|
70
70
|
"@tailwindcss/postcss": "^4.3.3",
|
|
71
71
|
"@tailwindcss/typography": "^0.5.20",
|
|
72
72
|
"@tanstack/react-table": "^8.21.3",
|
|
73
|
-
"@tanstack/react-virtual": "^3.14.
|
|
73
|
+
"@tanstack/react-virtual": "^3.14.13",
|
|
74
74
|
"@types/humanize-duration": "^3.27.4",
|
|
75
75
|
"@types/js-cookie": "^3.0.6",
|
|
76
76
|
"@types/jsdom": "^21.1.7",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@xterm/addon-web-links": "^0.12.0",
|
|
90
90
|
"@xterm/xterm": "^5.5.0",
|
|
91
91
|
"@zed-industries/agent-client-protocol": "^0.4.5",
|
|
92
|
-
"ai": "^7.0.
|
|
92
|
+
"ai": "^7.0.107",
|
|
93
93
|
"ansi_up": "^6.0.6",
|
|
94
94
|
"class-variance-authority": "^0.7.1",
|
|
95
95
|
"clsx": "^2.1.1",
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
"htm": "^3.1.1",
|
|
104
104
|
"html-react-parser": "^5.2.17",
|
|
105
105
|
"html-to-image": "1.11.13",
|
|
106
|
-
"humanize-duration": "^3.
|
|
106
|
+
"humanize-duration": "^3.35.0",
|
|
107
107
|
"iconify-icon": "^2.3.0",
|
|
108
108
|
"jotai": "^2.20.3",
|
|
109
109
|
"jotai-scope": "^0.12.2",
|
|
110
110
|
"js-cookie": "^3.0.8",
|
|
111
|
-
"katex": "^0.18.
|
|
111
|
+
"katex": "^0.18.7",
|
|
112
112
|
"lodash-es": "^4.18.1",
|
|
113
113
|
"loro-codemirror": "^0.3.3",
|
|
114
|
-
"loro-crdt": "^1.
|
|
114
|
+
"loro-crdt": "^1.16.1",
|
|
115
115
|
"lucide-react": "^0.577.0",
|
|
116
116
|
"lz-string": "^1.5.0",
|
|
117
117
|
"marked": "^15.0.12",
|
|
@@ -135,11 +135,11 @@
|
|
|
135
135
|
"react-resizable-panels": "2.1.9",
|
|
136
136
|
"react-use-event-hook": "^0.9.6",
|
|
137
137
|
"react-vega": "^8.0.0",
|
|
138
|
-
"react-virtuoso": "^4.18.
|
|
138
|
+
"react-virtuoso": "^4.18.14",
|
|
139
139
|
"reactflow": "^11.11.4",
|
|
140
140
|
"rehype-sanitize": "^6.0.0",
|
|
141
141
|
"remark-gfm": "^4.0.1",
|
|
142
|
-
"reveal.js": "^6.0.
|
|
142
|
+
"reveal.js": "^6.0.2",
|
|
143
143
|
"rpc-anywhere": "^1.7.0",
|
|
144
144
|
"sql-formatter": "^15.8.2",
|
|
145
145
|
"streamdown": "^2.6.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"vscode-jsonrpc": "^8.2.1",
|
|
160
160
|
"vscode-languageserver-protocol": "^3.18.3",
|
|
161
161
|
"web-vitals": "^4.2.4",
|
|
162
|
-
"zod": "^4.5
|
|
162
|
+
"zod": "^4.6.5"
|
|
163
163
|
},
|
|
164
164
|
"scripts": {
|
|
165
165
|
"preinstall": "npx only-allow pnpm",
|
|
@@ -200,10 +200,10 @@
|
|
|
200
200
|
"@testing-library/react": "^16.3.3",
|
|
201
201
|
"@types/dompurify": "^3.2.0",
|
|
202
202
|
"@types/lodash-es": "^4.17.12",
|
|
203
|
-
"@types/node": "^24.13.
|
|
203
|
+
"@types/node": "^24.13.6",
|
|
204
204
|
"@types/plotly.js": "^2.35.16",
|
|
205
|
-
"@types/react": "^19.
|
|
206
|
-
"@types/react-dom": "^19.
|
|
205
|
+
"@types/react": "^19.3.0",
|
|
206
|
+
"@types/react-dom": "^19.3.0",
|
|
207
207
|
"@types/timestring": "^6.0.5",
|
|
208
208
|
"@vitejs/plugin-react": "^6.1.1",
|
|
209
209
|
"@vitest/coverage-v8": "4.1.11",
|
|
@@ -216,9 +216,9 @@
|
|
|
216
216
|
"oxfmt": "^0.68.0",
|
|
217
217
|
"oxlint": "^1.83.0",
|
|
218
218
|
"postcss": "^8.5.28",
|
|
219
|
-
"postcss-prefix-selector": "^2.2.
|
|
220
|
-
"react": "^19.
|
|
221
|
-
"react-dom": "^19.
|
|
219
|
+
"postcss-prefix-selector": "^2.2.1",
|
|
220
|
+
"react": "^19.3.0",
|
|
221
|
+
"react-dom": "^19.3.0",
|
|
222
222
|
"storybook": "^10.6.0",
|
|
223
223
|
"stylelint": "^16.26.1",
|
|
224
224
|
"stylelint-config-standard": "^36.0.1",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
"vite": "^8.3.0",
|
|
228
228
|
"vite-plugin-wasm": "^3.6.0",
|
|
229
229
|
"vitest": "^4.1.11",
|
|
230
|
-
"yaml": "^2.9.
|
|
230
|
+
"yaml": "^2.9.1"
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -50,6 +50,36 @@ describe("applyFormat", () => {
|
|
|
50
50
|
}),
|
|
51
51
|
).toBe("10/1/23, 12:00:00 PM UTC");
|
|
52
52
|
});
|
|
53
|
+
|
|
54
|
+
it("should treat naive datetime strings as UTC", () => {
|
|
55
|
+
const naive = "2023-10-01 23:30:00";
|
|
56
|
+
expect(
|
|
57
|
+
applyFormat(naive, { locale, format: "Date", dataType: "datetime" }),
|
|
58
|
+
).toBe("10/1/23");
|
|
59
|
+
expect(
|
|
60
|
+
applyFormat(naive, {
|
|
61
|
+
locale,
|
|
62
|
+
format: "Datetime",
|
|
63
|
+
dataType: "datetime",
|
|
64
|
+
}),
|
|
65
|
+
).toBe("10/1/23, 11:30:00 PM UTC");
|
|
66
|
+
expect(
|
|
67
|
+
applyFormat(naive, { locale, format: "Time", dataType: "datetime" }),
|
|
68
|
+
).toBe("11:30:00 PM UTC");
|
|
69
|
+
expect(
|
|
70
|
+
applyFormat("2023-10-01T23:30:00.250", {
|
|
71
|
+
locale,
|
|
72
|
+
format: "Time",
|
|
73
|
+
dataType: "datetime",
|
|
74
|
+
}),
|
|
75
|
+
).toBe("11:30:00 PM UTC");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("should keep the calendar date for date-only strings", () => {
|
|
79
|
+
expect(
|
|
80
|
+
applyFormat("2023-10-01", { locale, format: "Date", dataType: "date" }),
|
|
81
|
+
).toBe("10/1/23");
|
|
82
|
+
});
|
|
53
83
|
});
|
|
54
84
|
|
|
55
85
|
describe("number formatting", () => {
|
|
@@ -1268,6 +1268,76 @@ describe("renderCellValue with datetime values", () => {
|
|
|
1268
1268
|
}).not.toThrow();
|
|
1269
1269
|
});
|
|
1270
1270
|
});
|
|
1271
|
+
|
|
1272
|
+
it("should render the column format for datetime strings", () => {
|
|
1273
|
+
const mockColumn = {
|
|
1274
|
+
...createMockColumn(),
|
|
1275
|
+
getColumnFormatting: () => "Date",
|
|
1276
|
+
applyColumnFormatting: () => "FORMATTED",
|
|
1277
|
+
} as unknown as Column<unknown>;
|
|
1278
|
+
|
|
1279
|
+
const selectCell = vi.fn();
|
|
1280
|
+
const result = renderCellValue({
|
|
1281
|
+
column: mockColumn,
|
|
1282
|
+
renderValue: () => "2024-06-14 12:34:20",
|
|
1283
|
+
getValue: () => "2024-06-14 12:34:20",
|
|
1284
|
+
selectCell,
|
|
1285
|
+
cellStyles: "cell-styles",
|
|
1286
|
+
});
|
|
1287
|
+
const { container } = render(
|
|
1288
|
+
<I18nProvider locale="en-US">
|
|
1289
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1290
|
+
</I18nProvider>,
|
|
1291
|
+
);
|
|
1292
|
+
expect(container.textContent).toContain("FORMATTED");
|
|
1293
|
+
expect(container.textContent).not.toContain("2024-06-14 12:34:20");
|
|
1294
|
+
|
|
1295
|
+
const wrapper = container.querySelector(".cell-styles");
|
|
1296
|
+
expect(wrapper).not.toBeNull();
|
|
1297
|
+
wrapper?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
|
1298
|
+
expect(selectCell).toHaveBeenCalledTimes(1);
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
it("should render the column format for Date instances", () => {
|
|
1302
|
+
const mockColumn = {
|
|
1303
|
+
...createMockColumn(),
|
|
1304
|
+
getColumnFormatting: () => "Date",
|
|
1305
|
+
applyColumnFormatting: () => "FORMATTED",
|
|
1306
|
+
} as unknown as Column<unknown>;
|
|
1307
|
+
const value = new Date("2024-06-14T12:34:20Z");
|
|
1308
|
+
|
|
1309
|
+
const result = renderCellValue({
|
|
1310
|
+
column: mockColumn,
|
|
1311
|
+
renderValue: () => value,
|
|
1312
|
+
getValue: () => value,
|
|
1313
|
+
selectCell: undefined,
|
|
1314
|
+
cellStyles: "",
|
|
1315
|
+
});
|
|
1316
|
+
const { container } = render(
|
|
1317
|
+
<I18nProvider locale="en-US">
|
|
1318
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1319
|
+
</I18nProvider>,
|
|
1320
|
+
);
|
|
1321
|
+
expect(container.textContent).toContain("FORMATTED");
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
it("should keep the raw string when no column format is set", () => {
|
|
1325
|
+
const mockColumn = createMockColumn();
|
|
1326
|
+
|
|
1327
|
+
const result = renderCellValue({
|
|
1328
|
+
column: mockColumn,
|
|
1329
|
+
renderValue: () => "2024-06-14",
|
|
1330
|
+
getValue: () => "2024-06-14",
|
|
1331
|
+
selectCell: undefined,
|
|
1332
|
+
cellStyles: "",
|
|
1333
|
+
});
|
|
1334
|
+
const { container } = render(
|
|
1335
|
+
<I18nProvider locale="en-US">
|
|
1336
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1337
|
+
</I18nProvider>,
|
|
1338
|
+
);
|
|
1339
|
+
expect(container.textContent).toContain("2024-06-14");
|
|
1340
|
+
});
|
|
1271
1341
|
});
|
|
1272
1342
|
|
|
1273
1343
|
test("column_widths sets fixed size and meta.width", () => {
|
|
@@ -97,6 +97,7 @@ export const getFormatters = memoizeLastValue((locale: string) => {
|
|
|
97
97
|
|
|
98
98
|
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
99
99
|
dateStyle: "short", // 3/4/2024
|
|
100
|
+
timeZone: "UTC",
|
|
100
101
|
});
|
|
101
102
|
|
|
102
103
|
const dateTimeFormatter = new Intl.DateTimeFormat(locale, {
|
|
@@ -123,6 +124,24 @@ export const getFormatters = memoizeLastValue((locale: string) => {
|
|
|
123
124
|
};
|
|
124
125
|
});
|
|
125
126
|
|
|
127
|
+
const TIMEZONE_SUFFIX = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The date formatters render in UTC. A naive datetime string carries no
|
|
131
|
+
* offset, and `new Date` would read it as local time, so pin it to UTC
|
|
132
|
+
* to keep the wall-clock fields the backend sent.
|
|
133
|
+
*/
|
|
134
|
+
function parseDateAsUTC(value: unknown): Date {
|
|
135
|
+
if (typeof value !== "string") {
|
|
136
|
+
return new Date(value as number | Date);
|
|
137
|
+
}
|
|
138
|
+
const trimmed = value.trim();
|
|
139
|
+
if (TIMEZONE_SUFFIX.test(trimmed) || !trimmed.includes(":")) {
|
|
140
|
+
return new Date(trimmed);
|
|
141
|
+
}
|
|
142
|
+
return new Date(`${trimmed.replace(" ", "T")}Z`);
|
|
143
|
+
}
|
|
144
|
+
|
|
126
145
|
// Apply formatting to a value given a format and data type
|
|
127
146
|
export const applyFormat = (
|
|
128
147
|
value: unknown,
|
|
@@ -152,7 +171,7 @@ export const applyFormat = (
|
|
|
152
171
|
return value;
|
|
153
172
|
case "datetime":
|
|
154
173
|
case "date": {
|
|
155
|
-
const date =
|
|
174
|
+
const date = parseDateAsUTC(value);
|
|
156
175
|
switch (format) {
|
|
157
176
|
case "Date":
|
|
158
177
|
return dateFormatter.format(date);
|
|
@@ -6,14 +6,14 @@ import { Popover as PopoverPrimitive } from "radix-ui";
|
|
|
6
6
|
const PopoverClose = PopoverPrimitive.Close;
|
|
7
7
|
|
|
8
8
|
import type { Column, ColumnDef } from "@tanstack/react-table";
|
|
9
|
-
import {
|
|
9
|
+
import { isValid } from "date-fns";
|
|
10
10
|
import { useRef } from "react";
|
|
11
11
|
import { useLocale, useNumberFormatter } from "react-aria";
|
|
12
12
|
import { WithLocale } from "@/core/i18n/with-locale";
|
|
13
13
|
import type { DataType } from "@/core/kernel/messages";
|
|
14
14
|
import type { CalculateTopKRows } from "@/plugins/impl/DataTablePlugin";
|
|
15
15
|
import { cn } from "@/utils/cn";
|
|
16
|
-
import {
|
|
16
|
+
import { exactDateTime } from "@/utils/dates";
|
|
17
17
|
import { Events } from "@/utils/events";
|
|
18
18
|
import { Logger } from "@/utils/Logger";
|
|
19
19
|
import { Maps } from "@/utils/maps";
|
|
@@ -583,21 +583,19 @@ function renderDate({
|
|
|
583
583
|
value,
|
|
584
584
|
dataType,
|
|
585
585
|
dtype,
|
|
586
|
-
|
|
586
|
+
displayValue,
|
|
587
587
|
locale,
|
|
588
588
|
}: {
|
|
589
589
|
value: Date;
|
|
590
590
|
dataType?: DataType;
|
|
591
591
|
dtype?: string;
|
|
592
|
-
|
|
592
|
+
displayValue?: string;
|
|
593
593
|
locale: string;
|
|
594
594
|
}): React.ReactNode {
|
|
595
595
|
const type = dataType === "date" ? "date" : "datetime";
|
|
596
596
|
const timezone = extractTimezone(dtype);
|
|
597
597
|
|
|
598
|
-
const exactValue =
|
|
599
|
-
? formatDate(value, format)
|
|
600
|
-
: exactDateTime(value, timezone, locale);
|
|
598
|
+
const exactValue = displayValue ?? exactDateTime(value, timezone, locale);
|
|
601
599
|
|
|
602
600
|
return (
|
|
603
601
|
<DatePopover date={value} type={type}>
|
|
@@ -640,7 +638,8 @@ export function renderCellValue<TData, TValue>({
|
|
|
640
638
|
|
|
641
639
|
if (dataType === "datetime" && typeof value === "string") {
|
|
642
640
|
try {
|
|
643
|
-
|
|
641
|
+
const date = new Date(value);
|
|
642
|
+
if (!format || !isValid(date)) {
|
|
644
643
|
return (
|
|
645
644
|
<div onClick={selectCell} className={cellStyles}>
|
|
646
645
|
{value}
|
|
@@ -648,14 +647,15 @@ export function renderCellValue<TData, TValue>({
|
|
|
648
647
|
);
|
|
649
648
|
}
|
|
650
649
|
|
|
651
|
-
const
|
|
652
|
-
const format = getDateFormat(value);
|
|
650
|
+
const displayValue = String(column.applyColumnFormatting(value));
|
|
653
651
|
return (
|
|
654
|
-
<
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
652
|
+
<div onClick={selectCell} className={cellStyles}>
|
|
653
|
+
<WithLocale>
|
|
654
|
+
{(locale) =>
|
|
655
|
+
renderDate({ value: date, dataType, dtype, displayValue, locale })
|
|
656
|
+
}
|
|
657
|
+
</WithLocale>
|
|
658
|
+
</div>
|
|
659
659
|
);
|
|
660
660
|
} catch (error) {
|
|
661
661
|
Logger.error("Error parsing datetime, fallback to string", error);
|
|
@@ -672,10 +672,17 @@ export function renderCellValue<TData, TValue>({
|
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
// e.g. 2010-10-07 17:15:00
|
|
675
|
+
const displayValue = format
|
|
676
|
+
? String(column.applyColumnFormatting(value))
|
|
677
|
+
: undefined;
|
|
675
678
|
return (
|
|
676
|
-
<
|
|
677
|
-
|
|
678
|
-
|
|
679
|
+
<div onClick={selectCell} className={cellStyles}>
|
|
680
|
+
<WithLocale>
|
|
681
|
+
{(locale) =>
|
|
682
|
+
renderDate({ value, dataType, dtype, displayValue, locale })
|
|
683
|
+
}
|
|
684
|
+
</WithLocale>
|
|
685
|
+
</div>
|
|
679
686
|
);
|
|
680
687
|
}
|
|
681
688
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { Provider } from "jotai";
|
|
11
11
|
import type React from "react";
|
|
12
12
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
13
|
+
import { requestId } from "@/__tests__/branded";
|
|
13
14
|
import { MockRequestClient } from "@/__mocks__/requests";
|
|
14
15
|
import { ModalProvider } from "@/components/modal/ImperativeModal";
|
|
15
16
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
@@ -129,7 +130,7 @@ describe("NotebookMenuDropdown", () => {
|
|
|
129
130
|
}));
|
|
130
131
|
invalidateDataSourceDiscovery();
|
|
131
132
|
vi.spyOn(DiscoverDataSources, "request").mockResolvedValue({
|
|
132
|
-
request_id: "request-id",
|
|
133
|
+
request_id: requestId("request-id"),
|
|
133
134
|
sources: [],
|
|
134
135
|
});
|
|
135
136
|
});
|
|
@@ -142,7 +143,7 @@ describe("NotebookMenuDropdown", () => {
|
|
|
142
143
|
|
|
143
144
|
it("shows detected databases in the add connection submenu", async () => {
|
|
144
145
|
vi.mocked(DiscoverDataSources.request).mockResolvedValue({
|
|
145
|
-
request_id: "request-id",
|
|
146
|
+
request_id: requestId("request-id"),
|
|
146
147
|
sources: [POSTGRES_SOURCE],
|
|
147
148
|
});
|
|
148
149
|
|
|
@@ -172,7 +173,7 @@ describe("NotebookMenuDropdown", () => {
|
|
|
172
173
|
|
|
173
174
|
it("shows detected storage in the add remote storage submenu", async () => {
|
|
174
175
|
vi.mocked(DiscoverDataSources.request).mockResolvedValue({
|
|
175
|
-
request_id: "request-id",
|
|
176
|
+
request_id: requestId("request-id"),
|
|
176
177
|
sources: [S3_SOURCE],
|
|
177
178
|
});
|
|
178
179
|
|