@marimo-team/islands 0.25.2-dev56 → 0.25.2-dev62

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.
Files changed (25) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DOJyF3tw.js → ConnectedDataExplorerComponent-BZmqc_F0.js} +2 -2
  2. package/dist/{ErrorBoundary-CVCDTnQn.js → ErrorBoundary-6Q2ELDlf.js} +1 -1
  3. package/dist/{code-visibility-ChSJl-tu.js → code-visibility-DPFrDxXG.js} +1 -1
  4. package/dist/{common-BBMXVTgG.js → common-DgjGtGZ3.js} +5636 -5448
  5. package/dist/{data-grid-overlay-editor-DtZ07a7D.js → data-grid-overlay-editor-BPoJDC32.js} +1 -1
  6. package/dist/{feedback-button-Dau56tFg.js → feedback-button-584Ne2UW.js} +2 -2
  7. package/dist/{glide-data-editor-BIEsSrta.js → glide-data-editor-CepEjntl.js} +3 -3
  8. package/dist/{globals-Dp8BcGgy.js → globals-BuwAkXJ0.js} +1 -1
  9. package/dist/main.js +2541 -2495
  10. package/dist/{number-overlay-editor-CHlrf9f-.js → number-overlay-editor-CwqDN4KI.js} +1 -1
  11. package/dist/{reveal-component-VEyGCQcx.js → reveal-component-4UYYm0bv.js} +2 -2
  12. package/dist/{spec-V5IXIHz1.js → spec-DVsoMvYT.js} +102 -123
  13. package/dist/style.css +1 -1
  14. package/dist/{useDateFormatter-DnT8h5fL.js → useDateFormatter-C-tz65rD.js} +48 -27
  15. package/package.json +1 -1
  16. package/src/components/data-table/TableTopBar.tsx +4 -0
  17. package/src/components/data-table/__tests__/export-actions.test.tsx +1111 -14
  18. package/src/components/data-table/__tests__/schemas.test.ts +57 -0
  19. package/src/components/data-table/data-table.tsx +3 -0
  20. package/src/components/data-table/export-actions.tsx +365 -81
  21. package/src/components/data-table/schemas.ts +90 -14
  22. package/src/plugins/impl/DataTablePlugin.tsx +23 -2
  23. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +65 -8
  24. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +15 -3
  25. package/src/stories/dataframe.stories.tsx +7 -0
@@ -21,16 +21,37 @@ var i = n("chart-pie", [["path", {
21
21
  d: "M9 19h6",
22
22
  key: "456am0"
23
23
  }]
24
- ]), o = /* @__PURE__ */ e(t(), 1);
25
- function s(e, t) {
26
- let n = (0, o.useRef)(null);
24
+ ]), o = n("table", [
25
+ ["path", {
26
+ d: "M12 3v18",
27
+ key: "108xh3"
28
+ }],
29
+ ["rect", {
30
+ width: "18",
31
+ height: "18",
32
+ x: "3",
33
+ y: "3",
34
+ rx: "2",
35
+ key: "afitv7"
36
+ }],
37
+ ["path", {
38
+ d: "M3 9h18",
39
+ key: "1pudct"
40
+ }],
41
+ ["path", {
42
+ d: "M3 15h18",
43
+ key: "5xshup"
44
+ }]
45
+ ]), s = /* @__PURE__ */ e(t(), 1);
46
+ function c(e, t) {
47
+ let n = (0, s.useRef)(null);
27
48
  return e && n.current && t(e, n.current) && (e = n.current), n.current = e, e;
28
49
  }
29
50
  //#endregion
30
51
  //#region ../node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/DateFormatter.mjs
31
- var c = /* @__PURE__ */ new Map(), l = class {
52
+ var l = /* @__PURE__ */ new Map(), u = class {
32
53
  constructor(e, t = {}) {
33
- this.formatter = d(e, t), this.options = t;
54
+ this.formatter = f(e, t), this.options = t;
34
55
  }
35
56
  format(e) {
36
57
  return this.formatter.format(e);
@@ -65,41 +86,41 @@ var c = /* @__PURE__ */ new Map(), l = class {
65
86
  }
66
87
  resolvedOptions() {
67
88
  let e = this.formatter.resolvedOptions();
68
- return h() && (this.resolvedHourCycle ||= g(e.locale, this.options), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
89
+ return g() && (this.resolvedHourCycle ||= _(e.locale, this.options), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
69
90
  }
70
- }, u = {
91
+ }, d = {
71
92
  true: { ja: "h11" },
72
93
  false: {}
73
94
  };
74
- function d(e, t = {}) {
75
- if (typeof t.hour12 == "boolean" && p()) {
95
+ function f(e, t = {}) {
96
+ if (typeof t.hour12 == "boolean" && m()) {
76
97
  t = { ...t };
77
- let n = u[String(t.hour12)][e.split("-")[0]], r = t.hour12 ? "h12" : "h23";
98
+ let n = d[String(t.hour12)][e.split("-")[0]], r = t.hour12 ? "h12" : "h23";
78
99
  t.hourCycle = n ?? r, delete t.hour12;
79
100
  }
80
101
  let n = e + (t ? Object.entries(t).sort((e, t) => e[0] < t[0] ? -1 : 1).join() : "");
81
- if (c.has(n)) return c.get(n);
102
+ if (l.has(n)) return l.get(n);
82
103
  let r = new Intl.DateTimeFormat(e, t);
83
- return c.set(n, r), r;
104
+ return l.set(n, r), r;
84
105
  }
85
- var f = null;
86
- function p() {
87
- return f ??= new Intl.DateTimeFormat("en-US", {
106
+ var p = null;
107
+ function m() {
108
+ return p ??= new Intl.DateTimeFormat("en-US", {
88
109
  hour: "numeric",
89
110
  hour12: !1
90
- }).format(new Date(2020, 2, 3, 0)) === "24", f;
111
+ }).format(new Date(2020, 2, 3, 0)) === "24", p;
91
112
  }
92
- var m = null;
93
- function h() {
94
- return m ??= new Intl.DateTimeFormat("fr", {
113
+ var h = null;
114
+ function g() {
115
+ return h ??= new Intl.DateTimeFormat("fr", {
95
116
  hour: "numeric",
96
117
  hour12: !1
97
- }).resolvedOptions().hourCycle === "h12", m;
118
+ }).resolvedOptions().hourCycle === "h12", h;
98
119
  }
99
- function g(e, t) {
120
+ function _(e, t) {
100
121
  if (!t.timeStyle && !t.hour) return;
101
122
  e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
102
- let n = d(e, {
123
+ let n = f(e, {
103
124
  ...t,
104
125
  timeZone: void 0
105
126
  }), r = parseInt(n.formatToParts(new Date(2020, 2, 3, 0)).find((e) => e.type === "hour").value, 10), i = parseInt(n.formatToParts(new Date(2020, 2, 3, 23)).find((e) => e.type === "hour").value, 10);
@@ -111,12 +132,12 @@ function g(e, t) {
111
132
  }
112
133
  //#endregion
113
134
  //#region ../node_modules/.pnpm/react-aria@3.52.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-aria/dist/private/i18n/useDateFormatter.mjs
114
- function _(e) {
115
- e = s(e ?? {}, v);
135
+ function v(e) {
136
+ e = c(e ?? {}, y);
116
137
  let { locale: t } = r();
117
- return (0, o.useMemo)(() => new l(t, e), [t, e]);
138
+ return (0, s.useMemo)(() => new u(t, e), [t, e]);
118
139
  }
119
- function v(e, t) {
140
+ function y(e, t) {
120
141
  if (e === t) return !0;
121
142
  let n = Object.keys(e), r = Object.keys(t);
122
143
  if (n.length !== r.length) return !1;
@@ -124,4 +145,4 @@ function v(e, t) {
124
145
  return !0;
125
146
  }
126
147
  //#endregion
127
- export { i as a, a as i, l as n, s as r, _ as t };
148
+ export { a, o as i, u as n, i as o, c as r, v as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.25.2-dev56",
3
+ "version": "0.25.2-dev62",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -54,6 +54,8 @@ export const TableTopBar = <TData,>({
54
54
  togglePanel,
55
55
  isAnyPanelOpen,
56
56
  downloadAs,
57
+ getExportMetadata,
58
+ metadataSource,
57
59
  sizeBytes,
58
60
  sizeBytesIsLoading,
59
61
  }: TableTopBarProps<TData>) => {
@@ -132,6 +134,8 @@ export const TableTopBar = <TData,>({
132
134
  {downloadAs && (
133
135
  <ExportActions
134
136
  downloadAs={downloadAs}
137
+ getExportMetadata={getExportMetadata}
138
+ metadataSource={metadataSource}
135
139
  sizeBytes={sizeBytes}
136
140
  sizeBytesIsLoading={sizeBytesIsLoading}
137
141
  />