@uniformdev/mesh-sdk-react 20.47.0 → 20.47.1-alpha.3

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.d.mts CHANGED
@@ -186,7 +186,7 @@ declare function ControlledValuePlugin({ enabled, value, extraDependencies, }: {
186
186
  enabled: boolean;
187
187
  value: string | undefined | SerializedEditorState<SerializedLexicalNode>;
188
188
  extraDependencies?: unknown[];
189
- }): JSX.Element | null;
189
+ }): ReactNode | null;
190
190
 
191
191
  type SerializedVariableNode = Spread<{
192
192
  reference: string;
@@ -217,9 +217,9 @@ type VariableNodeState = {
217
217
  isLoading: boolean;
218
218
  };
219
219
  /** Renders a variable reference node within a Lexical editor */
220
- declare class VariableNode extends DecoratorNode<JSX.Element> {
220
+ declare class VariableNode extends DecoratorNode<ReactNode> {
221
221
  reference: Readonly<string>;
222
- private __state;
222
+ private __variableState;
223
223
  static getType(): string;
224
224
  static clone(node: VariableNode): VariableNode;
225
225
  /** Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) */
@@ -441,7 +441,7 @@ declare function useVariablesMenu<TEditorContext>({ showAddVariableMenuOption, e
441
441
  * Enables variables auto-complete and reference management to a Lexical editor.
442
442
  * Must also activate the VariableNode node to make this work.
443
443
  */
444
- declare function VariablesPlugin<TEditorContext = unknown>({ disableVariables, showAddVariableMenuOption, enableEditingVariables, getEditorContext, replaceValueOnVariableInsert, filterVariable, disableVariableDisplayNames, }: VariablesPluginProps<TEditorContext>): JSX.Element | null;
444
+ declare function VariablesPlugin<TEditorContext = unknown>({ disableVariables, showAddVariableMenuOption, enableEditingVariables, getEditorContext, replaceValueOnVariableInsert, filterVariable, disableVariableDisplayNames, }: VariablesPluginProps<TEditorContext>): ReactNode | null;
445
445
 
446
446
  type PasteTransformerPluginProps = {
447
447
  /**
@@ -481,7 +481,7 @@ type UseInputVariablesStateProps<TEditorContext = unknown> = {
481
481
  * in the input will be replaced with the variable reference. Once in variables-mode, additional
482
482
  * insertions are inserted at the current selection (or end) of the variables value.
483
483
  */
484
- inputWhenNoVariables?: JSX.Element;
484
+ inputWhenNoVariables?: ReactNode;
485
485
  /** Computes the editor context when a variable is added or edited from this composer */
486
486
  getEditorContext?: () => TEditorContext;
487
487
  /** Filters available variables in menus and auto-completes */
@@ -599,7 +599,7 @@ declare function ParameterConnectionIndicator({ children, value, menuOptions, di
599
599
 
600
600
  type ParameterOrSingleVariableProps<TEditorContext = unknown> = {
601
601
  disabled?: boolean;
602
- inputWhenNoVariables: JSX.Element;
602
+ inputWhenNoVariables: ReactNode;
603
603
  enableEditingVariables?: boolean;
604
604
  /**
605
605
  * Optional ref to get a handle to the variables editor.
package/dist/index.d.ts CHANGED
@@ -186,7 +186,7 @@ declare function ControlledValuePlugin({ enabled, value, extraDependencies, }: {
186
186
  enabled: boolean;
187
187
  value: string | undefined | SerializedEditorState<SerializedLexicalNode>;
188
188
  extraDependencies?: unknown[];
189
- }): JSX.Element | null;
189
+ }): ReactNode | null;
190
190
 
191
191
  type SerializedVariableNode = Spread<{
192
192
  reference: string;
@@ -217,9 +217,9 @@ type VariableNodeState = {
217
217
  isLoading: boolean;
218
218
  };
219
219
  /** Renders a variable reference node within a Lexical editor */
220
- declare class VariableNode extends DecoratorNode<JSX.Element> {
220
+ declare class VariableNode extends DecoratorNode<ReactNode> {
221
221
  reference: Readonly<string>;
222
- private __state;
222
+ private __variableState;
223
223
  static getType(): string;
224
224
  static clone(node: VariableNode): VariableNode;
225
225
  /** Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) */
@@ -441,7 +441,7 @@ declare function useVariablesMenu<TEditorContext>({ showAddVariableMenuOption, e
441
441
  * Enables variables auto-complete and reference management to a Lexical editor.
442
442
  * Must also activate the VariableNode node to make this work.
443
443
  */
444
- declare function VariablesPlugin<TEditorContext = unknown>({ disableVariables, showAddVariableMenuOption, enableEditingVariables, getEditorContext, replaceValueOnVariableInsert, filterVariable, disableVariableDisplayNames, }: VariablesPluginProps<TEditorContext>): JSX.Element | null;
444
+ declare function VariablesPlugin<TEditorContext = unknown>({ disableVariables, showAddVariableMenuOption, enableEditingVariables, getEditorContext, replaceValueOnVariableInsert, filterVariable, disableVariableDisplayNames, }: VariablesPluginProps<TEditorContext>): ReactNode | null;
445
445
 
446
446
  type PasteTransformerPluginProps = {
447
447
  /**
@@ -481,7 +481,7 @@ type UseInputVariablesStateProps<TEditorContext = unknown> = {
481
481
  * in the input will be replaced with the variable reference. Once in variables-mode, additional
482
482
  * insertions are inserted at the current selection (or end) of the variables value.
483
483
  */
484
- inputWhenNoVariables?: JSX.Element;
484
+ inputWhenNoVariables?: ReactNode;
485
485
  /** Computes the editor context when a variable is added or edited from this composer */
486
486
  getEditorContext?: () => TEditorContext;
487
487
  /** Filters available variables in menus and auto-completes */
@@ -599,7 +599,7 @@ declare function ParameterConnectionIndicator({ children, value, menuOptions, di
599
599
 
600
600
  type ParameterOrSingleVariableProps<TEditorContext = unknown> = {
601
601
  disabled?: boolean;
602
- inputWhenNoVariables: JSX.Element;
602
+ inputWhenNoVariables: ReactNode;
603
603
  enableEditingVariables?: boolean;
604
604
  /**
605
605
  * Optional ref to get a handle to the variables editor.
package/dist/index.esm.js CHANGED
@@ -471,14 +471,14 @@ function deserializeVariablesEditorState(serialized) {
471
471
  children: [
472
472
  {
473
473
  children: result,
474
- direction: "ltr",
474
+ direction: null,
475
475
  format: "",
476
476
  indent: 0,
477
477
  type: "paragraph",
478
478
  version: 1
479
479
  }
480
480
  ],
481
- direction: "ltr",
481
+ direction: null,
482
482
  format: "",
483
483
  indent: 0,
484
484
  type: "root",
@@ -774,7 +774,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
774
774
  import { Button, Callout, HorizontalRhythm, Input, useShortcut } from "@uniformdev/design-system";
775
775
  import { useLayoutEffect, useRef as useRef2 } from "react";
776
776
  import { useForm } from "react-hook-form";
777
- import * as z from "zod";
777
+ import * as z from "zod/v3";
778
778
 
779
779
  // src/components/Variables/styles/VariableEditor.styles.ts
780
780
  import { css as css2 } from "@emotion/react";
@@ -1146,18 +1146,17 @@ var DISCONNECT_VARIABLE_COMMAND = createCommand(
1146
1146
  "uniform:disconnect-variable"
1147
1147
  );
1148
1148
  var INSERT_VARIABLE_COMMAND = createCommand("uniform:insert-variable");
1149
- var TRIGGER = "\\$\\$";
1150
- var LENGTH_LIMIT = 20;
1151
- var DollarSignVariablesRegex = new RegExp(`(^.*)(${TRIGGER}(.{0,${LENGTH_LIMIT}}))$`);
1149
+ var DollarSignVariablesRegex = /(^.*)(\$\$(.{0,20}))$/;
1152
1150
  function getPossibleQueryMatch(text) {
1153
1151
  const match = DollarSignVariablesRegex.exec(text);
1154
1152
  if (match !== null) {
1155
1153
  const maybeLeadingWhitespace = match[1];
1156
1154
  const matchingString = match[3];
1155
+ const replaceableString = match[2];
1157
1156
  return {
1158
1157
  leadOffset: match.index + maybeLeadingWhitespace.length,
1159
1158
  matchingString,
1160
- replaceableString: match[2]
1159
+ replaceableString
1161
1160
  };
1162
1161
  }
1163
1162
  return null;
@@ -1277,7 +1276,10 @@ function VariablesPlugin({
1277
1276
  filteredGroupedVariables: groupedVariables.map((group) => ({
1278
1277
  name: group.name,
1279
1278
  variables: group.variables.filter(
1280
- (option) => option.name.toLowerCase().includes(query) || option.name === ADD_VARIABLE_OPTION
1279
+ (option) => {
1280
+ var _a;
1281
+ return option.name === ADD_VARIABLE_OPTION || option.name.toLowerCase().includes(query) || ((_a = option.displayName) == null ? void 0 : _a.toLowerCase().includes(query));
1282
+ }
1281
1283
  )
1282
1284
  })).filter((group) => group.variables.length > 0),
1283
1285
  filteredMenuOptions: menuOptions.filter(
@@ -1568,13 +1570,13 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1568
1570
  constructor(reference, state, key) {
1569
1571
  super(key);
1570
1572
  this.reference = reference;
1571
- this.__state = state;
1573
+ this.__variableState = state;
1572
1574
  }
1573
1575
  static getType() {
1574
1576
  return "variable";
1575
1577
  }
1576
1578
  static clone(node) {
1577
- return new _VariableNode(node.reference, { ...node.__state }, node.__key);
1579
+ return new _VariableNode(node.reference, { ...node.__variableState }, node.__key);
1578
1580
  }
1579
1581
  /** Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) */
1580
1582
  static importJSON(serializedNode) {
@@ -1589,14 +1591,14 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1589
1591
  }
1590
1592
  /** Gets the node's current state */
1591
1593
  getState() {
1592
- return this.getLatest().__state;
1594
+ return this.getLatest().__variableState;
1593
1595
  }
1594
1596
  /**
1595
1597
  * Updates the node's variables state so it knows its current validity, display name, etc
1596
1598
  * The plugin updates this whenever the variables prop changes.
1597
1599
  */
1598
1600
  setState(state) {
1599
- this.getWritable().__state = state;
1601
+ this.getWritable().__variableState = state;
1600
1602
  }
1601
1603
  /**
1602
1604
  * Serializes the node to JSON for editor initial state
@@ -1636,7 +1638,7 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1636
1638
  * rely on Context, etc in this renderer.
1637
1639
  */
1638
1640
  decorate() {
1639
- return /* @__PURE__ */ jsx22(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
1641
+ return /* @__PURE__ */ jsx22(VariableNodeComponent, { state: this.__variableState, reference: this.reference, nodeKey: this.__key });
1640
1642
  }
1641
1643
  };
1642
1644
  function $convertBindingElement(domNode) {
@@ -1908,27 +1910,40 @@ var placeholderCompact = css4`
1908
1910
  import { css as css5 } from "@emotion/react";
1909
1911
  import { scrollbarStyles } from "@uniformdev/design-system";
1910
1912
  var variableBindButton = css5`
1911
- align-items: center;
1912
- border: none;
1913
+ --hover-color: var(--accent-dark-hover);
1914
+ --active-color: var(--accent-dark-active);
1915
+ border: 1px solid transparent;
1913
1916
  border-radius: var(--rounded-base);
1914
1917
  background: none;
1918
+ color: var(--gray-300);
1915
1919
  display: flex;
1916
- height: 1.2rem;
1917
- padding: var(--spacing-2xs);
1920
+ align-items: center;
1921
+ justify-content: center;
1922
+ max-width: fit-content;
1923
+ padding: 0.125rem;
1918
1924
  transition:
1925
+ border-color var(--duration-fast) var(--timing-ease-out),
1919
1926
  background var(--duration-fast) var(--timing-ease-out),
1920
- color var(--duration-fast) var(--timing-ease-out);
1921
- width: 1.2rem;
1927
+ color var(--duration-fast) var(--timing-ease-out),
1928
+ box-shadow var(--duration-fast) var(--timing-ease-out);
1922
1929
 
1923
- &:hover,
1924
- &[aria-pressed='true']:not(:disabled) {
1925
- background: var(--brand-secondary-3);
1926
- color: var(--white);
1930
+ &:hover:not([aria-disabled='true']),
1931
+ &:focus:not([aria-disabled='true']),
1932
+ &:focus-within:not([aria-disabled='true']) {
1933
+ color: var(--gray-500);
1934
+ border-color: var(--hover-color);
1935
+ }
1936
+
1937
+ &:active:not([aria-disabled='true']),
1938
+ &[aria-pressed='true']:not([aria-disabled='true']) {
1939
+ color: var(--active-color);
1927
1940
  }
1928
1941
 
1929
1942
  &[aria-disabled='true'] {
1930
1943
  background: none;
1931
1944
  color: currentColor;
1945
+ opacity: var(--opacity-50);
1946
+ cursor: default;
1932
1947
  }
1933
1948
 
1934
1949
  // fixes menu resizing issue within iframes
@@ -2002,8 +2017,7 @@ var inputMultiLine = (lines) => css5`
2002
2017
 
2003
2018
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2004
2019
  import { hasReferencedVariables } from "@uniformdev/canvas";
2005
- import * as React4 from "react";
2006
- import { useMemo as useMemo7 } from "react";
2020
+ import { useEffect as useEffect7, useMemo as useMemo7, useState as useState5 } from "react";
2007
2021
  function useInputVariablesState({
2008
2022
  value,
2009
2023
  onChange,
@@ -2019,14 +2033,14 @@ function useInputVariablesState({
2019
2033
  }) {
2020
2034
  const { variables } = useVariables(true);
2021
2035
  const variableReferenceCountInValue = hasReferencedVariables(value != null ? value : "");
2022
- const [lastKnownId, setLastKnownId] = React4.useState(id);
2023
- const [hadVariablesInValue, setHadVariablesInValue] = React4.useState(variableReferenceCountInValue > 0);
2024
- React4.useEffect(() => {
2036
+ const [lastKnownId, setLastKnownId] = useState5(id);
2037
+ const [hadVariablesInValue, setHadVariablesInValue] = useState5(variableReferenceCountInValue > 0);
2038
+ useEffect7(() => {
2025
2039
  if (variableReferenceCountInValue) {
2026
2040
  setHadVariablesInValue(true);
2027
2041
  }
2028
2042
  }, [variableReferenceCountInValue]);
2029
- React4.useEffect(() => {
2043
+ useEffect7(() => {
2030
2044
  if (id !== lastKnownId) {
2031
2045
  setLastKnownId(id);
2032
2046
  setHadVariablesInValue(variableReferenceCountInValue > 0);
@@ -2076,30 +2090,6 @@ var labelText = css6`
2076
2090
  font-weight: var(--fw-regular);
2077
2091
  margin: 0 0 var(--spacing-xs);
2078
2092
  `;
2079
- var variableBindButton2 = css6`
2080
- align-items: center;
2081
- border: none;
2082
- border-radius: var(--rounded-base);
2083
- background: none;
2084
- display: flex;
2085
- height: 1.2rem;
2086
- padding: var(--spacing-2xs);
2087
- transition:
2088
- background var(--duration-fast) var(--timing-ease-out),
2089
- color var(--duration-fast) var(--timing-ease-out);
2090
- width: 1.2rem;
2091
-
2092
- &:hover,
2093
- &[aria-pressed='true']:not(:disabled) {
2094
- background: var(--brand-secondary-3);
2095
- color: var(--white);
2096
- }
2097
-
2098
- &[aria-disabled='true'] {
2099
- background: none;
2100
- color: currentColor;
2101
- }
2102
- `;
2103
2093
 
2104
2094
  // src/components/Variables/toolbox/VariablesComposerVariableMenu.tsx
2105
2095
  import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
@@ -2146,7 +2136,7 @@ function SelectVariableMenu({
2146
2136
  css: [menuBtn, buttonCss],
2147
2137
  type: "button",
2148
2138
  "data-testid": "insert-variable",
2149
- children: /* @__PURE__ */ jsx23(CgUsbC, { size: "1.4rem" })
2139
+ children: /* @__PURE__ */ jsx23(CgUsbC, { size: "1rem" })
2150
2140
  }
2151
2141
  ),
2152
2142
  children: [
@@ -2239,7 +2229,7 @@ function VariableField({
2239
2229
  VariablesComposerVariableMenu,
2240
2230
  {
2241
2231
  ...selectVariableMenuOptions,
2242
- buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2232
+ buttonCss: [variableBindButton, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2243
2233
  buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2244
2234
  }
2245
2235
  ) }) : null;
@@ -2310,8 +2300,8 @@ function VariablesComposer(props) {
2310
2300
  // eslint-disable-next-line react-hooks/exhaustive-deps
2311
2301
  []
2312
2302
  );
2313
- const editorState = useRef5();
2314
- const updateTimeout = useRef5();
2303
+ const editorState = useRef5(void 0);
2304
+ const updateTimeout = useRef5(void 0);
2315
2305
  if (typeof document === "undefined") return null;
2316
2306
  return /* @__PURE__ */ jsxs10(LexicalComposer, { initialConfig: editorConfig, children: [
2317
2307
  /* @__PURE__ */ jsx26(
@@ -2352,7 +2342,7 @@ import {
2352
2342
  } from "@lexical/clipboard";
2353
2343
  import { useLexicalComposerContext as useLexicalComposerContext9 } from "@lexical/react/LexicalComposerContext";
2354
2344
  import { ContentEditable } from "@lexical/react/LexicalContentEditable";
2355
- import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
2345
+ import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
2356
2346
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
2357
2347
  import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
2358
2348
  import { mergeRegister as mergeRegister4, objectKlassEquals } from "@lexical/utils";
@@ -2528,6 +2518,7 @@ function InputVariables(props) {
2528
2518
  portal: renderMenuInPortal,
2529
2519
  replaceValueOnVariableInsert: useInputWithNoVariables,
2530
2520
  useInputWhenNoVariables: useInputWithNoVariables,
2521
+ isActive: hadVariablesInValue,
2531
2522
  children: /* @__PURE__ */ jsx28(
2532
2523
  VariablesComposerInput,
2533
2524
  {
@@ -2616,6 +2607,7 @@ function InputVariablesOverlayMenu({
2616
2607
  disabled,
2617
2608
  useInputWhenNoVariables,
2618
2609
  portal,
2610
+ isActive,
2619
2611
  ...props
2620
2612
  }) {
2621
2613
  if (disabled) {
@@ -2629,7 +2621,8 @@ function InputVariablesOverlayMenu({
2629
2621
  ...props,
2630
2622
  portal,
2631
2623
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
2632
- buttonCss: menuBtn2
2624
+ buttonCss: [menuBtn2, variableBindButton],
2625
+ buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2633
2626
  }
2634
2627
  )
2635
2628
  ] });
@@ -2682,7 +2675,7 @@ function ParameterConnectionIndicator({
2682
2675
  css: [menuBtn, variableBindButton],
2683
2676
  type: "button",
2684
2677
  "data-testid": "insert-variable",
2685
- children: /* @__PURE__ */ jsx29(CgUsbC2, { size: "1.4rem" })
2678
+ children: /* @__PURE__ */ jsx29(CgUsbC2, { size: "1rem" })
2686
2679
  }
2687
2680
  )
2688
2681
  }
@@ -2902,6 +2895,7 @@ ${prettifyBindExpression(bindExpression)}`
2902
2895
 
2903
2896
  // src/components/Variables/VariablesList.tsx
2904
2897
  import { css as css10 } from "@emotion/react";
2898
+ import { Draggable, Droppable } from "@hello-pangea/dnd";
2905
2899
  import { CgTrash } from "@react-icons/all-files/cg/CgTrash";
2906
2900
  import {
2907
2901
  AddListButton,
@@ -2914,11 +2908,10 @@ import {
2914
2908
  TableHead,
2915
2909
  TableRow
2916
2910
  } from "@uniformdev/design-system";
2917
- import { Draggable, Droppable } from "react-beautiful-dnd";
2918
2911
 
2919
2912
  // src/components/DragDropContext.tsx
2913
+ import { DragDropContext as BaseDragDropContext } from "@hello-pangea/dnd";
2920
2914
  import { useState as useState8 } from "react";
2921
- import { DragDropContext as BaseDragDropContext } from "react-beautiful-dnd";
2922
2915
  import { useDebounce } from "react-use";
2923
2916
  import { jsx as jsx32 } from "@emotion/react/jsx-runtime";
2924
2917
  function DragDropContext({ children, ...props }) {
@@ -3173,7 +3166,8 @@ function TextVariableRenderer({ definition, value, setValue }) {
3173
3166
  value: value != null ? value : "",
3174
3167
  caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
3175
3168
  onChange: setValue,
3176
- "data-testid": "variable-input"
3169
+ "data-testid": "variable-input",
3170
+ disableInlineMenu: "by-label"
3177
3171
  }
3178
3172
  ) });
3179
3173
  }
@@ -3184,12 +3178,12 @@ import { InputSelect, JsonEditor } from "@uniformdev/design-system";
3184
3178
  import { useState as useState10 } from "react";
3185
3179
 
3186
3180
  // src/components/Request/RequestProvider.tsx
3187
- import * as React5 from "react";
3181
+ import * as React4 from "react";
3188
3182
  import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
3189
- var RequestContext = React5.createContext(null);
3183
+ var RequestContext = React4.createContext(null);
3190
3184
  function RequestProvider({ value, onChange, children }) {
3191
- const [listVersion, setListVersion] = React5.useState(0);
3192
- const contextValue = React5.useMemo(() => {
3185
+ const [listVersion, setListVersion] = React4.useState(0);
3186
+ const contextValue = React4.useMemo(() => {
3193
3187
  return {
3194
3188
  dispatch: (event) => {
3195
3189
  if (event.type === "setRelativeUrl") {
@@ -3261,7 +3255,7 @@ function RequestProvider({ value, onChange, children }) {
3261
3255
  return /* @__PURE__ */ jsx36(RequestContext.Provider, { value: contextValue, children });
3262
3256
  }
3263
3257
  function useRequest() {
3264
- const context = React5.useContext(RequestContext);
3258
+ const context = React4.useContext(RequestContext);
3265
3259
  if (!context) {
3266
3260
  throw new Error("No RequestProvider present");
3267
3261
  }
@@ -4664,11 +4658,11 @@ function legacyThemeMapper(theme) {
4664
4658
  }
4665
4659
 
4666
4660
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4667
- import { Button as Button4, Counter } from "@uniformdev/design-system";
4668
4661
  import {
4669
4662
  Draggable as Draggable2,
4670
4663
  Droppable as Droppable2
4671
- } from "react-beautiful-dnd";
4664
+ } from "@hello-pangea/dnd";
4665
+ import { Button as Button4, Counter } from "@uniformdev/design-system";
4672
4666
 
4673
4667
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4674
4668
  import { css as css20 } from "@emotion/react";
@@ -6788,7 +6782,7 @@ import { Icon as Icon5 } from "@uniformdev/design-system";
6788
6782
 
6789
6783
  // src/components/SearchAndFilter/FilterMenu.tsx
6790
6784
  import { HorizontalRhythm as HorizontalRhythm8, VerticalRhythm as VerticalRhythm6 } from "@uniformdev/design-system";
6791
- import React7, { useEffect as useEffect19 } from "react";
6785
+ import React6, { useEffect as useEffect19 } from "react";
6792
6786
  import { jsx as jsx76, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6793
6787
  var SearchAndFilterOptionsContainer2 = ({
6794
6788
  buttonRow,
@@ -6820,7 +6814,7 @@ var FilterMenu = ({
6820
6814
  resetButtonText = "reset"
6821
6815
  }) => {
6822
6816
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6823
- const innerMenuRef = React7.useRef(null);
6817
+ const innerMenuRef = React6.useRef(null);
6824
6818
  useEffect19(() => {
6825
6819
  var _a;
6826
6820
  if (filterVisibility) {
package/dist/index.js CHANGED
@@ -646,14 +646,14 @@ function deserializeVariablesEditorState(serialized) {
646
646
  children: [
647
647
  {
648
648
  children: result,
649
- direction: "ltr",
649
+ direction: null,
650
650
  format: "",
651
651
  indent: 0,
652
652
  type: "paragraph",
653
653
  version: 1
654
654
  }
655
655
  ],
656
- direction: "ltr",
656
+ direction: null,
657
657
  format: "",
658
658
  indent: 0,
659
659
  type: "root",
@@ -920,7 +920,7 @@ var import_zod = require("@hookform/resolvers/zod");
920
920
  var import_design_system4 = require("@uniformdev/design-system");
921
921
  var import_react12 = require("react");
922
922
  var import_react_hook_form = require("react-hook-form");
923
- var z = __toESM(require("zod"));
923
+ var z = __toESM(require("zod/v3"));
924
924
 
925
925
  // src/components/Variables/styles/VariableEditor.styles.ts
926
926
  var import_react11 = require("@emotion/react");
@@ -1292,18 +1292,17 @@ var DISCONNECT_VARIABLE_COMMAND = (0, import_lexical4.createCommand)(
1292
1292
  "uniform:disconnect-variable"
1293
1293
  );
1294
1294
  var INSERT_VARIABLE_COMMAND = (0, import_lexical4.createCommand)("uniform:insert-variable");
1295
- var TRIGGER = "\\$\\$";
1296
- var LENGTH_LIMIT = 20;
1297
- var DollarSignVariablesRegex = new RegExp(`(^.*)(${TRIGGER}(.{0,${LENGTH_LIMIT}}))$`);
1295
+ var DollarSignVariablesRegex = /(^.*)(\$\$(.{0,20}))$/;
1298
1296
  function getPossibleQueryMatch(text) {
1299
1297
  const match = DollarSignVariablesRegex.exec(text);
1300
1298
  if (match !== null) {
1301
1299
  const maybeLeadingWhitespace = match[1];
1302
1300
  const matchingString = match[3];
1301
+ const replaceableString = match[2];
1303
1302
  return {
1304
1303
  leadOffset: match.index + maybeLeadingWhitespace.length,
1305
1304
  matchingString,
1306
- replaceableString: match[2]
1305
+ replaceableString
1307
1306
  };
1308
1307
  }
1309
1308
  return null;
@@ -1423,7 +1422,10 @@ function VariablesPlugin({
1423
1422
  filteredGroupedVariables: groupedVariables.map((group) => ({
1424
1423
  name: group.name,
1425
1424
  variables: group.variables.filter(
1426
- (option) => option.name.toLowerCase().includes(query) || option.name === ADD_VARIABLE_OPTION
1425
+ (option) => {
1426
+ var _a;
1427
+ return option.name === ADD_VARIABLE_OPTION || option.name.toLowerCase().includes(query) || ((_a = option.displayName) == null ? void 0 : _a.toLowerCase().includes(query));
1428
+ }
1427
1429
  )
1428
1430
  })).filter((group) => group.variables.length > 0),
1429
1431
  filteredMenuOptions: menuOptions.filter(
@@ -1714,13 +1716,13 @@ var VariableNode = class _VariableNode extends import_lexical5.DecoratorNode {
1714
1716
  constructor(reference, state, key) {
1715
1717
  super(key);
1716
1718
  this.reference = reference;
1717
- this.__state = state;
1719
+ this.__variableState = state;
1718
1720
  }
1719
1721
  static getType() {
1720
1722
  return "variable";
1721
1723
  }
1722
1724
  static clone(node) {
1723
- return new _VariableNode(node.reference, { ...node.__state }, node.__key);
1725
+ return new _VariableNode(node.reference, { ...node.__variableState }, node.__key);
1724
1726
  }
1725
1727
  /** Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) */
1726
1728
  static importJSON(serializedNode) {
@@ -1735,14 +1737,14 @@ var VariableNode = class _VariableNode extends import_lexical5.DecoratorNode {
1735
1737
  }
1736
1738
  /** Gets the node's current state */
1737
1739
  getState() {
1738
- return this.getLatest().__state;
1740
+ return this.getLatest().__variableState;
1739
1741
  }
1740
1742
  /**
1741
1743
  * Updates the node's variables state so it knows its current validity, display name, etc
1742
1744
  * The plugin updates this whenever the variables prop changes.
1743
1745
  */
1744
1746
  setState(state) {
1745
- this.getWritable().__state = state;
1747
+ this.getWritable().__variableState = state;
1746
1748
  }
1747
1749
  /**
1748
1750
  * Serializes the node to JSON for editor initial state
@@ -1782,7 +1784,7 @@ var VariableNode = class _VariableNode extends import_lexical5.DecoratorNode {
1782
1784
  * rely on Context, etc in this renderer.
1783
1785
  */
1784
1786
  decorate() {
1785
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
1787
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VariableNodeComponent, { state: this.__variableState, reference: this.reference, nodeKey: this.__key });
1786
1788
  }
1787
1789
  };
1788
1790
  function $convertBindingElement(domNode) {
@@ -2048,27 +2050,40 @@ var placeholderCompact = import_react18.css`
2048
2050
  var import_react19 = require("@emotion/react");
2049
2051
  var import_design_system7 = require("@uniformdev/design-system");
2050
2052
  var variableBindButton = import_react19.css`
2051
- align-items: center;
2052
- border: none;
2053
+ --hover-color: var(--accent-dark-hover);
2054
+ --active-color: var(--accent-dark-active);
2055
+ border: 1px solid transparent;
2053
2056
  border-radius: var(--rounded-base);
2054
2057
  background: none;
2058
+ color: var(--gray-300);
2055
2059
  display: flex;
2056
- height: 1.2rem;
2057
- padding: var(--spacing-2xs);
2060
+ align-items: center;
2061
+ justify-content: center;
2062
+ max-width: fit-content;
2063
+ padding: 0.125rem;
2058
2064
  transition:
2065
+ border-color var(--duration-fast) var(--timing-ease-out),
2059
2066
  background var(--duration-fast) var(--timing-ease-out),
2060
- color var(--duration-fast) var(--timing-ease-out);
2061
- width: 1.2rem;
2067
+ color var(--duration-fast) var(--timing-ease-out),
2068
+ box-shadow var(--duration-fast) var(--timing-ease-out);
2062
2069
 
2063
- &:hover,
2064
- &[aria-pressed='true']:not(:disabled) {
2065
- background: var(--brand-secondary-3);
2066
- color: var(--white);
2070
+ &:hover:not([aria-disabled='true']),
2071
+ &:focus:not([aria-disabled='true']),
2072
+ &:focus-within:not([aria-disabled='true']) {
2073
+ color: var(--gray-500);
2074
+ border-color: var(--hover-color);
2075
+ }
2076
+
2077
+ &:active:not([aria-disabled='true']),
2078
+ &[aria-pressed='true']:not([aria-disabled='true']) {
2079
+ color: var(--active-color);
2067
2080
  }
2068
2081
 
2069
2082
  &[aria-disabled='true'] {
2070
2083
  background: none;
2071
2084
  color: currentColor;
2085
+ opacity: var(--opacity-50);
2086
+ cursor: default;
2072
2087
  }
2073
2088
 
2074
2089
  // fixes menu resizing issue within iframes
@@ -2142,7 +2157,6 @@ var inputMultiLine = (lines) => import_react19.css`
2142
2157
 
2143
2158
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2144
2159
  var import_canvas6 = require("@uniformdev/canvas");
2145
- var React4 = __toESM(require("react"));
2146
2160
  var import_react20 = require("react");
2147
2161
  function useInputVariablesState({
2148
2162
  value,
@@ -2159,14 +2173,14 @@ function useInputVariablesState({
2159
2173
  }) {
2160
2174
  const { variables } = useVariables(true);
2161
2175
  const variableReferenceCountInValue = (0, import_canvas6.hasReferencedVariables)(value != null ? value : "");
2162
- const [lastKnownId, setLastKnownId] = React4.useState(id);
2163
- const [hadVariablesInValue, setHadVariablesInValue] = React4.useState(variableReferenceCountInValue > 0);
2164
- React4.useEffect(() => {
2176
+ const [lastKnownId, setLastKnownId] = (0, import_react20.useState)(id);
2177
+ const [hadVariablesInValue, setHadVariablesInValue] = (0, import_react20.useState)(variableReferenceCountInValue > 0);
2178
+ (0, import_react20.useEffect)(() => {
2165
2179
  if (variableReferenceCountInValue) {
2166
2180
  setHadVariablesInValue(true);
2167
2181
  }
2168
2182
  }, [variableReferenceCountInValue]);
2169
- React4.useEffect(() => {
2183
+ (0, import_react20.useEffect)(() => {
2170
2184
  if (id !== lastKnownId) {
2171
2185
  setLastKnownId(id);
2172
2186
  setHadVariablesInValue(variableReferenceCountInValue > 0);
@@ -2216,30 +2230,6 @@ var labelText = import_react21.css`
2216
2230
  font-weight: var(--fw-regular);
2217
2231
  margin: 0 0 var(--spacing-xs);
2218
2232
  `;
2219
- var variableBindButton2 = import_react21.css`
2220
- align-items: center;
2221
- border: none;
2222
- border-radius: var(--rounded-base);
2223
- background: none;
2224
- display: flex;
2225
- height: 1.2rem;
2226
- padding: var(--spacing-2xs);
2227
- transition:
2228
- background var(--duration-fast) var(--timing-ease-out),
2229
- color var(--duration-fast) var(--timing-ease-out);
2230
- width: 1.2rem;
2231
-
2232
- &:hover,
2233
- &[aria-pressed='true']:not(:disabled) {
2234
- background: var(--brand-secondary-3);
2235
- color: var(--white);
2236
- }
2237
-
2238
- &[aria-disabled='true'] {
2239
- background: none;
2240
- color: currentColor;
2241
- }
2242
- `;
2243
2233
 
2244
2234
  // src/components/Variables/toolbox/VariablesComposerVariableMenu.tsx
2245
2235
  var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
@@ -2286,7 +2276,7 @@ function SelectVariableMenu({
2286
2276
  css: [menuBtn, buttonCss],
2287
2277
  type: "button",
2288
2278
  "data-testid": "insert-variable",
2289
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_CgUsbC.CgUsbC, { size: "1.4rem" })
2279
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_CgUsbC.CgUsbC, { size: "1rem" })
2290
2280
  }
2291
2281
  ),
2292
2282
  children: [
@@ -2379,7 +2369,7 @@ function VariableField({
2379
2369
  VariablesComposerVariableMenu,
2380
2370
  {
2381
2371
  ...selectVariableMenuOptions,
2382
- buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2372
+ buttonCss: [variableBindButton, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2383
2373
  buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2384
2374
  }
2385
2375
  ) }) : null;
@@ -2450,8 +2440,8 @@ function VariablesComposer(props) {
2450
2440
  // eslint-disable-next-line react-hooks/exhaustive-deps
2451
2441
  []
2452
2442
  );
2453
- const editorState = (0, import_react25.useRef)();
2454
- const updateTimeout = (0, import_react25.useRef)();
2443
+ const editorState = (0, import_react25.useRef)(void 0);
2444
+ const updateTimeout = (0, import_react25.useRef)(void 0);
2455
2445
  if (typeof document === "undefined") return null;
2456
2446
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
2457
2447
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -2488,7 +2478,7 @@ function VariablesComposer(props) {
2488
2478
  var import_clipboard = require("@lexical/clipboard");
2489
2479
  var import_LexicalComposerContext9 = require("@lexical/react/LexicalComposerContext");
2490
2480
  var import_LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
2491
- var import_LexicalErrorBoundary = __toESM(require("@lexical/react/LexicalErrorBoundary"));
2481
+ var import_LexicalErrorBoundary = require("@lexical/react/LexicalErrorBoundary");
2492
2482
  var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
2493
2483
  var import_LexicalPlainTextPlugin = require("@lexical/react/LexicalPlainTextPlugin");
2494
2484
  var import_utils4 = require("@lexical/utils");
@@ -2506,7 +2496,7 @@ function VariablesComposerInput({
2506
2496
  {
2507
2497
  contentEditable: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_LexicalContentEditable.ContentEditable, { ...contentEditableProps, placeholder: null, "aria-placeholder": void 0 }),
2508
2498
  placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: placeholder }) : null,
2509
- ErrorBoundary: import_LexicalErrorBoundary.default
2499
+ ErrorBoundary: import_LexicalErrorBoundary.LexicalErrorBoundary
2510
2500
  }
2511
2501
  ),
2512
2502
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RichishCopyAndPastePlugin, {}),
@@ -2656,6 +2646,7 @@ function InputVariables(props) {
2656
2646
  portal: renderMenuInPortal,
2657
2647
  replaceValueOnVariableInsert: useInputWithNoVariables,
2658
2648
  useInputWhenNoVariables: useInputWithNoVariables,
2649
+ isActive: hadVariablesInValue,
2659
2650
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2660
2651
  VariablesComposerInput,
2661
2652
  {
@@ -2744,6 +2735,7 @@ function InputVariablesOverlayMenu({
2744
2735
  disabled,
2745
2736
  useInputWhenNoVariables,
2746
2737
  portal,
2738
+ isActive,
2747
2739
  ...props
2748
2740
  }) {
2749
2741
  if (disabled) {
@@ -2757,7 +2749,8 @@ function InputVariablesOverlayMenu({
2757
2749
  ...props,
2758
2750
  portal,
2759
2751
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
2760
- buttonCss: menuBtn2
2752
+ buttonCss: [menuBtn2, variableBindButton],
2753
+ buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2761
2754
  }
2762
2755
  )
2763
2756
  ] });
@@ -2810,7 +2803,7 @@ function ParameterConnectionIndicator({
2810
2803
  css: [menuBtn, variableBindButton],
2811
2804
  type: "button",
2812
2805
  "data-testid": "insert-variable",
2813
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_CgUsbC2.CgUsbC, { size: "1.4rem" })
2806
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_CgUsbC2.CgUsbC, { size: "1rem" })
2814
2807
  }
2815
2808
  )
2816
2809
  }
@@ -3030,13 +3023,13 @@ ${prettifyBindExpression(bindExpression)}`
3030
3023
 
3031
3024
  // src/components/Variables/VariablesList.tsx
3032
3025
  var import_react35 = require("@emotion/react");
3026
+ var import_dnd2 = require("@hello-pangea/dnd");
3033
3027
  var import_CgTrash = require("@react-icons/all-files/cg/CgTrash");
3034
3028
  var import_design_system13 = require("@uniformdev/design-system");
3035
- var import_react_beautiful_dnd2 = require("react-beautiful-dnd");
3036
3029
 
3037
3030
  // src/components/DragDropContext.tsx
3031
+ var import_dnd = require("@hello-pangea/dnd");
3038
3032
  var import_react33 = require("react");
3039
- var import_react_beautiful_dnd = require("react-beautiful-dnd");
3040
3033
  var import_react_use = require("react-use");
3041
3034
  var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
3042
3035
  function DragDropContext({ children, ...props }) {
@@ -3048,7 +3041,7 @@ function DragDropContext({ children, ...props }) {
3048
3041
  300,
3049
3042
  []
3050
3043
  );
3051
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_beautiful_dnd.DragDropContext, { ...props, children: isReady ? children : null });
3044
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_dnd.DragDropContext, { ...props, children: isReady ? children : null });
3052
3045
  }
3053
3046
 
3054
3047
  // src/components/Variables/styles/VariablesList.styles.ts
@@ -3098,8 +3091,8 @@ var variableValue = import_react34.css`
3098
3091
 
3099
3092
  // src/components/Variables/VariablesList.tsx
3100
3093
  var import_jsx_runtime32 = require("@emotion/react/jsx-runtime");
3101
- var DroppableHack = import_react_beautiful_dnd2.Droppable;
3102
- var DraggableHack = import_react_beautiful_dnd2.Draggable;
3094
+ var DroppableHack = import_dnd2.Droppable;
3095
+ var DraggableHack = import_dnd2.Draggable;
3103
3096
  function VariablesList() {
3104
3097
  const { variables, dispatch, readOnly } = useVariables();
3105
3098
  const sorted = variablesToList(variables).filter((variable) => !variable.system);
@@ -3291,7 +3284,8 @@ function TextVariableRenderer({ definition, value, setValue }) {
3291
3284
  value: value != null ? value : "",
3292
3285
  caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
3293
3286
  onChange: setValue,
3294
- "data-testid": "variable-input"
3287
+ "data-testid": "variable-input",
3288
+ disableInlineMenu: "by-label"
3295
3289
  }
3296
3290
  ) });
3297
3291
  }
@@ -3302,12 +3296,12 @@ var import_design_system15 = require("@uniformdev/design-system");
3302
3296
  var import_react38 = require("react");
3303
3297
 
3304
3298
  // src/components/Request/RequestProvider.tsx
3305
- var React5 = __toESM(require("react"));
3299
+ var React4 = __toESM(require("react"));
3306
3300
  var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
3307
- var RequestContext = React5.createContext(null);
3301
+ var RequestContext = React4.createContext(null);
3308
3302
  function RequestProvider({ value, onChange, children }) {
3309
- const [listVersion, setListVersion] = React5.useState(0);
3310
- const contextValue = React5.useMemo(() => {
3303
+ const [listVersion, setListVersion] = React4.useState(0);
3304
+ const contextValue = React4.useMemo(() => {
3311
3305
  return {
3312
3306
  dispatch: (event) => {
3313
3307
  if (event.type === "setRelativeUrl") {
@@ -3379,7 +3373,7 @@ function RequestProvider({ value, onChange, children }) {
3379
3373
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RequestContext.Provider, { value: contextValue, children });
3380
3374
  }
3381
3375
  function useRequest() {
3382
- const context = React5.useContext(RequestContext);
3376
+ const context = React4.useContext(RequestContext);
3383
3377
  if (!context) {
3384
3378
  throw new Error("No RequestProvider present");
3385
3379
  }
@@ -4755,8 +4749,8 @@ function legacyThemeMapper(theme) {
4755
4749
  }
4756
4750
 
4757
4751
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4752
+ var import_dnd3 = require("@hello-pangea/dnd");
4758
4753
  var import_design_system27 = require("@uniformdev/design-system");
4759
- var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
4760
4754
 
4761
4755
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4762
4756
  var import_react50 = require("@emotion/react");
@@ -4785,8 +4779,8 @@ var ObjectSearchResultListTitle = import_react50.css`
4785
4779
 
4786
4780
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4787
4781
  var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
4788
- var DroppableHack2 = import_react_beautiful_dnd3.Droppable;
4789
- var DraggableHack2 = import_react_beautiful_dnd3.Draggable;
4782
+ var DroppableHack2 = import_dnd3.Droppable;
4783
+ var DraggableHack2 = import_dnd3.Draggable;
4790
4784
  function ObjectSearchResultList({
4791
4785
  resultLabelText = "Selected",
4792
4786
  removeButtonText = "Remove all",
package/dist/index.mjs CHANGED
@@ -471,14 +471,14 @@ function deserializeVariablesEditorState(serialized) {
471
471
  children: [
472
472
  {
473
473
  children: result,
474
- direction: "ltr",
474
+ direction: null,
475
475
  format: "",
476
476
  indent: 0,
477
477
  type: "paragraph",
478
478
  version: 1
479
479
  }
480
480
  ],
481
- direction: "ltr",
481
+ direction: null,
482
482
  format: "",
483
483
  indent: 0,
484
484
  type: "root",
@@ -774,7 +774,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
774
774
  import { Button, Callout, HorizontalRhythm, Input, useShortcut } from "@uniformdev/design-system";
775
775
  import { useLayoutEffect, useRef as useRef2 } from "react";
776
776
  import { useForm } from "react-hook-form";
777
- import * as z from "zod";
777
+ import * as z from "zod/v3";
778
778
 
779
779
  // src/components/Variables/styles/VariableEditor.styles.ts
780
780
  import { css as css2 } from "@emotion/react";
@@ -1146,18 +1146,17 @@ var DISCONNECT_VARIABLE_COMMAND = createCommand(
1146
1146
  "uniform:disconnect-variable"
1147
1147
  );
1148
1148
  var INSERT_VARIABLE_COMMAND = createCommand("uniform:insert-variable");
1149
- var TRIGGER = "\\$\\$";
1150
- var LENGTH_LIMIT = 20;
1151
- var DollarSignVariablesRegex = new RegExp(`(^.*)(${TRIGGER}(.{0,${LENGTH_LIMIT}}))$`);
1149
+ var DollarSignVariablesRegex = /(^.*)(\$\$(.{0,20}))$/;
1152
1150
  function getPossibleQueryMatch(text) {
1153
1151
  const match = DollarSignVariablesRegex.exec(text);
1154
1152
  if (match !== null) {
1155
1153
  const maybeLeadingWhitespace = match[1];
1156
1154
  const matchingString = match[3];
1155
+ const replaceableString = match[2];
1157
1156
  return {
1158
1157
  leadOffset: match.index + maybeLeadingWhitespace.length,
1159
1158
  matchingString,
1160
- replaceableString: match[2]
1159
+ replaceableString
1161
1160
  };
1162
1161
  }
1163
1162
  return null;
@@ -1277,7 +1276,10 @@ function VariablesPlugin({
1277
1276
  filteredGroupedVariables: groupedVariables.map((group) => ({
1278
1277
  name: group.name,
1279
1278
  variables: group.variables.filter(
1280
- (option) => option.name.toLowerCase().includes(query) || option.name === ADD_VARIABLE_OPTION
1279
+ (option) => {
1280
+ var _a;
1281
+ return option.name === ADD_VARIABLE_OPTION || option.name.toLowerCase().includes(query) || ((_a = option.displayName) == null ? void 0 : _a.toLowerCase().includes(query));
1282
+ }
1281
1283
  )
1282
1284
  })).filter((group) => group.variables.length > 0),
1283
1285
  filteredMenuOptions: menuOptions.filter(
@@ -1568,13 +1570,13 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1568
1570
  constructor(reference, state, key) {
1569
1571
  super(key);
1570
1572
  this.reference = reference;
1571
- this.__state = state;
1573
+ this.__variableState = state;
1572
1574
  }
1573
1575
  static getType() {
1574
1576
  return "variable";
1575
1577
  }
1576
1578
  static clone(node) {
1577
- return new _VariableNode(node.reference, { ...node.__state }, node.__key);
1579
+ return new _VariableNode(node.reference, { ...node.__variableState }, node.__key);
1578
1580
  }
1579
1581
  /** Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) */
1580
1582
  static importJSON(serializedNode) {
@@ -1589,14 +1591,14 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1589
1591
  }
1590
1592
  /** Gets the node's current state */
1591
1593
  getState() {
1592
- return this.getLatest().__state;
1594
+ return this.getLatest().__variableState;
1593
1595
  }
1594
1596
  /**
1595
1597
  * Updates the node's variables state so it knows its current validity, display name, etc
1596
1598
  * The plugin updates this whenever the variables prop changes.
1597
1599
  */
1598
1600
  setState(state) {
1599
- this.getWritable().__state = state;
1601
+ this.getWritable().__variableState = state;
1600
1602
  }
1601
1603
  /**
1602
1604
  * Serializes the node to JSON for editor initial state
@@ -1636,7 +1638,7 @@ var VariableNode = class _VariableNode extends DecoratorNode {
1636
1638
  * rely on Context, etc in this renderer.
1637
1639
  */
1638
1640
  decorate() {
1639
- return /* @__PURE__ */ jsx22(VariableNodeComponent, { state: this.__state, reference: this.reference, nodeKey: this.__key });
1641
+ return /* @__PURE__ */ jsx22(VariableNodeComponent, { state: this.__variableState, reference: this.reference, nodeKey: this.__key });
1640
1642
  }
1641
1643
  };
1642
1644
  function $convertBindingElement(domNode) {
@@ -1908,27 +1910,40 @@ var placeholderCompact = css4`
1908
1910
  import { css as css5 } from "@emotion/react";
1909
1911
  import { scrollbarStyles } from "@uniformdev/design-system";
1910
1912
  var variableBindButton = css5`
1911
- align-items: center;
1912
- border: none;
1913
+ --hover-color: var(--accent-dark-hover);
1914
+ --active-color: var(--accent-dark-active);
1915
+ border: 1px solid transparent;
1913
1916
  border-radius: var(--rounded-base);
1914
1917
  background: none;
1918
+ color: var(--gray-300);
1915
1919
  display: flex;
1916
- height: 1.2rem;
1917
- padding: var(--spacing-2xs);
1920
+ align-items: center;
1921
+ justify-content: center;
1922
+ max-width: fit-content;
1923
+ padding: 0.125rem;
1918
1924
  transition:
1925
+ border-color var(--duration-fast) var(--timing-ease-out),
1919
1926
  background var(--duration-fast) var(--timing-ease-out),
1920
- color var(--duration-fast) var(--timing-ease-out);
1921
- width: 1.2rem;
1927
+ color var(--duration-fast) var(--timing-ease-out),
1928
+ box-shadow var(--duration-fast) var(--timing-ease-out);
1922
1929
 
1923
- &:hover,
1924
- &[aria-pressed='true']:not(:disabled) {
1925
- background: var(--brand-secondary-3);
1926
- color: var(--white);
1930
+ &:hover:not([aria-disabled='true']),
1931
+ &:focus:not([aria-disabled='true']),
1932
+ &:focus-within:not([aria-disabled='true']) {
1933
+ color: var(--gray-500);
1934
+ border-color: var(--hover-color);
1935
+ }
1936
+
1937
+ &:active:not([aria-disabled='true']),
1938
+ &[aria-pressed='true']:not([aria-disabled='true']) {
1939
+ color: var(--active-color);
1927
1940
  }
1928
1941
 
1929
1942
  &[aria-disabled='true'] {
1930
1943
  background: none;
1931
1944
  color: currentColor;
1945
+ opacity: var(--opacity-50);
1946
+ cursor: default;
1932
1947
  }
1933
1948
 
1934
1949
  // fixes menu resizing issue within iframes
@@ -2002,8 +2017,7 @@ var inputMultiLine = (lines) => css5`
2002
2017
 
2003
2018
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2004
2019
  import { hasReferencedVariables } from "@uniformdev/canvas";
2005
- import * as React4 from "react";
2006
- import { useMemo as useMemo7 } from "react";
2020
+ import { useEffect as useEffect7, useMemo as useMemo7, useState as useState5 } from "react";
2007
2021
  function useInputVariablesState({
2008
2022
  value,
2009
2023
  onChange,
@@ -2019,14 +2033,14 @@ function useInputVariablesState({
2019
2033
  }) {
2020
2034
  const { variables } = useVariables(true);
2021
2035
  const variableReferenceCountInValue = hasReferencedVariables(value != null ? value : "");
2022
- const [lastKnownId, setLastKnownId] = React4.useState(id);
2023
- const [hadVariablesInValue, setHadVariablesInValue] = React4.useState(variableReferenceCountInValue > 0);
2024
- React4.useEffect(() => {
2036
+ const [lastKnownId, setLastKnownId] = useState5(id);
2037
+ const [hadVariablesInValue, setHadVariablesInValue] = useState5(variableReferenceCountInValue > 0);
2038
+ useEffect7(() => {
2025
2039
  if (variableReferenceCountInValue) {
2026
2040
  setHadVariablesInValue(true);
2027
2041
  }
2028
2042
  }, [variableReferenceCountInValue]);
2029
- React4.useEffect(() => {
2043
+ useEffect7(() => {
2030
2044
  if (id !== lastKnownId) {
2031
2045
  setLastKnownId(id);
2032
2046
  setHadVariablesInValue(variableReferenceCountInValue > 0);
@@ -2076,30 +2090,6 @@ var labelText = css6`
2076
2090
  font-weight: var(--fw-regular);
2077
2091
  margin: 0 0 var(--spacing-xs);
2078
2092
  `;
2079
- var variableBindButton2 = css6`
2080
- align-items: center;
2081
- border: none;
2082
- border-radius: var(--rounded-base);
2083
- background: none;
2084
- display: flex;
2085
- height: 1.2rem;
2086
- padding: var(--spacing-2xs);
2087
- transition:
2088
- background var(--duration-fast) var(--timing-ease-out),
2089
- color var(--duration-fast) var(--timing-ease-out);
2090
- width: 1.2rem;
2091
-
2092
- &:hover,
2093
- &[aria-pressed='true']:not(:disabled) {
2094
- background: var(--brand-secondary-3);
2095
- color: var(--white);
2096
- }
2097
-
2098
- &[aria-disabled='true'] {
2099
- background: none;
2100
- color: currentColor;
2101
- }
2102
- `;
2103
2093
 
2104
2094
  // src/components/Variables/toolbox/VariablesComposerVariableMenu.tsx
2105
2095
  import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
@@ -2146,7 +2136,7 @@ function SelectVariableMenu({
2146
2136
  css: [menuBtn, buttonCss],
2147
2137
  type: "button",
2148
2138
  "data-testid": "insert-variable",
2149
- children: /* @__PURE__ */ jsx23(CgUsbC, { size: "1.4rem" })
2139
+ children: /* @__PURE__ */ jsx23(CgUsbC, { size: "1rem" })
2150
2140
  }
2151
2141
  ),
2152
2142
  children: [
@@ -2239,7 +2229,7 @@ function VariableField({
2239
2229
  VariablesComposerVariableMenu,
2240
2230
  {
2241
2231
  ...selectVariableMenuOptions,
2242
- buttonCss: [variableBindButton2, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2232
+ buttonCss: [variableBindButton, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
2243
2233
  buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2244
2234
  }
2245
2235
  ) }) : null;
@@ -2310,8 +2300,8 @@ function VariablesComposer(props) {
2310
2300
  // eslint-disable-next-line react-hooks/exhaustive-deps
2311
2301
  []
2312
2302
  );
2313
- const editorState = useRef5();
2314
- const updateTimeout = useRef5();
2303
+ const editorState = useRef5(void 0);
2304
+ const updateTimeout = useRef5(void 0);
2315
2305
  if (typeof document === "undefined") return null;
2316
2306
  return /* @__PURE__ */ jsxs10(LexicalComposer, { initialConfig: editorConfig, children: [
2317
2307
  /* @__PURE__ */ jsx26(
@@ -2352,7 +2342,7 @@ import {
2352
2342
  } from "@lexical/clipboard";
2353
2343
  import { useLexicalComposerContext as useLexicalComposerContext9 } from "@lexical/react/LexicalComposerContext";
2354
2344
  import { ContentEditable } from "@lexical/react/LexicalContentEditable";
2355
- import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
2345
+ import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
2356
2346
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
2357
2347
  import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
2358
2348
  import { mergeRegister as mergeRegister4, objectKlassEquals } from "@lexical/utils";
@@ -2528,6 +2518,7 @@ function InputVariables(props) {
2528
2518
  portal: renderMenuInPortal,
2529
2519
  replaceValueOnVariableInsert: useInputWithNoVariables,
2530
2520
  useInputWhenNoVariables: useInputWithNoVariables,
2521
+ isActive: hadVariablesInValue,
2531
2522
  children: /* @__PURE__ */ jsx28(
2532
2523
  VariablesComposerInput,
2533
2524
  {
@@ -2616,6 +2607,7 @@ function InputVariablesOverlayMenu({
2616
2607
  disabled,
2617
2608
  useInputWhenNoVariables,
2618
2609
  portal,
2610
+ isActive,
2619
2611
  ...props
2620
2612
  }) {
2621
2613
  if (disabled) {
@@ -2629,7 +2621,8 @@ function InputVariablesOverlayMenu({
2629
2621
  ...props,
2630
2622
  portal,
2631
2623
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
2632
- buttonCss: menuBtn2
2624
+ buttonCss: [menuBtn2, variableBindButton],
2625
+ buttonProps: isActive ? { "aria-pressed": "true" } : void 0
2633
2626
  }
2634
2627
  )
2635
2628
  ] });
@@ -2682,7 +2675,7 @@ function ParameterConnectionIndicator({
2682
2675
  css: [menuBtn, variableBindButton],
2683
2676
  type: "button",
2684
2677
  "data-testid": "insert-variable",
2685
- children: /* @__PURE__ */ jsx29(CgUsbC2, { size: "1.4rem" })
2678
+ children: /* @__PURE__ */ jsx29(CgUsbC2, { size: "1rem" })
2686
2679
  }
2687
2680
  )
2688
2681
  }
@@ -2902,6 +2895,7 @@ ${prettifyBindExpression(bindExpression)}`
2902
2895
 
2903
2896
  // src/components/Variables/VariablesList.tsx
2904
2897
  import { css as css10 } from "@emotion/react";
2898
+ import { Draggable, Droppable } from "@hello-pangea/dnd";
2905
2899
  import { CgTrash } from "@react-icons/all-files/cg/CgTrash";
2906
2900
  import {
2907
2901
  AddListButton,
@@ -2914,11 +2908,10 @@ import {
2914
2908
  TableHead,
2915
2909
  TableRow
2916
2910
  } from "@uniformdev/design-system";
2917
- import { Draggable, Droppable } from "react-beautiful-dnd";
2918
2911
 
2919
2912
  // src/components/DragDropContext.tsx
2913
+ import { DragDropContext as BaseDragDropContext } from "@hello-pangea/dnd";
2920
2914
  import { useState as useState8 } from "react";
2921
- import { DragDropContext as BaseDragDropContext } from "react-beautiful-dnd";
2922
2915
  import { useDebounce } from "react-use";
2923
2916
  import { jsx as jsx32 } from "@emotion/react/jsx-runtime";
2924
2917
  function DragDropContext({ children, ...props }) {
@@ -3173,7 +3166,8 @@ function TextVariableRenderer({ definition, value, setValue }) {
3173
3166
  value: value != null ? value : "",
3174
3167
  caption: (_a = definition.helpText) != null ? _a : definition.default !== "" ? `Default value: ${definition.default}` : void 0,
3175
3168
  onChange: setValue,
3176
- "data-testid": "variable-input"
3169
+ "data-testid": "variable-input",
3170
+ disableInlineMenu: "by-label"
3177
3171
  }
3178
3172
  ) });
3179
3173
  }
@@ -3184,12 +3178,12 @@ import { InputSelect, JsonEditor } from "@uniformdev/design-system";
3184
3178
  import { useState as useState10 } from "react";
3185
3179
 
3186
3180
  // src/components/Request/RequestProvider.tsx
3187
- import * as React5 from "react";
3181
+ import * as React4 from "react";
3188
3182
  import { jsx as jsx36 } from "@emotion/react/jsx-runtime";
3189
- var RequestContext = React5.createContext(null);
3183
+ var RequestContext = React4.createContext(null);
3190
3184
  function RequestProvider({ value, onChange, children }) {
3191
- const [listVersion, setListVersion] = React5.useState(0);
3192
- const contextValue = React5.useMemo(() => {
3185
+ const [listVersion, setListVersion] = React4.useState(0);
3186
+ const contextValue = React4.useMemo(() => {
3193
3187
  return {
3194
3188
  dispatch: (event) => {
3195
3189
  if (event.type === "setRelativeUrl") {
@@ -3261,7 +3255,7 @@ function RequestProvider({ value, onChange, children }) {
3261
3255
  return /* @__PURE__ */ jsx36(RequestContext.Provider, { value: contextValue, children });
3262
3256
  }
3263
3257
  function useRequest() {
3264
- const context = React5.useContext(RequestContext);
3258
+ const context = React4.useContext(RequestContext);
3265
3259
  if (!context) {
3266
3260
  throw new Error("No RequestProvider present");
3267
3261
  }
@@ -4664,11 +4658,11 @@ function legacyThemeMapper(theme) {
4664
4658
  }
4665
4659
 
4666
4660
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4667
- import { Button as Button4, Counter } from "@uniformdev/design-system";
4668
4661
  import {
4669
4662
  Draggable as Draggable2,
4670
4663
  Droppable as Droppable2
4671
- } from "react-beautiful-dnd";
4664
+ } from "@hello-pangea/dnd";
4665
+ import { Button as Button4, Counter } from "@uniformdev/design-system";
4672
4666
 
4673
4667
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4674
4668
  import { css as css20 } from "@emotion/react";
@@ -6788,7 +6782,7 @@ import { Icon as Icon5 } from "@uniformdev/design-system";
6788
6782
 
6789
6783
  // src/components/SearchAndFilter/FilterMenu.tsx
6790
6784
  import { HorizontalRhythm as HorizontalRhythm8, VerticalRhythm as VerticalRhythm6 } from "@uniformdev/design-system";
6791
- import React7, { useEffect as useEffect19 } from "react";
6785
+ import React6, { useEffect as useEffect19 } from "react";
6792
6786
  import { jsx as jsx76, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6793
6787
  var SearchAndFilterOptionsContainer2 = ({
6794
6788
  buttonRow,
@@ -6820,7 +6814,7 @@ var FilterMenu = ({
6820
6814
  resetButtonText = "reset"
6821
6815
  }) => {
6822
6816
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6823
- const innerMenuRef = React7.useRef(null);
6817
+ const innerMenuRef = React6.useRef(null);
6824
6818
  useEffect19(() => {
6825
6819
  var _a;
6826
6820
  if (filterVisibility) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "20.47.0",
3
+ "version": "20.47.1-alpha.3+04fdfa028a",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -44,25 +44,25 @@
44
44
  "document:prebuild": "api-extractor run --local"
45
45
  },
46
46
  "dependencies": {
47
- "@hookform/resolvers": "^3.3.1",
48
- "@lexical/clipboard": "0.25.0",
49
- "@lexical/react": "0.25.0",
50
- "@lexical/selection": "0.25.0",
51
- "@lexical/utils": "0.25.0",
47
+ "@hello-pangea/dnd": "18.0.1",
48
+ "@hookform/resolvers": "^5.2.2",
49
+ "@lexical/clipboard": "0.39.0",
50
+ "@lexical/react": "0.39.0",
51
+ "@lexical/selection": "0.39.0",
52
+ "@lexical/utils": "0.39.0",
52
53
  "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.5.0/react-icons-all-files-5.5.0.tgz",
53
- "@uniformdev/canvas": "20.47.0",
54
- "@uniformdev/design-system": "20.47.0",
55
- "@uniformdev/mesh-sdk": "20.47.0",
56
- "@uniformdev/richtext": "20.47.0",
54
+ "@uniformdev/canvas": "20.47.1-alpha.3+04fdfa028a",
55
+ "@uniformdev/design-system": "20.47.1-alpha.3+04fdfa028a",
56
+ "@uniformdev/mesh-sdk": "20.47.1-alpha.3+04fdfa028a",
57
+ "@uniformdev/richtext": "20.47.1-alpha.3+04fdfa028a",
57
58
  "dequal": "^2.0.3",
58
- "lexical": "0.25.0",
59
+ "lexical": "0.39.0",
59
60
  "mitt": "3.0.1",
60
- "react-beautiful-dnd": "13.1.1",
61
- "react-hook-form": "^7.47.0",
62
- "react-use": "17.5.1",
61
+ "react-hook-form": "7.65.0",
62
+ "react-use": "17.6.0",
63
63
  "timeago.js": "4.0.2",
64
64
  "uuid": "9.0.1",
65
- "zod": "3.23.8"
65
+ "zod": "3.25.76"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@emotion/react": ">=11.13.5",
@@ -70,15 +70,14 @@
70
70
  "react-dom": ">=16.8"
71
71
  },
72
72
  "devDependencies": {
73
- "@emotion/react": "11.13.5",
73
+ "@emotion/react": "11.14.0",
74
74
  "@storybook/react": "10.1.0",
75
75
  "@svgr/cli": "6.5.1",
76
- "@types/react": "18.3.24",
77
- "@types/react-beautiful-dnd": "13.1.8",
78
- "@types/react-dom": "18.3.7",
76
+ "@types/react": "19.2.2",
77
+ "@types/react-dom": "19.2.2",
79
78
  "@types/uuid": "9.0.4",
80
- "react": "18.3.1",
81
- "react-dom": "18.3.1"
79
+ "react": "19.2.1",
80
+ "react-dom": "19.2.1"
82
81
  },
83
82
  "files": [
84
83
  "/dist"
@@ -86,5 +85,5 @@
86
85
  "publishConfig": {
87
86
  "access": "public"
88
87
  },
89
- "gitHead": "446f701d32eee97220ab693e69b0952ed95cc1c5"
88
+ "gitHead": "04fdfa028a09763f4f9e89f78f32aef1de247ad4"
90
89
  }