@uniformdev/mesh-sdk-react 19.79.1-alpha.18 → 19.79.1-alpha.26

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.esm.js CHANGED
@@ -2933,9 +2933,9 @@ import { LoadingIndicator as LoadingIndicator2 } from "@uniformdev/design-system
2933
2933
  import {
2934
2934
  $getNearestNodeFromDOMNode,
2935
2935
  $getNodeByKey as $getNodeByKey2,
2936
- $getSelection,
2936
+ $getSelection as $getSelection2,
2937
2937
  $isDecoratorNode,
2938
- $isNodeSelection,
2938
+ $isNodeSelection as $isNodeSelection2,
2939
2939
  $isRangeSelection,
2940
2940
  COMMAND_PRIORITY_EDITOR,
2941
2941
  COMMAND_PRIORITY_LOW,
@@ -2945,7 +2945,7 @@ import {
2945
2945
  KEY_BACKSPACE_COMMAND,
2946
2946
  KEY_DELETE_COMMAND
2947
2947
  } from "lexical";
2948
- import { useCallback as useCallback2, useEffect as useEffect8 } from "react";
2948
+ import { useCallback as useCallback3, useEffect as useEffect8 } from "react";
2949
2949
 
2950
2950
  // src/components/Variables/util/prettifyBindExpression.tsx
2951
2951
  function prettifyBindExpression(bindExpression) {
@@ -3026,12 +3026,15 @@ import { dequal as dequal2 } from "dequal/lite";
3026
3026
  import {
3027
3027
  $createTextNode,
3028
3028
  $getNodeByKey,
3029
+ $getSelection,
3029
3030
  $insertNodes,
3031
+ $isNodeSelection,
3030
3032
  $nodesOfType as $nodesOfType2,
3033
+ $setSelection,
3031
3034
  COMMAND_PRIORITY_NORMAL,
3032
3035
  createCommand
3033
3036
  } from "lexical";
3034
- import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as useState10 } from "react";
3037
+ import { useCallback as useCallback2, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef10, useState as useState10 } from "react";
3035
3038
  import { createPortal } from "react-dom";
3036
3039
 
3037
3040
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
@@ -3063,12 +3066,56 @@ var variablesTipText = css18`
3063
3066
  padding: 0 var(--spacing-sm);
3064
3067
  `;
3065
3068
 
3066
- // src/components/Variables/useVariableEditor.ts
3067
- import { useEffect as useEffect6, useState as useState9 } from "react";
3068
-
3069
3069
  // src/components/Variables/VariablesProvider.tsx
3070
3070
  import mitt from "mitt";
3071
- import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as useState8 } from "react";
3071
+ import { createContext as createContext3, useContext as useContext5, useMemo as useMemo7, useState as useState9 } from "react";
3072
+
3073
+ // src/components/Variables/util/useVariableEditTransaction.ts
3074
+ import { useCallback, useEffect as useEffect6, useState as useState8 } from "react";
3075
+ function useVariableEditTransaction({
3076
+ events,
3077
+ dispatch,
3078
+ isEditing,
3079
+ variables
3080
+ }) {
3081
+ const [isEditingBinding, setIsEditingBinding] = useState8();
3082
+ useEffect6(() => {
3083
+ if (!isEditingBinding) {
3084
+ return;
3085
+ }
3086
+ const fn = (e) => {
3087
+ isEditingBinding.resolve(e);
3088
+ setIsEditingBinding(void 0);
3089
+ };
3090
+ events.on("editCompleted", fn);
3091
+ return () => events.off("editCompleted", fn);
3092
+ }, [events, isEditingBinding, variables]);
3093
+ useEffect6(() => {
3094
+ if (!isEditing) {
3095
+ if (isEditingBinding) {
3096
+ isEditingBinding.resolve({ canceled: true });
3097
+ }
3098
+ setIsEditingBinding(void 0);
3099
+ }
3100
+ }, [isEditing, isEditingBinding]);
3101
+ return useCallback(
3102
+ async function editVariableTxn(variable, context) {
3103
+ if (isEditingBinding) {
3104
+ dispatch({ type: "cancelEdit" });
3105
+ }
3106
+ return new Promise((resolve) => {
3107
+ setTimeout(() => {
3108
+ setIsEditingBinding({
3109
+ resolve,
3110
+ variable
3111
+ });
3112
+ dispatch({ type: "edit", variable, context });
3113
+ });
3114
+ });
3115
+ },
3116
+ [dispatch, isEditingBinding]
3117
+ );
3118
+ }
3072
3119
 
3073
3120
  // src/components/Variables/VariableEditor.tsx
3074
3121
  import { zodResolver } from "@hookform/resolvers/zod";
@@ -3220,8 +3267,8 @@ function VariablesProvider({
3220
3267
  children,
3221
3268
  knownUndefinedValues = {}
3222
3269
  }) {
3223
- const [editing, setEditing] = useState8();
3224
- const [editingContext, setEditingContext] = useState8();
3270
+ const [editing, setEditing] = useState9();
3271
+ const [editingContext, setEditingContext] = useState9();
3225
3272
  const events = useMemo7(
3226
3273
  () => mitt(),
3227
3274
  []
@@ -3268,16 +3315,23 @@ function VariablesProvider({
3268
3315
  }),
3269
3316
  [onChange, readOnly, value]
3270
3317
  );
3318
+ const editVariableTxn = useVariableEditTransaction({
3319
+ events,
3320
+ dispatch: valueBasedContextValue.dispatch,
3321
+ isEditing: typeof editing !== "undefined",
3322
+ variables: value
3323
+ });
3271
3324
  const contextValue = useMemo7(() => {
3272
3325
  return {
3273
3326
  ...valueBasedContextValue,
3327
+ editVariableTxn,
3274
3328
  isEditing: typeof editing !== "undefined",
3275
3329
  events,
3276
3330
  canDispatch: true,
3277
3331
  knownUndefinedValues,
3278
3332
  isLoading: !!isLoading
3279
3333
  };
3280
- }, [editing, events, knownUndefinedValues, valueBasedContextValue, isLoading]);
3334
+ }, [valueBasedContextValue, editVariableTxn, editing, events, knownUndefinedValues, isLoading]);
3281
3335
  return /* @__PURE__ */ jsxs17(VariablesContext.Provider, { value: contextValue, children: [
3282
3336
  children,
3283
3337
  typeof editing !== "undefined" ? /* @__PURE__ */ jsx32(
@@ -3316,6 +3370,9 @@ function useVariables(returnEmptyWithoutProvider = false) {
3316
3370
  dispatch: () => {
3317
3371
  throw new Error("No VariablesProvider present");
3318
3372
  },
3373
+ editVariableTxn: async () => {
3374
+ throw new Error("No VariablesProvider present");
3375
+ },
3319
3376
  events: mitt(),
3320
3377
  isEditing: false,
3321
3378
  variables: {},
@@ -3338,39 +3395,13 @@ function flattenVariables(variables) {
3338
3395
 
3339
3396
  // src/components/Variables/useVariableEditor.ts
3340
3397
  function useVariableEditor() {
3341
- const { variables, events, canDispatch, dispatch, isEditing } = useVariables(true);
3342
- const [isEditingBinding, setIsEditingBinding] = useState9();
3343
- useEffect6(() => {
3344
- if (!canDispatch || !isEditingBinding) {
3345
- return;
3346
- }
3347
- const fn = (e) => {
3348
- isEditingBinding.resolve(e);
3349
- setIsEditingBinding(void 0);
3350
- };
3351
- events.on("editCompleted", fn);
3352
- return () => events.off("editCompleted", fn);
3353
- }, [canDispatch, events, isEditingBinding, variables]);
3354
- useEffect6(() => {
3355
- if (!isEditing) {
3356
- setIsEditingBinding(void 0);
3357
- }
3358
- }, [isEditing]);
3398
+ const { editVariableTxn, canDispatch } = useVariables(true);
3359
3399
  return {
3360
3400
  async editVariable(variable, context) {
3361
3401
  if (!canDispatch) {
3362
3402
  throw new Error("Cannot edit variable. VariablesProvider is not mounted.");
3363
3403
  }
3364
- if (isEditingBinding) {
3365
- throw new Error("Cannot edit variable. Another variable is already being edited.");
3366
- }
3367
- return new Promise((resolve) => {
3368
- setIsEditingBinding({
3369
- resolve,
3370
- variable
3371
- });
3372
- dispatch({ type: "edit", variable, context });
3373
- });
3404
+ return editVariableTxn(variable, context);
3374
3405
  }
3375
3406
  };
3376
3407
  }
@@ -3467,7 +3498,7 @@ function useVariablesMenu({
3467
3498
  getEditorContext
3468
3499
  }) {
3469
3500
  const { variables, canDispatch, readOnly } = useVariables(true);
3470
- const canEditVariable = useCallback(
3501
+ const canEditVariable = useCallback2(
3471
3502
  (name, variable) => (
3472
3503
  // name === '' means new var. Add var perms computed by menu options.
3473
3504
  name === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -3497,7 +3528,7 @@ function useVariablesMenu({
3497
3528
  );
3498
3529
  return { menuOptions: menuOptions2, groupedVariables: groupedVariables2 };
3499
3530
  }, [variables, filterVariable, getEditorContext, canAddVariable, showAddVariableMenuOption]);
3500
- const onSelect = useCallback(
3531
+ const onSelect = useCallback2(
3501
3532
  ({ queryString, value, nodeToReplace, editor, overwriteExistingValue }) => {
3502
3533
  if (value === ADD_VARIABLE_OPTION) {
3503
3534
  editor.update(() => {
@@ -3547,7 +3578,7 @@ function VariablesPlugin({
3547
3578
  const { variables, dispatch, isEditing, canDispatch, readOnly, knownUndefinedValues, isLoading } = useVariables(true);
3548
3579
  const variablesRef = useRef10({ variables, knownUndefinedValues, isLoading });
3549
3580
  variablesRef.current = { variables, knownUndefinedValues, isLoading };
3550
- const canEditVariable = useCallback(
3581
+ const canEditVariable = useCallback2(
3551
3582
  (name, variable) => (
3552
3583
  // name === '' means new var. Add var perms computed by menu options.
3553
3584
  name === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -3581,7 +3612,7 @@ function VariablesPlugin({
3581
3612
  )
3582
3613
  };
3583
3614
  }, [queryString, groupedVariables, menuOptions]);
3584
- const onSelectOption = useCallback(
3615
+ const onSelectOption = useCallback2(
3585
3616
  (selectedOption, nodeToReplace, closeMenu) => {
3586
3617
  onSelect({
3587
3618
  queryString: queryString != null ? queryString : void 0,
@@ -3608,6 +3639,15 @@ function VariablesPlugin({
3608
3639
  editor.dispatchCommand(DISCONNECT_VARIABLE_COMMAND, { sourceKey });
3609
3640
  return;
3610
3641
  }
3642
+ editor.update(() => {
3643
+ const selection = $getSelection();
3644
+ if ($isNodeSelection(selection)) {
3645
+ const selectedNodes = selection.getNodes();
3646
+ if (selectedNodes.every((node) => $isVariableNode(node))) {
3647
+ $setSelection(null);
3648
+ }
3649
+ }
3650
+ });
3611
3651
  return;
3612
3652
  }
3613
3653
  editor.dispatchCommand(INSERT_VARIABLE_COMMAND, {
@@ -3715,7 +3755,7 @@ function VariablesPlugin({
3715
3755
  editVariable,
3716
3756
  replaceValueOnVariableInsert
3717
3757
  ]);
3718
- const updateExistingNodeIfChanged = useCallback(
3758
+ const updateExistingNodeIfChanged = useCallback2(
3719
3759
  (variableNode) => {
3720
3760
  var _a, _b, _c;
3721
3761
  const targetVar = variablesRef.current.variables[variableNode.reference];
@@ -3914,9 +3954,9 @@ function VariableNodeComponent({
3914
3954
  const [editor] = useLexicalComposerContext3();
3915
3955
  const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey);
3916
3956
  const readOnly = !editor.isEditable();
3917
- const onDelete = useCallback2(
3957
+ const onDelete = useCallback3(
3918
3958
  (event) => {
3919
- if (isSelected && $isNodeSelection($getSelection())) {
3959
+ if (isSelected && $isNodeSelection2($getSelection2())) {
3920
3960
  event.preventDefault();
3921
3961
  const node = $getNodeByKey2(nodeKey);
3922
3962
  if ($isVariableNode(node)) {
@@ -3939,8 +3979,8 @@ function VariableNodeComponent({
3939
3979
  editor.registerCommand(
3940
3980
  KEY_ARROW_LEFT_COMMAND,
3941
3981
  (event) => {
3942
- const selection = $getSelection();
3943
- if ($isNodeSelection(selection)) {
3982
+ const selection = $getSelection2();
3983
+ if ($isNodeSelection2(selection)) {
3944
3984
  const nodes = selection.getNodes();
3945
3985
  if (nodes.length > 0) {
3946
3986
  event.preventDefault();
@@ -3966,8 +4006,8 @@ function VariableNodeComponent({
3966
4006
  editor.registerCommand(
3967
4007
  KEY_ARROW_RIGHT_COMMAND,
3968
4008
  (event) => {
3969
- const selection = $getSelection();
3970
- if ($isNodeSelection(selection) && !$isTargetWithinDecorator(event.target)) {
4009
+ const selection = $getSelection2();
4010
+ if ($isNodeSelection2(selection) && !$isTargetWithinDecorator(event.target)) {
3971
4011
  const nodes = selection.getNodes();
3972
4012
  if (nodes.length > 0) {
3973
4013
  event.preventDefault();
@@ -4015,7 +4055,14 @@ function $isTargetWithinDecorator(target) {
4015
4055
  }
4016
4056
 
4017
4057
  // src/components/Variables/InputVariables.tsx
4018
- import { Caption, ErrorMessage, InfoMessage, WarningMessage } from "@uniformdev/design-system";
4058
+ import { css as css24 } from "@emotion/react";
4059
+ import {
4060
+ Caption,
4061
+ ErrorMessage,
4062
+ HorizontalRhythm as HorizontalRhythm4,
4063
+ InfoMessage,
4064
+ WarningMessage
4065
+ } from "@uniformdev/design-system";
4019
4066
  import { useState as useState13 } from "react";
4020
4067
  import { v4 as v42 } from "uuid";
4021
4068
 
@@ -4036,7 +4083,7 @@ function EditorRefPlugin({
4036
4083
  // src/components/Variables/composer/PasteTransformerPlugin.tsx
4037
4084
  import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
4038
4085
  import { mergeRegister as mergeRegister3 } from "@lexical/utils";
4039
- import { $getSelection as $getSelection2, $isRangeSelection as $isRangeSelection2, COMMAND_PRIORITY_HIGH, PASTE_COMMAND } from "lexical";
4086
+ import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection2, COMMAND_PRIORITY_HIGH, PASTE_COMMAND } from "lexical";
4040
4087
  import { useEffect as useEffect9 } from "react";
4041
4088
  function PasteTransformerPlugin({ transformPaste }) {
4042
4089
  const [editor] = useLexicalComposerContext5();
@@ -4046,7 +4093,7 @@ function PasteTransformerPlugin({ transformPaste }) {
4046
4093
  PASTE_COMMAND,
4047
4094
  (event) => {
4048
4095
  var _a;
4049
- const selection = $getSelection2();
4096
+ const selection = $getSelection3();
4050
4097
  const pastedText = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain");
4051
4098
  if (pastedText && transformPaste && $isRangeSelection2(selection)) {
4052
4099
  const result = transformPaste(pastedText);
@@ -4140,6 +4187,99 @@ var placeholderCompact = css21`
4140
4187
  inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
4141
4188
  `;
4142
4189
 
4190
+ // src/components/Variables/styles/ParameterVariables.styles.ts
4191
+ import { css as css22 } from "@emotion/react";
4192
+ import { scrollbarStyles as scrollbarStyles3 } from "@uniformdev/design-system";
4193
+ var variableBindButton = css22`
4194
+ align-items: center;
4195
+ border: none;
4196
+ border-radius: var(--rounded-base);
4197
+ background: none;
4198
+ display: flex;
4199
+ height: 1.2rem;
4200
+ padding: var(--spacing-2xs);
4201
+ transition: background var(--duration-fast) var(--timing-ease-out),
4202
+ color var(--duration-fast) var(--timing-ease-out);
4203
+ width: 1.2rem;
4204
+
4205
+ &:hover,
4206
+ &[aria-pressed='true']:not(:disabled) {
4207
+ background: var(--brand-secondary-3);
4208
+ color: var(--white);
4209
+ }
4210
+
4211
+ &[aria-disabled='true'] {
4212
+ background: none;
4213
+ color: currentColor;
4214
+ }
4215
+
4216
+ // fixes menu resizing issue within iframes
4217
+ // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4218
+ + [role='menu'] {
4219
+ max-height: unset;
4220
+ }
4221
+ `;
4222
+ var input2 = css22`
4223
+ display: block;
4224
+ appearance: none;
4225
+ box-sizing: border-box;
4226
+ background: var(--white);
4227
+ border: 1px solid var(--gray-200);
4228
+ border-radius: var(--rounded-sm);
4229
+ color: var(--gray-700);
4230
+ font-size: var(--fs-sm);
4231
+ line-height: 1.5;
4232
+ min-height: 2rem;
4233
+ padding: var(--spacing-sm);
4234
+ width: 100%;
4235
+ position: relative;
4236
+ white-space: normal;
4237
+ transition-property: background, border-color, color, box-shadow, border-radius;
4238
+ transition-duration: var(--duration-fast);
4239
+ transition-timing-function: var(--timing-ease-out);
4240
+
4241
+ &::placeholder {
4242
+ color: var(--gray-400);
4243
+ }
4244
+
4245
+ &:focus,
4246
+ &:focus-within {
4247
+ border-radius: var(--rounded-sm);
4248
+ box-shadow: var(--elevation-100);
4249
+ border: 1px solid var(--accent-dark-active);
4250
+ outline: none;
4251
+ }
4252
+ &:hover {
4253
+ border: 1px solid var(--accent-dark-hover);
4254
+ }
4255
+
4256
+ &:disabled,
4257
+ &:disabled::placeholder,
4258
+ &:disabled:hover {
4259
+ border-radius: var(--rounded-sm);
4260
+ cursor: not-allowed;
4261
+ color: var(--gray-400);
4262
+ }
4263
+
4264
+ &[readonly],
4265
+ &[contenteditable='false'] {
4266
+ cursor: not-allowed;
4267
+ color: var(--gray-400);
4268
+ }
4269
+
4270
+ > p {
4271
+ margin: 0;
4272
+ }
4273
+ `;
4274
+ var inputMultiLine = (lines) => css22`
4275
+ ${scrollbarStyles3}
4276
+ // 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
4277
+ // as the text looked to close to the bottom of the input
4278
+ height: calc(${lines * 1.5}em + var(--spacing-sm) + var(--spacing-xs));
4279
+ resize: vertical;
4280
+ overflow: auto;
4281
+ `;
4282
+
4143
4283
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
4144
4284
  import * as React10 from "react";
4145
4285
  import { useMemo as useMemo9 } from "react";
@@ -4218,15 +4358,15 @@ function useInputVariablesState({
4218
4358
  }
4219
4359
 
4220
4360
  // src/components/Variables/toolbox/VariableField.styles.ts
4221
- import { css as css22 } from "@emotion/react";
4222
- var labelText = css22`
4361
+ import { css as css23 } from "@emotion/react";
4362
+ var labelText = css23`
4223
4363
  align-items: center;
4224
4364
  display: flex;
4225
4365
  gap: var(--spacing-xs);
4226
4366
  font-weight: var(--fw-regular);
4227
4367
  margin: 0 0 var(--spacing-xs);
4228
4368
  `;
4229
- var variableBindButton = css22`
4369
+ var variableBindButton2 = css23`
4230
4370
  align-items: center;
4231
4371
  border: none;
4232
4372
  border-radius: var(--rounded-base);
@@ -4269,6 +4409,7 @@ function SelectVariableMenu({
4269
4409
  tip,
4270
4410
  getEditorContext,
4271
4411
  menuTooltip = "Insert variable",
4412
+ portal,
4272
4413
  filterVariable
4273
4414
  }) {
4274
4415
  const { variables, canDispatch, readOnly } = useVariables(true);
@@ -4283,8 +4424,8 @@ function SelectVariableMenu({
4283
4424
  return /* @__PURE__ */ jsxs19(
4284
4425
  Menu2,
4285
4426
  {
4286
- placement: "bottom-start",
4287
- withoutPortal: true,
4427
+ placement: portal ? "bottom-end" : "bottom-start",
4428
+ portal,
4288
4429
  menuTrigger: /* @__PURE__ */ jsx35(
4289
4430
  "button",
4290
4431
  {
@@ -4388,7 +4529,7 @@ function VariableField({
4388
4529
  VariablesComposerVariableMenu,
4389
4530
  {
4390
4531
  ...selectVariableMenuOptions,
4391
- buttonCss: [variableBindButton, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
4532
+ buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
4392
4533
  buttonProps: isActive ? { "aria-pressed": "true" } : void 0
4393
4534
  }
4394
4535
  ) : null;
@@ -4539,8 +4680,8 @@ import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
4539
4680
  import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
4540
4681
  import { mergeRegister as mergeRegister4, objectKlassEquals } from "@lexical/utils";
4541
4682
  import {
4542
- $getSelection as $getSelection3,
4543
- $isNodeSelection as $isNodeSelection2,
4683
+ $getSelection as $getSelection4,
4684
+ $isNodeSelection as $isNodeSelection3,
4544
4685
  $isRangeSelection as $isRangeSelection3,
4545
4686
  COMMAND_PRIORITY_HIGH as COMMAND_PRIORITY_HIGH2,
4546
4687
  COPY_COMMAND,
@@ -4550,7 +4691,7 @@ import {
4550
4691
  import { useEffect as useEffect13 } from "react";
4551
4692
  import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4552
4693
  function VariablesComposerInput({
4553
- css: css37,
4694
+ css: css38,
4554
4695
  placeholder,
4555
4696
  ...contentEditableProps
4556
4697
  }) {
@@ -4590,10 +4731,10 @@ function RichishCopyAndPastePlugin() {
4590
4731
  objectKlassEquals(event, ClipboardEvent) ? event : null
4591
4732
  );
4592
4733
  editor.update(() => {
4593
- const selection = $getSelection3();
4734
+ const selection = $getSelection4();
4594
4735
  if ($isRangeSelection3(selection)) {
4595
4736
  selection.removeText();
4596
- } else if ($isNodeSelection2(selection)) {
4737
+ } else if ($isNodeSelection3(selection)) {
4597
4738
  selection.getNodes().forEach((node) => node.remove());
4598
4739
  }
4599
4740
  });
@@ -4604,12 +4745,12 @@ function RichishCopyAndPastePlugin() {
4604
4745
  editor.registerCommand(
4605
4746
  PASTE_COMMAND2,
4606
4747
  (event) => {
4607
- const selection = $getSelection3();
4748
+ const selection = $getSelection4();
4608
4749
  if ($isRangeSelection3(selection)) {
4609
4750
  event.preventDefault();
4610
4751
  editor.update(
4611
4752
  () => {
4612
- const selection2 = $getSelection3();
4753
+ const selection2 = $getSelection4();
4613
4754
  const clipboardData = event instanceof InputEvent || event instanceof KeyboardEvent ? null : event.clipboardData;
4614
4755
  if (clipboardData != null && $isRangeSelection3(selection2)) {
4615
4756
  const lexicalString = clipboardData.getData("application/x-lexical-editor");
@@ -4653,6 +4794,7 @@ function InputVariables(props) {
4653
4794
  value,
4654
4795
  enableEditingVariables,
4655
4796
  disableInlineMenu,
4797
+ showMenuPosition,
4656
4798
  onChange,
4657
4799
  transformPaste,
4658
4800
  showAddVariableMenuOption,
@@ -4669,7 +4811,8 @@ function InputVariables(props) {
4669
4811
  disabled,
4670
4812
  editorRef,
4671
4813
  filterVariable,
4672
- styleVariant = "default"
4814
+ styleVariant = "default",
4815
+ renderMenuInPortal
4673
4816
  } = props;
4674
4817
  const [finalId] = useState13(id != null ? id : () => v42());
4675
4818
  const { dispatch, canDispatch, isEditing } = useVariables(true);
@@ -4685,33 +4828,58 @@ function InputVariables(props) {
4685
4828
  },
4686
4829
  css: disabled ? inputDisabled : "",
4687
4830
  children: [
4688
- useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx40(
4689
- InputVariablesOverlayMenu,
4831
+ /* @__PURE__ */ jsxs23(
4832
+ HorizontalRhythm4,
4690
4833
  {
4691
- ...sharedMenuProps,
4692
- disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
4693
- replaceValueOnVariableInsert: useInputWithNoVariables,
4694
- useInputWhenNoVariables: useInputWithNoVariables,
4695
- children: /* @__PURE__ */ jsx40(
4696
- VariablesComposerInput,
4697
- {
4698
- id: finalId,
4699
- "aria-label": ariaLabel,
4700
- "data-testid": dataTestId ? dataTestId : "input-container",
4701
- "data-text-value": value,
4702
- css: [input, styleVariant === "compact" ? inputCompact : null],
4703
- placeholder: placeholder ? /* @__PURE__ */ jsx40(
4704
- Caption,
4705
- {
4706
- css: [
4707
- placeholderCaption,
4708
- styleVariant === "compact" ? placeholderCompact : null
4709
- ],
4710
- children: placeholder
4711
- }
4712
- ) : void 0
4713
- }
4714
- )
4834
+ align: "center",
4835
+ gap: "xs",
4836
+ css: css24`
4837
+ & > div:first-child {
4838
+ flex-grow: 1;
4839
+ }
4840
+ `,
4841
+ children: [
4842
+ useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx40(
4843
+ InputVariablesOverlayMenu,
4844
+ {
4845
+ ...sharedMenuProps,
4846
+ disabled: disableVariablesForReals || showMenuPosition && showMenuPosition !== "label" || disableInlineMenu === true || disableInlineMenu === "by-input",
4847
+ portal: renderMenuInPortal,
4848
+ replaceValueOnVariableInsert: useInputWithNoVariables,
4849
+ useInputWhenNoVariables: useInputWithNoVariables,
4850
+ children: /* @__PURE__ */ jsx40(
4851
+ VariablesComposerInput,
4852
+ {
4853
+ id: finalId,
4854
+ "aria-label": ariaLabel,
4855
+ "data-testid": dataTestId ? dataTestId : "input-container",
4856
+ "data-text-value": value,
4857
+ css: [input, styleVariant === "compact" ? inputCompact : null],
4858
+ placeholder: placeholder ? /* @__PURE__ */ jsx40(
4859
+ Caption,
4860
+ {
4861
+ css: [
4862
+ placeholderCaption,
4863
+ styleVariant === "compact" ? placeholderCompact : null
4864
+ ],
4865
+ children: placeholder
4866
+ }
4867
+ ) : void 0
4868
+ }
4869
+ )
4870
+ }
4871
+ ),
4872
+ disableVariablesForReals || showMenuPosition !== "inline-right" ? null : /* @__PURE__ */ jsx40(
4873
+ VariablesComposerVariableMenu,
4874
+ {
4875
+ ...sharedMenuProps,
4876
+ buttonCss: variableBindButton,
4877
+ tip: useInputWithNoVariables ? void 0 : "Tip: access this list by typing $$",
4878
+ buttonProps: hadVariablesInValue ? { "aria-pressed": "true" } : void 0,
4879
+ replaceValueOnVariableInsert: useInputWithNoVariables
4880
+ }
4881
+ )
4882
+ ]
4715
4883
  }
4716
4884
  ),
4717
4885
  caption ? /* @__PURE__ */ jsx40(Caption, { children: caption }) : null,
@@ -4733,7 +4901,7 @@ function InputVariables(props) {
4733
4901
  },
4734
4902
  id: finalId,
4735
4903
  isActive: hadVariablesInValue,
4736
- disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
4904
+ disableVariables: disableVariablesForReals || showMenuPosition && showMenuPosition !== "label" || disableInlineMenu === true || disableInlineMenu === "by-label",
4737
4905
  children: input3
4738
4906
  }
4739
4907
  );
@@ -4765,6 +4933,7 @@ function InputVariablesOverlayMenu({
4765
4933
  children,
4766
4934
  disabled,
4767
4935
  useInputWhenNoVariables,
4936
+ portal,
4768
4937
  ...props
4769
4938
  }) {
4770
4939
  if (disabled) {
@@ -4776,6 +4945,7 @@ function InputVariablesOverlayMenu({
4776
4945
  VariablesComposerVariableMenu,
4777
4946
  {
4778
4947
  ...props,
4948
+ portal,
4779
4949
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4780
4950
  buttonCss: menuBtn2
4781
4951
  }
@@ -4786,103 +4956,8 @@ function InputVariablesOverlayMenu({
4786
4956
  // src/components/Variables/ParameterConnectionIndicator.tsx
4787
4957
  import { CgUsbC as CgUsbC2 } from "@react-icons/all-files/cg/CgUsbC";
4788
4958
  import { bindVariablesToObject } from "@uniformdev/canvas";
4789
- import { HorizontalRhythm as HorizontalRhythm4, Menu as Menu3 } from "@uniformdev/design-system";
4959
+ import { HorizontalRhythm as HorizontalRhythm5, Menu as Menu3 } from "@uniformdev/design-system";
4790
4960
  import { useMemo as useMemo11 } from "react";
4791
-
4792
- // src/components/Variables/styles/ParameterVariables.styles.ts
4793
- import { css as css23 } from "@emotion/react";
4794
- import { scrollbarStyles as scrollbarStyles3 } from "@uniformdev/design-system";
4795
- var variableBindButton2 = css23`
4796
- align-items: center;
4797
- border: none;
4798
- border-radius: var(--rounded-base);
4799
- background: none;
4800
- display: flex;
4801
- height: 1.2rem;
4802
- padding: var(--spacing-2xs);
4803
- transition: background var(--duration-fast) var(--timing-ease-out),
4804
- color var(--duration-fast) var(--timing-ease-out);
4805
- width: 1.2rem;
4806
-
4807
- &:hover,
4808
- &[aria-pressed='true']:not(:disabled) {
4809
- background: var(--brand-secondary-3);
4810
- color: var(--white);
4811
- }
4812
-
4813
- &[aria-disabled='true'] {
4814
- background: none;
4815
- color: currentColor;
4816
- }
4817
-
4818
- // fixes menu resizing issue within iframes
4819
- // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4820
- + [role='menu'] {
4821
- max-height: unset;
4822
- }
4823
- `;
4824
- var input2 = css23`
4825
- display: block;
4826
- appearance: none;
4827
- box-sizing: border-box;
4828
- background: var(--white);
4829
- border: 1px solid var(--gray-200);
4830
- border-radius: var(--rounded-sm);
4831
- color: var(--gray-700);
4832
- font-size: var(--fs-sm);
4833
- line-height: 1.5;
4834
- min-height: 2rem;
4835
- padding: var(--spacing-sm);
4836
- width: 100%;
4837
- position: relative;
4838
- white-space: normal;
4839
- transition-property: background, border-color, color, box-shadow, border-radius;
4840
- transition-duration: var(--duration-fast);
4841
- transition-timing-function: var(--timing-ease-out);
4842
-
4843
- &::placeholder {
4844
- color: var(--gray-400);
4845
- }
4846
-
4847
- &:focus,
4848
- &:focus-within {
4849
- border-radius: var(--rounded-sm);
4850
- box-shadow: var(--elevation-100);
4851
- border: 1px solid var(--accent-dark-active);
4852
- outline: none;
4853
- }
4854
- &:hover {
4855
- border: 1px solid var(--accent-dark-hover);
4856
- }
4857
-
4858
- &:disabled,
4859
- &:disabled::placeholder,
4860
- &:disabled:hover {
4861
- border-radius: var(--rounded-sm);
4862
- cursor: not-allowed;
4863
- color: var(--gray-400);
4864
- }
4865
-
4866
- &[readonly],
4867
- &[contenteditable='false'] {
4868
- cursor: not-allowed;
4869
- color: var(--gray-400);
4870
- }
4871
-
4872
- > p {
4873
- margin: 0;
4874
- }
4875
- `;
4876
- var inputMultiLine = (lines) => css23`
4877
- ${scrollbarStyles3}
4878
- // 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
4879
- // as the text looked to close to the bottom of the input
4880
- height: calc(${lines * 1.5}em + var(--spacing-sm) + var(--spacing-xs));
4881
- resize: vertical;
4882
- overflow: auto;
4883
- `;
4884
-
4885
- // src/components/Variables/ParameterConnectionIndicator.tsx
4886
4961
  import { jsx as jsx41, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4887
4962
  function ParameterConnectionIndicator({
4888
4963
  children,
@@ -4902,7 +4977,7 @@ function ParameterConnectionIndicator({
4902
4977
  });
4903
4978
  return result;
4904
4979
  }, [value]);
4905
- return /* @__PURE__ */ jsxs24(HorizontalRhythm4, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4980
+ return /* @__PURE__ */ jsxs24(HorizontalRhythm5, { align: "center", gap: "xs", css: { width: "100%" }, children: [
4906
4981
  /* @__PURE__ */ jsx41("div", { css: { flex: 1 }, children }),
4907
4982
  disabled ? null : /* @__PURE__ */ jsx41(
4908
4983
  Menu3,
@@ -4914,7 +4989,7 @@ function ParameterConnectionIndicator({
4914
4989
  {
4915
4990
  title: menuTooltip,
4916
4991
  "aria-pressed": hasVariablesInValue,
4917
- css: [menuBtn, variableBindButton2],
4992
+ css: [menuBtn, variableBindButton],
4918
4993
  type: "button",
4919
4994
  children: /* @__PURE__ */ jsx41(CgUsbC2, { size: "1.4rem" })
4920
4995
  }
@@ -4927,8 +5002,8 @@ function ParameterConnectionIndicator({
4927
5002
  }
4928
5003
 
4929
5004
  // src/components/Variables/ParameterOrSingleVariable.tsx
4930
- import { HorizontalRhythm as HorizontalRhythm5 } from "@uniformdev/design-system";
4931
- import { useCallback as useCallback3 } from "react";
5005
+ import { HorizontalRhythm as HorizontalRhythm6 } from "@uniformdev/design-system";
5006
+ import { useCallback as useCallback4 } from "react";
4932
5007
 
4933
5008
  // src/components/Variables/composer/OnDisconnectPlugin.tsx
4934
5009
  import { useLexicalComposerContext as useLexicalComposerContext10 } from "@lexical/react/LexicalComposerContext";
@@ -4987,7 +5062,7 @@ function ParameterOrSingleVariable(props) {
4987
5062
  hasVariablesInValue,
4988
5063
  setHadVariablesInValue
4989
5064
  } = useInputVariablesState(props);
4990
- const handleDisconnect = useCallback3(
5065
+ const handleDisconnect = useCallback4(
4991
5066
  (variable) => {
4992
5067
  setHadVariablesInValue(false);
4993
5068
  if (onDisconnect) {
@@ -5013,7 +5088,7 @@ function ParameterOrSingleVariable(props) {
5013
5088
  /* @__PURE__ */ jsx42(OnDisconnectPlugin, { onDisconnect: handleDisconnect }),
5014
5089
  editorRef ? /* @__PURE__ */ jsx42(EditorRefPlugin, { editorRef }) : null,
5015
5090
  /* @__PURE__ */ jsx42(ControlledValuePlugin, { enabled: true, value }),
5016
- /* @__PURE__ */ jsxs25(HorizontalRhythm5, { align: "center", gap: "xs", css: { width: "100%" }, children: [
5091
+ /* @__PURE__ */ jsxs25(HorizontalRhythm6, { align: "center", gap: "xs", css: { width: "100%" }, children: [
5017
5092
  /* @__PURE__ */ jsx42("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ jsx42(
5018
5093
  VariablesComposerInput,
5019
5094
  {
@@ -5026,7 +5101,7 @@ function ParameterOrSingleVariable(props) {
5026
5101
  VariablesComposerVariableMenu,
5027
5102
  {
5028
5103
  ...sharedMenuProps,
5029
- buttonCss: [variableBindButton2],
5104
+ buttonCss: [variableBindButton],
5030
5105
  buttonProps: hasVariablesInValue ? { "aria-pressed": "true" } : void 0,
5031
5106
  replaceValueOnVariableInsert: true,
5032
5107
  filterVariable
@@ -5040,8 +5115,8 @@ function ParameterOrSingleVariable(props) {
5040
5115
  }
5041
5116
 
5042
5117
  // src/components/Variables/ParameterVariables.tsx
5043
- import { css as css24 } from "@emotion/react";
5044
- import { HorizontalRhythm as HorizontalRhythm6 } from "@uniformdev/design-system";
5118
+ import { css as css25 } from "@emotion/react";
5119
+ import { HorizontalRhythm as HorizontalRhythm7 } from "@uniformdev/design-system";
5045
5120
  import { jsx as jsx43, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
5046
5121
  function ParameterVariables(props) {
5047
5122
  const {
@@ -5080,7 +5155,7 @@ function ParameterVariables(props) {
5080
5155
  editorRef ? /* @__PURE__ */ jsx43(EditorRefPlugin, { editorRef }) : null,
5081
5156
  /* @__PURE__ */ jsx43(ControlledValuePlugin, { value, enabled: useInputWhenNoVariables }),
5082
5157
  /* @__PURE__ */ jsxs26(
5083
- HorizontalRhythm6,
5158
+ HorizontalRhythm7,
5084
5159
  {
5085
5160
  align: "center",
5086
5161
  gap: "xs",
@@ -5099,8 +5174,8 @@ function ParameterVariables(props) {
5099
5174
  "data-text-value": value,
5100
5175
  css: [
5101
5176
  input2,
5102
- typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : css24``,
5103
- inputCss != null ? inputCss : css24``
5177
+ typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : css25``,
5178
+ inputCss != null ? inputCss : css25``
5104
5179
  ]
5105
5180
  }
5106
5181
  ) }),
@@ -5108,7 +5183,7 @@ function ParameterVariables(props) {
5108
5183
  VariablesComposerVariableMenu,
5109
5184
  {
5110
5185
  ...sharedMenuProps,
5111
- buttonCss: [variableBindButton2],
5186
+ buttonCss: [variableBindButton],
5112
5187
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
5113
5188
  buttonProps: hasVariablesInValue ? { "aria-pressed": "true" } : void 0,
5114
5189
  replaceValueOnVariableInsert: useInputWhenNoVariables
@@ -5136,7 +5211,7 @@ ${prettifyBindExpression(bindExpression)}`
5136
5211
  }
5137
5212
 
5138
5213
  // src/components/Variables/VariablesList.tsx
5139
- import { css as css26 } from "@emotion/react";
5214
+ import { css as css27 } from "@emotion/react";
5140
5215
  import {
5141
5216
  AddListButton,
5142
5217
  button,
@@ -5151,8 +5226,8 @@ import {
5151
5226
  import { Draggable as Draggable2, Droppable as Droppable2 } from "react-beautiful-dnd";
5152
5227
 
5153
5228
  // src/components/Variables/styles/VariablesList.styles.ts
5154
- import { css as css25 } from "@emotion/react";
5155
- var tableRow = (isDragging) => css25`
5229
+ import { css as css26 } from "@emotion/react";
5230
+ var tableRow = (isDragging) => css26`
5156
5231
  position: relative;
5157
5232
  ${isDragging ? `
5158
5233
  display: table;
@@ -5160,7 +5235,7 @@ var tableRow = (isDragging) => css25`
5160
5235
  top: auto !important;
5161
5236
  ` : void 0}
5162
5237
  `;
5163
- var tableCellDragIcon = css25`
5238
+ var tableCellDragIcon = css26`
5164
5239
  &::after {
5165
5240
  content: '';
5166
5241
  display: block;
@@ -5178,7 +5253,7 @@ var tableCellDragIcon = css25`
5178
5253
  opacity: 1;
5179
5254
  }
5180
5255
  `;
5181
- var variableName = css25`
5256
+ var variableName = css26`
5182
5257
  border: none;
5183
5258
  font-weight: var(--fw-medium);
5184
5259
  padding: 0;
@@ -5188,7 +5263,7 @@ var variableName = css25`
5188
5263
  white-space: nowrap;
5189
5264
  max-width: 20ch;
5190
5265
  `;
5191
- var variableValue = css25`
5266
+ var variableValue = css26`
5192
5267
  overflow: hidden;
5193
5268
  text-overflow: ellipsis;
5194
5269
  white-space: nowrap;
@@ -5265,7 +5340,7 @@ function VariablesList() {
5265
5340
  title: `delete ${text}`,
5266
5341
  css: [
5267
5342
  button,
5268
- css26`
5343
+ css27`
5269
5344
  background: transparent;
5270
5345
  `
5271
5346
  ],
@@ -5394,7 +5469,7 @@ function TextVariableRenderer({ definition, value, setValue }) {
5394
5469
  }
5395
5470
 
5396
5471
  // src/components/Request/RequestBody.tsx
5397
- import { css as css28 } from "@emotion/react";
5472
+ import { css as css29 } from "@emotion/react";
5398
5473
  import { InputSelect as InputSelect4, JsonEditor } from "@uniformdev/design-system";
5399
5474
  import { useState as useState14 } from "react";
5400
5475
 
@@ -5480,11 +5555,11 @@ function useRequest() {
5480
5555
  }
5481
5556
 
5482
5557
  // src/components/Request/styles/Request.styles.ts
5483
- import { css as css27 } from "@emotion/react";
5484
- var innerContentStyles = css27`
5558
+ import { css as css28 } from "@emotion/react";
5559
+ var innerContentStyles = css28`
5485
5560
  background: var(--white);
5486
5561
  `;
5487
- var requestTypeContainer = (bgColor) => css27`
5562
+ var requestTypeContainer = (bgColor) => css28`
5488
5563
  align-items: start;
5489
5564
  background: ${bgColor};
5490
5565
  display: grid;
@@ -5526,7 +5601,7 @@ function RequestBody() {
5526
5601
  return /* @__PURE__ */ jsxs28(
5527
5602
  "div",
5528
5603
  {
5529
- css: css28`
5604
+ css: css29`
5530
5605
  background: var(--white);
5531
5606
  `,
5532
5607
  children: [
@@ -5534,7 +5609,7 @@ function RequestBody() {
5534
5609
  RequestTypeContainer,
5535
5610
  {
5536
5611
  bgColor: "var(--gray-100)",
5537
- css: css28`
5612
+ css: css29`
5538
5613
  padding: var(--spacing-sm) var(--spacing-base);
5539
5614
  `,
5540
5615
  children: /* @__PURE__ */ jsx49(
@@ -5823,7 +5898,7 @@ function RequestParameters({
5823
5898
  }
5824
5899
 
5825
5900
  // src/components/Request/RequestUrl.tsx
5826
- import { css as css29 } from "@emotion/react";
5901
+ import { css as css30 } from "@emotion/react";
5827
5902
  import { useMemo as useMemo13 } from "react";
5828
5903
 
5829
5904
  // src/components/Request/urlEncodeRequestParameter.ts
@@ -5860,7 +5935,7 @@ function RequestUrl() {
5860
5935
  return /* @__PURE__ */ jsxs31(
5861
5936
  "small",
5862
5937
  {
5863
- css: css29`
5938
+ css: css30`
5864
5939
  display: inline-block;
5865
5940
  margin-bottom: var(--spacing-xs);
5866
5941
  word-break: break-word;
@@ -6161,7 +6236,7 @@ var MeshApp = ({
6161
6236
  };
6162
6237
 
6163
6238
  // src/components/ObjectSearch/DataRefreshButton.tsx
6164
- import { css as css30 } from "@emotion/react";
6239
+ import { css as css31 } from "@emotion/react";
6165
6240
  import { Button as Button3, LoadingIndicator as LoadingIndicator4 } from "@uniformdev/design-system";
6166
6241
  import { jsx as jsx58, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6167
6242
  var DataRefreshButton = ({
@@ -6174,7 +6249,7 @@ var DataRefreshButton = ({
6174
6249
  !isLoading ? null : /* @__PURE__ */ jsx58(
6175
6250
  LoadingIndicator4,
6176
6251
  {
6177
- css: css30`
6252
+ css: css31`
6178
6253
  ${isLoading ? "opacity: 0.2;" : void 0}
6179
6254
  `
6180
6255
  }
@@ -6184,7 +6259,7 @@ var DataRefreshButton = ({
6184
6259
  };
6185
6260
 
6186
6261
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
6187
- import { css as css32 } from "@emotion/react";
6262
+ import { css as css33 } from "@emotion/react";
6188
6263
  import { bindVariables } from "@uniformdev/canvas";
6189
6264
  import { Callout as Callout5, Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
6190
6265
 
@@ -6192,7 +6267,7 @@ import { Callout as Callout5, Container, IconsProvider, ScrollableList, Vertical
6192
6267
  import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
6193
6268
  import {
6194
6269
  createContext as createContext5,
6195
- useCallback as useCallback4,
6270
+ useCallback as useCallback5,
6196
6271
  useContext as useContext7,
6197
6272
  useDeferredValue,
6198
6273
  useMemo as useMemo14,
@@ -6229,7 +6304,7 @@ var ObjectSearchProvider = ({
6229
6304
  const querySearchDeferred = useDeferredValue(query);
6230
6305
  const [selectedItems, setSelectedItems] = useState16(currentlySelectedItems != null ? currentlySelectedItems : []);
6231
6306
  const [list, setList] = useState16({});
6232
- const onSetQuery = useCallback4(
6307
+ const onSetQuery = useCallback5(
6233
6308
  (value2) => {
6234
6309
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
6235
6310
  return setQuery({
@@ -6241,7 +6316,7 @@ var ObjectSearchProvider = ({
6241
6316
  },
6242
6317
  [setQuery]
6243
6318
  );
6244
- const onSelectItem = useCallback4(
6319
+ const onSelectItem = useCallback5(
6245
6320
  (selectedResult) => {
6246
6321
  if (Array.isArray(selectedResult)) {
6247
6322
  setSelectedItems(selectedResult);
@@ -6255,10 +6330,10 @@ var ObjectSearchProvider = ({
6255
6330
  },
6256
6331
  [setSelectedItems, selectedItems]
6257
6332
  );
6258
- const onRemoveAllSelectedItems = useCallback4(() => {
6333
+ const onRemoveAllSelectedItems = useCallback5(() => {
6259
6334
  setSelectedItems([]);
6260
6335
  }, [setSelectedItems]);
6261
- const onSetList = useCallback4(
6336
+ const onSetList = useCallback5(
6262
6337
  (value2) => {
6263
6338
  setList(value2);
6264
6339
  },
@@ -6310,9 +6385,9 @@ function bindQuery(query, inputs) {
6310
6385
  import { Chip, Popover } from "@uniformdev/design-system";
6311
6386
 
6312
6387
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
6313
- import { css as css31 } from "@emotion/react";
6388
+ import { css as css32 } from "@emotion/react";
6314
6389
  import { skeletonLoading } from "@uniformdev/design-system";
6315
- var ObjectListItemContainer = css31`
6390
+ var ObjectListItemContainer = css32`
6316
6391
  align-items: center;
6317
6392
  border: 1px solid var(--gray-300);
6318
6393
  border-radius: var(--rounded-base);
@@ -6321,11 +6396,11 @@ var ObjectListItemContainer = css31`
6321
6396
  grid-template-columns: 1fr auto;
6322
6397
  padding: var(--spacing-sm);
6323
6398
  `;
6324
- var ObjectListItemContainerDisabled = css31`
6399
+ var ObjectListItemContainerDisabled = css32`
6325
6400
  opacity: var(--opacity-50);
6326
6401
  pointer-events: none;
6327
6402
  `;
6328
- var ObjectListItemLoading = css31`
6403
+ var ObjectListItemLoading = css32`
6329
6404
  animation: ${skeletonLoading} 1s linear infinite alternate;
6330
6405
  border-color: transparent;
6331
6406
  min-height: 42px;
@@ -6349,36 +6424,36 @@ var ObjectListItemLoading = css31`
6349
6424
  width: 1rem;
6350
6425
  }
6351
6426
  `;
6352
- var ObjectListItemHeadingGroup = css31`
6427
+ var ObjectListItemHeadingGroup = css32`
6353
6428
  align-items: center;
6354
6429
  display: grid;
6355
6430
  `;
6356
- var ObjectListItemThumbnail = css31`
6431
+ var ObjectListItemThumbnail = css32`
6357
6432
  width: 30px;
6358
6433
  object-fit: contain;
6359
6434
  `;
6360
- var ObjectListItemTitle = css31`
6435
+ var ObjectListItemTitle = css32`
6361
6436
  color: var(--typography-base);
6362
6437
  display: block;
6363
6438
  font-size: var(--fs-sm);
6364
6439
  `;
6365
- var ObjectListItemSubtitle = css31`
6440
+ var ObjectListItemSubtitle = css32`
6366
6441
  color: var(--gray-500);
6367
6442
  display: block;
6368
6443
  font-size: var(--fs-xs);
6369
6444
  line-height: 1;
6370
6445
  `;
6371
- var ObjectListItemInfoContainer = css31`
6446
+ var ObjectListItemInfoContainer = css32`
6372
6447
  align-items: center;
6373
6448
  display: flex;
6374
6449
  gap: var(--spacing-sm);
6375
6450
  justify-content: center;
6376
6451
  `;
6377
- var ObjectListItemControlledContent = css31`
6452
+ var ObjectListItemControlledContent = css32`
6378
6453
  display: flex;
6379
6454
  gap: var(--spacing-sm);
6380
6455
  `;
6381
- var ObjectListItemUnControlledContent = css31`
6456
+ var ObjectListItemUnControlledContent = css32`
6382
6457
  margin-top: var(--spacing-sm);
6383
6458
  grid-column: 1 / -1;
6384
6459
  `;
@@ -6465,7 +6540,7 @@ var ObjectSearchContainer = ({
6465
6540
  ScrollableList,
6466
6541
  {
6467
6542
  role: "list",
6468
- css: css32`
6543
+ css: css33`
6469
6544
  > div {
6470
6545
  transition: max-height var(--duration-slow) var(--timing-ease-out);
6471
6546
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
@@ -6541,8 +6616,8 @@ import { DebouncedInputKeywordSearch, InputSelect as InputSelect6 } from "@unifo
6541
6616
  import { useMemo as useMemo15, useState as useState17 } from "react";
6542
6617
 
6543
6618
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
6544
- import { css as css33 } from "@emotion/react";
6545
- var ObjectSearchFilterContainerLabel = css33`
6619
+ import { css as css34 } from "@emotion/react";
6620
+ var ObjectSearchFilterContainerLabel = css34`
6546
6621
  align-items: center;
6547
6622
  display: flex;
6548
6623
  font-size: var(--fs-sm);
@@ -6550,11 +6625,11 @@ var ObjectSearchFilterContainerLabel = css33`
6550
6625
  line-height: 1rem;
6551
6626
  margin-bottom: var(--spacing-sm);
6552
6627
  `;
6553
- var ObjectSearchFilterContainer = css33`
6628
+ var ObjectSearchFilterContainer = css34`
6554
6629
  display: grid;
6555
6630
  gap: var(--spacing-base);
6556
6631
  `;
6557
- var ObjectSearchFilterGrid = (gridColumns) => css33`
6632
+ var ObjectSearchFilterGrid = (gridColumns) => css34`
6558
6633
  display: grid;
6559
6634
  grid-template-columns: ${gridColumns};
6560
6635
  gap: var(--spacing-base);
@@ -6640,9 +6715,9 @@ import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/desig
6640
6715
  import { format as timeagoFormat } from "timeago.js";
6641
6716
 
6642
6717
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
6643
- import { css as css34 } from "@emotion/react";
6718
+ import { css as css35 } from "@emotion/react";
6644
6719
  import { button as button2 } from "@uniformdev/design-system";
6645
- var ButtonStyles = css34`
6720
+ var ButtonStyles = css35`
6646
6721
  ${button2}
6647
6722
  background: transparent;
6648
6723
  border: 1px solid var(--typography-base);
@@ -6669,7 +6744,7 @@ var ButtonStyles = css34`
6669
6744
  text-decoration: none;
6670
6745
  }
6671
6746
  `;
6672
- var ButtonIcon = css34`
6747
+ var ButtonIcon = css35`
6673
6748
  width: 1rem;
6674
6749
  height: 1rem;
6675
6750
  `;
@@ -6698,8 +6773,8 @@ var LinkButton = ({
6698
6773
  };
6699
6774
 
6700
6775
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
6701
- import { css as css35 } from "@emotion/react";
6702
- var ObjectSearchResultItemContainer = css35`
6776
+ import { css as css36 } from "@emotion/react";
6777
+ var ObjectSearchResultItemContainer = css36`
6703
6778
  align-items: center;
6704
6779
  border: 1px solid var(--gray-300);
6705
6780
  border-radius: var(--rounded-base);
@@ -6715,7 +6790,7 @@ var ObjectSearchResultItemContainer = css35`
6715
6790
  }
6716
6791
  }
6717
6792
  `;
6718
- var ObjectSearchDragHandle = css35`
6793
+ var ObjectSearchDragHandle = css36`
6719
6794
  border-left: 2px dotted var(--gray-300);
6720
6795
  border-right: 2px dotted var(--gray-300);
6721
6796
  position: absolute;
@@ -6724,35 +6799,35 @@ var ObjectSearchDragHandle = css35`
6724
6799
  transition: opacity var(--duration-fast) var(--timing-ease-out);
6725
6800
  opacity: 0;
6726
6801
  `;
6727
- var ObjectSearchResultItemSubtitle = css35`
6802
+ var ObjectSearchResultItemSubtitle = css36`
6728
6803
  color: var(--gray-500);
6729
6804
  display: block;
6730
6805
  font-size: var(--fs-xs);
6731
6806
  line-height: 1;
6732
6807
  `;
6733
- var ObjectSearchResultItemTitle = css35`
6808
+ var ObjectSearchResultItemTitle = css36`
6734
6809
  align-items: center;
6735
6810
  color: var(--typography-base);
6736
6811
  display: flex;
6737
6812
  gap: var(--spacing-xs);
6738
6813
  `;
6739
- var ObjectSearchResultItemTimeStamp = css35`
6814
+ var ObjectSearchResultItemTimeStamp = css36`
6740
6815
  color: var(--gray-500);
6741
6816
  font-size: var(--fs-xs);
6742
6817
  `;
6743
- var ObjectSearchAuthorStateGroup = css35`
6818
+ var ObjectSearchAuthorStateGroup = css36`
6744
6819
  align-items: center;
6745
6820
  display: flex;
6746
6821
  gap: var(--spacing-sm);
6747
6822
  `;
6748
- var ObjectSearchUpdateGroup = css35`
6823
+ var ObjectSearchUpdateGroup = css36`
6749
6824
  display: grid;
6750
6825
  `;
6751
- var ObjectSearchContentContainer = css35`
6826
+ var ObjectSearchContentContainer = css36`
6752
6827
  display: flex;
6753
6828
  gap: var(--spacing-base);
6754
6829
  `;
6755
- var ObjectSearchImage = css35`
6830
+ var ObjectSearchImage = css36`
6756
6831
  width: 56px;
6757
6832
  object-fit: contain;
6758
6833
  `;
@@ -6820,26 +6895,26 @@ import { Button as Button5, Counter } from "@uniformdev/design-system";
6820
6895
  import { Draggable as Draggable3, Droppable as Droppable3 } from "react-beautiful-dnd";
6821
6896
 
6822
6897
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
6823
- import { css as css36 } from "@emotion/react";
6824
- var ObjectSearchResultListContainer = css36`
6898
+ import { css as css37 } from "@emotion/react";
6899
+ var ObjectSearchResultListContainer = css37`
6825
6900
  align-items: center;
6826
6901
  display: flex;
6827
6902
  gap: var(--spacing-sm);
6828
6903
  justify-content: space-between;
6829
6904
  `;
6830
- var ObjectSearchDragContainer = css36`
6905
+ var ObjectSearchDragContainer = css37`
6831
6906
  margin: 0 0 var(--spacing-sm);
6832
6907
  `;
6833
- var ObjectSearchContainerDragging = css36`
6908
+ var ObjectSearchContainerDragging = css37`
6834
6909
  box-shadow: var(--shadow-base);
6835
6910
  opacity: var(--opacity-50);
6836
6911
  `;
6837
- var ObjectSearchResultListCounterContainer = css36`
6912
+ var ObjectSearchResultListCounterContainer = css37`
6838
6913
  align-items: center;
6839
6914
  display: flex;
6840
6915
  gap: var(--spacing-sm);
6841
6916
  `;
6842
- var ObjectSearchResultListTitle = css36`
6917
+ var ObjectSearchResultListTitle = css37`
6843
6918
  font-weight: var(--fw-bold);
6844
6919
  line-height: 1;
6845
6920
  `;
@@ -7163,6 +7238,60 @@ var JsonMeshVariableEditor = ({
7163
7238
  return null;
7164
7239
  };
7165
7240
 
7241
+ // src/components/SearchAndFilter/filtersMapper.tsx
7242
+ import {
7243
+ filterMapper,
7244
+ FilterMultiChoiceEditor
7245
+ } from "@uniformdev/design-system";
7246
+ import { DateEditor, FilterSingleChoiceEditor, NumberEditor, TextEditor } from "@uniformdev/design-system";
7247
+ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
7248
+ function withInputVariables(WrappedComponent) {
7249
+ const WithInputVariables = (props) => {
7250
+ if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
7251
+ return /* @__PURE__ */ jsx69(WrappedComponent, { ...props });
7252
+ }
7253
+ return /* @__PURE__ */ jsx69(
7254
+ InputVariables,
7255
+ {
7256
+ disableInlineMenu: true,
7257
+ showMenuPosition: "inline-right",
7258
+ onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
7259
+ value: props.value,
7260
+ disabled: props.disabled,
7261
+ inputWhenNoVariables: /* @__PURE__ */ jsx69(WrappedComponent, { ...props })
7262
+ }
7263
+ );
7264
+ };
7265
+ return WithInputVariables;
7266
+ }
7267
+ function withInputVariablesForMultiValue(WrappedComponent) {
7268
+ const WithInputVariables = (props) => {
7269
+ var _a;
7270
+ if (!props.bindable || props.disabled || props.readOnly) {
7271
+ return /* @__PURE__ */ jsx69(WrappedComponent, { ...props });
7272
+ }
7273
+ return /* @__PURE__ */ jsx69(
7274
+ InputVariables,
7275
+ {
7276
+ disableInlineMenu: true,
7277
+ showMenuPosition: "inline-right",
7278
+ onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
7279
+ value: (_a = props.value) == null ? void 0 : _a[0],
7280
+ inputWhenNoVariables: /* @__PURE__ */ jsx69(WrappedComponent, { ...props })
7281
+ }
7282
+ );
7283
+ };
7284
+ return WithInputVariables;
7285
+ }
7286
+ var bindableFiltersMapper = {
7287
+ ...filterMapper,
7288
+ multiChoice: withInputVariablesForMultiValue(FilterMultiChoiceEditor),
7289
+ singleChoice: withInputVariables(FilterSingleChoiceEditor),
7290
+ date: withInputVariables(DateEditor),
7291
+ text: withInputVariables(TextEditor),
7292
+ number: withInputVariables(NumberEditor)
7293
+ };
7294
+
7166
7295
  // src/utils/createLocationValidator.ts
7167
7296
  function createLocationValidator(setValue, validate) {
7168
7297
  return (dispatch) => setValue((previous) => {
@@ -7326,6 +7455,7 @@ export {
7326
7455
  VariablesPlugin,
7327
7456
  VariablesProvider,
7328
7457
  badgeIcon,
7458
+ bindableFiltersMapper,
7329
7459
  convertConnectedDataToVariable,
7330
7460
  createLocationValidator,
7331
7461
  damSelectItemImage,