@marimo-team/islands 0.24.1-dev35 → 0.24.1-dev37
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-ChbH2I73.js → chat-ui-DktaBw5O.js} +62 -62
- package/dist/{common-C1BvDvU0.js → common-vZhuiPnZ.js} +695 -715
- package/dist/{html-to-image-BzT-fb14.js → html-to-image-RKitVHn8.js} +2374 -2351
- package/dist/main.js +82 -82
- package/dist/{process-output-C8Q8G6-g.js → process-output-BEMkC1sa.js} +1 -1
- package/dist/{reveal-component-D-I8Cn0V.js → reveal-component-DdSlGZCR.js} +2 -2
- package/package.json +1 -1
- package/src/utils/__tests__/url-parser.test.ts +26 -0
- package/src/utils/json/__tests__/json-parser.test.ts +33 -0
- package/src/utils/json/json-parser.ts +5 -3
- package/src/utils/url-parser.ts +4 -3
package/dist/main.js
CHANGED
|
@@ -22,17 +22,17 @@ import { _ as Functions, c as useEventListener, f as composeRefs, g as Logger, h
|
|
|
22
22
|
import { t as require_react } from "./react-DhGsCS90.js";
|
|
23
23
|
import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
|
|
24
24
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-C7ZKMKox.js";
|
|
25
|
-
import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as
|
|
25
|
+
import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as Content2, At as DeferredRequestRegistry, Bn as LoaderCircle, C as Accordion, Ct as MarkdownLanguageAdapter, D as BorderAllIcon, Dn as selectAtom, E as AccordionTrigger, En as atomWithStorage, Et as Paths, Fn as Trash2, G as hasRunAnyCellAtom, Gt as require_client, H as renderHTML, Hn as Info, Ht as DATA_TYPE_ICON, I as base64ToDataView, In as Table2, K as cellIdsAtom, Kn as Database, Ln as PaintRoller, Lt as repl, Mn as Root2$1, Nn as Trigger2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as SQLParser, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithReducer, Tt as PathBuilder, U as getMarimoExportContext, Un as FileText, V as safeExtractSetUIElementMessageBuffers, Vn as Layers, Vt as PluralWords, W as hasTrustedExportContext, Wn as Eye, X as hasOnlyOneCellAtom, Xn as Braces, Xt as getRequestClient, Y as getCellNames, Yn as CircleAlert, Yt as convertStatsName, Z as initialNotebookState, Zt as requestClientAtom, _t as isInternalCellName, a as useCellFocusActions, at as createCell, bn as OBJECT_ID_ATTR, bt as customPythonLanguageSupport, dt as headingToIdentifier, en as publishedCellClasses, et as numColumnsAtom, f as isOutputEmpty, fn as parseAttrValue, gn as HTMLCellId, gt as getValidName, i as LazyAnyLanguageCodeMirror, jn as Item$1, jt as generateUUID, ln as NotebookScopedLocalStorage, lt as outputIsLoading, mn as parseInitialValue, n as Spinner, nt as useCellActions, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, q as createActions, qn as Columns2, rt as useCellIds, s as maybeAddAltairImport, tn as shouldHidePublishedCell, tt as reducer, ut as outputIsStale, vn as UIElementId, vt as normalizeName, w as AccordionContent, xn as RANDOM_ID_ATTR, xt as hasFunctionProperty, yn as findCellId, yt as Checkbox, zt as MarkdownParser, __tla as __tla_0 } from "./html-to-image-RKitVHn8.js";
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BRZ_XYUw.js";
|
|
27
27
|
import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist-j30bBjjN.js";
|
|
28
28
|
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-DR1CyTOo.js";
|
|
29
|
-
import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-
|
|
29
|
+
import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-vZhuiPnZ.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-Bw4wRj_O.js";
|
|
31
31
|
import { t as Check } from "./check-58HHfHKy.js";
|
|
32
32
|
import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$2, N as usePrevious$2, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as Trigger$1, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-DMLVGXRo.js";
|
|
33
33
|
import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-CqV2ZPgL.js";
|
|
34
34
|
import { S as isWasm, _ as initialModeAtom, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as getInitialAppMode, m as require_cuid2, u as getStaticVirtualFiles, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-CjUYDkFI.js";
|
|
35
|
-
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
35
|
+
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-BEMkC1sa.js";
|
|
36
36
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-DT8UHI5w.js";
|
|
37
37
|
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-BniTEhHn.js";
|
|
38
38
|
import { t as require_react_dom } from "./react-dom-CmENFV8Q.js";
|
|
@@ -9016,7 +9016,7 @@ let __tla = Promise.all([
|
|
|
9016
9016
|
};
|
|
9017
9017
|
}
|
|
9018
9018
|
};
|
|
9019
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
9019
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-DktaBw5O.js").then((e) => ({
|
|
9020
9020
|
default: e.Chatbot
|
|
9021
9021
|
}))), messageSchema = array(object({
|
|
9022
9022
|
id: string(),
|
|
@@ -18800,15 +18800,15 @@ ${c}
|
|
|
18800
18800
|
let e2 = iG.current;
|
|
18801
18801
|
(p == null ? void 0 : p.transforms.length) !== e2.transforms.length && m(e2);
|
|
18802
18802
|
}, r[10] = m, r[11] = p == null ? void 0 : p.transforms.length, r[12] = oG) : oG = r[12];
|
|
18803
|
-
let
|
|
18804
|
-
r[13] !== E || r[14] !== m || r[15] !==
|
|
18803
|
+
let sG = p == null ? void 0 : p.transforms.length, cG;
|
|
18804
|
+
r[13] !== E || r[14] !== m || r[15] !== sG ? (cG = [
|
|
18805
18805
|
E,
|
|
18806
|
-
|
|
18806
|
+
sG,
|
|
18807
18807
|
iG,
|
|
18808
18808
|
m
|
|
18809
|
-
], r[13] = E, r[14] = m, r[15] =
|
|
18810
|
-
let
|
|
18811
|
-
r[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
18809
|
+
], r[13] = E, r[14] = m, r[15] = sG, r[16] = cG) : cG = r[16], (0, import_react.useEffect)(oG, cG);
|
|
18810
|
+
let lG;
|
|
18811
|
+
r[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (lG = (0, import_jsx_runtime.jsxs)(TabsTrigger, {
|
|
18812
18812
|
value: "transform",
|
|
18813
18813
|
className: "text-xs py-1",
|
|
18814
18814
|
children: [
|
|
@@ -18817,9 +18817,9 @@ ${c}
|
|
|
18817
18817
|
}),
|
|
18818
18818
|
"Transform"
|
|
18819
18819
|
]
|
|
18820
|
-
}), r[17] =
|
|
18821
|
-
let
|
|
18822
|
-
r[18] === H ?
|
|
18820
|
+
}), r[17] = lG) : lG = r[17];
|
|
18821
|
+
let uG;
|
|
18822
|
+
r[18] === H ? uG = r[19] : (uG = H && (0, import_jsx_runtime.jsxs)(TabsTrigger, {
|
|
18823
18823
|
value: "python-code",
|
|
18824
18824
|
className: "text-xs py-1",
|
|
18825
18825
|
children: [
|
|
@@ -18828,9 +18828,9 @@ ${c}
|
|
|
18828
18828
|
}),
|
|
18829
18829
|
"Python Code"
|
|
18830
18830
|
]
|
|
18831
|
-
}), r[18] = H, r[19] =
|
|
18832
|
-
let
|
|
18833
|
-
r[20] === W ?
|
|
18831
|
+
}), r[18] = H, r[19] = uG);
|
|
18832
|
+
let dG;
|
|
18833
|
+
r[20] === W ? dG = r[21] : (dG = W && (0, import_jsx_runtime.jsxs)(TabsTrigger, {
|
|
18834
18834
|
value: "sql-code",
|
|
18835
18835
|
className: "text-xs py-1",
|
|
18836
18836
|
children: [
|
|
@@ -18839,33 +18839,33 @@ ${c}
|
|
|
18839
18839
|
}),
|
|
18840
18840
|
"SQL Code"
|
|
18841
18841
|
]
|
|
18842
|
-
}), r[20] = W, r[21] =
|
|
18843
|
-
let
|
|
18844
|
-
r[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
18842
|
+
}), r[20] = W, r[21] = dG);
|
|
18843
|
+
let fG;
|
|
18844
|
+
r[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (fG = (0, import_jsx_runtime.jsx)("div", {
|
|
18845
18845
|
className: "grow"
|
|
18846
|
-
}), r[22] =
|
|
18847
|
-
let
|
|
18848
|
-
r[23] !==
|
|
18846
|
+
}), r[22] = fG) : fG = r[22];
|
|
18847
|
+
let pG;
|
|
18848
|
+
r[23] !== uG || r[24] !== dG ? (pG = (0, import_jsx_runtime.jsxs)(TabsList, {
|
|
18849
18849
|
className: "h-8",
|
|
18850
18850
|
children: [
|
|
18851
|
+
lG,
|
|
18851
18852
|
uG,
|
|
18852
18853
|
dG,
|
|
18853
|
-
fG
|
|
18854
|
-
pG
|
|
18854
|
+
fG
|
|
18855
18855
|
]
|
|
18856
|
-
}), r[23] =
|
|
18857
|
-
let
|
|
18858
|
-
r[26] === j ?
|
|
18856
|
+
}), r[23] = uG, r[24] = dG, r[25] = pG) : pG = r[25];
|
|
18857
|
+
let mG;
|
|
18858
|
+
r[26] === j ? mG = r[27] : (mG = j && (0, import_jsx_runtime.jsx)(Spinner, {
|
|
18859
18859
|
size: "small"
|
|
18860
|
-
}), r[26] = j, r[27] =
|
|
18860
|
+
}), r[26] = j, r[27] = mG);
|
|
18861
18861
|
let gG;
|
|
18862
|
-
r[28] !==
|
|
18862
|
+
r[28] !== pG || r[29] !== mG ? (gG = (0, import_jsx_runtime.jsxs)("div", {
|
|
18863
18863
|
className: "flex items-center gap-2",
|
|
18864
18864
|
children: [
|
|
18865
|
-
|
|
18866
|
-
|
|
18865
|
+
pG,
|
|
18866
|
+
mG
|
|
18867
18867
|
]
|
|
18868
|
-
}), r[28] =
|
|
18868
|
+
}), r[28] = pG, r[29] = mG, r[30] = gG) : gG = r[30];
|
|
18869
18869
|
let _G;
|
|
18870
18870
|
r[31] !== m || r[32] !== p ? (_G = (e2) => {
|
|
18871
18871
|
dequal(e2, p) || (m(e2), tG(e2));
|
|
@@ -19152,7 +19152,7 @@ ${c}
|
|
|
19152
19152
|
}, [
|
|
19153
19153
|
H
|
|
19154
19154
|
]);
|
|
19155
|
-
let q = (R == null ? void 0 : R.files) ?? [], tG = new Set(e.map((e2) => e2.path)), Z = l === "directory" || l === "all", nG = l === "file" || l === "all", rG = q.filter((e2) => Z && e2.is_directory || nG && !e2.is_directory),
|
|
19155
|
+
let q = (R == null ? void 0 : R.files) ?? [], tG = new Set(e.map((e2) => e2.path)), Z = l === "directory" || l === "all", nG = l === "file" || l === "all", rG = q.filter((e2) => Z && e2.is_directory || nG && !e2.is_directory), iG = rG.length > 0 && rG.every((e2) => tG.has(e2.path));
|
|
19156
19156
|
if (!R && z) return (0, import_jsx_runtime.jsx)(Banner, {
|
|
19157
19157
|
kind: "danger",
|
|
19158
19158
|
children: z.message
|
|
@@ -19308,8 +19308,8 @@ ${c}
|
|
|
19308
19308
|
children: (0, import_jsx_runtime.jsx)(Button, {
|
|
19309
19309
|
size: "xs",
|
|
19310
19310
|
variant: "link",
|
|
19311
|
-
onClick:
|
|
19312
|
-
children:
|
|
19311
|
+
onClick: iG ? fG : pG,
|
|
19312
|
+
children: iG ? "Deselect all" : "Select all"
|
|
19313
19313
|
})
|
|
19314
19314
|
})
|
|
19315
19315
|
]
|
|
@@ -25527,85 +25527,85 @@ ${c}
|
|
|
25527
25527
|
}
|
|
25528
25528
|
R(null), d(u), y && B();
|
|
25529
25529
|
}, r[1] = y, r[2] = u, r[3] = d, r[4] = O, r[5] = E, r[6] = H) : H = r[6];
|
|
25530
|
-
let W = !M && p,
|
|
25531
|
-
r[7] !== p || r[8] !== W ? (
|
|
25530
|
+
let W = !M && p, q;
|
|
25531
|
+
r[7] !== p || r[8] !== W ? (q = cn("flex flex-col gap-4 rounded-lg py-4 px-8", {
|
|
25532
25532
|
"bg-(--gray-1) shadow-md border border-input": p,
|
|
25533
25533
|
"bg-(--amber-1) border-(--amber-7)": W
|
|
25534
|
-
}), r[7] = p, r[8] = W, r[9] =
|
|
25535
|
-
let
|
|
25536
|
-
r[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
25534
|
+
}), r[7] = p, r[8] = W, r[9] = q) : q = r[9];
|
|
25535
|
+
let tG;
|
|
25536
|
+
r[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (tG = (e2) => {
|
|
25537
25537
|
var _a5;
|
|
25538
25538
|
e2.key === "Enter" && (e2.ctrlKey || e2.metaKey) && (e2.preventDefault(), e2.stopPropagation(), (_a5 = j.current) == null ? void 0 : _a5.requestSubmit());
|
|
25539
|
-
}, r[10] =
|
|
25540
|
-
let
|
|
25541
|
-
r[11] === f ?
|
|
25539
|
+
}, r[10] = tG) : tG = r[10];
|
|
25540
|
+
let Z;
|
|
25541
|
+
r[11] === f ? Z = r[12] : (Z = f === null ? null : (0, import_jsx_runtime.jsx)("div", {
|
|
25542
25542
|
className: "text-center",
|
|
25543
25543
|
children: renderHTML({
|
|
25544
25544
|
html: f
|
|
25545
25545
|
})
|
|
25546
|
-
}), r[11] = f, r[12] =
|
|
25547
|
-
let
|
|
25548
|
-
r[13] === L ?
|
|
25546
|
+
}), r[11] = f, r[12] = Z);
|
|
25547
|
+
let nG;
|
|
25548
|
+
r[13] === L ? nG = r[14] : (nG = L != null && (0, import_jsx_runtime.jsx)(Banner, {
|
|
25549
25549
|
kind: "danger",
|
|
25550
25550
|
className: "rounded",
|
|
25551
25551
|
children: L ?? "Invalid input"
|
|
25552
|
-
}), r[13] = L, r[14] =
|
|
25553
|
-
let nG;
|
|
25554
|
-
r[15] === c ? nG = r[16] : (nG = (0, import_jsx_runtime.jsx)("div", {
|
|
25555
|
-
children: c
|
|
25556
|
-
}), r[15] = c, r[16] = nG);
|
|
25552
|
+
}), r[13] = L, r[14] = nG);
|
|
25557
25553
|
let rG;
|
|
25558
|
-
r[
|
|
25554
|
+
r[15] === c ? rG = r[16] : (rG = (0, import_jsx_runtime.jsx)("div", {
|
|
25555
|
+
children: c
|
|
25556
|
+
}), r[15] = c, r[16] = rG);
|
|
25557
|
+
let iG;
|
|
25558
|
+
r[17] !== S || r[18] !== w || r[19] !== b ? (iG = b && withTooltip((0, import_jsx_runtime.jsx)(Button, {
|
|
25559
25559
|
"data-testid": "marimo-plugin-form-clear-button",
|
|
25560
25560
|
variant: "text",
|
|
25561
25561
|
onClick: (e2) => {
|
|
25562
25562
|
e2.preventDefault(), B();
|
|
25563
25563
|
},
|
|
25564
25564
|
children: S
|
|
25565
|
-
}), w), r[17] = S, r[18] = w, r[19] = b, r[20] =
|
|
25566
|
-
let
|
|
25567
|
-
r[21] === m ?
|
|
25565
|
+
}), w), r[17] = S, r[18] = w, r[19] = b, r[20] = iG) : iG = r[20];
|
|
25566
|
+
let aG = v || m, oG;
|
|
25567
|
+
r[21] === m ? oG = r[22] : (oG = m && (0, import_jsx_runtime.jsx)(LoaderCircle, {
|
|
25568
25568
|
className: "h-4 w-4 mr-2 animate-spin"
|
|
25569
|
-
}), r[21] = m, r[22] =
|
|
25570
|
-
let
|
|
25571
|
-
r[23] !== g || r[24] !==
|
|
25569
|
+
}), r[21] = m, r[22] = oG);
|
|
25570
|
+
let sG;
|
|
25571
|
+
r[23] !== g || r[24] !== aG || r[25] !== oG || r[26] !== I ? (sG = (0, import_jsx_runtime.jsxs)(Button, {
|
|
25572
25572
|
"data-testid": "marimo-plugin-form-submit-button",
|
|
25573
25573
|
variant: I,
|
|
25574
|
-
disabled:
|
|
25574
|
+
disabled: aG,
|
|
25575
25575
|
type: "submit",
|
|
25576
25576
|
children: [
|
|
25577
|
-
|
|
25577
|
+
oG,
|
|
25578
25578
|
g
|
|
25579
25579
|
]
|
|
25580
|
-
}), r[23] = g, r[24] =
|
|
25581
|
-
let sG;
|
|
25582
|
-
r[28] !== _ || r[29] !== oG ? (sG = withTooltip(oG, _), r[28] = _, r[29] = oG, r[30] = sG) : sG = r[30];
|
|
25580
|
+
}), r[23] = g, r[24] = aG, r[25] = oG, r[26] = I, r[27] = sG) : sG = r[27];
|
|
25583
25581
|
let cG;
|
|
25584
|
-
r[
|
|
25582
|
+
r[28] !== _ || r[29] !== sG ? (cG = withTooltip(sG, _), r[28] = _, r[29] = sG, r[30] = cG) : cG = r[30];
|
|
25583
|
+
let uG;
|
|
25584
|
+
r[31] !== cG || r[32] !== iG ? (uG = (0, import_jsx_runtime.jsxs)("div", {
|
|
25585
25585
|
className: "flex justify-end gap-2 font-code",
|
|
25586
25586
|
children: [
|
|
25587
|
-
|
|
25588
|
-
|
|
25587
|
+
iG,
|
|
25588
|
+
cG
|
|
25589
25589
|
]
|
|
25590
|
-
}), r[31] =
|
|
25591
|
-
let
|
|
25592
|
-
r[34] !==
|
|
25593
|
-
className:
|
|
25594
|
-
onKeyDown:
|
|
25590
|
+
}), r[31] = cG, r[32] = iG, r[33] = uG) : uG = r[33];
|
|
25591
|
+
let dG;
|
|
25592
|
+
r[34] !== uG || r[35] !== q || r[36] !== Z || r[37] !== nG || r[38] !== rG ? (dG = (0, import_jsx_runtime.jsxs)("div", {
|
|
25593
|
+
className: q,
|
|
25594
|
+
onKeyDown: tG,
|
|
25595
25595
|
children: [
|
|
25596
|
-
tG,
|
|
25597
25596
|
Z,
|
|
25598
25597
|
nG,
|
|
25599
|
-
|
|
25598
|
+
rG,
|
|
25599
|
+
uG
|
|
25600
25600
|
]
|
|
25601
|
-
}), r[34] =
|
|
25602
|
-
let
|
|
25603
|
-
return r[40] !==
|
|
25601
|
+
}), r[34] = uG, r[35] = q, r[36] = Z, r[37] = nG, r[38] = rG, r[39] = dG) : dG = r[39];
|
|
25602
|
+
let fG;
|
|
25603
|
+
return r[40] !== dG || r[41] !== H ? (fG = (0, import_jsx_runtime.jsx)("form", {
|
|
25604
25604
|
className: "contents",
|
|
25605
25605
|
ref: j,
|
|
25606
25606
|
onSubmit: H,
|
|
25607
|
-
children:
|
|
25608
|
-
}), r[40] =
|
|
25607
|
+
children: dG
|
|
25608
|
+
}), r[40] = dG, r[41] = H, r[42] = fG) : fG = r[42], fG;
|
|
25609
25609
|
};
|
|
25610
25610
|
var Form = (e) => {
|
|
25611
25611
|
let r = (0, import_compiler_runtime$41.c)(24), c, l, u, d, f, p;
|
|
@@ -38171,13 +38171,13 @@ ${c}
|
|
|
38171
38171
|
iG
|
|
38172
38172
|
]
|
|
38173
38173
|
}), r[53] = nG, r[54] = iG, r[55] = aG) : aG = r[55];
|
|
38174
|
-
let
|
|
38175
|
-
return r[56] !== Z || r[57] !== aG ? (
|
|
38174
|
+
let sG;
|
|
38175
|
+
return r[56] !== Z || r[57] !== aG ? (sG = (0, import_jsx_runtime.jsxs)(ContextMenu, {
|
|
38176
38176
|
children: [
|
|
38177
38177
|
Z,
|
|
38178
38178
|
aG
|
|
38179
38179
|
]
|
|
38180
|
-
}), r[56] = Z, r[57] = aG, r[58] =
|
|
38180
|
+
}), r[56] = Z, r[57] = aG, r[58] = sG) : sG = r[58], sG;
|
|
38181
38181
|
}, InsertCellLine = (e) => {
|
|
38182
38182
|
let r = (0, import_compiler_runtime$10.c)(10), { position: c, onInsert: l } = e, u = c === "below" ? "bottom-0 translate-y-1/2" : "top-0 -translate-y-1/2", d;
|
|
38183
38183
|
r[0] === u ? d = r[1] : (d = cn("absolute left-0 right-0 z-30 flex h-3 items-center justify-center", "opacity-0 transition-opacity hover:opacity-80 focus-visible:opacity-100 focus:outline-hidden", u), r[0] = u, r[1] = d);
|
|
@@ -38321,7 +38321,7 @@ ${c}
|
|
|
38321
38321
|
function _temp2$2(e) {
|
|
38322
38322
|
e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
|
|
38323
38323
|
}
|
|
38324
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
38324
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-DdSlGZCR.js"));
|
|
38325
38325
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
38326
38326
|
var _a5;
|
|
38327
38327
|
let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { slideCells: h, skippedIds: g, noOutputIds: _, slideTypes: v, startCellIndex: y } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-Bfp04NdC.js";
|
|
2
2
|
import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
|
|
3
|
-
import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-
|
|
3
|
+
import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-RKitVHn8.js";
|
|
4
4
|
import { u as createLucideIcon } from "./dist-j30bBjjN.js";
|
|
5
5
|
import { t as Strings } from "./strings-DMLVGXRo.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-Dp_oQwaf.js";
|
|
@@ -6,10 +6,10 @@ import { o as __toESM } from "./chunk-Bfp04NdC.js";
|
|
|
6
6
|
import { c as useEventListener, g as Logger, h as cn, m as Events, t as Button } from "./button-Dr2uAwhT.js";
|
|
7
7
|
import { t as require_react } from "./react-DhGsCS90.js";
|
|
8
8
|
import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
|
|
9
|
-
import { ut as outputIsStale } from "./html-to-image-
|
|
9
|
+
import { ut as outputIsStale } from "./html-to-image-RKitVHn8.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BRZ_XYUw.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-j30bBjjN.js";
|
|
12
|
-
import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-
|
|
12
|
+
import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-vZhuiPnZ.js";
|
|
13
13
|
import { R as ChevronDown } from "./strings-DMLVGXRo.js";
|
|
14
14
|
import { X as useDebouncedCallback } from "./input-CqV2ZPgL.js";
|
|
15
15
|
import { v as kioskModeAtom } from "./toDate-CjUYDkFI.js";
|
package/package.json
CHANGED
|
@@ -98,4 +98,30 @@ describe("parseContent", () => {
|
|
|
98
98
|
{ type: "url", url: "https://github.com" },
|
|
99
99
|
]);
|
|
100
100
|
});
|
|
101
|
+
|
|
102
|
+
it("stops at JSON delimiters instead of swallowing them (#10567)", () => {
|
|
103
|
+
const parts = parseContent(
|
|
104
|
+
'[{"name":"inv.pdf","url":"https://example.com/p/AAA"}]',
|
|
105
|
+
);
|
|
106
|
+
expect(parts).toEqual([
|
|
107
|
+
{ type: "text", value: '[{"name":"inv.pdf","url":"' },
|
|
108
|
+
{ type: "url", url: "https://example.com/p/AAA" },
|
|
109
|
+
{ type: "text", value: '"}]' },
|
|
110
|
+
]);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("does not include a trailing double-quote in the href", () => {
|
|
114
|
+
const parts = parseContent('"https://example.com/x"');
|
|
115
|
+
expect(parts).toContainEqual({
|
|
116
|
+
type: "url",
|
|
117
|
+
url: "https://example.com/x",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("keeps apostrophes, which are valid in URLs", () => {
|
|
122
|
+
const parts = parseContent("https://example.com/O'Reilly");
|
|
123
|
+
expect(parts).toEqual([
|
|
124
|
+
{ type: "url", url: "https://example.com/O'Reilly" },
|
|
125
|
+
]);
|
|
126
|
+
});
|
|
101
127
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { jsonToMarkdown } from "../json-parser";
|
|
4
|
+
|
|
5
|
+
describe("jsonToMarkdown URL linkification", () => {
|
|
6
|
+
it("links a plain URL", () => {
|
|
7
|
+
const md = jsonToMarkdown([{ link: "https://marimo.io/path" }]);
|
|
8
|
+
expect(md).toContain("[https://marimo.io/path](https://marimo.io/path)");
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it("stops the link at the JSON delimiter, not the trailing quote (#10567)", () => {
|
|
12
|
+
const md = jsonToMarkdown([
|
|
13
|
+
{ attachments: '[{"url":"https://example.com/p/AAA"}]' },
|
|
14
|
+
]);
|
|
15
|
+
// The link target ends exactly at the URL; the closing `"}]` is left as
|
|
16
|
+
// text rather than pulled into the href.
|
|
17
|
+
expect(md).toContain("(https://example.com/p/AAA)");
|
|
18
|
+
expect(md).not.toContain('https://example.com/p/AAA"');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("does not swallow a trailing double-quote into the link", () => {
|
|
22
|
+
const md = jsonToMarkdown([{ v: '"https://example.com/x"' }]);
|
|
23
|
+
expect(md).toContain("(https://example.com/x)");
|
|
24
|
+
expect(md).not.toContain('https://example.com/x"');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("leaves existing markdown links untouched", () => {
|
|
28
|
+
const md = jsonToMarkdown([{ v: "[docs](https://marimo.io/docs)" }]);
|
|
29
|
+
expect(md).toContain("[docs](https://marimo.io/docs)");
|
|
30
|
+
// Must not double-wrap into [[docs](url)](url).
|
|
31
|
+
expect(md).not.toContain("[[docs]");
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
+
import { URL_REGEX } from "../url-parser";
|
|
3
4
|
import type { JsonString } from "./base64";
|
|
4
5
|
|
|
6
|
+
const GLOBAL_URL_REGEX = new RegExp(URL_REGEX.source, "g");
|
|
7
|
+
|
|
5
8
|
declare global {
|
|
6
9
|
interface BigInt {
|
|
7
10
|
toJSON(): unknown;
|
|
@@ -126,9 +129,8 @@ function formatValueForMarkdown(value: unknown): string {
|
|
|
126
129
|
return placeholder;
|
|
127
130
|
});
|
|
128
131
|
|
|
129
|
-
// Convert plain URLs to markdown links
|
|
130
|
-
|
|
131
|
-
stringValue = stringValue.replaceAll(urlRegex, "[$1]($1)");
|
|
132
|
+
// Convert plain URLs to markdown links using the shared URL matcher.
|
|
133
|
+
stringValue = stringValue.replaceAll(GLOBAL_URL_REGEX, "[$1]($1)");
|
|
132
134
|
|
|
133
135
|
// Restore markdown links from placeholders
|
|
134
136
|
for (const [placeholder, original] of placeholders) {
|
package/src/utils/url-parser.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/** Matches HTTP(S) URLs without consuming surrounding delimiters. */
|
|
4
|
+
export const URL_REGEX = /(https?:\/\/[^\s"<>`{}|\\^]+)/;
|
|
4
5
|
const imageRegex = /\.(png|jpe?g|gif|webp|svg|ico)(\?.*)?$/i;
|
|
5
6
|
const dataImageRegex = /^data:image\//i;
|
|
6
7
|
const knownImageDomains = ["avatars.githubusercontent.com"];
|
|
@@ -19,9 +20,9 @@ export function parseContent(text: string): ContentPart[] {
|
|
|
19
20
|
return [{ type: "image", url: text }];
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
const parts = text.split(
|
|
23
|
+
const parts = text.split(URL_REGEX).filter((part) => part !== "");
|
|
23
24
|
return parts.map((part) => {
|
|
24
|
-
const isUrl =
|
|
25
|
+
const isUrl = URL_REGEX.test(part);
|
|
25
26
|
if (isUrl) {
|
|
26
27
|
const isImage =
|
|
27
28
|
imageRegex.test(part) ||
|