@marimo-team/islands 0.22.6-dev1 → 0.22.6-dev11
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/{chat-ui-BXYRQ5MH.js → chat-ui-B9oZ19ii.js} +1 -0
- package/dist/main.js +55 -37
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/app-config/user-config-form.tsx +25 -0
- package/src/components/editor/actions/pair-with-agent-modal.tsx +4 -1
- package/src/components/editor/cell/code/cell-editor.tsx +4 -0
- package/src/components/editor/package-alert.tsx +17 -0
- package/src/core/alerts/state.ts +1 -0
- package/src/core/codemirror/ai/resources.ts +1 -0
- package/src/core/codemirror/cm.ts +3 -1
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +40 -1
- package/src/core/codemirror/completion/accept-on-enter-atom.ts +10 -0
- package/src/core/codemirror/completion/keymap.ts +16 -9
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +4 -2
- package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +50 -0
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +73 -0
- package/src/plugins/impl/plotly/__tests__/usePlotlyLayout.test.ts +104 -6
- package/src/plugins/impl/plotly/selection.ts +35 -3
- package/src/plugins/impl/plotly/usePlotlyLayout.ts +38 -4
|
@@ -7038,6 +7038,7 @@ function resourceExtension(e18) {
|
|
|
7038
7038
|
}) }),
|
|
7039
7039
|
Prec.high(keymap.of([{
|
|
7040
7040
|
key: "Tab",
|
|
7041
|
+
preventDefault: true,
|
|
7041
7042
|
run: (e19) => acceptCompletion(e19)
|
|
7042
7043
|
}])),
|
|
7043
7044
|
contextCallbacks.of({ addAttachment: (e19) => y == null ? void 0 : y([e19]) }),
|
package/dist/main.js
CHANGED
|
@@ -37125,7 +37125,7 @@ ${E}`,
|
|
|
37125
37125
|
};
|
|
37126
37126
|
}
|
|
37127
37127
|
};
|
|
37128
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
37128
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-B9oZ19ii.js").then((e) => ({
|
|
37129
37129
|
default: e.Chatbot
|
|
37130
37130
|
}))), messageSchema = array(object({
|
|
37131
37131
|
id: string(),
|
|
@@ -57315,8 +57315,14 @@ ${c}
|
|
|
57315
57315
|
}
|
|
57316
57316
|
function hasPureLineTrace(e) {
|
|
57317
57317
|
return e ? e.some((e2) => {
|
|
57318
|
-
let r = e2
|
|
57319
|
-
return r === void 0 || LINE_CLICK_TRACE_TYPES.has(String(r)) ? isPureLineMode(
|
|
57318
|
+
let r = e2;
|
|
57319
|
+
return r.type === void 0 || LINE_CLICK_TRACE_TYPES.has(String(r.type)) ? isPureLineMode(r.mode) : false;
|
|
57320
|
+
}) : false;
|
|
57321
|
+
}
|
|
57322
|
+
function hasAreaTrace(e) {
|
|
57323
|
+
return e ? e.some((e2) => {
|
|
57324
|
+
let r = e2;
|
|
57325
|
+
return r.type !== void 0 && !LINE_CLICK_TRACE_TYPES.has(String(r.type)) ? false : typeof r.fill == "string" && r.fill !== "" && r.fill !== "none" || r.stackgroup != null;
|
|
57320
57326
|
}) : false;
|
|
57321
57327
|
}
|
|
57322
57328
|
function createDragmodeButton(e, r, c, d, f) {
|
|
@@ -57349,7 +57355,7 @@ ${c}
|
|
|
57349
57355
|
function shouldHandleClickSelection(e) {
|
|
57350
57356
|
return e.some((e2) => {
|
|
57351
57357
|
let r = getTraceSource(e2).type;
|
|
57352
|
-
return r === "bar" || r === "heatmap" || r === "histogram" || r === "waterfall" || isLinePoint(e2);
|
|
57358
|
+
return r === "bar" || r === "heatmap" || r === "histogram" || r === "waterfall" || r === "violin" || isLinePoint(e2);
|
|
57353
57359
|
});
|
|
57354
57360
|
}
|
|
57355
57361
|
function extractIndices(e) {
|
|
@@ -57414,10 +57420,22 @@ ${c}
|
|
|
57414
57420
|
...e.layout
|
|
57415
57421
|
};
|
|
57416
57422
|
}
|
|
57417
|
-
function
|
|
57418
|
-
return {
|
|
57419
|
-
|
|
57420
|
-
|
|
57423
|
+
function hasCompatibleTraces(e, r) {
|
|
57424
|
+
return e.data.length === r.data.length ? e.data.every((e2, c) => {
|
|
57425
|
+
var _a3;
|
|
57426
|
+
return (e2.type ?? "scatter") === (((_a3 = r.data[c]) == null ? void 0 : _a3.type) ?? "scatter");
|
|
57427
|
+
}) : false;
|
|
57428
|
+
}
|
|
57429
|
+
function computeLayoutOnFigureChange(e, r, c) {
|
|
57430
|
+
let d = createInitialLayout(e);
|
|
57431
|
+
return hasCompatibleTraces(r, e) ? {
|
|
57432
|
+
...d,
|
|
57433
|
+
...Objects.pick(c, PERSISTED_LAYOUT_KEYS)
|
|
57434
|
+
} : {
|
|
57435
|
+
...d,
|
|
57436
|
+
..."dragmode" in c ? {
|
|
57437
|
+
dragmode: c.dragmode
|
|
57438
|
+
} : {}
|
|
57421
57439
|
};
|
|
57422
57440
|
}
|
|
57423
57441
|
function computeOmitKeys(e, r) {
|
|
@@ -57435,40 +57453,40 @@ ${c}
|
|
|
57435
57453
|
function usePlotlyLayout(e) {
|
|
57436
57454
|
let r = (0, import_compiler_runtime$32.c)(20), { originalFigure: c, initialValue: d, isScriptLoaded: f } = e, h = f === void 0 ? true : f, _;
|
|
57437
57455
|
r[0] === c ? _ = r[1] : (_ = () => structuredClone(c), r[0] = c, r[1] = _);
|
|
57438
|
-
let [v, y] = (0, import_react.useState)(_), S;
|
|
57439
|
-
r[2] !== v || r[3] !== d ? (
|
|
57456
|
+
let [v, y] = (0, import_react.useState)(_), S = (0, import_react.useRef)(v), w;
|
|
57457
|
+
r[2] !== v || r[3] !== d ? (w = () => ({
|
|
57440
57458
|
...createInitialLayout(v),
|
|
57441
57459
|
...d
|
|
57442
|
-
}), r[2] = v, r[3] = d, r[4] =
|
|
57443
|
-
let [
|
|
57444
|
-
r[5] === c ?
|
|
57445
|
-
let e2 = structuredClone(c);
|
|
57446
|
-
y(e2),
|
|
57447
|
-
}, r[5] = c, r[6] =
|
|
57448
|
-
let
|
|
57449
|
-
r[7] !== h || r[8] !== c ? (
|
|
57460
|
+
}), r[2] = v, r[3] = d, r[4] = w) : w = r[4];
|
|
57461
|
+
let [E, O] = (0, import_react.useState)(w), M;
|
|
57462
|
+
r[5] === c ? M = r[6] : (M = () => {
|
|
57463
|
+
let e2 = structuredClone(c), r2 = S.current;
|
|
57464
|
+
S.current = e2, y(e2), O((c2) => computeLayoutOnFigureChange(e2, r2, c2));
|
|
57465
|
+
}, r[5] = c, r[6] = M);
|
|
57466
|
+
let I;
|
|
57467
|
+
r[7] !== h || r[8] !== c ? (I = [
|
|
57450
57468
|
c,
|
|
57451
57469
|
h
|
|
57452
|
-
], r[7] = h, r[8] = c, r[9] =
|
|
57453
|
-
let
|
|
57454
|
-
r[10] !== v.layout || r[11] !==
|
|
57455
|
-
|
|
57456
|
-
},
|
|
57470
|
+
], r[7] = h, r[8] = c, r[9] = I) : I = r[9], (0, import_react.useEffect)(M, I);
|
|
57471
|
+
let z = usePrevious(v) ?? v, G, q;
|
|
57472
|
+
r[10] !== v.layout || r[11] !== z.layout ? (G = () => {
|
|
57473
|
+
O((e2) => computeLayoutUpdate(v.layout, z.layout, e2));
|
|
57474
|
+
}, q = [
|
|
57457
57475
|
v.layout,
|
|
57458
|
-
|
|
57459
|
-
], r[10] = v.layout, r[11] =
|
|
57460
|
-
let
|
|
57461
|
-
r[14] === c ?
|
|
57476
|
+
z.layout
|
|
57477
|
+
], r[10] = v.layout, r[11] = z.layout, r[12] = G, r[13] = q) : (G = r[12], q = r[13]), (0, import_react.useEffect)(G, q);
|
|
57478
|
+
let Z7;
|
|
57479
|
+
r[14] === c ? Z7 = r[15] : (Z7 = () => {
|
|
57462
57480
|
let e2 = structuredClone(c);
|
|
57463
|
-
y(e2),
|
|
57464
|
-
}, r[14] = c, r[15] =
|
|
57465
|
-
let
|
|
57466
|
-
return r[16] !== v || r[17] !==
|
|
57481
|
+
y(e2), O(createInitialLayout(e2));
|
|
57482
|
+
}, r[14] = c, r[15] = Z7);
|
|
57483
|
+
let Q7 = Z7, $7;
|
|
57484
|
+
return r[16] !== v || r[17] !== Q7 || r[18] !== E ? ($7 = {
|
|
57467
57485
|
figure: v,
|
|
57468
|
-
layout:
|
|
57469
|
-
setLayout:
|
|
57470
|
-
handleReset:
|
|
57471
|
-
}, r[16] = v, r[17] =
|
|
57486
|
+
layout: E,
|
|
57487
|
+
setLayout: O,
|
|
57488
|
+
handleReset: Q7
|
|
57489
|
+
}, r[16] = v, r[17] = Q7, r[18] = E, r[19] = $7) : $7 = r[19], $7;
|
|
57472
57490
|
}
|
|
57473
57491
|
var import_compiler_runtime$31 = require_compiler_runtime(), PlotlyPlugin = class {
|
|
57474
57492
|
constructor() {
|
|
@@ -57511,7 +57529,7 @@ ${c}
|
|
|
57511
57529
|
}));
|
|
57512
57530
|
}, r[7] = w, r[8] = f, r[9] = I) : I = r[9];
|
|
57513
57531
|
let z = useEvent_default(I), G = useDeepCompareMemoize(h), q;
|
|
57514
|
-
r[10] === y.data ? q = r[11] : (q = hasPureLineTrace(y.data), r[10] = y.data, r[11] = q);
|
|
57532
|
+
r[10] === y.data ? q = r[11] : (q = hasPureLineTrace(y.data) || hasAreaTrace(y.data), r[10] = y.data, r[11] = q);
|
|
57515
57533
|
let Z7 = q, Q7, $7, e9;
|
|
57516
57534
|
if (r[12] !== G || r[13] !== M || r[14] !== z || r[15] !== Z7) {
|
|
57517
57535
|
let e2 = [
|
|
@@ -65633,7 +65651,7 @@ ${c}
|
|
|
65633
65651
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
65634
65652
|
}
|
|
65635
65653
|
}
|
|
65636
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.6-
|
|
65654
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.6-dev11"), showCodeInRunModeAtom = atom(true);
|
|
65637
65655
|
atom(null);
|
|
65638
65656
|
var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
|
|
65639
65657
|
constructor() {
|