@marimo-team/islands 0.25.3-dev48 → 0.25.3-dev51
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-COS3f8io.js → ConnectedDataExplorerComponent-Da5OoEUL.js} +9 -9
- package/dist/{ErrorBoundary-DHfwqB0K.js → ErrorBoundary-CbxCC2kk.js} +8 -8
- package/dist/{abnfDiagram-VCTEODGH-DQ4bKxYa.js → abnfDiagram-VCTEODGH-Bz3mrprX.js} +2 -2
- package/dist/{any-language-editor-DQItQSua.js → any-language-editor-k2B8YI3Y.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-BA7-SI7Q.js → architectureDiagram-5GKGNRK7-Cs5ujb9K.js} +1 -1
- package/dist/{chat-ui-DlUp75HS.js → chat-ui-C1Gjgokv.js} +44 -44
- package/dist/{check-C209OH-W.js → check-P35dc2dH.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DPY3kqOV.js → chunk-IMKFNOWR-CcTSaxZt.js} +1 -1
- package/dist/{chunk-SHT3W25Y-C14Ikodf.js → chunk-SHT3W25Y-DcJcjOaO.js} +1 -1
- package/dist/{chunk-SVP7TREG-BKu0HO4I.js → chunk-SVP7TREG-BVtDTjaF.js} +1 -1
- package/dist/{chunk-TICWLB2K-iJDDWGtE.js → chunk-TICWLB2K-BkDFkh8q.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-HuJXQI0F.js → classDiagram-ZZMXUADV-CfAt7HT5.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-CpmmpTbC.js → classDiagram-v2-VYDZK3BY-CGEjNYa2.js} +2 -2
- package/dist/{code-visibility-5llx6KCK.js → code-visibility-DoZ9lxzx.js} +5 -5
- package/dist/{common-DBC1NAar.js → common-D1PacyXO.js} +75 -75
- package/dist/{copy-icon-L-mFk59e.js → copy-icon-CPoxUG7G.js} +2 -2
- package/dist/{cynefinDiagram-5FMLGOSQ-uh0puAW2.js → cynefinDiagram-5FMLGOSQ-BW6NmfJi.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-4LBeAAMz.js → dagre-GXQ25YYZ-CWg3CTuF.js} +1 -1
- package/dist/{data-grid-overlay-editor-D01HzlXg.js → data-grid-overlay-editor-B50UpkXd.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BXPmZ2sX.js → diagram-S7CK7UJ4-BPxtoS-z.js} +1 -1
- package/dist/{diagram-UQ7AKVKN--Xz9UNpC.js → diagram-UQ7AKVKN-DA-vJdFL.js} +1 -1
- package/dist/{diagram-VX7I27RA-rt8VIRNT.js → diagram-VX7I27RA-D6bkR84S.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Cs1GqfDD.js → diagram-Z3DM3KII-m60g4cAT.js} +1 -1
- package/dist/{dialog-CDbPtWUD.js → dialog-C1PcpCqX.js} +24 -24
- package/dist/{dropdown-menu-ugNoZmKx.js → dropdown-menu-MG5hiCIa.js} +793 -793
- package/dist/{ebnfDiagram-PWID7BFC-CgTsgbmZ.js → ebnfDiagram-PWID7BFC-CK99sho2.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-CFoADGzT.js → erDiagram-RLTQ6QDP-Bryq0tdE.js} +1 -1
- package/dist/{error-banner-DMIrHA-R.js → error-banner-Sl2FlSJ4.js} +16 -16
- package/dist/{error-entries-D3ouOLDe.js → error-entries-CMNtA8NK.js} +25 -25
- package/dist/{feedback-button-gTC25Y-p.js → feedback-button-DqPqwryB.js} +8 -8
- package/dist/{flowDiagram-HODETNUW-BM2lvKuH.js → flowDiagram-HODETNUW-D-3aRpfS.js} +2 -2
- package/dist/{formats-C24TvExI.js → formats-6pLWWrY2.js} +1 -1
- package/dist/{glide-data-editor-BXXphavz.js → glide-data-editor-BxMhUd3K.js} +10 -10
- package/dist/{glide-utils-Q2ZsuA3h.js → glide-utils-Bt8_pBa2.js} +2 -2
- package/dist/{globals-BcxqBRmX.js → globals-DTJa_doJ.js} +3 -3
- package/dist/{html-to-image-VZvb968z.js → html-to-image-By72ALyI.js} +44 -44
- package/dist/{infoDiagram-27XIBGKW-Crwjiywp.js → infoDiagram-27XIBGKW-s1C1kgfU.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-D4US2ShV.js → ishikawaDiagram-5VMMS53U-CCsRgolY.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Bk097CUX.js → kanban-definition-UXKFOSKX-BrmxDlcc.js} +1 -1
- package/dist/{label-CuEjBqYP.js → label-BRnUC0NX.js} +1 -1
- package/dist/main.js +614 -614
- package/dist/{mermaid-6EkeBlhr.js → mermaid-DKI0869I.js} +35 -35
- package/dist/{mindmap-definition-YA3MSWOX-DmORzfXQ.js → mindmap-definition-YA3MSWOX-641xJysF.js} +1 -1
- package/dist/{number-overlay-editor-CaspWg5p.js → number-overlay-editor-Z_H6x5b-.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DT5TL02S.js → pegDiagram-XKGWAZYB-keVUAUeS.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-B1NwGcuH.js → pieDiagram-E7YTZNPT-DHktXPO_.js} +1 -1
- package/dist/{process-output-CCPgTShO.js → process-output-D-OMW5sV.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-BxoycdEu.js → railroadDiagram-O6MQD6OU-BVEF4OV_.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DHq_eRrm.js → requirementDiagram-BXWQKSXE-CWo-UAKV.js} +1 -1
- package/dist/{reveal-component-CWk_paD2.js → reveal-component-tAB5K3QE.js} +9 -9
- package/dist/{select-D2iqeJYk.js → select-B0LRDH0g.js} +199 -199
- package/dist/{sequenceDiagram-WJ2MYXX4-Ba11BAOu.js → sequenceDiagram-WJ2MYXX4-CHQvLnq4.js} +1 -1
- package/dist/{spec-BCCcvWPS.js → spec-C-LRKGtT.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-OHQbvkbP.js → stateDiagram-D77RDMKH-BOJZgbUJ.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BlIquvFJ.js → stateDiagram-v2-MP3YSRHH-C53XXdYH.js} +2 -2
- package/dist/{swimlanes-42K2YHIH-DSlitS4s.js → swimlanes-42K2YHIH-D2o1gOtw.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-ClwuzFNO.js → swimlanesDiagram-VR7AAH4N-BHFzN1Wk.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-hAzc5VkT.js → timeline-definition-24CTP7MA-rv7QUa46.js} +1 -1
- package/dist/toDate-CjPuEPou.js +705 -0
- package/dist/{toast-DxVfYlCp.js → toast-CFWpihJU.js} +221 -221
- package/dist/{tooltip-BCntm-jf.js → tooltip-CKO1pHJo.js} +51 -51
- package/dist/{use-restore-focus-BhXhsNLV.js → use-restore-focus-DBCITLeF.js} +1 -1
- package/dist/{useAsyncData-BbuzBAUp.js → useAsyncData-ChgNtdmE.js} +1 -1
- package/dist/{useDateFormatter-6AHbIR-J.js → useDateFormatter-c_yJtkAe.js} +2 -2
- package/dist/{useDeepCompareMemoize-da5A3c-Y.js → useDeepCompareMemoize-Bet7kSsI.js} +1 -1
- package/dist/{useLifecycle-C3nT1kwI.js → useLifecycle-VVmz_24o.js} +2 -2
- package/dist/{useTheme-BC8Lof0B.js → useTheme-DympCsQg.js} +83 -83
- package/dist/{vega-component-CF9IzE2r.js → vega-component-DnfQeoyt.js} +7 -7
- package/dist/{vennDiagram-4TSXK5OY-CINKaJgr.js → vennDiagram-4TSXK5OY-D36Zk7t-.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-KG2tlXg_.js → wardleyDiagram-VM6X3IG4-BLBolvyQ.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-XIH5cwgI.js → xychartDiagram-S5SC5T6Z-CfH57l0v.js} +1 -1
- package/package.json +1 -1
- package/src/__tests__/mount.test.ts +0 -20
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +2 -2
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +2 -2
- package/src/core/host/__tests__/notebook-client.test.ts +66 -3
- package/src/core/host/events.ts +1 -10
- package/src/core/host/notebook-client.ts +11 -18
- package/src/core/runtime/__tests__/runtime.test.ts +2 -53
- package/src/core/runtime/runtime.ts +1 -14
- package/src/core/runtime/types.ts +0 -2
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +2 -23
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +17 -25
- package/src/core/websocket/transports/__tests__/sse.test.ts +17 -0
- package/src/core/websocket/transports/sse.ts +14 -2
- package/src/core/websocket/useNotebookClient.ts +1 -11
- package/src/core/websocket/useNotebookSession.tsx +1 -6
- package/src/mount.tsx +0 -4
- package/dist/toDate-C0jaysq2.js +0 -1184
|
@@ -11,7 +11,6 @@ import type {
|
|
|
11
11
|
import {
|
|
12
12
|
createNotebookClient,
|
|
13
13
|
type NotebookClient,
|
|
14
|
-
type NotebookConnection,
|
|
15
14
|
} from "../host/notebook-client";
|
|
16
15
|
import { classifyCloseEvent } from "./connection-state";
|
|
17
16
|
import { notebookClientAtom } from "./state";
|
|
@@ -21,24 +20,20 @@ import {
|
|
|
21
20
|
} from "./transports/create";
|
|
22
21
|
|
|
23
22
|
type Options = ConnectionTransportOptions & {
|
|
24
|
-
sessionId: string;
|
|
25
|
-
messageFormat: NotebookConnection["messageFormat"];
|
|
26
23
|
waitUntilReady: () => Promise<void>;
|
|
27
24
|
checkHealth: () => Promise<boolean>;
|
|
28
25
|
onNotification: (notification: NotificationPayload) => void;
|
|
29
|
-
onMessageError: NotebookConnection["onMessageError"];
|
|
30
26
|
};
|
|
31
27
|
|
|
32
28
|
export function useNotebookClient(options: Options): NotebookClient {
|
|
33
29
|
const store = useStore();
|
|
34
|
-
const {
|
|
30
|
+
const { static: isStatic, transportType } = options;
|
|
35
31
|
const controller = useMemo(() => createNotebookClient(store), [store]);
|
|
36
32
|
const url = useEvent(options.url);
|
|
37
33
|
const headers = useEvent(options.headers);
|
|
38
34
|
const waitUntilReady = useEvent(options.waitUntilReady);
|
|
39
35
|
const checkHealth = useEvent(options.checkHealth);
|
|
40
36
|
const onNotification = useEvent(options.onNotification);
|
|
41
|
-
const onMessageError = useEvent(options.onMessageError);
|
|
42
37
|
|
|
43
38
|
useEffect(() => {
|
|
44
39
|
const lifetime = new AbortController();
|
|
@@ -52,11 +47,9 @@ export function useNotebookClient(options: Options): NotebookClient {
|
|
|
52
47
|
transportType,
|
|
53
48
|
}),
|
|
54
49
|
url,
|
|
55
|
-
messageFormat,
|
|
56
50
|
signal: lifetime.signal,
|
|
57
51
|
waitUntilReady,
|
|
58
52
|
checkHealth,
|
|
59
|
-
onMessageError,
|
|
60
53
|
// The host validates the envelope, not the native notification contents.
|
|
61
54
|
onNotification: (notification) =>
|
|
62
55
|
onNotification({ data: notification as NotificationMessage }),
|
|
@@ -72,16 +65,13 @@ export function useNotebookClient(options: Options): NotebookClient {
|
|
|
72
65
|
}, [
|
|
73
66
|
controller,
|
|
74
67
|
store,
|
|
75
|
-
sessionId,
|
|
76
68
|
isStatic,
|
|
77
69
|
transportType,
|
|
78
|
-
messageFormat,
|
|
79
70
|
url,
|
|
80
71
|
headers,
|
|
81
72
|
waitUntilReady,
|
|
82
73
|
checkHealth,
|
|
83
74
|
onNotification,
|
|
84
|
-
onMessageError,
|
|
85
75
|
]);
|
|
86
76
|
|
|
87
77
|
return controller.client;
|
|
@@ -65,7 +65,7 @@ import { type LayoutState, useLayoutActions } from "../layout/state";
|
|
|
65
65
|
import { kioskModeAtom } from "../mode";
|
|
66
66
|
import { connectionAtom, startupProgressAtom } from "../network/connection";
|
|
67
67
|
import type { RequestId } from "../network/DeferredRequestRegistry";
|
|
68
|
-
import {
|
|
68
|
+
import { useRuntimeManager } from "../runtime/config";
|
|
69
69
|
import { SECRETS_REGISTRY } from "../secrets/request-registry";
|
|
70
70
|
import { isStaticNotebook } from "../static/static-state";
|
|
71
71
|
import {
|
|
@@ -135,7 +135,6 @@ export function useNotebookSession(opts: {
|
|
|
135
135
|
const setStableSessionId = useSetAtom(stableSessionIdAtom);
|
|
136
136
|
const setCapabilities = useSetAtom(capabilitiesAtom);
|
|
137
137
|
const runtimeManager = useRuntimeManager();
|
|
138
|
-
const { notebookId } = useAtomValue(runtimeConfigAtom);
|
|
139
138
|
const transportType = useAtomValue(connectionTransportTypeAtom);
|
|
140
139
|
const setCacheInfo = useSetAtom(cacheInfoAtom);
|
|
141
140
|
const setKernelStartupError = useSetAtom(kernelStartupErrorAtom);
|
|
@@ -411,11 +410,8 @@ export function useNotebookSession(opts: {
|
|
|
411
410
|
});
|
|
412
411
|
};
|
|
413
412
|
const notebook = useNotebookClient({
|
|
414
|
-
sessionId,
|
|
415
413
|
static: isStaticNotebook(),
|
|
416
414
|
transportType,
|
|
417
|
-
messageFormat:
|
|
418
|
-
notebookId && transportType === "websocket" ? "host" : "session",
|
|
419
415
|
url: () =>
|
|
420
416
|
transportType === "sse"
|
|
421
417
|
? runtimeManager.getSseURL(sessionId).toString()
|
|
@@ -428,7 +424,6 @@ export function useNotebookSession(opts: {
|
|
|
428
424
|
}
|
|
429
425
|
},
|
|
430
426
|
checkHealth: () => runtimeManager.reconcileFromHealth(),
|
|
431
|
-
onMessageError,
|
|
432
427
|
onNotification: (notification) => {
|
|
433
428
|
try {
|
|
434
429
|
handleNotification(notification);
|
package/src/mount.tsx
CHANGED
|
@@ -274,8 +274,6 @@ const mountOptionsSchema = z.object({
|
|
|
274
274
|
.transform((val) => val as api.Notebook["NotebookV1"]),
|
|
275
275
|
]),
|
|
276
276
|
|
|
277
|
-
notebookId: z.string().optional(),
|
|
278
|
-
|
|
279
277
|
/**
|
|
280
278
|
* Runtime configs
|
|
281
279
|
*/
|
|
@@ -286,7 +284,6 @@ const mountOptionsSchema = z.object({
|
|
|
286
284
|
// Lazy by default, but can be overridden by the runtime config
|
|
287
285
|
lazy: z.boolean().default(true),
|
|
288
286
|
authToken: z.string().nullish(),
|
|
289
|
-
notebookId: z.string().optional(),
|
|
290
287
|
}),
|
|
291
288
|
)
|
|
292
289
|
.nullish()
|
|
@@ -367,7 +364,6 @@ function initStore(options: unknown) {
|
|
|
367
364
|
} else {
|
|
368
365
|
store.set(runtimeConfigAtom, {
|
|
369
366
|
...DEFAULT_RUNTIME_CONFIG,
|
|
370
|
-
notebookId: parsedOptions.data.notebookId,
|
|
371
367
|
lazy: false,
|
|
372
368
|
serverToken: parsedOptions.data.serverToken,
|
|
373
369
|
});
|