@marimo-team/islands 0.23.10-dev2 → 0.23.10-dev20
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/{ConnectedDataExplorerComponent-CyV83R2m.js → ConnectedDataExplorerComponent-DdeG-Hi-.js} +23 -23
- package/dist/{any-language-editor-DfdpyDv_.js → any-language-editor-CiES2a2h.js} +2 -2
- package/dist/{chat-ui-ar37brtL.js → chat-ui-BTobdMRF.js} +61 -61
- package/dist/{code-visibility-B88v1No3.js → code-visibility-51MFr9ZL.js} +1212 -1046
- package/dist/{copy-BuQpJEzp.js → copy-5jQ_kGE1.js} +32 -32
- package/dist/{esm-BfhQmZjp.js → esm-CCuYCd3R.js} +1 -1
- package/dist/{extends-BgdxCfYu.js → extends-CkydH1Q5.js} +1 -1
- package/dist/{glide-data-editor-BOmK9ETQ.js → glide-data-editor-CRvL2R9l.js} +7 -7
- package/dist/{html-to-image-Cp8O1OWB.js → html-to-image-CjsdUYrb.js} +2258 -2238
- package/dist/{input-_2sjvfne.js → input-DVkbXbIX.js} +183 -181
- package/dist/main.js +1564 -1362
- package/dist/{process-output-CaUUWhh8.js → process-output-CI8a-CUx.js} +2 -2
- package/dist/{reveal-component-CfFoUPFg.js → reveal-component-ZPJ8w6yK.js} +5 -5
- package/dist/{spec-B96zNUEA.js → spec-DMRQmLOc.js} +2 -2
- package/dist/{strings-Bu3vlb6W.js → strings-GCJA9n6d.js} +25 -24
- package/dist/style.css +1 -1
- package/dist/{useDateFormatter-BA4FCquG.js → useDateFormatter-BRcO_TGJ.js} +1 -1
- package/package.json +2 -2
- package/src/components/data-table/__tests__/data-table.test.tsx +154 -12
- package/src/components/data-table/hover-tooltip/__tests__/content.test.ts +60 -0
- package/src/components/data-table/hover-tooltip/content.ts +44 -0
- package/src/components/data-table/hover-tooltip/hover-tooltip.tsx +55 -0
- package/src/components/data-table/hover-tooltip/use-table-hover-tooltip.ts +159 -0
- package/src/components/data-table/renderers.tsx +27 -43
- package/src/components/datasources/__tests__/filter-empty.test.ts +183 -0
- package/src/components/datasources/datasources.tsx +92 -3
- package/src/components/editor/cell/cell-context-menu.tsx +15 -2
- package/src/components/editor/documentation.css +16 -0
- package/src/components/editor/file-tree/file-explorer.tsx +8 -18
- package/src/components/editor/file-tree/tree-actions.tsx +46 -1
- package/src/components/slides/__tests__/minimap-actions.test.tsx +166 -0
- package/src/components/slides/minimap.tsx +127 -10
- package/src/components/storage/__tests__/storage-inspector.test.ts +53 -0
- package/src/components/storage/storage-inspector.tsx +68 -48
- package/src/components/ui/__tests__/use-toast.test.ts +75 -0
- package/src/components/ui/use-toast.ts +33 -13
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -28
- package/src/core/cells/__tests__/cell.test.ts +29 -2
- package/src/core/cells/cell.ts +5 -1
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +37 -0
- package/src/core/codemirror/go-to-definition/commands.ts +17 -9
- package/src/core/codemirror/go-to-definition/utils.ts +1 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +3 -1
- package/src/core/datasets/data-source-connections.ts +2 -0
- package/src/core/network/__tests__/requests-static.test.ts +30 -0
- package/src/core/network/requests-static.ts +14 -10
- package/src/plugins/layout/DownloadPlugin.tsx +1 -1
|
@@ -8,61 +8,61 @@ var TOAST_LIMIT = 1, TOAST_REMOVE_DELAY = 1e4, count = 0;
|
|
|
8
8
|
function genId() {
|
|
9
9
|
return count = (count + 1) % Number.MAX_VALUE, count.toString();
|
|
10
10
|
}
|
|
11
|
-
var toastTimeouts = /* @__PURE__ */ new Map(), addToRemoveQueue = (e) => {
|
|
11
|
+
var toastTimeouts = /* @__PURE__ */ new Map(), shownOnceKeys = /* @__PURE__ */ new Set(), addToRemoveQueue = (e) => {
|
|
12
12
|
if (toastTimeouts.has(e)) return;
|
|
13
|
-
let
|
|
13
|
+
let d = setTimeout(() => {
|
|
14
14
|
toastTimeouts.delete(e), dispatch({
|
|
15
15
|
type: "REMOVE_TOAST",
|
|
16
16
|
toastId: e
|
|
17
17
|
});
|
|
18
18
|
}, TOAST_REMOVE_DELAY);
|
|
19
|
-
toastTimeouts.set(e,
|
|
19
|
+
toastTimeouts.set(e, d);
|
|
20
20
|
};
|
|
21
|
-
const reducer = (e,
|
|
22
|
-
switch (
|
|
21
|
+
const reducer = (e, d) => {
|
|
22
|
+
switch (d.type) {
|
|
23
23
|
case "ADD_TOAST":
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
|
-
toasts: [
|
|
26
|
+
toasts: [d.toast, ...e.toasts].slice(0, TOAST_LIMIT)
|
|
27
27
|
};
|
|
28
28
|
case "UPDATE_TOAST":
|
|
29
29
|
return {
|
|
30
30
|
...e,
|
|
31
|
-
toasts: e.toasts.map((e2) => e2.id ===
|
|
31
|
+
toasts: e.toasts.map((e2) => e2.id === d.toast.id ? {
|
|
32
32
|
...e2,
|
|
33
|
-
...
|
|
33
|
+
...d.toast
|
|
34
34
|
} : e2)
|
|
35
35
|
};
|
|
36
36
|
case "DISMISS_TOAST": {
|
|
37
|
-
let { toastId:
|
|
38
|
-
return
|
|
37
|
+
let { toastId: f } = d;
|
|
38
|
+
return f ? addToRemoveQueue(f) : e.toasts.forEach((e2) => {
|
|
39
39
|
addToRemoveQueue(e2.id);
|
|
40
40
|
}), {
|
|
41
41
|
...e,
|
|
42
|
-
toasts: e.toasts.map((e2) => e2.id ===
|
|
42
|
+
toasts: e.toasts.map((e2) => e2.id === f || f === void 0 ? {
|
|
43
43
|
...e2,
|
|
44
44
|
open: false
|
|
45
45
|
} : e2)
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
case "REMOVE_TOAST":
|
|
49
|
-
return
|
|
49
|
+
return d.toastId === void 0 ? {
|
|
50
50
|
...e,
|
|
51
51
|
toasts: []
|
|
52
52
|
} : {
|
|
53
53
|
...e,
|
|
54
|
-
toasts: e.toasts.filter((e2) => e2.id !==
|
|
54
|
+
toasts: e.toasts.filter((e2) => e2.id !== d.toastId)
|
|
55
55
|
};
|
|
56
56
|
case "UPSERT_TOAST":
|
|
57
|
-
return e.toasts.findIndex((e2) => e2.id ===
|
|
57
|
+
return e.toasts.findIndex((e2) => e2.id === d.toast.id) > -1 ? {
|
|
58
58
|
...e,
|
|
59
|
-
toasts: e.toasts.map((e2) => e2.id ===
|
|
59
|
+
toasts: e.toasts.map((e2) => e2.id === d.toast.id ? {
|
|
60
60
|
...e2,
|
|
61
|
-
...
|
|
61
|
+
...d.toast
|
|
62
62
|
} : e2)
|
|
63
63
|
} : {
|
|
64
64
|
...e,
|
|
65
|
-
toasts: [
|
|
65
|
+
toasts: [d.toast, ...e.toasts].slice(0, TOAST_LIMIT)
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
};
|
|
@@ -72,39 +72,39 @@ function dispatch(e) {
|
|
|
72
72
|
e2(memoryState);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function toast({ id: e, ...
|
|
76
|
-
let
|
|
75
|
+
function toast({ id: e, once: d, ...f }) {
|
|
76
|
+
let p = e || genId(), m = d === true && e !== void 0, h = (e2) => dispatch({
|
|
77
77
|
type: "UPDATE_TOAST",
|
|
78
78
|
toast: {
|
|
79
79
|
...e2,
|
|
80
|
-
id:
|
|
80
|
+
id: p
|
|
81
81
|
}
|
|
82
82
|
}), g = () => dispatch({
|
|
83
83
|
type: "DISMISS_TOAST",
|
|
84
|
-
toastId:
|
|
84
|
+
toastId: p
|
|
85
85
|
}), _ = (e2) => dispatch({
|
|
86
86
|
type: "UPSERT_TOAST",
|
|
87
87
|
toast: {
|
|
88
88
|
...e2,
|
|
89
|
-
id:
|
|
89
|
+
id: p,
|
|
90
90
|
open: true,
|
|
91
91
|
onOpenChange: (e3) => {
|
|
92
92
|
e3 || g();
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
});
|
|
96
|
-
return dispatch({
|
|
95
|
+
}), v = m && shownOnceKeys.has(p);
|
|
96
|
+
return m && shownOnceKeys.add(p), v || dispatch({
|
|
97
97
|
type: "ADD_TOAST",
|
|
98
98
|
toast: {
|
|
99
|
-
...
|
|
100
|
-
id:
|
|
99
|
+
...f,
|
|
100
|
+
id: p,
|
|
101
101
|
open: true,
|
|
102
102
|
onOpenChange: (e2) => {
|
|
103
103
|
e2 || g();
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}), {
|
|
107
|
-
id:
|
|
107
|
+
id: p,
|
|
108
108
|
dismiss: g,
|
|
109
109
|
update: h,
|
|
110
110
|
upsert: _
|
|
@@ -122,17 +122,17 @@ var Copy = createLucideIcon("copy", [["rect", {
|
|
|
122
122
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
123
123
|
key: "zix9uf"
|
|
124
124
|
}]]);
|
|
125
|
-
async function copyToClipboard(e,
|
|
125
|
+
async function copyToClipboard(e, f) {
|
|
126
126
|
if (navigator.clipboard === void 0) {
|
|
127
127
|
Logger.warn("navigator.clipboard is not supported"), window.prompt("Copy to clipboard: Ctrl+C, Enter", e);
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
if (
|
|
131
|
-
let
|
|
132
|
-
"text/html": new Blob([
|
|
130
|
+
if (f && navigator.clipboard.write) try {
|
|
131
|
+
let d = new ClipboardItem({
|
|
132
|
+
"text/html": new Blob([f], { type: "text/html" }),
|
|
133
133
|
"text/plain": new Blob([e], { type: "text/plain" })
|
|
134
134
|
});
|
|
135
|
-
await navigator.clipboard.write([
|
|
135
|
+
await navigator.clipboard.write([d]);
|
|
136
136
|
return;
|
|
137
137
|
} catch {
|
|
138
138
|
Logger.warn("Failed to write rich text, falling back to plain text");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
3
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
4
|
-
import { l as historyKeymap, o as defaultKeymap, r as lintKeymap, s as history, t as _extends, u as indentWithTab } from "./extends-
|
|
4
|
+
import { l as historyKeymap, o as defaultKeymap, r as lintKeymap, s as history, t as _extends, u as indentWithTab } from "./extends-CkydH1Q5.js";
|
|
5
5
|
import { $ as ViewPlugin, At as Prec, B as tags, Bt as combineConfig, C as foldKeymap, Dt as EditorState, Et as EditorSelection, F as syntaxHighlighting, Ft as StateField, Ht as findClusterBreak, Mt as RangeSetBuilder, Ot as Facet, Pt as StateEffect, Rt as codePointAt, Ut as fromCodePoint, Y as Decoration, Z as EditorView, _t as showDialog, a as HighlightStyle, bt as crelt, ct as highlightActiveLineGutter, dt as keymap, ft as lineNumbers, g as defaultHighlightStyle, gt as runScopeHandlers, ht as rectangularSelection, it as getPanel, j as indentUnit, k as indentOnInput, lt as highlightSpecialChars, mt as placeholder, nt as drawSelection, p as bracketMatching, rt as dropCursor, st as highlightActiveLine, tt as crosshairCursor, vt as showPanel, wt as CharCategory, x as foldGutter, xt as Annotation, zt as codePointSize } from "./dist-DNdhYsgW.js";
|
|
6
6
|
import { a as closeBracketsKeymap, c as completionKeymap, i as closeBrackets, r as autocompletion } from "./dist-DhHh0jLg.js";
|
|
7
7
|
var basicNormalize = typeof String.prototype.normalize == "function" ? (e2) => e2.normalize("NFKD") : (e2) => e2, SearchCursor = class {
|
|
@@ -2,7 +2,7 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
2
2
|
import { g as cn, h as Events } from "./button-C5K9fIPF.js";
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
5
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-5jQ_kGE1.js";
|
|
6
6
|
import { t as Check } from "./check-DTbrK0zt.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
8
8
|
import { t as Tooltip } from "./tooltip-C5FYOpQc.js";
|
|
@@ -5,9 +5,9 @@ import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
|
5
5
|
import { _ as Logger, h as Events, t as Button } from "./button-C5K9fIPF.js";
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
9
|
-
import {
|
|
10
|
-
import { G as
|
|
8
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-5jQ_kGE1.js";
|
|
9
|
+
import { C as logNever, i as SelectContent, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, u as SelectValue } from "./strings-GCJA9n6d.js";
|
|
10
|
+
import { G as useNonce, K as marked, b as DropdownMenuSubTrigger, d as DropdownMenuContent, g as DropdownMenuSeparator, h as DropdownMenuPortal, p as DropdownMenuItem, r as Input, u as DropdownMenu, v as DropdownMenuSub, y as DropdownMenuSubContent } from "./input-DVkbXbIX.js";
|
|
11
11
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-CVvp1fKr.js";
|
|
12
12
|
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-rULOrC_p.js";
|
|
13
13
|
import "./react-dom-BTJzcVJ9.js";
|
|
@@ -10638,7 +10638,7 @@ let __tla = (async () => {
|
|
|
10638
10638
|
}
|
|
10639
10639
|
var import_compiler_runtime = require_compiler_runtime();
|
|
10640
10640
|
GlideDataEditor = (e) => {
|
|
10641
|
-
let t = (0, import_compiler_runtime.c)(107), { data: n, setData: a, columnFields: o, setColumnFields: u, editableColumns: f, edits: m, onAddEdits: h, onAddRows: g, onDeleteRows: y, onRenameColumn: x, onDeleteColumn:
|
|
10641
|
+
let t = (0, import_compiler_runtime.c)(107), { data: n, setData: a, columnFields: o, setColumnFields: u, editableColumns: f, edits: m, onAddEdits: h, onAddRows: g, onDeleteRows: y, onRenameColumn: x, onDeleteColumn: C, onAddColumn: E } = e, { theme: k } = useTheme(), j = (0, import_react.useRef)(null), [N, P] = (0, import_react.useState)(), [I, zr] = (0, import_react.useState)(false), Br;
|
|
10642
10642
|
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Br = {
|
|
10643
10643
|
columns: CompactSelection.empty(),
|
|
10644
10644
|
rows: CompactSelection.empty()
|
|
@@ -10875,13 +10875,13 @@ let __tla = (async () => {
|
|
|
10875
10875
|
}
|
|
10876
10876
|
}, t[48] = o, t[49] = q, t[50] = N, t[51] = x, t[52] = u, t[53] = a, t[54] = pi) : pi = t[54];
|
|
10877
10877
|
let mi = pi, X;
|
|
10878
|
-
t[55] !== N || t[56] !==
|
|
10879
|
-
N && (
|
|
10878
|
+
t[55] !== N || t[56] !== C || t[57] !== u || t[58] !== a ? (X = () => {
|
|
10879
|
+
N && (C(N.col), u((e2) => modifyColumnFields({
|
|
10880
10880
|
columnFields: e2,
|
|
10881
10881
|
columnIdx: N.col,
|
|
10882
10882
|
type: "remove"
|
|
10883
10883
|
})), a((e2) => removeColumn(e2, N.col)), P(void 0));
|
|
10884
|
-
}, t[55] = N, t[56] =
|
|
10884
|
+
}, t[55] = N, t[56] = C, t[57] = u, t[58] = a, t[59] = X) : X = t[59];
|
|
10885
10885
|
let hi = X, gi;
|
|
10886
10886
|
t[60] !== o || t[61] !== q.length || t[62] !== N || t[63] !== E || t[64] !== u || t[65] !== a ? (gi = (e2) => {
|
|
10887
10887
|
let { direction: t2, columnName: n2, dataType: r } = e2;
|