@marimo-team/islands 0.20.5-dev0 → 0.20.5-dev4
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/main.js +90 -50
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/data-table/range-focus/__tests__/cell-selection-stats.test.tsx +14 -9
- package/src/components/data-table/range-focus/cell-selection-stats.tsx +44 -13
- package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +37 -0
- package/src/components/editor/connections/storage/__tests__/as-code.test.ts +60 -0
- package/src/components/editor/connections/storage/add-storage-form.tsx +20 -13
- package/src/components/editor/connections/storage/as-code.ts +37 -0
- package/src/components/editor/connections/storage/schemas.ts +45 -1
- package/src/components/storage/components.tsx +6 -2
package/dist/main.js
CHANGED
|
@@ -31727,10 +31727,10 @@ ${c.sqlString}
|
|
|
31727
31727
|
children: c
|
|
31728
31728
|
}), r[3] = c, r[4] = d, r[5] = f) : f = r[5], f;
|
|
31729
31729
|
};
|
|
31730
|
-
function _temp$
|
|
31730
|
+
function _temp$39(e) {
|
|
31731
31731
|
return e.source !== "iceberg";
|
|
31732
31732
|
}
|
|
31733
|
-
function _temp2$
|
|
31733
|
+
function _temp2$28(e) {
|
|
31734
31734
|
return (0, import_jsx_runtime.jsx)(SelectItem, {
|
|
31735
31735
|
value: e.name,
|
|
31736
31736
|
children: (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -31749,7 +31749,7 @@ ${c.sqlString}
|
|
|
31749
31749
|
}, e.name);
|
|
31750
31750
|
}
|
|
31751
31751
|
function _temp3$20(e) {
|
|
31752
|
-
return e = e.filter(_temp$
|
|
31752
|
+
return e = e.filter(_temp$39), e.map(_temp2$28);
|
|
31753
31753
|
}
|
|
31754
31754
|
function _temp4$11(e) {
|
|
31755
31755
|
return e === "validate" ? (0, import_jsx_runtime.jsx)(SearchCheck, {
|
|
@@ -38451,7 +38451,7 @@ ${c.sqlString}
|
|
|
38451
38451
|
});
|
|
38452
38452
|
}
|
|
38453
38453
|
}, NavMenuComponent = (e) => {
|
|
38454
|
-
let r = (0, import_compiler_runtime$147.c)(13), { items: c, orientation: d } = e, f = _temp$
|
|
38454
|
+
let r = (0, import_compiler_runtime$147.c)(13), { items: c, orientation: d } = e, f = _temp$38, _ = _temp2$27, v = _temp3$19, y;
|
|
38455
38455
|
r[0] === d ? y = r[1] : (y = (e2) => "items" in e2 ? d === "horizontal" ? (0, import_jsx_runtime.jsx)(NavigationMenu, {
|
|
38456
38456
|
orientation: "horizontal",
|
|
38457
38457
|
children: (0, import_jsx_runtime.jsx)(NavigationMenuList, {
|
|
@@ -38567,7 +38567,7 @@ ${c.sqlString}
|
|
|
38567
38567
|
}), c[13] = v, c[14] = r, c[15] = y, c[16] = w, c[17] = E, c[18] = O) : O = c[18], O;
|
|
38568
38568
|
});
|
|
38569
38569
|
ListItem.displayName = "ListItem";
|
|
38570
|
-
function _temp$
|
|
38570
|
+
function _temp$38(e, r) {
|
|
38571
38571
|
return r ? (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
38572
38572
|
delayDuration: 200,
|
|
38573
38573
|
content: renderHTML({
|
|
@@ -38576,7 +38576,7 @@ ${c.sqlString}
|
|
|
38576
38576
|
children: e
|
|
38577
38577
|
}) : e;
|
|
38578
38578
|
}
|
|
38579
|
-
function _temp2$
|
|
38579
|
+
function _temp2$27(e) {
|
|
38580
38580
|
return e.startsWith("http") ? "_blank" : "_self";
|
|
38581
38581
|
}
|
|
38582
38582
|
function _temp3$19(e) {
|
|
@@ -48470,7 +48470,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
48470
48470
|
}
|
|
48471
48471
|
var import_compiler_runtime$136 = require_compiler_runtime();
|
|
48472
48472
|
const CellLink = (e) => {
|
|
48473
|
-
let r = (0, import_compiler_runtime$136.c)(12), { className: c, cellId: d, variant: f, onClick: _, formatCellName: v, skipScroll: y } = e, S = useCellNames()[d] ?? "", w = useCellIds().inOrderIds.indexOf(d), { showCellIfHidden: E } = useCellActions(), O = v ?? _temp$
|
|
48473
|
+
let r = (0, import_compiler_runtime$136.c)(12), { className: c, cellId: d, variant: f, onClick: _, formatCellName: v, skipScroll: y } = e, S = useCellNames()[d] ?? "", w = useCellIds().inOrderIds.indexOf(d), { showCellIfHidden: E } = useCellActions(), O = v ?? _temp$37, M;
|
|
48474
48474
|
r[0] === c ? M = r[1] : (M = cn("inline-block cursor-pointer text-link hover:underline", c), r[0] = c, r[1] = M);
|
|
48475
48475
|
let I;
|
|
48476
48476
|
r[2] !== d || r[3] !== _ || r[4] !== E || r[5] !== y || r[6] !== f ? (I = (e2) => {
|
|
@@ -48521,7 +48521,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
48521
48521
|
f.classList.remove("focus-outline");
|
|
48522
48522
|
}, 2e3)), true);
|
|
48523
48523
|
}
|
|
48524
|
-
function _temp$
|
|
48524
|
+
function _temp$37(e) {
|
|
48525
48525
|
return e;
|
|
48526
48526
|
}
|
|
48527
48527
|
const showAddPackageToast = (e, r) => {
|
|
@@ -48766,8 +48766,8 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
48766
48766
|
};
|
|
48767
48767
|
const MarimoErrorOutput = (e) => {
|
|
48768
48768
|
let r = (0, import_compiler_runtime$134.c)(31), { errors: c, cellId: d, className: f } = e, _ = useChromeActions(), v = "This cell wasn't run because it has errors", y = "destructive", S = "text-error";
|
|
48769
|
-
if (c.some(_temp$
|
|
48770
|
-
else if (c.some(_temp2$
|
|
48769
|
+
if (c.some(_temp$36)) v = "Interrupted";
|
|
48770
|
+
else if (c.some(_temp2$26)) v = "An internal error occurred";
|
|
48771
48771
|
else if (c.some(_temp3$18)) v = "Ancestor prevented from running", y = "default", S = "text-secondary-foreground";
|
|
48772
48772
|
else if (c.some(_temp4$10)) v = "Ancestor stopped", y = "default", S = "text-secondary-foreground";
|
|
48773
48773
|
else if (c.some(_temp5$7)) v = "SQL error";
|
|
@@ -49133,10 +49133,10 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
49133
49133
|
]
|
|
49134
49134
|
}), r[25] = w, r[26] = M, r[27] = I, r[28] = z, r[29] = G, r[30] = q) : q = r[30], q;
|
|
49135
49135
|
};
|
|
49136
|
-
function _temp$
|
|
49136
|
+
function _temp$36(e) {
|
|
49137
49137
|
return e.type === "interruption";
|
|
49138
49138
|
}
|
|
49139
|
-
function _temp2$
|
|
49139
|
+
function _temp2$26(e) {
|
|
49140
49140
|
return e.type === "internal";
|
|
49141
49141
|
}
|
|
49142
49142
|
function _temp3$18(e) {
|
|
@@ -57164,49 +57164,89 @@ ${r}
|
|
|
57164
57164
|
var _a3;
|
|
57165
57165
|
window.getSelection && ((_a3 = window.getSelection()) == null ? void 0 : _a3.empty());
|
|
57166
57166
|
};
|
|
57167
|
-
var import_compiler_runtime$113 = require_compiler_runtime();
|
|
57167
|
+
var import_compiler_runtime$113 = require_compiler_runtime(), MAX_FRACTION_DIGITS = 3;
|
|
57168
57168
|
const CellSelectionStats = (e) => {
|
|
57169
|
-
let r = (0, import_compiler_runtime$113.c)(
|
|
57170
|
-
if (
|
|
57171
|
-
let
|
|
57172
|
-
r[0] !==
|
|
57173
|
-
let
|
|
57174
|
-
r[3] === d ?
|
|
57175
|
-
let
|
|
57176
|
-
r[5]
|
|
57177
|
-
count:
|
|
57178
|
-
|
|
57179
|
-
|
|
57180
|
-
|
|
57181
|
-
|
|
57182
|
-
|
|
57183
|
-
|
|
57184
|
-
}),
|
|
57185
|
-
|
|
57186
|
-
|
|
57187
|
-
|
|
57169
|
+
let r = (0, import_compiler_runtime$113.c)(17), { table: c, className: d } = e, { locale: f } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), _ = useAtomValue(selectedCellsAtom), v = countDataCellsInSelection(_);
|
|
57170
|
+
if (v < 2) return null;
|
|
57171
|
+
let y;
|
|
57172
|
+
r[0] !== _ || r[1] !== c ? (y = getNumericValuesFromSelectedCells(c, _), r[0] = _, r[1] = c, r[2] = y) : y = r[2];
|
|
57173
|
+
let S = y, w;
|
|
57174
|
+
r[3] === d ? w = r[4] : (w = cn("flex items-center justify-end gap-3 text-xs text-muted-foreground shrink-0", d), r[3] = d, r[4] = w);
|
|
57175
|
+
let E;
|
|
57176
|
+
r[5] !== v || r[6] !== f ? (E = (0, import_jsx_runtime.jsx)(CountStat, {
|
|
57177
|
+
count: v,
|
|
57178
|
+
locale: f
|
|
57179
|
+
}), r[5] = v, r[6] = f, r[7] = E) : E = r[7];
|
|
57180
|
+
let O, M;
|
|
57181
|
+
r[8] !== f || r[9] !== S ? (O = (0, import_jsx_runtime.jsx)(SumStat, {
|
|
57182
|
+
numericValues: S,
|
|
57183
|
+
locale: f
|
|
57184
|
+
}), M = (0, import_jsx_runtime.jsx)(AverageStat, {
|
|
57185
|
+
numericValues: S,
|
|
57186
|
+
locale: f
|
|
57187
|
+
}), r[8] = f, r[9] = S, r[10] = O, r[11] = M) : (O = r[10], M = r[11]);
|
|
57188
|
+
let I;
|
|
57189
|
+
return r[12] !== w || r[13] !== E || r[14] !== O || r[15] !== M ? (I = (0, import_jsx_runtime.jsxs)("div", {
|
|
57190
|
+
className: w,
|
|
57188
57191
|
children: [
|
|
57189
|
-
w,
|
|
57190
57192
|
E,
|
|
57191
|
-
O
|
|
57193
|
+
O,
|
|
57194
|
+
M
|
|
57192
57195
|
]
|
|
57193
|
-
}), r[
|
|
57196
|
+
}), r[12] = w, r[13] = E, r[14] = O, r[15] = M, r[16] = I) : I = r[16], I;
|
|
57194
57197
|
};
|
|
57195
|
-
var
|
|
57196
|
-
|
|
57197
|
-
|
|
57198
|
-
|
|
57199
|
-
|
|
57200
|
-
|
|
57201
|
-
|
|
57202
|
-
|
|
57203
|
-
|
|
57204
|
-
|
|
57205
|
-
|
|
57206
|
-
|
|
57207
|
-
|
|
57208
|
-
|
|
57198
|
+
var formatNumber = (e, r) => e.toLocaleString(r, {
|
|
57199
|
+
maximumFractionDigits: MAX_FRACTION_DIGITS
|
|
57200
|
+
}), StatSpan = (e) => {
|
|
57201
|
+
let r = (0, import_compiler_runtime$113.c)(6), { name: c, value: d, locale: f } = e, _;
|
|
57202
|
+
r[0] !== f || r[1] !== d ? (_ = formatNumber(d, f), r[0] = f, r[1] = d, r[2] = _) : _ = r[2];
|
|
57203
|
+
let v;
|
|
57204
|
+
return r[3] !== c || r[4] !== _ ? (v = (0, import_jsx_runtime.jsxs)("span", {
|
|
57205
|
+
children: [
|
|
57206
|
+
c,
|
|
57207
|
+
": ",
|
|
57208
|
+
_
|
|
57209
|
+
]
|
|
57210
|
+
}), r[3] = c, r[4] = _, r[5] = v) : v = r[5], v;
|
|
57211
|
+
}, CountStat = (e) => {
|
|
57212
|
+
let r = (0, import_compiler_runtime$113.c)(3), { count: c, locale: d } = e, f;
|
|
57213
|
+
return r[0] !== c || r[1] !== d ? (f = (0, import_jsx_runtime.jsx)(StatSpan, {
|
|
57214
|
+
name: "Count",
|
|
57215
|
+
value: c,
|
|
57216
|
+
locale: d
|
|
57217
|
+
}), r[0] = c, r[1] = d, r[2] = f) : f = r[2], f;
|
|
57218
|
+
}, SumStat = (e) => {
|
|
57219
|
+
let r = (0, import_compiler_runtime$113.c)(6), { numericValues: c, locale: d } = e;
|
|
57220
|
+
if (c.length === 0) return null;
|
|
57221
|
+
let f, _;
|
|
57222
|
+
if (r[0] !== c) {
|
|
57223
|
+
let e2 = c.reduce(_temp$35, 0);
|
|
57224
|
+
f = Number, _ = e2.toFixed(MAX_FRACTION_DIGITS), r[0] = c, r[1] = f, r[2] = _;
|
|
57225
|
+
} else f = r[1], _ = r[2];
|
|
57226
|
+
let v = f(_), y;
|
|
57227
|
+
return r[3] !== d || r[4] !== v ? (y = (0, import_jsx_runtime.jsx)(StatSpan, {
|
|
57228
|
+
name: "Sum",
|
|
57229
|
+
value: v,
|
|
57230
|
+
locale: d
|
|
57231
|
+
}), r[3] = d, r[4] = v, r[5] = y) : y = r[5], y;
|
|
57232
|
+
}, AverageStat = (e) => {
|
|
57233
|
+
let r = (0, import_compiler_runtime$113.c)(5), { numericValues: c, locale: d } = e;
|
|
57234
|
+
if (c.length === 0) return null;
|
|
57235
|
+
let f = c.reduce(_temp2$25, 0) / c.length, _;
|
|
57236
|
+
r[0] === f ? _ = r[1] : (_ = f.toFixed(MAX_FRACTION_DIGITS), r[0] = f, r[1] = _);
|
|
57237
|
+
let v = Number(_), y;
|
|
57238
|
+
return r[2] !== v || r[3] !== d ? (y = (0, import_jsx_runtime.jsx)(StatSpan, {
|
|
57239
|
+
name: "Average",
|
|
57240
|
+
value: v,
|
|
57241
|
+
locale: d
|
|
57242
|
+
}), r[2] = v, r[3] = d, r[4] = y) : y = r[4], y;
|
|
57209
57243
|
};
|
|
57244
|
+
function _temp$35(e, r) {
|
|
57245
|
+
return e + r;
|
|
57246
|
+
}
|
|
57247
|
+
function _temp2$25(e, r) {
|
|
57248
|
+
return e + r;
|
|
57249
|
+
}
|
|
57210
57250
|
function g(e, r) {
|
|
57211
57251
|
let c = new Set(e), d = new Set(r);
|
|
57212
57252
|
return e === r || c.size === d.size && Array.from(c).every(d.has.bind(d));
|
|
@@ -70357,7 +70397,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70357
70397
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70358
70398
|
}
|
|
70359
70399
|
}
|
|
70360
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-
|
|
70400
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-dev4"), showCodeInRunModeAtom = atom(true);
|
|
70361
70401
|
atom(null);
|
|
70362
70402
|
var import_compiler_runtime$88 = require_compiler_runtime();
|
|
70363
70403
|
function useKeydownOnElement(e, r) {
|