@marimo-team/islands 0.22.5-dev16 → 0.22.5-dev19
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-mLj6D01z.js → ConnectedDataExplorerComponent-D08JKcQg.js} +1 -1
- package/dist/{chat-ui-X5KPeHrU.js → chat-ui-YuHt7jfw.js} +2 -2
- package/dist/main.js +8 -8
- package/dist/{mermaid-B93TKi2g.js → mermaid-BZ2YHhbi.js} +1 -1
- package/dist/{process-output-C0tmJosY.js → process-output-Dw_U2LSR.js} +2089 -2086
- package/dist/{useAsyncData-C9ez7Ilo.js → useAsyncData-BG3ULuDU.js} +1 -1
- package/dist/{vega-component-Bzzut3-P.js → vega-component-DCmC_rsk.js} +1 -1
- package/package.json +1 -1
- package/src/core/cells/document-changes.ts +12 -0
- package/src/hooks/useAsyncData.ts +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +1 -1
|
@@ -80,7 +80,7 @@ function useAsyncData(e, s) {
|
|
|
80
80
|
}, c[13] = f, c[14] = v, c[15] = y, c[16] = b) : b = c[16], b;
|
|
81
81
|
}
|
|
82
82
|
function _temp(e) {
|
|
83
|
-
return e.status === "success" ? Result.loading(e.data) : Result.pending();
|
|
83
|
+
return e.status === "success" || e.status === "loading" ? Result.loading(e.data) : Result.pending();
|
|
84
84
|
}
|
|
85
85
|
export {
|
|
86
86
|
useAsyncData as t
|
|
@@ -14,7 +14,7 @@ import { s as uniq } from "./arrays-beUWo8RF.js";
|
|
|
14
14
|
import { a as AlertTitle, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-BvvMxigY.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-DqEcFOPD.js";
|
|
16
16
|
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-Bd1kgLn7.js";
|
|
17
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
17
|
+
import { t as useAsyncData } from "./useAsyncData-BG3ULuDU.js";
|
|
18
18
|
import { t as j } from "./react-vega-CzRAIHrv.js";
|
|
19
19
|
import "./defaultLocale-qS7DaAmi.js";
|
|
20
20
|
import "./defaultLocale-Bxoo2-30.js";
|
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ import type { NotebookDocumentTransactionRequest } from "../network/types";
|
|
|
25
25
|
import { store } from "../state/jotai";
|
|
26
26
|
import type { CellActions, NotebookState } from "./cells";
|
|
27
27
|
import type { CellId } from "./ids";
|
|
28
|
+
import { SCRATCH_CELL_ID } from "./ids";
|
|
28
29
|
import type { CellData } from "./types";
|
|
29
30
|
|
|
30
31
|
export type DocumentChange =
|
|
@@ -572,10 +573,21 @@ const flushChanges = debounce(() => {
|
|
|
572
573
|
void getRequestClient().sendDocumentTransaction({ changes });
|
|
573
574
|
}, 400);
|
|
574
575
|
|
|
576
|
+
function isScratchChange(change: DocumentChange): boolean {
|
|
577
|
+
if ("cellId" in change && change.cellId === SCRATCH_CELL_ID) {
|
|
578
|
+
return true;
|
|
579
|
+
}
|
|
580
|
+
return false;
|
|
581
|
+
}
|
|
582
|
+
|
|
575
583
|
function enqueue(change: DocumentChange) {
|
|
576
584
|
if (store.get(kioskModeAtom)) {
|
|
577
585
|
return;
|
|
578
586
|
}
|
|
587
|
+
// The scratchpad cell is local-only — don't sync it to the document.
|
|
588
|
+
if (isScratchChange(change)) {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
579
591
|
pendingChanges.push(change);
|
|
580
592
|
flushChanges();
|
|
581
593
|
}
|
|
@@ -341,7 +341,7 @@ export function useAsyncData<T>(
|
|
|
341
341
|
};
|
|
342
342
|
setResult((prevResult) => {
|
|
343
343
|
// If we have previous data, show reloading state
|
|
344
|
-
if (prevResult.status === "success") {
|
|
344
|
+
if (prevResult.status === "success" || prevResult.status === "loading") {
|
|
345
345
|
return Result.loading(prevResult.data);
|
|
346
346
|
}
|
|
347
347
|
// Otherwise, show initial loading state
|