@marimo-team/islands 0.17.5 → 0.17.6

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 (68) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DGGP9Mxg.js → ConnectedDataExplorerComponent-BC1bAfWX.js} +3 -3
  2. package/dist/{any-language-editor-Bs2c1bKU.js → any-language-editor-BpWjHMW2.js} +22 -22
  3. package/dist/{dist-DlSZED-1.js → dist-1NPzctn9.js} +2 -2
  4. package/dist/{dist-qGpLTiEi.js → dist-59eZyXwa.js} +3 -3
  5. package/dist/dist-8Gr13wFT.js +6 -0
  6. package/dist/{dist-D4LUTYHc.js → dist-8IZEIZE_.js} +2 -2
  7. package/dist/dist-BA1Ol0Yn.js +6 -0
  8. package/dist/{dist-DzKKEoge.js → dist-BGBHvY7x.js} +3 -3
  9. package/dist/{dist-8v4BI_h_.js → dist-BJKL0WEK.js} +1 -1
  10. package/dist/{dist-B3CNaJau.js → dist-BPwzuLH_.js} +119 -119
  11. package/dist/{dist-D08oiinq.js → dist-BRfGeCYG.js} +77 -77
  12. package/dist/{dist-CxRajUZ6.js → dist-BXNAv-Y6.js} +1 -1
  13. package/dist/{dist-7CqcJssH.js → dist-BZrCuBDi.js} +6 -6
  14. package/dist/{dist-C02gS--y.js → dist-Bevt_gzr.js} +41 -41
  15. package/dist/{dist-DGKjHTv9.js → dist-C1xRKkqR.js} +5 -5
  16. package/dist/{dist-DSDOMDNR.js → dist-C8SV9SiM.js} +4 -4
  17. package/dist/{dist-HKzG1oF6.js → dist-CCFXVP1F.js} +1 -1
  18. package/dist/{dist-BgsDu-bU.js → dist-CLkbwjpG.js} +1 -1
  19. package/dist/{dist-BMhv6XDi.js → dist-CP1MdHH-.js} +27 -27
  20. package/dist/{dist-Dh7gw0Ay.js → dist-CWyLmhAN.js} +2 -2
  21. package/dist/{dist-CXimnGhI.js → dist-C_BPvPwx.js} +2 -2
  22. package/dist/dist-CbNrcsEy.js +10 -0
  23. package/dist/{dist-DiO9ni9a.js → dist-Cba8uTcG.js} +2 -2
  24. package/dist/{dist-C5Ns3q-m.js → dist-Cf1Q6zai.js} +31 -31
  25. package/dist/{dist-_tHnp24J.js → dist-CiMy2-5u.js} +3 -3
  26. package/dist/dist-CkXa7yhd.js +10 -0
  27. package/dist/dist-CoHj7yHI.js +6 -0
  28. package/dist/{dist-XkGsOiy0.js → dist-CqG4DwQn.js} +2 -2
  29. package/dist/{dist-owpR56zn.js → dist-Ct4F6_s2.js} +1 -1
  30. package/dist/{dist-DTNqkRGE.js → dist-DG9oMdD2.js} +3 -3
  31. package/dist/{dist-CawOxmKh.js → dist-DKdtgJ4Q.js} +5 -5
  32. package/dist/{dist-K_AqLCfS.js → dist-DQOkkAzs.js} +3 -3
  33. package/dist/dist-DVuYVZws.js +6 -0
  34. package/dist/{dist-DvsjKDQ4.js → dist-DgnYtm7R.js} +1 -1
  35. package/dist/dist-DjH2J8yO.js +6 -0
  36. package/dist/{dist-DGnWQOnS.js → dist-Djl1P_Vh.js} +3 -3
  37. package/dist/{dist-DbHWFmjZ.js → dist-Kh7kDIJB.js} +1 -1
  38. package/dist/dist-MCqj0bEP.js +12 -0
  39. package/dist/{dist-eSnWVS11.js → dist-k6dhIy0O.js} +3 -3
  40. package/dist/dist-l9YJLCkC.js +6 -0
  41. package/dist/{dist-BYS0EtbC.js → dist-m4uUGntS.js} +2 -2
  42. package/dist/{dist-D_GkrgWD.js → dist-qXlX_Isq.js} +2 -2
  43. package/dist/{dist-CBu8cgzz.js → dist-t5bQPtMZ.js} +43 -45
  44. package/dist/{esm-CQIOyi5v.js → esm-HxIp3fzy.js} +1387 -1435
  45. package/dist/{formats-kyFd0DPJ.js → formats-b5g0iERd.js} +1 -1
  46. package/dist/{glide-data-editor-1bUl_mRe.js → glide-data-editor-hF8NzJm2.js} +2 -2
  47. package/dist/main.js +64 -1053
  48. package/dist/{mermaid-DIjoC4T4.js → mermaid-BAe4A_1z.js} +2 -2
  49. package/dist/{spec-rqRnkIf4.js → spec-9eipa51K.js} +1 -1
  50. package/dist/{types-Bt7p5SYB.js → types-O1gHduIo.js} +1 -1
  51. package/dist/{useAsyncData-Dp2V69OV.js → useAsyncData-D8_fNj6a.js} +1 -1
  52. package/dist/{useTheme-D7vlj42b.js → useTheme-BzICL4qs.js} +23 -24
  53. package/dist/{vega-component-_Sq_uxzm.js → vega-component-B26vOtT-.js} +3 -3
  54. package/package.json +1 -1
  55. package/src/components/app-config/data-form.tsx +3 -3
  56. package/src/core/codemirror/language/languages/sql/sql.ts +2 -1
  57. package/dist/dist-B9JCXzyv.js +0 -6
  58. package/dist/dist-C6QrJGYr.js +0 -10
  59. package/dist/dist-CFZ32udY.js +0 -6
  60. package/dist/dist-CmgxQNWN.js +0 -10
  61. package/dist/dist-Cr6Cu8sC.js +0 -6
  62. package/dist/dist-NxHLuq7w.js +0 -6
  63. package/dist/dist-S2JcqPPB.js +0 -12
  64. package/dist/dist-hcPlrsR9.js +0 -6
  65. package/dist/dist-poXa8G8m.js +0 -6
  66. package/dist/node-sql-parser-IKID_dZE.js +0 -70437
  67. /package/dist/{esm-CopBBL2y.js → esm-CS8JKDQL.js} +0 -0
  68. /package/dist/{react-plotly-Cs07wkly.js → react-plotly-YQqow0sD.js} +0 -0
package/dist/main.js CHANGED
@@ -6,21 +6,21 @@ import { t as require_react } from "./react-DHL_F5hS.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-5MdCVm0X.js";
7
7
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-bxQOKABs.js";
8
8
  import { A as createLucideIcon, C as DismissableLayer, E as dispatchDiscreteCustomEvent, O as createContextScope, S as useLayoutEffect2, T as Primitive, _ as Content$3, a as __awaiter, b as useSize, c as withSmartCollisionBoundary, f as useControllableState, g as Arrow, h as Anchor, i as useFocusGuards, k as composeEventHandlers, l as StyleNamespace, m as Portal, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as Presence, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as Root$5, v as Root2$5, w as useCallbackRef, x as useId$10, y as createPopperScope } from "./Combination-DrSsMSEB.js";
9
- import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, 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 createReducerAndAtoms, 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, z as SquareFunction } from "./spec-rqRnkIf4.js";
9
+ import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, 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 createReducerAndAtoms, 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, z as SquareFunction } from "./spec-9eipa51K.js";
10
10
  import { t as Check } from "./check-BZnPxXnd.js";
11
11
  import { C as createCollection, D as usePrevious, E as useOnUnmount, F as $b5e257d569688ac6$export$535bd6ca7f90a273, L as X, N as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, O as assertNever, P as $18f2051aff69b9bf$export$a54013f0d02a8f82, S as useDirection, T as useOnMount, a as SelectItem, b as Icon, c as SelectTrigger, d as selectStyles, f as MENU_ITEM_DISABLED, g as menuItemVariants, i as SelectGroup, j as $a916eb452884faea$export$b7a616150fdb9f44, k as logNever, l as SelectValue, n as Select, o as SelectLabel, r as SelectContent, s as SelectSeparator, t as Label, u as NativeSelect, v as menuSeparatorVariants, w as clamp$2, x as Trigger$4, z as ChevronDown } from "./label-Wr-xTlW7.js";
12
- import { $ as $e93e671b31057976$export$b8473d3665f3a75a, A as $a049562f99e7db0e$export$f9c6924e160136d1, At as $c87311424ea30a05$export$9ac100e40613ea10, B as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Bt as $431fbd86ca7dc216$export$b204af158042fbac, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $3985021b0ad6602f$export$37fb8590cf2c088c, Dt as $313b98861ee5dd6c$export$d6875122194c7b44, E as createRovingFocusGroupScope, Et as $df56164dff5785e2$export$4338b53315abf666, F as $514c0188e459b4c0$export$9afb8bc826b033ea, Ft as $3ef42575df84b30b$export$9d1611c77c2fe928, G as $64fa3d84918910a7$export$c245e6201fed2f75, Gt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, H as $64fa3d84918910a7$export$29f1550f4b0d4415, Ht as $ff5963eb1fccf552$export$e08e3b67e392101e, I as $d2b4bc8c273e7be6$export$24d547caef80ccd1, It as $d4ee10de306f2510$export$4282f70798064fe0, J as $64fa3d84918910a7$export$fabf2dc03a41866e, Jt as Search, K as $64fa3d84918910a7$export$c62b8e45d58ddad9, Kt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, L as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Lt as $d4ee10de306f2510$export$cd4e5573fbe2b576, M as $ee014567cb39d3f0$export$f551688fc98f2e09, Mt as $c87311424ea30a05$export$fedb369cb70207f1, N as $ee014567cb39d3f0$export$ff05c3ac10437e03, Nt as $7215afc6de606d6b$export$de79e2c695e052f3, O as $3985021b0ad6602f$export$f5b8910cec6cf069, Ot as $c87311424ea30a05$export$6446a186d09e379e, P as $514c0188e459b4c0$export$5f1af8db9871e1d6, Pt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as ChevronRight, R as $01b77f81d0f07f68$export$75b6ee27786ba447, Rt as $d4ee10de306f2510$export$e58f029f0fbfdb29, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as Root$6, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$4d86445c2cf5e3, Ut as $bdb11010cef70236$export$b4cc09c592e8fdb8, V as $64fa3d84918910a7$export$2881499e37b75b9a, Vt as $431fbd86ca7dc216$export$f21a1ffae260145a, W as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Wt as $bdb11010cef70236$export$f680877a34711e37, X as capitalize_default, Xt as Pencil, Y as useNonce, Yt as Plus, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Circle, _ as DropdownMenuLabel, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as Input, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, ct as $6c7bd7858deea686$export$cd11ab140839f11d, d as useDebounceControlledState, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as useDebouncedCallback, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuItem, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuGroup, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, i as DebouncedNumberInput, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $d3e0e05bdfcf66bd$export$c24727297075ec6a, jt as $c87311424ea30a05$export$a11b0059900ceec8, k as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, kt as $c87311424ea30a05$export$78551043582a6a98, l as prettyNumber, lt as $fca6afa0e843324b$export$87b761675e8eaa10, m as DropdownMenuContent, mt as $9ab94262bd0047c7$export$420e68273165f4ec, n as ErrorBoundary, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, o as OnBlurredInput, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenu, pt as $6179b936705e76d3$export$ae780daf29e6d456, q as $64fa3d84918910a7$export$ef03459518577ad4, qt as Trash, r as DebouncedInput, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as NumberField, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as BulkEdit, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuPortal, vt as _class_private_field_init, w as Item$2, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuSeparator, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $01b77f81d0f07f68$export$b04be29aa201d4f5, zt as $f4e2df6bd15f8569$export$98658e8c59125e6a } from "./types-Bt7p5SYB.js";
13
- import { S as CircleQuestionMark, _ as isUrl, a as AlertDescription, b as Deferred, c as toDate, d as millisecondsInHour, f as millisecondsInMinute, g as getRuntimeManager, h as asRemoteURL, i as Alert, l as constructFrom, m as millisecondsInWeek, n as useDeepCompareMemoize, o as AlertTitle, p as millisecondsInSecond, r as dequal, s as isValid$1, t as arrow, u as millisecondsInDay, v as require_cuid2, x as isWasm, y as isStaticNotebook } from "./formats-kyFd0DPJ.js";
12
+ import { $ as $e93e671b31057976$export$b8473d3665f3a75a, A as $a049562f99e7db0e$export$f9c6924e160136d1, At as $c87311424ea30a05$export$9ac100e40613ea10, B as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Bt as $431fbd86ca7dc216$export$b204af158042fbac, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $3985021b0ad6602f$export$37fb8590cf2c088c, Dt as $313b98861ee5dd6c$export$d6875122194c7b44, E as createRovingFocusGroupScope, Et as $df56164dff5785e2$export$4338b53315abf666, F as $514c0188e459b4c0$export$9afb8bc826b033ea, Ft as $3ef42575df84b30b$export$9d1611c77c2fe928, G as $64fa3d84918910a7$export$c245e6201fed2f75, Gt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, H as $64fa3d84918910a7$export$29f1550f4b0d4415, Ht as $ff5963eb1fccf552$export$e08e3b67e392101e, I as $d2b4bc8c273e7be6$export$24d547caef80ccd1, It as $d4ee10de306f2510$export$4282f70798064fe0, J as $64fa3d84918910a7$export$fabf2dc03a41866e, Jt as Search, K as $64fa3d84918910a7$export$c62b8e45d58ddad9, Kt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, L as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Lt as $d4ee10de306f2510$export$cd4e5573fbe2b576, M as $ee014567cb39d3f0$export$f551688fc98f2e09, Mt as $c87311424ea30a05$export$fedb369cb70207f1, N as $ee014567cb39d3f0$export$ff05c3ac10437e03, Nt as $7215afc6de606d6b$export$de79e2c695e052f3, O as $3985021b0ad6602f$export$f5b8910cec6cf069, Ot as $c87311424ea30a05$export$6446a186d09e379e, P as $514c0188e459b4c0$export$5f1af8db9871e1d6, Pt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as ChevronRight, R as $01b77f81d0f07f68$export$75b6ee27786ba447, Rt as $d4ee10de306f2510$export$e58f029f0fbfdb29, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as Root$6, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$4d86445c2cf5e3, Ut as $bdb11010cef70236$export$b4cc09c592e8fdb8, V as $64fa3d84918910a7$export$2881499e37b75b9a, Vt as $431fbd86ca7dc216$export$f21a1ffae260145a, W as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Wt as $bdb11010cef70236$export$f680877a34711e37, X as capitalize_default, Xt as Pencil, Y as useNonce, Yt as Plus, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Circle, _ as DropdownMenuLabel, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as Input, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, ct as $6c7bd7858deea686$export$cd11ab140839f11d, d as useDebounceControlledState, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as useDebouncedCallback, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuItem, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuGroup, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, i as DebouncedNumberInput, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $d3e0e05bdfcf66bd$export$c24727297075ec6a, jt as $c87311424ea30a05$export$a11b0059900ceec8, k as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, kt as $c87311424ea30a05$export$78551043582a6a98, l as prettyNumber, lt as $fca6afa0e843324b$export$87b761675e8eaa10, m as DropdownMenuContent, mt as $9ab94262bd0047c7$export$420e68273165f4ec, n as ErrorBoundary, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, o as OnBlurredInput, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenu, pt as $6179b936705e76d3$export$ae780daf29e6d456, q as $64fa3d84918910a7$export$ef03459518577ad4, qt as Trash, r as DebouncedInput, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as NumberField, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as BulkEdit, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuPortal, vt as _class_private_field_init, w as Item$2, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuSeparator, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $01b77f81d0f07f68$export$b04be29aa201d4f5, zt as $f4e2df6bd15f8569$export$98658e8c59125e6a } from "./types-O1gHduIo.js";
13
+ import { S as CircleQuestionMark, _ as isUrl, a as AlertDescription, b as Deferred, c as toDate, d as millisecondsInHour, f as millisecondsInMinute, g as getRuntimeManager, h as asRemoteURL, i as Alert, l as constructFrom, m as millisecondsInWeek, n as useDeepCompareMemoize, o as AlertTitle, p as millisecondsInSecond, r as dequal, s as isValid$1, t as arrow, u as millisecondsInDay, v as require_cuid2, x as isWasm, y as isStaticNotebook } from "./formats-b5g0iERd.js";
14
14
  import { a as Slot$1, c as composeRefs, d as cn, f as clsx_default, i as useEventListener, l as useComposedRefs, n as buttonVariants, o as createSlot, r as cva, t as Button, u as Events } from "./button-B8zS4Mtw.js";
15
15
  import { c as Functions, i as parseShortcut, l as throwNotImplemented, o as Objects, r as isPlatformMac, s as Logger, t as NOT_SET } from "./hotkeys-DVxFjl2s.js";
16
16
  import { t as require_jsx_runtime } from "./jsx-runtime-CvL6gNI-.js";
17
17
  import { t as require_react_dom } from "./react-dom-BTjywDxo.js";
18
18
  import { a as Portal$2, c as Tooltip, d as TooltipProvider, f as TooltipRoot, i as Overlay, l as TooltipContent, m as TooltipProvider$1, n as ErrorBanner, o as Root$7, p as TooltipTrigger, r as Content$4, s as CellNotInitializedError, t as Banner, u as TooltipPortal } from "./error-banner-B7LmpmGT.js";
19
- import { a as _extends$5, c as setDiagnostics, d as CopyClipboardIcon, l as historyField, n as minimalSetup, o as forEachDiagnostic, r as langs, s as linter, t as esm_default, u as insertTab } from "./esm-CQIOyi5v.js";
19
+ import { a as _extends$5, c as historyField, l as insertTab, n as minimalSetup, o as forEachDiagnostic, r as langs, s as setDiagnostics, t as esm_default, u as CopyClipboardIcon } from "./esm-HxIp3fzy.js";
20
20
  import { t as purify } from "./purify.es-CDFkadZl.js";
21
- import { C as INTERNAL_buildStoreRev1, _ as useAtom, a as getResolvedMarimoConfig, b as useStore, c as AppConfigSchema, d as useJotaiEffect, f as waitFor, g as Provider, h as useEvent_default, i as autoInstantiateAtom, l as createDeepEqualAtom, m as isEqual_default, n as useTheme, o as localeAtom, p as isIslands, r as aiEnabledAtom, s as useResolvedMarimoConfig, t as resolvedThemeAtom, u as store, v as useAtomValue, w as INTERNAL_getBuildingBlocksRev1, x as atom, y as useSetAtom } from "./useTheme-D7vlj42b.js";
22
- import { $ as ViewPlugin, At as RangeSet, B as tags$1, Dt as Facet$1, E as getIndentUnit, Et as EditorState, Ft as Text$2, I as syntaxTree, It as Transaction, J as parseMixed, L as unfoldAll, Nt as StateEffect, Pt as StateField, Q as GutterMarker, S as foldInside, Tt as EditorSelection, Y as Decoration, Z as EditorView, _t as showPanel, b as foldAll, dt as keymap, et as WidgetType, f as StreamLanguage, kt as Prec, l as LanguageDescription, mt as placeholder, ot as gutter, u as LanguageSupport, ut as hoverTooltip, w as foldNodeProp, wt as Compartment } from "./dist-CBu8cgzz.js";
23
- import { d as snippet, n as acceptCompletion, o as closeCompletion, r as autocompletion, u as insertCompletionText } from "./dist-D08oiinq.js";
21
+ import { C as INTERNAL_getBuildingBlocksRev1, S as INTERNAL_buildStoreRev1, _ as useAtomValue, a as localeAtom, b as atom, c as createDeepEqualAtom, d as waitFor, f as isIslands, g as useAtom, h as Provider, i as getResolvedMarimoConfig, l as store, m as useEvent_default, n as aiEnabledAtom, o as useResolvedMarimoConfig, p as isEqual_default, r as autoInstantiateAtom, s as AppConfigSchema, t as useTheme, u as useJotaiEffect, v as useSetAtom, y as useStore } from "./useTheme-BzICL4qs.js";
22
+ import { $ as WidgetType, B as tags$1, Ct as EditorSelection, Dt as Prec, E as getIndentUnit, I as syntaxTree, J as parseMixed, L as unfoldAll, Mt as StateField, Nt as Text$2, Pt as Transaction, Q as ViewPlugin, S as foldInside, St as Compartment, Tt as Facet$1, Y as Decoration, Z as EditorView, b as foldAll, ct as hoverTooltip, f as StreamLanguage, ft as placeholder, ht as showPanel, jt as StateEffect, l as LanguageDescription, lt as keymap, u as LanguageSupport, w as foldNodeProp, wt as EditorState } from "./dist-t5bQPtMZ.js";
23
+ import { d as snippet, n as acceptCompletion, o as closeCompletion, r as autocompletion, u as insertCompletionText } from "./dist-BRfGeCYG.js";
24
24
  import { E as _baseRest_default, b as _baseTimes_default, t as isArrayLikeObject_default } from "./isArrayLikeObject-1qkWxZbL.js";
25
25
  import "./isSymbol-BnxbuvDK.js";
26
26
  import { n as _arrayMap_default } from "./toString-CT4n1k2E.js";
@@ -37,34 +37,34 @@ import "./_arrayReduce-CmsTTAw1.js";
37
37
  import "./now-8WTe-KKa.js";
38
38
  import { n as KnownQueryParams, r as debounce_default } from "./constants-BlvmN57i.js";
39
39
  import { a as tooltipHandler, n as vegaLoadData, r as createBatchedLoader, t as parseCsvData } from "./loader-Dj9XWZTh.js";
40
- import { A as literal, B as tuple, C as any, D as custom, E as boolean$2, F as object$1, G as toJSONSchema, H as unknown, I as optional, J as $ZodError, K as parse$3, L as record, M as nan, N as never, O as discriminatedUnion, P as number$2, R as strictObject, S as _null, T as base64, U as safeParseAsync, V as union, W as ZodError$1, Y as prettifyError, _ as ZodString$1, a as ZodIssueCode$1, b as _enum, c as ZodBoolean$1, d as ZodDiscriminatedUnion$1, f as ZodEnum$1, g as ZodOptional$1, h as ZodObject$1, i as string$3, j as looseObject, k as lazy$4, l as ZodDate$1, m as ZodNumber$1, n as date, o as ZodAny$1, p as ZodLiteral$1, q as parseAsync, r as number$3, s as ZodArray$1, t as zod_default, u as ZodDefault$1, v as ZodType$1, w as array$2, x as _instanceof, y as ZodUnion$1, z as string$2 } from "./zod-0AbTN3Cg.js";
40
+ import { A as literal, B as tuple, C as any, D as custom, E as boolean$2, F as object$1, G as toJSONSchema, H as unknown, I as optional, J as $ZodError, K as parse$3, L as record, M as nan, N as never, O as discriminatedUnion, P as number$2, R as strictObject, S as _null, T as base64, U as safeParseAsync, V as union, W as ZodError$1, Y as prettifyError, _ as ZodString$1, a as ZodIssueCode$1, b as _enum, c as ZodBoolean$1, d as ZodDiscriminatedUnion$1, f as ZodEnum$1, g as ZodOptional$1, h as ZodObject$1, i as string$3, j as looseObject, k as lazy$3, l as ZodDate$1, m as ZodNumber$1, n as date, o as ZodAny$1, p as ZodLiteral$1, q as parseAsync, r as number$3, s as ZodArray$1, t as zod_default, u as ZodDefault$1, v as ZodType$1, w as array$2, x as _instanceof, y as ZodUnion$1, z as string$2 } from "./zod-0AbTN3Cg.js";
41
41
  import { t as invariant } from "./invariant-Cl2wkkjN.js";
42
42
  import { a as arrayInsert, c as arrayShallowEquals, i as arrayDelete, l as uniqueBy, n as once, o as arrayInsertMany, r as Arrays, s as arrayMove, t as memoizeLastValue, u as clamp } from "./once-rI5AYku5.js";
43
43
  import { n as getIframeCapabilities, t as useIframeCapabilities } from "./useIframeCapabilities-B9u0SmJ4.js";
44
- import { i as markdown, o as markdownLanguage } from "./dist-C02gS--y.js";
45
- import "./dist-C5Ns3q-m.js";
46
- import "./dist-CxRajUZ6.js";
47
- import "./dist-B3CNaJau.js";
48
- import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-D_GkrgWD.js";
44
+ import { i as markdown, o as markdownLanguage } from "./dist-Bevt_gzr.js";
45
+ import "./dist-Cf1Q6zai.js";
46
+ import "./dist-BXNAv-Y6.js";
47
+ import "./dist-BPwzuLH_.js";
48
+ import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-qXlX_Isq.js";
49
49
  import { n as stexMath } from "./stex-BmcrV7cx.js";
50
50
  import { i as main_exports, r as init_main } from "./main-63eIj2Yx.js";
51
51
  import { t as marked } from "./marked.esm-DE8HU3tw.js";
52
- import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-D4LUTYHc.js";
52
+ import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-8IZEIZE_.js";
53
53
  import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-Cm1uulbm.js";
54
54
  import { t as require_prop_types } from "./prop-types-CzOfzj9N.js";
55
- import { t as useAsyncData } from "./useAsyncData-Dp2V69OV.js";
56
- import "./dist-owpR56zn.js";
57
- import "./dist-CXimnGhI.js";
58
- import "./dist-DvsjKDQ4.js";
59
- import "./dist-BgsDu-bU.js";
60
- import "./dist-DiO9ni9a.js";
61
- import "./dist-DSDOMDNR.js";
62
- import "./dist-XkGsOiy0.js";
63
- import "./dist-DbHWFmjZ.js";
64
- import "./dist-DlSZED-1.js";
65
- import "./dist-HKzG1oF6.js";
66
- import "./dist-BMhv6XDi.js";
67
- import "./dist-8v4BI_h_.js";
55
+ import { t as useAsyncData } from "./useAsyncData-D8_fNj6a.js";
56
+ import "./dist-Ct4F6_s2.js";
57
+ import "./dist-C_BPvPwx.js";
58
+ import "./dist-DgnYtm7R.js";
59
+ import "./dist-CLkbwjpG.js";
60
+ import "./dist-Cba8uTcG.js";
61
+ import "./dist-C8SV9SiM.js";
62
+ import "./dist-CqG4DwQn.js";
63
+ import "./dist-Kh7kDIJB.js";
64
+ import "./dist-1NPzctn9.js";
65
+ import "./dist-CCFXVP1F.js";
66
+ import "./dist-CP1MdHH-.js";
67
+ import "./dist-BJKL0WEK.js";
68
68
  import "./apl-Css595_H.js";
69
69
  import "./asciiarmor-BTCuJwxh.js";
70
70
  import "./asn1-DXjhS5QI.js";
@@ -149,7 +149,7 @@ import "./xquery-BErHIIc-.js";
149
149
  import "./yacas-BBBJNs0h.js";
150
150
  import "./z80-nG9RRukG.js";
151
151
  import "./mscgen-DWWpdZnb.js";
152
- import "./dist-DTNqkRGE.js";
152
+ import "./dist-DG9oMdD2.js";
153
153
  import { n as formats } from "./vega-loader.browser-BK7-IO9k.js";
154
154
  import "./precisionRound-DMLkFNYv.js";
155
155
  import "./defaultLocale-BPzjWfXP.js";
@@ -12187,7 +12187,7 @@ ${c.join("\n")}`;
12187
12187
  combine: (e) => e[0]
12188
12188
  }), formattingChangeEffect = StateEffect.define();
12189
12189
  async function formatSQL(e) {
12190
- let { formatDialect: r, duckdb: c } = await import("./esm-CopBBL2y.js"), l = e.state.field(languageAdapterState), d = getIndentUnit(e.state);
12190
+ let { formatDialect: r, duckdb: c } = await import("./esm-CS8JKDQL.js"), l = e.state.field(languageAdapterState), d = getIndentUnit(e.state);
12191
12191
  if (l.type !== "sql") {
12192
12192
  Logger.error("Language adapter is not SQL");
12193
12193
  return;
@@ -20228,7 +20228,7 @@ ${c.join("\n")}`;
20228
20228
  return new LanguageSupport(StreamLanguage.define(e));
20229
20229
  }
20230
20230
  function sql$1(e) {
20231
- return import("./dist-DzKKEoge.js").then((r) => r.sql({
20231
+ return import("./dist-BGBHvY7x.js").then((r) => r.sql({
20232
20232
  dialect: r[e]
20233
20233
  }));
20234
20234
  }
@@ -20241,7 +20241,7 @@ ${c.join("\n")}`;
20241
20241
  "ino"
20242
20242
  ],
20243
20243
  load() {
20244
- return import("./dist-B9JCXzyv.js").then((e) => e.cpp());
20244
+ return import("./dist-BA1Ol0Yn.js").then((e) => e.cpp());
20245
20245
  }
20246
20246
  }),
20247
20247
  LanguageDescription.of({
@@ -20260,7 +20260,7 @@ ${c.join("\n")}`;
20260
20260
  "hxx"
20261
20261
  ],
20262
20262
  load() {
20263
- return import("./dist-B9JCXzyv.js").then((e) => e.cpp());
20263
+ return import("./dist-BA1Ol0Yn.js").then((e) => e.cpp());
20264
20264
  }
20265
20265
  }),
20266
20266
  LanguageDescription.of({
@@ -20281,7 +20281,7 @@ ${c.join("\n")}`;
20281
20281
  "css"
20282
20282
  ],
20283
20283
  load() {
20284
- return import("./dist-Dh7gw0Ay.js").then((e) => e.css());
20284
+ return import("./dist-CWyLmhAN.js").then((e) => e.css());
20285
20285
  }
20286
20286
  }),
20287
20287
  LanguageDescription.of({
@@ -20290,7 +20290,7 @@ ${c.join("\n")}`;
20290
20290
  "go"
20291
20291
  ],
20292
20292
  load() {
20293
- return import("./dist-qGpLTiEi.js").then((e) => e.go());
20293
+ return import("./dist-59eZyXwa.js").then((e) => e.go());
20294
20294
  }
20295
20295
  }),
20296
20296
  LanguageDescription.of({
@@ -20305,7 +20305,7 @@ ${c.join("\n")}`;
20305
20305
  "hbs"
20306
20306
  ],
20307
20307
  load() {
20308
- return import("./dist-DGKjHTv9.js").then((e) => e.html());
20308
+ return import("./dist-C1xRKkqR.js").then((e) => e.html());
20309
20309
  }
20310
20310
  }),
20311
20311
  LanguageDescription.of({
@@ -20314,7 +20314,7 @@ ${c.join("\n")}`;
20314
20314
  "java"
20315
20315
  ],
20316
20316
  load() {
20317
- return import("./dist-CFZ32udY.js").then((e) => e.java());
20317
+ return import("./dist-8Gr13wFT.js").then((e) => e.java());
20318
20318
  }
20319
20319
  }),
20320
20320
  LanguageDescription.of({
@@ -20330,7 +20330,7 @@ ${c.join("\n")}`;
20330
20330
  "cjs"
20331
20331
  ],
20332
20332
  load() {
20333
- return import("./dist-eSnWVS11.js").then((e) => e.javascript());
20333
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript());
20334
20334
  }
20335
20335
  }),
20336
20336
  LanguageDescription.of({
@@ -20343,7 +20343,7 @@ ${c.join("\n")}`;
20343
20343
  "map"
20344
20344
  ],
20345
20345
  load() {
20346
- return import("./dist-Cr6Cu8sC.js").then((e) => e.json());
20346
+ return import("./dist-DjH2J8yO.js").then((e) => e.json());
20347
20347
  }
20348
20348
  }),
20349
20349
  LanguageDescription.of({
@@ -20352,7 +20352,7 @@ ${c.join("\n")}`;
20352
20352
  "jsx"
20353
20353
  ],
20354
20354
  load() {
20355
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20355
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20356
20356
  jsx: true
20357
20357
  }));
20358
20358
  }
@@ -20363,7 +20363,7 @@ ${c.join("\n")}`;
20363
20363
  "less"
20364
20364
  ],
20365
20365
  load() {
20366
- return import("./dist-DGnWQOnS.js").then((e) => e.less());
20366
+ return import("./dist-Djl1P_Vh.js").then((e) => e.less());
20367
20367
  }
20368
20368
  }),
20369
20369
  LanguageDescription.of({
@@ -20372,7 +20372,7 @@ ${c.join("\n")}`;
20372
20372
  "liquid"
20373
20373
  ],
20374
20374
  load() {
20375
- return import("./dist-S2JcqPPB.js").then((e) => e.liquid());
20375
+ return import("./dist-MCqj0bEP.js").then((e) => e.liquid());
20376
20376
  }
20377
20377
  }),
20378
20378
  LanguageDescription.of({
@@ -20389,7 +20389,7 @@ ${c.join("\n")}`;
20389
20389
  "mkd"
20390
20390
  ],
20391
20391
  load() {
20392
- return import("./dist-7CqcJssH.js").then((e) => e.markdown());
20392
+ return import("./dist-BZrCuBDi.js").then((e) => e.markdown());
20393
20393
  }
20394
20394
  }),
20395
20395
  LanguageDescription.of({
@@ -20415,7 +20415,7 @@ ${c.join("\n")}`;
20415
20415
  "phtml"
20416
20416
  ],
20417
20417
  load() {
20418
- return import("./dist-C6QrJGYr.js").then((e) => e.php());
20418
+ return import("./dist-CbNrcsEy.js").then((e) => e.php());
20419
20419
  }
20420
20420
  }),
20421
20421
  LanguageDescription.of({
@@ -20443,7 +20443,7 @@ ${c.join("\n")}`;
20443
20443
  ],
20444
20444
  filename: /^(BUCK|BUILD)$/,
20445
20445
  load() {
20446
- return import("./dist-K_AqLCfS.js").then((e) => e.python());
20446
+ return import("./dist-DQOkkAzs.js").then((e) => e.python());
20447
20447
  }
20448
20448
  }),
20449
20449
  LanguageDescription.of({
@@ -20452,7 +20452,7 @@ ${c.join("\n")}`;
20452
20452
  "rs"
20453
20453
  ],
20454
20454
  load() {
20455
- return import("./dist-hcPlrsR9.js").then((e) => e.rust());
20455
+ return import("./dist-l9YJLCkC.js").then((e) => e.rust());
20456
20456
  }
20457
20457
  }),
20458
20458
  LanguageDescription.of({
@@ -20461,7 +20461,7 @@ ${c.join("\n")}`;
20461
20461
  "sass"
20462
20462
  ],
20463
20463
  load() {
20464
- return import("./dist-_tHnp24J.js").then((e) => e.sass({
20464
+ return import("./dist-CiMy2-5u.js").then((e) => e.sass({
20465
20465
  indented: true
20466
20466
  }));
20467
20467
  }
@@ -20472,7 +20472,7 @@ ${c.join("\n")}`;
20472
20472
  "scss"
20473
20473
  ],
20474
20474
  load() {
20475
- return import("./dist-_tHnp24J.js").then((e) => e.sass());
20475
+ return import("./dist-CiMy2-5u.js").then((e) => e.sass());
20476
20476
  }
20477
20477
  }),
20478
20478
  LanguageDescription.of({
@@ -20496,7 +20496,7 @@ ${c.join("\n")}`;
20496
20496
  "tsx"
20497
20497
  ],
20498
20498
  load() {
20499
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20499
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20500
20500
  jsx: true,
20501
20501
  typescript: true
20502
20502
  }));
@@ -20513,7 +20513,7 @@ ${c.join("\n")}`;
20513
20513
  "cts"
20514
20514
  ],
20515
20515
  load() {
20516
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20516
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20517
20517
  typescript: true
20518
20518
  }));
20519
20519
  }
@@ -20525,7 +20525,7 @@ ${c.join("\n")}`;
20525
20525
  "wast"
20526
20526
  ],
20527
20527
  load() {
20528
- return import("./dist-poXa8G8m.js").then((e) => e.wast());
20528
+ return import("./dist-DVuYVZws.js").then((e) => e.wast());
20529
20529
  }
20530
20530
  }),
20531
20531
  LanguageDescription.of({
@@ -20542,7 +20542,7 @@ ${c.join("\n")}`;
20542
20542
  "svg"
20543
20543
  ],
20544
20544
  load() {
20545
- return import("./dist-BYS0EtbC.js").then((e) => e.xml());
20545
+ return import("./dist-m4uUGntS.js").then((e) => e.xml());
20546
20546
  }
20547
20547
  }),
20548
20548
  LanguageDescription.of({
@@ -20555,7 +20555,7 @@ ${c.join("\n")}`;
20555
20555
  "yml"
20556
20556
  ],
20557
20557
  load() {
20558
- return import("./dist-NxHLuq7w.js").then((e) => e.yaml());
20558
+ return import("./dist-CoHj7yHI.js").then((e) => e.yaml());
20559
20559
  }
20560
20560
  }),
20561
20561
  LanguageDescription.of({
@@ -21663,13 +21663,13 @@ ${c.join("\n")}`;
21663
21663
  "vue"
21664
21664
  ],
21665
21665
  load() {
21666
- return import("./dist-CmgxQNWN.js").then((e) => e.vue());
21666
+ return import("./dist-CkXa7yhd.js").then((e) => e.vue());
21667
21667
  }
21668
21668
  }),
21669
21669
  LanguageDescription.of({
21670
21670
  name: "Angular Template",
21671
21671
  load() {
21672
- return import("./dist-CawOxmKh.js").then((e) => e.angular());
21672
+ return import("./dist-DKdtgJ4Q.js").then((e) => e.angular());
21673
21673
  }
21674
21674
  })
21675
21675
  ], cache$1 = /* @__PURE__ */ new WeakMap(), newline = /(\n|\r\n?|\u2028|\u2029)/g, leadingWhitespace = /^\s*/, nonWhitespace = /\S/, slice$1 = Array.prototype.slice, zero = 48, nine = 57, lowerA = 97, lowerF = 102, upperA = 65, upperF = 70;
@@ -30795,530 +30795,9 @@ ${JSON.stringify(e2, null, 4)}`);
30795
30795
  })
30796
30796
  ]);
30797
30797
  }
30798
- const lazy$3 = (e) => {
30799
- let r;
30800
- return async () => (r || (r = e()), await r);
30801
- };
30802
- var NodeSqlParser = class {
30803
- constructor(e = {}) {
30804
- __publicField(this, "opts");
30805
- __publicField(this, "parser", null);
30806
- __publicField(this, "offsetRecord", {});
30807
- __publicField(this, "getParser", lazy$3(async () => {
30808
- if (this.parser) return this.parser;
30809
- let e = await import("./node-sql-parser-IKID_dZE.js").then(__toDynamicImportESM(1)), { Parser: r } = e.default || e;
30810
- return this.parser = new r(), this.parser;
30811
- }));
30812
- this.opts = e;
30813
- }
30814
- async parse(e, r) {
30815
- var _a2, _b2;
30816
- this.offsetRecord = {};
30817
- let c = (_b2 = (_a2 = this.opts).getParserOptions) == null ? void 0 : _b2.call(_a2, r.state), l = await this.sanitizeSql(e, c);
30818
- try {
30819
- let e2 = await this.getParser();
30820
- return (c == null ? void 0 : c.database) === "DuckDB" ? this.parseWithDuckDBSupport(l, c) : {
30821
- success: true,
30822
- errors: [],
30823
- ast: e2.astify(l, c)
30824
- };
30825
- } catch (e2) {
30826
- return {
30827
- success: false,
30828
- errors: [
30829
- this.extractErrorInfo(e2, l)
30830
- ]
30831
- };
30832
- }
30833
- }
30834
- async sanitizeSql(e, r) {
30835
- if (r == null ? void 0 : r.ignoreBrackets) {
30836
- let { sql: r2, offsetRecord: c } = replaceBracketsWithQuotes(e);
30837
- return this.offsetRecord = c, r2;
30838
- }
30839
- return e;
30840
- }
30841
- async parseWithDuckDBSupport(e, r) {
30842
- let c = await this.getParser(), l = removeCommentsFromStart(e).trimStart().toLowerCase();
30843
- if (l.startsWith("from") || l.includes("macro")) return {
30844
- success: true,
30845
- errors: []
30846
- };
30847
- let d = e;
30848
- l.includes("create or replace table") && (this.offsetRecord[e.indexOf("create or replace table")] = -11, d = e.replace(/create or replace table/i, "create table"));
30849
- try {
30850
- let e2 = {
30851
- ...r,
30852
- database: "PostgreSQL"
30853
- };
30854
- return {
30855
- success: true,
30856
- errors: [],
30857
- ast: c.astify(d, e2)
30858
- };
30859
- } catch (r2) {
30860
- return {
30861
- success: false,
30862
- errors: [
30863
- this.extractErrorInfo(r2, e)
30864
- ]
30865
- };
30866
- }
30867
- }
30868
- extractErrorInfo(e, r) {
30869
- var _a2, _b2, _c2;
30870
- let c = 1, l = 1, d = (e == null ? void 0 : e.message) || "SQL parsing error", f = e;
30871
- if (f == null ? void 0 : f.location) c = ((_a2 = f.location.start) == null ? void 0 : _a2.line) || 1, l = ((_b2 = f.location.start) == null ? void 0 : _b2.column) || 1;
30872
- else if (f == null ? void 0 : f.hash) c = f.hash.line || 1, l = ((_c2 = f.hash.loc) == null ? void 0 : _c2.first_column) || 1;
30873
- else {
30874
- let e2 = d.match(/line (\d+)/i), r2 = d.match(/column (\d+)/i);
30875
- (e2 == null ? void 0 : e2[1]) && (c = parseInt(e2[1], 10)), (r2 == null ? void 0 : r2[1]) && (l = parseInt(r2[1], 10));
30876
- }
30877
- for (let [e2, r2] of Object.entries(this.offsetRecord)) l > parseInt(e2, 10) && (l -= r2);
30878
- return l > r.length && (l = r.length), {
30879
- message: this.cleanErrorMessage(d),
30880
- line: Math.max(1, c),
30881
- column: l,
30882
- severity: "error"
30883
- };
30884
- }
30885
- cleanErrorMessage(e) {
30886
- return e.replace(/^Error: /, "").replace(/Expected .* but .* found\./i, (e2) => e2.replace(/but .* found/, "found unexpected token")).trim();
30887
- }
30888
- async validateSql(e, r) {
30889
- return (await this.parse(e, r)).errors;
30890
- }
30891
- async extractTableReferences(e) {
30892
- try {
30893
- return (await this.getParser()).tableList(e).map((e2) => {
30894
- let r = e2.split("::");
30895
- return r[r.length - 1] || e2;
30896
- });
30897
- } catch {
30898
- return [];
30899
- }
30900
- }
30901
- async extractColumnReferences(e) {
30902
- try {
30903
- return (await this.getParser()).columnList(e).map((e2) => {
30904
- let r = e2.split("::");
30905
- return r[r.length - 1] || e2;
30906
- });
30907
- } catch {
30908
- return [];
30909
- }
30910
- }
30911
- };
30912
- function removeCommentsFromStart(e, r = [
30913
- "/*",
30914
- "--"
30915
- ]) {
30916
- let c = [];
30917
- if (r.includes("/*") && c.push("/\\*[\\s\\S]*?\\*/"), r.includes("--") && c.push("--[^\\n]*"), c.length === 0) return e;
30918
- let l = RegExp(`^\\s*(${c.join("|")})\\s*`, ""), d = e, f = "";
30919
- for (; d !== f; ) f = d, d = d.replace(l, "");
30920
- return d;
30921
- }
30922
- var QUOTE_LENGTH = 2;
30923
- function replaceBracketsWithQuotes(e) {
30924
- let r = {};
30925
- return {
30926
- sql: e.replace(/("(?:[^"\\]|\\.)*")|('(?:[^'\\]|\\.)*')|(\{[^}]*\})/g, (e2, c, l, d, f) => c || l ? e2 : d ? (r[f] = QUOTE_LENGTH, `'${d}'`) : e2),
30927
- offsetRecord: r
30928
- };
30929
- }
30930
- var DEFAULT_DELAY = 750;
30931
- function convertToCodeMirrorDiagnostic(e, r) {
30932
- let c = r.line(e.line).from + Math.max(0, e.column - 1);
30933
- return {
30934
- from: c,
30935
- to: c + 1,
30936
- severity: e.severity,
30937
- message: e.message,
30938
- source: "sql-parser"
30939
- };
30940
- }
30941
- function sqlLinter(e = {}) {
30942
- let r = e.parser || new NodeSqlParser();
30943
- return linter(async (e2) => {
30944
- let c = e2.state.doc, l = c.toString();
30945
- return l.trim() ? (await r.validateSql(l, {
30946
- state: e2.state
30947
- })).map((e3) => convertToCodeMirrorDiagnostic(e3, c)) : [];
30948
- }, {
30949
- delay: e.delay || DEFAULT_DELAY
30950
- });
30951
- }
30952
- function isObjectNamespace(e) {
30953
- return typeof e == "object" && !Array.isArray(e) && !("self" in e);
30954
- }
30955
- function isSelfChildrenNamespace(e) {
30956
- return typeof e == "object" && !Array.isArray(e) && "self" in e && "children" in e;
30957
- }
30958
30798
  function isArrayNamespace(e) {
30959
30799
  return Array.isArray(e);
30960
30800
  }
30961
- function determineSemanticType(e, r, c, l) {
30962
- let d = e.length;
30963
- if (r === "string" || r === "completion" && l && isArrayNamespace(l)) return "column";
30964
- if (r === "namespace" && c) {
30965
- if (isArrayNamespace(c)) return "table";
30966
- if (isObjectNamespace(c)) return Object.values(c).some((e2) => isArrayNamespace(e2) || isSelfChildrenNamespace(e2) && isArrayNamespace(e2.children)) ? d <= 1 ? "database" : "schema" : d === 0 ? "database" : "namespace";
30967
- }
30968
- if (r === "completion" && c) return isArrayNamespace(c) ? "table" : (isObjectNamespace(c) && Object.values(c).some((e2) => isArrayNamespace(e2) || isSelfChildrenNamespace(e2) && isArrayNamespace(e2.children)), d <= 1 ? "database" : "schema");
30969
- switch (d) {
30970
- case 0:
30971
- return "database";
30972
- case 1:
30973
- return "schema";
30974
- default:
30975
- return "namespace";
30976
- }
30977
- }
30978
- function traverseNamespacePath(e, r, c = {}) {
30979
- let { maxDepth: l = 10 } = c;
30980
- if (r === "" && isSelfChildrenNamespace(e)) {
30981
- let r2 = determineSemanticType([], "completion", e.children);
30982
- return {
30983
- completion: e.self,
30984
- path: [],
30985
- type: "completion",
30986
- semanticType: r2,
30987
- namespace: e.children
30988
- };
30989
- }
30990
- let d = r.split(".").filter((e2) => e2.length > 0);
30991
- return d.length === 0 || d.length > l ? null : traverseNamespaceRecursive(e, d, [], c);
30992
- }
30993
- function traverseNamespaceRecursive(e, r, c, l, d) {
30994
- if (r.length === 0) {
30995
- if (isSelfChildrenNamespace(e)) {
30996
- let r2 = determineSemanticType(c, "completion", e.children, d);
30997
- return {
30998
- completion: e.self,
30999
- path: c,
31000
- type: "completion",
31001
- semanticType: r2,
31002
- namespace: e.children
31003
- };
31004
- }
31005
- return {
31006
- path: c,
31007
- type: "namespace",
31008
- semanticType: determineSemanticType(c, "namespace", e, d),
31009
- namespace: e
31010
- };
31011
- }
31012
- let [f, ...h] = r, { caseSensitive: g = false } = l;
31013
- if (!f) return null;
31014
- if (isObjectNamespace(e)) {
31015
- let r2 = g ? Object.keys(e).find((e2) => e2 === f) : Object.keys(e).find((e2) => e2.toLowerCase() === f.toLowerCase());
31016
- if (r2) {
31017
- let d2 = e[r2];
31018
- if (d2) return traverseNamespaceRecursive(d2, h, [
31019
- ...c,
31020
- r2
31021
- ], l, e);
31022
- }
31023
- } else if (isSelfChildrenNamespace(e)) return traverseNamespaceRecursive(e.children, r, c, l, e);
31024
- else if (isArrayNamespace(e)) {
31025
- for (let r2 of e) if (typeof r2 == "string") {
31026
- if ((g ? r2 === f : r2.toLowerCase() === f.toLowerCase()) && h.length === 0) {
31027
- let l2 = determineSemanticType([
31028
- ...c,
31029
- r2
31030
- ], "string", void 0, e);
31031
- return {
31032
- value: r2,
31033
- path: [
31034
- ...c,
31035
- r2
31036
- ],
31037
- type: "string",
31038
- semanticType: l2
31039
- };
31040
- }
31041
- } else if ((g ? r2.label === f : r2.label.toLowerCase() === f.toLowerCase()) && h.length === 0) {
31042
- let l2 = determineSemanticType([
31043
- ...c,
31044
- r2.label
31045
- ], "completion", void 0, e);
31046
- return {
31047
- completion: r2,
31048
- path: [
31049
- ...c,
31050
- r2.label
31051
- ],
31052
- type: "completion",
31053
- semanticType: l2
31054
- };
31055
- }
31056
- }
31057
- return null;
31058
- }
31059
- function findNamespaceCompletions(e, r, c = {}) {
31060
- let l = [];
31061
- if (r.includes(".")) {
31062
- let l2 = r.lastIndexOf("."), d = r.substring(0, l2), f = r.substring(l2 + 1), h = traverseNamespacePath(e, d, c);
31063
- if (h == null ? void 0 : h.namespace) return findCompletionsInNamespace(h.namespace, f, h.path, c);
31064
- } else return findCompletionsInNamespace(e, r, [], c);
31065
- return l;
31066
- }
31067
- function findCompletionsInNamespace(e, r, c, l) {
31068
- let d = [], { caseSensitive: f = false, allowPartialMatch: h = true } = l;
31069
- if (isObjectNamespace(e)) {
31070
- for (let [l2, g] of Object.entries(e)) if (h ? f ? l2.startsWith(r) : l2.toLowerCase().startsWith(r.toLowerCase()) : f ? l2 === r : l2.toLowerCase() === r.toLowerCase()) if (isSelfChildrenNamespace(g)) {
31071
- let r2 = determineSemanticType([
31072
- ...c,
31073
- l2
31074
- ], "completion", g.children, e);
31075
- d.push({
31076
- completion: g.self,
31077
- path: [
31078
- ...c,
31079
- l2
31080
- ],
31081
- type: "completion",
31082
- semanticType: r2,
31083
- namespace: g.children
31084
- });
31085
- } else {
31086
- let r2 = determineSemanticType([
31087
- ...c,
31088
- l2
31089
- ], "namespace", g, e);
31090
- d.push({
31091
- path: [
31092
- ...c,
31093
- l2
31094
- ],
31095
- type: "namespace",
31096
- semanticType: r2,
31097
- namespace: g
31098
- });
31099
- }
31100
- } else if (isSelfChildrenNamespace(e)) {
31101
- if (h ? f ? e.self.label.startsWith(r) : e.self.label.toLowerCase().startsWith(r.toLowerCase()) : f ? e.self.label === r : e.self.label.toLowerCase() === r.toLowerCase()) {
31102
- let r2 = determineSemanticType([
31103
- ...c,
31104
- e.self.label
31105
- ], "completion", e.children);
31106
- d.push({
31107
- completion: e.self,
31108
- path: [
31109
- ...c,
31110
- e.self.label
31111
- ],
31112
- type: "completion",
31113
- semanticType: r2,
31114
- namespace: e.children
31115
- });
31116
- }
31117
- d.push(...findCompletionsInNamespace(e.children, r, c, l));
31118
- } else if (isArrayNamespace(e)) {
31119
- for (let l2 of e) if (typeof l2 == "string") {
31120
- if (h ? f ? l2.startsWith(r) : l2.toLowerCase().startsWith(r.toLowerCase()) : f ? l2 === r : l2.toLowerCase() === r.toLowerCase()) {
31121
- let r2 = determineSemanticType([
31122
- ...c,
31123
- l2
31124
- ], "string", void 0, e);
31125
- d.push({
31126
- value: l2,
31127
- path: [
31128
- ...c,
31129
- l2
31130
- ],
31131
- type: "string",
31132
- semanticType: r2
31133
- });
31134
- }
31135
- } else if (h ? f ? l2.label.startsWith(r) : l2.label.toLowerCase().startsWith(r.toLowerCase()) : f ? l2.label === r : l2.label.toLowerCase() === r.toLowerCase()) {
31136
- let r2 = determineSemanticType([
31137
- ...c,
31138
- l2.label
31139
- ], "completion", void 0, e);
31140
- d.push({
31141
- completion: l2,
31142
- path: [
31143
- ...c,
31144
- l2.label
31145
- ],
31146
- type: "completion",
31147
- semanticType: r2
31148
- });
31149
- }
31150
- }
31151
- return d;
31152
- }
31153
- function findNamespaceItemByEndMatch(e, r, c = {}) {
31154
- let l = [], { maxDepth: d = 10 } = c;
31155
- collectAllItems(e, [], l, d);
31156
- let { caseSensitive: f = false } = c;
31157
- return l.filter((e2) => e2.path.some((e3) => f ? e3 === r : e3.toLowerCase() === r.toLowerCase())).sort((e2, c2) => {
31158
- var _a2, _b2;
31159
- let l2 = f ? e2.path[e2.path.length - 1] === r : ((_a2 = e2.path[e2.path.length - 1]) == null ? void 0 : _a2.toLowerCase()) === r.toLowerCase(), d2 = f ? c2.path[c2.path.length - 1] === r : ((_b2 = c2.path[c2.path.length - 1]) == null ? void 0 : _b2.toLowerCase()) === r.toLowerCase();
31160
- return l2 && !d2 ? -1 : !l2 && d2 ? 1 : e2.path.length - c2.path.length;
31161
- });
31162
- }
31163
- function collectAllItems(e, r, c, l) {
31164
- if (!(r.length >= l)) {
31165
- if (isObjectNamespace(e)) for (let [d, f] of Object.entries(e)) {
31166
- let h = [
31167
- ...r,
31168
- d
31169
- ];
31170
- if (isSelfChildrenNamespace(f)) {
31171
- let r2 = determineSemanticType(h, "completion", f.children, e);
31172
- c.push({
31173
- completion: f.self,
31174
- path: h,
31175
- type: "completion",
31176
- semanticType: r2,
31177
- namespace: f.children
31178
- }), collectAllItems(f.children, h, c, l);
31179
- } else {
31180
- let r2 = determineSemanticType(h, "namespace", f, e);
31181
- c.push({
31182
- path: h,
31183
- type: "namespace",
31184
- semanticType: r2,
31185
- namespace: f
31186
- }), collectAllItems(f, h, c, l);
31187
- }
31188
- }
31189
- else if (isSelfChildrenNamespace(e)) {
31190
- let d = determineSemanticType(r, "completion", e.children);
31191
- c.push({
31192
- completion: e.self,
31193
- path: r,
31194
- type: "completion",
31195
- semanticType: d,
31196
- namespace: e.children
31197
- }), collectAllItems(e.children, r, c, l);
31198
- } else if (isArrayNamespace(e)) for (let l2 of e) if (typeof l2 == "string") {
31199
- let d = determineSemanticType([
31200
- ...r,
31201
- l2
31202
- ], "string", void 0, e);
31203
- c.push({
31204
- value: l2,
31205
- path: [
31206
- ...r,
31207
- l2
31208
- ],
31209
- type: "string",
31210
- semanticType: d
31211
- });
31212
- } else {
31213
- let d = determineSemanticType([
31214
- ...r,
31215
- l2.label
31216
- ], "completion", void 0, e);
31217
- c.push({
31218
- completion: l2,
31219
- path: [
31220
- ...r,
31221
- l2.label
31222
- ],
31223
- type: "completion",
31224
- semanticType: d
31225
- });
31226
- }
31227
- }
31228
- }
31229
- function resolveNamespaceItem(e, r, c = {}) {
31230
- let { enableFuzzySearch: l = false } = c, d = traverseNamespacePath(e, r, c);
31231
- if (d) return d;
31232
- let f = findNamespaceCompletions(e, r, c);
31233
- if (f.length > 0) return f[0] || null;
31234
- if (l) {
31235
- let l2 = findNamespaceItemByEndMatch(e, r, c);
31236
- if (l2.length > 0) return l2[0] || null;
31237
- }
31238
- return null;
31239
- }
31240
- function filterSchemaByTableRefs(e, r) {
31241
- if (r.size === 0) return {};
31242
- if (isObjectNamespace(e)) {
31243
- let c = {};
31244
- for (let [l, d] of Object.entries(e)) if (Array.from(r).some((e2) => e2.toLowerCase() === l.toLowerCase())) c[l] = d;
31245
- else if (isObjectNamespace(d)) {
31246
- let e2 = filterSchemaByTableRefs(d, r);
31247
- Object.keys(e2).length > 0 && (c[l] = e2);
31248
- }
31249
- return c;
31250
- }
31251
- return e;
31252
- }
31253
- function sqlHover(e = {}) {
31254
- let { schema: r = {}, keywords: c = {}, hoverTime: l = 300, enableKeywords: d = true, enableTables: f = true, enableColumns: h = true, enableFuzzySearch: g = true, parser: _ = new NodeSqlParser(), tooltipRender: y, tooltipRenderers: b = {} } = e, S = null;
31255
- return hoverTooltip(async (e2, l2, w) => {
31256
- let { from: D, to: P, text: F } = e2.state.doc.lineAt(l2), R = l2, z = l2;
31257
- S === null && (S = typeof c == "function" ? c(e2) : Promise.resolve(c));
31258
- let H = await S;
31259
- for (; R > D && /[\w.]/.test(F[R - D - 1] ?? ""); ) R--;
31260
- for (; z < P && /[\w.]/.test(F[z - D] ?? ""); ) z++;
31261
- if (R === l2 && w < 0 || z === l2 && w > 0) return null;
31262
- let Q = F.slice(R - D, z - D).toLowerCase();
31263
- if (!Q || Q.length === 0) return null;
31264
- let iX = typeof r == "function" ? r(e2) : r, aX = null;
31265
- if (`${Q}`, !aX && d && H[Q] && (H[Q], aX = {
31266
- word: Q,
31267
- view: e2,
31268
- pos: l2,
31269
- tooltipType: "keyword",
31270
- keywordData: {
31271
- keyword: Q,
31272
- info: H[Q]
31273
- }
31274
- }), !aX && (f || h) && iX) {
31275
- let r2 = e2.state.doc.toString(), c2 = await _.extractTableReferences(r2), d2 = new Set(c2.map((e3) => e3.toLowerCase())), f2 = filterSchemaByTableRefs(iX, d2), h2 = resolveNamespaceItem(f2, Q, {
31276
- enableFuzzySearch: g
31277
- });
31278
- !h2 && d2.size === 0 && (h2 = resolveNamespaceItem(iX, Q, {
31279
- enableFuzzySearch: g
31280
- })), h2 && (Array.from(d2), aX = {
31281
- word: Q,
31282
- view: e2,
31283
- pos: l2,
31284
- tooltipType: "namespace",
31285
- namespaceData: {
31286
- item: h2,
31287
- word: Q,
31288
- resolvedSchema: d2.size > 0 ? f2 : iX
31289
- }
31290
- });
31291
- }
31292
- return aX ? {
31293
- pos: R,
31294
- end: z,
31295
- above: true,
31296
- create(e3) {
31297
- if (y) {
31298
- let r3 = y(Q, e3, l2);
31299
- if (r3) return {
31300
- dom: r3
31301
- };
31302
- }
31303
- let r2 = null;
31304
- if (aX.tooltipType === "keyword" && aX.keywordData) r2 = b.keyword ? b.keyword(aX.keywordData) : createKeywordTooltip(aX.keywordData);
31305
- else if (aX.tooltipType === "namespace" && aX.namespaceData) {
31306
- let e4 = aX.namespaceData, { semanticType: c3 } = e4.item;
31307
- r2 = c3 === "table" && b.table ? b.table(e4) : c3 === "column" && b.column ? b.column(e4) : (c3 === "database" || c3 === "schema" || c3 === "namespace") && b.namespace ? b.namespace(e4) : createNamespaceTooltip(e4.item);
31308
- }
31309
- if (!r2) return {
31310
- dom: document.createElement("div")
31311
- };
31312
- let c2 = document.createElement("div");
31313
- return c2.className = "cm-sql-hover-tooltip", c2.innerHTML = r2, {
31314
- dom: c2
31315
- };
31316
- }
31317
- } : null;
31318
- }, {
31319
- hoverTime: l
31320
- });
31321
- }
31322
30801
  function createNamespaceTooltip(e) {
31323
30802
  var _a2, _b2, _c2, _d2, _e3, _f, _g;
31324
30803
  let r = e.path.join("."), c = ((_a2 = e.completion) == null ? void 0 : _a2.label) || e.value || e.path[e.path.length - 1] || "unknown", l = `<div class="sql-hover-${e.semanticType}">`;
@@ -31414,386 +30893,7 @@ ${JSON.stringify(e2, null, 4)}`);
31414
30893
  table: createTableTooltip,
31415
30894
  column: createColumnTooltip,
31416
30895
  namespace: createNamespaceTooltip
31417
- }, defaultSqlHoverTheme = (e = "light") => {
31418
- let r = e === "dark" ? {
31419
- tooltipBg: "#1f2937",
31420
- tooltipBorder: "#374151",
31421
- tooltipText: "#f9fafb",
31422
- tooltipTypeBg: "#374151",
31423
- tooltipTypeText: "#9ca3af",
31424
- tooltipChildren: "#9ca3af",
31425
- codeBg: "#374151",
31426
- codeText: "#f3f4f6",
31427
- strong: "#ffffff",
31428
- em: "#9ca3af",
31429
- header: "#ffffff",
31430
- info: "#d1d5db",
31431
- related: "#d1d5db",
31432
- path: "#d1d5db",
31433
- example: "#d1d5db",
31434
- columns: "#d1d5db",
31435
- syntax: "#d1d5db"
31436
- } : {
31437
- tooltipBg: "#ffffff",
31438
- tooltipBorder: "#e5e7eb",
31439
- tooltipText: "#374151",
31440
- tooltipTypeBg: "#f3f4f6",
31441
- tooltipTypeText: "#6b7280",
31442
- tooltipChildren: "#6b7280",
31443
- codeBg: "#f9fafb",
31444
- codeText: "#1f2937",
31445
- strong: "#111827",
31446
- em: "#6b7280",
31447
- header: "#111827",
31448
- info: "#374151",
31449
- related: "#374151",
31450
- path: "#374151",
31451
- example: "#374151",
31452
- columns: "#374151",
31453
- syntax: "#374151"
31454
- };
31455
- return EditorView.theme({
31456
- ".cm-sql-hover-tooltip": {
31457
- padding: "8px 12px",
31458
- backgroundColor: r.tooltipBg,
31459
- border: `1px solid ${r.tooltipBorder}`,
31460
- borderRadius: "6px",
31461
- boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
31462
- fontSize: "13px",
31463
- lineHeight: "1.4",
31464
- maxWidth: "320px",
31465
- fontFamily: "system-ui, -apple-system, sans-serif",
31466
- color: r.tooltipText
31467
- },
31468
- ".cm-sql-hover-tooltip .sql-hover-header": {
31469
- marginBottom: "6px",
31470
- display: "flex",
31471
- alignItems: "center",
31472
- gap: "6px",
31473
- color: r.header
31474
- },
31475
- ".cm-sql-hover-tooltip .sql-hover-type": {
31476
- fontSize: "11px",
31477
- padding: "2px 6px",
31478
- backgroundColor: r.tooltipTypeBg,
31479
- color: r.tooltipTypeText,
31480
- borderRadius: "4px",
31481
- fontWeight: "500"
31482
- },
31483
- ".cm-sql-hover-tooltip .sql-hover-description": {
31484
- color: r.info,
31485
- marginBottom: "8px"
31486
- },
31487
- ".cm-sql-hover-tooltip .sql-hover-syntax": {
31488
- marginBottom: "8px",
31489
- color: r.syntax
31490
- },
31491
- ".cm-sql-hover-tooltip .sql-hover-example": {
31492
- marginBottom: "4px",
31493
- color: r.example
31494
- },
31495
- ".cm-sql-hover-tooltip .sql-hover-columns": {
31496
- marginBottom: "4px",
31497
- color: r.columns
31498
- },
31499
- ".cm-sql-hover-tooltip .sql-hover-related": {
31500
- marginBottom: "4px",
31501
- color: r.related
31502
- },
31503
- ".cm-sql-hover-tooltip .sql-hover-path": {
31504
- marginBottom: "4px",
31505
- color: r.path
31506
- },
31507
- ".cm-sql-hover-tooltip .sql-hover-info": {
31508
- marginBottom: "4px",
31509
- color: r.info
31510
- },
31511
- ".cm-sql-hover-tooltip .sql-hover-children": {
31512
- marginBottom: "4px",
31513
- color: r.tooltipChildren,
31514
- fontSize: "12px"
31515
- },
31516
- ".cm-sql-hover-tooltip code": {
31517
- backgroundColor: r.codeBg,
31518
- padding: "1px 4px",
31519
- borderRadius: "3px",
31520
- fontSize: "12px",
31521
- fontFamily: "ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace",
31522
- color: r.codeText
31523
- },
31524
- ".cm-sql-hover-tooltip strong": {
31525
- fontWeight: "600",
31526
- color: r.strong
31527
- },
31528
- ".cm-sql-hover-tooltip em": {
31529
- fontStyle: "italic",
31530
- color: r.em
31531
- }
31532
- });
31533
30896
  };
31534
- var SqlStructureAnalyzer = class {
31535
- constructor(e) {
31536
- __publicField(this, "parser");
31537
- __publicField(this, "cache", /* @__PURE__ */ new Map());
31538
- __publicField(this, "MAX_CACHE_SIZE", 10);
31539
- this.parser = e;
31540
- }
31541
- async analyzeDocument(e) {
31542
- let r = e.doc.toString(), c = this.generateCacheKey(r), l = this.cache.get(c);
31543
- if (l) return l;
31544
- let d = await this.extractStatements(r, e);
31545
- if (this.cache.set(c, d), this.cache.size > this.MAX_CACHE_SIZE) {
31546
- let e2 = this.cache.keys().next().value;
31547
- e2 !== void 0 && this.cache.delete(e2);
31548
- }
31549
- return d;
31550
- }
31551
- async getStatementAtPosition(e, r) {
31552
- return (await this.analyzeDocument(e)).find((e2) => r >= e2.from && r <= e2.to) || null;
31553
- }
31554
- async getStatementsInRange(e, r, c) {
31555
- return (await this.analyzeDocument(e)).filter((e2) => e2.from <= c && e2.to >= r);
31556
- }
31557
- async extractStatements(e, r) {
31558
- let c = [], l = this.splitByStatementSeparators(e), d = 0;
31559
- for (let e2 of l) {
31560
- let l2 = e2.trim();
31561
- if (l2.length === 0) {
31562
- d += e2.length;
31563
- continue;
31564
- }
31565
- let f = d + e2.indexOf(l2), h = f + l2.length, g = r.doc.lineAt(f), _ = r.doc.lineAt(h), y = this.stripComments(l2);
31566
- if (y.trim().length === 0 || y.trim() === ";") {
31567
- d += e2.length;
31568
- continue;
31569
- }
31570
- let b = await this.parser.parse(y, {
31571
- state: r
31572
- }), S = this.determineStatementType(y), w = y.endsWith(";") ? y.slice(0, -1).trim() : y.trim();
31573
- c.push({
31574
- from: f,
31575
- to: h,
31576
- lineFrom: g.number,
31577
- lineTo: _.number,
31578
- content: w,
31579
- type: S,
31580
- isValid: b.success
31581
- }), d += e2.length;
31582
- }
31583
- return c;
31584
- }
31585
- splitByStatementSeparators(e) {
31586
- let r = [], c = "", l = false, d = "", f = false, h = false, g = 0;
31587
- for (; g < e.length; ) {
31588
- let _ = e[g], y = e[g + 1];
31589
- if (!l && !h && _ === "-" && y === "-") {
31590
- f = true, c += _ + y, g += 2;
31591
- continue;
31592
- }
31593
- if (!l && !f && _ === "/" && y === "*") {
31594
- h = true, c += _ + y, g += 2;
31595
- continue;
31596
- }
31597
- if (h && _ === "*" && y === "/") {
31598
- h = false, c += _ + y, g += 2;
31599
- continue;
31600
- }
31601
- if (f && (_ === "\n" || _ === "\r")) {
31602
- f = false, c += _, g++;
31603
- continue;
31604
- }
31605
- if (f || h) {
31606
- c += _, g++;
31607
- continue;
31608
- }
31609
- if (!l && (_ === "'" || _ === '"' || _ === "`")) l = true, d = _, c += _;
31610
- else if (l && _ === d) {
31611
- if (y === d) {
31612
- c += _ + y, g += 2;
31613
- continue;
31614
- }
31615
- l = false, d = "", c += _;
31616
- } else !l && _ === ";" ? (c += _, r.push(c), c = "") : c += _;
31617
- g++;
31618
- }
31619
- return c.trim() && r.push(c), r;
31620
- }
31621
- determineStatementType(e) {
31622
- let r = e.trim().toLowerCase();
31623
- return r.startsWith("select") ? "select" : r.startsWith("insert") ? "insert" : r.startsWith("update") ? "update" : r.startsWith("delete") ? "delete" : r.startsWith("create") ? "create" : r.startsWith("drop") ? "drop" : r.startsWith("alter") ? "alter" : r.startsWith("use") ? "use" : "other";
31624
- }
31625
- stripComments(e) {
31626
- let r = "", c = false, l = "", d = false, f = false, h = 0;
31627
- for (; h < e.length; ) {
31628
- let g = e[h], _ = e[h + 1];
31629
- if (!c && !f && g === "-" && _ === "-") {
31630
- d = true, h += 2;
31631
- continue;
31632
- }
31633
- if (!c && !d && g === "/" && _ === "*") {
31634
- f = true, h += 2;
31635
- continue;
31636
- }
31637
- if (f && g === "*" && _ === "/") {
31638
- f = false, h += 2;
31639
- continue;
31640
- }
31641
- if (d && (g === "\n" || g === "\r")) {
31642
- d = false, r += g, h++;
31643
- continue;
31644
- }
31645
- if (d || f) {
31646
- h++;
31647
- continue;
31648
- }
31649
- if (!c && (g === "'" || g === '"' || g === "`")) c = true, l = g, r += g;
31650
- else if (c && g === l) {
31651
- if (_ === l) {
31652
- r += g + _, h += 2;
31653
- continue;
31654
- }
31655
- c = false, l = "", r += g;
31656
- } else r += g;
31657
- h++;
31658
- }
31659
- return r;
31660
- }
31661
- generateCacheKey(e) {
31662
- let r = 0;
31663
- for (let c = 0; c < e.length; c++) {
31664
- let l = e.charCodeAt(c);
31665
- r = (r << 5) - r + l, r &= r;
31666
- }
31667
- return r.toString();
31668
- }
31669
- clearCache() {
31670
- this.cache.clear();
31671
- }
31672
- }, updateSqlStatementsEffect = StateEffect.define(), sqlGutterStateField = StateField.define({
31673
- create() {
31674
- return {
31675
- currentStatement: null,
31676
- allStatements: [],
31677
- cursorPosition: 0,
31678
- isFocused: true
31679
- };
31680
- },
31681
- update(e, r) {
31682
- for (let e2 of r.effects) if (e2.is(updateSqlStatementsEffect)) return e2.value;
31683
- return e;
31684
- }
31685
- }), SqlGutterMarker = class extends GutterMarker {
31686
- constructor(e, r, c = true, l = true) {
31687
- super();
31688
- __publicField(this, "config");
31689
- __publicField(this, "isCurrent");
31690
- __publicField(this, "isValid");
31691
- __publicField(this, "isFocused");
31692
- this.config = e, this.isCurrent = r, this.isValid = c, this.isFocused = l;
31693
- }
31694
- toDOM() {
31695
- let e = document.createElement("div");
31696
- e.className = "cm-sql-gutter-marker";
31697
- let r = this.config.backgroundColor || "#3b82f6";
31698
- !this.isValid && this.config.showInvalid !== false && (r = this.config.errorBackgroundColor || "#ef4444");
31699
- let c;
31700
- return c = this.isFocused ? this.isCurrent ? "1" : (this.config.inactiveOpacity || "0.3").toString() : this.config.unfocusedOpacity === void 0 ? this.config.hideWhenNotFocused ? "0" : this.isCurrent ? "1" : (this.config.inactiveOpacity || "0.3").toString() : this.config.unfocusedOpacity.toString(), e.style.cssText = `
31701
- background: ${r};
31702
- height: 100%;
31703
- width: 100%;
31704
- opacity: ${c};
31705
- transition: opacity 150ms ease-in-out;
31706
- border-radius: 1px;
31707
- `, e;
31708
- }
31709
- eq(e) {
31710
- return this.isCurrent === e.isCurrent && this.isValid === e.isValid && this.isFocused === e.isFocused && this.config === e.config;
31711
- }
31712
- };
31713
- function createSqlGutterMarkers(e, r) {
31714
- var _a2;
31715
- let c = RangeSet.empty;
31716
- if ((_a2 = r.whenHide) == null ? void 0 : _a2.call(r, e)) return c;
31717
- let l = e.state.field(sqlGutterStateField, false);
31718
- if (!l) return c;
31719
- let { currentStatement: d, allStatements: f, isFocused: h } = l;
31720
- try {
31721
- for (let l2 of f) {
31722
- let f2 = (d == null ? void 0 : d.from) === l2.from && (d == null ? void 0 : d.to) === l2.to;
31723
- if (!l2.isValid && r.showInvalid === false) continue;
31724
- let g = new SqlGutterMarker(r, f2, l2.isValid, h);
31725
- for (let r2 = l2.lineFrom; r2 <= l2.lineTo; r2++) try {
31726
- if (r2 < 1 || r2 > e.state.doc.lines) continue;
31727
- let l3 = e.state.doc.line(r2);
31728
- c = c.update({
31729
- add: [
31730
- g.range(l3.from)
31731
- ]
31732
- });
31733
- } catch (e2) {
31734
- console.warn("SqlGutter: Invalid line number", r2, e2);
31735
- }
31736
- }
31737
- } catch (e2) {
31738
- console.warn("SqlGutter: Error creating markers", e2);
31739
- }
31740
- return c;
31741
- }
31742
- function createUpdateListener(e) {
31743
- return EditorView.updateListener.of(async (r) => {
31744
- if (!r.docChanged && !r.selectionSet && !r.focusChanged) return;
31745
- let { state: c } = r.view, { main: l } = c.selection, d = l.head, f = await e.analyzeDocument(c), h = {
31746
- currentStatement: await e.getStatementAtPosition(c, d),
31747
- allStatements: f,
31748
- cursorPosition: d,
31749
- isFocused: r.view.hasFocus
31750
- };
31751
- r.view.dispatch({
31752
- effects: updateSqlStatementsEffect.of(h)
31753
- });
31754
- });
31755
- }
31756
- function createGutterTheme(e) {
31757
- let r = e.width || 3;
31758
- return EditorView.baseTheme({
31759
- ".cm-sql-gutter": {
31760
- width: `${r}px`,
31761
- minWidth: `${r}px`
31762
- },
31763
- ".cm-sql-gutter .cm-gutterElement": {
31764
- width: `${r}px`,
31765
- padding: "0",
31766
- margin: "0"
31767
- },
31768
- ".cm-sql-gutter-marker": {
31769
- width: "100%",
31770
- height: "100%",
31771
- display: "block"
31772
- },
31773
- ".cm-lineNumbers .cm-gutterElement": {
31774
- paddingLeft: "8px",
31775
- paddingRight: "8px"
31776
- }
31777
- });
31778
- }
31779
- function createSqlGutter(e) {
31780
- return gutter({
31781
- class: `cm-sql-gutter ${e.className || ""}`,
31782
- markers: (r) => createSqlGutterMarkers(r, e)
31783
- });
31784
- }
31785
- function sqlStructureGutter(e = {}) {
31786
- return [
31787
- sqlGutterStateField,
31788
- createUpdateListener(new SqlStructureAnalyzer(e.parser || new NodeSqlParser())),
31789
- createGutterTheme(e),
31790
- createSqlGutter(e)
31791
- ];
31792
- }
31793
- function sqlExtension(e = {}) {
31794
- let r = [], { enableLinting: c = true, enableGutterMarkers: l = true, enableHover: d = true, linterConfig: f, gutterConfig: h, hoverConfig: g } = e;
31795
- return c && r.push(sqlLinter(f)), l && r.push(sqlStructureGutter(h)), d && (r.push(sqlHover(g)), (g == null ? void 0 : g.theme) ? r.push(g.theme) : r.push(defaultSqlHoverTheme())), r;
31796
- }
31797
30897
  var BigQuery = {
31798
30898
  ...PostgreSQL,
31799
30899
  caseInsensitiveIdentifiers: true,
@@ -33120,7 +32220,7 @@ ${JSON.stringify(e2, null, 4)}`);
33120
32220
  function getSQLMode() {
33121
32221
  return store.get(sqlModeAtom);
33122
32222
  }
33123
- var DEFAULT_DIALECT = DuckDBDialect, DEFAULT_PARSER_DIALECT = "DuckDB", sqlConfigCompartment = new Compartment();
32223
+ var DEFAULT_DIALECT = DuckDBDialect, sqlConfigCompartment = new Compartment();
33124
32224
  function getLatestEngine() {
33125
32225
  return store.get(dataSourceConnectionsAtom).latestEngineSelected;
33126
32226
  }
@@ -33160,7 +32260,6 @@ ${JSON.stringify(e2, null, 4)}`);
33160
32260
  return this.parser.isSupported(e);
33161
32261
  }
33162
32262
  getExtension(e, r, c, l, d) {
33163
- var _a2;
33164
32263
  let f = [
33165
32264
  sqlConfigCompartment.of(sql({
33166
32265
  dialect: DEFAULT_DIALECT
@@ -33182,89 +32281,9 @@ ${JSON.stringify(e2, null, 4)}`);
33182
32281
  ]
33183
32282
  })
33184
32283
  ];
33185
- if (((_a2 = d == null ? void 0 : d.diagnostics) == null ? void 0 : _a2.sql_linter) ?? false) {
33186
- let e2 = store.get(resolvedThemeAtom), r2 = new CustomSqlParser({
33187
- getParserOptions: (e3) => ({
33188
- database: guessParserDialect(e3) ?? DEFAULT_PARSER_DIALECT
33189
- })
33190
- });
33191
- f.push(sqlExtension({
33192
- enableLinting: true,
33193
- linterConfig: {
33194
- delay: 250,
33195
- parser: r2
33196
- },
33197
- enableGutterMarkers: true,
33198
- gutterConfig: {
33199
- backgroundColor: "#3b82f6",
33200
- errorBackgroundColor: "#ef4444",
33201
- hideWhenNotFocused: true,
33202
- parser: r2
33203
- },
33204
- hoverConfig: {
33205
- schema: getSchema,
33206
- hoverTime: 300,
33207
- enableKeywords: true,
33208
- enableTables: true,
33209
- enableColumns: true,
33210
- parser: r2,
33211
- theme: defaultSqlHoverTheme(e2)
33212
- }
33213
- }), EditorView.updateListener.of((e3) => {
33214
- e3.focusChanged && r2.setFocusState(e3.view.hasFocus);
33215
- }));
33216
- }
33217
32284
  return this.sqlModeEnabled && f.push(sqlValidationExtension()), f;
33218
32285
  }
33219
- }, __publicField(_b, "fromQuery", (e) => SQLParser.fromQuery(e)), _b), CustomSqlParser = class extends NodeSqlParser {
33220
- constructor() {
33221
- super(...arguments);
33222
- __publicField(this, "validationTimeout", null);
33223
- __publicField(this, "VALIDATION_DELAY_MS", 300);
33224
- __publicField(this, "isFocused", false);
33225
- }
33226
- setFocusState(e) {
33227
- this.isFocused = e;
33228
- }
33229
- async validateWithDelay(e, r, c) {
33230
- return this.validationTimeout && window.clearTimeout(this.validationTimeout), new Promise((l) => {
33231
- this.validationTimeout = window.setTimeout(async () => {
33232
- var _a2;
33233
- if (!this.isFocused) {
33234
- l([]);
33235
- return;
33236
- }
33237
- try {
33238
- let d = await validateSQL(e, r, c, getSQLMode());
33239
- if (d.error) {
33240
- Logger.error("Failed to validate SQL", {
33241
- error: d.error
33242
- }), l([]);
33243
- return;
33244
- }
33245
- l(((_a2 = d.parse_result) == null ? void 0 : _a2.errors) ?? []);
33246
- } catch (e2) {
33247
- Logger.error("Failed to validate SQL", {
33248
- error: e2
33249
- }), l([]);
33250
- }
33251
- }, this.VALIDATION_DELAY_MS);
33252
- });
33253
- }
33254
- async validateSql(e, r) {
33255
- let c = getSQLMetadata(r.state);
33256
- if (!this.isFocused) return [];
33257
- if (!INTERNAL_SQL_ENGINES.has(c.engine)) return super.validateSql(e, r);
33258
- let l = guessParserDialect(r.state);
33259
- return this.validateWithDelay(e, c.engine, l);
33260
- }
33261
- async parse(e, r) {
33262
- return getSQLMetadata(r.state).engine === "__marimo_duckdb" ? {
33263
- success: true,
33264
- errors: []
33265
- } : super.parse(e, r);
33266
- }
33267
- };
32286
+ }, __publicField(_b, "fromQuery", (e) => SQLParser.fromQuery(e)), _b);
33268
32287
  function updateSQLDialect(e, r) {
33269
32288
  e.dispatch({
33270
32289
  effects: sqlConfigCompartment.reconfigure(sql({
@@ -33278,14 +32297,6 @@ ${JSON.stringify(e2, null, 4)}`);
33278
32297
  function getSQLMetadata(e) {
33279
32298
  return e.field(languageMetadataField);
33280
32299
  }
33281
- function getSchema(e) {
33282
- let r = getSQLMetadata(e.state).engine, c = SCHEMA_CACHE.getCompletionSource(r);
33283
- return (c == null ? void 0 : c.schema) ? c.schema : {};
33284
- }
33285
- function guessParserDialect(e) {
33286
- let r = getSQLMetadata(e).engine;
33287
- return connectionNameToParserDialect(r);
33288
- }
33289
32300
  function connectionNameToParserDialect(e) {
33290
32301
  var _a2;
33291
32302
  let r = (_a2 = SCHEMA_CACHE.getInternalDialect(e)) == null ? void 0 : _a2.toLowerCase();
@@ -50365,7 +49376,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
50365
49376
  children: _
50366
49377
  }), r[7] = d.label, r[8] = g, r[9] = _, r[10] = y) : y = r[10], y;
50367
49378
  };
50368
- const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-Bs2c1bKU.js"));
49379
+ const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-BpWjHMW2.js"));
50369
49380
  var import_compiler_runtime$121 = __toESM(require_compiler_runtime(), 1), CodeEditorPlugin = class {
50370
49381
  constructor() {
50371
49382
  __publicField(this, "tagName", "marimo-code-editor");
@@ -54660,7 +53671,7 @@ Error message: ${getErrorMessage$1(r)}`,
54660
53671
  }, {
54661
53672
  message: "Must be a Buffer"
54662
53673
  })
54663
- ]), jsonValueSchema = lazy$4(() => union([
53674
+ ]), jsonValueSchema = lazy$3(() => union([
54664
53675
  _null(),
54665
53676
  string$2(),
54666
53677
  number$2(),
@@ -69579,7 +68590,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
69579
68590
  function getVegaFieldTypes(e) {
69580
68591
  return !e || Object.keys(e).length === 0 ? "auto" : Objects.mapValues(e, (e2) => e2 === "date" || e2 === "time" ? "string" : e2 === "datetime" ? "date" : e2);
69581
68592
  }
69582
- var import_compiler_runtime$79 = __toESM(require_compiler_runtime(), 1), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-1bUl_mRe.js").then(async (m2) => {
68593
+ var import_compiler_runtime$79 = __toESM(require_compiler_runtime(), 1), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-hF8NzJm2.js").then(async (m2) => {
69583
68594
  await m2.__tla;
69584
68595
  return m2;
69585
68596
  }));
@@ -81156,7 +80167,7 @@ ${c}
81156
80167
  fullWidth: g,
81157
80168
  children: F
81158
80169
  }), r[19] = g, r[20] = _, r[21] = c, r[22] = F, r[23] = R) : R = r[23], R;
81159
- }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-DGGP9Mxg.js"));
80170
+ }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-BC1bAfWX.js"));
81160
80171
  const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object$1({
81161
80172
  label: string$2().nullish(),
81162
80173
  data: string$2()
@@ -90218,7 +89229,7 @@ ${c}
90218
89229
  });
90219
89230
  }
90220
89231
  };
90221
- const LazyPlot = (0, import_react.lazy)(() => import("./react-plotly-Cs07wkly.js").then(__toDynamicImportESM(1)).then((e) => e.default));
89232
+ const LazyPlot = (0, import_react.lazy)(() => import("./react-plotly-YQqow0sD.js").then(__toDynamicImportESM(1)).then((e) => e.default));
90222
89233
  function initialLayout(e) {
90223
89234
  return {
90224
89235
  autosize: e.layout.width === void 0,
@@ -91388,7 +90399,7 @@ ${c}
91388
90399
  return true;
91389
90400
  }
91390
90401
  }
91391
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-_Sq_uxzm.js")), VegaPlugin = class {
90402
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-B26vOtT-.js")), VegaPlugin = class {
91392
90403
  constructor() {
91393
90404
  __publicField(this, "tagName", "marimo-vega");
91394
90405
  __publicField(this, "validator", object$1({
@@ -91708,7 +90719,7 @@ ${c}
91708
90719
  diagram: e.data.diagram
91709
90720
  });
91710
90721
  }
91711
- }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-DIjoC4T4.js").then(async (m2) => {
90722
+ }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-BAe4A_1z.js").then(async (m2) => {
91712
90723
  await m2.__tla;
91713
90724
  return m2;
91714
90725
  })), import_compiler_runtime$15 = __toESM(require_compiler_runtime(), 1);
@@ -97607,7 +96618,7 @@ Defaulting to \`null\`.`;
97607
96618
  return Logger.warn("Failed to get version from mount config"), null;
97608
96619
  }
97609
96620
  }
97610
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.17.5"), showCodeInRunModeAtom = atom(true);
96621
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.17.6"), showCodeInRunModeAtom = atom(true);
97611
96622
  atom(null);
97612
96623
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
97613
96624
  constructor() {