@marimo-team/islands 0.25.3-dev361 → 0.25.3-dev362

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 (78) hide show
  1. package/dist/{ConnectedDataExplorerComponent-xliyyXNO.js → ConnectedDataExplorerComponent-DGucd81N.js} +9 -9
  2. package/dist/{ErrorBoundary-5KXgrxsJ.js → ErrorBoundary-DYnmJVhW.js} +6 -6
  3. package/dist/{abnfDiagram-VCTEODGH-Dl9Nrtbf.js → abnfDiagram-VCTEODGH-Dm3v1B8V.js} +2 -2
  4. package/dist/{any-language-editor-CBHhdCC0.js → any-language-editor-CuJ_HsCB.js} +2 -2
  5. package/dist/{architectureDiagram-5GKGNRK7-DTg032fQ.js → architectureDiagram-5GKGNRK7-DpbaviJn.js} +1 -1
  6. package/dist/{assertNever-ie77PjMn.js → assertNever-BCN-4W77.js} +13 -13
  7. package/dist/{chat-ui-BV0qyfru.js → chat-ui-DFu6TtNT.js} +42 -42
  8. package/dist/{check-DTIv5ZZ3.js → check-Cp78nuZm.js} +1 -1
  9. package/dist/{chunk-IMKFNOWR-CsFB-2LW.js → chunk-IMKFNOWR-BC0YdYLD.js} +1 -1
  10. package/dist/{chunk-SHT3W25Y-ByuJHeBL.js → chunk-SHT3W25Y-D-4QYbSe.js} +1 -1
  11. package/dist/{chunk-SVP7TREG-9oBZhbrr.js → chunk-SVP7TREG-D4hMfbCn.js} +1 -1
  12. package/dist/{chunk-TICWLB2K-Bx4m0cJ1.js → chunk-TICWLB2K-BYsR3p13.js} +1 -1
  13. package/dist/{classDiagram-ZZMXUADV-Cms37-C9.js → classDiagram-ZZMXUADV-C5ajJVPv.js} +2 -2
  14. package/dist/{classDiagram-v2-VYDZK3BY-qAom4Bi7.js → classDiagram-v2-VYDZK3BY-B78-nsX1.js} +2 -2
  15. package/dist/{code-visibility-kmG2FDic.js → code-visibility-Sf3HhiBw.js} +18 -18
  16. package/dist/{common-DEwi_Pxq.js → common-C6d9Lgm_.js} +188 -188
  17. package/dist/{config-CvBnR945.js → config-C5m1QxBa.js} +15 -15
  18. package/dist/{copy-icon-DmtNidSa.js → copy-icon-C88pF7Yd.js} +2 -2
  19. package/dist/{createReducer-BxBCTvKn.js → createReducer-CX4_c88Z.js} +5 -5
  20. package/dist/{cynefinDiagram-5FMLGOSQ-BjJZwMEz.js → cynefinDiagram-5FMLGOSQ-DKMYKL7e.js} +1 -1
  21. package/dist/{dagre-GXQ25YYZ-Bohu7_09.js → dagre-GXQ25YYZ-Cpk3cN6x.js} +1 -1
  22. package/dist/{data-grid-overlay-editor-PdcwOzeD.js → data-grid-overlay-editor-DVx4EtuY.js} +1 -1
  23. package/dist/{diagram-S7CK7UJ4-Chl0n835.js → diagram-S7CK7UJ4-DJI8j406.js} +1 -1
  24. package/dist/{diagram-UQ7AKVKN-DHx8nzy7.js → diagram-UQ7AKVKN--t6Sxm0L.js} +1 -1
  25. package/dist/{diagram-VX7I27RA-CKdpv1U4.js → diagram-VX7I27RA-CAEWfMi4.js} +1 -1
  26. package/dist/{diagram-Z3DM3KII-sY-sI--2.js → diagram-Z3DM3KII-CCN5pOhw.js} +1 -1
  27. package/dist/{dialog-Cqu5Hp5U.js → dialog-BYBmCjb1.js} +19 -19
  28. package/dist/{dropdown-menu-DXEYk99S.js → dropdown-menu-DoF-TLG-.js} +710 -710
  29. package/dist/{ebnfDiagram-PWID7BFC-CD0P2xeH.js → ebnfDiagram-PWID7BFC-DHf-SOQy.js} +2 -2
  30. package/dist/{erDiagram-RLTQ6QDP-BaKQuYxC.js → erDiagram-RLTQ6QDP-COlDd7VM.js} +1 -1
  31. package/dist/{error-banner-DUB_qUeL.js → error-banner-S4nxZ1uN.js} +58 -58
  32. package/dist/{error-entries-CTb_cxXY.js → error-entries-BRiOHm8G.js} +73 -73
  33. package/dist/{feedback-button-908QWwNB.js → feedback-button-9jL0nsYt.js} +8 -7
  34. package/dist/{flowDiagram-HODETNUW-BcCpHh7-.js → flowDiagram-HODETNUW-CaxmYPMr.js} +2 -2
  35. package/dist/{formats-hF6fETr6.js → formats-gmuMlaye.js} +1 -1
  36. package/dist/{glide-data-editor-C605zYxr.js → glide-data-editor-BKnH1HN0.js} +11 -11
  37. package/dist/{glide-utils-Bnd_k48H.js → glide-utils-D_0KwKFV.js} +2 -2
  38. package/dist/{globals-B7U8jw_f.js → globals-DVjcDrt2.js} +3 -3
  39. package/dist/{html-to-image-Bbl0PeC7.js → html-to-image-D0LFfNxI.js} +4609 -4609
  40. package/dist/{infoDiagram-27XIBGKW-DWltseIa.js → infoDiagram-27XIBGKW-CcN7bG0a.js} +1 -1
  41. package/dist/{ishikawaDiagram-5VMMS53U-DHgepBPo.js → ishikawaDiagram-5VMMS53U-BeH0vKCR.js} +1 -1
  42. package/dist/{kanban-definition-UXKFOSKX-B2_BIjBq.js → kanban-definition-UXKFOSKX-CHogPzKj.js} +1 -1
  43. package/dist/main.js +1296 -1296
  44. package/dist/{mermaid--2K0cmt9.js → mermaid-DGjcwa4y.js} +34 -34
  45. package/dist/{mindmap-definition-YA3MSWOX-DNebycIP.js → mindmap-definition-YA3MSWOX-TaohGCOq.js} +1 -1
  46. package/dist/{number-overlay-editor-BVoX2c_K.js → number-overlay-editor-cQ-z-giO.js} +1 -1
  47. package/dist/{pegDiagram-XKGWAZYB-CH4U3II-.js → pegDiagram-XKGWAZYB-B1LREJhD.js} +2 -2
  48. package/dist/{pencil-MMnw1YQh.js → pencil-DPoayiEc.js} +1 -1
  49. package/dist/{pieDiagram-E7YTZNPT-pfcrdUCa.js → pieDiagram-E7YTZNPT-kioJVzp8.js} +1 -1
  50. package/dist/{process-output-Dw_sI4Xp.js → process-output-DLM5_K3W.js} +4 -4
  51. package/dist/{railroadDiagram-O6MQD6OU-BZKpAbNG.js → railroadDiagram-O6MQD6OU-Pma-byb8.js} +2 -2
  52. package/dist/{requirementDiagram-BXWQKSXE-DnyfIHe3.js → requirementDiagram-BXWQKSXE-DzuAdFbY.js} +1 -1
  53. package/dist/{reveal-component-X4L8jPHE.js → reveal-component-RDiMhY43.js} +8 -8
  54. package/dist/{select-suaAxFuo.js → select-0c6X5K-y.js} +114 -114
  55. package/dist/{sequenceDiagram-WJ2MYXX4-BeYuWX7N.js → sequenceDiagram-WJ2MYXX4-Ci2zhlHg.js} +1 -1
  56. package/dist/{spec-BQNx2-D7.js → spec-C1iS9GEg.js} +4 -4
  57. package/dist/{stateDiagram-D77RDMKH-B8FxwAM2.js → stateDiagram-D77RDMKH-Bi2orLYz.js} +2 -2
  58. package/dist/{stateDiagram-v2-MP3YSRHH-CzWLBqm1.js → stateDiagram-v2-MP3YSRHH-Bb6bmuGa.js} +2 -2
  59. package/dist/static-state-C-NJXwup.js +90 -0
  60. package/dist/{swimlanes-42K2YHIH-CzKmGMts.js → swimlanes-42K2YHIH-B9OnmhxQ.js} +1 -1
  61. package/dist/{swimlanesDiagram-VR7AAH4N-DnWIUN_9.js → swimlanesDiagram-VR7AAH4N-Vq_2vH42.js} +2 -2
  62. package/dist/{timeline-definition-24CTP7MA-Czf2QN2R.js → timeline-definition-24CTP7MA-DXd0exhe.js} +1 -1
  63. package/dist/{toast-CsJa1nGj.js → toast-BvfR_w3m.js} +106 -106
  64. package/dist/{tooltip-BVbJPkcl.js → tooltip-DVVHv-uw.js} +57 -57
  65. package/dist/{use-restore-focus-tPmARo1Q.js → use-restore-focus-92n9XpFH.js} +512 -546
  66. package/dist/{useDateFormatter-B4ygYuUU.js → useDateFormatter-BBJOPClo.js} +2 -2
  67. package/dist/{useDeepCompareMemoize-Bcu0DkCS.js → useDeepCompareMemoize-Ccv-X_CO.js} +1 -1
  68. package/dist/{useLifecycle-MTdtnR3-.js → useLifecycle-BIzIKY46.js} +1 -1
  69. package/dist/{vega-component-BhBbP4S7.js → vega-component-Co5N151m.js} +6 -6
  70. package/dist/{vennDiagram-4TSXK5OY-BrHqWB1U.js → vennDiagram-4TSXK5OY-CBa_ZCXA.js} +1 -1
  71. package/dist/{wardleyDiagram-VM6X3IG4-Cms1K_3v.js → wardleyDiagram-VM6X3IG4-DTsYwYF5.js} +1 -1
  72. package/dist/{xychartDiagram-S5SC5T6Z-_kUiODzS.js → xychartDiagram-S5SC5T6Z-DBhQEWyP.js} +1 -1
  73. package/package.json +1 -1
  74. package/src/core/constants.ts +0 -6
  75. package/src/core/runtime/__tests__/runtime.test.ts +1 -3
  76. package/src/theme/__tests__/useTheme.test.ts +9 -38
  77. package/src/theme/useTheme.ts +1 -16
  78. package/dist/static-state-Al_hmf1n.js +0 -68
@@ -1,7 +1,7 @@
1
1
  import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
- import { h as n } from "./tooltip-BVbJPkcl.js";
4
- import { C as r } from "./select-suaAxFuo.js";
3
+ import { h as n } from "./tooltip-DVVHv-uw.js";
4
+ import { C as r } from "./select-0c6X5K-y.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"
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
- import { Pt as n } from "./use-restore-focus-tPmARo1Q.js";
3
+ import { jt as n } from "./use-restore-focus-92n9XpFH.js";
4
4
  //#region src/hooks/useDeepCompareMemoize.ts
5
5
  var r = /* @__PURE__ */ e(t(), 1);
6
6
  function i(e) {
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { h as t, r as n } from "./button-qQhINE7z.js";
3
3
  import { t as r } from "./react-Bgs_wQh3.js";
4
4
  import { t as i } from "./compiler-runtime-C5KHtL5D.js";
5
- import { h as a } from "./tooltip-BVbJPkcl.js";
5
+ import { h as a } from "./tooltip-DVVHv-uw.js";
6
6
  import { t as o } from "./jsx-runtime-D8btoEHk.js";
7
7
  var s = a("calendar", [
8
8
  ["path", {
@@ -2,22 +2,22 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { g as t, h as n, m as r, s as i } from "./button-qQhINE7z.js";
3
3
  import { t as a } from "./react-Bgs_wQh3.js";
4
4
  import { t as o } from "./compiler-runtime-C5KHtL5D.js";
5
- import { t as s } from "./tooltip-BVbJPkcl.js";
6
- import { l as c, t as l } from "./config-CvBnR945.js";
5
+ import { t as s } from "./tooltip-DVVHv-uw.js";
6
+ import { l as c, t as l } from "./config-C5m1QxBa.js";
7
7
  import { t as u } from "./jsx-runtime-D8btoEHk.js";
8
- import { d } from "./use-restore-focus-tPmARo1Q.js";
9
- import { n as f } from "./error-banner-DUB_qUeL.js";
8
+ import { d } from "./use-restore-focus-92n9XpFH.js";
9
+ import { n as f } from "./error-banner-S4nxZ1uN.js";
10
10
  import { t as p } from "./debounce-DrhhziJv.js";
11
11
  import { t as ee } from "./objects-DCmMvZtn.js";
12
12
  import { t as te } from "./useEvent-BoN7U38T.js";
13
- import { a as ne, i as re, n as ie, t as m } from "./formats-hF6fETr6.js";
13
+ import { a as ne, i as re, n as ie, t as m } from "./formats-gmuMlaye.js";
14
14
  import { a as h, t as g } from "./arrays-DoQ-AILx.js";
15
15
  import { t as ae } from "./useAsyncData-P5-Oovhq.js";
16
16
  import { t as _ } from "./semaphore-8KhQouXt.js";
17
17
  import { W as oe, n as se } from "./vega-loader.browser-Co9gYE8Z.js";
18
18
  import { t as ce } from "./react-vega-CGgQEf0O.js";
19
19
  import { a as le, n as v } from "./loader-Bin_dutt.js";
20
- import { t as ue } from "./useDeepCompareMemoize-Bcu0DkCS.js";
20
+ import { t as ue } from "./useDeepCompareMemoize-Ccv-X_CO.js";
21
21
  import { t as de } from "./use-vega-container-remeasure-BrUpWQfF.js";
22
22
  //#region src/plugins/impl/vega/fix-relative-url.ts
23
23
  var fe = /* @__PURE__ */ e(a(), 1), pe = o();
@@ -3,7 +3,7 @@ import { t } from "./src-D5uZaZib.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
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-4SDIhUTY.js";
5
5
  import { t as _ } from "./rough.esm-CtV9AnV1.js";
6
- import { p as v } from "./mermaid--2K0cmt9.js";
6
+ import { p as v } from "./mermaid-DGjcwa4y.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) {
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-76L6My3P.js";
2
2
  import { n as t } from "./src-D5uZaZib.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
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-4SDIhUTY.js";
5
- import { p as m } from "./mermaid--2K0cmt9.js";
5
+ import { p as m } from "./mermaid-DGjcwa4y.js";
6
6
  import { n as h } from "./mermaid-parser.core-DtOnl7m4.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
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
9
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-4SDIhUTY.js";
10
10
  import "./chunk-PWAF6VOD-CRu_RGP2.js";
11
11
  import { t as b } from "./chunk-GMAD6QVW-BJGF8QZL.js";
12
- import { p as x } from "./mermaid--2K0cmt9.js";
12
+ import { p as x } from "./mermaid-DGjcwa4y.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-dev361",
3
+ "version": "0.25.3-dev362",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -52,12 +52,6 @@ export const KnownQueryParams = {
52
52
  * If false, the chrome will be hidden.
53
53
  */
54
54
  showChrome: "show-chrome",
55
- /**
56
- * Override the display theme: `light`, `dark`, or `system`.
57
- * Takes precedence over the notebook's saved `display.theme`.
58
- * Ignored for embedded islands, which infer the theme from their host page.
59
- */
60
- theme: "theme",
61
55
  };
62
56
 
63
57
  /**
@@ -592,7 +592,7 @@ describe("RuntimeManager", () => {
592
592
  Object.defineProperty(window, "location", {
593
593
  value: {
594
594
  ...originalLocation,
595
- search: "?custom_param=value123&user_token=abc&theme=dark",
595
+ search: "?custom_param=value123&user_token=abc",
596
596
  },
597
597
  writable: true,
598
598
  });
@@ -621,11 +621,9 @@ describe("RuntimeManager", () => {
621
621
  base_param: "existing",
622
622
  custom_param: "value123",
623
623
  user_token: "abc",
624
- theme: "dark",
625
624
  });
626
625
  expect(httpUrl.searchParams.get("custom_param")).toBe("value123");
627
626
  expect(httpUrl.searchParams.get("user_token")).toBe("abc");
628
- expect(httpUrl.searchParams.get("theme")).toBe("dark");
629
627
 
630
628
  // Should also include session_id for WebSocket URLs
631
629
  expect(wsUrl.searchParams.get("session_id")).toBe("test");
@@ -5,13 +5,7 @@ import { configOverridesAtom, userConfigAtom } from "@/core/config/config";
5
5
  import { defaultUserConfig } from "@/core/config/config-schema";
6
6
  import { store } from "@/core/state/jotai";
7
7
  import type { Theme } from "../useTheme";
8
- import { resolvedThemeAtom, visibleForTesting } from "../useTheme";
9
-
10
- const { themeFromQueryParam } = visibleForTesting;
11
-
12
- function setQuery(search: string): void {
13
- window.history.replaceState({}, "", search === "" ? "/" : `/?${search}`);
14
- }
8
+ import { resolvedThemeAtom } from "../useTheme";
15
9
 
16
10
  function setConfigTheme(theme: Theme): void {
17
11
  const config = defaultUserConfig();
@@ -22,47 +16,24 @@ function setConfigTheme(theme: Theme): void {
22
16
  }
23
17
 
24
18
  afterEach(() => {
25
- setQuery("");
26
19
  store.set(userConfigAtom, defaultUserConfig());
27
20
  store.set(configOverridesAtom, {});
28
21
  });
29
22
 
30
- describe("themeFromQueryParam", () => {
31
- it.each(["light", "dark", "system"] as const)(
32
- "returns the valid theme %s",
33
- (theme) => {
34
- setQuery(`theme=${theme}`);
35
- expect(themeFromQueryParam()).toBe(theme);
36
- },
37
- );
38
-
39
- it("returns undefined when the param is absent", () => {
40
- setQuery("");
41
- expect(themeFromQueryParam()).toBeUndefined();
42
- });
43
-
44
- it("returns undefined for an invalid value", () => {
45
- setQuery("theme=blue");
46
- expect(themeFromQueryParam()).toBeUndefined();
47
- });
48
- });
49
-
50
- describe("resolvedThemeAtom with a theme query param", () => {
51
- it("uses the saved config theme when no param is present", () => {
23
+ describe("resolvedThemeAtom", () => {
24
+ it("uses the saved config theme", () => {
52
25
  setConfigTheme("dark");
53
- setQuery("");
54
26
  expect(store.get(resolvedThemeAtom)).toBe("dark");
27
+ setConfigTheme("light");
28
+ expect(store.get(resolvedThemeAtom)).toBe("light");
55
29
  });
56
30
 
57
- it("lets the query param override the saved config theme", () => {
31
+ it("uses resolved configuration overrides ahead of saved settings", () => {
58
32
  setConfigTheme("light");
59
- setQuery("theme=dark");
33
+ store.set(configOverridesAtom, { display: { theme: "dark" } });
60
34
  expect(store.get(resolvedThemeAtom)).toBe("dark");
61
- });
62
35
 
63
- it("falls back to the config theme for an invalid param value", () => {
64
- setConfigTheme("dark");
65
- setQuery("theme=blue");
66
- expect(store.get(resolvedThemeAtom)).toBe("dark");
36
+ store.set(configOverridesAtom, {});
37
+ expect(store.get(resolvedThemeAtom)).toBe("light");
67
38
  });
68
39
  });
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { atom, useAtomValue } from "jotai";
4
4
  import { resolvedMarimoConfigAtom } from "@/core/config/config";
5
- import { KnownQueryParams } from "@/core/constants";
6
5
  import { isIslands } from "@/core/islands/utils";
7
6
  import { store } from "@/core/state/jotai";
8
7
 
@@ -11,16 +10,6 @@ export type ResolvedTheme = "light" | "dark";
11
10
 
12
11
  export const THEMES: Theme[] = ["light", "dark", "system"];
13
12
 
14
- function themeFromQueryParam(): Theme | undefined {
15
- if (typeof window === "undefined") {
16
- return undefined;
17
- }
18
- const value = new URLSearchParams(window.location.search).get(
19
- KnownQueryParams.theme,
20
- );
21
- return THEMES.includes(value as Theme) ? (value as Theme) : undefined;
22
- }
23
-
24
13
  function getHostElements() {
25
14
  return [document.body, document.documentElement];
26
15
  }
@@ -97,7 +86,7 @@ const themeAtom = atom((get) => {
97
86
  if (isIslands()) {
98
87
  return get(hostThemeAtom) ?? getHostTheme();
99
88
  }
100
- return themeFromQueryParam() ?? get(resolvedMarimoConfigAtom).display.theme;
89
+ return get(resolvedMarimoConfigAtom).display.theme;
101
90
  });
102
91
 
103
92
  const prefersDarkModeAtom = atom(false);
@@ -163,7 +152,3 @@ export function useTheme(): { theme: ResolvedTheme } {
163
152
  const theme = useAtomValue(resolvedThemeAtom, { store });
164
153
  return { theme };
165
154
  }
166
-
167
- export const visibleForTesting = {
168
- themeFromQueryParam,
169
- };
@@ -1,68 +0,0 @@
1
- import { t as e } from "./compiler-runtime-C5KHtL5D.js";
2
- import { Bt as t, Lt as n, f as r, h as i, xt as a } from "./use-restore-focus-tPmARo1Q.js";
3
- import { t as o } from "./invariant-DLmrl-hA.js";
4
- //#region src/core/wasm/utils.ts
5
- function s() {
6
- return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
7
- }
8
- var c = 6048e5, l = 864e5, u = Symbol.for("constructDateFrom");
9
- //#endregion
10
- //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
11
- function d(e, t) {
12
- return typeof e == "function" ? e(t) : e && typeof e == "object" && u in e ? e[u](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
13
- }
14
- //#endregion
15
- //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
16
- function f(e, t) {
17
- return d(t || e, e);
18
- }
19
- //#endregion
20
- //#region src/utils/assertExists.ts
21
- var p = e();
22
- function m(e, t) {
23
- if (e == null) throw Error(t || `Expected value but got ${e}`);
24
- }
25
- //#endregion
26
- //#region src/core/mode.ts
27
- function h() {
28
- let e = a.get(_);
29
- return m(e, "internal-error: initial mode not found"), o(e !== "present", "internal-error: initial mode cannot be 'present'"), e;
30
- }
31
- var g = t({
32
- mode: r() ? "read" : "not-set",
33
- cellAnchor: null
34
- }), _ = t(void 0);
35
- function v() {
36
- let e = a.get(_);
37
- return e !== "home" && e !== "gallery";
38
- }
39
- var y = t(!1);
40
- function b() {
41
- let e = (0, p.c)(1), { mode: t } = n(g), r = n(y), a;
42
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (a = new URLSearchParams(window.location.search).get(i.kiosk), e[0] = a) : a = e[0], t !== "read" && !r && a !== "true";
43
- }
44
- //#endregion
45
- //#region src/core/static/static-state.ts
46
- function x(e) {
47
- if (typeof e != "object" || !e || Array.isArray(e)) return !1;
48
- for (let t of Object.values(e)) if (typeof t != "string") return !1;
49
- return !0;
50
- }
51
- function S(e) {
52
- if (typeof e != "object" || !e || Array.isArray(e)) return !1;
53
- let t = e;
54
- return !(!x(t.files) || t.modelNotifications !== void 0 && !Array.isArray(t.modelNotifications));
55
- }
56
- function C() {
57
- let e = typeof window > "u" ? void 0 : window.__MARIMO_STATIC__;
58
- return S(e) ? e : void 0;
59
- }
60
- function w() {
61
- return C() !== void 0;
62
- }
63
- function T() {
64
- let e = C();
65
- return o(e !== void 0, "Not a static notebook"), e.files;
66
- }
67
- //#endregion
68
- export { v as a, g as c, d, l as f, _ as i, m as l, s as m, w as n, y as o, c as p, h as r, b as s, T as t, f as u };