@uniformdev/mesh-sdk-react 19.38.3-alpha.70 → 19.38.3-alpha.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -33,9 +33,9 @@ var src_exports = {};
33
33
  __export(src_exports, {
34
34
  $createVariableNode: () => $createVariableNode,
35
35
  $isVariableNode: () => $isVariableNode,
36
- AddListButton: () => import_design_system39.AddListButton,
37
- Button: () => import_design_system39.Button,
38
- Callout: () => import_design_system39.Callout,
36
+ AddListButton: () => import_design_system40.AddListButton,
37
+ Button: () => import_design_system40.Button,
38
+ Callout: () => import_design_system40.Callout,
39
39
  ControlledValuePlugin: () => ControlledValuePlugin,
40
40
  DamSelectedItem: () => DamSelectedItem,
41
41
  DataRefreshButton: () => DataRefreshButton,
@@ -46,24 +46,24 @@ __export(src_exports, {
46
46
  DataTypeEditor: () => DataTypeEditor,
47
47
  DefaultSearchRow: () => DefaultSearchRow,
48
48
  DefaultSelectedItem: () => DefaultSelectedItem,
49
- DrawerContent: () => import_design_system39.DrawerContent,
49
+ DrawerContent: () => import_design_system40.DrawerContent,
50
50
  EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
51
51
  EntrySearch: () => EntrySearch,
52
- Heading: () => import_design_system39.Heading,
52
+ Heading: () => import_design_system40.Heading,
53
53
  INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
54
54
  Icons: () => icons_exports,
55
- Input: () => import_design_system39.Input,
56
- InputComboBox: () => import_design_system39.InputComboBox,
57
- InputKeywordSearch: () => import_design_system39.InputKeywordSearch,
58
- InputSelect: () => import_design_system39.InputSelect,
59
- InputToggle: () => import_design_system39.InputToggle,
55
+ Input: () => import_design_system40.Input,
56
+ InputComboBox: () => import_design_system40.InputComboBox,
57
+ InputKeywordSearch: () => import_design_system40.InputKeywordSearch,
58
+ InputSelect: () => import_design_system40.InputSelect,
59
+ InputToggle: () => import_design_system40.InputToggle,
60
60
  InputVariables: () => InputVariables,
61
- Label: () => import_design_system39.Label,
61
+ Label: () => import_design_system40.Label,
62
62
  LinkButton: () => LinkButton,
63
- LoadingIndicator: () => import_design_system39.LoadingIndicator,
64
- LoadingOverlay: () => import_design_system39.LoadingOverlay,
65
- Menu: () => import_design_system39.Menu,
66
- MenuItem: () => import_design_system39.MenuItem,
63
+ LoadingIndicator: () => import_design_system40.LoadingIndicator,
64
+ LoadingOverlay: () => import_design_system40.LoadingOverlay,
65
+ Menu: () => import_design_system40.Menu,
66
+ MenuItem: () => import_design_system40.MenuItem,
67
67
  MeshApp: () => MeshApp,
68
68
  OPEN_INSERT_VARIABLE_COMMAND: () => OPEN_INSERT_VARIABLE_COMMAND,
69
69
  ObjectSearchContainer: () => ObjectSearchContainer,
@@ -77,22 +77,22 @@ __export(src_exports, {
77
77
  ObjectSearchResultList: () => ObjectSearchResultList,
78
78
  ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
79
79
  ParameterConnectionIndicator: () => ParameterConnectionIndicator,
80
- ParameterGroup: () => import_design_system39.ParameterGroup,
81
- ParameterImage: () => import_design_system39.ParameterImage,
82
- ParameterImageInner: () => import_design_system39.ParameterImageInner,
83
- ParameterInput: () => import_design_system39.ParameterInput,
84
- ParameterInputInner: () => import_design_system39.ParameterInputInner,
85
- ParameterLabel: () => import_design_system39.ParameterLabel,
86
- ParameterMenuButton: () => import_design_system39.ParameterMenuButton,
80
+ ParameterGroup: () => import_design_system40.ParameterGroup,
81
+ ParameterImage: () => import_design_system40.ParameterImage,
82
+ ParameterImageInner: () => import_design_system40.ParameterImageInner,
83
+ ParameterInput: () => import_design_system40.ParameterInput,
84
+ ParameterInputInner: () => import_design_system40.ParameterInputInner,
85
+ ParameterLabel: () => import_design_system40.ParameterLabel,
86
+ ParameterMenuButton: () => import_design_system40.ParameterMenuButton,
87
87
  ParameterOrSingleVariable: () => ParameterOrSingleVariable,
88
- ParameterSelect: () => import_design_system39.ParameterSelect,
89
- ParameterSelectInner: () => import_design_system39.ParameterSelectInner,
90
- ParameterShell: () => import_design_system39.ParameterShell,
88
+ ParameterSelect: () => import_design_system40.ParameterSelect,
89
+ ParameterSelectInner: () => import_design_system40.ParameterSelectInner,
90
+ ParameterShell: () => import_design_system40.ParameterShell,
91
91
  ParameterShellContext: () => import_design_system14.ParameterShellContext,
92
- ParameterTextarea: () => import_design_system39.ParameterTextarea,
93
- ParameterTextareaInner: () => import_design_system39.ParameterTextareaInner,
94
- ParameterToggle: () => import_design_system39.ParameterToggle,
95
- ParameterToggleInner: () => import_design_system39.ParameterToggleInner,
92
+ ParameterTextarea: () => import_design_system40.ParameterTextarea,
93
+ ParameterTextareaInner: () => import_design_system40.ParameterTextareaInner,
94
+ ParameterToggle: () => import_design_system40.ParameterToggle,
95
+ ParameterToggleInner: () => import_design_system40.ParameterToggleInner,
96
96
  ParameterVariables: () => ParameterVariables,
97
97
  ProductPreviewList: () => ProductPreviewList,
98
98
  ProductQuery: () => ProductQuery,
@@ -111,13 +111,13 @@ __export(src_exports, {
111
111
  RequestUrl: () => RequestUrl,
112
112
  RequestUrlInput: () => RequestUrlInput,
113
113
  ResolvableLoadingValue: () => ResolvableLoadingValue,
114
- ScrollableList: () => import_design_system39.ScrollableList,
115
- ScrollableListItem: () => import_design_system39.ScrollableListItem,
114
+ ScrollableList: () => import_design_system40.ScrollableList,
115
+ ScrollableListItem: () => import_design_system40.ScrollableListItem,
116
116
  SelectionField: () => SelectionField,
117
- Switch: () => import_design_system39.Switch,
117
+ Switch: () => import_design_system40.Switch,
118
118
  TextVariableRenderer: () => TextVariableRenderer,
119
- Textarea: () => import_design_system39.Textarea,
120
- Theme: () => import_design_system39.Theme,
119
+ Textarea: () => import_design_system40.Textarea,
120
+ Theme: () => import_design_system40.Theme,
121
121
  VariableEditor: () => VariableEditor,
122
122
  VariableNode: () => VariableNode,
123
123
  VariablesList: () => VariablesList,
@@ -478,8 +478,8 @@ var import_react_use = require("react-use");
478
478
 
479
479
  // src/components/commerce/SelectionField.tsx
480
480
  var import_react3 = require("@emotion/react");
481
+ var import_CgClose = require("@react-icons/all-files/cg/CgClose");
481
482
  var import_design_system = require("@uniformdev/design-system");
482
- var import_cg = require("react-icons/cg");
483
483
 
484
484
  // src/components/commerce/ResolvableLoadingValue.tsx
485
485
  var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
@@ -578,7 +578,7 @@ var SelectionField = ({
578
578
  css: selectionFieldBtn,
579
579
  title: "remove",
580
580
  onClick: (e) => handleRemoveClick(e, selectedValue),
581
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system.Icon, { icon: import_cg.CgClose, iconColor: "currentColor", size: 20 })
581
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system.Icon, { icon: import_CgClose.CgClose, iconColor: "currentColor", size: 20 })
582
582
  }
583
583
  )
584
584
  ] }, selectedValue);
@@ -1288,9 +1288,10 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
1288
1288
 
1289
1289
  // src/components/legacy/EntrySearch/DefaultSelectedItem.tsx
1290
1290
  var import_react12 = require("@emotion/react");
1291
+ var import_CgClose2 = require("@react-icons/all-files/cg/CgClose");
1292
+ var import_CgInfo = require("@react-icons/all-files/cg/CgInfo");
1291
1293
  var import_design_system6 = require("@uniformdev/design-system");
1292
1294
  var import_react13 = require("react");
1293
- var import_cg2 = require("react-icons/cg");
1294
1295
  var import_timeago = require("timeago.js");
1295
1296
 
1296
1297
  // src/utils/openWindowWithCloseCallback.ts
@@ -1440,7 +1441,7 @@ var DefaultSelectedItem = ({
1440
1441
  children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1441
1442
  import_design_system6.Icon,
1442
1443
  {
1443
- icon: import_cg2.CgInfo,
1444
+ icon: import_CgInfo.CgInfo,
1444
1445
  iconColor: "gray",
1445
1446
  size: 24,
1446
1447
  css: import_react12.css`
@@ -1563,7 +1564,7 @@ var DefaultSelectedItem = ({
1563
1564
  css: selectItemLinkBtn,
1564
1565
  children: [
1565
1566
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: selectItemSmallText, children: "Unlink" }),
1566
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system6.Icon, { icon: import_cg2.CgClose, iconColor: "red", size: 16 })
1567
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system6.Icon, { icon: import_CgClose2.CgClose, iconColor: "red", size: 16 })
1567
1568
  ]
1568
1569
  }
1569
1570
  )
@@ -2238,8 +2239,8 @@ function ProductSearchRow({
2238
2239
 
2239
2240
  // src/components/commerce/ProductSelectedItem.tsx
2240
2241
  var import_react20 = require("@emotion/react");
2242
+ var import_CgClose3 = require("@react-icons/all-files/cg/CgClose");
2241
2243
  var import_design_system9 = require("@uniformdev/design-system");
2242
- var import_cg3 = require("react-icons/cg");
2243
2244
 
2244
2245
  // src/components/commerce/styles/ProductSelectedItem.styles.ts
2245
2246
  var import_react19 = require("@emotion/react");
@@ -2433,7 +2434,7 @@ function ProductSelectedItem({
2433
2434
  css: productedSelectedItemLinkBtn,
2434
2435
  children: [
2435
2436
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
2436
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system9.Icon, { icon: import_cg3.CgClose, iconColor: "red", size: 16 })
2437
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system9.Icon, { icon: import_CgClose3.CgClose, iconColor: "red", size: 16 })
2437
2438
  ]
2438
2439
  }
2439
2440
  )
@@ -2550,9 +2551,10 @@ var useProductSearchContext = () => {
2550
2551
 
2551
2552
  // src/components/dam/DamSelectedItem.tsx
2552
2553
  var import_react23 = require("@emotion/react");
2554
+ var import_CgClose4 = require("@react-icons/all-files/cg/CgClose");
2555
+ var import_CgInfo2 = require("@react-icons/all-files/cg/CgInfo");
2553
2556
  var import_design_system12 = require("@uniformdev/design-system");
2554
2557
  var import_react24 = require("react");
2555
- var import_cg4 = require("react-icons/cg");
2556
2558
  var import_timeago2 = require("timeago.js");
2557
2559
 
2558
2560
  // src/components/dam/DamSelectedItem.styles.ts
@@ -2703,7 +2705,7 @@ function DamSelectedItem({
2703
2705
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2704
2706
  import_design_system12.Icon,
2705
2707
  {
2706
- icon: import_cg4.CgInfo,
2708
+ icon: import_CgInfo2.CgInfo,
2707
2709
  iconColor: "gray",
2708
2710
  size: 24,
2709
2711
  css: import_react23.css`
@@ -2770,7 +2772,7 @@ function DamSelectedItem({
2770
2772
  css: damSelectedItemLinkBtn,
2771
2773
  children: [
2772
2774
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { css: damSelectedItemSmallText, children: "Unlink" }),
2773
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_design_system12.Icon, { icon: import_cg4.CgClose, iconColor: "red", size: 16 })
2775
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_design_system12.Icon, { icon: import_CgClose4.CgClose, iconColor: "red", size: 16 })
2774
2776
  ]
2775
2777
  }
2776
2778
  )
@@ -2974,6 +2976,7 @@ var import_design_system14 = require("@uniformdev/design-system");
2974
2976
 
2975
2977
  // src/components/Variables/composer/ControlledValuePlugin.tsx
2976
2978
  var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
2979
+ var import_lite = require("dequal/lite");
2977
2980
  var import_react30 = require("react");
2978
2981
 
2979
2982
  // src/components/Variables/util/deserializeVariablesEditorState.ts
@@ -3085,12 +3088,17 @@ function ControlledValuePlugin({
3085
3088
  extraDependencies
3086
3089
  }) {
3087
3090
  const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
3091
+ const lastValueRef = (0, import_react30.useRef)(value);
3088
3092
  (0, import_react30.useEffect)(() => {
3089
3093
  if (!enabled) {
3090
3094
  return;
3091
3095
  }
3096
+ if ((0, import_lite.dequal)(lastValueRef.current, value)) {
3097
+ return;
3098
+ }
3092
3099
  setTimeout(() => {
3093
3100
  if (editor) {
3101
+ lastValueRef.current = value;
3094
3102
  setVariablesEditorValue(editor, value);
3095
3103
  }
3096
3104
  });
@@ -3104,8 +3112,9 @@ var import_useLexicalNodeSelection = require("@lexical/react/useLexicalNodeSelec
3104
3112
  var import_selection = require("@lexical/selection");
3105
3113
  var import_utils = require("@lexical/utils");
3106
3114
  var import_canvas3 = require("@uniformdev/canvas");
3115
+ var import_design_system18 = require("@uniformdev/design-system");
3107
3116
  var import_lexical4 = require("lexical");
3108
- var import_react37 = require("react");
3117
+ var import_react38 = require("react");
3109
3118
 
3110
3119
  // src/components/Variables/util/prettifyBindExpression.tsx
3111
3120
  function prettifyBindExpression(bindExpression) {
@@ -3123,7 +3132,8 @@ function VariableChip({
3123
3132
  reference,
3124
3133
  onClick,
3125
3134
  isFresh,
3126
- selected
3135
+ selected,
3136
+ disabled
3127
3137
  }) {
3128
3138
  const hasClickEvent = !!onClick;
3129
3139
  const referenceIsValidFr = isFresh ? true : referenceIsValid;
@@ -3137,6 +3147,7 @@ function VariableChip({
3137
3147
  ${extraTitle}` : ""}` : extraTitle,
3138
3148
  onClick,
3139
3149
  "aria-selected": selected ? true : void 0,
3150
+ "aria-disabled": disabled,
3140
3151
  children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Wrapper, { children: displayName || reference })
3141
3152
  }
3142
3153
  );
@@ -3169,16 +3180,16 @@ function InfoVariableReference({ children }) {
3169
3180
  }
3170
3181
 
3171
3182
  // src/components/Variables/composer/VariablesPlugin.tsx
3172
- var import_react35 = require("@emotion/react");
3183
+ var import_react36 = require("@emotion/react");
3173
3184
  var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
3174
3185
  var import_LexicalTypeaheadMenuPlugin = require("@lexical/react/LexicalTypeaheadMenuPlugin");
3186
+ var import_AiFillPlusCircle = require("@react-icons/all-files/ai/AiFillPlusCircle");
3175
3187
  var import_canvas2 = require("@uniformdev/canvas");
3176
3188
  var import_design_system17 = require("@uniformdev/design-system");
3177
- var import_lite = require("dequal/lite");
3189
+ var import_lite2 = require("dequal/lite");
3178
3190
  var import_lexical3 = require("lexical");
3179
- var import_react36 = require("react");
3191
+ var import_react37 = require("react");
3180
3192
  var import_react_dom = require("react-dom");
3181
- var import_ai = require("react-icons/ai");
3182
3193
 
3183
3194
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
3184
3195
  var import_react32 = require("@emotion/react");
@@ -3210,11 +3221,11 @@ var variablesTipText = import_react32.css`
3210
3221
  `;
3211
3222
 
3212
3223
  // src/components/Variables/useOnVariableUpdated.ts
3213
- var import_react34 = require("react");
3224
+ var import_react35 = require("react");
3214
3225
 
3215
3226
  // src/components/Variables/VariablesProvider.tsx
3216
3227
  var import_mitt = __toESM(require("mitt"));
3217
- var React10 = __toESM(require("react"));
3228
+ var import_react34 = require("react");
3218
3229
 
3219
3230
  // src/components/Variables/VariableEditor.tsx
3220
3231
  var import_zod = require("@hookform/resolvers/zod");
@@ -3325,61 +3336,71 @@ function VariableEditor({ variable, onSubmit, onCancel, disableMeshTip }) {
3325
3336
 
3326
3337
  // src/components/Variables/VariablesProvider.tsx
3327
3338
  var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
3328
- var VariablesContext = React10.createContext(null);
3339
+ var VariablesContext = (0, import_react34.createContext)(null);
3329
3340
  function VariablesProvider({
3330
3341
  value,
3331
3342
  onChange,
3332
3343
  editVariableComponent,
3333
3344
  readOnly,
3345
+ isLoading,
3334
3346
  children,
3335
3347
  knownUndefinedValues = {}
3336
3348
  }) {
3337
- const [editing, setEditing] = React10.useState();
3338
- const [editingContext, setEditingContext] = React10.useState();
3339
- const events = React10.useMemo(() => (0, import_mitt.default)(), []);
3349
+ const [editing, setEditing] = (0, import_react34.useState)();
3350
+ const [editingContext, setEditingContext] = (0, import_react34.useState)();
3351
+ const events = (0, import_react34.useMemo)(() => (0, import_mitt.default)(), []);
3340
3352
  if (!readOnly && !onChange) {
3341
3353
  throw new Error("onChange must be provided when readOnly is false");
3342
3354
  }
3343
3355
  const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
3344
- const contextValue = {
3345
- flatVariables: flattenVariables(value),
3346
- dispatch: (event) => {
3347
- if (readOnly) {
3348
- console.warn(
3349
- `Received ignored mutation event in read-only variables context: ${JSON.stringify(event)}`
3350
- );
3351
- return;
3352
- }
3353
- if (event.type === "set") {
3354
- const { name, ...varValue } = event.variable;
3355
- onChange == null ? void 0 : onChange({ ...contextValue.variables, [event.variable.name]: varValue });
3356
- if (event.openEditor) {
3357
- setEditing(event.variable.name);
3356
+ const valueBasedContextValue = (0, import_react34.useMemo)(
3357
+ () => ({
3358
+ flatVariables: flattenVariables(value),
3359
+ dispatch: (event) => {
3360
+ if (readOnly) {
3361
+ console.warn(
3362
+ `Received ignored mutation event in read-only variables context: ${JSON.stringify(event)}`
3363
+ );
3364
+ return;
3365
+ }
3366
+ if (event.type === "set") {
3367
+ const { name, ...varValue } = event.variable;
3368
+ onChange == null ? void 0 : onChange({ ...value, [event.variable.name]: varValue });
3369
+ if (event.openEditor) {
3370
+ setEditing(event.variable.name);
3371
+ setEditingContext(event.context);
3372
+ }
3373
+ } else if (event.type === "edit") {
3374
+ setEditing(event.variable);
3358
3375
  setEditingContext(event.context);
3376
+ } else if (event.type === "remove") {
3377
+ const newValue = { ...value };
3378
+ delete newValue[event.variable];
3379
+ onChange == null ? void 0 : onChange(newValue);
3380
+ } else if (event.type === "reorder") {
3381
+ onChange == null ? void 0 : onChange(event.result);
3382
+ } else if (event.type === "cancelEdit") {
3383
+ setEditing(void 0);
3384
+ setEditingContext(void 0);
3385
+ } else {
3386
+ throw new Error(`Unknown event ${JSON.stringify(event)}`);
3359
3387
  }
3360
- } else if (event.type === "edit") {
3361
- setEditing(event.variable);
3362
- setEditingContext(event.context);
3363
- } else if (event.type === "remove") {
3364
- const newValue = { ...value };
3365
- delete newValue[event.variable];
3366
- onChange == null ? void 0 : onChange(newValue);
3367
- } else if (event.type === "reorder") {
3368
- onChange == null ? void 0 : onChange(event.result);
3369
- } else if (event.type === "cancelEdit") {
3370
- setEditing(void 0);
3371
- setEditingContext(void 0);
3372
- } else {
3373
- throw new Error(`Unknown event ${JSON.stringify(event)}`);
3374
- }
3375
- },
3376
- variables: value,
3377
- isEditing: typeof editing !== "undefined",
3378
- events,
3379
- canDispatch: true,
3380
- readOnly,
3381
- knownUndefinedValues
3382
- };
3388
+ },
3389
+ variables: value,
3390
+ readOnly
3391
+ }),
3392
+ [onChange, readOnly, value]
3393
+ );
3394
+ const contextValue = (0, import_react34.useMemo)(() => {
3395
+ return {
3396
+ ...valueBasedContextValue,
3397
+ isEditing: typeof editing !== "undefined",
3398
+ events,
3399
+ canDispatch: true,
3400
+ knownUndefinedValues,
3401
+ isLoading: !!isLoading
3402
+ };
3403
+ }, [editing, events, knownUndefinedValues, valueBasedContextValue, isLoading]);
3383
3404
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(VariablesContext.Provider, { value: contextValue, children: [
3384
3405
  children,
3385
3406
  typeof editing !== "undefined" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
@@ -3402,7 +3423,7 @@ function VariablesProvider({
3402
3423
  ] });
3403
3424
  }
3404
3425
  function useVariables(returnEmptyWithoutProvider = false) {
3405
- const context = React10.useContext(VariablesContext);
3426
+ const context = (0, import_react34.useContext)(VariablesContext);
3406
3427
  if (!context) {
3407
3428
  if (returnEmptyWithoutProvider) {
3408
3429
  return {
@@ -3414,7 +3435,8 @@ function useVariables(returnEmptyWithoutProvider = false) {
3414
3435
  isEditing: false,
3415
3436
  variables: {},
3416
3437
  knownUndefinedValues: {},
3417
- canDispatch: false
3438
+ canDispatch: false,
3439
+ isLoading: false
3418
3440
  };
3419
3441
  }
3420
3442
  throw new Error("No VariablesProvider present");
@@ -3432,7 +3454,7 @@ function flattenVariables(variables) {
3432
3454
  // src/components/Variables/useOnVariableUpdated.ts
3433
3455
  function useOnVariableUpdated(fn, disabled) {
3434
3456
  const { variables, events, canDispatch } = useVariables(true);
3435
- (0, import_react34.useEffect)(() => {
3457
+ (0, import_react35.useEffect)(() => {
3436
3458
  if (disabled || !canDispatch) {
3437
3459
  return;
3438
3460
  }
@@ -3516,7 +3538,7 @@ function useVariablesMenu({
3516
3538
  getEditorContext
3517
3539
  }) {
3518
3540
  const { variables, canDispatch, readOnly } = useVariables(true);
3519
- const canEditVariable = (0, import_react36.useCallback)(
3541
+ const canEditVariable = (0, import_react37.useCallback)(
3520
3542
  (name, variable) => (
3521
3543
  // name === '' means new var. Add var perms computed by menu options.
3522
3544
  name === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -3524,7 +3546,7 @@ function useVariablesMenu({
3524
3546
  [canDispatch, enableEditingVariables, readOnly]
3525
3547
  );
3526
3548
  const canAddVariable = canDispatch && showAddVariableMenuOption && !readOnly;
3527
- const { groupedVariables, menuOptions } = (0, import_react36.useMemo)(() => {
3549
+ const { groupedVariables, menuOptions } = (0, import_react37.useMemo)(() => {
3528
3550
  const groupedVariables2 = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
3529
3551
  if (canAddVariable) {
3530
3552
  groupedVariables2.unshift({
@@ -3546,7 +3568,7 @@ function useVariablesMenu({
3546
3568
  );
3547
3569
  return { menuOptions: menuOptions2, groupedVariables: groupedVariables2 };
3548
3570
  }, [variables, filterVariable, getEditorContext, canAddVariable, showAddVariableMenuOption]);
3549
- const onSelect = (0, import_react36.useCallback)(
3571
+ const onSelect = (0, import_react37.useCallback)(
3550
3572
  ({ queryString, value, nodeToReplace, editor, overwriteExistingValue }) => {
3551
3573
  if (value === ADD_VARIABLE_OPTION) {
3552
3574
  editor.update(() => {
@@ -3569,7 +3591,8 @@ function useVariablesMenu({
3569
3591
  hasClickEvent: canEditVariable(value, targetVariable),
3570
3592
  referenceIsValid: true,
3571
3593
  tooltip: (_a = targetVariable == null ? void 0 : targetVariable.tooltip) != null ? _a : targetVariable == null ? void 0 : targetVariable.helpText,
3572
- isFresh: true
3594
+ isFresh: true,
3595
+ isLoading: false
3573
3596
  });
3574
3597
  if (nodeToReplace) {
3575
3598
  nodeToReplace.replace(variableNode);
@@ -3592,17 +3615,17 @@ function VariablesPlugin({
3592
3615
  filterVariable
3593
3616
  }) {
3594
3617
  const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
3595
- const { variables, dispatch, isEditing, canDispatch, readOnly, knownUndefinedValues } = useVariables(true);
3596
- const variablesRef = (0, import_react36.useRef)({ variables, knownUndefinedValues });
3597
- variablesRef.current = { variables, knownUndefinedValues };
3598
- const canEditVariable = (0, import_react36.useCallback)(
3618
+ const { variables, dispatch, isEditing, canDispatch, readOnly, knownUndefinedValues, isLoading } = useVariables(true);
3619
+ const variablesRef = (0, import_react37.useRef)({ variables, knownUndefinedValues, isLoading });
3620
+ variablesRef.current = { variables, knownUndefinedValues, isLoading };
3621
+ const canEditVariable = (0, import_react37.useCallback)(
3599
3622
  (name, variable) => (
3600
3623
  // name === '' means new var. Add var perms computed by menu options.
3601
3624
  name === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
3602
3625
  ),
3603
3626
  [canDispatch, enableEditingVariables, readOnly]
3604
3627
  );
3605
- const [editingKey, setEditingKey] = (0, import_react36.useState)(null);
3628
+ const [editingKey, setEditingKey] = (0, import_react37.useState)(null);
3606
3629
  useOnVariableUpdated(({ name, latestValue }) => {
3607
3630
  editor.update(() => {
3608
3631
  var _a;
@@ -3618,18 +3641,18 @@ function VariablesPlugin({
3618
3641
  });
3619
3642
  });
3620
3643
  }, editingKey === null);
3621
- (0, import_react36.useEffect)(() => {
3644
+ (0, import_react37.useEffect)(() => {
3622
3645
  if (editingKey !== null && !isEditing) {
3623
3646
  setEditingKey(null);
3624
3647
  }
3625
3648
  }, [editingKey, isEditing]);
3626
- const [queryString, setQueryString] = (0, import_react36.useState)(null);
3649
+ const [queryString, setQueryString] = (0, import_react37.useState)(null);
3627
3650
  const { groupedVariables, menuOptions, onSelect } = useVariablesMenu({
3628
3651
  showAddVariableMenuOption,
3629
3652
  filterVariable,
3630
3653
  getEditorContext
3631
3654
  });
3632
- const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react36.useMemo)(() => {
3655
+ const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react37.useMemo)(() => {
3633
3656
  if (!queryString) {
3634
3657
  return {
3635
3658
  filteredGroupedVariables: groupedVariables,
@@ -3649,7 +3672,7 @@ function VariablesPlugin({
3649
3672
  )
3650
3673
  };
3651
3674
  }, [queryString, groupedVariables, menuOptions]);
3652
- const onSelectOption = (0, import_react36.useCallback)(
3675
+ const onSelectOption = (0, import_react37.useCallback)(
3653
3676
  (selectedOption, nodeToReplace, closeMenu) => {
3654
3677
  if (selectedOption.key === ADD_VARIABLE_OPTION) {
3655
3678
  setEditingKey(void 0);
@@ -3665,7 +3688,7 @@ function VariablesPlugin({
3665
3688
  },
3666
3689
  [editor, onSelect, queryString, replaceValueOnVariableInsert]
3667
3690
  );
3668
- (0, import_react36.useEffect)(() => {
3691
+ (0, import_react37.useEffect)(() => {
3669
3692
  editor.registerCommand(
3670
3693
  EDIT_VARIABLE_COMMAND,
3671
3694
  ({ reference, sourceKey }) => {
@@ -3703,7 +3726,8 @@ function VariablesPlugin({
3703
3726
  hasClickEvent: canEditVariable(reference, targetVariable),
3704
3727
  referenceIsValid: true,
3705
3728
  tooltip: (_a = targetVariable == null ? void 0 : targetVariable.tooltip) != null ? _a : targetVariable == null ? void 0 : targetVariable.helpText,
3706
- isFresh: true
3729
+ isFresh: true,
3730
+ isLoading: false
3707
3731
  });
3708
3732
  if (targetKey) {
3709
3733
  (_b = (0, import_lexical3.$getNodeByKey)(targetKey)) == null ? void 0 : _b.replace(variableNode);
@@ -3716,35 +3740,38 @@ function VariablesPlugin({
3716
3740
  import_lexical3.COMMAND_PRIORITY_NORMAL
3717
3741
  );
3718
3742
  }, [editor, disableVariables, canDispatch, dispatch, canEditVariable, readOnly, getEditorContext]);
3719
- const updateExistingNodeIfChanged = (0, import_react36.useCallback)(
3743
+ const updateExistingNodeIfChanged = (0, import_react37.useCallback)(
3720
3744
  (variableNode) => {
3721
3745
  var _a, _b, _c;
3722
3746
  const targetVar = variablesRef.current.variables[variableNode.reference];
3723
3747
  const targetUndefinedVar = variablesRef.current.knownUndefinedValues[variableNode.reference];
3748
+ const isLoadingVariables = variablesRef.current.isLoading;
3724
3749
  const tooltip = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
3725
3750
  const currentState = variableNode.getState();
3726
3751
  const newState = {
3727
3752
  ...currentState,
3728
- // if we lose a display name we 'latch' it to last known (prevents flashes during mesh var updates)
3729
- displayName: (targetVar == null ? void 0 : targetVar.displayName) || currentState.displayName || variableNode.reference,
3753
+ // if we lose a display name we 'latch' it to last known (prevents flashes during mesh var updates),
3754
+ // unless we're also loading the whole var state
3755
+ displayName: (targetVar == null ? void 0 : targetVar.displayName) || (isLoadingVariables ? void 0 : currentState.displayName) || variableNode.reference,
3756
+ isLoading: isLoadingVariables && !targetVar && !(targetUndefinedVar == null ? void 0 : targetUndefinedVar.info),
3730
3757
  hasClickEvent: canEditVariable(variableNode.reference, targetVar),
3731
- referenceIsValid: (targetUndefinedVar == null ? void 0 : targetUndefinedVar.info) ? "info" : Boolean(targetVar),
3758
+ referenceIsValid: (targetUndefinedVar == null ? void 0 : targetUndefinedVar.info) ? "info" : isLoadingVariables ? true : Boolean(targetVar),
3732
3759
  tooltip
3733
3760
  };
3734
- if (!(0, import_lite.dequal)(currentState, newState)) {
3761
+ if (!(0, import_lite2.dequal)(currentState, newState)) {
3735
3762
  variableNode.setState(newState);
3736
3763
  }
3737
3764
  },
3738
3765
  [canEditVariable]
3739
3766
  );
3740
- (0, import_react36.useEffect)(() => {
3767
+ (0, import_react37.useEffect)(() => {
3741
3768
  editor.update(() => {
3742
3769
  (0, import_lexical3.$nodesOfType)(VariableNode).forEach((variableNode) => {
3743
3770
  updateExistingNodeIfChanged(variableNode);
3744
3771
  });
3745
3772
  });
3746
3773
  }, [editor, variables, canEditVariable, updateExistingNodeIfChanged]);
3747
- (0, import_react36.useEffect)(() => {
3774
+ (0, import_react37.useEffect)(() => {
3748
3775
  return editor.registerNodeTransform(VariableNode, (variableNode) => {
3749
3776
  updateExistingNodeIfChanged(variableNode);
3750
3777
  });
@@ -3768,7 +3795,7 @@ function VariablesPlugin({
3768
3795
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3769
3796
  "div",
3770
3797
  {
3771
- css: import_react35.css`
3798
+ css: import_react36.css`
3772
3799
  box-shadow: var(--shadow-base);
3773
3800
  border-radius: var(--rounded-base);
3774
3801
  background: var(--gray-50);
@@ -3803,7 +3830,7 @@ function VariablesPlugin({
3803
3830
  },
3804
3831
  css: menuItemTextGroup,
3805
3832
  children: variable.name === ADD_VARIABLE_OPTION ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_design_system17.HorizontalRhythm, { gap: "sm", align: "center", children: [
3806
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ai.AiFillPlusCircle, { fill: "var(--gray-500)" }),
3833
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_AiFillPlusCircle.AiFillPlusCircle, { fill: "var(--gray-500)" }),
3807
3834
  " ",
3808
3835
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: variable.displayName })
3809
3836
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
@@ -3847,7 +3874,8 @@ var VariableNode = class _VariableNode extends import_lexical4.DecoratorNode {
3847
3874
  referenceIsValid: true,
3848
3875
  isFresh: false,
3849
3876
  hasClickEvent: void 0,
3850
- tooltip: void 0
3877
+ tooltip: void 0,
3878
+ isLoading: false
3851
3879
  });
3852
3880
  }
3853
3881
  /** Gets the node's current state */
@@ -3907,7 +3935,8 @@ function VariableNodeComponent({
3907
3935
  }) {
3908
3936
  const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
3909
3937
  const [isSelected, setSelected, clearSelection] = (0, import_useLexicalNodeSelection.useLexicalNodeSelection)(nodeKey);
3910
- const onDelete = (0, import_react37.useCallback)(
3938
+ const readOnly = !editor.isEditable();
3939
+ const onDelete = (0, import_react38.useCallback)(
3911
3940
  (event) => {
3912
3941
  if (isSelected && (0, import_lexical4.$isNodeSelection)((0, import_lexical4.$getSelection)())) {
3913
3942
  event.preventDefault();
@@ -3920,7 +3949,7 @@ function VariableNodeComponent({
3920
3949
  },
3921
3950
  [isSelected, nodeKey]
3922
3951
  );
3923
- (0, import_react37.useEffect)(() => {
3952
+ (0, import_react38.useEffect)(() => {
3924
3953
  return (0, import_utils.mergeRegister)(
3925
3954
  editor.registerCommand(import_lexical4.KEY_DELETE_COMMAND, onDelete, import_lexical4.COMMAND_PRIORITY_LOW),
3926
3955
  editor.registerCommand(import_lexical4.KEY_BACKSPACE_COMMAND, onDelete, import_lexical4.COMMAND_PRIORITY_LOW),
@@ -3988,7 +4017,9 @@ function VariableNodeComponent({
3988
4017
  {
3989
4018
  ...state,
3990
4019
  reference,
4020
+ displayName: state.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_design_system18.LoadingIndicator, { size: "sm" }) : state.displayName,
3991
4021
  selected: isSelected,
4022
+ disabled: readOnly,
3992
4023
  onClick: state.hasClickEvent ? () => {
3993
4024
  setSelected(!isSelected);
3994
4025
  editor.dispatchCommand(EDIT_VARIABLE_COMMAND, {
@@ -4005,8 +4036,8 @@ function $isTargetWithinDecorator(target) {
4005
4036
  }
4006
4037
 
4007
4038
  // src/components/Variables/InputVariables.tsx
4008
- var import_design_system19 = require("@uniformdev/design-system");
4009
- var import_react47 = require("react");
4039
+ var import_design_system20 = require("@uniformdev/design-system");
4040
+ var import_react48 = require("react");
4010
4041
  var import_uuid2 = require("uuid");
4011
4042
 
4012
4043
  // src/components/Variables/composer/EditorRefPlugin.tsx
@@ -4026,10 +4057,10 @@ function EditorRefPlugin({
4026
4057
  // src/components/Variables/composer/PasteTransformerPlugin.tsx
4027
4058
  var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
4028
4059
  var import_lexical5 = require("lexical");
4029
- var import_react38 = require("react");
4060
+ var import_react39 = require("react");
4030
4061
  function PasteTransformerPlugin({ transformPaste }) {
4031
4062
  const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
4032
- (0, import_react38.useEffect)(() => {
4063
+ (0, import_react39.useEffect)(() => {
4033
4064
  editor.registerCommand(
4034
4065
  import_lexical5.PASTE_COMMAND,
4035
4066
  (event) => {
@@ -4052,17 +4083,17 @@ function PasteTransformerPlugin({ transformPaste }) {
4052
4083
  }
4053
4084
 
4054
4085
  // src/components/Variables/styles/InputVariables.styles.ts
4055
- var import_react39 = require("@emotion/react");
4056
- var menuContainer = import_react39.css`
4086
+ var import_react40 = require("@emotion/react");
4087
+ var menuContainer = import_react40.css`
4057
4088
  position: relative;
4058
4089
  `;
4059
- var menuBtn2 = import_react39.css`
4090
+ var menuBtn2 = import_react40.css`
4060
4091
  position: absolute;
4061
4092
  top: 50%;
4062
4093
  right: var(--spacing-sm);
4063
4094
  transform: translateY(-50%);
4064
4095
  `;
4065
- var input = import_react39.css`
4096
+ var input = import_react40.css`
4066
4097
  appearance: none;
4067
4098
  background-color: var(--white);
4068
4099
  border: 1px solid var(--gray-400);
@@ -4098,8 +4129,8 @@ var input = import_react39.css`
4098
4129
  `;
4099
4130
 
4100
4131
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
4101
- var React11 = __toESM(require("react"));
4102
- var import_react40 = require("react");
4132
+ var React10 = __toESM(require("react"));
4133
+ var import_react41 = require("react");
4103
4134
 
4104
4135
  // src/components/Variables/util/hasReferencedVariables.ts
4105
4136
  var import_canvas4 = require("@uniformdev/canvas");
@@ -4129,14 +4160,14 @@ function useInputVariablesState({
4129
4160
  }) {
4130
4161
  const { variables } = useVariables(true);
4131
4162
  const hasVariablesInValue = hasReferencedVariables(value != null ? value : "");
4132
- const [lastKnownId] = React11.useState(id);
4133
- const [hadVariablesInValue, setHadVariablesInValue] = React11.useState(hasVariablesInValue);
4134
- React11.useEffect(() => {
4163
+ const [lastKnownId] = React10.useState(id);
4164
+ const [hadVariablesInValue, setHadVariablesInValue] = React10.useState(hasVariablesInValue);
4165
+ React10.useEffect(() => {
4135
4166
  if (hasVariablesInValue) {
4136
4167
  setHadVariablesInValue(true);
4137
4168
  }
4138
4169
  }, [hasVariablesInValue]);
4139
- React11.useEffect(() => {
4170
+ React10.useEffect(() => {
4140
4171
  if (id !== lastKnownId) {
4141
4172
  setHadVariablesInValue(hasVariablesInValue);
4142
4173
  }
@@ -4144,7 +4175,7 @@ function useInputVariablesState({
4144
4175
  const hadVariablesInValueForReals = inputWhenNoVariables ? hadVariablesInValue : hasVariablesInValue;
4145
4176
  const disableVariablesForReals = disableVariables || Object.keys(variables).length === 0 && !showAddVariableMenuOption;
4146
4177
  const disableResetForReals = !inputWhenNoVariables || !hadVariablesInValueForReals;
4147
- const sharedMenuProps = (0, import_react40.useMemo)(
4178
+ const sharedMenuProps = (0, import_react41.useMemo)(
4148
4179
  () => ({
4149
4180
  menuTooltip,
4150
4181
  showAddVariableMenuOption,
@@ -4174,15 +4205,15 @@ function useInputVariablesState({
4174
4205
  }
4175
4206
 
4176
4207
  // src/components/Variables/toolbox/VariableField.styles.ts
4177
- var import_react41 = require("@emotion/react");
4178
- var labelText = import_react41.css`
4208
+ var import_react42 = require("@emotion/react");
4209
+ var labelText = import_react42.css`
4179
4210
  align-items: center;
4180
4211
  display: flex;
4181
4212
  gap: var(--spacing-xs);
4182
4213
  font-weight: var(--fw-regular);
4183
4214
  margin: 0 0 var(--spacing-xs);
4184
4215
  `;
4185
- var variableBindButton = import_react41.css`
4216
+ var variableBindButton = import_react42.css`
4186
4217
  align-items: center;
4187
4218
  border: none;
4188
4219
  border-radius: var(--rounded-base);
@@ -4211,10 +4242,10 @@ var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerCont
4211
4242
  var import_lexical6 = require("lexical");
4212
4243
 
4213
4244
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4214
- var import_design_system18 = require("@uniformdev/design-system");
4215
- var import_react42 = require("react");
4216
- var import_bs = require("react-icons/bs");
4217
- var import_cg5 = require("react-icons/cg");
4245
+ var import_BsFillPlusCircleFill = require("@react-icons/all-files/bs/BsFillPlusCircleFill");
4246
+ var import_CgUsbC = require("@react-icons/all-files/cg/CgUsbC");
4247
+ var import_design_system19 = require("@uniformdev/design-system");
4248
+ var import_react43 = require("react");
4218
4249
  var import_jsx_runtime34 = require("@emotion/react/jsx-runtime");
4219
4250
  function SelectVariableMenu({
4220
4251
  onSelectVariable,
@@ -4228,12 +4259,12 @@ function SelectVariableMenu({
4228
4259
  filterVariable
4229
4260
  }) {
4230
4261
  const { variables, dispatch, isEditing, canDispatch, readOnly } = useVariables(true);
4231
- const btnRef = (0, import_react42.useRef)(null);
4232
- const [openedAdd, setOpenedAdd] = (0, import_react42.useState)(false);
4262
+ const btnRef = (0, import_react43.useRef)(null);
4263
+ const [openedAdd, setOpenedAdd] = (0, import_react43.useState)(false);
4233
4264
  useOnVariableUpdated(({ name, latestValue }) => {
4234
4265
  onSelectVariable == null ? void 0 : onSelectVariable({ ...latestValue[name], name });
4235
4266
  }, !openedAdd);
4236
- (0, import_react42.useEffect)(() => {
4267
+ (0, import_react43.useEffect)(() => {
4237
4268
  if (openedAdd && !isEditing) {
4238
4269
  setOpenedAdd(false);
4239
4270
  }
@@ -4245,44 +4276,45 @@ function SelectVariableMenu({
4245
4276
  return null;
4246
4277
  }
4247
4278
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4248
- import_design_system18.Menu,
4279
+ import_design_system19.Menu,
4249
4280
  {
4250
4281
  placement: "bottom-start",
4282
+ withoutPortal: true,
4251
4283
  menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4252
4284
  "button",
4253
4285
  {
4254
- title: menuTooltip,
4255
4286
  ...buttonProps,
4287
+ title: menuTooltip,
4256
4288
  ref: btnRef,
4257
4289
  css: [menuBtn, buttonCss],
4258
4290
  type: "button",
4259
4291
  "data-testid": "insert-variable",
4260
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_cg5.CgUsbC, { size: "1.4rem" })
4292
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_CgUsbC.CgUsbC, { size: "1.4rem" })
4261
4293
  }
4262
4294
  ),
4263
4295
  menuLabel: menuTooltip,
4264
4296
  children: [
4265
4297
  showAddVariableMenuOptionForReals ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4266
- import_design_system18.MenuItem,
4298
+ import_design_system19.MenuItem,
4267
4299
  {
4268
4300
  onClick: () => {
4269
4301
  setOpenedAdd(true);
4270
4302
  dispatch({ type: "edit", variable: "", context: getEditorContext == null ? void 0 : getEditorContext() });
4271
4303
  },
4272
4304
  "data-testid": "add-variable-button",
4273
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_design_system18.HorizontalRhythm, { gap: "sm", align: "center", children: [
4274
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_bs.BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4305
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_design_system19.HorizontalRhythm, { gap: "sm", align: "center", children: [
4306
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_BsFillPlusCircleFill.BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4275
4307
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: "Add\u2026" }) })
4276
4308
  ] })
4277
4309
  }
4278
4310
  ) : null,
4279
- showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system18.MenuItemSeparator, {}) : null,
4311
+ showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
4280
4312
  variablesGroups.map((group) => {
4281
4313
  var _a;
4282
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system18.MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4314
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system19.MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4283
4315
  const { name, displayName, helpText } = variable;
4284
4316
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4285
- import_design_system18.MenuItem,
4317
+ import_design_system19.MenuItem,
4286
4318
  {
4287
4319
  id: name,
4288
4320
  css: menuItemTextGroup,
@@ -4296,9 +4328,9 @@ function SelectVariableMenu({
4296
4328
  );
4297
4329
  }) }, group.name);
4298
4330
  }),
4299
- menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system18.MenuItemSeparator, {}) : null,
4300
- onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system18.MenuItem, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4301
- tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system18.MenuItemSeparator, {}) : null,
4331
+ menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
4332
+ onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system19.MenuItem, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4333
+ tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
4302
4334
  tip ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("i", { css: variablesTipText, children: tip }) : null
4303
4335
  ]
4304
4336
  }
@@ -4366,14 +4398,14 @@ var import_LexicalAutoFocusPlugin = require("@lexical/react/LexicalAutoFocusPlug
4366
4398
  var import_LexicalClearEditorPlugin = require("@lexical/react/LexicalClearEditorPlugin");
4367
4399
  var import_LexicalComposer = require("@lexical/react/LexicalComposer");
4368
4400
  var import_LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
4369
- var import_react45 = require("react");
4401
+ var import_react46 = require("react");
4370
4402
 
4371
4403
  // src/components/Variables/composer/DisablePlugin.tsx
4372
4404
  var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
4373
- var import_react43 = require("react");
4405
+ var import_react44 = require("react");
4374
4406
  function DisablePlugin({ disabled }) {
4375
4407
  const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
4376
- (0, import_react43.useEffect)(() => {
4408
+ (0, import_react44.useEffect)(() => {
4377
4409
  editor.setEditable(!disabled);
4378
4410
  }, [editor, disabled]);
4379
4411
  return null;
@@ -4382,10 +4414,10 @@ function DisablePlugin({ disabled }) {
4382
4414
  // src/components/Variables/composer/SingleLineTextPlugin.tsx
4383
4415
  var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
4384
4416
  var import_lexical7 = require("lexical");
4385
- var import_react44 = require("react");
4417
+ var import_react45 = require("react");
4386
4418
  function SingleLineTextPlugin() {
4387
4419
  const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
4388
- (0, import_react44.useEffect)(() => {
4420
+ (0, import_react45.useEffect)(() => {
4389
4421
  editor.registerNodeTransform(import_lexical7.LineBreakNode, (node) => {
4390
4422
  node.remove();
4391
4423
  });
@@ -4438,8 +4470,8 @@ function VariablesComposer(props) {
4438
4470
  autoFocus,
4439
4471
  ...variablesPluginProps
4440
4472
  } = props;
4441
- const [lastEmittedValue, setLastEmittedValue] = (0, import_react45.useState)(value);
4442
- const editorConfig = (0, import_react45.useMemo)(
4473
+ const [lastEmittedValue, setLastEmittedValue] = (0, import_react46.useState)(value);
4474
+ const editorConfig = (0, import_react46.useMemo)(
4443
4475
  () => ({
4444
4476
  namespace: "uniform",
4445
4477
  onError(error) {
@@ -4451,8 +4483,8 @@ function VariablesComposer(props) {
4451
4483
  // eslint-disable-next-line react-hooks/exhaustive-deps
4452
4484
  []
4453
4485
  );
4454
- const editorState = (0, import_react45.useRef)();
4455
- const updateTimeout = (0, import_react45.useRef)();
4486
+ const editorState = (0, import_react46.useRef)();
4487
+ const updateTimeout = (0, import_react46.useRef)();
4456
4488
  if (typeof document === "undefined")
4457
4489
  return null;
4458
4490
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
@@ -4492,8 +4524,9 @@ var import_LexicalContentEditable = require("@lexical/react/LexicalContentEditab
4492
4524
  var import_LexicalErrorBoundary = __toESM(require("@lexical/react/LexicalErrorBoundary"));
4493
4525
  var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
4494
4526
  var import_LexicalPlainTextPlugin = require("@lexical/react/LexicalPlainTextPlugin");
4527
+ var import_utils2 = require("@lexical/utils");
4495
4528
  var import_lexical9 = require("lexical");
4496
- var import_react46 = require("react");
4529
+ var import_react47 = require("react");
4497
4530
  var import_jsx_runtime38 = require("@emotion/react/jsx-runtime");
4498
4531
  function VariablesComposerInput({ css: css37, ...contentEditableProps }) {
4499
4532
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
@@ -4511,11 +4544,11 @@ function VariablesComposerInput({ css: css37, ...contentEditableProps }) {
4511
4544
  }
4512
4545
  function RichishCopyAndPastePlugin() {
4513
4546
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
4514
- (0, import_react46.useEffect)(() => {
4547
+ (0, import_react47.useEffect)(() => {
4515
4548
  editor.registerCommand(
4516
4549
  import_lexical9.COPY_COMMAND,
4517
4550
  (event) => {
4518
- (0, import_clipboard.copyToClipboard)(editor, event);
4551
+ (0, import_clipboard.copyToClipboard)(editor, (0, import_utils2.objectKlassEquals)(event, ClipboardEvent) ? event : null);
4519
4552
  return true;
4520
4553
  },
4521
4554
  import_lexical9.COMMAND_PRIORITY_HIGH
@@ -4523,7 +4556,7 @@ function RichishCopyAndPastePlugin() {
4523
4556
  editor.registerCommand(
4524
4557
  import_lexical9.CUT_COMMAND,
4525
4558
  (event) => {
4526
- (0, import_clipboard.copyToClipboard)(editor, event);
4559
+ (0, import_clipboard.copyToClipboard)(editor, (0, import_utils2.objectKlassEquals)(event, ClipboardEvent) ? event : null);
4527
4560
  editor.update(() => {
4528
4561
  const selection = (0, import_lexical9.$getSelection)();
4529
4562
  if ((0, import_lexical9.$isRangeSelection)(selection)) {
@@ -4603,11 +4636,11 @@ function InputVariables(props) {
4603
4636
  editorRef,
4604
4637
  filterVariable
4605
4638
  } = props;
4606
- const [finalId] = (0, import_react47.useState)(id != null ? id : () => (0, import_uuid2.v4)());
4639
+ const [finalId] = (0, import_react48.useState)(id != null ? id : () => (0, import_uuid2.v4)());
4607
4640
  const { dispatch, canDispatch, isEditing } = useVariables(true);
4608
4641
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
4609
4642
  const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
4610
- const replaceValueOnVariableInsert = Boolean(inputWhenNoVariables && !hadVariablesInValue);
4643
+ const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
4611
4644
  const input3 = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4612
4645
  "div",
4613
4646
  {
@@ -4617,12 +4650,13 @@ function InputVariables(props) {
4617
4650
  }
4618
4651
  },
4619
4652
  children: [
4620
- inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4653
+ useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4621
4654
  InputVariablesOverlayMenu,
4622
4655
  {
4623
4656
  ...sharedMenuProps,
4624
4657
  disabled: disableInlineVariablesForReals,
4625
- replaceValueOnVariableInsert,
4658
+ replaceValueOnVariableInsert: useInputWithNoVariables,
4659
+ useInputWhenNoVariables: useInputWithNoVariables,
4626
4660
  children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4627
4661
  VariablesComposerInput,
4628
4662
  {
@@ -4635,10 +4669,10 @@ function InputVariables(props) {
4635
4669
  )
4636
4670
  }
4637
4671
  ),
4638
- caption ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system19.Caption, { children: caption }) : null,
4639
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system19.ErrorMessage, { message: errorMessage }) : null,
4640
- warningMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system19.WarningMessage, { message: warningMessage }) : null,
4641
- infoMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system19.InfoMessage, { message: infoMessage }) : null
4672
+ caption ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system20.Caption, { children: caption }) : null,
4673
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system20.ErrorMessage, { message: errorMessage }) : null,
4674
+ warningMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system20.WarningMessage, { message: warningMessage }) : null,
4675
+ infoMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system20.InfoMessage, { message: infoMessage }) : null
4642
4676
  ]
4643
4677
  }
4644
4678
  );
@@ -4650,7 +4684,7 @@ function InputVariables(props) {
4650
4684
  label,
4651
4685
  selectVariableMenuOptions: {
4652
4686
  ...sharedMenuProps,
4653
- replaceValueOnVariableInsert
4687
+ replaceValueOnVariableInsert: useInputWithNoVariables
4654
4688
  },
4655
4689
  id: finalId,
4656
4690
  isActive: hadVariablesInValue,
@@ -4670,12 +4704,12 @@ function InputVariables(props) {
4670
4704
  enableEditingVariables: !disabled && !disableVariablesForReals && enableEditingVariables,
4671
4705
  getEditorContext,
4672
4706
  disabled,
4673
- replaceValueOnVariableInsert,
4707
+ replaceValueOnVariableInsert: useInputWithNoVariables,
4674
4708
  autoFocus,
4675
4709
  filterVariable,
4676
4710
  children: [
4677
4711
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PasteTransformerPlugin, { transformPaste }),
4678
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ControlledValuePlugin, { value, enabled: !!inputWhenNoVariables && !hadVariablesInValue }),
4712
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ControlledValuePlugin, { value, enabled: useInputWithNoVariables }),
4679
4713
  editorRef ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(EditorRefPlugin, { editorRef }) : null,
4680
4714
  body
4681
4715
  ]
@@ -4685,6 +4719,7 @@ function InputVariables(props) {
4685
4719
  function InputVariablesOverlayMenu({
4686
4720
  children,
4687
4721
  disabled,
4722
+ useInputWhenNoVariables,
4688
4723
  ...props
4689
4724
  }) {
4690
4725
  if (disabled) {
@@ -4696,7 +4731,7 @@ function InputVariablesOverlayMenu({
4696
4731
  VariablesComposerVariableMenu,
4697
4732
  {
4698
4733
  ...props,
4699
- tip: "Tip: access this list by typing $$",
4734
+ tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4700
4735
  buttonCss: menuBtn2
4701
4736
  }
4702
4737
  )
@@ -4704,14 +4739,14 @@ function InputVariablesOverlayMenu({
4704
4739
  }
4705
4740
 
4706
4741
  // src/components/Variables/ParameterConnectionIndicator.tsx
4742
+ var import_CgUsbC2 = require("@react-icons/all-files/cg/CgUsbC");
4707
4743
  var import_canvas6 = require("@uniformdev/canvas");
4708
- var import_design_system20 = require("@uniformdev/design-system");
4709
- var import_react49 = require("react");
4710
- var import_cg6 = require("react-icons/cg");
4744
+ var import_design_system21 = require("@uniformdev/design-system");
4745
+ var import_react50 = require("react");
4711
4746
 
4712
4747
  // src/components/Variables/styles/ParameterVariables.styles.ts
4713
- var import_react48 = require("@emotion/react");
4714
- var variableBindButton2 = import_react48.css`
4748
+ var import_react49 = require("@emotion/react");
4749
+ var variableBindButton2 = import_react49.css`
4715
4750
  align-items: center;
4716
4751
  border: none;
4717
4752
  border-radius: var(--rounded-base);
@@ -4733,8 +4768,14 @@ var variableBindButton2 = import_react48.css`
4733
4768
  background: none;
4734
4769
  color: currentColor;
4735
4770
  }
4771
+
4772
+ // fixes menu resizing issue within iframes
4773
+ // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4774
+ + [role='menu'] {
4775
+ max-height: unset;
4776
+ }
4736
4777
  `;
4737
- var input2 = import_react48.css`
4778
+ var input2 = import_react49.css`
4738
4779
  display: block;
4739
4780
  appearance: none;
4740
4781
  box-sizing: border-box;
@@ -4773,7 +4814,8 @@ var input2 = import_react48.css`
4773
4814
  color: var(--gray-400);
4774
4815
  }
4775
4816
 
4776
- &[readonly] {
4817
+ &[readonly],
4818
+ &[contenteditable='false'] {
4777
4819
  cursor: not-allowed;
4778
4820
  color: var(--gray-400);
4779
4821
  }
@@ -4782,7 +4824,7 @@ var input2 = import_react48.css`
4782
4824
  margin: 0;
4783
4825
  }
4784
4826
  `;
4785
- var inputMultiLine = (lines) => import_react48.css`
4827
+ var inputMultiLine = (lines) => import_react49.css`
4786
4828
  // 1.5 = line height, spacing-md = top and bottom padding
4787
4829
  height: calc(${lines * 1.5}em + var(--spacing-md));
4788
4830
  resize: vertical;
@@ -4798,7 +4840,7 @@ function ParameterConnectionIndicator({
4798
4840
  disabled,
4799
4841
  menuTooltip = "Insert variable"
4800
4842
  }) {
4801
- const hasVariablesInValue = (0, import_react49.useMemo)(() => {
4843
+ const hasVariablesInValue = (0, import_react50.useMemo)(() => {
4802
4844
  let result = false;
4803
4845
  (0, import_canvas6.bindVariablesToObject)({
4804
4846
  value,
@@ -4809,12 +4851,13 @@ function ParameterConnectionIndicator({
4809
4851
  });
4810
4852
  return result;
4811
4853
  }, [value]);
4812
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system20.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4854
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system21.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4813
4855
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { css: { flex: 1 }, children }),
4814
4856
  disabled ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4815
- import_design_system20.Menu,
4857
+ import_design_system21.Menu,
4816
4858
  {
4817
4859
  placement: "bottom-start",
4860
+ withoutPortal: true,
4818
4861
  menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4819
4862
  "button",
4820
4863
  {
@@ -4822,7 +4865,7 @@ function ParameterConnectionIndicator({
4822
4865
  "aria-pressed": hasVariablesInValue,
4823
4866
  css: [menuBtn, variableBindButton2],
4824
4867
  type: "button",
4825
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_cg6.CgUsbC, { size: "1.4rem" })
4868
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_CgUsbC2.CgUsbC, { size: "1.4rem" })
4826
4869
  }
4827
4870
  ),
4828
4871
  menuLabel: menuTooltip,
@@ -4833,7 +4876,7 @@ function ParameterConnectionIndicator({
4833
4876
  }
4834
4877
 
4835
4878
  // src/components/Variables/ParameterOrSingleVariable.tsx
4836
- var import_design_system21 = require("@uniformdev/design-system");
4879
+ var import_design_system22 = require("@uniformdev/design-system");
4837
4880
  var import_jsx_runtime41 = require("@emotion/react/jsx-runtime");
4838
4881
  function ParameterOrSingleVariable(props) {
4839
4882
  const {
@@ -4862,7 +4905,7 @@ function ParameterOrSingleVariable(props) {
4862
4905
  children: [
4863
4906
  editorRef ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EditorRefPlugin, { editorRef }) : null,
4864
4907
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ControlledValuePlugin, { enabled: true, value }),
4865
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_design_system21.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4908
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_design_system22.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4866
4909
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4867
4910
  VariablesComposerInput,
4868
4911
  {
@@ -4889,8 +4932,8 @@ function ParameterOrSingleVariable(props) {
4889
4932
  }
4890
4933
 
4891
4934
  // src/components/Variables/ParameterVariables.tsx
4892
- var import_react50 = require("@emotion/react");
4893
- var import_design_system22 = require("@uniformdev/design-system");
4935
+ var import_react51 = require("@emotion/react");
4936
+ var import_design_system23 = require("@uniformdev/design-system");
4894
4937
  var import_jsx_runtime42 = require("@emotion/react/jsx-runtime");
4895
4938
  function ParameterVariables(props) {
4896
4939
  const {
@@ -4909,7 +4952,7 @@ function ParameterVariables(props) {
4909
4952
  } = props;
4910
4953
  const { dispatch, canDispatch, isEditing } = useVariables(true);
4911
4954
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps, hasVariablesInValue } = useInputVariablesState(props);
4912
- const replaceValueOnVariableInsert = Boolean(inputWhenNoVariables && !hadVariablesInValue);
4955
+ const useInputWhenNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
4913
4956
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4914
4957
  VariablesComposer,
4915
4958
  {
@@ -4921,14 +4964,14 @@ function ParameterVariables(props) {
4921
4964
  enableEditingVariables: !disabled,
4922
4965
  getEditorContext,
4923
4966
  disabled,
4924
- replaceValueOnVariableInsert,
4967
+ replaceValueOnVariableInsert: useInputWhenNoVariables,
4925
4968
  autoFocus,
4926
4969
  filterVariable,
4927
4970
  children: [
4928
4971
  editorRef ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EditorRefPlugin, { editorRef }) : null,
4929
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ControlledValuePlugin, { value, enabled: !!inputWhenNoVariables && !hadVariablesInValue }),
4972
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ControlledValuePlugin, { value, enabled: useInputWhenNoVariables }),
4930
4973
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4931
- import_design_system22.HorizontalRhythm,
4974
+ import_design_system23.HorizontalRhythm,
4932
4975
  {
4933
4976
  align: "center",
4934
4977
  gap: "xs",
@@ -4939,7 +4982,7 @@ function ParameterVariables(props) {
4939
4982
  }
4940
4983
  },
4941
4984
  children: [
4942
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4985
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { css: { flex: 1 }, children: useInputWhenNoVariables ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4943
4986
  VariablesComposerInput,
4944
4987
  {
4945
4988
  "aria-label": ariaLabel,
@@ -4947,7 +4990,7 @@ function ParameterVariables(props) {
4947
4990
  "data-text-value": value,
4948
4991
  css: [
4949
4992
  input2,
4950
- typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(4) : import_react50.css``
4993
+ typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(4) : import_react51.css``
4951
4994
  ]
4952
4995
  }
4953
4996
  ) }),
@@ -4956,9 +4999,9 @@ function ParameterVariables(props) {
4956
4999
  {
4957
5000
  ...sharedMenuProps,
4958
5001
  buttonCss: [variableBindButton2],
4959
- tip: "Tip: access this list by typing $$",
5002
+ tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4960
5003
  buttonProps: hasVariablesInValue ? { "aria-pressed": "true" } : void 0,
4961
- replaceValueOnVariableInsert
5004
+ replaceValueOnVariableInsert: useInputWhenNoVariables
4962
5005
  }
4963
5006
  )
4964
5007
  ]
@@ -4997,13 +5040,13 @@ function variableDefaultTextValue(defaultValue) {
4997
5040
  }
4998
5041
 
4999
5042
  // src/components/Variables/VariablesList.tsx
5000
- var import_react52 = require("@emotion/react");
5001
- var import_design_system23 = require("@uniformdev/design-system");
5043
+ var import_react53 = require("@emotion/react");
5044
+ var import_design_system24 = require("@uniformdev/design-system");
5002
5045
  var import_react_beautiful_dnd2 = require("react-beautiful-dnd");
5003
5046
 
5004
5047
  // src/components/Variables/styles/VariablesList.styles.ts
5005
- var import_react51 = require("@emotion/react");
5006
- var tableRow = (isDragging) => import_react51.css`
5048
+ var import_react52 = require("@emotion/react");
5049
+ var tableRow = (isDragging) => import_react52.css`
5007
5050
  position: relative;
5008
5051
  ${isDragging ? `
5009
5052
  display: table;
@@ -5011,7 +5054,7 @@ var tableRow = (isDragging) => import_react51.css`
5011
5054
  top: auto !important;
5012
5055
  ` : void 0}
5013
5056
  `;
5014
- var tableCellDragIcon = import_react51.css`
5057
+ var tableCellDragIcon = import_react52.css`
5015
5058
  &::after {
5016
5059
  content: '';
5017
5060
  display: block;
@@ -5029,7 +5072,7 @@ var tableCellDragIcon = import_react51.css`
5029
5072
  opacity: 1;
5030
5073
  }
5031
5074
  `;
5032
- var variableName = import_react51.css`
5075
+ var variableName = import_react52.css`
5033
5076
  border: none;
5034
5077
  color: var(--brand-secondary-5);
5035
5078
  font-weight: var(--fw-medium);
@@ -5040,7 +5083,7 @@ var variableName = import_react51.css`
5040
5083
  white-space: nowrap;
5041
5084
  max-width: 20ch;
5042
5085
  `;
5043
- var variableValue = import_react51.css`
5086
+ var variableValue = import_react52.css`
5044
5087
  overflow: hidden;
5045
5088
  text-overflow: ellipsis;
5046
5089
  white-space: nowrap;
@@ -5070,13 +5113,13 @@ function VariablesList() {
5070
5113
  }
5071
5114
  };
5072
5115
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
5073
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_beautiful_dnd2.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_beautiful_dnd2.Droppable, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system23.Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
5074
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system23.TableRow, { children: [
5075
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellHead, { children: "Name" }),
5076
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellHead, { children: "Default Value" }),
5077
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellHead, {})
5116
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_beautiful_dnd2.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_beautiful_dnd2.Droppable, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system24.Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
5117
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system24.TableRow, { children: [
5118
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellHead, { children: "Name" }),
5119
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellHead, { children: "Default Value" }),
5120
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellHead, {})
5078
5121
  ] }) }),
5079
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system23.TableBody, { children: [
5122
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system24.TableBody, { children: [
5080
5123
  sorted.map(({ name, displayName, default: defaultValue, readOnly }, index) => {
5081
5124
  const text = displayName != null ? displayName : name;
5082
5125
  const textValue = variableDefaultTextValue(defaultValue);
@@ -5087,7 +5130,7 @@ function VariablesList() {
5087
5130
  index,
5088
5131
  isDragDisabled: sorted.length === 1,
5089
5132
  children: (provided2, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5090
- import_design_system23.TableRow,
5133
+ import_design_system24.TableRow,
5091
5134
  {
5092
5135
  ref: provided2.innerRef,
5093
5136
  ...provided2.dragHandleProps,
@@ -5096,7 +5139,7 @@ function VariablesList() {
5096
5139
  css: tableRow(snapshot.isDragging),
5097
5140
  "data-dragging": snapshot.isDragging,
5098
5141
  children: [
5099
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5142
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5100
5143
  "button",
5101
5144
  {
5102
5145
  css: variableName,
@@ -5109,21 +5152,21 @@ function VariablesList() {
5109
5152
  children: text
5110
5153
  }
5111
5154
  ) }),
5112
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellData, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { css: variableValue, title: textValue, children: textValue }) }),
5113
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.TableCellData, { align: "right", children: readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5155
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellData, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { css: variableValue, title: textValue, children: textValue }) }),
5156
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.TableCellData, { align: "right", children: readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5114
5157
  "button",
5115
5158
  {
5116
5159
  type: "button",
5117
5160
  title: `delete ${text}`,
5118
5161
  css: [
5119
- import_design_system23.button,
5120
- import_react52.css`
5162
+ import_design_system24.button,
5163
+ import_react53.css`
5121
5164
  background: transparent;
5122
5165
  `
5123
5166
  ],
5124
5167
  "aria-controls": text,
5125
5168
  onClick: () => dispatch({ type: "remove", variable: name }),
5126
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system23.Icon, { icon: "trash", iconColor: "red" })
5169
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system24.Icon, { icon: "trash", iconColor: "red" })
5127
5170
  }
5128
5171
  ) })
5129
5172
  ]
@@ -5137,7 +5180,7 @@ function VariablesList() {
5137
5180
  ] })
5138
5181
  ] }) }) }),
5139
5182
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5140
- import_design_system23.AddListButton,
5183
+ import_design_system24.AddListButton,
5141
5184
  {
5142
5185
  onButtonClick: () => dispatch({ type: "edit", variable: "" }),
5143
5186
  "aria-label": "Add variable",
@@ -5173,7 +5216,7 @@ function DataResourceDynamicInputProviderRenderer({
5173
5216
  }
5174
5217
 
5175
5218
  // src/components/DataResourceVariablesList.tsx
5176
- var import_design_system24 = require("@uniformdev/design-system");
5219
+ var import_design_system25 = require("@uniformdev/design-system");
5177
5220
  var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
5178
5221
  function DataResourceVariablesList(props) {
5179
5222
  const {
@@ -5203,9 +5246,9 @@ function DataResourceVariablesListExplicit({
5203
5246
  if (NoVariablesComponent) {
5204
5247
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(NoVariablesComponent, {});
5205
5248
  }
5206
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.Callout, { type: "note", children: "No settings are required." });
5249
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system25.Callout, { type: "note", children: "No settings are required." });
5207
5250
  }
5208
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DataResourceDynamicInputProvider, { dynamicInputs, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system24.VerticalRhythm, { children: variableDefinitions.map((variableDefinition) => {
5251
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DataResourceDynamicInputProvider, { dynamicInputs, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system25.VerticalRhythm, { children: variableDefinitions.map((variableDefinition) => {
5209
5252
  var _a, _b, _c;
5210
5253
  const VariableRenderer = variableDefinition.type ? (_a = typeRenderers == null ? void 0 : typeRenderers[variableDefinition.type]) != null ? _a : TextVariableRenderer : TextVariableRenderer;
5211
5254
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
@@ -5244,16 +5287,16 @@ function TextVariableRenderer({ definition, value, setValue }) {
5244
5287
  }
5245
5288
 
5246
5289
  // src/components/Request/RequestBody.tsx
5247
- var import_react54 = require("@emotion/react");
5248
- var import_design_system25 = require("@uniformdev/design-system");
5249
- var import_react55 = require("react");
5290
+ var import_react55 = require("@emotion/react");
5291
+ var import_design_system26 = require("@uniformdev/design-system");
5292
+ var import_react56 = require("react");
5250
5293
 
5251
5294
  // src/components/Request/RequestProvider.tsx
5252
- var React12 = __toESM(require("react"));
5295
+ var React11 = __toESM(require("react"));
5253
5296
  var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
5254
- var RequestContext = React12.createContext(null);
5297
+ var RequestContext = React11.createContext(null);
5255
5298
  function RequestProvider({ value, onChange, children }) {
5256
- const contextValue = React12.useMemo(() => {
5299
+ const contextValue = React11.useMemo(() => {
5257
5300
  return {
5258
5301
  dispatch: (event) => {
5259
5302
  if (event.type === "setRelativeUrl") {
@@ -5322,7 +5365,7 @@ function RequestProvider({ value, onChange, children }) {
5322
5365
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RequestContext.Provider, { value: contextValue, children });
5323
5366
  }
5324
5367
  function useRequest() {
5325
- const context = React12.useContext(RequestContext);
5368
+ const context = React11.useContext(RequestContext);
5326
5369
  if (!context) {
5327
5370
  throw new Error("No RequestProvider present");
5328
5371
  }
@@ -5330,11 +5373,11 @@ function useRequest() {
5330
5373
  }
5331
5374
 
5332
5375
  // src/components/Request/styles/Request.styles.ts
5333
- var import_react53 = require("@emotion/react");
5334
- var innerContentStyles = import_react53.css`
5376
+ var import_react54 = require("@emotion/react");
5377
+ var innerContentStyles = import_react54.css`
5335
5378
  background: var(--white);
5336
5379
  `;
5337
- var requestTypeContainer = (bgColor) => import_react53.css`
5380
+ var requestTypeContainer = (bgColor) => import_react54.css`
5338
5381
  align-items: start;
5339
5382
  background: ${bgColor};
5340
5383
  display: grid;
@@ -5372,11 +5415,11 @@ var LANGUAGE_TO_CONTENT_TYPE = {
5372
5415
  };
5373
5416
  function RequestBody() {
5374
5417
  const { request, dispatch } = useRequest();
5375
- const [language, setLanguage] = (0, import_react55.useState)("json");
5418
+ const [language, setLanguage] = (0, import_react56.useState)("json");
5376
5419
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
5377
5420
  "div",
5378
5421
  {
5379
- css: import_react54.css`
5422
+ css: import_react55.css`
5380
5423
  background: var(--white);
5381
5424
  `,
5382
5425
  children: [
@@ -5384,11 +5427,11 @@ function RequestBody() {
5384
5427
  RequestTypeContainer,
5385
5428
  {
5386
5429
  bgColor: "var(--gray-100)",
5387
- css: import_react54.css`
5430
+ css: import_react55.css`
5388
5431
  padding: var(--spacing-sm) var(--spacing-base);
5389
5432
  `,
5390
5433
  children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5391
- import_design_system25.InputSelect,
5434
+ import_design_system26.InputSelect,
5392
5435
  {
5393
5436
  label: "Language",
5394
5437
  showLabel: false,
@@ -5411,7 +5454,7 @@ function RequestBody() {
5411
5454
  }
5412
5455
  ),
5413
5456
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5414
- import_design_system25.JsonEditor,
5457
+ import_design_system26.JsonEditor,
5415
5458
  {
5416
5459
  height: 200,
5417
5460
  defaultValue: request.body,
@@ -5428,9 +5471,12 @@ function RequestBody() {
5428
5471
  }
5429
5472
 
5430
5473
  // src/components/Request/RequestHeaders.tsx
5431
- var import_design_system26 = require("@uniformdev/design-system");
5474
+ var import_design_system27 = require("@uniformdev/design-system");
5432
5475
  var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
5433
- function RequestHeaders({ disableVariables }) {
5476
+ function RequestHeaders({
5477
+ disableVariables,
5478
+ addOmitIfEmpty
5479
+ }) {
5434
5480
  var _a, _b;
5435
5481
  const { dispatch, request } = useRequest();
5436
5482
  const deezHeaders = [...request.headers, { key: "", value: "" }];
@@ -5445,29 +5491,30 @@ function RequestHeaders({ disableVariables }) {
5445
5491
  index
5446
5492
  });
5447
5493
  };
5448
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.Table, { children: [
5449
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableRow, { children: [
5450
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Name" }),
5451
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Value" })
5494
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.Table, { children: [
5495
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableRow, { children: [
5496
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellHead, { children: "Name" }),
5497
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellHead, { children: "Value" }),
5498
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellHead, { children: "Omit If Empty" }) : null
5452
5499
  ] }) }),
5453
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableBody, { children: [
5500
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableBody, { children: [
5454
5501
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
5455
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableRow, { children: [
5456
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableCellData, { width: "50%", children: [
5502
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableRow, { children: [
5503
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableCellData, { width: "50%", children: [
5457
5504
  baseHeader.key,
5458
5505
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("br", {}),
5459
5506
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: "from data source" }) })
5460
5507
  ] }),
5461
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableCellData, { width: "50%", children: [
5508
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableCellData, { width: "50%", children: [
5462
5509
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("i", { css: { color: "var(--gray-500)" }, children: baseHeader.value }),
5463
- request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.WarningMessage, { message: "overridden below" }) : null
5510
+ request.headers.find((p) => p.key === baseHeader.key) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.WarningMessage, { message: "overridden below" }) : null
5464
5511
  ] })
5465
5512
  ] }, baseHeader.key);
5466
5513
  }),
5467
5514
  deezHeaders.map((header, index) => {
5468
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableRow, { children: [
5469
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5470
- import_design_system26.Input,
5515
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system27.TableRow, { children: [
5516
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5517
+ import_design_system27.Input,
5471
5518
  {
5472
5519
  label: header.key,
5473
5520
  value: header.key,
@@ -5486,7 +5533,7 @@ function RequestHeaders({ disableVariables }) {
5486
5533
  "data-testid": "header-key"
5487
5534
  }
5488
5535
  ) }),
5489
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellData, { width: "50%", children: header.key ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5536
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellData, { width: "50%", children: header.key ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5490
5537
  InputVariables,
5491
5538
  {
5492
5539
  value: header.value,
@@ -5496,7 +5543,24 @@ function RequestHeaders({ disableVariables }) {
5496
5543
  enableEditingVariables: true,
5497
5544
  "data-testid": "header-value"
5498
5545
  }
5499
- ) : null })
5546
+ ) : null }),
5547
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system27.TableCellData, { width: "50%", children: header.key ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5548
+ import_design_system27.Input,
5549
+ {
5550
+ type: "checkbox",
5551
+ checked: header.omitIfEmpty,
5552
+ "data-testid": "header-omitifempty",
5553
+ onChange: (e) => dispatch({
5554
+ type: "updateHeader",
5555
+ header: {
5556
+ key: header.key,
5557
+ value: header.value,
5558
+ omitIfEmpty: e.currentTarget.checked
5559
+ },
5560
+ index
5561
+ })
5562
+ }
5563
+ ) : null }) : null
5500
5564
  ] }, index);
5501
5565
  })
5502
5566
  ] })
@@ -5504,13 +5568,13 @@ function RequestHeaders({ disableVariables }) {
5504
5568
  }
5505
5569
 
5506
5570
  // src/components/Request/RequestMethodSelect.tsx
5507
- var import_design_system27 = require("@uniformdev/design-system");
5571
+ var import_design_system28 = require("@uniformdev/design-system");
5508
5572
  var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
5509
5573
  function RequestMethodSelect(props) {
5510
5574
  var _a;
5511
5575
  const { request, dispatch } = useRequest();
5512
5576
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5513
- import_design_system27.InputSelect,
5577
+ import_design_system28.InputSelect,
5514
5578
  {
5515
5579
  ...props,
5516
5580
  options: [
@@ -5525,46 +5589,51 @@ function RequestMethodSelect(props) {
5525
5589
  }
5526
5590
 
5527
5591
  // src/components/Request/RequestParameters.tsx
5528
- var import_design_system28 = require("@uniformdev/design-system");
5592
+ var import_design_system29 = require("@uniformdev/design-system");
5529
5593
  var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
5530
- function RequestParameters({ disableVariables }) {
5594
+ function RequestParameters({
5595
+ disableVariables,
5596
+ addOmitIfEmpty
5597
+ }) {
5531
5598
  var _a, _b;
5532
5599
  const { dispatch, request } = useRequest();
5533
5600
  const deezParameters = [...request.parameters, { key: "", value: "" }];
5534
5601
  const handleUpdateParamFromMenu = ({
5535
5602
  key,
5536
5603
  value,
5604
+ omitIfEmpty,
5537
5605
  index
5538
5606
  }) => {
5539
5607
  dispatch({
5540
5608
  type: "updateParameter",
5541
- parameter: { key, value },
5609
+ parameter: { key, value, omitIfEmpty },
5542
5610
  index
5543
5611
  });
5544
5612
  };
5545
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.Table, { children: [
5546
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableRow, { children: [
5547
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Name" }),
5548
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Value" })
5613
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.Table, { children: [
5614
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableRow, { children: [
5615
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellHead, { children: "Name" }),
5616
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellHead, { children: "Value" }),
5617
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellHead, { children: "Omit If Empty" }) : null
5549
5618
  ] }) }),
5550
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableBody, { children: [
5619
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableBody, { children: [
5551
5620
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
5552
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableRow, { children: [
5553
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableCellData, { width: "50%", children: [
5621
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableRow, { children: [
5622
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableCellData, { width: "50%", children: [
5554
5623
  baseParameter.key,
5555
5624
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("br", {}),
5556
5625
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("i", { css: { color: "var(--gray-500)" }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("small", { children: "from data source" }) })
5557
5626
  ] }),
5558
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableCellData, { width: "50%", children: [
5627
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableCellData, { width: "50%", children: [
5559
5628
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("i", { css: { color: "var(--gray-500)" }, children: baseParameter.value }),
5560
- request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.WarningMessage, { message: "overridden below" }) : null
5629
+ request.parameters.find((p) => p.key === baseParameter.key) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.WarningMessage, { message: "overridden below" }) : null
5561
5630
  ] })
5562
5631
  ] }, baseParameter.key);
5563
5632
  }),
5564
5633
  deezParameters.map((parameter, index) => {
5565
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableRow, { children: [
5566
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5567
- import_design_system28.Input,
5634
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system29.TableRow, { children: [
5635
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellData, { width: "50%", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5636
+ import_design_system29.Input,
5568
5637
  {
5569
5638
  label: parameter.key,
5570
5639
  value: parameter.key,
@@ -5573,7 +5642,11 @@ function RequestParameters({ disableVariables }) {
5573
5642
  if (e.currentTarget.value) {
5574
5643
  dispatch({
5575
5644
  type: "updateParameter",
5576
- parameter: { key: e.currentTarget.value, value: parameter.value },
5645
+ parameter: {
5646
+ key: e.currentTarget.value,
5647
+ value: parameter.value,
5648
+ omitIfEmpty: parameter.omitIfEmpty
5649
+ },
5577
5650
  index
5578
5651
  });
5579
5652
  } else {
@@ -5583,13 +5656,14 @@ function RequestParameters({ disableVariables }) {
5583
5656
  "data-testid": "parameter-key"
5584
5657
  }
5585
5658
  ) }),
5586
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellData, { width: "50%", children: parameter.key ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5659
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellData, { width: "50%", children: parameter.key ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5587
5660
  InputVariables,
5588
5661
  {
5589
5662
  value: parameter.value,
5590
5663
  onChange: (selectedVariable) => handleUpdateParamFromMenu({
5591
5664
  key: parameter.key,
5592
5665
  value: selectedVariable != null ? selectedVariable : "",
5666
+ omitIfEmpty: parameter.omitIfEmpty,
5593
5667
  index
5594
5668
  }),
5595
5669
  disableVariables,
@@ -5597,7 +5671,26 @@ function RequestParameters({ disableVariables }) {
5597
5671
  showAddVariableMenuOption: "Add variable...",
5598
5672
  enableEditingVariables: true
5599
5673
  }
5600
- ) : null })
5674
+ ) : null }),
5675
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system29.TableCellData, { width: "50%", children: parameter.key ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5676
+ import_design_system29.Input,
5677
+ {
5678
+ type: "checkbox",
5679
+ checked: parameter.omitIfEmpty,
5680
+ "data-testid": "parameter-omitifempty",
5681
+ onChange: (e) => {
5682
+ dispatch({
5683
+ type: "updateParameter",
5684
+ parameter: {
5685
+ key: parameter.key,
5686
+ value: parameter.value,
5687
+ omitIfEmpty: e.currentTarget.checked
5688
+ },
5689
+ index
5690
+ });
5691
+ }
5692
+ }
5693
+ ) : null }) : null
5601
5694
  ] }, index);
5602
5695
  })
5603
5696
  ] })
@@ -5605,8 +5698,8 @@ function RequestParameters({ disableVariables }) {
5605
5698
  }
5606
5699
 
5607
5700
  // src/components/Request/RequestUrl.tsx
5608
- var import_react56 = require("@emotion/react");
5609
- var import_react57 = require("react");
5701
+ var import_react57 = require("@emotion/react");
5702
+ var import_react58 = require("react");
5610
5703
 
5611
5704
  // src/components/Request/urlEncodeRequestParameter.ts
5612
5705
  function urlEncodeRequestUrl(url, varValues) {
@@ -5632,7 +5725,7 @@ function RequestUrl() {
5632
5725
  var _a, _b;
5633
5726
  const { variables } = useVariables();
5634
5727
  const { request } = useRequest();
5635
- const mergedParameters = (0, import_react57.useMemo)(() => {
5728
+ const mergedParameters = (0, import_react58.useMemo)(() => {
5636
5729
  var _a2;
5637
5730
  if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
5638
5731
  return request.parameters;
@@ -5642,7 +5735,7 @@ function RequestUrl() {
5642
5735
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
5643
5736
  "small",
5644
5737
  {
5645
- css: import_react56.css`
5738
+ css: import_react57.css`
5646
5739
  display: inline-block;
5647
5740
  margin-bottom: var(--spacing-xs);
5648
5741
  word-break: break-word;
@@ -5876,16 +5969,16 @@ function convertRequestDataToDataType(dataType, requestData) {
5876
5969
  }
5877
5970
 
5878
5971
  // src/components/MeshApp.tsx
5879
- var import_design_system29 = require("@uniformdev/design-system");
5972
+ var import_design_system30 = require("@uniformdev/design-system");
5880
5973
 
5881
5974
  // src/hooks/useInitializeUniformMeshSdk.ts
5882
5975
  var import_mesh_sdk = require("@uniformdev/mesh-sdk");
5883
- var import_react58 = require("react");
5976
+ var import_react59 = require("react");
5884
5977
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
5885
- const [error, setError] = (0, import_react58.useState)();
5886
- const [sdk, setSdk] = (0, import_react58.useState)();
5887
- const initializationInProgress = (0, import_react58.useRef)(false);
5888
- (0, import_react58.useEffect)(
5978
+ const [error, setError] = (0, import_react59.useState)();
5979
+ const [sdk, setSdk] = (0, import_react59.useState)();
5980
+ const initializationInProgress = (0, import_react59.useRef)(false);
5981
+ (0, import_react59.useEffect)(
5889
5982
  () => {
5890
5983
  if (typeof window === "undefined" || sdk) {
5891
5984
  return;
@@ -5927,7 +6020,7 @@ var MeshApp = ({
5927
6020
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
5928
6021
  if (initializing || !sdk) {
5929
6022
  const LoadingComponent = loadingComponent;
5930
- return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system29.LoadingIndicator, {});
6023
+ return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.LoadingIndicator, {});
5931
6024
  }
5932
6025
  if (error) {
5933
6026
  const ErrorComponent = errorComponent;
@@ -5937,14 +6030,14 @@ var MeshApp = ({
5937
6030
  throw error;
5938
6031
  }
5939
6032
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
5940
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system29.Theme, {}),
6033
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system30.Theme, {}),
5941
6034
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UniformMeshLocationContextProvider, { children })
5942
6035
  ] });
5943
6036
  };
5944
6037
 
5945
6038
  // src/components/ObjectSearch/DataRefreshButton.tsx
5946
- var import_react59 = require("@emotion/react");
5947
- var import_design_system30 = require("@uniformdev/design-system");
6039
+ var import_react60 = require("@emotion/react");
6040
+ var import_design_system31 = require("@uniformdev/design-system");
5948
6041
  var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
5949
6042
  var DataRefreshButton = ({
5950
6043
  buttonText,
@@ -5952,11 +6045,11 @@ var DataRefreshButton = ({
5952
6045
  onRefreshData,
5953
6046
  ...props
5954
6047
  }) => {
5955
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_design_system30.Button, { buttonType: "primaryInvert", onClick: onRefreshData, disabled: isLoading, ...props, children: [
6048
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_design_system31.Button, { buttonType: "primaryInvert", onClick: onRefreshData, disabled: isLoading, ...props, children: [
5956
6049
  !isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5957
- import_design_system30.LoadingIndicator,
6050
+ import_design_system31.LoadingIndicator,
5958
6051
  {
5959
- css: import_react59.css`
6052
+ css: import_react60.css`
5960
6053
  ${isLoading ? "opacity: 0.2;" : void 0}
5961
6054
  `
5962
6055
  }
@@ -5966,15 +6059,15 @@ var DataRefreshButton = ({
5966
6059
  };
5967
6060
 
5968
6061
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
5969
- var import_react61 = require("@emotion/react");
6062
+ var import_react62 = require("@emotion/react");
5970
6063
  var import_canvas8 = require("@uniformdev/canvas");
5971
- var import_design_system31 = require("@uniformdev/design-system");
6064
+ var import_design_system32 = require("@uniformdev/design-system");
5972
6065
 
5973
6066
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
5974
6067
  var import_canvas7 = require("@uniformdev/canvas");
5975
- var import_react60 = require("react");
6068
+ var import_react61 = require("react");
5976
6069
  var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
5977
- var ObjectSearchContext = (0, import_react60.createContext)({
6070
+ var ObjectSearchContext = (0, import_react61.createContext)({
5978
6071
  onSetQuery: () => {
5979
6072
  },
5980
6073
  onSelectItem: () => {
@@ -5989,15 +6082,15 @@ var ObjectSearchContext = (0, import_react60.createContext)({
5989
6082
  }
5990
6083
  });
5991
6084
  var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
5992
- const [query, setQuery] = (0, import_react60.useState)({
6085
+ const [query, setQuery] = (0, import_react61.useState)({
5993
6086
  contentType: "",
5994
6087
  keyword: ""
5995
6088
  });
5996
6089
  const { flatVariables } = useVariables(true);
5997
- const querySearchDeferred = (0, import_react60.useDeferredValue)(query);
5998
- const [selectedItems, setSelectedItems] = (0, import_react60.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
5999
- const [list, setList] = (0, import_react60.useState)({});
6000
- const onSetQuery = (0, import_react60.useCallback)(
6090
+ const querySearchDeferred = (0, import_react61.useDeferredValue)(query);
6091
+ const [selectedItems, setSelectedItems] = (0, import_react61.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
6092
+ const [list, setList] = (0, import_react61.useState)({});
6093
+ const onSetQuery = (0, import_react61.useCallback)(
6001
6094
  (value2) => {
6002
6095
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
6003
6096
  return setQuery({
@@ -6009,7 +6102,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6009
6102
  },
6010
6103
  [setQuery]
6011
6104
  );
6012
- const onSelectItem = (0, import_react60.useCallback)(
6105
+ const onSelectItem = (0, import_react61.useCallback)(
6013
6106
  (selectedResult) => {
6014
6107
  if (Array.isArray(selectedResult)) {
6015
6108
  setSelectedItems(selectedResult);
@@ -6023,17 +6116,17 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6023
6116
  },
6024
6117
  [setSelectedItems, selectedItems]
6025
6118
  );
6026
- const onRemoveAllSelectedItems = (0, import_react60.useCallback)(() => {
6119
+ const onRemoveAllSelectedItems = (0, import_react61.useCallback)(() => {
6027
6120
  setSelectedItems([]);
6028
6121
  }, [setSelectedItems]);
6029
- const onSetList = (0, import_react60.useCallback)(
6122
+ const onSetList = (0, import_react61.useCallback)(
6030
6123
  (value2) => {
6031
6124
  setList(value2);
6032
6125
  },
6033
6126
  [setList]
6034
6127
  );
6035
- const boundQuery = (0, import_react60.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
6036
- const value = (0, import_react60.useMemo)(
6128
+ const boundQuery = (0, import_react61.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
6129
+ const value = (0, import_react61.useMemo)(
6037
6130
  () => ({
6038
6131
  boundQuery,
6039
6132
  onSetQuery,
@@ -6058,7 +6151,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
6058
6151
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ObjectSearchContext.Provider, { value, children });
6059
6152
  };
6060
6153
  function useObjectSearchContext() {
6061
- return (0, import_react60.useContext)(ObjectSearchContext);
6154
+ return (0, import_react61.useContext)(ObjectSearchContext);
6062
6155
  }
6063
6156
  function bindQuery(query, inputs) {
6064
6157
  const { result, errors } = (0, import_canvas7.bindVariablesToObject)({
@@ -6084,13 +6177,13 @@ var ObjectSearchContainer = ({
6084
6177
  var _a, _b;
6085
6178
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
6086
6179
  const { flatVariables } = useVariables(true);
6087
- const body = /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_design_system31.VerticalRhythm, { children: [
6180
+ const body = /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_design_system32.VerticalRhythm, { children: [
6088
6181
  searchFilters,
6089
6182
  !resultList ? null : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6090
- import_design_system31.ScrollableList,
6183
+ import_design_system32.ScrollableList,
6091
6184
  {
6092
6185
  role: "list",
6093
- css: import_react61.css`
6186
+ css: import_react62.css`
6094
6187
  > div {
6095
6188
  transition: max-height var(--duration-slow) var(--timing-ease-out);
6096
6189
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
@@ -6127,8 +6220,8 @@ var ObjectSearchContainer = ({
6127
6220
  }
6128
6221
  ]);
6129
6222
  };
6130
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system31.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_design_system31.VerticalRhythm, { children: [
6131
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system31.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6223
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system32.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_design_system32.VerticalRhythm, { children: [
6224
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system32.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6132
6225
  InputVariables,
6133
6226
  {
6134
6227
  label,
@@ -6143,12 +6236,12 @@ var ObjectSearchContainer = ({
6143
6236
  };
6144
6237
 
6145
6238
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
6146
- var import_design_system32 = require("@uniformdev/design-system");
6147
- var import_react63 = require("react");
6239
+ var import_design_system33 = require("@uniformdev/design-system");
6240
+ var import_react64 = require("react");
6148
6241
 
6149
6242
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
6150
- var import_react62 = require("@emotion/react");
6151
- var ObjectSearchFilterContainerLabel = import_react62.css`
6243
+ var import_react63 = require("@emotion/react");
6244
+ var ObjectSearchFilterContainerLabel = import_react63.css`
6152
6245
  align-items: center;
6153
6246
  display: flex;
6154
6247
  font-size: var(--fs-sm);
@@ -6156,14 +6249,14 @@ var ObjectSearchFilterContainerLabel = import_react62.css`
6156
6249
  line-height: 1rem;
6157
6250
  margin-bottom: var(--spacing-sm);
6158
6251
  `;
6159
- var ObjectSearchFilterContainer = import_react62.css`
6252
+ var ObjectSearchFilterContainer = import_react63.css`
6160
6253
  display: grid;
6161
6254
  gap: var(--spacing-base);
6162
6255
  `;
6163
- var ObjectSearchFilterDropdownAndTextSearch = import_react62.css`
6256
+ var ObjectSearchFilterDropdownAndTextSearch = import_react63.css`
6164
6257
  grid-template-columns: 0.5fr 1fr;
6165
6258
  `;
6166
- var ObjectSearchFilterGrid = (gridColumns) => import_react62.css`
6259
+ var ObjectSearchFilterGrid = (gridColumns) => import_react63.css`
6167
6260
  display: grid;
6168
6261
  grid-template-columns: ${gridColumns};
6169
6262
  gap: var(--spacing-base);
@@ -6180,7 +6273,7 @@ var ObjectSearchFilter = ({
6180
6273
  selectOptions
6181
6274
  }) => {
6182
6275
  const { query, onSetQuery } = useObjectSearchContext();
6183
- const [searchState, setSearchState] = (0, import_react63.useState)({
6276
+ const [searchState, setSearchState] = (0, import_react64.useState)({
6184
6277
  contentType: "",
6185
6278
  keyword: ""
6186
6279
  });
@@ -6192,7 +6285,7 @@ var ObjectSearchFilter = ({
6192
6285
  };
6193
6286
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("fieldset", { css: [ObjectSearchFilterContainer, ObjectSearchFilterDropdownAndTextSearch], children: [
6194
6287
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6195
- import_design_system32.InputSelect,
6288
+ import_design_system33.InputSelect,
6196
6289
  {
6197
6290
  label: selectLabel,
6198
6291
  showLabel: false,
@@ -6208,7 +6301,7 @@ var ObjectSearchFilter = ({
6208
6301
  }
6209
6302
  ),
6210
6303
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6211
- import_design_system32.InputKeywordSearch,
6304
+ import_design_system33.InputKeywordSearch,
6212
6305
  {
6213
6306
  inputFieldName: searchInputName,
6214
6307
  placeholder: searchInputPlaceholderText,
@@ -6231,12 +6324,12 @@ var ObjectSearchFilterContainer2 = ({ label, children }) => {
6231
6324
  };
6232
6325
 
6233
6326
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
6234
- var import_design_system34 = require("@uniformdev/design-system");
6327
+ var import_design_system35 = require("@uniformdev/design-system");
6235
6328
 
6236
6329
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
6237
- var import_react64 = require("@emotion/react");
6238
- var import_design_system33 = require("@uniformdev/design-system");
6239
- var ObjectListItemContainer = import_react64.css`
6330
+ var import_react65 = require("@emotion/react");
6331
+ var import_design_system34 = require("@uniformdev/design-system");
6332
+ var ObjectListItemContainer = import_react65.css`
6240
6333
  align-items: center;
6241
6334
  border: 1px solid var(--gray-300);
6242
6335
  border-radius: var(--rounded-base);
@@ -6245,12 +6338,12 @@ var ObjectListItemContainer = import_react64.css`
6245
6338
  grid-template-columns: 1fr auto;
6246
6339
  padding: var(--spacing-sm);
6247
6340
  `;
6248
- var ObjectListItemContainerDisabled = import_react64.css`
6341
+ var ObjectListItemContainerDisabled = import_react65.css`
6249
6342
  opacity: var(--opacity-50);
6250
6343
  pointer-events: none;
6251
6344
  `;
6252
- var ObjectListItemLoading = import_react64.css`
6253
- animation: ${import_design_system33.skeletonLoading} 1s linear infinite alternate;
6345
+ var ObjectListItemLoading = import_react65.css`
6346
+ animation: ${import_design_system34.skeletonLoading} 1s linear infinite alternate;
6254
6347
  border-color: transparent;
6255
6348
  min-height: 42px;
6256
6349
  position: relative;
@@ -6273,32 +6366,32 @@ var ObjectListItemLoading = import_react64.css`
6273
6366
  width: 1rem;
6274
6367
  }
6275
6368
  `;
6276
- var ObjectListItemHeadingGroup = import_react64.css`
6369
+ var ObjectListItemHeadingGroup = import_react65.css`
6277
6370
  align-items: center;
6278
6371
  display: grid;
6279
6372
  `;
6280
- var ObjectListItemTitle = import_react64.css`
6373
+ var ObjectListItemTitle = import_react65.css`
6281
6374
  color: var(--brand-secondary-1);
6282
6375
  display: block;
6283
6376
  font-size: var(--fs-sm);
6284
6377
  `;
6285
- var ObjectListItemSubtitle = import_react64.css`
6378
+ var ObjectListItemSubtitle = import_react65.css`
6286
6379
  color: var(--gray-500);
6287
6380
  display: block;
6288
6381
  font-size: var(--fs-xs);
6289
6382
  line-height: 1;
6290
6383
  `;
6291
- var ObjectListItemInfoContainer = import_react64.css`
6384
+ var ObjectListItemInfoContainer = import_react65.css`
6292
6385
  align-items: center;
6293
6386
  display: flex;
6294
6387
  gap: var(--spacing-sm);
6295
6388
  justify-content: center;
6296
6389
  `;
6297
- var ObjectListItemControlledContent = import_react64.css`
6390
+ var ObjectListItemControlledContent = import_react65.css`
6298
6391
  display: flex;
6299
6392
  gap: var(--spacing-sm);
6300
6393
  `;
6301
- var ObjectListItemUnControlledContent = import_react64.css`
6394
+ var ObjectListItemUnControlledContent = import_react65.css`
6302
6395
  margin-top: var(--spacing-sm);
6303
6396
  grid-column: 1 / -1;
6304
6397
  `;
@@ -6351,8 +6444,8 @@ var ObjectSearchListItem = ({
6351
6444
  }
6352
6445
  ),
6353
6446
  /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
6354
- selected ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system34.Chip, { text: "selected", size: "xs" }) : null,
6355
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system34.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6447
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system35.Chip, { text: "selected", size: "xs" }) : null,
6448
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system35.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
6356
6449
  ] }),
6357
6450
  !children ? null : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { css: ObjectListItemUnControlledContent, children })
6358
6451
  ]
@@ -6364,14 +6457,14 @@ var ObjectSearchListItemLoadingSkeleton = () => {
6364
6457
  };
6365
6458
 
6366
6459
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
6367
- var import_design_system36 = require("@uniformdev/design-system");
6460
+ var import_design_system37 = require("@uniformdev/design-system");
6368
6461
  var import_timeago3 = require("timeago.js");
6369
6462
 
6370
6463
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
6371
- var import_react65 = require("@emotion/react");
6372
- var import_design_system35 = require("@uniformdev/design-system");
6373
- var ButtonStyles = import_react65.css`
6374
- ${import_design_system35.button}
6464
+ var import_react66 = require("@emotion/react");
6465
+ var import_design_system36 = require("@uniformdev/design-system");
6466
+ var ButtonStyles = import_react66.css`
6467
+ ${import_design_system36.button}
6375
6468
  background: transparent;
6376
6469
  border: 1px solid var(--brand-secondary-1);
6377
6470
  color: var(--brand-secondary-1);
@@ -6397,7 +6490,7 @@ var ButtonStyles = import_react65.css`
6397
6490
  text-decoration: none;
6398
6491
  }
6399
6492
  `;
6400
- var ButtonIcon = import_react65.css`
6493
+ var ButtonIcon = import_react66.css`
6401
6494
  width: 1rem;
6402
6495
  height: 1rem;
6403
6496
  `;
@@ -6426,8 +6519,8 @@ var LinkButton = ({
6426
6519
  };
6427
6520
 
6428
6521
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
6429
- var import_react66 = require("@emotion/react");
6430
- var ObjectSearchResultItemContainer = import_react66.css`
6522
+ var import_react67 = require("@emotion/react");
6523
+ var ObjectSearchResultItemContainer = import_react67.css`
6431
6524
  align-items: center;
6432
6525
  border: 1px solid var(--gray-300);
6433
6526
  border-radius: var(--rounded-base);
@@ -6443,7 +6536,7 @@ var ObjectSearchResultItemContainer = import_react66.css`
6443
6536
  }
6444
6537
  }
6445
6538
  `;
6446
- var ObjectSearchDragHandle = import_react66.css`
6539
+ var ObjectSearchDragHandle = import_react67.css`
6447
6540
  border-left: 2px dotted var(--gray-300);
6448
6541
  border-right: 2px dotted var(--gray-300);
6449
6542
  position: absolute;
@@ -6452,35 +6545,35 @@ var ObjectSearchDragHandle = import_react66.css`
6452
6545
  transition: opacity var(--duration-fast) var(--timing-ease-out);
6453
6546
  opacity: 0;
6454
6547
  `;
6455
- var ObjectSearchResultItemSubtitle = import_react66.css`
6548
+ var ObjectSearchResultItemSubtitle = import_react67.css`
6456
6549
  color: var(--gray-500);
6457
6550
  display: block;
6458
6551
  font-size: var(--fs-xs);
6459
6552
  line-height: 1;
6460
6553
  `;
6461
- var ObjectSearchResultItemTitle = import_react66.css`
6554
+ var ObjectSearchResultItemTitle = import_react67.css`
6462
6555
  align-items: center;
6463
6556
  color: var(--brand-secondary-1);
6464
6557
  display: flex;
6465
6558
  gap: var(--spacing-xs);
6466
6559
  `;
6467
- var ObjectSearchResultItemTimeStamp = import_react66.css`
6560
+ var ObjectSearchResultItemTimeStamp = import_react67.css`
6468
6561
  color: var(--gray-500);
6469
6562
  font-size: var(--fs-xs);
6470
6563
  `;
6471
- var ObjectSearchAuthorStateGroup = import_react66.css`
6564
+ var ObjectSearchAuthorStateGroup = import_react67.css`
6472
6565
  align-items: center;
6473
6566
  display: flex;
6474
6567
  gap: var(--spacing-sm);
6475
6568
  `;
6476
- var ObjectSearchUpdateGroup = import_react66.css`
6569
+ var ObjectSearchUpdateGroup = import_react67.css`
6477
6570
  display: grid;
6478
6571
  `;
6479
- var ObjectSearchContentContainer = import_react66.css`
6572
+ var ObjectSearchContentContainer = import_react67.css`
6480
6573
  display: flex;
6481
6574
  gap: var(--spacing-base);
6482
6575
  `;
6483
- var ObjectSearchImage = import_react66.css`
6576
+ var ObjectSearchImage = import_react67.css`
6484
6577
  width: 56px;
6485
6578
  object-fit: contain;
6486
6579
  `;
@@ -6518,10 +6611,10 @@ var ObjectSearchResultItem = ({
6518
6611
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { css: ObjectSearchResultItemSubtitle, children: formatedContentType }),
6519
6612
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, children: [
6520
6613
  title != null ? title : name,
6521
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system36.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
6614
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system37.Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
6522
6615
  ] }),
6523
6616
  !createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
6524
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system36.Badge, { ...publishStatus, size: "sm", uppercaseText: true }),
6617
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system37.Badge, { ...publishStatus, size: "sm", uppercaseText: true }),
6525
6618
  !createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
6526
6619
  !createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
6527
6620
  /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("strong", { children: "Last updated: " }),
@@ -6538,36 +6631,36 @@ var ObjectSearchResultItem = ({
6538
6631
  ] }) }),
6539
6632
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
6540
6633
  !editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
6541
- hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system36.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
6634
+ hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_design_system37.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
6542
6635
  ] })
6543
6636
  ] });
6544
6637
  };
6545
6638
 
6546
6639
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
6547
- var import_design_system37 = require("@uniformdev/design-system");
6640
+ var import_design_system38 = require("@uniformdev/design-system");
6548
6641
  var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
6549
6642
 
6550
6643
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
6551
- var import_react67 = require("@emotion/react");
6552
- var ObjectSearchResultListContainer = import_react67.css`
6644
+ var import_react68 = require("@emotion/react");
6645
+ var ObjectSearchResultListContainer = import_react68.css`
6553
6646
  align-items: center;
6554
6647
  display: flex;
6555
6648
  gap: var(--spacing-sm);
6556
6649
  justify-content: space-between;
6557
6650
  `;
6558
- var ObjectSearchDragContainer = import_react67.css`
6651
+ var ObjectSearchDragContainer = import_react68.css`
6559
6652
  margin: 0 0 var(--spacing-sm);
6560
6653
  `;
6561
- var ObjectSearchContainerDragging = import_react67.css`
6654
+ var ObjectSearchContainerDragging = import_react68.css`
6562
6655
  box-shadow: var(--shadow-base);
6563
6656
  opacity: var(--opacity-50);
6564
6657
  `;
6565
- var ObjectSearchResultListCounterContainer = import_react67.css`
6658
+ var ObjectSearchResultListCounterContainer = import_react68.css`
6566
6659
  align-items: center;
6567
6660
  display: flex;
6568
6661
  gap: var(--spacing-sm);
6569
6662
  `;
6570
- var ObjectSearchResultListTitle = import_react67.css`
6663
+ var ObjectSearchResultListTitle = import_react68.css`
6571
6664
  font-weight: var(--fw-bold);
6572
6665
  line-height: 1;
6573
6666
  `;
@@ -6605,12 +6698,12 @@ function ObjectSearchResultList({
6605
6698
  /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
6606
6699
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
6607
6700
  " ",
6608
- !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_design_system37.Counter, { count: selectedListItems.length })
6701
+ !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_design_system38.Counter, { count: selectedListItems.length })
6609
6702
  ] }),
6610
6703
  /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
6611
6704
  additionalButtons,
6612
6705
  hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
6613
- import_design_system37.Button,
6706
+ import_design_system38.Button,
6614
6707
  {
6615
6708
  buttonType: "ghostDestructive",
6616
6709
  size: "xs",
@@ -6655,8 +6748,8 @@ function ObjectSearchResultList({
6655
6748
  }
6656
6749
 
6657
6750
  // src/components/ObjectSearch/QueryFilter.tsx
6658
- var import_design_system38 = require("@uniformdev/design-system");
6659
- var import_react68 = require("react");
6751
+ var import_design_system39 = require("@uniformdev/design-system");
6752
+ var import_react69 = require("react");
6660
6753
  var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
6661
6754
  var QueryFilter = ({
6662
6755
  requireContentType,
@@ -6688,7 +6781,7 @@ var QueryFilter = ({
6688
6781
  }) => {
6689
6782
  var _a, _b, _c, _d;
6690
6783
  const { query, onSetQuery } = useObjectSearchContext();
6691
- const [queryState, setQueryState] = (0, import_react68.useState)({
6784
+ const [queryState, setQueryState] = (0, import_react69.useState)({
6692
6785
  contentType: "",
6693
6786
  keyword: "",
6694
6787
  count: countValue != null ? countValue : 5,
@@ -6699,12 +6792,12 @@ var QueryFilter = ({
6699
6792
  setQueryState((prev) => ({ ...prev, ...value }));
6700
6793
  onSetQuery({ ...query, ...value });
6701
6794
  };
6702
- (0, import_react68.useEffect)(() => {
6795
+ (0, import_react69.useEffect)(() => {
6703
6796
  onSetQuery(queryState);
6704
6797
  }, [onSetQuery, queryState]);
6705
6798
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("fieldset", { children: [
6706
6799
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
6707
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_design_system38.VerticalRhythm, { children: [
6800
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_design_system39.VerticalRhythm, { children: [
6708
6801
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6709
6802
  InputVariables,
6710
6803
  {
@@ -6714,7 +6807,7 @@ var QueryFilter = ({
6714
6807
  disableInlineMenu: true,
6715
6808
  id: "qf_searchText",
6716
6809
  inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6717
- import_design_system38.InputKeywordSearch,
6810
+ import_design_system39.InputKeywordSearch,
6718
6811
  {
6719
6812
  id: "qf_searchText",
6720
6813
  inputFieldName: searchInputName,
@@ -6737,7 +6830,7 @@ var QueryFilter = ({
6737
6830
  onChange: (newType) => handleFilterChange({ contentType: newType }),
6738
6831
  disableInlineMenu: true,
6739
6832
  inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6740
- import_design_system38.InputSelect,
6833
+ import_design_system39.InputSelect,
6741
6834
  {
6742
6835
  id: "qf_contentType",
6743
6836
  label: contentTypeLabel,
@@ -6764,7 +6857,7 @@ var QueryFilter = ({
6764
6857
  onChange: (newCount) => handleFilterChange({ count: newCount }),
6765
6858
  disableInlineMenu: true,
6766
6859
  inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6767
- import_design_system38.Input,
6860
+ import_design_system39.Input,
6768
6861
  {
6769
6862
  id: "qf_count",
6770
6863
  label: countLabel,
@@ -6788,7 +6881,7 @@ var QueryFilter = ({
6788
6881
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
6789
6882
  disableInlineMenu: true,
6790
6883
  inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6791
- import_design_system38.InputSelect,
6884
+ import_design_system39.InputSelect,
6792
6885
  {
6793
6886
  label: sortLabel,
6794
6887
  id: "qf_sortBy",
@@ -6818,7 +6911,7 @@ var QueryFilter = ({
6818
6911
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
6819
6912
  disableInlineMenu: true,
6820
6913
  inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6821
- import_design_system38.InputSelect,
6914
+ import_design_system39.InputSelect,
6822
6915
  {
6823
6916
  label: sortOrderLabel,
6824
6917
  id: "qf_sortOrder",
@@ -6842,7 +6935,7 @@ var QueryFilter = ({
6842
6935
  };
6843
6936
 
6844
6937
  // src/components/ParamTypeDynamicDataProvider.tsx
6845
- var import_react69 = require("react");
6938
+ var import_react70 = require("react");
6846
6939
  var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
6847
6940
  function ParamTypeDynamicDataProvider(props) {
6848
6941
  const { children } = props;
@@ -6851,7 +6944,7 @@ function ParamTypeDynamicDataProvider(props) {
6851
6944
  } = useMeshLocation("paramType");
6852
6945
  const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
6853
6946
  const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
6854
- const variables = (0, import_react69.useMemo)(
6947
+ const variables = (0, import_react70.useMemo)(
6855
6948
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
6856
6949
  [dynamicInputsAsVariables, connectedDataAsVariables]
6857
6950
  );
@@ -6864,9 +6957,9 @@ var JsonMeshVariableEditor = ({
6864
6957
  variable,
6865
6958
  context
6866
6959
  }) => {
6867
- const sillyRef = (0, import_react69.useRef)(false);
6960
+ const sillyRef = (0, import_react70.useRef)(false);
6868
6961
  const { editConnectedData } = useMeshLocation("paramType");
6869
- (0, import_react69.useEffect)(() => {
6962
+ (0, import_react70.useEffect)(() => {
6870
6963
  if (sillyRef.current) {
6871
6964
  return;
6872
6965
  }
@@ -6903,7 +6996,7 @@ function createLocationValidator(setValue, validate) {
6903
6996
  }
6904
6997
 
6905
6998
  // src/index.ts
6906
- var import_design_system39 = require("@uniformdev/design-system");
6999
+ var import_design_system40 = require("@uniformdev/design-system");
6907
7000
  __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
6908
7001
  // Annotate the CommonJS export names for ESM import in node:
6909
7002
  0 && (module.exports = {