@marimo-team/islands 0.18.5-dev178 → 0.18.5-dev181

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/main.js CHANGED
@@ -11,7 +11,7 @@ import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE
11
11
  import { t as Check } from "./check-DDykH_Yi.js";
12
12
  import { A as logNever, B as ChevronDown, C as useDirection, D as useOnUnmount, E as useOnMount, F as $18f2051aff69b9bf$export$a54013f0d02a8f82, I as $b5e257d569688ac6$export$535bd6ca7f90a273, M as $a916eb452884faea$export$b7a616150fdb9f44, O as usePrevious, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, k as assertNever, l as SelectTrigger, m as menuContentCommon, n as Primitive, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-oKuiQuiM.js";
13
13
  import { $ as $514c0188e459b4c0$export$9afb8bc826b033ea, $t as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, A as ItemIndicator, At as $6db58dc88e78b024$export$2f817fcdc4b89ae0, B as createMenuScope, Bt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, C as DropdownMenuTrigger, Ct as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, D as Content2$3, Dt as $6c7bd7858deea686$export$cd11ab140839f11d, E as CheckboxItem, Et as $701a24aa0da5b062$export$ea18c227d4417cc3, F as Root3, Ft as $507fabe10e71c6fb$export$630ff653c5ada6a9, G as $3985021b0ad6602f$export$37fb8590cf2c088c, Gt as $df56164dff5785e2$export$4338b53315abf666, H as Root$6, Ht as $b4b717babfbb907b$export$bebd5a1431fec25d, I as Separator, It as $f6c31cce2adf654f$export$45712eceda6fad21, J as $a049562f99e7db0e$export$f9c6924e160136d1, Jt as $c87311424ea30a05$export$78551043582a6a98, K as $3985021b0ad6602f$export$f5b8910cec6cf069, Kt as $313b98861ee5dd6c$export$d6875122194c7b44, L as Sub, Lt as _class_private_field_init, M as Portal$2, Mt as $6179b936705e76d3$export$ae780daf29e6d456, N as RadioGroup$2, Nt as $9ab94262bd0047c7$export$420e68273165f4ec, O as Group$1, Ot as $fca6afa0e843324b$export$87b761675e8eaa10, P as RadioItem, Pt as $3ad3f6e1647bc98d$export$80f3e147d781571c, Q as $514c0188e459b4c0$export$5f1af8db9871e1d6, Qt as $7215afc6de606d6b$export$de79e2c695e052f3, R as SubContent, Rt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, S as DropdownMenuSubTrigger, St as $e5be200c675c3b3a$export$dad6ae84456c676a, T as Arrow2, Tt as $f7dceffc5ad7768b$export$4e328f61c538687f, U as createRovingFocusGroupScope, Ut as $99facab73266f662$export$5add1d006293d136, V as Item$2, Vt as $b4b717babfbb907b$export$4c063cf1350e6fed, W as ErrorBoundary, Wt as $e9faafb641e167db$export$90fc3a17d93f704c, X as $ee014567cb39d3f0$export$f551688fc98f2e09, Xt as $c87311424ea30a05$export$a11b0059900ceec8, Y as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Yt as $c87311424ea30a05$export$9ac100e40613ea10, Z as $ee014567cb39d3f0$export$ff05c3ac10437e03, Zt as $c87311424ea30a05$export$fedb369cb70207f1, _ as DropdownMenuLabel, _n as ChevronRight, _t as $2baaea4c71418dea$export$294aa081a6c6f55d, a as OnBlurredInput, an as $431fbd86ca7dc216$export$b204af158042fbac, at as $64fa3d84918910a7$export$2881499e37b75b9a, b as DropdownMenuSub, bt as $e5be200c675c3b3a$export$a763b9476acd3eb, c as NumberField, cn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ct as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, d as prettyNumber, dn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $3ef42575df84b30b$export$9d1611c77c2fe928, et as $d2b4bc8c273e7be6$export$24d547caef80ccd1, f as prettyScientificNumber, fn as Trash, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuItem, gn as Circle, gt as $d2e8511e6f209edf$export$e908e06f4b8e3402, h as DropdownMenuGroup, hn as Pencil, ht as capitalize_default, i as Input, in as $f4e2df6bd15f8569$export$98658e8c59125e6a, it as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, j as Label$2, jt as $5b160d28a433310d$export$c17fa47878dc55b6, k as Item2$2, kt as $fca6afa0e843324b$export$f12b703ca79dfbb1, l as maxFractionalDigits, ln as $bdb11010cef70236$export$f680877a34711e37, lt as $64fa3d84918910a7$export$c245e6201fed2f75, m as DropdownMenuContent, mn as Plus, mt as marked, n as DebouncedInput, nn as $d4ee10de306f2510$export$cd4e5573fbe2b576, nt as $01b77f81d0f07f68$export$75b6ee27786ba447, o as useDebounceControlledState, on as $431fbd86ca7dc216$export$f21a1ffae260145a, ot as $64fa3d84918910a7$export$29f1550f4b0d4415, p as DropdownMenu, pn as Search, pt as useNonce, q as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, qt as $c87311424ea30a05$export$6446a186d09e379e, r as DebouncedNumberInput, rn as $d4ee10de306f2510$export$e58f029f0fbfdb29, rt as $01b77f81d0f07f68$export$b04be29aa201d4f5, s as useDebouncedCallback, sn as $ff5963eb1fccf552$export$e08e3b67e392101e, st as $64fa3d84918910a7$export$4d86445c2cf5e3, t as BulkEdit, tn as $d4ee10de306f2510$export$4282f70798064fe0, tt as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, u as prettyEngineeringNumber, un as $8ae05eaa5c114e9c$export$7f54fc3180508a52, ut as $64fa3d84918910a7$export$c62b8e45d58ddad9, v as DropdownMenuPortal, vt as $e93e671b31057976$export$b8473d3665f3a75a, w as Anchor2, wt as $319e236875307eab$export$a9b970dcc4ae71a9, x as DropdownMenuSubContent, xt as $e5be200c675c3b3a$export$aca958c65c314e6c, y as DropdownMenuSeparator, yt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, z as SubTrigger, zt as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./types-DEmfj_i8.js";
14
- import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-D3uOrgqD.js";
14
+ import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-1wVjsLov.js";
15
15
  import { n as clsx_default } from "./clsx-D2KVTYnW.js";
16
16
  import { a as cva, c as useComposedRefs, l as Events, n as buttonVariants, o as useEventListener, r as Slot$1, s as composeRefs, t as Button, u as cn } from "./button-BlF-78eJ.js";
17
17
  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-C4e3s3sJ.js";
@@ -18778,7 +18778,7 @@ ${JSON.stringify(e2, null, 4)}`);
18778
18778
  keywords: "percentile_cont row_number rank dense_rank rank_dense percent_rank cume_dist ntile lag lead first_value last_value nth_value !__postfix !~~ !~~* % & && * ** + - ->> / // <-> << <=> <@ >> @ @> Calendar JSON TimeZone ^ ^@ abort abs absolute access access_mode acos acosh action add add_parquet_key admin after age aggregate alias all all_profiling_output allow_community_extensions allow_extensions_metadata_mismatch allow_persistent_secrets allow_unredacted_secrets allow_unsigned_extensions allowed_directories allowed_paths also alter always analyse analyze and anti any any_value apply approx_count_distinct approx_quantile approx_top_k arbitrary arg_max arg_max_null arg_min arg_min_null argmax argmin array array_agg array_aggr array_aggregate array_append array_apply array_cat array_concat array_contains array_cosine_distance array_cosine_similarity array_cross_product array_distance array_distinct array_dot_product array_extract array_filter array_grade_up array_has array_has_all array_has_any array_indexof array_inner_product array_intersect array_length array_negative_dot_product array_negative_inner_product array_pop_back array_pop_front array_position array_prepend array_push_back array_push_front array_reduce array_resize array_reverse array_reverse_sort array_select array_slice array_sort array_to_json array_to_string array_to_string_comma_default array_transform array_unique array_value array_where array_zip arrow_large_buffer_size arrow_lossless_conversion arrow_output_list_view arrow_output_version arrow_scan arrow_scan_dumb as asc ascii asin asinh asof asof_loop_join_threshold assertion assignment asymmetric at atan atan2 atanh attach attribute authorization autoinstall_extension_repository autoinstall_known_extensions autoload_known_extensions avg backward bar base64 before begin between bigint bin binary binary_as_string bit bit_and bit_count bit_length bit_or bit_position bit_xor bitstring bitstring_agg blob bool bool_and bool_or boolean both bpchar by bytea cache call called can_cast_implicitly cardinality cascade cascaded case cast cast_to_type catalog catalog_error_max_schemas cbrt ceil ceiling centuries century chain char char_length character character_length characteristics check checkpoint checkpoint_threshold chr class close cluster coalesce col_description collate collation collations column columns combine comment comments commit committed compression concat concat_ws concurrently configuration conflict connection constant_or_null constraint constraints contains content continue conversion copy copy_database corr cos cosh cost cot count count_if count_star countif covar_pop covar_samp create create_sort_key cross csv cube current current_catalog current_connection_id current_database current_date current_localtime current_localtimestamp current_query current_query_id current_role current_schema current_schemas current_setting current_transaction_id current_user currval cursor custom_extension_repository custom_profiling_settings custom_user_agent cycle damerau_levenshtein data database database_list database_size date date_add date_diff date_part date_sub date_trunc datediff datepart datesub datetime datetrunc day dayname dayofmonth dayofweek dayofyear days deallocate debug_asof_iejoin debug_checkpoint_abort debug_force_external debug_force_no_cross_product debug_skip_checkpoint_on_commit debug_verify_vector debug_window_mode dec decade decades decimal declare decode default default_block_size default_collation default_null_order default_order default_secret_storage defaults deferrable deferred definer degrees delete delimiter delimiters depends desc describe detach dictionary disable disable_checkpoint_on_shutdown disable_logging disable_object_cache disable_optimizer disable_parquet_prefetching disable_print_progress_bar disable_profile disable_profiling disable_progress_bar disable_timestamptz_casts disable_verification disable_verify_external disable_verify_fetch_row disable_verify_parallelism disable_verify_serializer disabled_compression_methods disabled_filesystems disabled_log_types disabled_optimizers discard distinct divide do document domain double drop duckdb_api duckdb_columns duckdb_constraints duckdb_databases duckdb_dependencies duckdb_extensions duckdb_external_file_cache duckdb_functions duckdb_indexes duckdb_keywords duckdb_log_contexts duckdb_logs duckdb_logs_parsed duckdb_memory duckdb_optimizers duckdb_prepared_statements duckdb_schemas duckdb_secret_types duckdb_secrets duckdb_sequences duckdb_settings duckdb_table_sample duckdb_tables duckdb_temporary_files duckdb_types duckdb_variables duckdb_views dynamic_or_filter_threshold each editdist3 element_at else enable enable_checkpoint_on_shutdown enable_external_access enable_external_file_cache enable_fsst_vectors enable_geoparquet_conversion enable_http_logging enable_http_metadata_cache enable_logging enable_macro_dependencies enable_object_cache enable_optimizer enable_print_progress_bar enable_profile enable_profiling enable_progress_bar enable_progress_bar_print enable_verification enable_view_dependencies enabled_log_types encode encoding encrypted end ends_with entropy enum enum_code enum_first enum_last enum_range enum_range_boundary epoch epoch_ms epoch_ns epoch_us equi_width_bins era error errors_as_json escape even event except exclude excluding exclusive execute exists exp explain explain_output export export_state extension extension_directory extension_versions extensions external external_threads extract factorial false family favg fdiv fetch file_search_path filter finalize first flatten float float4 float8 floor fmod following for force force_bitpacking_mode force_checkpoint force_compression foreign format formatReadableDecimalSize formatReadableSize format_bytes format_pg_type format_type forward freeze from from_base64 from_binary from_hex from_json from_json_strict fsum full function functions gamma gcd gen_random_uuid generate_series generate_subscripts generated geomean geometric_mean get_bit get_block_size get_current_time get_current_timestamp getvariable glob global grade_up grant granted greatest greatest_common_divisor group group_concat grouping grouping_id groups guid hamming handler having header hex histogram histogram_exact histogram_values hold home_directory hour hours http_logging_output http_proxy http_proxy_password http_proxy_username hugeint identity ieee_floating_point_ops if ignore ilike ilike_escape immediate immediate_transaction_mode immutable implicit import import_database in in_search_path include including increment index index_scan_max_count index_scan_percentage indexes inet_client_addr inet_client_port inet_server_addr inet_server_port inherit inherits initially inline inner inout input insensitive insert install instead instr int int1 int128 int16 int2 int32 int4 int64 int8 integer integer_division integral intersect interval into invoker is is_histogram_other_bin isfinite isinf isnan isnull isodow isolation isoyear jaccard jaro_similarity jaro_winkler_similarity join json json_array json_array_length json_contains json_deserialize_sql json_each json_execute_serialized_sql json_exists json_extract json_extract_path json_extract_path_text json_extract_string json_group_array json_group_object json_group_structure json_keys json_merge_patch json_object json_pretty json_quote json_serialize_plan json_serialize_sql json_structure json_transform json_transform_strict json_tree json_type json_valid json_value julian kahan_sum key kurtosis kurtosis_pop label lambda lambda_syntax language large last last_day late_materialization_max_rows lateral lcase lcm leading leakproof least least_common_multiple left left_grapheme len length length_grapheme level levenshtein lgamma like like_escape limit list list_aggr list_aggregate list_any_value list_append list_apply list_approx_count_distinct list_avg list_bit_and list_bit_or list_bit_xor list_bool_and list_bool_or list_cat list_concat list_contains list_cosine_distance list_cosine_similarity list_count list_distance list_distinct list_dot_product list_element list_entropy list_extract list_filter list_first list_grade_up list_has list_has_all list_has_any list_histogram list_indexof list_inner_product list_intersect list_kurtosis list_kurtosis_pop list_last list_mad list_max list_median list_min list_mode list_negative_dot_product list_negative_inner_product list_pack list_position list_prepend list_product list_reduce list_resize list_reverse list_reverse_sort list_select list_sem list_skewness list_slice list_sort list_stddev_pop list_stddev_samp list_string_agg list_sum list_transform list_unique list_value list_var_pop list_var_samp list_where list_zip listagg listen ln load local location lock lock_configuration locked log log10 log2 log_query_path logged logging_level logging_mode logging_storage logical long lower lpad ltrim macro mad make_date make_time make_timestamp make_timestamp_ns make_timestamptz map map_concat map_contains map_contains_entry map_contains_value map_entries map_extract map_extract_value map_from_entries map_keys map_to_pg_oid map_values mapping match materialized max max_by max_expression_depth max_memory max_temp_directory_size max_vacuum_tasks maxvalue md5 md5_number md5_number_lower md5_number_upper mean median memory_limit merge_join_threshold metadata_info method microsecond microseconds millennia millennium millisecond milliseconds min min_by minute minutes minvalue mismatches mod mode month monthname months move multiply name names nanosecond national natural nchar nested_loop_join_threshold new next nextafter nextval nfc_normalize no none normalized_interval not not_ilike_escape not_like_escape nothing notify notnull now nowait null null_order nullif nulls numeric nvarchar obj_description object octet_length of off offset oid oids old old_implicit_casting on only operator option options or ord order order_by_non_integer_literal ordered_aggregate_threshold ordinality others out outer over overlaps overlay overriding owned owner pandas_analyze_sample pandas_scan parallel parquet_bloom_probe parquet_file_metadata parquet_kv_metadata parquet_metadata parquet_metadata_cache parquet_scan parquet_schema parse_dirname parse_dirpath parse_duckdb_log_message parse_filename parse_path parser partial partition partitioned partitioned_write_flush_threshold partitioned_write_max_open_files passing password percent perfect_ht_threshold persistent pi pivot pivot_filter_threshold pivot_limit pivot_longer pivot_wider placing plans platform policy position positional pow power pragma pragma_collations pragma_database_size pragma_metadata_info pragma_platform pragma_show pragma_storage_info pragma_table_info pragma_user_agent pragma_version preceding precision prefer_range_joins prefetch_all_parquet_files prefix prepare prepared preserve preserve_identifier_case preserve_insertion_order primary printf prior privileges procedural procedure produce_arrow_string_view product profile_output profiling_mode profiling_output program progress_bar_time publication python_enable_replacements python_map_function python_scan_all_frames qualify quantile quantile_cont quantile_disc quarter quarters query query_table quote radians random range read read_blob read_csv read_csv_auto read_json read_json_auto read_json_objects read_json_objects_auto read_ndjson read_ndjson_auto read_ndjson_objects read_parquet read_text real reassign recheck recursive reduce ref references referencing refresh regexp_escape regexp_extract regexp_extract_all regexp_full_match regexp_matches regexp_replace regexp_split_to_array regexp_split_to_table regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release remap_struct rename repeat repeat_row repeatable replace replica reservoir_quantile reset respect restart restrict returning returns reverse revoke right right_grapheme role rollback rollup round round_even roundbankers row row_to_json rows rpad rtrim rule sample savepoint scalar_subquery_error_on_multiple_rows scheduler_process_partial schema schemas scope scroll search search_path second seconds secret secret_directory security select sem semi seq_scan sequence sequences serializable server session session_user set set_bit setof sets setseed sha1 sha256 share shobj_description short show show_databases show_tables show_tables_expanded sign signbit signed similar simple sin sinh skewness skip smallint snapshot sniff_csv some sorted split split_part sql sqrt stable standalone start starts_with statement statistics stats stddev stddev_pop stddev_samp stdin stdout storage storage_compatibility_version storage_info stored str_split str_split_regex streaming_buffer_size strftime strict string string_agg string_split string_split_regex string_to_array strip strip_accents strlen strpos strptime struct struct_concat struct_extract struct_extract_at struct_insert struct_pack subscription substr substring substring_grapheme subtract suffix sum sum_no_overflow sumkahan summarize summary symmetric sysid system table table_info tables tablesample tablespace tan tanh temp temp_directory template temporary test_all_types test_vector_types text then threads ties time time_bucket timestamp timestamp_ms timestamp_ns timestamp_s timestamp_us timestamptz timetz timetz_byte_comparable timezone timezone_hour timezone_minute tinyint to to_base to_base64 to_binary to_centuries to_days to_decades to_hex to_hours to_json to_microseconds to_millennia to_milliseconds to_minutes to_months to_quarters to_seconds to_timestamp to_weeks to_years today trailing transaction transaction_timestamp transform translate treat trigger trim true trunc truncate truncate_duckdb_logs trusted try_cast try_strptime txid_current type typeof types ubigint ucase uhugeint uint128 uint16 uint32 uint64 uint8 uinteger unbin unbounded uncommitted unencrypted unhex unicode union union_extract union_tag union_value unique unknown unlisten unlogged unnest unpack unpivot unpivot_list until update upper url_decode url_encode use user user_agent username using usmallint utinyint uuid uuid_extract_timestamp uuid_extract_version uuidv4 uuidv7 vacuum valid validate validator value values var_pop var_samp varbinary varchar variable variadic variance varint varying vector_type verbose verify_external verify_fetch_row verify_parallelism verify_serializer version view views virtual volatile wal_autocheckpoint wavg week weekday weekofyear weeks weighted_avg when where which_secret whitespace window with within without work worker_threads wrapper write write_log xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlnamespaces xmlparse xmlpi xmlroot xmlserialize xmltable xor year years yearweek yes zone zstd_min_string_length | || ~ ~~ ~~* ~~~",
18779
18779
  types: "JSON bigint binary bit bitstring blob bool boolean bpchar bytea char date datetime dec decimal double enum float float4 float8 guid hugeint int int1 int128 int16 int2 int32 int4 int64 int8 integer integral interval list logical long map null numeric nvarchar oid real row short signed smallint string struct text time timestamp timestamp_ms timestamp_ns timestamp_s timestamp_us timestamptz timetz tinyint ubigint uhugeint uint128 uint16 uint32 uint64 uint8 uinteger union usmallint utinyint uuid varbinary varchar varint"
18780
18780
  });
18781
- var KNOWN_DIALECTS = new Set("postgresql.postgres.couchbase.db2.db2i.tidb.mysql.sqlite.mssql.sqlserver.duckdb.mariadb.cassandra.noql.spark.awsathena.athena.bigquery.hive.redshift.snowflake.flink.mongodb.trino.oracle.oracledb.singlestoredb.timescaledb".split("."));
18781
+ var KNOWN_DIALECTS = new Set("postgresql.postgres.couchbase.db2.db2i.tidb.mysql.sqlite.mssql.sqlserver.duckdb.mariadb.cassandra.noql.spark.awsathena.athena.bigquery.hive.redshift.snowflake.flink.mongodb.trino.oracle.oracledb.singlestoredb.timescaledb.databricks.datafusion.microsoft sql server".split("."));
18782
18782
  function isKnownDialect(e) {
18783
18783
  return KNOWN_DIALECTS.has(e);
18784
18784
  }
@@ -18797,6 +18797,7 @@ ${JSON.stringify(e2, null, 4)}`);
18797
18797
  return SQLite;
18798
18798
  case "mssql":
18799
18799
  case "sqlserver":
18800
+ case "microsoft sql server":
18800
18801
  return MSSQL;
18801
18802
  case "duckdb":
18802
18803
  return DuckDBDialect;
@@ -18826,6 +18827,8 @@ ${JSON.stringify(e2, null, 4)}`);
18826
18827
  case "tidb":
18827
18828
  case "singlestoredb":
18828
18829
  case "spark":
18830
+ case "databricks":
18831
+ case "datafusion":
18829
18832
  return Logger.debug("Unsupported dialect", {
18830
18833
  dialect: r
18831
18834
  }), ModifiedStandardSQL;
@@ -27372,6 +27375,7 @@ ${JSON.stringify(e2, null, 4)}`);
27372
27375
  case "mariadb":
27373
27376
  return "MariaDB";
27374
27377
  case "mssql":
27378
+ case "microsoft sql server":
27375
27379
  return "Microsoft SQL Server";
27376
27380
  case "oracle":
27377
27381
  return "Oracle";
@@ -28318,6 +28322,7 @@ ${JSON.stringify(e2, null, 4)}`);
28318
28322
  return f;
28319
28323
  case "mssql":
28320
28324
  case "sqlserver":
28325
+ case "microsoft sql server":
28321
28326
  return q;
28322
28327
  case "athena":
28323
28328
  case "awsathena":
@@ -28326,7 +28331,10 @@ ${JSON.stringify(e2, null, 4)}`);
28326
28331
  case "flink":
28327
28332
  case "mongodb":
28328
28333
  case "timescaledb":
28334
+ case "datafusion":
28329
28335
  return z;
28336
+ case "databricks":
28337
+ return M;
28330
28338
  default:
28331
28339
  return logNever(e), zY;
28332
28340
  }
@@ -34181,6 +34189,7 @@ ${c.sqlString}
34181
34189
  return "Sqlite";
34182
34190
  case "mssql":
34183
34191
  case "sqlserver":
34192
+ case "microsoft sql server":
34184
34193
  return "TransactSQL";
34185
34194
  case "duckdb":
34186
34195
  return "DuckDB";
@@ -34212,6 +34221,8 @@ ${c.sqlString}
34212
34221
  case "tidb":
34213
34222
  case "singlestoredb":
34214
34223
  case "spark":
34224
+ case "databricks":
34225
+ case "datafusion":
34215
34226
  return Logger.debug("Unsupported dialect", {
34216
34227
  dialect: r
34217
34228
  }), null;
@@ -82003,7 +82014,7 @@ ${c}
82003
82014
  })), column_id_array = array$2(column_id.describe(FieldOptions.of({
82004
82015
  special: "column_id"
82005
82016
  }))).min(1, "At least one column is required").default([]).describe(FieldOptions.of({
82006
- label: "Group by columns",
82017
+ label: "Columns",
82007
82018
  minLength: 1
82008
82019
  }));
82009
82020
  var ColumnConversionTransformSchema = object$1({
@@ -82072,7 +82083,12 @@ ${c}
82072
82083
  ])
82073
82084
  }), GroupByTransformSchema = object$1({
82074
82085
  type: literal("group_by"),
82075
- column_ids: column_id_array,
82086
+ column_ids: array$2(column_id.describe(FieldOptions.of({
82087
+ special: "column_id"
82088
+ }))).default([]).describe(FieldOptions.of({
82089
+ label: "Group by columns",
82090
+ minLength: 1
82091
+ })),
82076
82092
  aggregation_column_ids: array$2(column_id.describe(FieldOptions.of({
82077
82093
  special: "column_id"
82078
82094
  }))).default([]).describe(FieldOptions.of({
@@ -82148,7 +82164,25 @@ ${c}
82148
82164
  }))
82149
82165
  }).describe(FieldOptions.of({
82150
82166
  direction: "row"
82151
- }))
82167
+ })),
82168
+ object$1({
82169
+ type: literal("pivot"),
82170
+ column_ids: column_id_array,
82171
+ index_column_ids: array$2(column_id.describe(FieldOptions.of({
82172
+ special: "column_id"
82173
+ }))).default([]).describe(FieldOptions.of({
82174
+ label: "Rows"
82175
+ })),
82176
+ value_column_ids: array$2(column_id.describe(FieldOptions.of({
82177
+ special: "column_id"
82178
+ }))).default([]).describe(FieldOptions.of({
82179
+ label: "Values",
82180
+ minLength: 1
82181
+ })),
82182
+ aggregation: _enum(AGGREGATION_FNS).default("sum").describe(FieldOptions.of({
82183
+ label: "Aggregation"
82184
+ }))
82185
+ }).describe(FieldOptions.of({}))
82152
82186
  ]), TransformationsSchema = object$1({
82153
82187
  transforms: array$2(TransformTypeSchema)
82154
82188
  });
@@ -85450,7 +85484,8 @@ ${c}
85450
85484
  sample_rows: Combine,
85451
85485
  explode_columns: Brackets,
85452
85486
  expand_dict: FileBraces,
85453
- unique: CopySlash
85487
+ unique: CopySlash,
85488
+ pivot: Table2
85454
85489
  };
85455
85490
  function _temp3$4(e) {
85456
85491
  e.stopPropagation(), window.open("https://github.com/marimo-team/marimo/issues/new?title=New%20dataframe%20transform:&labels=enhancement&template=feature_request.yaml", "_blank");
@@ -93947,7 +93982,7 @@ ${c}
93947
93982
  return true;
93948
93983
  }
93949
93984
  }
93950
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-C1FaaACt.js")), VegaPlugin = class {
93985
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-BGTsperM.js")), VegaPlugin = class {
93951
93986
  constructor() {
93952
93987
  __publicField(this, "tagName", "marimo-vega");
93953
93988
  __publicField(this, "validator", object$1({
@@ -101025,7 +101060,7 @@ Defaulting to \`null\`.`;
101025
101060
  return Logger.warn("Failed to get version from mount config"), null;
101026
101061
  }
101027
101062
  }
101028
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.18.5-dev178"), showCodeInRunModeAtom = atom(true);
101063
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.18.5-dev181"), showCodeInRunModeAtom = atom(true);
101029
101064
  atom(null);
101030
101065
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
101031
101066
  constructor() {
@@ -533,6 +533,7 @@ var RuntimeManager = class {
533
533
  try {
534
534
  let e = await fetch(this.healthURL().toString());
535
535
  if (e.redirected) {
536
+ Logger.debug(`Runtime redirected to ${e.url}`);
536
537
  let x2 = e.url.replace(/\/health$/, "");
537
538
  this.config.url = x2;
538
539
  }
@@ -2,7 +2,7 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-DdA8EBol.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
4
4
  import "./Combination-33P1MEPK.js";
5
- import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-D3uOrgqD.js";
5
+ import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-1wVjsLov.js";
6
6
  import { l as Events } from "./button-BlF-78eJ.js";
7
7
  import { o as Objects, s as Logger } from "./hotkeys-C4e3s3sJ.js";
8
8
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.18.5-dev178",
3
+ "version": "0.18.5-dev181",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -15,6 +15,7 @@ export function dbDisplayName(name: string) {
15
15
  case "mariadb":
16
16
  return "MariaDB";
17
17
  case "mssql":
18
+ case "microsoft sql server":
18
19
  return "Microsoft SQL Server";
19
20
  case "oracle":
20
21
  return "Oracle";
@@ -47,6 +47,7 @@ function getFormatter(dialect: string): SqlCodeFormatter {
47
47
  }
48
48
  case "mssql":
49
49
  case "sqlserver":
50
+ case "microsoft sql server":
50
51
  return {
51
52
  formatTableName: defaultFormatter.formatTableName,
52
53
  formatSelectClause: (columnName: string, tableName: string) =>
@@ -86,6 +87,8 @@ function getFormatter(dialect: string): SqlCodeFormatter {
86
87
  case "spark":
87
88
  case "trino":
88
89
  case "singlestoredb":
90
+ case "databricks":
91
+ case "datafusion":
89
92
  return defaultFormatter;
90
93
  default:
91
94
  logNever(dialect);
@@ -195,6 +195,7 @@ async function getSqlFormatterDialect(
195
195
  return duckdb;
196
196
  case "mssql":
197
197
  case "sqlserver":
198
+ case "microsoft sql server":
198
199
  return transactsql;
199
200
  case "athena":
200
201
  case "awsathena":
@@ -203,7 +204,10 @@ async function getSqlFormatterDialect(
203
204
  case "flink":
204
205
  case "mongodb":
205
206
  case "timescaledb":
207
+ case "datafusion":
206
208
  return sql;
209
+ case "databricks":
210
+ return spark;
207
211
  default:
208
212
  logNever(sqlDialect);
209
213
  return defaultDialect;
@@ -373,6 +373,7 @@ function connectionNameToParserDialect(
373
373
  return "Sqlite";
374
374
  case "mssql":
375
375
  case "sqlserver":
376
+ case "microsoft sql server":
376
377
  return "TransactSQL";
377
378
  case "duckdb":
378
379
  return "DuckDB";
@@ -404,6 +405,8 @@ function connectionNameToParserDialect(
404
405
  case "tidb":
405
406
  case "singlestoredb":
406
407
  case "spark":
408
+ case "databricks":
409
+ case "datafusion":
407
410
  Logger.debug("Unsupported dialect", { dialect });
408
411
  return null;
409
412
  default:
@@ -49,6 +49,9 @@ const KNOWN_DIALECTS_ARRAY = [
49
49
  "oracledb",
50
50
  "singlestoredb",
51
51
  "timescaledb",
52
+ "databricks",
53
+ "datafusion",
54
+ "microsoft sql server",
52
55
  ] as const;
53
56
  const KNOWN_DIALECTS: ReadonlySet<string> = new Set(KNOWN_DIALECTS_ARRAY);
54
57
  type KnownDialect = (typeof KNOWN_DIALECTS_ARRAY)[number];
@@ -80,6 +83,7 @@ export function guessDialect(
80
83
  return SQLite;
81
84
  case "mssql":
82
85
  case "sqlserver":
86
+ case "microsoft sql server":
83
87
  return MSSQL;
84
88
  case "duckdb":
85
89
  return DuckDBDialect;
@@ -109,6 +113,8 @@ export function guessDialect(
109
113
  case "tidb":
110
114
  case "singlestoredb":
111
115
  case "spark":
116
+ case "databricks":
117
+ case "datafusion":
112
118
  Logger.debug("Unsupported dialect", { dialect });
113
119
  return ModifiedStandardSQL;
114
120
  default:
@@ -171,6 +171,7 @@ export class RuntimeManager {
171
171
  const response = await fetch(this.healthURL().toString());
172
172
  // If there is a redirect, update the URL in the config
173
173
  if (response.redirected) {
174
+ Logger.debug(`Runtime redirected to ${response.url}`);
174
175
  // strip /health from the URL
175
176
  const baseUrl = response.url.replace(/\/health$/, "");
176
177
  this.config.url = baseUrl;
@@ -29,7 +29,8 @@ function createConnectionTransport(
29
29
  }
30
30
  // Create a connection transport using the ReconnectingWebSocket from partysocket
31
31
  // This handles reconnecting when the connection is lost.
32
- return new ReconnectingWebSocket(options.url(), undefined, {
32
+ const urlProvider = options.url; // We don't call the URL provider now since it may change (i.e. if the runtime redirects)
33
+ return new ReconnectingWebSocket(urlProvider, undefined, {
33
34
  // We don't want Infinity retries
34
35
  maxRetries: 10,
35
36
  debug: false,
package/src/mount.tsx CHANGED
@@ -231,6 +231,8 @@ const mountOptionsSchema = z.object({
231
231
  .array(
232
232
  z.looseObject({
233
233
  url: z.string(),
234
+ // Lazy by default, but can be overridden by the runtime config
235
+ lazy: z.boolean().default(true),
234
236
  authToken: z.string().nullish(),
235
237
  }),
236
238
  )
@@ -300,7 +302,6 @@ function initStore(options: unknown) {
300
302
  Logger.debug("⚡ Runtime URL", firstRuntimeConfig.url);
301
303
  store.set(runtimeConfigAtom, {
302
304
  ...firstRuntimeConfig,
303
- lazy: true,
304
305
  serverToken: parsedOptions.data.serverToken,
305
306
  });
306
307
  } else {
@@ -20,7 +20,7 @@ exports[`renderZodSchema > should render a form aggregate 1`] = `
20
20
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
21
21
  for="_r_26_-form-item"
22
22
  >
23
- Group by columns
23
+ Columns
24
24
  </label>
25
25
  <div
26
26
  aria-describedby="_r_26_-form-item-description"
@@ -39,7 +39,7 @@ exports[`renderZodSchema > should render a form aggregate 1`] = `
39
39
  <span
40
40
  class="truncate flex-1 min-w-0"
41
41
  >
42
- Select group by columns
42
+ Select columns
43
43
  </span>
44
44
  <svg
45
45
  aria-hidden="true"
@@ -392,7 +392,7 @@ exports[`renderZodSchema > should render a form explode_columns 1`] = `
392
392
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
393
393
  for="_r_2o_-form-item"
394
394
  >
395
- Group by columns
395
+ Columns
396
396
  </label>
397
397
  <div
398
398
  aria-describedby="_r_2o_-form-item-description"
@@ -411,7 +411,7 @@ exports[`renderZodSchema > should render a form explode_columns 1`] = `
411
411
  <span
412
412
  class="truncate flex-1 min-w-0"
413
413
  >
414
- Select group by columns
414
+ Select columns
415
415
  </span>
416
416
  <svg
417
417
  aria-hidden="true"
@@ -771,6 +771,233 @@ exports[`renderZodSchema > should render a form group_by 1`] = `
771
771
  </DocumentFragment>
772
772
  `;
773
773
 
774
+ exports[`renderZodSchema > should render a form pivot 1`] = `
775
+ <DocumentFragment>
776
+ <div
777
+ class="flex flex-col gap-6"
778
+ >
779
+ <input
780
+ name="type"
781
+ type="hidden"
782
+ value="pivot"
783
+ />
784
+ <div
785
+ class="flex flex-row align-start"
786
+ >
787
+ <div
788
+ class="flex flex-col gap-1"
789
+ >
790
+ <label
791
+ class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
792
+ for="_r_3a_-form-item"
793
+ >
794
+ Columns
795
+ </label>
796
+ <div
797
+ aria-describedby="_r_3a_-form-item-description"
798
+ aria-invalid="false"
799
+ class="relative"
800
+ id="_r_3a_-form-item"
801
+ >
802
+ <div
803
+ aria-controls="radix-_r_3b_"
804
+ aria-expanded="false"
805
+ aria-haspopup="dialog"
806
+ class="flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"
807
+ data-state="closed"
808
+ type="button"
809
+ >
810
+ <span
811
+ class="truncate flex-1 min-w-0"
812
+ >
813
+ Select columns
814
+ </span>
815
+ <svg
816
+ aria-hidden="true"
817
+ class="lucide lucide-chevron-down ml-3 w-4 h-4 opacity-50 shrink-0"
818
+ fill="none"
819
+ height="24"
820
+ stroke="currentColor"
821
+ stroke-linecap="round"
822
+ stroke-linejoin="round"
823
+ stroke-width="2"
824
+ viewBox="0 0 24 24"
825
+ width="24"
826
+ xmlns="http://www.w3.org/2000/svg"
827
+ >
828
+ <path
829
+ d="m6 9 6 6 6-6"
830
+ />
831
+ </svg>
832
+ </div>
833
+ <div
834
+ class="flex flex-col gap-1 items-start"
835
+ />
836
+ </div>
837
+ </div>
838
+ </div>
839
+ <div
840
+ class="flex flex-row align-start"
841
+ >
842
+ <div
843
+ class="flex flex-col gap-1"
844
+ >
845
+ <label
846
+ class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
847
+ for="_r_3c_-form-item"
848
+ >
849
+ Rows
850
+ </label>
851
+ <div
852
+ aria-describedby="_r_3c_-form-item-description"
853
+ aria-invalid="false"
854
+ class="relative"
855
+ id="_r_3c_-form-item"
856
+ >
857
+ <div
858
+ aria-controls="radix-_r_3d_"
859
+ aria-expanded="false"
860
+ aria-haspopup="dialog"
861
+ class="flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"
862
+ data-state="closed"
863
+ type="button"
864
+ >
865
+ <span
866
+ class="truncate flex-1 min-w-0"
867
+ >
868
+ Select rows
869
+ </span>
870
+ <svg
871
+ aria-hidden="true"
872
+ class="lucide lucide-chevron-down ml-3 w-4 h-4 opacity-50 shrink-0"
873
+ fill="none"
874
+ height="24"
875
+ stroke="currentColor"
876
+ stroke-linecap="round"
877
+ stroke-linejoin="round"
878
+ stroke-width="2"
879
+ viewBox="0 0 24 24"
880
+ width="24"
881
+ xmlns="http://www.w3.org/2000/svg"
882
+ >
883
+ <path
884
+ d="m6 9 6 6 6-6"
885
+ />
886
+ </svg>
887
+ </div>
888
+ <div
889
+ class="flex flex-col gap-1 items-start"
890
+ />
891
+ </div>
892
+ </div>
893
+ </div>
894
+ <div
895
+ class="flex flex-row align-start"
896
+ >
897
+ <div
898
+ class="flex flex-col gap-1"
899
+ >
900
+ <label
901
+ class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
902
+ for="_r_3e_-form-item"
903
+ >
904
+ Values
905
+ </label>
906
+ <div
907
+ aria-describedby="_r_3e_-form-item-description"
908
+ aria-invalid="false"
909
+ class="relative"
910
+ id="_r_3e_-form-item"
911
+ >
912
+ <div
913
+ aria-controls="radix-_r_3f_"
914
+ aria-expanded="false"
915
+ aria-haspopup="dialog"
916
+ class="flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"
917
+ data-state="closed"
918
+ type="button"
919
+ >
920
+ <span
921
+ class="truncate flex-1 min-w-0"
922
+ >
923
+ Select values
924
+ </span>
925
+ <svg
926
+ aria-hidden="true"
927
+ class="lucide lucide-chevron-down ml-3 w-4 h-4 opacity-50 shrink-0"
928
+ fill="none"
929
+ height="24"
930
+ stroke="currentColor"
931
+ stroke-linecap="round"
932
+ stroke-linejoin="round"
933
+ stroke-width="2"
934
+ viewBox="0 0 24 24"
935
+ width="24"
936
+ xmlns="http://www.w3.org/2000/svg"
937
+ >
938
+ <path
939
+ d="m6 9 6 6 6-6"
940
+ />
941
+ </svg>
942
+ </div>
943
+ <div
944
+ class="flex flex-col gap-1 items-start"
945
+ />
946
+ </div>
947
+ </div>
948
+ </div>
949
+ <div
950
+ class="flex flex-row align-start"
951
+ >
952
+ <div
953
+ class="flex flex-col gap-1"
954
+ >
955
+ <label
956
+ class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 whitespace-pre"
957
+ for="_r_3g_-form-item"
958
+ >
959
+ Aggregation
960
+ </label>
961
+ <button
962
+ aria-autocomplete="none"
963
+ aria-controls="radix-_r_3h_"
964
+ aria-expanded="false"
965
+ class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xs-solid border border-input hover:shadow-sm-solid focus:border-primary focus:shadow-md-solid disabled:hover:shadow-xs-solid mb-0 min-w-[180px]"
966
+ data-placeholder=""
967
+ data-state="closed"
968
+ dir="ltr"
969
+ role="combobox"
970
+ type="button"
971
+ >
972
+ <span
973
+ style="pointer-events: none;"
974
+ >
975
+ --
976
+ </span>
977
+ <svg
978
+ aria-hidden="true"
979
+ class="lucide lucide-chevron-down h-4 w-4 opacity-50"
980
+ fill="none"
981
+ height="24"
982
+ stroke="currentColor"
983
+ stroke-linecap="round"
984
+ stroke-linejoin="round"
985
+ stroke-width="2"
986
+ viewBox="0 0 24 24"
987
+ width="24"
988
+ xmlns="http://www.w3.org/2000/svg"
989
+ >
990
+ <path
991
+ d="m6 9 6 6 6-6"
992
+ />
993
+ </svg>
994
+ </button>
995
+ </div>
996
+ </div>
997
+ </div>
998
+ </DocumentFragment>
999
+ `;
1000
+
774
1001
  exports[`renderZodSchema > should render a form rename_column 1`] = `
775
1002
  <DocumentFragment>
776
1003
  <div
@@ -1064,7 +1291,7 @@ exports[`renderZodSchema > should render a form select_columns 1`] = `
1064
1291
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1065
1292
  for="_r_3_-form-item"
1066
1293
  >
1067
- Group by columns
1294
+ Columns
1068
1295
  </label>
1069
1296
  <div
1070
1297
  aria-describedby="_r_3_-form-item-description"
@@ -1083,7 +1310,7 @@ exports[`renderZodSchema > should render a form select_columns 1`] = `
1083
1310
  <span
1084
1311
  class="truncate flex-1 min-w-0"
1085
1312
  >
1086
- Select group by columns
1313
+ Select columns
1087
1314
  </span>
1088
1315
  <svg
1089
1316
  aria-hidden="true"
@@ -1347,7 +1574,7 @@ exports[`renderZodSchema > should render a form unique 1`] = `
1347
1574
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1348
1575
  for="_r_31_-form-item"
1349
1576
  >
1350
- Group by columns
1577
+ Columns
1351
1578
  </label>
1352
1579
  <div
1353
1580
  aria-describedby="_r_31_-form-item-description"
@@ -1366,7 +1593,7 @@ exports[`renderZodSchema > should render a form unique 1`] = `
1366
1593
  <span
1367
1594
  class="truncate flex-1 min-w-0"
1368
1595
  >
1369
- Select group by columns
1596
+ Select columns
1370
1597
  </span>
1371
1598
  <svg
1372
1599
  aria-hidden="true"
@@ -1451,7 +1678,7 @@ exports[`renders custom forms column_id 1`] = `
1451
1678
  >
1452
1679
  <label
1453
1680
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1454
- for="_r_3a_-form-item"
1681
+ for="_r_3p_-form-item"
1455
1682
  >
1456
1683
  Column
1457
1684
  </label>
@@ -1460,7 +1687,7 @@ exports[`renders custom forms column_id 1`] = `
1460
1687
  >
1461
1688
  <button
1462
1689
  aria-autocomplete="none"
1463
- aria-controls="radix-_r_3b_"
1690
+ aria-controls="radix-_r_3q_"
1464
1691
  aria-expanded="false"
1465
1692
  class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xs-solid border border-input hover:shadow-sm-solid focus:border-primary focus:shadow-md-solid disabled:hover:shadow-xs-solid mb-0 min-w-[180px]"
1466
1693
  data-placeholder=""
@@ -1504,18 +1731,18 @@ exports[`renders custom forms column_id_array 1`] = `
1504
1731
  >
1505
1732
  <label
1506
1733
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1507
- for="_r_3h_-form-item"
1734
+ for="_r_40_-form-item"
1508
1735
  >
1509
- Group by columns
1736
+ Columns
1510
1737
  </label>
1511
1738
  <div
1512
- aria-describedby="_r_3h_-form-item-description"
1739
+ aria-describedby="_r_40_-form-item-description"
1513
1740
  aria-invalid="false"
1514
1741
  class="relative"
1515
- id="_r_3h_-form-item"
1742
+ id="_r_40_-form-item"
1516
1743
  >
1517
1744
  <div
1518
- aria-controls="radix-_r_3i_"
1745
+ aria-controls="radix-_r_41_"
1519
1746
  aria-expanded="false"
1520
1747
  aria-haspopup="dialog"
1521
1748
  class="flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"
@@ -1525,7 +1752,7 @@ exports[`renders custom forms column_id_array 1`] = `
1525
1752
  <span
1526
1753
  class="truncate flex-1 min-w-0"
1527
1754
  >
1528
- Select group by columns
1755
+ Select columns
1529
1756
  </span>
1530
1757
  <svg
1531
1758
  aria-hidden="true"
@@ -1559,13 +1786,13 @@ exports[`renders custom forms column_id_dot_array 1`] = `
1559
1786
  class="flex flex-col gap-1"
1560
1787
  >
1561
1788
  <div
1562
- aria-describedby="_r_3j_-form-item-description"
1789
+ aria-describedby="_r_42_-form-item-description"
1563
1790
  aria-invalid="false"
1564
1791
  class="relative"
1565
- id="_r_3j_-form-item"
1792
+ id="_r_42_-form-item"
1566
1793
  >
1567
1794
  <div
1568
- aria-controls="radix-_r_3k_"
1795
+ aria-controls="radix-_r_43_"
1569
1796
  aria-expanded="false"
1570
1797
  aria-haspopup="dialog"
1571
1798
  class="flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50 min-w-[180px]"
@@ -1610,7 +1837,7 @@ exports[`renders custom forms column_id_optional 1`] = `
1610
1837
  >
1611
1838
  <label
1612
1839
  class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1613
- for="_r_3l_-form-item"
1840
+ for="_r_44_-form-item"
1614
1841
  >
1615
1842
  Column
1616
1843
  </label>
@@ -1619,7 +1846,7 @@ exports[`renders custom forms column_id_optional 1`] = `
1619
1846
  >
1620
1847
  <button
1621
1848
  aria-autocomplete="none"
1622
- aria-controls="radix-_r_3m_"
1849
+ aria-controls="radix-_r_45_"
1623
1850
  aria-expanded="false"
1624
1851
  class="flex h-6 w-fit items-center justify-between rounded-sm bg-background px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer shadow-xs-solid border border-input hover:shadow-sm-solid focus:border-primary focus:shadow-md-solid disabled:hover:shadow-xs-solid mb-0 min-w-[180px]"
1625
1852
  data-placeholder=""
@@ -17,6 +17,7 @@ import {
17
17
  PlusIcon,
18
18
  ShuffleIcon,
19
19
  SquareMousePointerIcon,
20
+ Table2Icon,
20
21
  Trash2Icon,
21
22
  } from "lucide-react";
22
23
  import React, {
@@ -394,4 +395,5 @@ const ICONS: Record<TransformType["type"], React.FC<{ className?: string }>> = {
394
395
  explode_columns: BracketsIcon,
395
396
  expand_dict: FileJsonIcon,
396
397
  unique: CopySlashIcon,
398
+ pivot: Table2Icon,
397
399
  };
@@ -29,7 +29,7 @@ export const column_id_array = z
29
29
  .array(column_id.describe(FieldOptions.of({ special: "column_id" })))
30
30
  .min(1, "At least one column is required")
31
31
  .default([])
32
- .describe(FieldOptions.of({ label: "Group by columns", minLength: 1 }));
32
+ .describe(FieldOptions.of({ label: "Columns", minLength: 1 }));
33
33
 
34
34
  const ColumnConversionTransformSchema = z
35
35
  .object({
@@ -107,7 +107,10 @@ const FilterRowsTransformSchema = z.object({
107
107
  const GroupByTransformSchema = z
108
108
  .object({
109
109
  type: z.literal("group_by"),
110
- column_ids: column_id_array,
110
+ column_ids: z
111
+ .array(column_id.describe(FieldOptions.of({ special: "column_id" })))
112
+ .default([])
113
+ .describe(FieldOptions.of({ label: "Group by columns", minLength: 1 })),
111
114
  aggregation_column_ids: z
112
115
  .array(column_id.describe(FieldOptions.of({ special: "column_id" })))
113
116
  .default([])
@@ -193,6 +196,25 @@ const UniqueTransformSchema = z
193
196
  })
194
197
  .describe(FieldOptions.of({ direction: "row" }));
195
198
 
199
+ const PivotTransformSchema = z
200
+ .object({
201
+ type: z.literal("pivot"),
202
+ column_ids: column_id_array,
203
+ index_column_ids: z
204
+ .array(column_id.describe(FieldOptions.of({ special: "column_id" })))
205
+ .default([])
206
+ .describe(FieldOptions.of({ label: "Rows" })),
207
+ value_column_ids: z
208
+ .array(column_id.describe(FieldOptions.of({ special: "column_id" })))
209
+ .default([])
210
+ .describe(FieldOptions.of({ label: "Values", minLength: 1 })),
211
+ aggregation: z
212
+ .enum(AGGREGATION_FNS)
213
+ .default("sum")
214
+ .describe(FieldOptions.of({ label: "Aggregation" })),
215
+ })
216
+ .describe(FieldOptions.of({}));
217
+
196
218
  export const TransformTypeSchema = z.union([
197
219
  FilterRowsTransformSchema,
198
220
  SelectColumnsTransformSchema,
@@ -206,6 +228,7 @@ export const TransformTypeSchema = z.union([
206
228
  ExplodeColumnsTransformSchema,
207
229
  ExpandDictTransformSchema,
208
230
  UniqueTransformSchema,
231
+ PivotTransformSchema,
209
232
  ]);
210
233
 
211
234
  export type TransformType = z.infer<typeof TransformTypeSchema>;