@marimo-team/islands 0.24.1-dev79 → 0.24.1-dev80
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-DM12Y9is.js → chat-ui-Dcb8pQhM.js} +8 -8
- package/dist/click-outside-container-D_URcm3D.js +167 -0
- package/dist/{common-DuuFqqGa.js → common-C8LWIius.js} +571 -571
- package/dist/{data-grid-overlay-editor-D-p0q7YM.js → data-grid-overlay-editor-DZM4BAaI.js} +49 -48
- package/dist/{click-outside-container-CVJZE0x6.js → data-grid-types-BnZwWG8z.js} +150 -312
- package/dist/{dropdown-menu-C8N-kZzD.js → dropdown-menu-B39I9ARA.js} +20 -31
- package/dist/{glide-data-editor-64-L_DON.js → glide-data-editor-DEJqXbly.js} +2598 -2780
- package/dist/glide-utils-C0dRuWI_.js +201 -0
- package/dist/{html-to-image-B7RQgQQy.js → html-to-image-CvCnIqTI.js} +4476 -4465
- package/dist/main.js +5971 -5913
- package/dist/{process-output-BCqcNNll.js → process-output-C2joqP7d.js} +1 -1
- package/dist/{reveal-component-BDQwrD89.js → reveal-component-CdEcs6WV.js} +3 -3
- package/package.json +1 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +38 -70
- package/src/plugins/impl/__tests__/DataEditorPlugin.test.ts +152 -1
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +73 -78
- package/src/plugins/impl/data-editor/__tests__/editor-state.test.ts +113 -0
- package/src/plugins/impl/data-editor/__tests__/glide-data-editor.test.tsx +49 -13
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +44 -64
- package/src/plugins/impl/data-editor/data-utils.ts +76 -53
- package/src/plugins/impl/data-editor/editor-state.ts +108 -0
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +40 -223
- package/src/plugins/impl/data-editor/glide-utils.ts +71 -31
- package/src/plugins/impl/data-editor/types.ts +30 -16
- package/dist/types-eyYyHvz7.js +0 -72
|
@@ -3,12 +3,12 @@ import { c as n, g as r, h as i, t as a } from "./button-DlqUC8W-.js";
|
|
|
3
3
|
import { t as o } from "./react-DMWcHin-.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-CAH9RLw2.js";
|
|
5
5
|
import { r as c } from "./copy-D9h0DuU7.js";
|
|
6
|
-
import { $t as l, An as u, At as d, Bt as f, F as p, Gn as m, Gt as h, In as g, It as _, Jn as v, K as y, Kn as b, Ln as x, On as S, Pt as C, Qt as w, Un as T, Zn as E, Zt as ee, _ as te, _n as ne, a as re, c as ie, cn as ae, d as oe, f as se, fn as ce, ft as le, g as ue, gt as de, h as fe, l as pe, ln as me, m as he, n as ge, p as _e, pt as ve, r as ye, sn as be, t as xe, tn as Se, tt as Ce, un as we, ut as Te, v as Ee, x as De, y as Oe, zt as ke } from "./html-to-image-
|
|
6
|
+
import { $t as l, An as u, At as d, Bt as f, F as p, Gn as m, Gt as h, In as g, It as _, Jn as v, K as y, Kn as b, Ln as x, On as S, Pt as C, Qt as w, Un as T, Zn as E, Zt as ee, _ as te, _n as ne, a as re, c as ie, cn as ae, d as oe, f as se, fn as ce, ft as le, g as ue, gt as de, h as fe, l as pe, ln as me, m as he, n as ge, p as _e, pt as ve, r as ye, sn as be, t as xe, tn as Se, tt as Ce, un as we, ut as Te, v as Ee, x as De, y as Oe, zt as ke } from "./html-to-image-CvCnIqTI.js";
|
|
7
7
|
import { u as Ae } from "./dist-wdOJ5T7-.js";
|
|
8
8
|
import { C as je, I as Me, R as Ne, b as Pe } from "./select-DQ9jU_B_.js";
|
|
9
|
-
import {
|
|
9
|
+
import { _ as Fe, f as Ie, h as Le, i as Re, n as ze, t as Be } from "./dropdown-menu-B39I9ARA.js";
|
|
10
10
|
import { _ as Ve, p as He } from "./toDate-BfSgxzgl.js";
|
|
11
|
-
import { d as Ue, f as We, i as Ge, n as Ke, t as qe, u as Je } from "./process-output-
|
|
11
|
+
import { d as Ue, f as We, i as Ge, n as Ke, t as qe, u as Je } from "./process-output-C2joqP7d.js";
|
|
12
12
|
import { t as Ye } from "./jsx-runtime-CpoKNRgu.js";
|
|
13
13
|
import { Cn as D, Cr as Xe, In as O, It as Ze, Jn as k, Sn as Qe, Tt as $e, Yn as et, bt as tt, cn as nt, jn as rt, kt as A, ln as j, mr as it, un as M, vt as at, wt as ot, xt as st, zt as ct } from "./schemas-JTyiKlcH.js";
|
|
14
14
|
import { n as lt } from "./error-banner-xVkWHg51.js";
|
|
@@ -8281,7 +8281,7 @@ var qc = (e) => {
|
|
|
8281
8281
|
}),
|
|
8282
8282
|
children: /* @__PURE__ */ (0, Z.jsx)(Ve, { className: "h-3 w-3 cursor-help text-muted-foreground hover:text-foreground" })
|
|
8283
8283
|
})]
|
|
8284
|
-
}), /* @__PURE__ */ (0, Z.jsx)(
|
|
8284
|
+
}), /* @__PURE__ */ (0, Z.jsx)(Fe, {
|
|
8285
8285
|
id: t,
|
|
8286
8286
|
"aria-label": t,
|
|
8287
8287
|
value: n ?? NaN,
|
|
@@ -8318,7 +8318,7 @@ var qc = (e) => {
|
|
|
8318
8318
|
let u = l, d;
|
|
8319
8319
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, Z.jsx)(dt, {
|
|
8320
8320
|
content: "Select a prompt",
|
|
8321
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
8321
|
+
children: /* @__PURE__ */ (0, Z.jsx)(Ie, {
|
|
8322
8322
|
asChild: !0,
|
|
8323
8323
|
children: /* @__PURE__ */ (0, Z.jsx)(a, {
|
|
8324
8324
|
variant: "outline",
|
|
@@ -8331,14 +8331,14 @@ var qc = (e) => {
|
|
|
8331
8331
|
let f;
|
|
8332
8332
|
if (t[3] !== u || t[4] !== n) {
|
|
8333
8333
|
let e;
|
|
8334
|
-
t[6] === u ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, Z.jsx)(
|
|
8334
|
+
t[6] === u ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, Z.jsx)(Re, {
|
|
8335
8335
|
onSelect: () => u(e),
|
|
8336
8336
|
className: "whitespace-normal text-left",
|
|
8337
8337
|
children: e
|
|
8338
8338
|
}, t), t[6] = u, t[7] = e), f = n.map(e), t[3] = u, t[4] = n, t[5] = f;
|
|
8339
8339
|
} else f = t[5];
|
|
8340
8340
|
let p;
|
|
8341
|
-
t[8] === f ? p = t[9] : (p = /* @__PURE__ */ (0, Z.jsx)(Wc, { children: /* @__PURE__ */ (0, Z.jsxs)(
|
|
8341
|
+
t[8] === f ? p = t[9] : (p = /* @__PURE__ */ (0, Z.jsx)(Wc, { children: /* @__PURE__ */ (0, Z.jsxs)(Be, { children: [d, /* @__PURE__ */ (0, Z.jsx)(ze, {
|
|
8342
8342
|
side: "right",
|
|
8343
8343
|
align: "end",
|
|
8344
8344
|
onCloseAutoFocus: Qc,
|
|
@@ -8403,7 +8403,7 @@ var qc = (e) => {
|
|
|
8403
8403
|
htmlFor: n,
|
|
8404
8404
|
className: "font-semibold text-base",
|
|
8405
8405
|
children: n
|
|
8406
|
-
}), /* @__PURE__ */ (0, Z.jsx)(
|
|
8406
|
+
}), /* @__PURE__ */ (0, Z.jsx)(Le, {
|
|
8407
8407
|
id: n,
|
|
8408
8408
|
value: r,
|
|
8409
8409
|
onChange: (e) => f(n, e.target.value),
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
+
import { t } from "./react-DMWcHin-.js";
|
|
3
|
+
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.4_4b66885481293829737255dc19981073/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid/color-parser.js
|
|
4
|
+
var n = /* @__PURE__ */ e(t(), 1), r = {}, i = null;
|
|
5
|
+
function a() {
|
|
6
|
+
let e = document.createElement("div");
|
|
7
|
+
return e.style.opacity = "0", e.style.pointerEvents = "none", e.style.position = "fixed", document.body.append(e), e;
|
|
8
|
+
}
|
|
9
|
+
function o(e) {
|
|
10
|
+
let t = e.toLowerCase().trim();
|
|
11
|
+
if (r[t] !== void 0) return r[t];
|
|
12
|
+
i ||= a(), i.style.color = "#000", i.style.color = t;
|
|
13
|
+
let n = getComputedStyle(i).color;
|
|
14
|
+
i.style.color = "#fff", i.style.color = t;
|
|
15
|
+
let o = getComputedStyle(i).color;
|
|
16
|
+
if (o !== n) return [
|
|
17
|
+
0,
|
|
18
|
+
0,
|
|
19
|
+
0,
|
|
20
|
+
1
|
|
21
|
+
];
|
|
22
|
+
let s = o.replace(/[^\d.,]/g, "").split(",").map(Number.parseFloat);
|
|
23
|
+
return s.length < 4 && s.push(1), s = s.map((e) => Number.isNaN(e) ? 0 : e), r[t] = s, s;
|
|
24
|
+
}
|
|
25
|
+
function s(e, t) {
|
|
26
|
+
let [n, r, i] = o(e);
|
|
27
|
+
return `rgba(${n}, ${r}, ${i}, ${t})`;
|
|
28
|
+
}
|
|
29
|
+
var c = /* @__PURE__ */ new Map();
|
|
30
|
+
function l(e, t) {
|
|
31
|
+
let n = `${e}-${t}`, r = c.get(n);
|
|
32
|
+
if (r !== void 0) return r;
|
|
33
|
+
let i = u(e, t);
|
|
34
|
+
return c.set(n, i), i;
|
|
35
|
+
}
|
|
36
|
+
function u(e, t) {
|
|
37
|
+
if (t === void 0) return e;
|
|
38
|
+
let [n, r, i, a] = o(e);
|
|
39
|
+
if (a === 1) return e;
|
|
40
|
+
let [s, c, l, u] = o(t), d = a + u * (1 - a);
|
|
41
|
+
return `rgba(${(a * n + u * s * (1 - a)) / d}, ${(a * r + u * c * (1 - a)) / d}, ${(a * i + u * l * (1 - a)) / d}, ${d})`;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.4_4b66885481293829737255dc19981073/node_modules/@glideapps/glide-data-grid/dist/esm/common/styles.js
|
|
45
|
+
function d(e) {
|
|
46
|
+
return {
|
|
47
|
+
"--gdg-accent-color": e.accentColor,
|
|
48
|
+
"--gdg-accent-fg": e.accentFg,
|
|
49
|
+
"--gdg-accent-light": e.accentLight,
|
|
50
|
+
"--gdg-text-dark": e.textDark,
|
|
51
|
+
"--gdg-text-medium": e.textMedium,
|
|
52
|
+
"--gdg-text-light": e.textLight,
|
|
53
|
+
"--gdg-text-bubble": e.textBubble,
|
|
54
|
+
"--gdg-bg-icon-header": e.bgIconHeader,
|
|
55
|
+
"--gdg-fg-icon-header": e.fgIconHeader,
|
|
56
|
+
"--gdg-text-header": e.textHeader,
|
|
57
|
+
"--gdg-text-group-header": e.textGroupHeader ?? e.textHeader,
|
|
58
|
+
"--gdg-bg-group-header": e.bgGroupHeader ?? e.bgHeader,
|
|
59
|
+
"--gdg-bg-group-header-hovered": e.bgGroupHeaderHovered ?? e.bgHeaderHovered,
|
|
60
|
+
"--gdg-text-header-selected": e.textHeaderSelected,
|
|
61
|
+
"--gdg-bg-cell": e.bgCell,
|
|
62
|
+
"--gdg-bg-cell-medium": e.bgCellMedium,
|
|
63
|
+
"--gdg-bg-header": e.bgHeader,
|
|
64
|
+
"--gdg-bg-header-has-focus": e.bgHeaderHasFocus,
|
|
65
|
+
"--gdg-bg-header-hovered": e.bgHeaderHovered,
|
|
66
|
+
"--gdg-bg-bubble": e.bgBubble,
|
|
67
|
+
"--gdg-bg-bubble-selected": e.bgBubbleSelected,
|
|
68
|
+
"--gdg-bubble-height": `${e.bubbleHeight}px`,
|
|
69
|
+
"--gdg-bubble-padding": `${e.bubblePadding}px`,
|
|
70
|
+
"--gdg-bubble-margin": `${e.bubbleMargin}px`,
|
|
71
|
+
"--gdg-bg-search-result": e.bgSearchResult,
|
|
72
|
+
"--gdg-border-color": e.borderColor,
|
|
73
|
+
"--gdg-horizontal-border-color": e.horizontalBorderColor ?? e.borderColor,
|
|
74
|
+
"--gdg-drilldown-border": e.drilldownBorder,
|
|
75
|
+
"--gdg-link-color": e.linkColor,
|
|
76
|
+
"--gdg-cell-horizontal-padding": `${e.cellHorizontalPadding}px`,
|
|
77
|
+
"--gdg-cell-vertical-padding": `${e.cellVerticalPadding}px`,
|
|
78
|
+
"--gdg-header-font-style": e.headerFontStyle,
|
|
79
|
+
"--gdg-base-font-style": e.baseFontStyle,
|
|
80
|
+
"--gdg-marker-font-style": e.markerFontStyle,
|
|
81
|
+
"--gdg-font-family": e.fontFamily,
|
|
82
|
+
"--gdg-editor-font-size": e.editorFontSize,
|
|
83
|
+
"--gdg-checkbox-max-size": `${e.checkboxMaxSize}px`,
|
|
84
|
+
...e.resizeIndicatorColor === void 0 ? {} : { "--gdg-resize-indicator-color": e.resizeIndicatorColor },
|
|
85
|
+
...e.headerBottomBorderColor === void 0 ? {} : { "--gdg-header-bottom-border-color": e.headerBottomBorderColor },
|
|
86
|
+
...e.roundingRadius === void 0 ? {} : { "--gdg-rounding-radius": `${e.roundingRadius}px` }
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
var f = {
|
|
90
|
+
accentColor: "#4F5DFF",
|
|
91
|
+
accentFg: "#FFFFFF",
|
|
92
|
+
accentLight: "rgba(62, 116, 253, 0.1)",
|
|
93
|
+
textDark: "#313139",
|
|
94
|
+
textMedium: "#737383",
|
|
95
|
+
textLight: "#B2B2C0",
|
|
96
|
+
textBubble: "#313139",
|
|
97
|
+
bgIconHeader: "#737383",
|
|
98
|
+
fgIconHeader: "#FFFFFF",
|
|
99
|
+
textHeader: "#313139",
|
|
100
|
+
textGroupHeader: "#313139BB",
|
|
101
|
+
textHeaderSelected: "#FFFFFF",
|
|
102
|
+
bgCell: "#FFFFFF",
|
|
103
|
+
bgCellMedium: "#FAFAFB",
|
|
104
|
+
bgHeader: "#F7F7F8",
|
|
105
|
+
bgHeaderHasFocus: "#E9E9EB",
|
|
106
|
+
bgHeaderHovered: "#EFEFF1",
|
|
107
|
+
bgBubble: "#EDEDF3",
|
|
108
|
+
bgBubbleSelected: "#FFFFFF",
|
|
109
|
+
bubbleHeight: 20,
|
|
110
|
+
bubblePadding: 6,
|
|
111
|
+
bubbleMargin: 4,
|
|
112
|
+
bgSearchResult: "#fff9e3",
|
|
113
|
+
borderColor: "rgba(115, 116, 131, 0.16)",
|
|
114
|
+
drilldownBorder: "rgba(0, 0, 0, 0)",
|
|
115
|
+
linkColor: "#353fb5",
|
|
116
|
+
cellHorizontalPadding: 8,
|
|
117
|
+
cellVerticalPadding: 3,
|
|
118
|
+
headerIconSize: 18,
|
|
119
|
+
headerFontStyle: "600 13px",
|
|
120
|
+
baseFontStyle: "13px",
|
|
121
|
+
markerFontStyle: "9px",
|
|
122
|
+
fontFamily: "Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",
|
|
123
|
+
editorFontSize: "13px",
|
|
124
|
+
lineHeight: 1.4,
|
|
125
|
+
checkboxMaxSize: 18
|
|
126
|
+
};
|
|
127
|
+
function p() {
|
|
128
|
+
return f;
|
|
129
|
+
}
|
|
130
|
+
var m = n.createContext(f);
|
|
131
|
+
function h(e, ...t) {
|
|
132
|
+
let n = { ...e };
|
|
133
|
+
for (let e of t) if (e !== void 0) for (let t in e) e.hasOwnProperty(t) && (n[t] = t === "bgCell" ? u(e[t], n[t]) : e[t]);
|
|
134
|
+
return (n.headerFontFull === void 0 || e.fontFamily !== n.fontFamily || e.headerFontStyle !== n.headerFontStyle) && (n.headerFontFull = `${n.headerFontStyle} ${n.fontFamily}`), (n.baseFontFull === void 0 || e.fontFamily !== n.fontFamily || e.baseFontStyle !== n.baseFontStyle) && (n.baseFontFull = `${n.baseFontStyle} ${n.fontFamily}`), (n.markerFontFull === void 0 || e.fontFamily !== n.fontFamily || e.markerFontStyle !== n.markerFontStyle) && (n.markerFontFull = `${n.markerFontStyle} ${n.fontFamily}`), n;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.4_4b66885481293829737255dc19981073/node_modules/@glideapps/glide-data-grid/dist/esm/internal/click-outside-container/click-outside-container.js
|
|
138
|
+
var g = class extends n.PureComponent {
|
|
139
|
+
wrapperRef = n.createRef();
|
|
140
|
+
componentDidMount() {
|
|
141
|
+
let e = this.props.customEventTarget ?? document;
|
|
142
|
+
e.addEventListener("pointerdown", this.clickOutside, !0), e.addEventListener("contextmenu", this.clickOutside, !0);
|
|
143
|
+
}
|
|
144
|
+
componentWillUnmount() {
|
|
145
|
+
let e = this.props.customEventTarget ?? document;
|
|
146
|
+
e.removeEventListener("pointerdown", this.clickOutside, !0), e.removeEventListener("contextmenu", this.clickOutside, !0);
|
|
147
|
+
}
|
|
148
|
+
clickOutside = (e) => {
|
|
149
|
+
if (!(this.props.isOutsideClick && !this.props.isOutsideClick(e)) && this.wrapperRef.current !== null && !this.wrapperRef.current.contains(e.target)) {
|
|
150
|
+
let t = e.target;
|
|
151
|
+
for (; t !== null;) {
|
|
152
|
+
if (t.classList.contains("click-outside-ignore")) return;
|
|
153
|
+
t = t.parentElement;
|
|
154
|
+
}
|
|
155
|
+
this.props.onClickOutside();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
render() {
|
|
159
|
+
let { onClickOutside: e, isOutsideClick: t, customEventTarget: r, ...i } = this.props;
|
|
160
|
+
return n.createElement("div", {
|
|
161
|
+
...i,
|
|
162
|
+
ref: this.wrapperRef
|
|
163
|
+
}, this.props.children);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
export { h as a, s as c, d as i, m as n, u as o, p as r, l as s, g as t };
|