@marimo-team/frontend 0.19.3-dev23 → 0.19.3-dev24
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/assets/{CellStatus-DLqgbVV4.js → CellStatus-LhyAEbrG.js} +1 -1
- package/dist/assets/{JsonOutput-B64aMW9B.js → JsonOutput-CPpYokUE.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-Cva6Gfqr.js → MarimoErrorOutput-B9Mm6JqU.js} +1 -1
- package/dist/assets/{RenderHTML-Daqo9pcD.js → RenderHTML-7hZ7Tsbe.js} +1 -1
- package/dist/assets/{add-cell-with-ai-BsHIKGwv.js → add-cell-with-ai-Bcdm_FZM.js} +1 -1
- package/dist/assets/{add-database-form-hxk-QlNU.js → add-database-form-BGLAQJDO.js} +1 -1
- package/dist/assets/{agent-panel-ZJGfvLy4.js → agent-panel-CBgUvPCT.js} +1 -1
- package/dist/assets/{ai-model-dropdown-nzo8MLQ5.js → ai-model-dropdown-NoEabH3r.js} +1 -1
- package/dist/assets/{app-config-button-BeOl77GX.js → app-config-button-DrLdv2RI.js} +1 -1
- package/dist/assets/{cell-editor-c1P0x4Fj.js → cell-editor-C7_ungpT.js} +1 -1
- package/dist/assets/{cell-link-T1P92ttw.js → cell-link-BVLaXc7K.js} +1 -1
- package/dist/assets/{cells-CibeVr5R.js → cells-CxLYaBUM.js} +46 -46
- package/dist/assets/{chat-components-CVdyP1VW.js → chat-components-B3msbsyx.js} +1 -1
- package/dist/assets/{chat-display-Bbzp0CzX.js → chat-display-CMpQ7Aew.js} +1 -1
- package/dist/assets/{chat-panel-T30-embL.js → chat-panel-CkwNm7gm.js} +1 -1
- package/dist/assets/{client-CEtu-2VG.js → client-0ZjIqESP.js} +1 -1
- package/dist/assets/{column-preview-BlyFeHSu.js → column-preview-BKGov0tc.js} +1 -1
- package/dist/assets/{command-CyUURgqS.js → command-C43PzUHZ.js} +1 -1
- package/dist/assets/{command-palette-DfiEH7WH.js → command-palette-BAGVK_NB.js} +1 -1
- package/dist/assets/{common-eyGhVBMz.js → common-CtK3F5Mi.js} +1 -1
- package/dist/assets/{datasource-D4vwmOLv.js → datasource-eALmG5dT.js} +1 -1
- package/dist/assets/{dependency-graph-panel-Cr-_H1bC.js → dependency-graph-panel-CJruGOwS.js} +1 -1
- package/dist/assets/{documentation-panel-mdqxAzQf.js → documentation-panel-DN23WymL.js} +1 -1
- package/dist/assets/{download-Bd63S7ca.js → download-kb4f28me.js} +1 -1
- package/dist/assets/{edit-page-B_1t5Bc7.js → edit-page-BSBClNdX.js} +3 -3
- package/dist/assets/{error-panel-zDg8AjLO.js → error-panel-BJojKBE3.js} +1 -1
- package/dist/assets/{es-BMs8n9bF.js → es-CYXJA6lG.js} +1 -1
- package/dist/assets/{file-explorer-panel-Bvbp6xd9.js → file-explorer-panel-VcTK-b9b.js} +1 -1
- package/dist/assets/{floating-outline-DmKm2GKv.js → floating-outline-BY_abszS.js} +1 -1
- package/dist/assets/{focus-BGO2qwac.js → focus-CCFhJFiF.js} +1 -1
- package/dist/assets/{form-Cs-aYOue.js → form-CkMYJu-w.js} +1 -1
- package/dist/assets/{globals-BkITdONE.js → globals-DLZWqwk9.js} +1 -1
- package/dist/assets/{home-page-CqrJtZ_6.js → home-page-C6daJoC6.js} +1 -1
- package/dist/assets/{index-BAs_XOh8.js → index-xQusEe2z.js} +3 -3
- package/dist/assets/{kiosk-mode-Ocj2e3JE.js → kiosk-mode-CGG4X99A.js} +1 -1
- package/dist/assets/{layout-HXw-kbRR.js → layout-BNBwvnQO.js} +1 -1
- package/dist/assets/{logs-panel-C70PjyAu.js → logs-panel-DWA5DCZ_.js} +1 -1
- package/dist/assets/{markdown-renderer-D2XRRGdl.js → markdown-renderer-CKkCwEhz.js} +1 -1
- package/dist/assets/{mode-j1jRJgw_.js → mode-BI49gh_2.js} +1 -1
- package/dist/assets/{name-cell-input-XHY7Ji2w.js → name-cell-input-BV06wyVc.js} +1 -1
- package/dist/assets/{outline-panel-DmehVoPZ.js → outline-panel-CvIQq0Mk.js} +1 -1
- package/dist/assets/{packages-panel-D8Dc0jXW.js → packages-panel-BkmN8Gvg.js} +1 -1
- package/dist/assets/{panels-DOPj-FZ7.js → panels-DD70l9Ft.js} +1 -1
- package/dist/assets/{process-output-DZorMbgK.js → process-output-BWKbFYsY.js} +1 -1
- package/dist/assets/{readonly-python-code-CzWlUPo8.js → readonly-python-code-Gk9Vpov-.js} +1 -1
- package/dist/assets/{run-page-B7UH5d5F.js → run-page-CSZCLe8f.js} +1 -1
- package/dist/assets/{scratchpad-panel-BvjbLs06.js → scratchpad-panel-DngvK5mF.js} +1 -1
- package/dist/assets/{session-panel-Cg2ez0A-.js → session-panel-BF-K0A1i.js} +1 -1
- package/dist/assets/{snippets-panel-BCzTzB9R.js → snippets-panel-F_sCaPTP.js} +1 -1
- package/dist/assets/{state-Eihpi8Gd.js → state-CBLi2yPn.js} +1 -1
- package/dist/assets/{state-BxWZf58F.js → state-nMUXGW2P.js} +1 -1
- package/dist/assets/{switch-Bf7BdNuP.js → switch-CKzkriUC.js} +1 -1
- package/dist/assets/{textarea-BRmAhRr_.js → textarea-CfgJSv-G.js} +1 -1
- package/dist/assets/{tracing-1SYqHZWJ.js → tracing-nO_TeZ4X.js} +1 -1
- package/dist/assets/{tracing-panel-Bcs0pfdJ.js → tracing-panel-CTbyM5tT.js} +2 -2
- package/dist/assets/{types-Dqr8wUa4.js → types-rseSmieg.js} +1 -1
- package/dist/assets/{useAddCell-BEZy0w8u.js → useAddCell-BjCsEEJz.js} +1 -1
- package/dist/assets/{useCellActionButton-BPZZpi7i.js → useCellActionButton-DsGxAzxp.js} +1 -1
- package/dist/assets/{useDeleteCell-BIkFVvVx.js → useDeleteCell-CrEKA1bV.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-B4L5DuIf.js → useDependencyPanelTab-C3ALN7sX.js} +1 -1
- package/dist/assets/{useNotebookActions-N9jfUrVW.js → useNotebookActions-DQhWwXss.js} +1 -1
- package/dist/assets/{useRunCells-d0gYuXYQ.js → useRunCells-CQiKZU8u.js} +1 -1
- package/dist/assets/{useSplitCell-DGmYA9dE.js → useSplitCell-CSg5yFV8.js} +1 -1
- package/dist/assets/{utilities.esm-Bs_5S-OE.js → utilities.esm-N9epHEqL.js} +1 -1
- package/dist/index.html +31 -31
- package/package.json +1 -1
- package/src/components/app-config/__tests__/get-dirty-values.test.ts +1 -1
- package/src/components/app-config/user-config-form.tsx +1 -1
- package/src/components/editor/chrome/types.ts +2 -4
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +123 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +44 -4
- package/src/core/kernel/__tests__/handlers.test.ts +2 -2
- package/src/core/kernel/state.ts +1 -0
- package/src/core/network/__tests__/requests-lazy.test.ts +1 -1
- package/src/core/network/requests-lazy.ts +2 -2
- package/src/css/globals.css +2 -0
|
@@ -9,6 +9,7 @@ import { invariant } from "@/utils/invariant";
|
|
|
9
9
|
import { Logger } from "@/utils/Logger";
|
|
10
10
|
import { LRUCache } from "@/utils/lru";
|
|
11
11
|
import { Objects } from "@/utils/objects";
|
|
12
|
+
import { getPositionAtWordBounds } from "../completion/hints";
|
|
12
13
|
import { topologicalCodesAtom } from "../copilot/getCodes";
|
|
13
14
|
import {
|
|
14
15
|
getEditorCodeAsPython,
|
|
@@ -22,6 +23,14 @@ import {
|
|
|
22
23
|
} from "./types";
|
|
23
24
|
import { getLSPDocument } from "./utils";
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Check if a variable name is private (starts with underscore but not dunder).
|
|
28
|
+
* Private variables in marimo are cell-local and should not be renamed across cells.
|
|
29
|
+
*/
|
|
30
|
+
function isPrivateVariable(name: string): boolean {
|
|
31
|
+
return name.startsWith("_") && !name.startsWith("__");
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
class Snapshotter {
|
|
26
35
|
private documentVersion = 0;
|
|
27
36
|
private readonly getNotebookCode: () => {
|
|
@@ -433,15 +442,46 @@ export class NotebookLanguageServerClient implements ILanguageServerClient {
|
|
|
433
442
|
|
|
434
443
|
// Update the code in the plugins manually
|
|
435
444
|
const editors = this.getNotebookEditors();
|
|
436
|
-
|
|
437
|
-
|
|
445
|
+
|
|
446
|
+
// Check if this is a private variable rename (should only affect current cell)
|
|
447
|
+
// Private variables in marimo are cell-local and should not be renamed across cells
|
|
448
|
+
const originEditor = editors[cellId];
|
|
449
|
+
let isPrivateRename = false;
|
|
450
|
+
if (originEditor) {
|
|
451
|
+
// Convert LSP position (line, character) to CodeMirror position
|
|
452
|
+
const line = originEditor.state.doc.line(params.position.line + 1);
|
|
453
|
+
const cmPosition = line.from + params.position.character;
|
|
454
|
+
const { startToken, endToken } = getPositionAtWordBounds(
|
|
455
|
+
originEditor.state.doc,
|
|
456
|
+
cmPosition,
|
|
457
|
+
);
|
|
458
|
+
const originalName = originEditor.state.doc.sliceString(
|
|
459
|
+
startToken,
|
|
460
|
+
endToken,
|
|
461
|
+
);
|
|
462
|
+
isPrivateRename = isPrivateVariable(originalName);
|
|
463
|
+
if (isPrivateRename) {
|
|
464
|
+
Logger.debug(
|
|
465
|
+
"[lsp] Private variable rename detected, limiting to current cell",
|
|
466
|
+
originalName,
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
for (const [currentCellId, ev] of Objects.entries(editors)) {
|
|
472
|
+
// For private variable renames, only update the originating cell
|
|
473
|
+
if (isPrivateRename && currentCellId !== cellId) {
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const newCode = editsToNewCode.get(currentCellId);
|
|
438
478
|
if (newCode == null) {
|
|
439
|
-
Logger.warn("No new code for cell",
|
|
479
|
+
Logger.warn("No new code for cell", currentCellId);
|
|
440
480
|
continue;
|
|
441
481
|
}
|
|
442
482
|
|
|
443
483
|
if (!ev) {
|
|
444
|
-
Logger.warn("No view for plugin",
|
|
484
|
+
Logger.warn("No view for plugin", currentCellId);
|
|
445
485
|
continue;
|
|
446
486
|
}
|
|
447
487
|
|
package/src/core/kernel/state.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { NoKernelConnectedError } from "@/utils/errors";
|
|
4
4
|
import { Logger } from "@/utils/Logger";
|
|
@@ -152,7 +152,7 @@ export function createLazyRequests(
|
|
|
152
152
|
`Dropping request: ${key}, since not connected to a kernel.`,
|
|
153
153
|
);
|
|
154
154
|
// Silently drop the request
|
|
155
|
-
return
|
|
155
|
+
return;
|
|
156
156
|
|
|
157
157
|
case "throwError":
|
|
158
158
|
throw new NoKernelConnectedError();
|
package/src/css/globals.css
CHANGED
|
@@ -184,8 +184,10 @@
|
|
|
184
184
|
--shadow-2xl-solid: 10px 12px 0px 0px var(--base-shadow-darker), 0 0px 8px 0px hsl(0deg 0% 90% / 50%);
|
|
185
185
|
|
|
186
186
|
/* Solid shadows with lighter shade color */
|
|
187
|
+
|
|
187
188
|
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
188
189
|
--shadow-sm-solid-shade: 2px 2px 0px 0px var(--base-shadow), 0px 0px 2px 0px hsl(0deg 0% 50% / 20%);
|
|
190
|
+
|
|
189
191
|
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
190
192
|
--shadow-md-solid-shade: 4px 4px 0px 0px var(--base-shadow), 0 0px 2px 0px hsl(0deg 0% 60% / 50%);
|
|
191
193
|
}
|