@malloydata/malloy-explorer 0.0.285-dev250610181307 → 0.0.294-dev250630221944

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/cjs/index.cjs +2046 -1040
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/index.js +2048 -1042
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/malloy-explorer.css +18 -0
  6. package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +2 -1
  7. package/dist/types/components/QueryPanel/VizEditor/ArrayEditor.d.ts +3 -0
  8. package/dist/types/components/QueryPanel/VizEditor/BooleanEditor.d.ts +3 -0
  9. package/dist/types/components/QueryPanel/VizEditor/FieldEditor.d.ts +3 -0
  10. package/dist/types/components/QueryPanel/VizEditor/InfoHover.d.ts +4 -0
  11. package/dist/types/components/QueryPanel/VizEditor/NumberEditor.d.ts +3 -0
  12. package/dist/types/components/QueryPanel/VizEditor/ObjectEditor.d.ts +3 -0
  13. package/dist/types/components/QueryPanel/VizEditor/OneOfEditor.d.ts +3 -0
  14. package/dist/types/components/QueryPanel/VizEditor/StringEditor.d.ts +3 -0
  15. package/dist/types/components/QueryPanel/VizEditor/VizEditor.d.ts +11 -0
  16. package/dist/types/components/QueryPanel/VizEditor/VizEditorDialog.d.ts +12 -0
  17. package/dist/types/components/QueryPanel/VizEditor/VizEditorPopover.d.ts +10 -0
  18. package/dist/types/components/QueryPanel/VizEditor/styles.d.ts +72 -0
  19. package/dist/types/components/QueryPanel/VizEditor/types.d.ts +11 -0
  20. package/dist/types/components/QueryPanel/dialogStyles.d.ts +60 -0
  21. package/dist/types/components/filters/DateTimeFilterCore.d.ts +1 -1
  22. package/dist/types/components/primitives/ScrollableArea.d.ts +3 -0
  23. package/dist/types/components/primitives/utils/icon.d.ts +18 -0
  24. package/dist/types/components/utils/renderer.d.ts +9 -3
  25. package/package.json +10 -10
package/dist/esm/index.js CHANGED
@@ -17,10 +17,10 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
17
17
  import * as React from "react";
18
18
  import React__default, { useLayoutEffect, useEffect, useMemo, useState, useRef, createElement, useContext, useCallback, createContext, memo, useReducer } from "react";
19
19
  import * as QB from "@malloydata/malloy-query-builder";
20
- import { ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation, ASTLimitViewOperation, ASTTimeTruncationExpression, ASTFilterWithFilterString, ASTWhereViewOperation, ASTHavingViewOperation, ASTDrillViewOperation, ASTQuery } from "@malloydata/malloy-query-builder";
20
+ import { ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTAnnotation, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation, ASTLimitViewOperation, ASTTimeTruncationExpression, ASTFilterWithFilterString, ASTWhereViewOperation, ASTHavingViewOperation, ASTDrillViewOperation, ASTQuery } from "@malloydata/malloy-query-builder";
21
21
  import { Tag } from "@malloydata/malloy-tag";
22
+ import { MalloyRenderer, isCoreVizPluginInstance } from "@malloydata/render";
22
23
  import { TemporalFilterExpression, BooleanFilterExpression, NumberFilterExpression, StringFilterExpression } from "@malloydata/malloy-filter";
23
- import { MalloyRenderer } from "@malloydata/render";
24
24
  import * as ReactDOM from "react-dom";
25
25
  import ReactDOM__default, { unstable_batchedUpdates, createPortal } from "react-dom";
26
26
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
@@ -3745,6 +3745,15 @@ const fontStyles = {
3745
3745
  lineHeight: "mly1d3mw78",
3746
3746
  letterSpacing: "mly1gu5id8",
3747
3747
  $$css: true
3748
+ },
3749
+ tooltipText: {
3750
+ fontFamily: "mly1rj5sg5",
3751
+ color: "mly1rs82da",
3752
+ fontSize: "mlyif65rj",
3753
+ fontStyle: "mly1j61x8r",
3754
+ fontWeight: "mlyo1l8bm",
3755
+ lineHeight: "mly1fc57z9",
3756
+ $$css: true
3748
3757
  }
3749
3758
  };
3750
3759
  const SvgChevronDown = (props2) => /* @__PURE__ */ React.createElement("svg", { width: 110, height: 110, viewBox: "15 15 80 80", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...props2 }, /* @__PURE__ */ React.createElement("g", { id: "cahevron_down", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("path", { d: "M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z", id: "Path", fill: "currentColor", fillRule: "nonzero", transform: "translate(55.000000, 55.000005) rotate(-180.000000) translate(-55.000000, -55.000005) " })));
@@ -3781,6 +3790,7 @@ const SvgRadioChecked = (props2) => /* @__PURE__ */ React.createElement("svg", {
3781
3790
  const SvgRadioUnchecked = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 16, viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("circle", { cx: 8, cy: 8, r: 8, fill: "currentColor" }), /* @__PURE__ */ React.createElement("circle", { cx: 8, cy: 8, r: 7, fill: "#FFFFFF" }));
3782
3791
  const SvgWarning = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z" }));
3783
3792
  const SvgCheckCircle = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
3793
+ const SvgGear = (props2) => /* @__PURE__ */ React.createElement("svg", { fill: "none", height: 15, viewBox: "0 0 15 15", width: 15, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("g", { clipRule: "evenodd", fill: "#151515", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("path", { d: "m10 7.50001c0 1.38072-1.11928 2.49999-2.49999 2.49999s-2.5-1.11927-2.5-2.49999c0-1.38071 1.11929-2.5 2.5-2.5s2.49999 1.11929 2.49999 2.5zm-.99999 0c0 .82843-.67157 1.5-1.5 1.5-.82842 0-1.5-.67157-1.5-1.5 0-.82842.67158-1.5 1.5-1.5.82843 0 1.5.67158 1.5 1.5z" }), /* @__PURE__ */ React.createElement("path", { d: "m8.92908 3.05724c-.34403-1.52302-2.5141-1.52302-2.85813 0-.07078.31333-.43034.46227-.70195.29076-1.3202-.83367-2.85467.7008-2.021 2.021.17151.27161.02257.63117-.29076.70195-1.52302.34403-1.52302 2.5141 0 2.85813.31333.07077.46227.43034.29076.70195-.83367 1.32017.7008 2.85467 2.021 2.02097.27161-.1715.63117-.0225.70195.2908.34403 1.523 2.5141 1.523 2.85813 0 .07077-.3133.43034-.4623.70195-.2908 1.32017.8337 2.85467-.7008 2.02097-2.02097-.1715-.27161-.0225-.63118.2908-.70195 1.523-.34403 1.523-2.5141 0-2.85813-.3133-.07078-.4623-.43034-.2908-.70195.8337-1.3202-.7008-2.85467-2.02097-2.021-.27161.17151-.63118.02257-.70195-.29076zm-1.8827.22034c.1092-.48347.79806-.48347.90727 0 .22296.98707 1.35568 1.45625 2.21135.91595.419-.26464.9061.22246.6415.64154-.5403.85562-.0711 1.98834.916 2.21131.4834.1092.4834.79806 0 .90727-.9871.22296-1.4563 1.35568-.916 2.21135.2646.419-.2225.9061-.6415.6415-.85567-.5403-1.98839-.0711-2.21135.916-.10921.4834-.79807.4834-.90727 0-.22297-.9871-1.35569-1.4563-2.21131-.916-.41908.2646-.90618-.2225-.64154-.6415.5403-.85567.07112-1.98839-.91595-2.21135-.48347-.10921-.48347-.79807 0-.90727.98707-.22297 1.45625-1.35569.91595-2.21131-.26464-.41908.22246-.90618.64154-.64154.85562.5403 1.98834.07112 2.21131-.91595z" })));
3784
3794
  const SvgInfo = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
3785
3795
  const SvgError = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
3786
3796
  const SvgRefresh = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
@@ -3821,6 +3831,7 @@ const ICON_MAP = {
3821
3831
  radioUnchecked: SvgRadioUnchecked,
3822
3832
  warning: SvgWarning,
3823
3833
  check_circle: SvgCheckCircle,
3834
+ gear: SvgGear,
3824
3835
  info: SvgInfo,
3825
3836
  error: SvgError,
3826
3837
  refresh: SvgRefresh,
@@ -3855,6 +3866,7 @@ const ICON_MAP = {
3855
3866
  one_to_one: SvgTypeIconOneToOne,
3856
3867
  // Visualizations
3857
3868
  viz_bar_chart: SvgVizBarChart,
3869
+ viz_bar: SvgVizBarChart,
3858
3870
  viz_boolean: SvgVizBoolean,
3859
3871
  viz_bytes: SvgVizNumber,
3860
3872
  viz_cartesian_chart: SvgVizLine,
@@ -3864,6 +3876,7 @@ const ICON_MAP = {
3864
3876
  viz_image: SvgVizImage,
3865
3877
  viz_json: SvgVizJson,
3866
3878
  viz_line_chart: SvgVizLine,
3879
+ viz_line: SvgVizLine,
3867
3880
  viz_link: SvgVizLink,
3868
3881
  viz_list: SvgVizList,
3869
3882
  viz_list_detail: SvgVizListDetail,
@@ -3891,11 +3904,11 @@ function Icon({
3891
3904
  return null;
3892
3905
  }
3893
3906
  return /* @__PURE__ */ jsx(IconComponent, {
3894
- ..._stylex.props(styles$O.main, colorVariants$3[color], customStyle),
3907
+ ..._stylex.props(styles$Q.main, colorVariants$3[color], customStyle),
3895
3908
  "data-testid": `icon-${color}-${name}`
3896
3909
  });
3897
3910
  }
3898
- const styles$O = {
3911
+ const styles$Q = {
3899
3912
  main: {
3900
3913
  display: "mly1rg5ohu",
3901
3914
  width: "mly1kky2od",
@@ -3964,18 +3977,18 @@ function Badge({
3964
3977
  customStyle
3965
3978
  }) {
3966
3979
  return /* @__PURE__ */ jsxs("div", {
3967
- ..._stylex.props(styles$N.main, colorVariants$2[color], customStyle),
3980
+ ..._stylex.props(styles$P.main, colorVariants$2[color], customStyle),
3968
3981
  children: [icon && /* @__PURE__ */ jsx(Icon, {
3969
3982
  color,
3970
3983
  name: icon
3971
3984
  }), /* @__PURE__ */ jsx("div", {
3972
3985
  "data-testid": "badge-label",
3973
- ..._stylex.props(fontStyles.badge, styles$N.label),
3986
+ ..._stylex.props(fontStyles.badge, styles$P.label),
3974
3987
  children: label
3975
3988
  })]
3976
3989
  });
3977
3990
  }
3978
- const styles$N = {
3991
+ const styles$P = {
3979
3992
  main: {
3980
3993
  display: "mly3nfvp2",
3981
3994
  height: "mly1qx5ct2",
@@ -4057,10 +4070,10 @@ function Divider({
4057
4070
  customStyle
4058
4071
  }) {
4059
4072
  return /* @__PURE__ */ jsx("div", {
4060
- ..._stylex.props(styles$M.main, orientationVariants[orientation], customStyle)
4073
+ ..._stylex.props(styles$O.main, orientationVariants[orientation], customStyle)
4061
4074
  });
4062
4075
  }
4063
- const styles$M = {
4076
+ const styles$O = {
4064
4077
  main: {
4065
4078
  background: "mly1xnbgy5",
4066
4079
  backgroundAttachment: null,
@@ -4866,7 +4879,7 @@ function Button({
4866
4879
  ...props2
4867
4880
  }) {
4868
4881
  const button = /* @__PURE__ */ jsxs("button", {
4869
- ..._stylex.props(styles$L.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4882
+ ..._stylex.props(styles$N.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4870
4883
  type: "button",
4871
4884
  disabled: isDisabled,
4872
4885
  ...props2,
@@ -4876,9 +4889,9 @@ function Button({
4876
4889
  },
4877
4890
  children: [icon && /* @__PURE__ */ jsx(Icon, {
4878
4891
  name: icon,
4879
- customStyle: styles$L.icon
4892
+ customStyle: styles$N.icon
4880
4893
  }), label && /* @__PURE__ */ jsx("div", {
4881
- ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$L.label),
4894
+ ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$N.label),
4882
4895
  children: label
4883
4896
  })]
4884
4897
  }), isDisabled && /* @__PURE__ */ jsx("div", {
@@ -4905,7 +4918,7 @@ function Button({
4905
4918
  return button;
4906
4919
  }
4907
4920
  }
4908
- const styles$L = {
4921
+ const styles$N = {
4909
4922
  main: {
4910
4923
  display: "mly3nfvp2",
4911
4924
  flexDirection: "mlydt5ytf",
@@ -5156,7 +5169,7 @@ function Token({
5156
5169
  }) {
5157
5170
  const isInteractive = onClick !== void 0 || asButtonTrigger;
5158
5171
  const token2 = /* @__PURE__ */ jsxs("div", {
5159
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$K.nonInteractive, customStyle),
5172
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$M.nonInteractive, customStyle),
5160
5173
  ...dragProps == null ? void 0 : dragProps.attributes,
5161
5174
  ...dragProps == null ? void 0 : dragProps.listeners,
5162
5175
  children: [icon && /* @__PURE__ */ jsx(Icon, {
@@ -5187,13 +5200,13 @@ function Token({
5187
5200
  }), /* @__PURE__ */ jsx(Portal$4, {
5188
5201
  children: /* @__PURE__ */ jsx(Content2$4, {
5189
5202
  ...tooltipProps,
5190
- ..._stylex.props(typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
5203
+ ..._stylex.props(fontStyles.tooltipText, typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
5191
5204
  children: tooltip
5192
5205
  })
5193
5206
  })]
5194
5207
  }) : token2;
5195
5208
  }
5196
- const styles$K = {
5209
+ const styles$M = {
5197
5210
  nonInteractive: {
5198
5211
  cursor: "mlyt0e3qv",
5199
5212
  background: "mly1np9qvj",
@@ -5217,7 +5230,7 @@ function TokenGroup({
5217
5230
  }) {
5218
5231
  const count2 = React.Children.count(children);
5219
5232
  return /* @__PURE__ */ jsx("div", {
5220
- ..._stylex.props(styles$J.main, customStyle),
5233
+ ..._stylex.props(styles$L.main, customStyle),
5221
5234
  children: React.Children.map(children, (child, index2) => /* @__PURE__ */ React.cloneElement(child, {
5222
5235
  customStyle: {
5223
5236
  ...child.props.customStyle,
@@ -5228,16 +5241,16 @@ function TokenGroup({
5228
5241
  });
5229
5242
  }
5230
5243
  const getChildStyle = (index2, count2) => {
5231
- if (count2 === 1) return styles$J.onlyChild;
5232
- if (index2 === 0) return styles$J.firstChild;
5233
- if (index2 === count2 - 1) return styles$J.lastChild;
5234
- return styles$J.innerChild;
5244
+ if (count2 === 1) return styles$L.onlyChild;
5245
+ if (index2 === 0) return styles$L.firstChild;
5246
+ if (index2 === count2 - 1) return styles$L.lastChild;
5247
+ return styles$L.innerChild;
5235
5248
  };
5236
5249
  const getTokenColor = (child, groupColor) => {
5237
5250
  const childColor = child.props.color;
5238
5251
  return childColor === void 0 ? groupColor : childColor;
5239
5252
  };
5240
- const styles$J = {
5253
+ const styles$L = {
5241
5254
  main: {
5242
5255
  display: "mlyrvj5dj",
5243
5256
  gridAutoFlow: "mly1mt1orb",
@@ -5309,7 +5322,7 @@ function ErrorIcon({
5309
5322
  },
5310
5323
  children: /* @__PURE__ */ jsx(Icon, {
5311
5324
  name: "warning",
5312
- customStyle: styles$I.errorIcon
5325
+ customStyle: styles$K.errorIcon
5313
5326
  })
5314
5327
  })
5315
5328
  }), /* @__PURE__ */ jsx(TooltipPortal, {
@@ -5322,7 +5335,7 @@ function ErrorIcon({
5322
5335
  })]
5323
5336
  });
5324
5337
  }
5325
- const styles$I = {
5338
+ const styles$K = {
5326
5339
  errorIcon: {
5327
5340
  color: "mly1e2nbdu",
5328
5341
  $$css: true
@@ -5367,22 +5380,22 @@ function EditableToken({
5367
5380
  className: "mly78zum5 mly6s0dn4"
5368
5381
  },
5369
5382
  children: [/* @__PURE__ */ jsxs("div", {
5370
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$H.focused, !!errorMessage && styles$H.hasError, customStyle),
5383
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$J.focused, !!errorMessage && styles$J.hasError, customStyle),
5371
5384
  children: [icon && /* @__PURE__ */ jsx(Icon, {
5372
5385
  name: icon,
5373
- customStyle: styles$H.icon
5386
+ customStyle: styles$J.icon
5374
5387
  }), /* @__PURE__ */ jsxs("span", {
5375
5388
  ...{
5376
5389
  className: "mlywz0xwf"
5377
5390
  },
5378
5391
  children: [/* @__PURE__ */ jsx("span", {
5379
- ..._stylex.props(fontStyles.body, styles$H.placeholder),
5392
+ ..._stylex.props(fontStyles.body, styles$J.placeholder),
5380
5393
  style: {
5381
5394
  whiteSpaceCollapse: "preserve"
5382
5395
  },
5383
5396
  children: value
5384
5397
  }), /* @__PURE__ */ jsx("input", {
5385
- ..._stylex.props(styles$H.input, fontStyles.body),
5398
+ ..._stylex.props(styles$J.input, fontStyles.body),
5386
5399
  ref: inputRef,
5387
5400
  pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
5388
5401
  value,
@@ -5407,7 +5420,7 @@ function EditableToken({
5407
5420
  })]
5408
5421
  });
5409
5422
  }
5410
- const styles$H = {
5423
+ const styles$J = {
5411
5424
  focused: {
5412
5425
  background: "mlyotlr4g",
5413
5426
  backgroundAttachment: null,
@@ -7749,12 +7762,12 @@ function TextInput({
7749
7762
  }
7750
7763
  };
7751
7764
  return /* @__PURE__ */ jsxs("div", {
7752
- ..._stylex.props(styles$G.main, isFocused && styles$G.focused, sizeVariants[size2], customStyle),
7765
+ ..._stylex.props(styles$I.main, isFocused && styles$I.focused, sizeVariants[size2], customStyle),
7753
7766
  children: [icon && /* @__PURE__ */ jsx(Icon, {
7754
7767
  name: icon,
7755
7768
  color: "secondary"
7756
7769
  }), /* @__PURE__ */ jsx("input", {
7757
- ..._stylex.props(fontStyles.body, styles$G.input),
7770
+ ..._stylex.props(fontStyles.body, styles$I.input),
7758
7771
  value,
7759
7772
  placeholder,
7760
7773
  onChange: handleChange,
@@ -7762,7 +7775,7 @@ function TextInput({
7762
7775
  onBlur: handleBlur,
7763
7776
  onKeyDown
7764
7777
  }), hasClear && /* @__PURE__ */ jsx("button", {
7765
- ..._stylex.props(fontStyles.supporting, styles$G.actionButton, value === "" && styles$G.hidden),
7778
+ ..._stylex.props(fontStyles.supporting, styles$I.actionButton, value === "" && styles$I.hidden),
7766
7779
  ref: buttonRef,
7767
7780
  onClick: () => onChange(""),
7768
7781
  tabIndex: 0,
@@ -7770,7 +7783,7 @@ function TextInput({
7770
7783
  })]
7771
7784
  });
7772
7785
  }
7773
- const styles$G = {
7786
+ const styles$I = {
7774
7787
  main: {
7775
7788
  display: "mly78zum5",
7776
7789
  alignItems: "mly6s0dn4",
@@ -7979,7 +7992,7 @@ function SelectorToken({
7979
7992
  onValueChange: handleValueChange,
7980
7993
  required: true,
7981
7994
  children: [/* @__PURE__ */ jsxs(Trigger$3, {
7982
- ..._stylex.props(tokenStyles.main, styles$F.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
7995
+ ..._stylex.props(tokenStyles.main, styles$H.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
7983
7996
  children: [icon && /* @__PURE__ */ jsx(Icon, {
7984
7997
  name: icon,
7985
7998
  customStyle: tokenStyles.icon
@@ -8008,7 +8021,7 @@ function SelectorToken({
8008
8021
  size: "compact",
8009
8022
  icon: "search",
8010
8023
  hasClear: true,
8011
- customStyle: styles$F.searchInput,
8024
+ customStyle: styles$H.searchInput,
8012
8025
  onKeyDown: (event) => {
8013
8026
  const excludedKeys = ["ArrowUp", "ArrowDown"];
8014
8027
  if (!excludedKeys.includes(event.key)) {
@@ -8041,21 +8054,21 @@ function SelectItem({
8041
8054
  ...props2
8042
8055
  }) {
8043
8056
  return /* @__PURE__ */ jsxs(Item$1, {
8044
- ..._stylex.props(fontStyles.body, styles$F.selectItem),
8057
+ ..._stylex.props(fontStyles.body, styles$H.selectItem),
8045
8058
  value,
8046
8059
  ...props2,
8047
8060
  children: [value === selectedValue ? /* @__PURE__ */ jsx(Icon, {
8048
8061
  name: "radioChecked",
8049
- customStyle: styles$F.radioChecked
8062
+ customStyle: styles$H.radioChecked
8050
8063
  }) : /* @__PURE__ */ jsx(Icon, {
8051
8064
  name: "radioUnchecked",
8052
- customStyle: styles$F.radioUnchecked
8065
+ customStyle: styles$H.radioUnchecked
8053
8066
  }), /* @__PURE__ */ jsx(ItemText, {
8054
8067
  children
8055
8068
  })]
8056
8069
  });
8057
8070
  }
8058
- const styles$F = {
8071
+ const styles$H = {
8059
8072
  selectTrigger: {
8060
8073
  whiteSpace: "mlyuxw1ft",
8061
8074
  overflow: "mlyb3r6kr",
@@ -8145,7 +8158,7 @@ function Card({
8145
8158
  customStyle
8146
8159
  }) {
8147
8160
  return /* @__PURE__ */ jsxs("div", {
8148
- ..._stylex.props(styles$E.container, customStyle),
8161
+ ..._stylex.props(styles$G.container, customStyle),
8149
8162
  children: [/* @__PURE__ */ jsx("div", {
8150
8163
  ...{
8151
8164
  className: "mly1717udv"
@@ -8159,7 +8172,7 @@ function Card({
8159
8172
  })]
8160
8173
  });
8161
8174
  }
8162
- const styles$E = {
8175
+ const styles$G = {
8163
8176
  container: {
8164
8177
  display: "mly78zum5",
8165
8178
  flexDirection: "mlydt5ytf",
@@ -8252,7 +8265,7 @@ function CollapsiblePanel({
8252
8265
  },
8253
8266
  children: [icon && /* @__PURE__ */ jsx(Icon, {
8254
8267
  name: icon,
8255
- customStyle: styles$D.icon
8268
+ customStyle: styles$F.icon
8256
8269
  }), /* @__PURE__ */ jsx("div", {
8257
8270
  ...{
8258
8271
  className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
@@ -8294,7 +8307,7 @@ function CollapsiblePanel({
8294
8307
  })]
8295
8308
  });
8296
8309
  }
8297
- const styles$D = {
8310
+ const styles$F = {
8298
8311
  icon: {
8299
8312
  $$css: true
8300
8313
  }
@@ -8326,10 +8339,10 @@ function CollapsibleListItem({
8326
8339
  className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
8327
8340
  },
8328
8341
  children: [/* @__PURE__ */ jsx("span", {
8329
- ..._stylex.props(fontStyles.body, styles$C.label),
8342
+ ..._stylex.props(fontStyles.body, styles$E.label),
8330
8343
  children: label
8331
8344
  }), sublabel && /* @__PURE__ */ jsx("span", {
8332
- ..._stylex.props(fontStyles.supporting, styles$C.sublabel),
8345
+ ..._stylex.props(fontStyles.supporting, styles$E.sublabel),
8333
8346
  children: sublabel
8334
8347
  })]
8335
8348
  })]
@@ -8341,7 +8354,7 @@ function CollapsibleListItem({
8341
8354
  })]
8342
8355
  });
8343
8356
  }
8344
- const styles$C = {
8357
+ const styles$E = {
8345
8358
  label: {
8346
8359
  flexGrow: "mly1iyjqo2",
8347
8360
  fontWeight: "mly1xlr1w8",
@@ -19155,7 +19168,7 @@ function Spinner({
19155
19168
  } = SIZES[size2];
19156
19169
  const frameSize = diameter + border * 2;
19157
19170
  return /* @__PURE__ */ jsx("div", {
19158
- ..._stylex.props(styles$B.root, customStyle),
19171
+ ..._stylex.props(styles$D.root, customStyle),
19159
19172
  children: /* @__PURE__ */ jsx("span", {
19160
19173
  "aria-valuetext": "Loading",
19161
19174
  ...{
@@ -19175,7 +19188,7 @@ function Spinner({
19175
19188
  })
19176
19189
  });
19177
19190
  }
19178
- const styles$B = {
19191
+ const styles$D = {
19179
19192
  root: {
19180
19193
  alignItems: "mly6s0dn4",
19181
19194
  display: "mly3nfvp2",
@@ -23573,7 +23586,7 @@ const Popover = ({
23573
23586
  })
23574
23587
  });
23575
23588
  };
23576
- const styles$A = {
23589
+ const styles$C = {
23577
23590
  wrapper: {
23578
23591
  position: "mly1n2onr6",
23579
23592
  $$css: true
@@ -23625,7 +23638,7 @@ const SelectDropdown = ({
23625
23638
  setOpen(false);
23626
23639
  };
23627
23640
  return /* @__PURE__ */ jsxs("div", {
23628
- ..._stylex.props(styles$A.wrapper, customStyle),
23641
+ ..._stylex.props(styles$C.wrapper, customStyle),
23629
23642
  children: [/* @__PURE__ */ jsxs("button", {
23630
23643
  type: "button",
23631
23644
  autoFocus,
@@ -23693,7 +23706,7 @@ function SelectList({
23693
23706
  const [hoveredIndex, setHoveredIndex] = useState(null);
23694
23707
  return /* @__PURE__ */ jsx(ScrollableArea, {
23695
23708
  children: /* @__PURE__ */ jsx("div", {
23696
- ..._stylex.props(styles$A.selectListDiv, customStyle),
23709
+ ..._stylex.props(styles$C.selectListDiv, customStyle),
23697
23710
  children: options.reduce((result, option2, index2) => {
23698
23711
  const isSelected = value !== void 0 && valueEqual(value, option2.value);
23699
23712
  if (option2.divider) {
@@ -23725,8 +23738,8 @@ function SelectList({
23725
23738
  }), /* @__PURE__ */ jsx(Icon, {
23726
23739
  name: "checkmark",
23727
23740
  customStyle: {
23728
- ...styles$A.checkIcon,
23729
- ...isSelected ? styles$A.checkIconSelected : void 0
23741
+ ...styles$C.checkIcon,
23742
+ ...isSelected ? styles$C.checkIconSelected : void 0
23730
23743
  }
23731
23744
  }), /* @__PURE__ */ jsx("span", {
23732
23745
  ...{
@@ -23778,7 +23791,7 @@ const DateInput = ({
23778
23791
  setTempValue(hooks.utc(value).format(format2));
23779
23792
  }, [value, format2]);
23780
23793
  return /* @__PURE__ */ jsx("input", {
23781
- ..._stylex.props(customStyle, isActive ? styles$z.active : null),
23794
+ ..._stylex.props(customStyle, isActive ? styles$B.active : null),
23782
23795
  type: "text",
23783
23796
  placeholder: placeholder || format2,
23784
23797
  value: tempValue,
@@ -23813,7 +23826,7 @@ function guessUnits(moment2, isDateTime) {
23813
23826
  }
23814
23827
  return isDateTime ? "second" : "day";
23815
23828
  }
23816
- const styles$z = {
23829
+ const styles$B = {
23817
23830
  active: {
23818
23831
  backgroundColor: "mly1vzefiq",
23819
23832
  $$css: true
@@ -23925,7 +23938,7 @@ function DatePicker({
23925
23938
  });
23926
23939
  };
23927
23940
  return /* @__PURE__ */ jsxs("div", {
23928
- ..._stylex.props(styles$y.outer, customStyle),
23941
+ ..._stylex.props(styles$A.outer, customStyle),
23929
23942
  ref: forwardRef,
23930
23943
  children: [/* @__PURE__ */ jsxs("div", {
23931
23944
  ...{
@@ -24241,7 +24254,7 @@ function DatePicker({
24241
24254
  })]
24242
24255
  });
24243
24256
  }
24244
- const styles$y = {
24257
+ const styles$A = {
24245
24258
  outer: {
24246
24259
  userSelect: "mly87ps6o",
24247
24260
  fontSize: "mlymhiqyu",
@@ -24327,7 +24340,7 @@ function Banner({
24327
24340
  className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
24328
24341
  },
24329
24342
  children: [/* @__PURE__ */ jsxs("div", {
24330
- ..._stylex.props(styles$x.header, variantColors[variant], children ? styles$x.headerWithContent : null),
24343
+ ..._stylex.props(styles$z.header, variantColors[variant], children ? styles$z.headerWithContent : null),
24331
24344
  children: [/* @__PURE__ */ jsx("div", {
24332
24345
  ...{
24333
24346
  className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
@@ -24340,22 +24353,22 @@ function Banner({
24340
24353
  className: "mly78zum5 mlydt5ytf mlyb3r6kr"
24341
24354
  },
24342
24355
  children: [/* @__PURE__ */ jsx("div", {
24343
- ..._stylex.props(styles$x.title, fontStyles.emphasized),
24356
+ ..._stylex.props(styles$z.title, fontStyles.emphasized),
24344
24357
  children: title
24345
24358
  }), /* @__PURE__ */ jsx("div", {
24346
- ..._stylex.props(styles$x.description, fontStyles.supporting),
24359
+ ..._stylex.props(styles$z.description, fontStyles.supporting),
24347
24360
  children: description
24348
24361
  })]
24349
24362
  })]
24350
24363
  }), children && /* @__PURE__ */ jsx("div", {
24351
- ..._stylex.props(styles$x.content, fontStyles.body),
24364
+ ..._stylex.props(styles$z.content, fontStyles.body),
24352
24365
  children: /* @__PURE__ */ jsx(ScrollableArea, {
24353
24366
  children
24354
24367
  })
24355
24368
  })]
24356
24369
  });
24357
24370
  }
24358
- const styles$x = {
24371
+ const styles$z = {
24359
24372
  header: {
24360
24373
  borderRadius: "mly1q4ynmn",
24361
24374
  borderStartStartRadius: null,
@@ -24497,14 +24510,14 @@ function AccordionList({
24497
24510
  onExpandedItemChange: handleExpandedItemChange
24498
24511
  },
24499
24512
  children: /* @__PURE__ */ jsx("div", {
24500
- ..._stylex.props(styles$w.main, customStyle),
24513
+ ..._stylex.props(styles$y.main, customStyle),
24501
24514
  children: React.Children.map(children, (child) => /* @__PURE__ */ jsxs(Fragment, {
24502
24515
  children: [child, /* @__PURE__ */ jsx(Divider, {})]
24503
24516
  }))
24504
24517
  })
24505
24518
  });
24506
24519
  }
24507
- const styles$w = {
24520
+ const styles$y = {
24508
24521
  main: {
24509
24522
  display: "mly78zum5",
24510
24523
  flexDirection: "mlydt5ytf",
@@ -24541,10 +24554,10 @@ function AccordionListItem({
24541
24554
  className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
24542
24555
  },
24543
24556
  children: [/* @__PURE__ */ jsx("span", {
24544
- ..._stylex.props(fontStyles.body, styles$v.label),
24557
+ ..._stylex.props(fontStyles.body, styles$x.label),
24545
24558
  children: label
24546
24559
  }), sublabel && /* @__PURE__ */ jsx("span", {
24547
- ..._stylex.props(fontStyles.supporting, styles$v.sublabel),
24560
+ ..._stylex.props(fontStyles.supporting, styles$x.sublabel),
24548
24561
  children: sublabel
24549
24562
  })]
24550
24563
  }), badge && badge, endIcon && endIcon]
@@ -24556,7 +24569,7 @@ function AccordionListItem({
24556
24569
  })]
24557
24570
  });
24558
24571
  }
24559
- const styles$v = {
24572
+ const styles$x = {
24560
24573
  label: {
24561
24574
  flexGrow: "mly1iyjqo2",
24562
24575
  fontWeight: "mly1xlr1w8",
@@ -25841,7 +25854,7 @@ function DropdownMenu({
25841
25854
  children: trigger
25842
25855
  }), /* @__PURE__ */ jsx(Portal2, {
25843
25856
  children: /* @__PURE__ */ jsx(Content2, {
25844
- ..._stylex.props(fontStyles.body, styles$u.content),
25857
+ ..._stylex.props(fontStyles.body, styles$w.content),
25845
25858
  side: "bottom",
25846
25859
  align: "start",
25847
25860
  sideOffset: 4,
@@ -25868,22 +25881,22 @@ function DropdownMenuItem({
25868
25881
  disabled,
25869
25882
  children: [icon && /* @__PURE__ */ jsx(Icon, {
25870
25883
  name: icon,
25871
- customStyle: styles$u.icon
25884
+ customStyle: styles$w.icon
25872
25885
  }), /* @__PURE__ */ jsxs("div", {
25873
25886
  ...{
25874
25887
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25875
25888
  },
25876
25889
  children: [/* @__PURE__ */ jsx("span", {
25877
- ..._stylex.props(fontStyles.body, styles$u.label),
25890
+ ..._stylex.props(fontStyles.body, styles$w.label),
25878
25891
  children: label
25879
25892
  }), sublabel && /* @__PURE__ */ jsx("span", {
25880
- ..._stylex.props(fontStyles.supporting, styles$u.sublabel),
25893
+ ..._stylex.props(fontStyles.supporting, styles$w.sublabel),
25881
25894
  children: sublabel
25882
25895
  })]
25883
25896
  })]
25884
25897
  });
25885
25898
  }
25886
- const styles$u = {
25899
+ const styles$w = {
25887
25900
  content: {
25888
25901
  display: "mly78zum5",
25889
25902
  flexDirection: "mlydt5ytf",
@@ -25967,7 +25980,7 @@ function QueryActionBar({
25967
25980
  children: [/* @__PURE__ */ jsx(Icon, {
25968
25981
  name: "filterSliders"
25969
25982
  }), /* @__PURE__ */ jsx("div", {
25970
- ..._stylex.props(fontStyles.largeBody, styles$t.title),
25983
+ ..._stylex.props(fontStyles.largeBody, styles$v.title),
25971
25984
  children: "Query"
25972
25985
  })]
25973
25986
  }), /* @__PURE__ */ jsxs("div", {
@@ -26012,13 +26025,13 @@ function QueryActionBar({
26012
26025
  })]
26013
26026
  });
26014
26027
  }
26015
- const styles$t = {
26028
+ const styles$v = {
26016
26029
  title: {
26017
26030
  fontWeight: "mly1xlr1w8",
26018
26031
  $$css: true
26019
26032
  }
26020
26033
  };
26021
- const styles$s = {
26034
+ const styles$u = {
26022
26035
  labelWithIcon: {
26023
26036
  display: "mly78zum5",
26024
26037
  alignItems: "mly6s0dn4",
@@ -26148,7 +26161,9 @@ function LiteralValue({
26148
26161
  });
26149
26162
  }
26150
26163
  }
26151
- const QUERY_RENDERERS = ["table", "bar_chart", "dashboard", "json", "line_chart", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map", "sparkline"];
26164
+ const RENDERER_PREFIX = "# ";
26165
+ const VIZ_RENDERERS = ["table", "bar", "dashboard", "json", "line", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map"];
26166
+ const QUERY_RENDERERS = ["table", "bar_chart", "dashboard", "json", "line_chart", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map"];
26152
26167
  const ATOMIC_RENDERERS = ["number", "boolean", "currency", "image", "url", "percent", "text", "time"];
26153
26168
  const RENDERERS = [...QUERY_RENDERERS, ...ATOMIC_RENDERERS];
26154
26169
  function tagToRenderer(tag) {
@@ -26163,6 +26178,16 @@ function tagToRenderer(tag) {
26163
26178
  }
26164
26179
  return null;
26165
26180
  }
26181
+ function legacyToViz(name) {
26182
+ switch (name) {
26183
+ case "bar_chart":
26184
+ return "bar";
26185
+ case "line_chart":
26186
+ return "line";
26187
+ default:
26188
+ return name;
26189
+ }
26190
+ }
26166
26191
  function atomicTypeToIcon(type) {
26167
26192
  return atomicTypeMap[type];
26168
26193
  }
@@ -26258,7 +26283,7 @@ function DrillOperations({
26258
26283
  }
26259
26284
  return /* @__PURE__ */ jsxs("div", {
26260
26285
  children: [/* @__PURE__ */ jsx("div", {
26261
- ..._stylex.props(styles$s.title),
26286
+ ..._stylex.props(styles$u.title),
26262
26287
  children: "drills"
26263
26288
  }), /* @__PURE__ */ jsx("div", {
26264
26289
  ...{
@@ -30230,190 +30255,1923 @@ function BadgeForField({
30230
30255
  label: "view",
30231
30256
  icon: "view_filled",
30232
30257
  color: "purple",
30233
- customStyle: styles$r.noBackground
30258
+ customStyle: styles$t.noBackground
30234
30259
  });
30235
30260
  } else if (field.kind === "dimension") {
30236
30261
  return /* @__PURE__ */ jsx(Badge, {
30237
30262
  label: "dimension",
30238
30263
  icon: fieldToIcon(field),
30239
30264
  color: "cyan",
30240
- customStyle: styles$r.noBackground
30265
+ customStyle: styles$t.noBackground
30241
30266
  });
30242
30267
  } else if (field.kind === "measure") {
30243
30268
  return /* @__PURE__ */ jsx(Badge, {
30244
30269
  label: "measure",
30245
30270
  icon: fieldToIcon(field),
30246
30271
  color: "green",
30247
- customStyle: styles$r.noBackground
30272
+ customStyle: styles$t.noBackground
30248
30273
  });
30249
30274
  } else if (field.kind === "join") {
30250
30275
  return /* @__PURE__ */ jsx(Badge, {
30251
30276
  label: "join",
30252
30277
  icon: fieldToIcon(field),
30253
30278
  color: "gray",
30254
- customStyle: styles$r.noBackground
30279
+ customStyle: styles$t.noBackground
30255
30280
  });
30256
30281
  }
30257
30282
  }
30258
- const styles$r = {
30283
+ const styles$t = {
30259
30284
  noBackground: {
30260
30285
  backgroundColor: "mlyjbqb8w",
30261
30286
  $$css: true
30262
30287
  }
30263
30288
  };
30264
- function Visualization$1({
30265
- rootQuery,
30266
- view
30267
- }) {
30289
+ var DIALOG_NAME = "Dialog";
30290
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
30291
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
30292
+ var Dialog = (props2) => {
30268
30293
  const {
30269
- setQuery
30270
- } = useContext(QueryEditorContext);
30271
- const currentTag = view.getTag();
30272
- const currentRenderer = tagToRenderer(currentTag) ?? "table";
30273
- const setRenderer = (renderer) => {
30274
- view.removeTagProperty([currentRenderer]);
30275
- view.setTagProperty([renderer]);
30276
- setQuery == null ? void 0 : setQuery(rootQuery.build());
30277
- };
30278
- const vizes = QUERY_RENDERERS.map((viz) => ({
30279
- icon: /* @__PURE__ */ jsx(Icon, {
30280
- name: `viz_${viz}`
30281
- }),
30282
- label: snakeToTitle(viz),
30283
- value: viz,
30284
- onClick: () => setRenderer(viz)
30285
- }));
30286
- const tokens2 = [/* @__PURE__ */ jsx(SelectorToken, {
30287
- customStyle: styles$q.first,
30288
- icon: `viz_${currentRenderer}`,
30289
- value: currentRenderer,
30290
- items: vizes,
30291
- onChange: (viz) => setRenderer(viz)
30292
- }, "first")];
30293
- return /* @__PURE__ */ jsx(TokenGroup, {
30294
- children: tokens2
30294
+ __scopeDialog,
30295
+ children,
30296
+ open: openProp,
30297
+ defaultOpen,
30298
+ onOpenChange,
30299
+ modal = true
30300
+ } = props2;
30301
+ const triggerRef = React.useRef(null);
30302
+ const contentRef = React.useRef(null);
30303
+ const [open = false, setOpen] = useControllableState({
30304
+ prop: openProp,
30305
+ defaultProp: defaultOpen,
30306
+ onChange: onOpenChange
30295
30307
  });
30296
- }
30297
- const styles$q = {
30298
- first: {
30299
- flexGrow: "mly1iyjqo2",
30300
- justifyContent: "mlylqzeqv",
30301
- $$css: true
30308
+ return /* @__PURE__ */ jsx(
30309
+ DialogProvider,
30310
+ {
30311
+ scope: __scopeDialog,
30312
+ triggerRef,
30313
+ contentRef,
30314
+ contentId: useId(),
30315
+ titleId: useId(),
30316
+ descriptionId: useId(),
30317
+ open,
30318
+ onOpenChange: setOpen,
30319
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
30320
+ modal,
30321
+ children
30322
+ }
30323
+ );
30324
+ };
30325
+ Dialog.displayName = DIALOG_NAME;
30326
+ var TRIGGER_NAME$1 = "DialogTrigger";
30327
+ var DialogTrigger = React.forwardRef(
30328
+ (props2, forwardedRef) => {
30329
+ const { __scopeDialog, ...triggerProps } = props2;
30330
+ const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
30331
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
30332
+ return /* @__PURE__ */ jsx(
30333
+ Primitive.button,
30334
+ {
30335
+ type: "button",
30336
+ "aria-haspopup": "dialog",
30337
+ "aria-expanded": context.open,
30338
+ "aria-controls": context.contentId,
30339
+ "data-state": getState(context.open),
30340
+ ...triggerProps,
30341
+ ref: composedTriggerRef,
30342
+ onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
30343
+ }
30344
+ );
30302
30345
  }
30346
+ );
30347
+ DialogTrigger.displayName = TRIGGER_NAME$1;
30348
+ var PORTAL_NAME = "DialogPortal";
30349
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
30350
+ forceMount: void 0
30351
+ });
30352
+ var DialogPortal = (props2) => {
30353
+ const { __scopeDialog, forceMount, children, container } = props2;
30354
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
30355
+ return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container, children: child }) })) });
30303
30356
  };
30304
- function snakeToTitle(snake) {
30305
- return snake.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
30306
- }
30307
- function Visualization({
30308
- annotations
30309
- }) {
30310
- const {
30311
- tag
30312
- } = Tag.fromTagLines(annotations.map((annotation) => annotation.value));
30313
- const renderer = tagToRenderer(tag) ?? "table";
30314
- return /* @__PURE__ */ jsx(Token, {
30315
- label: snakeToTitle(renderer),
30316
- icon: `viz_${renderer}`
30317
- });
30318
- }
30319
- function ViewAttributeTable({
30320
- viewInfo,
30321
- isCompact,
30322
- style
30323
- }) {
30324
- const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
30325
- return /* @__PURE__ */ jsx("div", {
30326
- ..._stylex.props(styles$p.attributeTableContainer, style),
30327
- children: /* @__PURE__ */ jsx("table", {
30328
- ...{
30329
- className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
30330
- },
30331
- children: /* @__PURE__ */ jsxs("tbody", {
30332
- children: [/* @__PURE__ */ jsx(ViewAttributeTableRow, {
30333
- attribute: "chart type",
30334
- children: /* @__PURE__ */ jsx("div", {
30335
- ...{
30336
- className: "mly1rg5ohu"
30337
- },
30338
- children: /* @__PURE__ */ jsx(Visualization, {
30339
- annotations: viewInfo.annotations || []
30340
- })
30341
- })
30342
- }), /* @__PURE__ */ jsx(ViewAttributeTableRow, {
30343
- attribute: "output",
30344
- children: dimensions.map((f2) => /* @__PURE__ */ jsx("span", {
30345
- children: /* @__PURE__ */ jsx(FieldToken, {
30346
- field: f2,
30347
- size: isCompact ? "compact" : "default"
30348
- })
30349
- }, `${f2.kind}::${f2.name}`))
30350
- })]
30351
- })
30352
- })
30353
- });
30354
- }
30355
- function ViewAttributeTableRow({
30356
- attribute,
30357
- children
30358
- }) {
30359
- return /* @__PURE__ */ jsxs("tr", {
30360
- ...{
30361
- className: "mlydpxx8g"
30362
- },
30363
- children: [/* @__PURE__ */ jsx("td", {
30364
- ..._stylex.props(styles$p.attributeTableKeyCell, fontStyles.supporting),
30365
- children: /* @__PURE__ */ jsx("div", {
30366
- ..._stylex.props(styles$p.attributeTableKeyCellContent, fontStyles.supporting),
30367
- children: attribute
30368
- })
30369
- }), /* @__PURE__ */ jsx("td", {
30370
- ...{
30371
- className: "mly78zum5 mly1a02dak mly195vfkc"
30372
- },
30373
- children
30374
- })]
30375
- });
30357
+ DialogPortal.displayName = PORTAL_NAME;
30358
+ var OVERLAY_NAME = "DialogOverlay";
30359
+ var DialogOverlay = React.forwardRef(
30360
+ (props2, forwardedRef) => {
30361
+ const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
30362
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
30363
+ const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
30364
+ return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
30365
+ }
30366
+ );
30367
+ DialogOverlay.displayName = OVERLAY_NAME;
30368
+ var DialogOverlayImpl = React.forwardRef(
30369
+ (props2, forwardedRef) => {
30370
+ const { __scopeDialog, ...overlayProps } = props2;
30371
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
30372
+ return (
30373
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
30374
+ // ie. when `Overlay` and `Content` are siblings
30375
+ /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
30376
+ Primitive.div,
30377
+ {
30378
+ "data-state": getState(context.open),
30379
+ ...overlayProps,
30380
+ ref: forwardedRef,
30381
+ style: { pointerEvents: "auto", ...overlayProps.style }
30382
+ }
30383
+ ) })
30384
+ );
30385
+ }
30386
+ );
30387
+ var CONTENT_NAME$1 = "DialogContent";
30388
+ var DialogContent = React.forwardRef(
30389
+ (props2, forwardedRef) => {
30390
+ const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
30391
+ const { forceMount = portalContext.forceMount, ...contentProps } = props2;
30392
+ const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
30393
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
30394
+ }
30395
+ );
30396
+ DialogContent.displayName = CONTENT_NAME$1;
30397
+ var DialogContentModal = React.forwardRef(
30398
+ (props2, forwardedRef) => {
30399
+ const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
30400
+ const contentRef = React.useRef(null);
30401
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
30402
+ React.useEffect(() => {
30403
+ const content = contentRef.current;
30404
+ if (content) return hideOthers(content);
30405
+ }, []);
30406
+ return /* @__PURE__ */ jsx(
30407
+ DialogContentImpl,
30408
+ {
30409
+ ...props2,
30410
+ ref: composedRefs,
30411
+ trapFocus: context.open,
30412
+ disableOutsidePointerEvents: true,
30413
+ onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
30414
+ var _a2;
30415
+ event.preventDefault();
30416
+ (_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
30417
+ }),
30418
+ onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
30419
+ const originalEvent = event.detail.originalEvent;
30420
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
30421
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
30422
+ if (isRightClick) event.preventDefault();
30423
+ }),
30424
+ onFocusOutside: composeEventHandlers(
30425
+ props2.onFocusOutside,
30426
+ (event) => event.preventDefault()
30427
+ )
30428
+ }
30429
+ );
30430
+ }
30431
+ );
30432
+ var DialogContentNonModal = React.forwardRef(
30433
+ (props2, forwardedRef) => {
30434
+ const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
30435
+ const hasInteractedOutsideRef = React.useRef(false);
30436
+ const hasPointerDownOutsideRef = React.useRef(false);
30437
+ return /* @__PURE__ */ jsx(
30438
+ DialogContentImpl,
30439
+ {
30440
+ ...props2,
30441
+ ref: forwardedRef,
30442
+ trapFocus: false,
30443
+ disableOutsidePointerEvents: false,
30444
+ onCloseAutoFocus: (event) => {
30445
+ var _a2, _b2;
30446
+ (_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
30447
+ if (!event.defaultPrevented) {
30448
+ if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
30449
+ event.preventDefault();
30450
+ }
30451
+ hasInteractedOutsideRef.current = false;
30452
+ hasPointerDownOutsideRef.current = false;
30453
+ },
30454
+ onInteractOutside: (event) => {
30455
+ var _a2, _b2;
30456
+ (_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
30457
+ if (!event.defaultPrevented) {
30458
+ hasInteractedOutsideRef.current = true;
30459
+ if (event.detail.originalEvent.type === "pointerdown") {
30460
+ hasPointerDownOutsideRef.current = true;
30461
+ }
30462
+ }
30463
+ const target = event.target;
30464
+ const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
30465
+ if (targetIsTrigger) event.preventDefault();
30466
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
30467
+ event.preventDefault();
30468
+ }
30469
+ }
30470
+ }
30471
+ );
30472
+ }
30473
+ );
30474
+ var DialogContentImpl = React.forwardRef(
30475
+ (props2, forwardedRef) => {
30476
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
30477
+ const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
30478
+ const contentRef = React.useRef(null);
30479
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
30480
+ useFocusGuards();
30481
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
30482
+ /* @__PURE__ */ jsx(
30483
+ FocusScope,
30484
+ {
30485
+ asChild: true,
30486
+ loop: true,
30487
+ trapped: trapFocus,
30488
+ onMountAutoFocus: onOpenAutoFocus,
30489
+ onUnmountAutoFocus: onCloseAutoFocus,
30490
+ children: /* @__PURE__ */ jsx(
30491
+ DismissableLayer,
30492
+ {
30493
+ role: "dialog",
30494
+ id: context.contentId,
30495
+ "aria-describedby": context.descriptionId,
30496
+ "aria-labelledby": context.titleId,
30497
+ "data-state": getState(context.open),
30498
+ ...contentProps,
30499
+ ref: composedRefs,
30500
+ onDismiss: () => context.onOpenChange(false)
30501
+ }
30502
+ )
30503
+ }
30504
+ ),
30505
+ /* @__PURE__ */ jsxs(Fragment, { children: [
30506
+ /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
30507
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
30508
+ ] })
30509
+ ] });
30510
+ }
30511
+ );
30512
+ var TITLE_NAME = "DialogTitle";
30513
+ var DialogTitle = React.forwardRef(
30514
+ (props2, forwardedRef) => {
30515
+ const { __scopeDialog, ...titleProps } = props2;
30516
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
30517
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
30518
+ }
30519
+ );
30520
+ DialogTitle.displayName = TITLE_NAME;
30521
+ var DESCRIPTION_NAME = "DialogDescription";
30522
+ var DialogDescription = React.forwardRef(
30523
+ (props2, forwardedRef) => {
30524
+ const { __scopeDialog, ...descriptionProps } = props2;
30525
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
30526
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
30527
+ }
30528
+ );
30529
+ DialogDescription.displayName = DESCRIPTION_NAME;
30530
+ var CLOSE_NAME = "DialogClose";
30531
+ var DialogClose = React.forwardRef(
30532
+ (props2, forwardedRef) => {
30533
+ const { __scopeDialog, ...closeProps } = props2;
30534
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
30535
+ return /* @__PURE__ */ jsx(
30536
+ Primitive.button,
30537
+ {
30538
+ type: "button",
30539
+ ...closeProps,
30540
+ ref: forwardedRef,
30541
+ onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
30542
+ }
30543
+ );
30544
+ }
30545
+ );
30546
+ DialogClose.displayName = CLOSE_NAME;
30547
+ function getState(open) {
30548
+ return open ? "open" : "closed";
30376
30549
  }
30377
- const styles$p = {
30378
- attributeTableContainer: {
30379
- padding: "mlye8ttls",
30380
- paddingInline: null,
30381
- paddingStart: null,
30382
- paddingLeft: null,
30383
- paddingEnd: null,
30384
- paddingRight: null,
30385
- paddingBlock: null,
30386
- paddingTop: null,
30387
- paddingBottom: null,
30550
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
30551
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
30552
+ contentName: CONTENT_NAME$1,
30553
+ titleName: TITLE_NAME,
30554
+ docsSlug: "dialog"
30555
+ });
30556
+ var TitleWarning = ({ titleId }) => {
30557
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
30558
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
30559
+
30560
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
30561
+
30562
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
30563
+ React.useEffect(() => {
30564
+ if (titleId) {
30565
+ const hasTitle = document.getElementById(titleId);
30566
+ if (!hasTitle) console.error(MESSAGE);
30567
+ }
30568
+ }, [MESSAGE, titleId]);
30569
+ return null;
30570
+ };
30571
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
30572
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
30573
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
30574
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
30575
+ React.useEffect(() => {
30576
+ var _a2;
30577
+ const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
30578
+ if (descriptionId && describedById) {
30579
+ const hasDescription = document.getElementById(descriptionId);
30580
+ if (!hasDescription) console.warn(MESSAGE);
30581
+ }
30582
+ }, [MESSAGE, contentRef, descriptionId]);
30583
+ return null;
30584
+ };
30585
+ var Root = Dialog;
30586
+ var Portal = DialogPortal;
30587
+ var Overlay = DialogOverlay;
30588
+ var Content$1 = DialogContent;
30589
+ var Title = DialogTitle;
30590
+ var Description = DialogDescription;
30591
+ var Close = DialogClose;
30592
+ const styles$s = {
30593
+ left: {
30594
+ display: "mly78zum5",
30595
+ justifyContent: "mly1lvf691",
30596
+ $$css: true
30597
+ },
30598
+ right: {
30599
+ display: "mly78zum5",
30600
+ justifyContent: "mly1rfj78v",
30601
+ $$css: true
30602
+ },
30603
+ heading: {
30604
+ gridColumn: "mly623te4",
30605
+ gridColumnStart: null,
30606
+ gridColumnEnd: null,
30607
+ fontWeight: "mly117nqv4",
30608
+ $$css: true
30609
+ },
30610
+ label: {
30611
+ whiteSpace: "mlyuxw1ft",
30612
+ $$css: true
30613
+ },
30614
+ divider: {
30615
+ gridColumn: "mly1a80n4u",
30616
+ gridColumnStart: null,
30617
+ gridColumnEnd: null,
30618
+ borderTop: "mlye536se",
30619
+ borderTopWidth: null,
30620
+ borderTopStyle: null,
30621
+ borderTopColor: null,
30622
+ $$css: true
30623
+ },
30624
+ editor: {
30625
+ display: "mly78zum5",
30626
+ flexDirection: "mlydt5ytf",
30388
30627
  gap: "mly167g77z",
30389
30628
  rowGap: null,
30390
30629
  columnGap: null,
30391
- borderRadius: "mly1q4ynmn",
30392
- borderStartStartRadius: null,
30393
- borderStartEndRadius: null,
30394
- borderEndStartRadius: null,
30395
- borderEndEndRadius: null,
30396
- borderTopLeftRadius: null,
30397
- borderTopRightRadius: null,
30398
- borderBottomLeftRadius: null,
30399
- borderBottomRightRadius: null,
30400
- backgroundColor: "mly12nb83b",
30401
- boxSizing: "mly9f619",
30402
- width: "mlyh8yej3",
30403
- height: "mly1m3v4wt",
30404
- overflow: "mlyysyzu8",
30630
+ overflow: "mlyb3r6kr",
30405
30631
  overflowX: null,
30406
30632
  overflowY: null,
30407
30633
  $$css: true
30408
30634
  },
30409
- attributeTableKeyCell: {
30410
- whiteSpace: "mlyuxw1ft",
30411
- width: "mly1f1nlb9",
30412
- verticalAlign: "mly16dsc37",
30635
+ editorGrid: {
30636
+ display: "mlyrvj5dj",
30637
+ gridTemplateColumns: "mly16kridx",
30638
+ gridAutoRows: "mlysd5ean",
30639
+ gap: "mly167g77z",
30640
+ rowGap: null,
30641
+ columnGap: null,
30642
+ overflowY: "mly1odjw0f",
30413
30643
  $$css: true
30414
30644
  },
30415
- attributeTableKeyCellContent: {
30416
- height: "mly1fgtraw",
30645
+ editorRow: {
30646
+ display: "mly78zum5",
30647
+ gap: "mly167g77z",
30648
+ rowGap: null,
30649
+ columnGap: null,
30650
+ $$css: true
30651
+ },
30652
+ editorCell: {
30653
+ flexGrow: "mly1iyjqo2",
30654
+ $$css: true
30655
+ },
30656
+ input: {
30657
+ border: "mly27xtdb",
30658
+ borderWidth: null,
30659
+ borderInlineWidth: null,
30660
+ borderInlineStartWidth: null,
30661
+ borderLeftWidth: null,
30662
+ borderInlineEndWidth: null,
30663
+ borderRightWidth: null,
30664
+ borderBlockWidth: null,
30665
+ borderTopWidth: null,
30666
+ borderBottomWidth: null,
30667
+ borderStyle: null,
30668
+ borderInlineStyle: null,
30669
+ borderInlineStartStyle: null,
30670
+ borderLeftStyle: null,
30671
+ borderInlineEndStyle: null,
30672
+ borderRightStyle: null,
30673
+ borderBlockStyle: null,
30674
+ borderTopStyle: null,
30675
+ borderBottomStyle: null,
30676
+ borderColor: null,
30677
+ borderInlineColor: null,
30678
+ borderInlineStartColor: null,
30679
+ borderLeftColor: null,
30680
+ borderInlineEndColor: null,
30681
+ borderRightColor: null,
30682
+ borderBlockColor: null,
30683
+ borderTopColor: null,
30684
+ borderBottomColor: null,
30685
+ borderRadius: "mly12oqio5",
30686
+ borderStartStartRadius: null,
30687
+ borderStartEndRadius: null,
30688
+ borderEndStartRadius: null,
30689
+ borderEndEndRadius: null,
30690
+ borderTopLeftRadius: null,
30691
+ borderTopRightRadius: null,
30692
+ borderBottomLeftRadius: null,
30693
+ borderBottomRightRadius: null,
30694
+ color: "mlyizdh9v",
30695
+ padding: "mly34lxi1",
30696
+ paddingInline: null,
30697
+ paddingStart: null,
30698
+ paddingLeft: null,
30699
+ paddingEnd: null,
30700
+ paddingRight: null,
30701
+ paddingBlock: null,
30702
+ paddingTop: null,
30703
+ paddingBottom: null,
30704
+ $$css: true
30705
+ },
30706
+ card: {
30707
+ maxWidth: "mly1dc814f",
30708
+ $$css: true
30709
+ },
30710
+ infoTrigger: {
30711
+ display: "mly3nfvp2",
30712
+ alignItems: "mly1071x5a",
30713
+ justifyContent: "mlyl56j7k",
30714
+ paddingRight: "mlyy13l1i",
30715
+ paddingInlineStart: null,
30716
+ paddingInlineEnd: null,
30717
+ paddingTop: "mly1iorvi4",
30718
+ $$css: true
30719
+ }
30720
+ };
30721
+ function HoverCard({
30722
+ children,
30723
+ customStyle
30724
+ }) {
30725
+ return /* @__PURE__ */ jsx("div", {
30726
+ ..._stylex.props(styles$r.container, fontStyles.body, customStyle),
30727
+ children
30728
+ });
30729
+ }
30730
+ const styles$r = {
30731
+ container: {
30732
+ boxShadow: "mly5n1uv4",
30733
+ backgroundColor: "mly12peec7",
30734
+ borderRadius: "mly4pepcl",
30735
+ borderStartStartRadius: null,
30736
+ borderStartEndRadius: null,
30737
+ borderEndStartRadius: null,
30738
+ borderEndEndRadius: null,
30739
+ borderTopLeftRadius: null,
30740
+ borderTopRightRadius: null,
30741
+ borderBottomLeftRadius: null,
30742
+ borderBottomRightRadius: null,
30743
+ padding: "mlyc7ga6q",
30744
+ paddingInline: null,
30745
+ paddingStart: null,
30746
+ paddingLeft: null,
30747
+ paddingEnd: null,
30748
+ paddingRight: null,
30749
+ paddingBlock: null,
30750
+ paddingTop: null,
30751
+ paddingBottom: null,
30752
+ display: "mly78zum5",
30753
+ flexDirection: "mlydt5ytf",
30754
+ gap: "mly167g77z",
30755
+ rowGap: null,
30756
+ columnGap: null,
30757
+ $$css: true
30758
+ }
30759
+ };
30760
+ function InfoHover({
30761
+ info
30762
+ }) {
30763
+ return /* @__PURE__ */ jsxs(Root3$1, {
30764
+ children: [/* @__PURE__ */ jsx(Trigger$4, {
30765
+ asChild: true,
30766
+ children: /* @__PURE__ */ jsx("div", {
30767
+ ..._stylex.props(styles$s.infoTrigger, fontStyles.body),
30768
+ children: /* @__PURE__ */ jsx(Icon, {
30769
+ name: "info",
30770
+ color: "disabled"
30771
+ })
30772
+ })
30773
+ }), /* @__PURE__ */ jsx(Portal$4, {
30774
+ children: /* @__PURE__ */ jsx(Content2$4, {
30775
+ side: "right",
30776
+ align: "start",
30777
+ children: /* @__PURE__ */ jsx(HoverCard, {
30778
+ customStyle: styles$s.card,
30779
+ children: info
30780
+ })
30781
+ })
30782
+ })]
30783
+ });
30784
+ }
30785
+ function useClickOutside(refOrRefs, handler) {
30786
+ useEffect(() => {
30787
+ const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
30788
+ let down = false;
30789
+ const isInOneElement = (ref, event) => {
30790
+ return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
30791
+ };
30792
+ const isInElement = (event) => {
30793
+ return refs.some((ref) => isInOneElement(ref, event));
30794
+ };
30795
+ const onMouseUp = (event) => {
30796
+ if (!down || isInElement(event)) return;
30797
+ handler(event);
30798
+ down = false;
30799
+ };
30800
+ const onMouseDown = (event) => {
30801
+ if (isInElement(event)) return;
30802
+ down = true;
30803
+ };
30804
+ document.addEventListener("mouseup", onMouseUp);
30805
+ document.addEventListener("mousedown", onMouseDown);
30806
+ return () => {
30807
+ document.removeEventListener("mouseup", onMouseUp);
30808
+ document.removeEventListener("mousedown", onMouseDown);
30809
+ };
30810
+ }, [refOrRefs, handler]);
30811
+ }
30812
+ const PillInput = ({
30813
+ values,
30814
+ setValues,
30815
+ autoFocus,
30816
+ placeholder,
30817
+ type = "text",
30818
+ value: controlledValue,
30819
+ setValue: setControlledValue,
30820
+ focusElement,
30821
+ color = DEFAULT_TOKEN_COLOR,
30822
+ customStyle
30823
+ }) => {
30824
+ const [uncontrolledValue, setUncontrolledValue] = useState("");
30825
+ const [_focused, setFocused] = useState(false);
30826
+ const inp = useRef(null);
30827
+ const ref = useRef(null);
30828
+ const [selectedPill, setSelectedPill] = useState(void 0);
30829
+ const pillRefs = useRef([]);
30830
+ const value = controlledValue || uncontrolledValue;
30831
+ const setValue = setControlledValue || setUncontrolledValue;
30832
+ const deletePill = useCallback((idx) => {
30833
+ var _a2;
30834
+ const newValues = [...values];
30835
+ newValues.splice(idx, 1);
30836
+ setValues(newValues);
30837
+ if (selectedPill === 0) {
30838
+ if (values.length === 1) {
30839
+ setSelectedPill(void 0);
30840
+ (_a2 = inp.current) == null ? void 0 : _a2.focus();
30841
+ } else {
30842
+ setSelectedPill(0);
30843
+ }
30844
+ } else {
30845
+ setSelectedPill(idx - 1);
30846
+ }
30847
+ }, [selectedPill, setValues, values]);
30848
+ const pills = useMemo(() => {
30849
+ pillRefs.current = new Array(values.length);
30850
+ return values.map((value2, index2) => /* @__PURE__ */ jsx(Pill, {
30851
+ color,
30852
+ onClick: () => {
30853
+ setSelectedPill(index2);
30854
+ },
30855
+ onDelete: () => deletePill(index2),
30856
+ forwardRef: (ref2) => {
30857
+ pillRefs.current[index2] = ref2;
30858
+ },
30859
+ children: value2
30860
+ }, value2));
30861
+ }, [color, deletePill, values]);
30862
+ useEffect(() => {
30863
+ var _a2;
30864
+ if (selectedPill !== void 0) {
30865
+ (_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
30866
+ }
30867
+ }, [pills, selectedPill]);
30868
+ const onKeyUp = (event) => {
30869
+ var _a2, _b2;
30870
+ if (event.key === "Backspace") {
30871
+ if (selectedPill !== void 0) {
30872
+ deletePill(selectedPill);
30873
+ }
30874
+ } else if (event.key === "ArrowRight") {
30875
+ if (selectedPill === values.length - 1) {
30876
+ setSelectedPill(void 0);
30877
+ (_a2 = inp.current) == null ? void 0 : _a2.focus();
30878
+ } else if (selectedPill !== void 0) {
30879
+ setSelectedPill(selectedPill + 1);
30880
+ }
30881
+ } else if (event.key === "ArrowLeft") {
30882
+ if (selectedPill !== void 0 && selectedPill > 0) {
30883
+ setSelectedPill(selectedPill - 1);
30884
+ }
30885
+ } else {
30886
+ (_b2 = inp.current) == null ? void 0 : _b2.focus();
30887
+ }
30888
+ };
30889
+ const commitValue = () => {
30890
+ if (value.length > 0 && !values.includes(value)) {
30891
+ setValues([...values, value]);
30892
+ setValue("");
30893
+ }
30894
+ };
30895
+ useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
30896
+ setFocused(false);
30897
+ commitValue();
30898
+ });
30899
+ return /* @__PURE__ */ jsx("div", {
30900
+ ..._stylex.props(fontStyles.body, styles$q.main),
30901
+ children: /* @__PURE__ */ jsxs("div", {
30902
+ ..._stylex.props(styles$q.content, customStyle),
30903
+ onKeyUp,
30904
+ onClick: () => {
30905
+ var _a2;
30906
+ return (_a2 = inp.current) == null ? void 0 : _a2.focus();
30907
+ },
30908
+ ref,
30909
+ children: [pills, /* @__PURE__ */ jsx("input", {
30910
+ ...{
30911
+ className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
30912
+ },
30913
+ ref: inp,
30914
+ type,
30915
+ placeholder: values.length === 0 ? placeholder : "",
30916
+ value,
30917
+ size: 1,
30918
+ onChange: (event) => {
30919
+ setValue(event.target.value);
30920
+ },
30921
+ onKeyDown: (event) => {
30922
+ if (event.key === "Enter") {
30923
+ if (value !== "") {
30924
+ commitValue();
30925
+ event.stopPropagation();
30926
+ event.preventDefault();
30927
+ }
30928
+ }
30929
+ },
30930
+ onKeyUp: (event) => {
30931
+ var _a2, _b2, _c2, _d;
30932
+ if (event.key === "Backspace") {
30933
+ if (value === "" && values.length > 0) {
30934
+ commitValue();
30935
+ (_a2 = inp.current) == null ? void 0 : _a2.blur();
30936
+ setSelectedPill(values.length - 1);
30937
+ }
30938
+ } else if (event.key === "ArrowLeft") {
30939
+ if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
30940
+ commitValue();
30941
+ (_d = inp.current) == null ? void 0 : _d.blur();
30942
+ setSelectedPill(values.length - 1);
30943
+ event.preventDefault();
30944
+ event.stopPropagation();
30945
+ }
30946
+ }
30947
+ },
30948
+ onFocus: () => {
30949
+ setFocused(true);
30950
+ setSelectedPill(void 0);
30951
+ },
30952
+ autoFocus
30953
+ })]
30954
+ })
30955
+ });
30956
+ };
30957
+ const Pill = ({
30958
+ children,
30959
+ color = DEFAULT_TOKEN_COLOR,
30960
+ forwardRef,
30961
+ onClick,
30962
+ onDelete
30963
+ }) => {
30964
+ return /* @__PURE__ */ jsxs("div", {
30965
+ onClick,
30966
+ tabIndex: 0,
30967
+ ref: forwardRef,
30968
+ ..._stylex.props(styles$q.pill, colorVariants[color]),
30969
+ children: [children, /* @__PURE__ */ jsx("div", {
30970
+ title: "Remove",
30971
+ ...{
30972
+ className: "mly3nfvp2"
30973
+ },
30974
+ children: /* @__PURE__ */ jsx(SvgClear, {
30975
+ onClick: () => onDelete(),
30976
+ ...{
30977
+ className: "mly6jxa94 mly1v9usgg"
30978
+ }
30979
+ })
30980
+ })]
30981
+ });
30982
+ };
30983
+ const styles$q = {
30984
+ main: {
30985
+ borderRadius: "mly12oqio5",
30986
+ borderStartStartRadius: null,
30987
+ borderStartEndRadius: null,
30988
+ borderEndStartRadius: null,
30989
+ borderEndEndRadius: null,
30990
+ borderTopLeftRadius: null,
30991
+ borderTopRightRadius: null,
30992
+ borderBottomLeftRadius: null,
30993
+ borderBottomRightRadius: null,
30994
+ border: "mlyvckdp7",
30995
+ borderWidth: null,
30996
+ borderInlineWidth: null,
30997
+ borderInlineStartWidth: null,
30998
+ borderLeftWidth: null,
30999
+ borderInlineEndWidth: null,
31000
+ borderRightWidth: null,
31001
+ borderBlockWidth: null,
31002
+ borderTopWidth: null,
31003
+ borderBottomWidth: null,
31004
+ borderStyle: null,
31005
+ borderInlineStyle: null,
31006
+ borderInlineStartStyle: null,
31007
+ borderLeftStyle: null,
31008
+ borderInlineEndStyle: null,
31009
+ borderRightStyle: null,
31010
+ borderBlockStyle: null,
31011
+ borderTopStyle: null,
31012
+ borderBottomStyle: null,
31013
+ borderColor: null,
31014
+ borderInlineColor: null,
31015
+ borderInlineStartColor: null,
31016
+ borderLeftColor: null,
31017
+ borderInlineEndColor: null,
31018
+ borderRightColor: null,
31019
+ borderBlockColor: null,
31020
+ borderTopColor: null,
31021
+ borderBottomColor: null,
31022
+ padding: "mlybsehbd",
31023
+ paddingInline: null,
31024
+ paddingStart: null,
31025
+ paddingLeft: null,
31026
+ paddingEnd: null,
31027
+ paddingRight: null,
31028
+ paddingBlock: null,
31029
+ paddingTop: null,
31030
+ paddingBottom: null,
31031
+ display: "mlyrvj5dj",
31032
+ minHeight: "mly2lwn1j",
31033
+ overflow: "mlyysyzu8",
31034
+ overflowX: null,
31035
+ overflowY: null,
31036
+ $$css: true
31037
+ },
31038
+ content: {
31039
+ outline: "mly1a2a7pz",
31040
+ outlineColor: null,
31041
+ outlineOffset: null,
31042
+ outlineStyle: null,
31043
+ outlineWidth: null,
31044
+ display: "mly78zum5",
31045
+ flexWrap: "mly1a02dak",
31046
+ gap: "mly1ed6fcf",
31047
+ rowGap: null,
31048
+ columnGap: null,
31049
+ borderColor: "mly1akygb0 mlyetl2wx",
31050
+ borderInlineColor: null,
31051
+ borderInlineStartColor: null,
31052
+ borderLeftColor: null,
31053
+ borderInlineEndColor: null,
31054
+ borderRightColor: null,
31055
+ borderBlockColor: null,
31056
+ borderTopColor: null,
31057
+ borderBottomColor: null,
31058
+ $$css: true
31059
+ },
31060
+ pill: {
31061
+ backgroundColor: "mlyy9rfsq",
31062
+ borderRadius: "mly1sxf85j",
31063
+ borderStartStartRadius: null,
31064
+ borderStartEndRadius: null,
31065
+ borderEndStartRadius: null,
31066
+ borderEndEndRadius: null,
31067
+ borderTopLeftRadius: null,
31068
+ borderTopRightRadius: null,
31069
+ borderBottomLeftRadius: null,
31070
+ borderBottomRightRadius: null,
31071
+ color: "mly1xre2ib",
31072
+ display: "mly78zum5",
31073
+ alignItems: "mly6s0dn4",
31074
+ gap: "mly1nejdyq",
31075
+ rowGap: null,
31076
+ columnGap: null,
31077
+ padding: "mly1e41zw8",
31078
+ paddingInline: null,
31079
+ paddingStart: null,
31080
+ paddingLeft: null,
31081
+ paddingEnd: null,
31082
+ paddingRight: null,
31083
+ paddingBlock: null,
31084
+ paddingTop: null,
31085
+ paddingBottom: null,
31086
+ textTransform: "mly6mezaz",
31087
+ cursor: "mly1ypdohk",
31088
+ height: "mly1qx5ct2",
31089
+ whiteSpace: "mlyuxw1ft",
31090
+ $$css: true
31091
+ }
31092
+ };
31093
+ const colorVariants = {
31094
+ default: {
31095
+ "--mlyvygx4q": "mly1izbou4",
31096
+ "--mly13n7235": "mly8bgh0r",
31097
+ $$css: true
31098
+ },
31099
+ purple: {
31100
+ "--mlyvygx4q": "mly1f8soc4",
31101
+ "--mly13n7235": "mly1r5zvhd",
31102
+ $$css: true
31103
+ },
31104
+ green: {
31105
+ "--mlyvygx4q": "mlyf8wvcd",
31106
+ "--mly13n7235": "mly1u6t2w6",
31107
+ $$css: true
31108
+ },
31109
+ cyan: {
31110
+ "--mlyvygx4q": "mlyrtwgpv",
31111
+ "--mly13n7235": "mlys5r2en",
31112
+ $$css: true
31113
+ }
31114
+ };
31115
+ function OneOfEditor({
31116
+ view,
31117
+ name,
31118
+ path,
31119
+ current,
31120
+ option: option2,
31121
+ updateCurrent
31122
+ }) {
31123
+ return /* @__PURE__ */ jsxs(Fragment, {
31124
+ children: [/* @__PURE__ */ jsx("div", {
31125
+ ..._stylex.props(styles$s.label, styles$s.left),
31126
+ children: /* @__PURE__ */ jsxs("label", {
31127
+ children: [option2.title ?? name, ":"]
31128
+ })
31129
+ }), /* @__PURE__ */ jsx("div", {}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31130
+ info: option2.description
31131
+ }) : /* @__PURE__ */ jsx("div", {}), option2.oneOf.map((subOption, key2) => {
31132
+ switch (subOption.type) {
31133
+ case "string":
31134
+ return /* @__PURE__ */ jsx(OneOfStringEditor, {
31135
+ view,
31136
+ name,
31137
+ path,
31138
+ updateCurrent,
31139
+ current,
31140
+ option: subOption
31141
+ }, key2);
31142
+ case "number":
31143
+ return /* @__PURE__ */ jsx(OneOfNumberEditor, {
31144
+ view,
31145
+ name,
31146
+ path,
31147
+ updateCurrent,
31148
+ current,
31149
+ option: subOption
31150
+ }, key2);
31151
+ case "array":
31152
+ return /* @__PURE__ */ jsx(OneOfArrayEditor, {
31153
+ view,
31154
+ name,
31155
+ path,
31156
+ updateCurrent,
31157
+ current,
31158
+ option: subOption
31159
+ }, key2);
31160
+ }
31161
+ return null;
31162
+ })]
31163
+ });
31164
+ }
31165
+ function OneOfStringEditor({
31166
+ path,
31167
+ current,
31168
+ updateCurrent,
31169
+ option: option2
31170
+ }) {
31171
+ const isString2 = typeof current === "string";
31172
+ const [value, setValue] = useState(isString2 ? current : "");
31173
+ if (option2.enum) {
31174
+ return /* @__PURE__ */ jsxs(Fragment, {
31175
+ children: [/* @__PURE__ */ jsx("div", {
31176
+ ..._stylex.props(styles$s.left),
31177
+ children: /* @__PURE__ */ jsx("input", {
31178
+ type: "radio",
31179
+ checked: isString2 && option2.enum.includes(current),
31180
+ onChange: ({
31181
+ target: {
31182
+ checked
31183
+ }
31184
+ }) => {
31185
+ if (checked) {
31186
+ updateCurrent(path, value);
31187
+ }
31188
+ }
31189
+ })
31190
+ }), option2.enum.length > 1 ? /* @__PURE__ */ jsx(SelectDropdown, {
31191
+ value,
31192
+ options: option2.enum.map((value2) => ({
31193
+ label: value2,
31194
+ value: value2
31195
+ })),
31196
+ onChange: (value2) => {
31197
+ setValue(value2);
31198
+ updateCurrent(path, value2);
31199
+ }
31200
+ }) : /* @__PURE__ */ jsx("div", {
31201
+ children: option2.enum[0]
31202
+ }), /* @__PURE__ */ jsx("div", {})]
31203
+ });
31204
+ } else {
31205
+ return /* @__PURE__ */ jsxs(Fragment, {
31206
+ children: [/* @__PURE__ */ jsx("div", {
31207
+ ..._stylex.props(styles$s.left),
31208
+ children: /* @__PURE__ */ jsx("input", {
31209
+ type: "radio",
31210
+ checked: isString2,
31211
+ onChange: ({
31212
+ target: {
31213
+ checked
31214
+ }
31215
+ }) => {
31216
+ if (checked) {
31217
+ updateCurrent(path, value);
31218
+ }
31219
+ }
31220
+ })
31221
+ }), /* @__PURE__ */ jsx("input", {
31222
+ value,
31223
+ onChange: ({
31224
+ target: {
31225
+ value: value2
31226
+ }
31227
+ }) => {
31228
+ setValue(value2);
31229
+ updateCurrent(path, value2);
31230
+ }
31231
+ }), /* @__PURE__ */ jsx("div", {})]
31232
+ });
31233
+ }
31234
+ }
31235
+ function OneOfNumberEditor({
31236
+ path,
31237
+ current,
31238
+ updateCurrent,
31239
+ option: option2
31240
+ }) {
31241
+ const isNumber2 = typeof current === "number";
31242
+ const [value, setValue] = useState(isNumber2 ? current : option2.minimum ?? 0);
31243
+ return /* @__PURE__ */ jsxs(Fragment, {
31244
+ children: [/* @__PURE__ */ jsx("div", {
31245
+ ..._stylex.props(styles$s.left),
31246
+ children: /* @__PURE__ */ jsx("input", {
31247
+ type: "radio",
31248
+ checked: isNumber2,
31249
+ onChange: ({
31250
+ target: {
31251
+ checked
31252
+ }
31253
+ }) => {
31254
+ if (checked) {
31255
+ updateCurrent(path, value);
31256
+ }
31257
+ }
31258
+ })
31259
+ }), /* @__PURE__ */ jsx("input", {
31260
+ type: "number",
31261
+ min: option2.minimum,
31262
+ max: option2.maximum,
31263
+ value,
31264
+ onChange: ({
31265
+ target: {
31266
+ valueAsNumber
31267
+ }
31268
+ }) => {
31269
+ setValue(value);
31270
+ updateCurrent(path, valueAsNumber);
31271
+ },
31272
+ ..._stylex.props(styles$s.input)
31273
+ }), /* @__PURE__ */ jsx("div", {})]
31274
+ });
31275
+ }
31276
+ function OneOfArrayEditor({
31277
+ path,
31278
+ current,
31279
+ updateCurrent
31280
+ }) {
31281
+ const isArray2 = Array.isArray(current);
31282
+ const [value, setValue] = useState(isArray2 ? current : []);
31283
+ return /* @__PURE__ */ jsxs(Fragment, {
31284
+ children: [/* @__PURE__ */ jsx("div", {
31285
+ ..._stylex.props(styles$s.left),
31286
+ children: /* @__PURE__ */ jsx("input", {
31287
+ type: "radio",
31288
+ checked: isArray2,
31289
+ onChange: ({
31290
+ target: {
31291
+ checked
31292
+ }
31293
+ }) => {
31294
+ if (checked) {
31295
+ updateCurrent(path, value);
31296
+ }
31297
+ }
31298
+ })
31299
+ }), /* @__PURE__ */ jsx(PillInput, {
31300
+ values: value,
31301
+ setValues: (values) => {
31302
+ setValue(values);
31303
+ updateCurrent(path, values);
31304
+ }
31305
+ }), /* @__PURE__ */ jsx("div", {})]
31306
+ });
31307
+ }
31308
+ function ArrayEditor({
31309
+ name,
31310
+ path,
31311
+ current,
31312
+ option: option2,
31313
+ updateCurrent
31314
+ }) {
31315
+ return /* @__PURE__ */ jsxs(Fragment, {
31316
+ children: [/* @__PURE__ */ jsx("div", {
31317
+ ..._stylex.props(styles$s.left, styles$s.label),
31318
+ children: /* @__PURE__ */ jsxs("label", {
31319
+ children: [option2.title ?? name, ":"]
31320
+ })
31321
+ }), /* @__PURE__ */ jsx(PillInput, {
31322
+ values: current,
31323
+ setValues: (values) => {
31324
+ updateCurrent(path, values);
31325
+ }
31326
+ }), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31327
+ info: option2.description
31328
+ }) : /* @__PURE__ */ jsx("div", {})]
31329
+ });
31330
+ }
31331
+ function NumberEditor$1({
31332
+ name,
31333
+ path,
31334
+ current,
31335
+ option: option2,
31336
+ updateCurrent
31337
+ }) {
31338
+ return /* @__PURE__ */ jsxs(Fragment, {
31339
+ children: [/* @__PURE__ */ jsx("div", {
31340
+ ..._stylex.props(styles$s.left, styles$s.label),
31341
+ children: /* @__PURE__ */ jsxs("label", {
31342
+ children: [option2.title ?? name, ":"]
31343
+ })
31344
+ }), /* @__PURE__ */ jsx("input", {
31345
+ value: current,
31346
+ type: "number",
31347
+ min: option2.minimum,
31348
+ max: option2.maximum,
31349
+ onChange: ({
31350
+ target: {
31351
+ valueAsNumber
31352
+ }
31353
+ }) => {
31354
+ updateCurrent(path, valueAsNumber);
31355
+ },
31356
+ ..._stylex.props(styles$s.input)
31357
+ }, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31358
+ info: option2.description
31359
+ }) : /* @__PURE__ */ jsx("div", {})]
31360
+ });
31361
+ }
31362
+ function StringEditor$1({
31363
+ name,
31364
+ path,
31365
+ current,
31366
+ option: option2,
31367
+ updateCurrent
31368
+ }) {
31369
+ if (option2.enum) {
31370
+ return /* @__PURE__ */ jsxs(Fragment, {
31371
+ children: [/* @__PURE__ */ createElement("div", {
31372
+ ..._stylex.props(styles$s.left, styles$s.label),
31373
+ key: `${name}-label`
31374
+ }, /* @__PURE__ */ jsxs("label", {
31375
+ children: [option2.title ?? name, ":"]
31376
+ })), /* @__PURE__ */ jsx(SelectDropdown, {
31377
+ value: current,
31378
+ options: option2.enum.map((value) => ({
31379
+ label: value,
31380
+ value
31381
+ })),
31382
+ onChange: (value) => {
31383
+ updateCurrent(path, value);
31384
+ }
31385
+ }, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31386
+ info: option2.description
31387
+ }) : /* @__PURE__ */ jsx("div", {})]
31388
+ });
31389
+ } else {
31390
+ return /* @__PURE__ */ jsxs(Fragment, {
31391
+ children: [/* @__PURE__ */ createElement("div", {
31392
+ ..._stylex.props(styles$s.left, styles$s.label),
31393
+ key: `${name}-label`
31394
+ }, /* @__PURE__ */ jsxs("label", {
31395
+ children: [option2.title ?? name, ":"]
31396
+ })), /* @__PURE__ */ jsx("input", {
31397
+ value: current,
31398
+ onChange: ({
31399
+ target: {
31400
+ value
31401
+ }
31402
+ }) => {
31403
+ updateCurrent(path, value);
31404
+ }
31405
+ }, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31406
+ info: option2.description
31407
+ }) : /* @__PURE__ */ jsx("div", {})]
31408
+ });
31409
+ }
31410
+ }
31411
+ function BooleanEditor({
31412
+ name,
31413
+ path,
31414
+ current,
31415
+ option: option2,
31416
+ updateCurrent
31417
+ }) {
31418
+ return /* @__PURE__ */ jsxs(Fragment, {
31419
+ children: [/* @__PURE__ */ jsx("div", {
31420
+ ..._stylex.props(styles$s.left),
31421
+ children: /* @__PURE__ */ jsxs("label", {
31422
+ ..._stylex.props(styles$s.label),
31423
+ htmlFor: `${name}-checkbox`,
31424
+ children: [option2.title ?? name, ":"]
31425
+ }, `${name}-label`)
31426
+ }), /* @__PURE__ */ jsx("div", {
31427
+ ..._stylex.props(styles$s.right),
31428
+ children: /* @__PURE__ */ jsx("input", {
31429
+ type: "checkbox",
31430
+ checked: current,
31431
+ onChange: ({
31432
+ target: {
31433
+ checked
31434
+ }
31435
+ }) => {
31436
+ updateCurrent(path, checked);
31437
+ },
31438
+ id: `${name}-checkbox`
31439
+ })
31440
+ }), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31441
+ info: option2.description
31442
+ }) : /* @__PURE__ */ jsx("div", {})]
31443
+ });
31444
+ }
31445
+ function FieldEditor({
31446
+ view,
31447
+ name,
31448
+ path,
31449
+ current,
31450
+ option: option2,
31451
+ updateCurrent
31452
+ }) {
31453
+ const [searchValue, setSearchValue] = useState("");
31454
+ const valueListRef = useRef(null);
31455
+ const jsonFields = current ?? [];
31456
+ const fields = jsonFields.map((field) => {
31457
+ try {
31458
+ return JSON.parse(field)[0];
31459
+ } catch (e) {
31460
+ console.warn("Failed to parse field", field, e);
31461
+ return "";
31462
+ }
31463
+ });
31464
+ const updateFields = (path2, value) => {
31465
+ const jsonFields2 = value.map((field) => JSON.stringify([field]));
31466
+ updateCurrent(path2, jsonFields2);
31467
+ };
31468
+ const lcSearch = searchValue.toLocaleLowerCase();
31469
+ const dimensions = view.definition.getOutputSchema().fields;
31470
+ const filteredFields = dimensions.filter((field) => field.name.toLocaleLowerCase().includes(lcSearch)).filter((field) => !fields.includes(field.name)).filter((field) => {
31471
+ var _a2;
31472
+ return !("fieldTypes" in option2.items) || ((_a2 = option2.items.fieldTypes) == null ? void 0 : _a2.includes(field.type.kind));
31473
+ });
31474
+ return /* @__PURE__ */ jsxs(Fragment, {
31475
+ children: [/* @__PURE__ */ jsx("div", {
31476
+ ..._stylex.props(styles$s.left, styles$s.label),
31477
+ children: /* @__PURE__ */ jsxs("label", {
31478
+ children: [option2.title ?? name, ":"]
31479
+ })
31480
+ }), /* @__PURE__ */ jsxs("div", {
31481
+ style: {
31482
+ minHeight: 0,
31483
+ display: "grid",
31484
+ gap: 4
31485
+ },
31486
+ children: [/* @__PURE__ */ jsx(PillInput, {
31487
+ values: fields,
31488
+ setValues: (values) => {
31489
+ updateFields(path, values);
31490
+ },
31491
+ value: searchValue,
31492
+ setValue: setSearchValue,
31493
+ focusElement: valueListRef
31494
+ }), /* @__PURE__ */ jsx(FieldList$1, {
31495
+ ref: valueListRef,
31496
+ fields: filteredFields,
31497
+ search: searchValue,
31498
+ onClick: (value) => {
31499
+ updateFields(path, [...fields, value]);
31500
+ }
31501
+ })]
31502
+ }), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31503
+ info: option2.description
31504
+ }) : /* @__PURE__ */ jsx("div", {})]
31505
+ });
31506
+ }
31507
+ function FieldList$1({
31508
+ ref,
31509
+ fields,
31510
+ search,
31511
+ onClick
31512
+ }) {
31513
+ if (fields.length) {
31514
+ return /* @__PURE__ */ jsx("div", {
31515
+ ref,
31516
+ ...{
31517
+ className: "mly78zum5 mly1a02dak mly1jnr06f"
31518
+ },
31519
+ children: fields.map((field) => /* @__PURE__ */ jsx(FieldToken, {
31520
+ field,
31521
+ onClick: () => onClick(field.name),
31522
+ tooltip: /* @__PURE__ */ jsx(FieldHoverCard, {
31523
+ field,
31524
+ path: []
31525
+ }),
31526
+ tooltipProps: {
31527
+ side: "right",
31528
+ align: "start",
31529
+ sideOffset: 4,
31530
+ alignOffset: 24
31531
+ }
31532
+ }, field.name))
31533
+ });
31534
+ } else {
31535
+ if (search) {
31536
+ return /* @__PURE__ */ jsx("div", {
31537
+ ...{},
31538
+ "data-disabled": "true",
31539
+ children: "No matching fields"
31540
+ });
31541
+ }
31542
+ }
31543
+ }
31544
+ function ObjectEditor({
31545
+ view,
31546
+ name,
31547
+ path,
31548
+ current,
31549
+ option: option2,
31550
+ updateCurrent
31551
+ }) {
31552
+ const [isExpanded, setIsExpanded] = useState(path.length === 0);
31553
+ return /* @__PURE__ */ jsxs(Fragment, {
31554
+ children: [name ? /* @__PURE__ */ jsxs(Fragment, {
31555
+ children: [/* @__PURE__ */ jsxs("div", {
31556
+ ..._stylex.props(styles$s.label, styles$s.heading),
31557
+ children: [/* @__PURE__ */ jsx("label", {
31558
+ children: option2.title ?? name
31559
+ }), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
31560
+ info: option2.description
31561
+ }) : null]
31562
+ }), /* @__PURE__ */ jsx(Button, {
31563
+ variant: "flat",
31564
+ size: "compact",
31565
+ onClick: () => setIsExpanded(!isExpanded),
31566
+ icon: isExpanded ? "chevronDown" : "chevronRight",
31567
+ tooltip: isExpanded ? "Collapse" : "Expand"
31568
+ })]
31569
+ }) : null, isExpanded ? Object.entries(option2.properties).map(([subName, subOption]) => {
31570
+ const key2 = [...path, name, subName].join(".");
31571
+ if (subOption.type === "boolean") {
31572
+ return /* @__PURE__ */ jsx(BooleanEditor, {
31573
+ view,
31574
+ name: subName,
31575
+ path: [...path, subName],
31576
+ option: subOption,
31577
+ current: current[subName],
31578
+ updateCurrent
31579
+ }, key2);
31580
+ } else if (subOption.type === "string") {
31581
+ return /* @__PURE__ */ jsx(StringEditor$1, {
31582
+ view,
31583
+ name: subName,
31584
+ path: [...path, subName],
31585
+ option: subOption,
31586
+ current: current[subName],
31587
+ updateCurrent
31588
+ }, key2);
31589
+ } else if (subOption.type === "number") {
31590
+ return /* @__PURE__ */ jsx(NumberEditor$1, {
31591
+ view,
31592
+ name: subName,
31593
+ path: [...path, subName],
31594
+ option: subOption,
31595
+ current: current[subName],
31596
+ updateCurrent
31597
+ }, key2);
31598
+ } else if (subOption.type === "object") {
31599
+ return /* @__PURE__ */ jsx(ObjectEditor, {
31600
+ view,
31601
+ name: subName,
31602
+ path: [...path, subName],
31603
+ option: subOption,
31604
+ current: current[subName] ?? {},
31605
+ updateCurrent
31606
+ }, key2);
31607
+ } else if (subOption.type === "array") {
31608
+ if (subOption.items.type === "string") {
31609
+ if ("subtype" in subOption.items && subOption.items.subtype === "field") {
31610
+ return /* @__PURE__ */ jsx(FieldEditor, {
31611
+ view,
31612
+ name: subName,
31613
+ path: [...path, subName],
31614
+ option: subOption,
31615
+ current: current[subName] ?? [],
31616
+ updateCurrent
31617
+ }, key2);
31618
+ } else {
31619
+ return /* @__PURE__ */ jsx(ArrayEditor, {
31620
+ view,
31621
+ name: subName,
31622
+ path: [...path, subName],
31623
+ option: subOption,
31624
+ current: current[subName] ?? [],
31625
+ updateCurrent
31626
+ }, key2);
31627
+ }
31628
+ } else {
31629
+ console.warn("Unsupported array type", subOption.items.type);
31630
+ }
31631
+ } else if (subOption.type === "oneOf") {
31632
+ return /* @__PURE__ */ jsx(OneOfEditor, {
31633
+ view,
31634
+ name: subName,
31635
+ path: [...path, subName],
31636
+ option: subOption,
31637
+ current: current[subName],
31638
+ updateCurrent
31639
+ }, key2);
31640
+ }
31641
+ return null;
31642
+ }) : null, /* @__PURE__ */ jsx("div", {
31643
+ ..._stylex.props(styles$s.divider)
31644
+ })]
31645
+ });
31646
+ }
31647
+ function VizEditor({
31648
+ rootQuery,
31649
+ view,
31650
+ plugin,
31651
+ setOpen
31652
+ }) {
31653
+ const {
31654
+ setQuery
31655
+ } = useContext(QueryEditorContext);
31656
+ const [current, setCurrent] = useState(plugin.getSettings());
31657
+ console.info("RendererEditor current settings:", current);
31658
+ const schema = plugin.getSchema();
31659
+ const updateCurrent = (path, value) => {
31660
+ const newCurrent = {
31661
+ ...current
31662
+ };
31663
+ let target = newCurrent;
31664
+ for (let i2 = 0; i2 < path.length - 1; i2++) {
31665
+ if (!(path[i2] in target)) {
31666
+ target[path[i2]] = {};
31667
+ }
31668
+ target = target[path[i2]];
31669
+ }
31670
+ target[path[path.length - 1]] = value;
31671
+ setCurrent(newCurrent);
31672
+ };
31673
+ return /* @__PURE__ */ jsxs("div", {
31674
+ ..._stylex.props(styles$s.editor),
31675
+ children: [/* @__PURE__ */ jsx("div", {
31676
+ ..._stylex.props(styles$s.editorGrid),
31677
+ children: /* @__PURE__ */ jsx(ObjectEditor, {
31678
+ view,
31679
+ name: "",
31680
+ path: [],
31681
+ option: schema,
31682
+ current,
31683
+ updateCurrent
31684
+ })
31685
+ }), /* @__PURE__ */ jsxs("div", {
31686
+ ..._stylex.props(styles$s.editorRow),
31687
+ children: [/* @__PURE__ */ jsx(Button, {
31688
+ label: "Cancel",
31689
+ onClick: () => {
31690
+ setOpen(false);
31691
+ },
31692
+ customStyle: styles$s.editorCell
31693
+ }), /* @__PURE__ */ jsx(Button, {
31694
+ variant: "primary",
31695
+ label: "Apply",
31696
+ onClick: () => {
31697
+ const tag = plugin.settingsToTag(current);
31698
+ const value = tag.toString();
31699
+ const annotations = view.getOrAddAnnotations();
31700
+ const old = annotations.items.find((annotation) => annotation.value.startsWith(RENDERER_PREFIX + "viz"));
31701
+ if (old) {
31702
+ annotations.remove(old);
31703
+ }
31704
+ view.getOrAddAnnotations().add(new ASTAnnotation({
31705
+ value
31706
+ }));
31707
+ setQuery == null ? void 0 : setQuery(rootQuery.build());
31708
+ setOpen(false);
31709
+ },
31710
+ customStyle: styles$s.editorCell
31711
+ })]
31712
+ })]
31713
+ });
31714
+ }
31715
+ const dialogStyles = {
31716
+ displayNone: {
31717
+ display: "mly1s85apg",
31718
+ $$css: true
31719
+ },
31720
+ overlay: {
31721
+ background: "mly5uxqc1",
31722
+ backgroundAttachment: null,
31723
+ backgroundClip: null,
31724
+ backgroundColor: null,
31725
+ backgroundImage: null,
31726
+ backgroundOrigin: null,
31727
+ backgroundPosition: null,
31728
+ backgroundPositionX: null,
31729
+ backgroundPositionY: null,
31730
+ backgroundRepeat: null,
31731
+ backgroundSize: null,
31732
+ position: "mlyixxii4",
31733
+ top: "mly13vifvy",
31734
+ left: "mlyu96u03",
31735
+ right: "mly3m8u43",
31736
+ insetInlineStart: null,
31737
+ insetInlineEnd: null,
31738
+ bottom: "mly1ey2m1c",
31739
+ display: "mlyrvj5dj",
31740
+ placeItems: "mly1ku5rj1",
31741
+ alignItems: null,
31742
+ justifyItems: null,
31743
+ zIndex: "mly11uqc5h",
31744
+ $$css: true
31745
+ },
31746
+ title: {
31747
+ fontSize: "mly1j61zf2",
31748
+ margin: "mly1ghz6dp",
31749
+ marginInline: null,
31750
+ marginInlineStart: null,
31751
+ marginLeft: null,
31752
+ marginInlineEnd: null,
31753
+ marginRight: null,
31754
+ marginBlock: null,
31755
+ marginTop: null,
31756
+ marginBottom: null,
31757
+ display: "mly78zum5",
31758
+ justifyContent: "mly1qughib",
31759
+ alignItems: "mly6s0dn4",
31760
+ borderBottom: "mlyllpv0l",
31761
+ borderBottomWidth: null,
31762
+ borderBottomStyle: null,
31763
+ borderBottomColor: null,
31764
+ lineHeight: "mly1rl49lg",
31765
+ $$css: true
31766
+ },
31767
+ close: {
31768
+ border: "mly1gs6z28",
31769
+ borderWidth: null,
31770
+ borderInlineWidth: null,
31771
+ borderInlineStartWidth: null,
31772
+ borderLeftWidth: null,
31773
+ borderInlineEndWidth: null,
31774
+ borderRightWidth: null,
31775
+ borderBlockWidth: null,
31776
+ borderTopWidth: null,
31777
+ borderBottomWidth: null,
31778
+ borderStyle: null,
31779
+ borderInlineStyle: null,
31780
+ borderInlineStartStyle: null,
31781
+ borderLeftStyle: null,
31782
+ borderInlineEndStyle: null,
31783
+ borderRightStyle: null,
31784
+ borderBlockStyle: null,
31785
+ borderTopStyle: null,
31786
+ borderBottomStyle: null,
31787
+ borderColor: null,
31788
+ borderInlineColor: null,
31789
+ borderInlineStartColor: null,
31790
+ borderLeftColor: null,
31791
+ borderInlineEndColor: null,
31792
+ borderRightColor: null,
31793
+ borderBlockColor: null,
31794
+ borderTopColor: null,
31795
+ borderBottomColor: null,
31796
+ background: "mly1md70p1 mly14hn1a8 mlywghvya",
31797
+ backgroundAttachment: null,
31798
+ backgroundClip: null,
31799
+ backgroundColor: null,
31800
+ backgroundImage: null,
31801
+ backgroundOrigin: null,
31802
+ backgroundPosition: null,
31803
+ backgroundPositionX: null,
31804
+ backgroundPositionY: null,
31805
+ backgroundRepeat: null,
31806
+ backgroundSize: null,
31807
+ borderRadius: "mly12oqio5",
31808
+ borderStartStartRadius: null,
31809
+ borderStartEndRadius: null,
31810
+ borderEndStartRadius: null,
31811
+ borderEndEndRadius: null,
31812
+ borderTopLeftRadius: null,
31813
+ borderTopRightRadius: null,
31814
+ borderBottomLeftRadius: null,
31815
+ borderBottomRightRadius: null,
31816
+ $$css: true
31817
+ },
31818
+ content: {
31819
+ display: "mly78zum5",
31820
+ flexDirection: "mlydt5ytf",
31821
+ boxShadow: "mly5n1uv4",
31822
+ backgroundColor: "mly12peec7",
31823
+ borderRadius: "mlyur7f20",
31824
+ borderStartStartRadius: null,
31825
+ borderStartEndRadius: null,
31826
+ borderEndStartRadius: null,
31827
+ borderEndEndRadius: null,
31828
+ borderTopLeftRadius: null,
31829
+ borderTopRightRadius: null,
31830
+ borderBottomLeftRadius: null,
31831
+ borderBottomRightRadius: null,
31832
+ padding: "mlye8ttls",
31833
+ paddingInline: null,
31834
+ paddingStart: null,
31835
+ paddingLeft: null,
31836
+ paddingEnd: null,
31837
+ paddingRight: null,
31838
+ paddingBlock: null,
31839
+ paddingTop: null,
31840
+ paddingBottom: null,
31841
+ minWidth: "mlylm99nl",
31842
+ maxWidth: "mly1jkqq1h",
31843
+ gap: "mly167g77z",
31844
+ rowGap: null,
31845
+ columnGap: null,
31846
+ $$css: true
31847
+ },
31848
+ editor: {
31849
+ width: "mlyqyf9gi",
31850
+ display: "mly78zum5",
31851
+ flexDirection: "mlydt5ytf",
31852
+ gap: "mly167g77z",
31853
+ rowGap: null,
31854
+ columnGap: null,
31855
+ $$css: true
31856
+ },
31857
+ editorRow: {
31858
+ display: "mly78zum5",
31859
+ gap: "mly167g77z",
31860
+ rowGap: null,
31861
+ columnGap: null,
31862
+ $$css: true
31863
+ },
31864
+ editorCell: {
31865
+ flexGrow: "mly1iyjqo2",
31866
+ $$css: true
31867
+ },
31868
+ input: {
31869
+ border: "mly2yh2zd",
31870
+ borderWidth: null,
31871
+ borderInlineWidth: null,
31872
+ borderInlineStartWidth: null,
31873
+ borderLeftWidth: null,
31874
+ borderInlineEndWidth: null,
31875
+ borderRightWidth: null,
31876
+ borderBlockWidth: null,
31877
+ borderTopWidth: null,
31878
+ borderBottomWidth: null,
31879
+ borderStyle: null,
31880
+ borderInlineStyle: null,
31881
+ borderInlineStartStyle: null,
31882
+ borderLeftStyle: null,
31883
+ borderInlineEndStyle: null,
31884
+ borderRightStyle: null,
31885
+ borderBlockStyle: null,
31886
+ borderTopStyle: null,
31887
+ borderBottomStyle: null,
31888
+ borderColor: null,
31889
+ borderInlineColor: null,
31890
+ borderInlineStartColor: null,
31891
+ borderLeftColor: null,
31892
+ borderInlineEndColor: null,
31893
+ borderRightColor: null,
31894
+ borderBlockColor: null,
31895
+ borderTopColor: null,
31896
+ borderBottomColor: null,
31897
+ color: "mlyizdh9v",
31898
+ padding: "mly9cpjcd",
31899
+ paddingInline: null,
31900
+ paddingStart: null,
31901
+ paddingLeft: null,
31902
+ paddingEnd: null,
31903
+ paddingRight: null,
31904
+ paddingBlock: null,
31905
+ paddingTop: null,
31906
+ paddingBottom: null,
31907
+ borderRadius: "mly1sxf85j",
31908
+ borderStartStartRadius: null,
31909
+ borderStartEndRadius: null,
31910
+ borderEndStartRadius: null,
31911
+ borderEndEndRadius: null,
31912
+ borderTopLeftRadius: null,
31913
+ borderTopRightRadius: null,
31914
+ borderBottomLeftRadius: null,
31915
+ borderBottomRightRadius: null,
31916
+ $$css: true
31917
+ }
31918
+ };
31919
+ function VizEditorDialog({
31920
+ rootQuery,
31921
+ plugin,
31922
+ view,
31923
+ customStyle,
31924
+ open,
31925
+ setOpen
31926
+ }) {
31927
+ if (!plugin || !open) {
31928
+ return null;
31929
+ }
31930
+ return /* @__PURE__ */ jsx(Root, {
31931
+ onOpenChange: (open2) => setOpen(open2),
31932
+ open,
31933
+ children: /* @__PURE__ */ jsx(Portal, {
31934
+ children: /* @__PURE__ */ jsx(Overlay, {
31935
+ ..._stylex.props(dialogStyles.overlay),
31936
+ children: /* @__PURE__ */ jsxs(Content$1, {
31937
+ ..._stylex.props(fontStyles.body, dialogStyles.content, styles$p.content, customStyle),
31938
+ children: [/* @__PURE__ */ jsxs(Title, {
31939
+ ..._stylex.props(dialogStyles.title),
31940
+ children: ["Visualization Settings", /* @__PURE__ */ jsx(Close, {
31941
+ ..._stylex.props(dialogStyles.close),
31942
+ children: /* @__PURE__ */ jsx(Icon, {
31943
+ name: "clear"
31944
+ })
31945
+ })]
31946
+ }), /* @__PURE__ */ jsx(Description, {
31947
+ ..._stylex.props(dialogStyles.displayNone),
31948
+ children: "Edit visualization parameters"
31949
+ }), /* @__PURE__ */ jsx(VizEditor, {
31950
+ rootQuery,
31951
+ view,
31952
+ plugin,
31953
+ setOpen
31954
+ })]
31955
+ })
31956
+ })
31957
+ })
31958
+ });
31959
+ }
31960
+ const styles$p = {
31961
+ content: {
31962
+ maxWidth: "mly14zcgw3",
31963
+ width: "mly14rvwrp",
31964
+ maxHeight: "mly1l4ul0t",
31965
+ $$css: true
31966
+ }
31967
+ };
31968
+ function Visualization$1({
31969
+ rootQuery,
31970
+ view
31971
+ }) {
31972
+ const {
31973
+ setQuery
31974
+ } = useContext(QueryEditorContext);
31975
+ const renderer = useMemo(() => new MalloyRenderer(), []);
31976
+ const [currentRenderer, setCurrentRenderer] = useState("table");
31977
+ const [plugin, setPlugin] = useState();
31978
+ const [open, setOpen] = useState(false);
31979
+ useEffect(() => {
31980
+ var _a2;
31981
+ const viz = renderer.createViz({
31982
+ onError: (error) => {
31983
+ console.error("Malloy render error", error);
31984
+ }
31985
+ });
31986
+ viz.setResult({
31987
+ schema: view.definition.getOutputSchema(),
31988
+ annotations: view.getTag().toString().split("\n").map((value) => ({
31989
+ value
31990
+ })),
31991
+ connection_name: ""
31992
+ });
31993
+ const metadata = viz.getMetadata();
31994
+ if (metadata) {
31995
+ const plugin2 = viz.getActivePlugin(metadata.getRootField().key);
31996
+ if (plugin2 && isCoreVizPluginInstance(plugin2)) {
31997
+ setCurrentRenderer(plugin2.name);
31998
+ setPlugin(plugin2);
31999
+ }
32000
+ } else {
32001
+ const currentTag = view.getTag();
32002
+ const rendererTag = view.getTag(RENDERER_PREFIX);
32003
+ const currentRenderer2 = ((_a2 = rendererTag.tag("viz")) == null ? void 0 : _a2.text()) ?? legacyToViz(tagToRenderer(currentTag) ?? "table");
32004
+ setCurrentRenderer(currentRenderer2);
32005
+ }
32006
+ }, [renderer, view]);
32007
+ const updateViz = (renderer2) => {
32008
+ view.setTagProperty(["viz"], renderer2, RENDERER_PREFIX);
32009
+ setQuery == null ? void 0 : setQuery(rootQuery.build());
32010
+ };
32011
+ const items = VIZ_RENDERERS.map((viz) => ({
32012
+ icon: /* @__PURE__ */ jsx(Icon, {
32013
+ name: `viz_${viz}`
32014
+ }),
32015
+ label: snakeToTitle(viz),
32016
+ value: viz,
32017
+ onClick: () => updateViz(viz)
32018
+ }));
32019
+ const tokens2 = [/* @__PURE__ */ jsx(SelectorToken, {
32020
+ customStyle: styles$o.first,
32021
+ icon: `viz_${currentRenderer}`,
32022
+ value: currentRenderer,
32023
+ items,
32024
+ onChange: (viz) => updateViz(viz)
32025
+ }, "first")];
32026
+ if (plugin) {
32027
+ tokens2.push(/* @__PURE__ */ jsx(Token, {
32028
+ icon: "gear",
32029
+ onClick: () => setOpen(true),
32030
+ customStyle: styles$o.trigger,
32031
+ tooltip: "Edit Settings..."
32032
+ }, "gear"));
32033
+ }
32034
+ return /* @__PURE__ */ jsxs(Fragment, {
32035
+ children: [/* @__PURE__ */ jsx(TokenGroup, {
32036
+ customStyle: styles$o.group,
32037
+ children: tokens2
32038
+ }), /* @__PURE__ */ jsx(VizEditorDialog, {
32039
+ open,
32040
+ setOpen,
32041
+ rootQuery,
32042
+ plugin,
32043
+ view
32044
+ })]
32045
+ });
32046
+ }
32047
+ const styles$o = {
32048
+ trigger: {
32049
+ height: "mly1ktj5wk",
32050
+ $$css: true
32051
+ },
32052
+ group: {
32053
+ width: "mlyh8yej3",
32054
+ gridTemplateColumns: "mly52fmzj",
32055
+ $$css: true
32056
+ },
32057
+ first: {
32058
+ justifyContent: "mlylqzeqv",
32059
+ $$css: true
32060
+ }
32061
+ };
32062
+ function snakeToTitle(snake) {
32063
+ return snake.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
32064
+ }
32065
+ function Visualization({
32066
+ annotations
32067
+ }) {
32068
+ const {
32069
+ tag
32070
+ } = Tag.fromTagLines(annotations.map((annotation) => annotation.value));
32071
+ const renderer = tagToRenderer(tag) ?? "table";
32072
+ return /* @__PURE__ */ jsx(Token, {
32073
+ label: snakeToTitle(renderer),
32074
+ icon: `viz_${renderer}`
32075
+ });
32076
+ }
32077
+ function ViewAttributeTable({
32078
+ viewInfo,
32079
+ isCompact,
32080
+ style
32081
+ }) {
32082
+ const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
32083
+ return /* @__PURE__ */ jsx("div", {
32084
+ ..._stylex.props(styles$n.attributeTableContainer, style),
32085
+ children: /* @__PURE__ */ jsx("table", {
32086
+ ...{
32087
+ className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
32088
+ },
32089
+ children: /* @__PURE__ */ jsxs("tbody", {
32090
+ children: [/* @__PURE__ */ jsx(ViewAttributeTableRow, {
32091
+ attribute: "chart type",
32092
+ children: /* @__PURE__ */ jsx("div", {
32093
+ ...{
32094
+ className: "mly1rg5ohu"
32095
+ },
32096
+ children: /* @__PURE__ */ jsx(Visualization, {
32097
+ annotations: viewInfo.annotations || []
32098
+ })
32099
+ })
32100
+ }), /* @__PURE__ */ jsx(ViewAttributeTableRow, {
32101
+ attribute: "output",
32102
+ children: dimensions.map((f2) => /* @__PURE__ */ jsx("span", {
32103
+ children: /* @__PURE__ */ jsx(FieldToken, {
32104
+ field: f2,
32105
+ size: isCompact ? "compact" : "default"
32106
+ })
32107
+ }, `${f2.kind}::${f2.name}`))
32108
+ })]
32109
+ })
32110
+ })
32111
+ });
32112
+ }
32113
+ function ViewAttributeTableRow({
32114
+ attribute,
32115
+ children
32116
+ }) {
32117
+ return /* @__PURE__ */ jsxs("tr", {
32118
+ ...{
32119
+ className: "mlydpxx8g"
32120
+ },
32121
+ children: [/* @__PURE__ */ jsx("td", {
32122
+ ..._stylex.props(styles$n.attributeTableKeyCell, fontStyles.supporting),
32123
+ children: /* @__PURE__ */ jsx("div", {
32124
+ ..._stylex.props(styles$n.attributeTableKeyCellContent, fontStyles.supporting),
32125
+ children: attribute
32126
+ })
32127
+ }), /* @__PURE__ */ jsx("td", {
32128
+ ...{
32129
+ className: "mly78zum5 mly1a02dak mly195vfkc"
32130
+ },
32131
+ children
32132
+ })]
32133
+ });
32134
+ }
32135
+ const styles$n = {
32136
+ attributeTableContainer: {
32137
+ padding: "mlye8ttls",
32138
+ paddingInline: null,
32139
+ paddingStart: null,
32140
+ paddingLeft: null,
32141
+ paddingEnd: null,
32142
+ paddingRight: null,
32143
+ paddingBlock: null,
32144
+ paddingTop: null,
32145
+ paddingBottom: null,
32146
+ gap: "mly167g77z",
32147
+ rowGap: null,
32148
+ columnGap: null,
32149
+ borderRadius: "mly1q4ynmn",
32150
+ borderStartStartRadius: null,
32151
+ borderStartEndRadius: null,
32152
+ borderEndStartRadius: null,
32153
+ borderEndEndRadius: null,
32154
+ borderTopLeftRadius: null,
32155
+ borderTopRightRadius: null,
32156
+ borderBottomLeftRadius: null,
32157
+ borderBottomRightRadius: null,
32158
+ backgroundColor: "mly12nb83b",
32159
+ boxSizing: "mly9f619",
32160
+ width: "mlyh8yej3",
32161
+ height: "mly1m3v4wt",
32162
+ overflow: "mlyysyzu8",
32163
+ overflowX: null,
32164
+ overflowY: null,
32165
+ $$css: true
32166
+ },
32167
+ attributeTableKeyCell: {
32168
+ whiteSpace: "mlyuxw1ft",
32169
+ width: "mly1f1nlb9",
32170
+ verticalAlign: "mly16dsc37",
32171
+ $$css: true
32172
+ },
32173
+ attributeTableKeyCellContent: {
32174
+ height: "mly1fgtraw",
30417
32175
  display: "mly78zum5",
30418
32176
  alignItems: "mly6s0dn4",
30419
32177
  $$css: true
@@ -30506,12 +32264,12 @@ function RichText({
30506
32264
  });
30507
32265
  return /* @__PURE__ */ jsx("div", {
30508
32266
  ref,
30509
- ..._stylex.props(multiLine && styles$o.preWrap, multiLine && styles$o.breakWord, customStyle),
32267
+ ..._stylex.props(multiLine && styles$m.preWrap, multiLine && styles$m.breakWord, customStyle),
30510
32268
  ...props2,
30511
32269
  children: formatted
30512
32270
  });
30513
32271
  }
30514
- const styles$o = {
32272
+ const styles$m = {
30515
32273
  preWrap: {
30516
32274
  whiteSpace: "mly126k92a",
30517
32275
  $$css: true
@@ -30540,7 +32298,7 @@ function HoverText({
30540
32298
  onMouseEnter: () => setIsTriggerHovered(true),
30541
32299
  onMouseLeave: () => setIsTriggerHovered(false),
30542
32300
  onPointerMove: (e) => e.preventDefault(),
30543
- customStyle: [fontStyles.supporting, styles$n.text],
32301
+ customStyle: [fontStyles.supporting, styles$l.text],
30544
32302
  children: text2
30545
32303
  })
30546
32304
  }), /* @__PURE__ */ jsx(Portal$4, {
@@ -30559,7 +32317,7 @@ function HoverText({
30559
32317
  })]
30560
32318
  });
30561
32319
  }
30562
- const styles$n = {
32320
+ const styles$l = {
30563
32321
  text: {
30564
32322
  overflow: "mlyb3r6kr",
30565
32323
  overflowX: null,
@@ -30570,45 +32328,6 @@ const styles$n = {
30570
32328
  $$css: true
30571
32329
  }
30572
32330
  };
30573
- function HoverCard({
30574
- children,
30575
- customStyle
30576
- }) {
30577
- return /* @__PURE__ */ jsx("div", {
30578
- ..._stylex.props(styles$m.container, fontStyles.body, customStyle),
30579
- children
30580
- });
30581
- }
30582
- const styles$m = {
30583
- container: {
30584
- boxShadow: "mly5n1uv4",
30585
- backgroundColor: "mly12peec7",
30586
- borderRadius: "mly4pepcl",
30587
- borderStartStartRadius: null,
30588
- borderStartEndRadius: null,
30589
- borderEndStartRadius: null,
30590
- borderEndEndRadius: null,
30591
- borderTopLeftRadius: null,
30592
- borderTopRightRadius: null,
30593
- borderBottomLeftRadius: null,
30594
- borderBottomRightRadius: null,
30595
- padding: "mlyc7ga6q",
30596
- paddingInline: null,
30597
- paddingStart: null,
30598
- paddingLeft: null,
30599
- paddingEnd: null,
30600
- paddingRight: null,
30601
- paddingBlock: null,
30602
- paddingTop: null,
30603
- paddingBottom: null,
30604
- display: "mly78zum5",
30605
- flexDirection: "mlydt5ytf",
30606
- gap: "mly167g77z",
30607
- rowGap: null,
30608
- columnGap: null,
30609
- $$css: true
30610
- }
30611
- };
30612
32331
  function FieldHoverCard({
30613
32332
  field,
30614
32333
  path
@@ -30625,7 +32344,7 @@ function FieldHoverCard({
30625
32344
  details = /* @__PURE__ */ jsx(ViewAttributeTable, {
30626
32345
  viewInfo: field,
30627
32346
  isCompact: true,
30628
- style: styles$l.viewAttributeTable
32347
+ style: styles$k.viewAttributeTable
30629
32348
  });
30630
32349
  } else if (field.kind === "dimension") {
30631
32350
  details = /* @__PURE__ */ jsx(TopValuesTable, {
@@ -30634,7 +32353,7 @@ function FieldHoverCard({
30634
32353
  });
30635
32354
  }
30636
32355
  return /* @__PURE__ */ jsxs(HoverCard, {
30637
- customStyle: styles$l.container,
32356
+ customStyle: styles$k.container,
30638
32357
  children: [/* @__PURE__ */ jsxs("div", {
30639
32358
  ref,
30640
32359
  children: [/* @__PURE__ */ jsx("div", {
@@ -30645,10 +32364,10 @@ function FieldHoverCard({
30645
32364
  field
30646
32365
  })
30647
32366
  }), /* @__PURE__ */ jsx("div", {
30648
- ..._stylex.props(fontStyles.supporting, styles$l.path),
32367
+ ..._stylex.props(fontStyles.supporting, styles$k.path),
30649
32368
  children: pathString
30650
32369
  }), /* @__PURE__ */ jsx("div", {
30651
- ..._stylex.props(fontStyles.emphasized, styles$l.title),
32370
+ ..._stylex.props(fontStyles.emphasized, styles$k.title),
30652
32371
  children: field.name
30653
32372
  }), description && /* @__PURE__ */ jsx(HoverText, {
30654
32373
  text: description,
@@ -30659,7 +32378,7 @@ function FieldHoverCard({
30659
32378
  })]
30660
32379
  });
30661
32380
  }
30662
- const styles$l = {
32381
+ const styles$k = {
30663
32382
  container: {
30664
32383
  width: "mlybl57os",
30665
32384
  maxHeight: "mlyq3t0pi",
@@ -30836,335 +32555,6 @@ function BooleanFilterCore({
30836
32555
  })
30837
32556
  });
30838
32557
  }
30839
- function useClickOutside(refOrRefs, handler) {
30840
- useEffect(() => {
30841
- const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
30842
- let down = false;
30843
- const isInOneElement = (ref, event) => {
30844
- return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
30845
- };
30846
- const isInElement = (event) => {
30847
- return refs.some((ref) => isInOneElement(ref, event));
30848
- };
30849
- const onMouseUp = (event) => {
30850
- if (!down || isInElement(event)) return;
30851
- handler(event);
30852
- down = false;
30853
- };
30854
- const onMouseDown = (event) => {
30855
- if (isInElement(event)) return;
30856
- down = true;
30857
- };
30858
- document.addEventListener("mouseup", onMouseUp);
30859
- document.addEventListener("mousedown", onMouseDown);
30860
- return () => {
30861
- document.removeEventListener("mouseup", onMouseUp);
30862
- document.removeEventListener("mousedown", onMouseDown);
30863
- };
30864
- }, [refOrRefs, handler]);
30865
- }
30866
- const PillInput = ({
30867
- values,
30868
- setValues,
30869
- autoFocus,
30870
- placeholder,
30871
- type = "text",
30872
- value: controlledValue,
30873
- setValue: setControlledValue,
30874
- focusElement,
30875
- color = DEFAULT_TOKEN_COLOR,
30876
- customStyle
30877
- }) => {
30878
- const [uncontrolledValue, setUncontrolledValue] = useState("");
30879
- const [_focused, setFocused] = useState(false);
30880
- const inp = useRef(null);
30881
- const ref = useRef(null);
30882
- const [selectedPill, setSelectedPill] = useState(void 0);
30883
- const pillRefs = useRef([]);
30884
- const value = controlledValue || uncontrolledValue;
30885
- const setValue = setControlledValue || setUncontrolledValue;
30886
- const deletePill = useCallback((idx) => {
30887
- var _a2;
30888
- const newValues = [...values];
30889
- newValues.splice(idx, 1);
30890
- setValues(newValues);
30891
- if (selectedPill === 0) {
30892
- if (values.length === 1) {
30893
- setSelectedPill(void 0);
30894
- (_a2 = inp.current) == null ? void 0 : _a2.focus();
30895
- } else {
30896
- setSelectedPill(0);
30897
- }
30898
- } else {
30899
- setSelectedPill(idx - 1);
30900
- }
30901
- }, [selectedPill, setValues, values]);
30902
- const pills = useMemo(() => {
30903
- pillRefs.current = new Array(values.length);
30904
- return values.map((value2, index2) => /* @__PURE__ */ jsx(Pill, {
30905
- color,
30906
- onClick: () => {
30907
- setSelectedPill(index2);
30908
- },
30909
- onDelete: () => deletePill(index2),
30910
- forwardRef: (ref2) => {
30911
- pillRefs.current[index2] = ref2;
30912
- },
30913
- children: value2
30914
- }, value2));
30915
- }, [color, deletePill, values]);
30916
- useEffect(() => {
30917
- var _a2;
30918
- if (selectedPill !== void 0) {
30919
- (_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
30920
- }
30921
- }, [pills, selectedPill]);
30922
- const onKeyUp = (event) => {
30923
- var _a2, _b2;
30924
- if (event.key === "Backspace") {
30925
- if (selectedPill !== void 0) {
30926
- deletePill(selectedPill);
30927
- }
30928
- } else if (event.key === "ArrowRight") {
30929
- if (selectedPill === values.length - 1) {
30930
- setSelectedPill(void 0);
30931
- (_a2 = inp.current) == null ? void 0 : _a2.focus();
30932
- } else if (selectedPill !== void 0) {
30933
- setSelectedPill(selectedPill + 1);
30934
- }
30935
- } else if (event.key === "ArrowLeft") {
30936
- if (selectedPill !== void 0 && selectedPill > 0) {
30937
- setSelectedPill(selectedPill - 1);
30938
- }
30939
- } else {
30940
- (_b2 = inp.current) == null ? void 0 : _b2.focus();
30941
- }
30942
- };
30943
- const commitValue = () => {
30944
- if (value.length > 0 && !values.includes(value)) {
30945
- setValues([...values, value]);
30946
- setValue("");
30947
- }
30948
- };
30949
- useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
30950
- setFocused(false);
30951
- commitValue();
30952
- });
30953
- return /* @__PURE__ */ jsx("div", {
30954
- ..._stylex.props(fontStyles.body, styles$k.main),
30955
- children: /* @__PURE__ */ jsx(ScrollableArea, {
30956
- children: /* @__PURE__ */ jsxs("div", {
30957
- ..._stylex.props(styles$k.content, customStyle),
30958
- onKeyUp,
30959
- onClick: () => {
30960
- var _a2;
30961
- return (_a2 = inp.current) == null ? void 0 : _a2.focus();
30962
- },
30963
- ref,
30964
- children: [pills, /* @__PURE__ */ jsx("input", {
30965
- ...{
30966
- className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
30967
- },
30968
- ref: inp,
30969
- type,
30970
- placeholder: values.length === 0 ? placeholder : "",
30971
- value,
30972
- size: 1,
30973
- onChange: (event) => {
30974
- setValue(event.target.value);
30975
- },
30976
- onKeyDown: (event) => {
30977
- if (event.key === "Enter") {
30978
- if (value !== "") {
30979
- commitValue();
30980
- event.stopPropagation();
30981
- event.preventDefault();
30982
- }
30983
- }
30984
- },
30985
- onKeyUp: (event) => {
30986
- var _a2, _b2, _c2, _d;
30987
- if (event.key === "Backspace") {
30988
- if (value === "" && values.length > 0) {
30989
- commitValue();
30990
- (_a2 = inp.current) == null ? void 0 : _a2.blur();
30991
- setSelectedPill(values.length - 1);
30992
- }
30993
- } else if (event.key === "ArrowLeft") {
30994
- if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
30995
- commitValue();
30996
- (_d = inp.current) == null ? void 0 : _d.blur();
30997
- setSelectedPill(values.length - 1);
30998
- event.preventDefault();
30999
- event.stopPropagation();
31000
- }
31001
- }
31002
- },
31003
- onFocus: () => {
31004
- setFocused(true);
31005
- setSelectedPill(void 0);
31006
- },
31007
- autoFocus
31008
- })]
31009
- })
31010
- })
31011
- });
31012
- };
31013
- const Pill = ({
31014
- children,
31015
- color = DEFAULT_TOKEN_COLOR,
31016
- forwardRef,
31017
- onClick,
31018
- onDelete
31019
- }) => {
31020
- return /* @__PURE__ */ jsxs("div", {
31021
- onClick,
31022
- tabIndex: 0,
31023
- ref: forwardRef,
31024
- ..._stylex.props(styles$k.pill, colorVariants[color]),
31025
- children: [children, /* @__PURE__ */ jsx("div", {
31026
- title: "Remove",
31027
- ...{
31028
- className: "mly3nfvp2"
31029
- },
31030
- children: /* @__PURE__ */ jsx(SvgClear, {
31031
- onClick: () => onDelete(),
31032
- ...{
31033
- className: "mly6jxa94 mly1v9usgg"
31034
- }
31035
- })
31036
- })]
31037
- });
31038
- };
31039
- const styles$k = {
31040
- main: {
31041
- borderRadius: "mly12oqio5",
31042
- borderStartStartRadius: null,
31043
- borderStartEndRadius: null,
31044
- borderEndStartRadius: null,
31045
- borderEndEndRadius: null,
31046
- borderTopLeftRadius: null,
31047
- borderTopRightRadius: null,
31048
- borderBottomLeftRadius: null,
31049
- borderBottomRightRadius: null,
31050
- border: "mlyvckdp7",
31051
- borderWidth: null,
31052
- borderInlineWidth: null,
31053
- borderInlineStartWidth: null,
31054
- borderLeftWidth: null,
31055
- borderInlineEndWidth: null,
31056
- borderRightWidth: null,
31057
- borderBlockWidth: null,
31058
- borderTopWidth: null,
31059
- borderBottomWidth: null,
31060
- borderStyle: null,
31061
- borderInlineStyle: null,
31062
- borderInlineStartStyle: null,
31063
- borderLeftStyle: null,
31064
- borderInlineEndStyle: null,
31065
- borderRightStyle: null,
31066
- borderBlockStyle: null,
31067
- borderTopStyle: null,
31068
- borderBottomStyle: null,
31069
- borderColor: null,
31070
- borderInlineColor: null,
31071
- borderInlineStartColor: null,
31072
- borderLeftColor: null,
31073
- borderInlineEndColor: null,
31074
- borderRightColor: null,
31075
- borderBlockColor: null,
31076
- borderTopColor: null,
31077
- borderBottomColor: null,
31078
- padding: "mlybsehbd",
31079
- paddingInline: null,
31080
- paddingStart: null,
31081
- paddingLeft: null,
31082
- paddingEnd: null,
31083
- paddingRight: null,
31084
- paddingBlock: null,
31085
- paddingTop: null,
31086
- paddingBottom: null,
31087
- display: "mlyrvj5dj",
31088
- minHeight: "mly2lwn1j",
31089
- $$css: true
31090
- },
31091
- content: {
31092
- outline: "mly1a2a7pz",
31093
- outlineColor: null,
31094
- outlineOffset: null,
31095
- outlineStyle: null,
31096
- outlineWidth: null,
31097
- display: "mly78zum5",
31098
- flexWrap: "mly1a02dak",
31099
- gap: "mly1ed6fcf",
31100
- rowGap: null,
31101
- columnGap: null,
31102
- borderColor: "mly1akygb0 mlyetl2wx",
31103
- borderInlineColor: null,
31104
- borderInlineStartColor: null,
31105
- borderLeftColor: null,
31106
- borderInlineEndColor: null,
31107
- borderRightColor: null,
31108
- borderBlockColor: null,
31109
- borderTopColor: null,
31110
- borderBottomColor: null,
31111
- $$css: true
31112
- },
31113
- pill: {
31114
- backgroundColor: "mlyy9rfsq",
31115
- borderRadius: "mly1sxf85j",
31116
- borderStartStartRadius: null,
31117
- borderStartEndRadius: null,
31118
- borderEndStartRadius: null,
31119
- borderEndEndRadius: null,
31120
- borderTopLeftRadius: null,
31121
- borderTopRightRadius: null,
31122
- borderBottomLeftRadius: null,
31123
- borderBottomRightRadius: null,
31124
- color: "mly1xre2ib",
31125
- display: "mly78zum5",
31126
- alignItems: "mly6s0dn4",
31127
- gap: "mly1nejdyq",
31128
- rowGap: null,
31129
- columnGap: null,
31130
- padding: "mly1e41zw8",
31131
- paddingInline: null,
31132
- paddingStart: null,
31133
- paddingLeft: null,
31134
- paddingEnd: null,
31135
- paddingRight: null,
31136
- paddingBlock: null,
31137
- paddingTop: null,
31138
- paddingBottom: null,
31139
- textTransform: "mly6mezaz",
31140
- cursor: "mly1ypdohk",
31141
- height: "mly1qx5ct2",
31142
- whiteSpace: "mlyuxw1ft",
31143
- $$css: true
31144
- }
31145
- };
31146
- const colorVariants = {
31147
- default: {
31148
- "--mlyvygx4q": "mly1izbou4",
31149
- "--mly13n7235": "mly8bgh0r",
31150
- $$css: true
31151
- },
31152
- purple: {
31153
- "--mlyvygx4q": "mly1f8soc4",
31154
- "--mly13n7235": "mly1r5zvhd",
31155
- $$css: true
31156
- },
31157
- green: {
31158
- "--mlyvygx4q": "mlyf8wvcd",
31159
- "--mly13n7235": "mly1u6t2w6",
31160
- $$css: true
31161
- },
31162
- cyan: {
31163
- "--mlyvygx4q": "mlyrtwgpv",
31164
- "--mly13n7235": "mlys5r2en",
31165
- $$css: true
31166
- }
31167
- };
31168
32558
  function useSearch(searchTerm, fieldPath) {
31169
32559
  const {
31170
32560
  topValues
@@ -31206,6 +32596,7 @@ function useSearch(searchTerm, fieldPath) {
31206
32596
  function ValueList({
31207
32597
  onClick,
31208
32598
  search,
32599
+ filter,
31209
32600
  fieldPath,
31210
32601
  ref,
31211
32602
  customStyle,
@@ -31214,7 +32605,7 @@ function ValueList({
31214
32605
  const {
31215
32606
  searchResults
31216
32607
  } = useSearch(search, fieldPath);
31217
- const stringSearchResults = useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults]);
32608
+ const stringSearchResults = useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).filter((r2) => filter ? filter(r2.fieldValue ?? "") : true).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults, filter]);
31218
32609
  return /* @__PURE__ */ jsx("div", {
31219
32610
  ref,
31220
32611
  ..._stylex.props(customStyle),
@@ -31425,7 +32816,8 @@ const StringFilterCore = ({
31425
32816
  }
31426
32817
  },
31427
32818
  customStyle: styles$i.valueList,
31428
- showPath: false
32819
+ showPath: false,
32820
+ filter: (value) => !currentFilter.values.includes(value)
31429
32821
  })
31430
32822
  })]
31431
32823
  }) : currentFilter.operator === "~" ? /* @__PURE__ */ jsx(StringEditor, {
@@ -31749,11 +33141,8 @@ function makeFilterWithNewType(filter, type) {
31749
33141
  }
31750
33142
  }
31751
33143
  function typeFromFilter(filter) {
31752
- if (filter.operator === "null" && filter.not) {
31753
- return "-null";
31754
- }
31755
- if (filter.operator === "before" && filter.not) {
31756
- return "not_before";
33144
+ if ((filter.operator === "null" || filter.operator === "after" || filter.operator === "before") && filter.not) {
33145
+ return `-${filter.operator}`;
31757
33146
  }
31758
33147
  return filter.operator;
31759
33148
  }
@@ -31762,7 +33151,7 @@ function unitsFromFilter(filter, isDateTime) {
31762
33151
  return filter.units;
31763
33152
  } else if (filter.operator === "to") {
31764
33153
  return guessUnits(filter.fromMoment, isDateTime);
31765
- } else if (filter.operator === "before" && filter.before.moment === "literal") {
33154
+ } else if (filter.operator === "before") {
31766
33155
  return guessUnits(filter.before, isDateTime);
31767
33156
  } else if (filter.operator === "after") {
31768
33157
  return guessUnits(filter.after, isDateTime);
@@ -31809,14 +33198,17 @@ const DateTimeFilterCore = ({
31809
33198
  value: "next",
31810
33199
  label: "next complete"
31811
33200
  }, {
31812
- value: "not_before",
31813
- label: "on or after"
33201
+ value: "-before",
33202
+ label: "starting"
31814
33203
  }, {
31815
33204
  value: "after",
31816
33205
  label: "after"
31817
33206
  }, {
31818
33207
  value: "before",
31819
33208
  label: "before"
33209
+ }, {
33210
+ value: "-after",
33211
+ label: "through"
31820
33212
  }, {
31821
33213
  value: "in",
31822
33214
  label: "is"
@@ -32133,6 +33525,11 @@ function dateTimeFilterChangeType(filter, type, units) {
32133
33525
  let n = "7";
32134
33526
  let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
32135
33527
  let toMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
33528
+ let not = false;
33529
+ if (type.startsWith("-")) {
33530
+ type = type.slice(1);
33531
+ not = true;
33532
+ }
32136
33533
  switch (filter.operator) {
32137
33534
  case "in_last":
32138
33535
  case "last":
@@ -32165,18 +33562,14 @@ function dateTimeFilterChangeType(filter, type, units) {
32165
33562
  case "after":
32166
33563
  return {
32167
33564
  operator: type,
32168
- after: fromMoment
33565
+ after: fromMoment,
33566
+ not
32169
33567
  };
32170
33568
  case "before":
32171
33569
  return {
32172
33570
  operator: type,
32173
- before: fromMoment
32174
- };
32175
- case "not_before":
32176
- return {
32177
- operator: "before",
32178
33571
  before: fromMoment,
32179
- not: true
33572
+ not
32180
33573
  };
32181
33574
  case "in":
32182
33575
  return {
@@ -32191,12 +33584,8 @@ function dateTimeFilterChangeType(filter, type, units) {
32191
33584
  };
32192
33585
  case "null":
32193
33586
  return {
32194
- operator: "null"
32195
- };
32196
- case "-null":
32197
- return {
32198
- operator: "null",
32199
- not: true
33587
+ operator: type,
33588
+ not
32200
33589
  };
32201
33590
  }
32202
33591
  return filter;
@@ -32448,7 +33837,7 @@ function FieldList({
32448
33837
  ..._stylex.props(customStyle),
32449
33838
  children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxs("div", {
32450
33839
  children: [/* @__PURE__ */ jsx("div", {
32451
- ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
33840
+ ..._stylex.props(addMenuStyles.item, styles$h.fieldItem, styles$h.sticky),
32452
33841
  "data-disabled": "true",
32453
33842
  children: group.name
32454
33843
  }), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsx(FilterPopover, {
@@ -32514,6 +33903,17 @@ const styles$h = {
32514
33903
  paddingTop: "mly1y1aw1k",
32515
33904
  paddingBottom: "mlywib8y2",
32516
33905
  $$css: true
33906
+ },
33907
+ sticky: {
33908
+ position: "mly7wzq59",
33909
+ top: "mly13vifvy",
33910
+ zIndex: "mly1vjfegm",
33911
+ backgroundColor: "mly9nb4jr",
33912
+ borderBottom: "mlyv3yj8d",
33913
+ borderBottomWidth: null,
33914
+ borderBottomStyle: null,
33915
+ borderBottomColor: null,
33916
+ $$css: true
32517
33917
  }
32518
33918
  };
32519
33919
  function FieldMenu({
@@ -32713,7 +34113,7 @@ function OperationActionTitle({
32713
34113
  return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
32714
34114
  };
32715
34115
  return /* @__PURE__ */ jsxs("div", {
32716
- ..._stylex.props(styles$s.title, hoverStyles.main),
34116
+ ..._stylex.props(styles$u.title, hoverStyles.main),
32717
34117
  children: [/* @__PURE__ */ jsx("div", {
32718
34118
  children: title
32719
34119
  }), /* @__PURE__ */ jsx("div", {
@@ -32746,308 +34146,6 @@ function OperationActionTitle({
32746
34146
  })]
32747
34147
  });
32748
34148
  }
32749
- var DIALOG_NAME = "Dialog";
32750
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
32751
- var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
32752
- var Dialog = (props2) => {
32753
- const {
32754
- __scopeDialog,
32755
- children,
32756
- open: openProp,
32757
- defaultOpen,
32758
- onOpenChange,
32759
- modal = true
32760
- } = props2;
32761
- const triggerRef = React.useRef(null);
32762
- const contentRef = React.useRef(null);
32763
- const [open = false, setOpen] = useControllableState({
32764
- prop: openProp,
32765
- defaultProp: defaultOpen,
32766
- onChange: onOpenChange
32767
- });
32768
- return /* @__PURE__ */ jsx(
32769
- DialogProvider,
32770
- {
32771
- scope: __scopeDialog,
32772
- triggerRef,
32773
- contentRef,
32774
- contentId: useId(),
32775
- titleId: useId(),
32776
- descriptionId: useId(),
32777
- open,
32778
- onOpenChange: setOpen,
32779
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
32780
- modal,
32781
- children
32782
- }
32783
- );
32784
- };
32785
- Dialog.displayName = DIALOG_NAME;
32786
- var TRIGGER_NAME$1 = "DialogTrigger";
32787
- var DialogTrigger = React.forwardRef(
32788
- (props2, forwardedRef) => {
32789
- const { __scopeDialog, ...triggerProps } = props2;
32790
- const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
32791
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
32792
- return /* @__PURE__ */ jsx(
32793
- Primitive.button,
32794
- {
32795
- type: "button",
32796
- "aria-haspopup": "dialog",
32797
- "aria-expanded": context.open,
32798
- "aria-controls": context.contentId,
32799
- "data-state": getState(context.open),
32800
- ...triggerProps,
32801
- ref: composedTriggerRef,
32802
- onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
32803
- }
32804
- );
32805
- }
32806
- );
32807
- DialogTrigger.displayName = TRIGGER_NAME$1;
32808
- var PORTAL_NAME = "DialogPortal";
32809
- var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
32810
- forceMount: void 0
32811
- });
32812
- var DialogPortal = (props2) => {
32813
- const { __scopeDialog, forceMount, children, container } = props2;
32814
- const context = useDialogContext(PORTAL_NAME, __scopeDialog);
32815
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container, children: child }) })) });
32816
- };
32817
- DialogPortal.displayName = PORTAL_NAME;
32818
- var OVERLAY_NAME = "DialogOverlay";
32819
- var DialogOverlay = React.forwardRef(
32820
- (props2, forwardedRef) => {
32821
- const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
32822
- const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
32823
- const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
32824
- return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
32825
- }
32826
- );
32827
- DialogOverlay.displayName = OVERLAY_NAME;
32828
- var DialogOverlayImpl = React.forwardRef(
32829
- (props2, forwardedRef) => {
32830
- const { __scopeDialog, ...overlayProps } = props2;
32831
- const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
32832
- return (
32833
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
32834
- // ie. when `Overlay` and `Content` are siblings
32835
- /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
32836
- Primitive.div,
32837
- {
32838
- "data-state": getState(context.open),
32839
- ...overlayProps,
32840
- ref: forwardedRef,
32841
- style: { pointerEvents: "auto", ...overlayProps.style }
32842
- }
32843
- ) })
32844
- );
32845
- }
32846
- );
32847
- var CONTENT_NAME$1 = "DialogContent";
32848
- var DialogContent = React.forwardRef(
32849
- (props2, forwardedRef) => {
32850
- const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
32851
- const { forceMount = portalContext.forceMount, ...contentProps } = props2;
32852
- const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
32853
- return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
32854
- }
32855
- );
32856
- DialogContent.displayName = CONTENT_NAME$1;
32857
- var DialogContentModal = React.forwardRef(
32858
- (props2, forwardedRef) => {
32859
- const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
32860
- const contentRef = React.useRef(null);
32861
- const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
32862
- React.useEffect(() => {
32863
- const content = contentRef.current;
32864
- if (content) return hideOthers(content);
32865
- }, []);
32866
- return /* @__PURE__ */ jsx(
32867
- DialogContentImpl,
32868
- {
32869
- ...props2,
32870
- ref: composedRefs,
32871
- trapFocus: context.open,
32872
- disableOutsidePointerEvents: true,
32873
- onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
32874
- var _a2;
32875
- event.preventDefault();
32876
- (_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
32877
- }),
32878
- onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
32879
- const originalEvent = event.detail.originalEvent;
32880
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
32881
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
32882
- if (isRightClick) event.preventDefault();
32883
- }),
32884
- onFocusOutside: composeEventHandlers(
32885
- props2.onFocusOutside,
32886
- (event) => event.preventDefault()
32887
- )
32888
- }
32889
- );
32890
- }
32891
- );
32892
- var DialogContentNonModal = React.forwardRef(
32893
- (props2, forwardedRef) => {
32894
- const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
32895
- const hasInteractedOutsideRef = React.useRef(false);
32896
- const hasPointerDownOutsideRef = React.useRef(false);
32897
- return /* @__PURE__ */ jsx(
32898
- DialogContentImpl,
32899
- {
32900
- ...props2,
32901
- ref: forwardedRef,
32902
- trapFocus: false,
32903
- disableOutsidePointerEvents: false,
32904
- onCloseAutoFocus: (event) => {
32905
- var _a2, _b2;
32906
- (_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
32907
- if (!event.defaultPrevented) {
32908
- if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
32909
- event.preventDefault();
32910
- }
32911
- hasInteractedOutsideRef.current = false;
32912
- hasPointerDownOutsideRef.current = false;
32913
- },
32914
- onInteractOutside: (event) => {
32915
- var _a2, _b2;
32916
- (_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
32917
- if (!event.defaultPrevented) {
32918
- hasInteractedOutsideRef.current = true;
32919
- if (event.detail.originalEvent.type === "pointerdown") {
32920
- hasPointerDownOutsideRef.current = true;
32921
- }
32922
- }
32923
- const target = event.target;
32924
- const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
32925
- if (targetIsTrigger) event.preventDefault();
32926
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
32927
- event.preventDefault();
32928
- }
32929
- }
32930
- }
32931
- );
32932
- }
32933
- );
32934
- var DialogContentImpl = React.forwardRef(
32935
- (props2, forwardedRef) => {
32936
- const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
32937
- const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
32938
- const contentRef = React.useRef(null);
32939
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
32940
- useFocusGuards();
32941
- return /* @__PURE__ */ jsxs(Fragment, { children: [
32942
- /* @__PURE__ */ jsx(
32943
- FocusScope,
32944
- {
32945
- asChild: true,
32946
- loop: true,
32947
- trapped: trapFocus,
32948
- onMountAutoFocus: onOpenAutoFocus,
32949
- onUnmountAutoFocus: onCloseAutoFocus,
32950
- children: /* @__PURE__ */ jsx(
32951
- DismissableLayer,
32952
- {
32953
- role: "dialog",
32954
- id: context.contentId,
32955
- "aria-describedby": context.descriptionId,
32956
- "aria-labelledby": context.titleId,
32957
- "data-state": getState(context.open),
32958
- ...contentProps,
32959
- ref: composedRefs,
32960
- onDismiss: () => context.onOpenChange(false)
32961
- }
32962
- )
32963
- }
32964
- ),
32965
- /* @__PURE__ */ jsxs(Fragment, { children: [
32966
- /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
32967
- /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
32968
- ] })
32969
- ] });
32970
- }
32971
- );
32972
- var TITLE_NAME = "DialogTitle";
32973
- var DialogTitle = React.forwardRef(
32974
- (props2, forwardedRef) => {
32975
- const { __scopeDialog, ...titleProps } = props2;
32976
- const context = useDialogContext(TITLE_NAME, __scopeDialog);
32977
- return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
32978
- }
32979
- );
32980
- DialogTitle.displayName = TITLE_NAME;
32981
- var DESCRIPTION_NAME = "DialogDescription";
32982
- var DialogDescription = React.forwardRef(
32983
- (props2, forwardedRef) => {
32984
- const { __scopeDialog, ...descriptionProps } = props2;
32985
- const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
32986
- return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
32987
- }
32988
- );
32989
- DialogDescription.displayName = DESCRIPTION_NAME;
32990
- var CLOSE_NAME = "DialogClose";
32991
- var DialogClose = React.forwardRef(
32992
- (props2, forwardedRef) => {
32993
- const { __scopeDialog, ...closeProps } = props2;
32994
- const context = useDialogContext(CLOSE_NAME, __scopeDialog);
32995
- return /* @__PURE__ */ jsx(
32996
- Primitive.button,
32997
- {
32998
- type: "button",
32999
- ...closeProps,
33000
- ref: forwardedRef,
33001
- onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
33002
- }
33003
- );
33004
- }
33005
- );
33006
- DialogClose.displayName = CLOSE_NAME;
33007
- function getState(open) {
33008
- return open ? "open" : "closed";
33009
- }
33010
- var TITLE_WARNING_NAME = "DialogTitleWarning";
33011
- var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
33012
- contentName: CONTENT_NAME$1,
33013
- titleName: TITLE_NAME,
33014
- docsSlug: "dialog"
33015
- });
33016
- var TitleWarning = ({ titleId }) => {
33017
- const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
33018
- const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
33019
-
33020
- If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
33021
-
33022
- For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
33023
- React.useEffect(() => {
33024
- if (titleId) {
33025
- const hasTitle = document.getElementById(titleId);
33026
- if (!hasTitle) console.error(MESSAGE);
33027
- }
33028
- }, [MESSAGE, titleId]);
33029
- return null;
33030
- };
33031
- var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
33032
- var DescriptionWarning = ({ contentRef, descriptionId }) => {
33033
- const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
33034
- const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
33035
- React.useEffect(() => {
33036
- var _a2;
33037
- const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
33038
- if (descriptionId && describedById) {
33039
- const hasDescription = document.getElementById(descriptionId);
33040
- if (!hasDescription) console.warn(MESSAGE);
33041
- }
33042
- }, [MESSAGE, contentRef, descriptionId]);
33043
- return null;
33044
- };
33045
- var Root = Dialog;
33046
- var Portal = DialogPortal;
33047
- var Overlay = DialogOverlay;
33048
- var Content$1 = DialogContent;
33049
- var Title = DialogTitle;
33050
- var Description = DialogDescription;
33051
34149
  function RenameDialog({
33052
34150
  rootQuery,
33053
34151
  view,
@@ -33081,29 +34179,19 @@ function RenameDialog({
33081
34179
  onOpenChange: setOpen,
33082
34180
  children: /* @__PURE__ */ jsx(Portal, {
33083
34181
  children: /* @__PURE__ */ jsx(Overlay, {
33084
- ...{
33085
- className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
33086
- },
34182
+ ..._stylex.props(dialogStyles.overlay),
33087
34183
  children: /* @__PURE__ */ jsxs(Content$1, {
33088
34184
  ..._stylex.props(dialogStyles.content, fontStyles.body),
33089
34185
  children: [/* @__PURE__ */ jsxs(Description, {
33090
- ...{
33091
- className: "mly1s85apg"
33092
- },
34186
+ ..._stylex.props(dialogStyles.displayNone),
33093
34187
  children: ["Rename ", target.name]
33094
34188
  }), /* @__PURE__ */ jsxs(Title, {
33095
- ...{
33096
- className: "mly1j61zf2 mly1ghz6dp"
33097
- },
34189
+ ..._stylex.props(dialogStyles.title),
33098
34190
  children: ["Rename ", target.name]
33099
34191
  }), /* @__PURE__ */ jsxs("div", {
33100
- ...{
33101
- className: "mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z"
33102
- },
34192
+ ..._stylex.props(dialogStyles.editor),
33103
34193
  children: [/* @__PURE__ */ jsxs("div", {
33104
- ...{
33105
- className: "mly78zum5 mly167g77z"
33106
- },
34194
+ ..._stylex.props(dialogStyles.editorRow),
33107
34195
  children: [/* @__PURE__ */ jsx("input", {
33108
34196
  value: name,
33109
34197
  onChange: (event) => setName(event.target.value),
@@ -33122,9 +34210,7 @@ function RenameDialog({
33122
34210
  errorMessage: "Name already in use"
33123
34211
  })]
33124
34212
  }), /* @__PURE__ */ jsxs("div", {
33125
- ...{
33126
- className: "mly78zum5 mly167g77z"
33127
- },
34213
+ ..._stylex.props(dialogStyles.editorRow),
33128
34214
  children: [/* @__PURE__ */ jsx(Button, {
33129
34215
  label: "Cancel",
33130
34216
  onClick: () => setOpen(false),
@@ -33143,92 +34229,6 @@ function RenameDialog({
33143
34229
  })
33144
34230
  });
33145
34231
  }
33146
- const dialogStyles = {
33147
- content: {
33148
- display: "mly78zum5",
33149
- flexDirection: "mlydt5ytf",
33150
- boxShadow: "mly5n1uv4",
33151
- backgroundColor: "mly12peec7",
33152
- borderRadius: "mlyur7f20",
33153
- borderStartStartRadius: null,
33154
- borderStartEndRadius: null,
33155
- borderEndStartRadius: null,
33156
- borderEndEndRadius: null,
33157
- borderTopLeftRadius: null,
33158
- borderTopRightRadius: null,
33159
- borderBottomLeftRadius: null,
33160
- borderBottomRightRadius: null,
33161
- padding: "mlye8ttls",
33162
- paddingInline: null,
33163
- paddingStart: null,
33164
- paddingLeft: null,
33165
- paddingEnd: null,
33166
- paddingRight: null,
33167
- paddingBlock: null,
33168
- paddingTop: null,
33169
- paddingBottom: null,
33170
- minWidth: "mlylm99nl",
33171
- maxWidth: "mly1jkqq1h",
33172
- gap: "mly167g77z",
33173
- rowGap: null,
33174
- columnGap: null,
33175
- $$css: true
33176
- },
33177
- editorCell: {
33178
- flexGrow: "mly1iyjqo2",
33179
- $$css: true
33180
- },
33181
- input: {
33182
- border: "mly2yh2zd",
33183
- borderWidth: null,
33184
- borderInlineWidth: null,
33185
- borderInlineStartWidth: null,
33186
- borderLeftWidth: null,
33187
- borderInlineEndWidth: null,
33188
- borderRightWidth: null,
33189
- borderBlockWidth: null,
33190
- borderTopWidth: null,
33191
- borderBottomWidth: null,
33192
- borderStyle: null,
33193
- borderInlineStyle: null,
33194
- borderInlineStartStyle: null,
33195
- borderLeftStyle: null,
33196
- borderInlineEndStyle: null,
33197
- borderRightStyle: null,
33198
- borderBlockStyle: null,
33199
- borderTopStyle: null,
33200
- borderBottomStyle: null,
33201
- borderColor: null,
33202
- borderInlineColor: null,
33203
- borderInlineStartColor: null,
33204
- borderLeftColor: null,
33205
- borderInlineEndColor: null,
33206
- borderRightColor: null,
33207
- borderBlockColor: null,
33208
- borderTopColor: null,
33209
- borderBottomColor: null,
33210
- color: "mlyizdh9v",
33211
- padding: "mly9cpjcd",
33212
- paddingInline: null,
33213
- paddingStart: null,
33214
- paddingLeft: null,
33215
- paddingEnd: null,
33216
- paddingRight: null,
33217
- paddingBlock: null,
33218
- paddingTop: null,
33219
- paddingBottom: null,
33220
- borderRadius: "mly1sxf85j",
33221
- borderStartStartRadius: null,
33222
- borderStartEndRadius: null,
33223
- borderEndStartRadius: null,
33224
- borderEndEndRadius: null,
33225
- borderTopLeftRadius: null,
33226
- borderTopRightRadius: null,
33227
- borderBottomLeftRadius: null,
33228
- borderBottomRightRadius: null,
33229
- $$css: true
33230
- }
33231
- };
33232
34232
  function SortableOperations({
33233
34233
  rootQuery,
33234
34234
  segment,
@@ -33290,7 +34290,7 @@ function SortableOperations({
33290
34290
  fields,
33291
34291
  ...props2
33292
34292
  }), /* @__PURE__ */ jsx("div", {
33293
- ..._stylex.props(styles$s.tokenContainer),
34293
+ ..._stylex.props(styles$u.tokenContainer),
33294
34294
  children: /* @__PURE__ */ jsx(DndContext, {
33295
34295
  sensors,
33296
34296
  collisionDetection: closestCenter,
@@ -33622,7 +34622,7 @@ const parsedToLabels = (parsed, filterString) => {
33622
34622
  const {
33623
34623
  not
33624
34624
  } = temporalClause;
33625
- op = `is${not ? " not" : ""} after`;
34625
+ op = not ? "through" : "is after";
33626
34626
  value = displayTimeFromMoment(temporalClause.after);
33627
34627
  }
33628
34628
  break;
@@ -33631,7 +34631,7 @@ const parsedToLabels = (parsed, filterString) => {
33631
34631
  const {
33632
34632
  not
33633
34633
  } = temporalClause;
33634
- op = not ? "is on or after" : "is before";
34634
+ op = not ? "starting" : "is before";
33635
34635
  value = displayTimeFromMoment(temporalClause.before);
33636
34636
  }
33637
34637
  break;
@@ -33715,10 +34715,10 @@ function FilterOperations({
33715
34715
  }
33716
34716
  return /* @__PURE__ */ jsxs("div", {
33717
34717
  children: [/* @__PURE__ */ jsx("div", {
33718
- ..._stylex.props(styles$s.title),
34718
+ ..._stylex.props(styles$u.title),
33719
34719
  children: "filter by"
33720
34720
  }), /* @__PURE__ */ jsx("div", {
33721
- ..._stylex.props(styles$s.tokenContainer),
34721
+ ..._stylex.props(styles$u.tokenContainer),
33722
34722
  children: filters.map((filterOperation, key2) => {
33723
34723
  return /* @__PURE__ */ jsx(ErrorElement, {
33724
34724
  fallback: /* @__PURE__ */ jsxs("div", {
@@ -33808,7 +34808,7 @@ function LimitOperation({
33808
34808
  }
33809
34809
  return /* @__PURE__ */ jsxs("div", {
33810
34810
  children: [/* @__PURE__ */ jsx("div", {
33811
- ..._stylex.props(styles$s.title),
34811
+ ..._stylex.props(styles$u.title),
33812
34812
  children: "limit"
33813
34813
  }), /* @__PURE__ */ jsxs("div", {
33814
34814
  ..._stylex.props(hoverStyles.main),
@@ -33858,10 +34858,10 @@ function OrderByOperations({
33858
34858
  }
33859
34859
  return /* @__PURE__ */ jsxs("div", {
33860
34860
  children: [/* @__PURE__ */ jsx("div", {
33861
- ..._stylex.props(styles$s.title),
34861
+ ..._stylex.props(styles$u.title),
33862
34862
  children: "order by"
33863
34863
  }), /* @__PURE__ */ jsx("div", {
33864
- ..._stylex.props(styles$s.tokenContainer),
34864
+ ..._stylex.props(styles$u.tokenContainer),
33865
34865
  children: orderBys.map((orderBy) => {
33866
34866
  const {
33867
34867
  fieldReference
@@ -34411,7 +35411,7 @@ function NestOperations({
34411
35411
  return null;
34412
35412
  }
34413
35413
  return /* @__PURE__ */ jsx("div", {
34414
- ..._stylex.props(styles$s.tokenContainer),
35414
+ ..._stylex.props(styles$u.tokenContainer),
34415
35415
  children: nests.map((nest) => /* @__PURE__ */ jsx(NestOperation, {
34416
35416
  rootQuery,
34417
35417
  view,
@@ -34744,9 +35744,9 @@ function Source({
34744
35744
  }) {
34745
35745
  if (rootQuery.definition instanceof ASTArrowQueryDefinition) {
34746
35746
  return /* @__PURE__ */ jsx("div", {
34747
- ..._stylex.props(styles$s.queryCard, styles$b.content),
35747
+ ..._stylex.props(styles$u.queryCard, styles$b.content),
34748
35748
  children: /* @__PURE__ */ jsxs("div", {
34749
- ..._stylex.props(styles$s.labelWithIcon),
35749
+ ..._stylex.props(styles$u.labelWithIcon),
34750
35750
  children: [/* @__PURE__ */ jsx(Icon, {
34751
35751
  name: "database"
34752
35752
  }), /* @__PURE__ */ jsx("div", {
@@ -36371,7 +37371,10 @@ function FieldTokenWithActions({
36371
37371
  disabled: !!filterDisabledReason,
36372
37372
  onTooltipOpenChange: setIsTooltipOpen
36373
37373
  }),
36374
- onOpenChange: setIsFilterPopoverOpen
37374
+ onOpenChange: setIsFilterPopoverOpen,
37375
+ layoutProps: {
37376
+ align: "start"
37377
+ }
36375
37378
  }), /* @__PURE__ */ jsx(ActionButton, {
36376
37379
  icon: "orderBy",
36377
37380
  tooltip: orderByDisabledReason || "Add as order by",
@@ -36396,7 +37399,10 @@ function FieldTokenWithActions({
36396
37399
  disabled: !!filterDisabledReason,
36397
37400
  onTooltipOpenChange: setIsTooltipOpen
36398
37401
  }),
36399
- onOpenChange: setIsFilterPopoverOpen
37402
+ onOpenChange: setIsFilterPopoverOpen,
37403
+ layoutProps: {
37404
+ align: "start"
37405
+ }
36400
37406
  }), /* @__PURE__ */ jsx(ActionButton, {
36401
37407
  icon: "orderBy",
36402
37408
  tooltip: orderByDisabledReason || "Add as order by",