@marimo-team/islands 0.22.4-dev1 → 0.22.4-dev11
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-DuD8BVl6.js → ConnectedDataExplorerComponent-mLj6D01z.js} +9 -9
- package/dist/{any-language-editor-BHH_pQ6M.js → any-language-editor-BIGc8RUt.js} +3 -3
- package/dist/assets/__vite-browser-external-C4JkHbyY.js +1 -0
- package/dist/assets/{worker-DUYMdbtA.js → worker-D-EdLKct.js} +2 -2
- package/dist/{chat-ui-Cel1kBfc.js → chat-ui-DfR3sT9K.js} +12 -12
- package/dist/{check-CWUkiHmb.js → check-Cex3x9fD.js} +1 -1
- package/dist/{copy-B7781WJ3.js → copy-BRF7ryOP.js} +1 -1
- package/dist/{dist-D_UjpfOY.js → dist-D56NKWim.js} +12 -11
- package/dist/{error-banner-Cjf0RU9I.js → error-banner-DexD-5js.js} +1 -1
- package/dist/{esm-4wmsH2lp.js → esm-BGo_Mcdt.js} +3 -3
- package/dist/{glide-data-editor-BqnvTmDo.js → glide-data-editor-BmyQCm0U.js} +6 -6
- package/dist/{input-CFY9gApZ.js → input-SSWXiS6n.js} +9 -9
- package/dist/{label-DbZGAoCH.js → label-CIR53v8V.js} +24 -24
- package/dist/main.js +98 -82
- package/dist/{mermaid-B2HDLx2g.js → mermaid-B93TKi2g.js} +4 -4
- package/dist/{process-output-DC1TOnIl.js → process-output-BvkX_OeE.js} +2841 -2279
- package/dist/{spec-CD7QaCV-.js → spec-ByDEU1T3.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{toDate-CUqpEbBS.js → toDate-D1_ZulwM.js} +2 -2
- package/dist/{tooltip-BXEpXV3R.js → tooltip-B5EnNyok.js} +2 -2
- package/dist/{types-D_ntCXg0.js → types-D4-TD_m0.js} +1 -1
- package/dist/{useAsyncData-rN1nzPaS.js → useAsyncData-C9ez7Ilo.js} +1 -1
- package/dist/{useDeepCompareMemoize-Ch-7Rk2x.js → useDeepCompareMemoize-BvvMxigY.js} +2 -2
- package/dist/{useLifecycle-4fA1pHoh.js → useLifecycle-2Vh-WDv6.js} +2 -2
- package/dist/{useTheme-MWfxn4oz.js → useTheme-CxjbgkRc.js} +3 -2
- package/dist/{vega-component-CPhNLfZZ.js → vega-component-Bzzut3-P.js} +7 -7
- package/dist/{zod-C6UGQ3fz.js → zod-D18k8Z52.js} +14 -12
- package/package.json +1 -1
- package/src/components/editor/TracebackModalContainer.tsx +22 -0
- package/src/components/editor/errors/traceback-modal.tsx +87 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +23 -3
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +16 -2
- package/src/components/ui/toast.tsx +3 -1
- package/src/core/MarimoApp.tsx +2 -0
- package/src/core/cells/__tests__/apply-transaction.test.ts +28 -0
- package/src/core/cells/cells.ts +13 -1
- package/src/core/cells/logs.ts +48 -9
- package/src/core/config/__tests__/config-schema.test.ts +2 -0
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/errors/traceback-atom.ts +9 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +8 -6
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +25 -0
- package/dist/assets/__vite-browser-external-WSlCcXn_.js +0 -1
|
@@ -4,15 +4,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
5
5
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
7
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
8
|
-
import { C as logNever, a as SelectContent, d as SelectValue, i as Select, r as capitalize, s as SelectItem, t as Label, u as SelectTrigger } from "./label-
|
|
9
|
-
import { G as marked, W as useNonce, _ as DropdownMenuSub, d as DropdownMenuContent, g as DropdownMenuSeparator, h as DropdownMenuPortal, p as DropdownMenuItem, r as Input, u as DropdownMenu, v as DropdownMenuSubContent, y as DropdownMenuSubTrigger } from "./input-
|
|
10
|
-
import { a as Plus, i as Trash, n as ErrorBoundary, o as Pencil, r as require_prop_types, t as BulkEdit } from "./types-
|
|
7
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BRF7ryOP.js";
|
|
8
|
+
import { C as logNever, a as SelectContent, d as SelectValue, i as Select, r as capitalize, s as SelectItem, t as Label, u as SelectTrigger } from "./label-CIR53v8V.js";
|
|
9
|
+
import { G as marked, W as useNonce, _ as DropdownMenuSub, d as DropdownMenuContent, g as DropdownMenuSeparator, h as DropdownMenuPortal, p as DropdownMenuItem, r as Input, u as DropdownMenu, v as DropdownMenuSubContent, y as DropdownMenuSubTrigger } from "./input-SSWXiS6n.js";
|
|
10
|
+
import { a as Plus, i as Trash, n as ErrorBoundary, o as Pencil, r as require_prop_types, t as BulkEdit } from "./types-D4-TD_m0.js";
|
|
11
11
|
import { g as Logger, h as Events, t as Button } from "./button-DNlNlZY_.js";
|
|
12
12
|
import "./react-dom-BSUuJjCR.js";
|
|
13
13
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
14
|
-
import "./zod-
|
|
15
|
-
import { n as useTheme, w as useEvent_default } from "./useTheme-
|
|
14
|
+
import "./zod-D18k8Z52.js";
|
|
15
|
+
import { n as useTheme, w as useEvent_default } from "./useTheme-CxjbgkRc.js";
|
|
16
16
|
import { A as require__Map, B as require__baseGetTag, C as require__hasPath, D as require_isArguments, E as require__isIndex, F as require_isFunction, G as assert, H as require__root, I as require_isObject, J as maybe, K as assertNever, L as require__isKey, M as require_eq, N as require__getNative, O as require__castPath, P as require__toSource, R as require_isSymbol, S as resolveCellsThunk, T as require_isLength, U as require__freeGlobal, V as require__Symbol, W as require_isArray, _ as isEditableGridCell, a as mergeAndRealizeTheme, b as isReadWriteCell, c as withAlpha, d as CompactSelection, f as GridCellKind, g as booleanCellIsEditable, h as InnerGridCellKind, i as makeCSSStyle, j as require__ListCache, k as require__MapCache, l as BooleanEmpty, m as GridColumnMenuIcon, n as ThemeContext, o as blend, p as GridColumnIcon, q as deepEqual, r as getDataEditorTheme, s as blendCache, t as ClickOutsideContainer, u as BooleanIndeterminate, v as isInnerOnlyCell, w as require__toKey, x as isSizedGridColumn, y as isObjectEditorCallbackResult, z as require_isObjectLike } from "./click-outside-container-vCXhHl-R.js";
|
|
17
17
|
import { t as styled_default } from "./dist-BoNJsA65.js";
|
|
18
18
|
let GlideDataEditor, glide_data_editor_default;
|
|
@@ -5,16 +5,16 @@ var _a;
|
|
|
5
5
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
6
6
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
8
|
-
import { a as createPopperScope, i as Root2$1,
|
|
9
|
-
import { t as Check } from "./check-
|
|
10
|
-
import { E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, L as ChevronUp, P as useDirection, R as ChevronDown, T as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, _ as menuControlVariants, b as menuSeparatorVariants, g as menuControlCheckVariants, h as menuContentCommon, k as $b5e257d569688ac6$export$619500959fc48b26, v as menuItemVariants, w as $a916eb452884faea$export$b7a616150fdb9f44, x as menuSubTriggerVariants, y as menuLabelVariants } from "./label-
|
|
8
|
+
import { a as createPopperScope, i as Root2$1, n as Arrow, r as Content, t as Anchor, u as createLucideIcon } from "./dist-D56NKWim.js";
|
|
9
|
+
import { t as Check } from "./check-Cex3x9fD.js";
|
|
10
|
+
import { E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, L as ChevronUp, P as useDirection, R as ChevronDown, T as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, _ as menuControlVariants, b as menuSeparatorVariants, g as menuControlCheckVariants, h as menuContentCommon, k as $b5e257d569688ac6$export$619500959fc48b26, v as menuItemVariants, w as $a916eb452884faea$export$b7a616150fdb9f44, x as menuSubTriggerVariants, y as menuLabelVariants } from "./label-CIR53v8V.js";
|
|
11
11
|
import { n as clsx_default } from "./clsx-yW_RAw0K.js";
|
|
12
12
|
import { d as createSlot, g as Logger, h as Events, m as useComposedRefs, p as composeRefs, y as cn } from "./button-DNlNlZY_.js";
|
|
13
13
|
import { t as require_react_dom } from "./react-dom-BSUuJjCR.js";
|
|
14
14
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
15
|
-
import { $ as StyleNamespace, X as withFullScreenAsRoot, Y as MAX_HEIGHT_OFFSET, Z as withSmartCollisionBoundary, at as FocusScope,
|
|
15
|
+
import { $ as StyleNamespace, X as withFullScreenAsRoot, Y as MAX_HEIGHT_OFFSET, Z as withSmartCollisionBoundary, _t as Primitive, at as FocusScope, dt as Presence, et as hideOthers, ft as useControllableState, gt as createContextScope, it as Portal, lt as useCallbackRef, mt as composeEventHandlers, rt as useFocusGuards, st as DismissableLayer, tt as Combination_default, ut as useId, vt as dispatchDiscreteCustomEvent } from "./zod-D18k8Z52.js";
|
|
16
16
|
import { i as debounce_default } from "./constants-CvyfaCvs.js";
|
|
17
|
-
import { w as useEvent_default } from "./useTheme-
|
|
17
|
+
import { w as useEvent_default } from "./useTheme-CxjbgkRc.js";
|
|
18
18
|
import { t as memoizeLastValue } from "./once-C_TIu-kR.js";
|
|
19
19
|
var ChevronRight = createLucideIcon("chevron-right", [["path", {
|
|
20
20
|
d: "m9 18 6-6-6-6",
|
|
@@ -291,15 +291,15 @@ var CONTENT_NAME$1 = "MenuContent", [MenuContentProvider, useMenuContentContext]
|
|
|
291
291
|
onDismiss: () => n.onOpenChange(false)
|
|
292
292
|
});
|
|
293
293
|
}), Slot = createSlot("MenuContent.ScrollLock"), MenuContentImpl = import_react.forwardRef((e4, t) => {
|
|
294
|
-
let { __scopeMenu: n, loop: r = false, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus:
|
|
294
|
+
let { __scopeMenu: n, loop: r = false, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: s, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: u, onPointerDownOutside: d, onFocusOutside: f, onInteractOutside: p, onDismiss: m, disableOutsideScroll: h, ...g } = e4, _ = useMenuContext(CONTENT_NAME$1, n), v = useMenuRootContext(CONTENT_NAME$1, n), y = usePopperScope(n), b = useRovingFocusGroupScope(n), x = useCollection(n), [S, C] = import_react.useState(null), w = import_react.useRef(null), T = useComposedRefs(t, w, _.onContentChange), E = import_react.useRef(0), D = import_react.useRef(""), O = import_react.useRef(0), k = import_react.useRef(null), j = import_react.useRef("right"), M = import_react.useRef(0), N = h ? Combination_default : import_react.Fragment, P = h ? {
|
|
295
295
|
as: Slot,
|
|
296
296
|
allowPinchZoom: true
|
|
297
297
|
} : void 0, F = (e5) => {
|
|
298
298
|
var _a2, _b;
|
|
299
|
-
let t2 = D.current + e5, n2 = x().filter((e6) => !e6.disabled), r2 = document.activeElement, i2 = (_a2 = n2.find((e6) => e6.ref.current === r2)) == null ? void 0 : _a2.textValue, a2 = getNextMatch(n2.map((e6) => e6.textValue), t2, i2),
|
|
299
|
+
let t2 = D.current + e5, n2 = x().filter((e6) => !e6.disabled), r2 = document.activeElement, i2 = (_a2 = n2.find((e6) => e6.ref.current === r2)) == null ? void 0 : _a2.textValue, a2 = getNextMatch(n2.map((e6) => e6.textValue), t2, i2), o = (_b = n2.find((e6) => e6.textValue === a2)) == null ? void 0 : _b.ref.current;
|
|
300
300
|
(function e6(t3) {
|
|
301
301
|
D.current = t3, window.clearTimeout(E.current), t3 !== "" && (E.current = window.setTimeout(() => e6(""), 1e3));
|
|
302
|
-
})(t2),
|
|
302
|
+
})(t2), o && setTimeout(() => o.focus());
|
|
303
303
|
};
|
|
304
304
|
import_react.useEffect(() => () => window.clearTimeout(E.current), []), useFocusGuards();
|
|
305
305
|
let I = import_react.useCallback((e5) => {
|
|
@@ -332,7 +332,7 @@ var CONTENT_NAME$1 = "MenuContent", [MenuContentProvider, useMenuContentContext]
|
|
|
332
332
|
var _a2;
|
|
333
333
|
e5.preventDefault(), (_a2 = w.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
334
334
|
}),
|
|
335
|
-
onUnmountAutoFocus:
|
|
335
|
+
onUnmountAutoFocus: s,
|
|
336
336
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DismissableLayer, {
|
|
337
337
|
asChild: true,
|
|
338
338
|
disableOutsidePointerEvents: c,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { a as createPopperScope, c as VISUALLY_HIDDEN_STYLES, i as Root2$1,
|
|
5
|
-
import { t as Check } from "./check-
|
|
4
|
+
import { a as createPopperScope, c as VISUALLY_HIDDEN_STYLES, i as Root2$1, n as Arrow, r as Content, t as Anchor, u as createLucideIcon } from "./dist-D56NKWim.js";
|
|
5
|
+
import { t as Check } from "./check-Cex3x9fD.js";
|
|
6
6
|
import { d as createSlot, g as Logger, h as Events, m as useComposedRefs, r as cva, y as cn } from "./button-DNlNlZY_.js";
|
|
7
7
|
import { t as require_react_dom } from "./react-dom-BSUuJjCR.js";
|
|
8
8
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
9
|
-
import { $ as StyleNamespace, X as withFullScreenAsRoot, Z as withSmartCollisionBoundary,
|
|
9
|
+
import { $ as StyleNamespace, X as withFullScreenAsRoot, Z as withSmartCollisionBoundary, _t as Primitive, at as FocusScope, et as hideOthers, ft as useControllableState, gt as createContextScope, it as Portal, lt as useCallbackRef, mt as composeEventHandlers, pt as useLayoutEffect2, rt as useFocusGuards, st as DismissableLayer, tt as Combination_default, ut as useId } from "./zod-D18k8Z52.js";
|
|
10
10
|
import { t as invariant } from "./invariant-e8eBgdux.js";
|
|
11
11
|
var ChevronDown = createLucideIcon("chevron-down", [["path", {
|
|
12
12
|
d: "m6 9 6 6 6-6",
|
|
@@ -105,7 +105,7 @@ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1), OPEN_KEY
|
|
|
105
105
|
"ArrowUp",
|
|
106
106
|
"ArrowDown"
|
|
107
107
|
], SELECTION_KEYS = [" ", "Enter"], SELECT_NAME = "Select", [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME), [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [createCollectionScope, createPopperScope]), usePopperScope = createPopperScope(), [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME), [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME), Select$1 = (e) => {
|
|
108
|
-
let { __scopeSelect: i, children: a, open: o, defaultOpen: s, onOpenChange: l, value: u, defaultValue: d, onValueChange: f, dir: p, name: m, autoComplete: h, disabled: g, required: _, form: v } = e, y = usePopperScope(i), [b, x] = import_react.useState(null), [S, C] = import_react.useState(null), [w, T] = import_react.useState(false),
|
|
108
|
+
let { __scopeSelect: i, children: a, open: o, defaultOpen: s, onOpenChange: l, value: u, defaultValue: d, onValueChange: f, dir: p, name: m, autoComplete: h, disabled: g, required: _, form: v } = e, y = usePopperScope(i), [b, x] = import_react.useState(null), [S, C] = import_react.useState(null), [w, T] = import_react.useState(false), E = useDirection(p), [D, k] = useControllableState({
|
|
109
109
|
prop: o,
|
|
110
110
|
defaultProp: s ?? false,
|
|
111
111
|
onChange: l,
|
|
@@ -130,9 +130,9 @@ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1), OPEN_KEY
|
|
|
130
130
|
contentId: useId(),
|
|
131
131
|
value: A,
|
|
132
132
|
onValueChange: j,
|
|
133
|
-
open:
|
|
133
|
+
open: D,
|
|
134
134
|
onOpenChange: k,
|
|
135
|
-
dir:
|
|
135
|
+
dir: E,
|
|
136
136
|
triggerPointerDownPosRef: M,
|
|
137
137
|
disabled: g,
|
|
138
138
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, {
|
|
@@ -167,7 +167,7 @@ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1), OPEN_KEY
|
|
|
167
167
|
};
|
|
168
168
|
Select$1.displayName = SELECT_NAME;
|
|
169
169
|
var TRIGGER_NAME = "SelectTrigger", SelectTrigger$1 = import_react.forwardRef((e, i) => {
|
|
170
|
-
let { __scopeSelect: a, disabled: o = false, ...s } = e, c = usePopperScope(a), l = useSelectContext(TRIGGER_NAME, a), u = l.disabled || o,
|
|
170
|
+
let { __scopeSelect: a, disabled: o = false, ...s } = e, c = usePopperScope(a), l = useSelectContext(TRIGGER_NAME, a), u = l.disabled || o, f = useComposedRefs(i, l.onTriggerChange), p = useCollection(a), m = import_react.useRef("touch"), [h, g, v] = useTypeaheadSearch((e2) => {
|
|
171
171
|
let i2 = p().filter((e3) => !e3.disabled), a2 = findNextItem(i2, e2, i2.find((e3) => e3.value === l.value));
|
|
172
172
|
a2 !== void 0 && l.onValueChange(a2.value);
|
|
173
173
|
}), y = (e2) => {
|
|
@@ -192,7 +192,7 @@ var TRIGGER_NAME = "SelectTrigger", SelectTrigger$1 = import_react.forwardRef((e
|
|
|
192
192
|
"data-disabled": u ? "" : void 0,
|
|
193
193
|
"data-placeholder": shouldShowPlaceholder(l.value) ? "" : void 0,
|
|
194
194
|
...s,
|
|
195
|
-
ref:
|
|
195
|
+
ref: f,
|
|
196
196
|
onClick: composeEventHandlers(s.onClick, (e2) => {
|
|
197
197
|
e2.currentTarget.focus(), m.current !== "mouse" && y(e2);
|
|
198
198
|
}),
|
|
@@ -257,16 +257,16 @@ var CONTENT_NAME = "SelectContent", SelectContent$1 = import_react.forwardRef((e
|
|
|
257
257
|
});
|
|
258
258
|
SelectContent$1.displayName = CONTENT_NAME;
|
|
259
259
|
var CONTENT_MARGIN = 10, [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME), CONTENT_IMPL_NAME = "SelectContentImpl", Slot = createSlot("SelectContent.RemoveScroll"), SelectContentImpl = import_react.forwardRef((e, i) => {
|
|
260
|
-
let { __scopeSelect: a, position: o = "item-aligned", onCloseAutoFocus: s, onEscapeKeyDown: c, onPointerDownOutside: l, side: u, sideOffset: d, align: f, alignOffset: p, arrowPadding: m, collisionBoundary: h, collisionPadding: g, sticky: v, hideWhenDetached: y, avoidCollisions: b, ...x } = e, S = useSelectContext(CONTENT_NAME, a), [C, w] = import_react.useState(null), [
|
|
260
|
+
let { __scopeSelect: a, position: o = "item-aligned", onCloseAutoFocus: s, onEscapeKeyDown: c, onPointerDownOutside: l, side: u, sideOffset: d, align: f, alignOffset: p, arrowPadding: m, collisionBoundary: h, collisionPadding: g, sticky: v, hideWhenDetached: y, avoidCollisions: b, ...x } = e, S = useSelectContext(CONTENT_NAME, a), [C, w] = import_react.useState(null), [T, O] = import_react.useState(null), k = useComposedRefs(i, (e2) => w(e2)), [A, j] = import_react.useState(null), [N, L] = import_react.useState(null), R = useCollection(a), [z, B] = import_react.useState(false), V = import_react.useRef(false);
|
|
261
261
|
import_react.useEffect(() => {
|
|
262
262
|
if (C) return hideOthers(C);
|
|
263
263
|
}, [C]), useFocusGuards();
|
|
264
264
|
let H = import_react.useCallback((e2) => {
|
|
265
265
|
let [i2, ...a2] = R().map((e3) => e3.ref.current), [o2] = a2.slice(-1), s2 = document.activeElement;
|
|
266
|
-
for (let a3 of e2) if (a3 === s2 || (a3 == null ? void 0 : a3.scrollIntoView({ block: "nearest" }), a3 === i2 &&
|
|
267
|
-
}, [R,
|
|
266
|
+
for (let a3 of e2) if (a3 === s2 || (a3 == null ? void 0 : a3.scrollIntoView({ block: "nearest" }), a3 === i2 && T && (T.scrollTop = 0), a3 === o2 && T && (T.scrollTop = T.scrollHeight), a3 == null ? void 0 : a3.focus(), document.activeElement !== s2)) return;
|
|
267
|
+
}, [R, T]), U = import_react.useCallback(() => H([A, C]), [
|
|
268
268
|
H,
|
|
269
|
-
|
|
269
|
+
A,
|
|
270
270
|
C
|
|
271
271
|
]);
|
|
272
272
|
import_react.useEffect(() => {
|
|
@@ -309,7 +309,7 @@ var CONTENT_MARGIN = 10, [SelectContentProvider, useSelectContentContext] = crea
|
|
|
309
309
|
a2 && setTimeout(() => a2.ref.current.focus());
|
|
310
310
|
}), J = import_react.useCallback((e2, i2, a2) => {
|
|
311
311
|
let o2 = !V.current && !a2;
|
|
312
|
-
(S.value !== void 0 && S.value === i2 || o2) && (
|
|
312
|
+
(S.value !== void 0 && S.value === i2 || o2) && (j(e2), o2 && (V.current = true));
|
|
313
313
|
}, [S.value]), Y = import_react.useCallback(() => C == null ? void 0 : C.focus(), [C]), Z = import_react.useCallback((e2, i2, a2) => {
|
|
314
314
|
let o2 = !V.current && !a2;
|
|
315
315
|
(S.value !== void 0 && S.value === i2 || o2) && L(e2);
|
|
@@ -328,14 +328,14 @@ var CONTENT_MARGIN = 10, [SelectContentProvider, useSelectContentContext] = crea
|
|
|
328
328
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContentProvider, {
|
|
329
329
|
scope: a,
|
|
330
330
|
content: C,
|
|
331
|
-
viewport:
|
|
332
|
-
onViewportChange:
|
|
331
|
+
viewport: T,
|
|
332
|
+
onViewportChange: O,
|
|
333
333
|
itemRefCallback: J,
|
|
334
|
-
selectedItem:
|
|
334
|
+
selectedItem: A,
|
|
335
335
|
onItemLeave: Y,
|
|
336
336
|
itemTextRefCallback: Z,
|
|
337
337
|
focusSelectedItem: U,
|
|
338
|
-
selectedItemText:
|
|
338
|
+
selectedItemText: N,
|
|
339
339
|
position: o,
|
|
340
340
|
isPositioned: z,
|
|
341
341
|
searchRef: K,
|
|
@@ -368,7 +368,7 @@ var CONTENT_MARGIN = 10, [SelectContentProvider, useSelectContentContext] = crea
|
|
|
368
368
|
...x,
|
|
369
369
|
...$,
|
|
370
370
|
onPlaced: () => B(true),
|
|
371
|
-
ref:
|
|
371
|
+
ref: k,
|
|
372
372
|
style: {
|
|
373
373
|
display: "flex",
|
|
374
374
|
flexDirection: "column",
|
|
@@ -409,7 +409,7 @@ var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition", SelectItemAlignedP
|
|
|
409
409
|
let o2 = i2.right - s2.right, c2 = window.innerWidth - a2.right - o2, l3 = window.innerWidth - e2.right - c2, d3 = e2.width + l3, f2 = Math.max(d3, i2.width), p3 = window.innerWidth - CONTENT_MARGIN, m3 = clamp(c2, [CONTENT_MARGIN, Math.max(CONTENT_MARGIN, p3 - f2)]);
|
|
410
410
|
u.style.minWidth = d3 + "px", u.style.right = m3 + "px";
|
|
411
411
|
}
|
|
412
|
-
let l2 = h(), d2 = window.innerHeight - CONTENT_MARGIN * 2, p2 = y.scrollHeight, m2 = window.getComputedStyle(f), _ = parseInt(m2.borderTopWidth, 10), v2 = parseInt(m2.paddingTop, 10), S2 = parseInt(m2.borderBottomWidth, 10), C2 = parseInt(m2.paddingBottom, 10), w2 = _ + v2 + p2 + C2 + S2,
|
|
412
|
+
let l2 = h(), d2 = window.innerHeight - CONTENT_MARGIN * 2, p2 = y.scrollHeight, m2 = window.getComputedStyle(f), _ = parseInt(m2.borderTopWidth, 10), v2 = parseInt(m2.paddingTop, 10), S2 = parseInt(m2.borderBottomWidth, 10), C2 = parseInt(m2.paddingBottom, 10), w2 = _ + v2 + p2 + C2 + S2, T = Math.min(b.offsetHeight * 5, w2), E2 = window.getComputedStyle(y), D = parseInt(E2.paddingTop, 10), O = parseInt(E2.paddingBottom, 10), k = e2.top + e2.height / 2 - CONTENT_MARGIN, A = d2 - k, j = b.offsetHeight / 2, M = b.offsetTop + j, N = _ + v2 + M, P = w2 - N;
|
|
413
413
|
if (N <= k) {
|
|
414
414
|
let e3 = l2.length > 0 && b === l2[l2.length - 1].ref.current;
|
|
415
415
|
u.style.bottom = "0px";
|
|
@@ -421,7 +421,7 @@ var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition", SelectItemAlignedP
|
|
|
421
421
|
let i3 = Math.max(k, _ + y.offsetTop + (e3 ? D : 0) + j) + P;
|
|
422
422
|
u.style.height = i3 + "px", y.scrollTop = N - k + y.offsetTop;
|
|
423
423
|
}
|
|
424
|
-
u.style.margin = `${CONTENT_MARGIN}px 0`, u.style.minHeight =
|
|
424
|
+
u.style.margin = `${CONTENT_MARGIN}px 0`, u.style.minHeight = T + "px", u.style.maxHeight = d2 + "px", o == null ? void 0 : o(), requestAnimationFrame(() => g.current = true);
|
|
425
425
|
}
|
|
426
426
|
}, [
|
|
427
427
|
h,
|
|
@@ -436,9 +436,9 @@ var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition", SelectItemAlignedP
|
|
|
436
436
|
o
|
|
437
437
|
]);
|
|
438
438
|
useLayoutEffect2(() => C(), [C]);
|
|
439
|
-
let [w,
|
|
439
|
+
let [w, E] = import_react.useState();
|
|
440
440
|
return useLayoutEffect2(() => {
|
|
441
|
-
f &&
|
|
441
|
+
f && E(window.getComputedStyle(f).zIndex);
|
|
442
442
|
}, [f]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportProvider, {
|
|
443
443
|
scope: a,
|
|
444
444
|
contentWrapper: u,
|
|
@@ -715,8 +715,8 @@ var SelectScrollButtonImpl = import_react.forwardRef((e, i) => {
|
|
|
715
715
|
});
|
|
716
716
|
SelectSeparator$1.displayName = SEPARATOR_NAME;
|
|
717
717
|
var ARROW_NAME = "SelectArrow", SelectArrow = import_react.forwardRef((e, i) => {
|
|
718
|
-
let { __scopeSelect: a, ...o } = e, s = usePopperScope(a), c = useSelectContext(ARROW_NAME, a),
|
|
719
|
-
return c.open &&
|
|
718
|
+
let { __scopeSelect: a, ...o } = e, s = usePopperScope(a), c = useSelectContext(ARROW_NAME, a), u = useSelectContentContext(ARROW_NAME, a);
|
|
719
|
+
return c.open && u.position === "popper" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Arrow, {
|
|
720
720
|
...s,
|
|
721
721
|
...o,
|
|
722
722
|
ref: i
|