@marimo-team/islands 0.25.3-dev192 → 0.25.3-dev193

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 (154) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BBbOElk3.js → ConnectedDataExplorerComponent-BRuwLOIx.js} +9 -9
  2. package/dist/{ErrorBoundary-Dw6uRKVk.js → ErrorBoundary-BVu_xT-p.js} +2 -2
  3. package/dist/{abnfDiagram-VCTEODGH-DhMT6Uhd.js → abnfDiagram-VCTEODGH-LlJTOOU_.js} +2 -2
  4. package/dist/{architectureDiagram-5GKGNRK7-BVbEiJLq.js → architectureDiagram-5GKGNRK7-9PQtGLLZ.js} +1 -1
  5. package/dist/{arrays-R6JsImiT.js → arrays-DA6KkLfq.js} +6 -12
  6. package/dist/assets/__vite-browser-external-BCJsx8QS.js +1 -0
  7. package/dist/assets/{worker-C6e9ERyd.js → worker-DodjWT_Z.js} +2 -2
  8. package/dist/{capabilities-CI4xUPsp.js → capabilities-CvWU-ey_.js} +1 -1
  9. package/dist/{chat-ui-BguxTQEL.js → chat-ui-Bl2euMBD.js} +93 -93
  10. package/dist/{chunk-IMKFNOWR-By5hSbJJ.js → chunk-IMKFNOWR-DcXv-BD5.js} +1 -1
  11. package/dist/{chunk-SHT3W25Y-DFrEYG54.js → chunk-SHT3W25Y-VwnELN23.js} +1 -1
  12. package/dist/{chunk-SVP7TREG-DFXGc9ew.js → chunk-SVP7TREG-DgQpI5Zi.js} +1 -1
  13. package/dist/{chunk-TICWLB2K-DZdNIpoZ.js → chunk-TICWLB2K-CTg6VTJT.js} +1 -1
  14. package/dist/{classDiagram-ZZMXUADV-Cgj_eEQA.js → classDiagram-ZZMXUADV-UzmcFrnW.js} +2 -2
  15. package/dist/{classDiagram-v2-VYDZK3BY-DLAUrSqj.js → classDiagram-v2-VYDZK3BY-DhjiI6IQ.js} +2 -2
  16. package/dist/{code-visibility-v_7ijLtx.js → code-visibility-BTVimCUw.js} +38 -42
  17. package/dist/{common-BUwWHpnK.js → common-fTgq7gO-.js} +849 -849
  18. package/dist/{cynefinDiagram-5FMLGOSQ-Cikf9AKa.js → cynefinDiagram-5FMLGOSQ-O4ShIbJX.js} +1 -1
  19. package/dist/{dagre-GXQ25YYZ-C5KEi5_l.js → dagre-GXQ25YYZ-dtHhhcPu.js} +1 -1
  20. package/dist/{data-grid-overlay-editor-4IZymnXZ.js → data-grid-overlay-editor-DAZZkLWg.js} +1 -1
  21. package/dist/{diagram-S7CK7UJ4-BaoBTQjR.js → diagram-S7CK7UJ4-ppPYVZ6W.js} +1 -1
  22. package/dist/{diagram-UQ7AKVKN-DDufBsUA.js → diagram-UQ7AKVKN-CMZDf--k.js} +1 -1
  23. package/dist/{diagram-VX7I27RA-CY6RALJ8.js → diagram-VX7I27RA-CFvJdx-C.js} +1 -1
  24. package/dist/{diagram-Z3DM3KII-Bc-LHsD6.js → diagram-Z3DM3KII-Dt6_uFbv.js} +1 -1
  25. package/dist/{dropdown-menu-drDjxJyV.js → dropdown-menu-CeaOsjWZ.js} +2 -2
  26. package/dist/{ebnfDiagram-PWID7BFC-Cz0J-tcC.js → ebnfDiagram-PWID7BFC-DpRFrKK-.js} +2 -2
  27. package/dist/{erDiagram-RLTQ6QDP-DTXTDgFu.js → erDiagram-RLTQ6QDP-CqAU4b0u.js} +1 -1
  28. package/dist/{error-entries-CZ1NQ6Kv.js → error-entries-CYGwr5-O.js} +5596 -6012
  29. package/dist/feedback-button-DzFFn-n4.js +374 -0
  30. package/dist/{flowDiagram-HODETNUW-RbwWf2zc.js → flowDiagram-HODETNUW-i8-Gw8HO.js} +2 -2
  31. package/dist/{formats-DbXnijtH.js → formats-BtoHHy42.js} +1 -1
  32. package/dist/{glide-data-editor-DU8_EDG5.js → glide-data-editor-DFsqVbWR.js} +5 -5
  33. package/dist/{globals-BeBDOk22.js → globals-Dr0MRANu.js} +2 -2
  34. package/dist/{html-to-image-D_4_hQ8U.js → html-to-image-Cy5UDpQJ.js} +56 -56
  35. package/dist/{infoDiagram-27XIBGKW-DlmzZjmI.js → infoDiagram-27XIBGKW-DpfOKdLL.js} +1 -1
  36. package/dist/{ishikawaDiagram-5VMMS53U-EN3TYP_q.js → ishikawaDiagram-5VMMS53U-Dg7mrMG7.js} +1 -1
  37. package/dist/{kanban-definition-UXKFOSKX-CK_-Ru7Q.js → kanban-definition-UXKFOSKX-QB6e3Jrj.js} +1 -1
  38. package/dist/main.js +5875 -5876
  39. package/dist/{mermaid-DU9ZRmkG.js → mermaid-CeWG4Egr.js} +48 -48
  40. package/dist/{mindmap-definition-YA3MSWOX-C-hqgUvF.js → mindmap-definition-YA3MSWOX-BTz3uTGe.js} +1 -1
  41. package/dist/{number-overlay-editor-BoIkyh6H.js → number-overlay-editor-DupOSYHx.js} +1 -1
  42. package/dist/{once-eG8Vmvjd.js → once-DWGO2mQ2.js} +1 -1
  43. package/dist/{pegDiagram-XKGWAZYB-BiMejYPB.js → pegDiagram-XKGWAZYB-3ZIEa3mB.js} +2 -2
  44. package/dist/{pieDiagram-E7YTZNPT-B1zCZ1eq.js → pieDiagram-E7YTZNPT-BJAlk046.js} +1 -1
  45. package/dist/{process-output-DxSCHBWp.js → process-output-q9MTAIMX.js} +2 -2
  46. package/dist/{railroadDiagram-O6MQD6OU-BLcfaASl.js → railroadDiagram-O6MQD6OU-Dn3bsSRa.js} +2 -2
  47. package/dist/{requirementDiagram-BXWQKSXE-DtBOf52-.js → requirementDiagram-BXWQKSXE-wcOmQQCL.js} +1 -1
  48. package/dist/{reveal-component-5M3a2rpj.js → reveal-component-Bg8rP_Uo.js} +17 -17
  49. package/dist/{sequenceDiagram-WJ2MYXX4-DIwF19_n.js → sequenceDiagram-WJ2MYXX4-DSh_qxoF.js} +1 -1
  50. package/dist/{spec-DZDnnlgT.js → spec-C7Fos-If.js} +1 -1
  51. package/dist/{stateDiagram-D77RDMKH-sWk1AdYL.js → stateDiagram-D77RDMKH-DH_H8NMH.js} +2 -2
  52. package/dist/{stateDiagram-v2-MP3YSRHH-CiNo-OI7.js → stateDiagram-v2-MP3YSRHH-D_JM7MEK.js} +2 -2
  53. package/dist/style.css +1 -1
  54. package/dist/{swimlanes-42K2YHIH-Bj3hiOY5.js → swimlanes-42K2YHIH-CfoTJO-9.js} +1 -1
  55. package/dist/{swimlanesDiagram-VR7AAH4N-BzEo2r_N.js → swimlanesDiagram-VR7AAH4N-Z_QhvK0G.js} +2 -2
  56. package/dist/{swiper-component-BkCm-kLg.js → swiper-component-D2geL1Ku.js} +1 -1
  57. package/dist/{timeline-definition-24CTP7MA-CrPQk42H.js → timeline-definition-24CTP7MA-BFtdScaL.js} +1 -1
  58. package/dist/{toDate-Cu2pIZcC.js → toDate-CQAFSwos.js} +24 -24
  59. package/dist/{useAsyncData-DEhLdRIu.js → useAsyncData-BeyZyjso.js} +1 -1
  60. package/dist/{useDeepCompareMemoize-RjZGVhBV.js → useDeepCompareMemoize-DOQgae0W.js} +1 -1
  61. package/dist/{useIframeCapabilities-CSdWn6NP.js → useIframeCapabilities-DNvaj9wM.js} +1 -1
  62. package/dist/{useLifecycle-DtcB2s1z.js → useLifecycle-n2lnCFS8.js} +1 -1
  63. package/dist/{useTheme-CoEtr4mK.js → useTheme-CY777LXN.js} +303 -99
  64. package/dist/{vega-component-BhjTrP9-.js → vega-component-0nQzA-I8.js} +6 -6
  65. package/dist/{vennDiagram-4TSXK5OY-BaYMoIpj.js → vennDiagram-4TSXK5OY-BXY8IGCA.js} +1 -1
  66. package/dist/{wardleyDiagram-VM6X3IG4-DjHeuj8p.js → wardleyDiagram-VM6X3IG4-D0tFe6eC.js} +1 -1
  67. package/dist/{xychartDiagram-S5SC5T6Z-Bc_hcuXS.js → xychartDiagram-S5SC5T6Z-Dx8wFM-y.js} +1 -1
  68. package/package.json +1 -1
  69. package/src/__mocks__/notebook.ts +0 -1
  70. package/src/__mocks__/partial.ts +26 -0
  71. package/src/__tests__/main.test.tsx +24 -1
  72. package/src/components/app-config/app-config-form.tsx +5 -9
  73. package/src/components/editor/__tests__/data-attributes.test.tsx +0 -1
  74. package/src/components/editor/__tests__/output-persistence.test.tsx +0 -1
  75. package/src/components/editor/actions/useCellActionButton.tsx +6 -5
  76. package/src/components/editor/actions/useConfigActions.tsx +3 -4
  77. package/src/components/editor/actions/useNotebookActions.tsx +5 -4
  78. package/src/components/editor/cell/code/cell-editor.tsx +13 -6
  79. package/src/components/editor/cell/collapse.tsx +6 -1
  80. package/src/components/editor/chrome/components/feedback-button.tsx +1 -7
  81. package/src/components/editor/controls/Controls.tsx +1 -1
  82. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +8 -6
  83. package/src/components/editor/navigation/__tests__/navigation.test.ts +15 -15
  84. package/src/components/editor/navigation/__tests__/selection.test.ts +44 -21
  85. package/src/components/editor/navigation/focus-utils.ts +19 -0
  86. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +6 -13
  87. package/src/components/editor/navigation/navigation.ts +52 -43
  88. package/src/components/editor/navigation/selection.ts +30 -29
  89. package/src/components/editor/notebook-cell.tsx +10 -18
  90. package/src/components/editor/renderers/cell-array.tsx +6 -5
  91. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -1
  92. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
  93. package/src/components/pages/edit-page.tsx +0 -13
  94. package/src/components/scratchpad/scratchpad.tsx +0 -1
  95. package/src/components/slides/reveal-component.tsx +1 -1
  96. package/src/components/slides/slide-cell-view.tsx +0 -1
  97. package/src/components/sort/SortableCellsProvider.tsx +6 -5
  98. package/src/core/MarimoApp.tsx +1 -1
  99. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -37
  100. package/src/core/cells/__tests__/actions.test.ts +190 -80
  101. package/src/core/cells/__tests__/arrange.test.ts +263 -0
  102. package/src/core/cells/__tests__/cells.test.ts +11 -1101
  103. package/src/core/cells/__tests__/document.test.ts +3 -32
  104. package/src/core/cells/__tests__/editor.test.ts +57 -0
  105. package/src/core/cells/__tests__/harness.ts +82 -0
  106. package/src/core/cells/__tests__/layout.test.ts +189 -0
  107. package/src/core/cells/__tests__/notebook-outline.test.ts +7 -1
  108. package/src/core/cells/__tests__/session.test.ts +329 -174
  109. package/src/core/cells/__tests__/utils.test.ts +0 -1
  110. package/src/core/cells/actions.ts +247 -82
  111. package/src/core/cells/arrange.ts +341 -0
  112. package/src/core/cells/cells.ts +27 -516
  113. package/src/core/cells/document.ts +6 -5
  114. package/src/core/cells/edit.ts +30 -0
  115. package/src/core/cells/editor.ts +82 -0
  116. package/src/core/cells/layout.ts +152 -0
  117. package/src/core/cells/session.ts +75 -52
  118. package/src/core/cells/types.ts +0 -5
  119. package/src/core/cells/utils.ts +6 -4
  120. package/src/core/config/__tests__/app-config.test.ts +64 -0
  121. package/src/core/config/__tests__/config-schema.test.ts +1 -1
  122. package/src/core/config/config-schema.ts +6 -2
  123. package/src/core/config/config.ts +26 -12
  124. package/src/core/islands/bootstrap.ts +0 -1
  125. package/src/core/kernel/handlers.ts +1 -13
  126. package/src/core/meta/__tests__/code-visibility.test.tsx +78 -70
  127. package/src/core/meta/code-visibility.ts +18 -9
  128. package/src/core/notebook/__tests__/operations.test.ts +51 -0
  129. package/src/core/notebook/document/__tests__/codemirror.test.ts +15 -0
  130. package/src/core/notebook/index.ts +2 -1
  131. package/src/core/notebook/operations.ts +30 -0
  132. package/src/core/saving/__tests__/state.test.ts +111 -0
  133. package/src/core/saving/save-component.tsx +19 -33
  134. package/src/core/saving/state.ts +38 -39
  135. package/src/core/saving/useAutoSave.ts +8 -35
  136. package/src/core/session/__tests__/backend.test.ts +1 -0
  137. package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +1 -0
  138. package/src/core/session/active-notebook.ts +11 -0
  139. package/src/core/session/backend.ts +17 -19
  140. package/src/core/session/embedded.ts +7 -0
  141. package/src/core/session/useNotebookReplica.ts +3 -1
  142. package/src/core/session/useNotebookSession.tsx +7 -8
  143. package/src/core/transports/__tests__/static.test.ts +139 -8
  144. package/src/core/transports/static.ts +98 -16
  145. package/src/core/wasm/__tests__/bridge.test.ts +1 -0
  146. package/src/mount.tsx +19 -10
  147. package/src/stories/cell.stories.tsx +0 -2
  148. package/src/stories/layout/vertical/one-column.stories.tsx +0 -2
  149. package/src/utils/__tests__/id-tree.test.ts +20 -1548
  150. package/src/utils/id-tree.tsx +12 -537
  151. package/dist/assets/__vite-browser-external-C8gQho07.js +0 -1
  152. package/dist/feedback-button-MpeoIn1D.js +0 -379
  153. package/src/components/editor/navigation/__tests__/state.test.ts +0 -81
  154. package/src/components/editor/navigation/state.ts +0 -65
@@ -0,0 +1,374 @@
1
+ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
+ import { h as t, t as n } from "./button-BQRdqQi1.js";
3
+ import { t as r } from "./react-sHtZdjeP.js";
4
+ import { t as i } from "./compiler-runtime-CldRdSsv.js";
5
+ import { t as a } from "./copy-icon-De584pZ4.js";
6
+ import { G as o, Lt as s, Ot as c, V as l, i as u, ln as d, n as f, q as p, zt as m } from "./error-entries-CYGwr5-O.js";
7
+ import { b as h } from "./select-2KOiReNY.js";
8
+ import { n as ee, t as te } from "./globals-Dr0MRANu.js";
9
+ import { t as g } from "./jsx-runtime-3BD1kT0s.js";
10
+ import { M as _, i as v, y as ne } from "./useTheme-CY777LXN.js";
11
+ import { a as re, i as ie, n as ae, r as oe } from "./dialog-DVRfQuhD.js";
12
+ import { t as se } from "./useAsyncData-BeyZyjso.js";
13
+ import { t as ce } from "./code-visibility-BTVimCUw.js";
14
+ //#region src/components/ui/skeleton.tsx
15
+ var y = /* @__PURE__ */ e(r(), 1), b = i(), x = g(), le = (e) => {
16
+ let n = (0, b.c)(8), r, i;
17
+ n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
18
+ let a;
19
+ n[3] === r ? a = n[4] : (a = t("animate-pulse rounded-md bg-muted", r), n[3] = r, n[4] = a);
20
+ let o;
21
+ return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ (0, x.jsx)("div", {
22
+ className: a,
23
+ ...i
24
+ }), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
25
+ };
26
+ //#endregion
27
+ //#region src/core/diagnostics/issue-details.ts
28
+ function ue(e, t) {
29
+ return {
30
+ ...e,
31
+ Binaries: {
32
+ ...e.Binaries,
33
+ Browser: t
34
+ }
35
+ };
36
+ }
37
+ function de(e, t, n, r) {
38
+ return {
39
+ marimo: e,
40
+ Locale: n || void 0,
41
+ Binaries: { Browser: t },
42
+ "Environment Collection Error": r
43
+ };
44
+ }
45
+ function S(e, t) {
46
+ let n = Math.max(2, ...Array.from(t.matchAll(/`+/g), (e) => e[0].length)), r = "`".repeat(n + 1);
47
+ return `${r}${e}\n${t}\n${r}`;
48
+ }
49
+ function fe(e, t) {
50
+ let n = e.includes("?") ? "&" : "?", r = [], i = e, a = 0;
51
+ for (let [e, o] of Object.entries(t)) {
52
+ if (o.length === 0) continue;
53
+ let t = `${e}=${encodeURIComponent(o)}`, s = `${i}${a === 0 ? n : "&"}${t}`;
54
+ if (s.length > 6e3) {
55
+ r.push(e);
56
+ continue;
57
+ }
58
+ i = s, a += 1;
59
+ }
60
+ return {
61
+ url: i,
62
+ omitted: r
63
+ };
64
+ }
65
+ function C(e, t) {
66
+ return [
67
+ "<details>",
68
+ `<summary>${h.htmlEscape(e) ?? ""}</summary>`,
69
+ "",
70
+ t,
71
+ "",
72
+ "</details>"
73
+ ].join("\n");
74
+ }
75
+ function pe(e) {
76
+ return C("Environment", S("json", JSON.stringify(e, null, 2)));
77
+ }
78
+ function me(e) {
79
+ return C("Errors", S("text", e.map(f).join("\n\n---\n\n")));
80
+ }
81
+ function he(e) {
82
+ return C("Code", S("python", e));
83
+ }
84
+ //#endregion
85
+ //#region src/hooks/useLocalStorage.ts
86
+ function ge(e, t) {
87
+ let n = (0, b.c)(11), r;
88
+ n[0] === t ? r = n[1] : (r = new s(t), n[0] = t, n[1] = r);
89
+ let i = r, a;
90
+ n[2] !== e || n[3] !== i ? (a = () => i.get(e), n[2] = e, n[3] = i, n[4] = a) : a = n[4];
91
+ let [o, c] = (0, y.useState)(a), l;
92
+ n[5] !== e || n[6] !== i ? (l = (t) => {
93
+ c(t), i.set(e, t);
94
+ }, n[5] = e, n[6] = i, n[7] = l) : l = n[7];
95
+ let u = l, d;
96
+ return n[8] !== u || n[9] !== o ? (d = [o, u], n[8] = u, n[9] = o, n[10] = d) : d = n[10], d;
97
+ }
98
+ var _e = (e) => {
99
+ let r = (0, b.c)(16), { content: i } = e, [a, o] = (0, y.useState)(!1), s = !a && "max-h-24 overflow-hidden", c;
100
+ r[0] === s ? c = r[1] : (c = t("text-xs bg-muted rounded p-2 overflow-x-auto whitespace-pre-wrap", s), r[0] = s, r[1] = c);
101
+ let l;
102
+ r[2] !== i || r[3] !== c ? (l = /* @__PURE__ */ (0, x.jsx)("pre", {
103
+ className: c,
104
+ children: i
105
+ }), r[2] = i, r[3] = c, r[4] = l) : l = r[4];
106
+ let u;
107
+ r[5] === a ? u = r[6] : (u = !a && /* @__PURE__ */ (0, x.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-10 rounded-b bg-gradient-to-b from-transparent to-muted" }), r[5] = a, r[6] = u);
108
+ let d;
109
+ r[7] !== l || r[8] !== u ? (d = /* @__PURE__ */ (0, x.jsxs)("div", {
110
+ className: "relative",
111
+ children: [l, u]
112
+ }), r[7] = l, r[8] = u, r[9] = d) : d = r[9];
113
+ let f;
114
+ r[10] === Symbol.for("react.memo_cache_sentinel") ? (f = () => o(T), r[10] = f) : f = r[10];
115
+ let p = a ? "Show less" : "Show more", m;
116
+ r[11] === p ? m = r[12] : (m = /* @__PURE__ */ (0, x.jsx)(n, {
117
+ type: "button",
118
+ variant: "link",
119
+ size: "xs",
120
+ className: "self-start",
121
+ onClick: f,
122
+ children: p
123
+ }), r[11] = p, r[12] = m);
124
+ let h;
125
+ return r[13] !== d || r[14] !== m ? (h = /* @__PURE__ */ (0, x.jsxs)("div", {
126
+ className: "flex flex-col gap-1",
127
+ children: [d, m]
128
+ }), r[13] = d, r[14] = m, r[15] = h) : h = r[15], h;
129
+ };
130
+ function ve(e) {
131
+ if (!e.hasRequestClient) return "Notebook source is unavailable.";
132
+ if (e.filename === null) return "Save the notebook first.";
133
+ if (!e.codeAvailable) return "Notebook source is hidden in this view.";
134
+ if (e.connectionState !== p.OPEN) return "Connect the notebook to include its source.";
135
+ }
136
+ var w = () => {
137
+ let e = (0, b.c)(56), t = _(c), r, i;
138
+ e[0] === t ? (r = e[1], i = e[2]) : (r = async () => {
139
+ if (t != null) return t.getEnvironmentInfo();
140
+ }, i = [t], e[0] = t, e[1] = r, e[2] = i);
141
+ let s = se(r, i), p = u(ne), h = ce(), g = _(m), y = _(o), S = t != null, C;
142
+ e[3] !== h || e[4] !== y.state || e[5] !== g || e[6] !== S ? (C = ve({
143
+ hasRequestClient: S,
144
+ filename: g,
145
+ codeAvailable: h,
146
+ connectionState: y.state
147
+ }), e[3] = h, e[4] = y.state, e[5] = g, e[6] = S, e[7] = C) : C = e[7];
148
+ let w = C, T = w === void 0, [E, D] = ge("marimo:issue-report:include-errors", !1), [O, k] = ge("marimo:issue-report:include-code", !1), A = s.data ? ue(s.data, navigator.userAgent) : s.status === "error" || t == null ? de(te(), navigator.userAgent, navigator.language, "Server environment information unavailable") : void 0, j, M;
149
+ e[8] !== O || e[9] !== T || e[10] !== t ? (j = async () => {
150
+ if (!O || !T || t == null) return;
151
+ let { contents: e } = await t.readCode();
152
+ return e;
153
+ }, M = [
154
+ O,
155
+ T,
156
+ t
157
+ ], e[8] = O, e[9] = T, e[10] = t, e[11] = j, e[12] = M) : (j = e[11], M = e[12]);
158
+ let N = se(j, M), be = v.bugReportUrl, xe = [];
159
+ if (A) {
160
+ let e = { env: pe(A) };
161
+ E && p.length > 0 && (e["bug-description"] = me(p)), O && N.data && (e["reproduction-code"] = he(N.data)), {url: be, omitted: xe} = fe(v.bugReportUrl, e);
162
+ }
163
+ let Se = xe.map(ye).join(", "), P;
164
+ e[13] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ (0, x.jsxs)(ie, { children: [/* @__PURE__ */ (0, x.jsx)(re, { children: "Report an issue" }), /* @__PURE__ */ (0, x.jsx)(oe, { children: "Open a GitHub bug report prefilled with your environment, and optionally your current errors and notebook code. Nothing is uploaded automatically; review the details before posting." })] }), e[13] = P) : P = e[13];
165
+ let F;
166
+ e[14] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ (0, x.jsx)(d, { className: "w-4 h-4 mr-2" }), e[14] = F) : F = e[14];
167
+ let I = p.length === 0, L;
168
+ e[15] === D ? L = e[16] : (L = (e) => D(e === !0), e[15] = D, e[16] = L);
169
+ let R;
170
+ e[17] !== E || e[18] !== I || e[19] !== L ? (R = /* @__PURE__ */ (0, x.jsx)(l, {
171
+ id: "issue-include-errors",
172
+ checked: E,
173
+ disabled: I,
174
+ onCheckedChange: L,
175
+ "aria-label": "Include errors"
176
+ }), e[17] = E, e[18] = I, e[19] = L, e[20] = R) : R = e[20];
177
+ let z;
178
+ e[21] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ (0, x.jsx)("label", {
179
+ htmlFor: "issue-include-errors",
180
+ children: "Include errors"
181
+ }), e[21] = z) : z = e[21];
182
+ let B;
183
+ e[22] === R ? B = e[23] : (B = /* @__PURE__ */ (0, x.jsxs)("div", {
184
+ className: "flex items-center gap-2 text-sm",
185
+ children: [R, z]
186
+ }), e[22] = R, e[23] = B);
187
+ let Ce = !T, V;
188
+ e[24] === k ? V = e[25] : (V = (e) => k(e === !0), e[24] = k, e[25] = V);
189
+ let H;
190
+ e[26] !== O || e[27] !== Ce || e[28] !== V ? (H = /* @__PURE__ */ (0, x.jsx)(l, {
191
+ id: "issue-include-code",
192
+ checked: O,
193
+ disabled: Ce,
194
+ onCheckedChange: V,
195
+ "aria-label": "Include notebook code"
196
+ }), e[26] = O, e[27] = Ce, e[28] = V, e[29] = H) : H = e[29];
197
+ let U;
198
+ e[30] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ (0, x.jsx)("label", {
199
+ htmlFor: "issue-include-code",
200
+ children: "Include notebook code"
201
+ }), e[30] = U) : U = e[30];
202
+ let W;
203
+ e[31] === H ? W = e[32] : (W = /* @__PURE__ */ (0, x.jsxs)("div", {
204
+ className: "flex items-center gap-2 text-sm",
205
+ children: [H, U]
206
+ }), e[31] = H, e[32] = W);
207
+ let G;
208
+ e[33] === w ? G = e[34] : (G = w && /* @__PURE__ */ (0, x.jsx)("span", {
209
+ className: "text-xs text-muted-foreground ml-6",
210
+ children: w
211
+ }), e[33] = w, e[34] = G);
212
+ let K;
213
+ e[35] !== N || e[36] !== O ? (K = O && N.status === "error" && /* @__PURE__ */ (0, x.jsx)("span", {
214
+ className: "text-xs text-(--red-11) ml-6",
215
+ children: "Notebook source could not be loaded."
216
+ }), e[35] = N, e[36] = O, e[37] = K) : K = e[37];
217
+ let q;
218
+ e[38] !== W || e[39] !== G || e[40] !== K ? (q = /* @__PURE__ */ (0, x.jsxs)("div", {
219
+ className: "flex flex-col gap-1",
220
+ children: [
221
+ W,
222
+ G,
223
+ K
224
+ ]
225
+ }), e[38] = W, e[39] = G, e[40] = K, e[41] = q) : q = e[41];
226
+ let J;
227
+ e[42] !== B || e[43] !== q ? (J = /* @__PURE__ */ (0, x.jsxs)("div", {
228
+ className: "flex flex-col gap-2",
229
+ children: [B, q]
230
+ }), e[42] = B, e[43] = q, e[44] = J) : J = e[44];
231
+ let Y;
232
+ e[45] !== s.status || e[46] !== t ? (Y = s.status === "pending" && t != null && /* @__PURE__ */ (0, x.jsxs)("div", {
233
+ className: "flex flex-col gap-2",
234
+ children: [
235
+ /* @__PURE__ */ (0, x.jsx)("span", {
236
+ className: "text-sm text-muted-foreground",
237
+ children: "Loading environment details…"
238
+ }),
239
+ /* @__PURE__ */ (0, x.jsx)(le, { className: "h-4 w-full" }),
240
+ /* @__PURE__ */ (0, x.jsx)(le, { className: "h-4 w-3/4" }),
241
+ /* @__PURE__ */ (0, x.jsx)(le, { className: "h-4 w-1/2" })
242
+ ]
243
+ }), e[45] = s.status, e[46] = t, e[47] = Y) : Y = e[47];
244
+ let X;
245
+ e[48] !== s || e[49] !== t ? (X = (s.status === "error" || t == null) && /* @__PURE__ */ (0, x.jsxs)("div", {
246
+ className: "flex items-center gap-2 text-sm",
247
+ children: [
248
+ /* @__PURE__ */ (0, x.jsx)(ee, { className: "w-4 h-4 text-(--yellow-11) shrink-0" }),
249
+ /* @__PURE__ */ (0, x.jsx)("span", { children: "Server environment information unavailable" }),
250
+ t != null && /* @__PURE__ */ (0, x.jsx)(n, {
251
+ type: "button",
252
+ variant: "link",
253
+ size: "xs",
254
+ onClick: () => s.refetch(),
255
+ children: "Retry"
256
+ })
257
+ ]
258
+ }), e[48] = s, e[49] = t, e[50] = X) : X = e[50];
259
+ let Z;
260
+ e[51] !== A || e[52] !== p ? (Z = A && p.length === 0 && /* @__PURE__ */ (0, x.jsx)("span", {
261
+ className: "text-sm text-muted-foreground",
262
+ children: "No errors detected."
263
+ }), e[51] = A, e[52] = p, e[53] = Z) : Z = e[53];
264
+ let Q;
265
+ e[54] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ (0, x.jsx)("a", {
266
+ href: v.feedbackForm,
267
+ target: "_blank",
268
+ rel: "noreferrer",
269
+ className: "underline",
270
+ children: "two-minute survey"
271
+ }), e[54] = Q) : Q = e[54];
272
+ let $;
273
+ return e[55] === Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ (0, x.jsx)("div", {
274
+ className: "border-t pt-3",
275
+ children: /* @__PURE__ */ (0, x.jsxs)("p", {
276
+ className: "text-sm text-muted-foreground",
277
+ children: [
278
+ "Other feedback? Take our",
279
+ " ",
280
+ Q,
281
+ " ",
282
+ "or chat with us on",
283
+ " ",
284
+ /* @__PURE__ */ (0, x.jsx)("a", {
285
+ href: v.discordLink,
286
+ target: "_blank",
287
+ rel: "noreferrer",
288
+ className: "underline",
289
+ children: "Discord"
290
+ }),
291
+ "."
292
+ ]
293
+ })
294
+ }), e[55] = $) : $ = e[55], /* @__PURE__ */ (0, x.jsxs)(ae, {
295
+ className: "w-[540px] max-w-[90vw]",
296
+ children: [P, /* @__PURE__ */ (0, x.jsxs)("div", {
297
+ className: "flex flex-col gap-4 max-h-[60vh] overflow-y-auto",
298
+ children: [
299
+ /* @__PURE__ */ (0, x.jsxs)("div", {
300
+ className: "flex flex-col gap-3",
301
+ children: [
302
+ /* @__PURE__ */ (0, x.jsx)(n, {
303
+ type: "button",
304
+ variant: "default",
305
+ size: "xs",
306
+ asChild: !0,
307
+ className: "self-start",
308
+ children: /* @__PURE__ */ (0, x.jsxs)("a", {
309
+ href: be,
310
+ target: "_blank",
311
+ rel: "noreferrer",
312
+ children: [F, "Open GitHub issue"]
313
+ })
314
+ }),
315
+ J,
316
+ Se ? /* @__PURE__ */ (0, x.jsxs)("div", {
317
+ className: "flex items-start gap-2 text-xs text-(--yellow-11)",
318
+ children: [/* @__PURE__ */ (0, x.jsx)(ee, { className: "w-3.5 h-3.5 shrink-0 mt-0.5" }), /* @__PURE__ */ (0, x.jsxs)("span", { children: [
319
+ "Too large to prefill and left out of the link: ",
320
+ Se,
321
+ ". Paste them into the issue manually."
322
+ ] })]
323
+ }) : /* @__PURE__ */ (0, x.jsx)("p", {
324
+ className: "text-xs text-muted-foreground",
325
+ children: "Your environment is always included."
326
+ })
327
+ ]
328
+ }),
329
+ Y,
330
+ X,
331
+ A && /* @__PURE__ */ (0, x.jsxs)("div", {
332
+ className: "flex flex-col gap-1",
333
+ children: [/* @__PURE__ */ (0, x.jsxs)("div", {
334
+ className: "flex items-center justify-between",
335
+ children: [/* @__PURE__ */ (0, x.jsx)("span", {
336
+ className: "text-sm font-medium",
337
+ children: "Environment details"
338
+ }), /* @__PURE__ */ (0, x.jsx)(a, {
339
+ className: "w-3.5 h-3.5",
340
+ value: JSON.stringify(A, null, 2),
341
+ ariaLabel: "Copy environment JSON",
342
+ toastTitle: "Environment details copied"
343
+ })]
344
+ }), /* @__PURE__ */ (0, x.jsx)(_e, { content: JSON.stringify(A, null, 2) })]
345
+ }),
346
+ A && p.length > 0 && /* @__PURE__ */ (0, x.jsxs)("div", {
347
+ className: "flex flex-col gap-1",
348
+ children: [/* @__PURE__ */ (0, x.jsxs)("div", {
349
+ className: "flex items-center justify-between",
350
+ children: [/* @__PURE__ */ (0, x.jsx)("span", {
351
+ className: "text-sm font-medium",
352
+ children: "Errors"
353
+ }), /* @__PURE__ */ (0, x.jsx)(a, {
354
+ className: "w-3.5 h-3.5",
355
+ value: me(p),
356
+ ariaLabel: "Copy errors",
357
+ toastTitle: "Errors copied"
358
+ })]
359
+ }), /* @__PURE__ */ (0, x.jsx)(_e, { content: p.map(f).join("\n\n---\n\n") })]
360
+ }),
361
+ Z,
362
+ $
363
+ ]
364
+ })]
365
+ });
366
+ };
367
+ function T(e) {
368
+ return !e;
369
+ }
370
+ function ye(e) {
371
+ return e === "bug-description" ? "errors" : e === "reproduction-code" ? "code" : e;
372
+ }
373
+ //#endregion
374
+ export { w as FeedbackModal };
@@ -8,9 +8,9 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
8
8
  import "./chunk-GVQU2GXP-Cwbt-lF0.js";
9
9
  import "./chunk-L3NEJ4N5-n-zgIVSy.js";
10
10
  import "./chunk-OSK3NFVY-DXa-Cxbn.js";
11
- import "./mermaid-DU9ZRmkG.js";
11
+ import "./mermaid-CeWG4Egr.js";
12
12
  import "./chunk-F27PBJKO-ufseIn5y.js";
13
13
  import "./chunk-XXDRQBXY-Dnl5VBqG.js";
14
14
  import "./chunk-POPQ4Y6H-hYOXbYH_.js";
15
- import { n as e } from "./chunk-SHT3W25Y-DFrEYG54.js";
15
+ import { n as e } from "./chunk-SHT3W25Y-VwnELN23.js";
16
16
  export { e as diagram };
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { h as t, r as n } from "./button-BQRdqQi1.js";
3
3
  import { t as r } from "./react-sHtZdjeP.js";
4
4
  import { t as i } from "./compiler-runtime-CldRdSsv.js";
5
- import { t as a } from "./toDate-Cu2pIZcC.js";
5
+ import { t as a } from "./toDate-CQAFSwos.js";
6
6
  import { t as o } from "./jsx-runtime-3BD1kT0s.js";
7
7
  import { i as s } from "./loader-DOVB0Syl.js";
8
8
  //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js
@@ -4,14 +4,14 @@ import { t as a } from "./react-sHtZdjeP.js";
4
4
  import { t as o } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { i as s, n as c, r as l } from "./copy-icon-De584pZ4.js";
6
6
  import { C as u, c as d, i as f, n as p, s as m, t as h, x as g } from "./select-2KOiReNY.js";
7
- import { d as _, h as v, i as y, l as b, n as x, o as S, s as C, t as w, u as T } from "./dropdown-menu-drDjxJyV.js";
7
+ import { d as _, h as v, i as y, l as b, n as x, o as S, s as C, t as w, u as T } from "./dropdown-menu-CeaOsjWZ.js";
8
8
  import { c as E, d as D, l as O, n as k, o as A, s as ee, t as j, u as te } from "./glide-utils-D98laidb.js";
9
- import { n as ne, t as re } from "./ErrorBoundary-Dw6uRKVk.js";
9
+ import { n as ne, t as re } from "./ErrorBoundary-BVu_xT-p.js";
10
10
  import { t as ie } from "./react-dom-DUmH0GXv.js";
11
11
  import { t as M } from "./jsx-runtime-3BD1kT0s.js";
12
12
  import { t as N } from "./label-Qvw1E97W.js";
13
13
  import { c as P } from "./toast-B5t9o6s_.js";
14
- import { A as F, n as ae } from "./useTheme-CoEtr4mK.js";
14
+ import { R as F, n as ae } from "./useTheme-CY777LXN.js";
15
15
  import { A as I, C as L, D as R, E as oe, F as se, I as ce, L as le, M as ue, N as de, O as fe, P as pe, R as me, S as he, T as z, _ as ge, a as _e, b as ve, c as ye, d as be, f as B, g as xe, h as V, i as Se, j as H, k as U, l as Ce, m as we, n as Te, o as Ee, p as De, r as W, s as Oe, t as G, u as ke, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./data-grid-types-0PJ-9N5n.js";
16
16
  //#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
17
17
  function Fe(e) {
@@ -7062,7 +7062,7 @@ function rs(e, t, n, r, i) {
7062
7062
  }
7063
7063
  //#endregion
7064
7064
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
7065
- var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-4IZymnXZ.js")), ss = 0;
7065
+ var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-DAZZkLWg.js")), ss = 0;
7066
7066
  function cs(e) {
7067
7067
  return (0, is.default)((0, as.default)((0, as.default)(e).filter((e) => e.span !== void 0).map((e) => (0, Za.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
7068
7068
  }
@@ -9293,7 +9293,7 @@ function Vs(e, t, n, r, i) {
9293
9293
  }
9294
9294
  //#endregion
9295
9295
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
9296
- var Hs = K.lazy(async () => await import("./number-overlay-editor-BoIkyh6H.js")), Us = {
9296
+ var Hs = K.lazy(async () => await import("./number-overlay-editor-DupOSYHx.js")), Us = {
9297
9297
  getAccessibilityString: (e) => e.data?.toString() ?? "",
9298
9298
  kind: W.Number,
9299
9299
  needsHover: (e) => e.hoverEffect === !0,
@@ -1,6 +1,6 @@
1
1
  import { m as e } from "./tooltip-s4zZxwKe.js";
2
- import { _ as t } from "./useTheme-CoEtr4mK.js";
3
- import { r as n } from "./code-visibility-v_7ijLtx.js";
2
+ import { y as t } from "./useTheme-CY777LXN.js";
3
+ import { r as n } from "./code-visibility-BTVimCUw.js";
4
4
  var r = e("triangle-alert", [
5
5
  ["path", {
6
6
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",