@uniformdev/mesh-sdk-react 19.127.0 → 19.128.1-alpha.9

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
@@ -632,6 +632,8 @@ type SelectVariableMenuProps<TEditorContext = undefined> = {
632
632
  menuTooltip?: string;
633
633
  /** Filters available variables in menus and auto-completes */
634
634
  filterVariable?: (variableName: string, variableDefinition: MeshDataVariableDefinition, context: TEditorContext | undefined) => boolean;
635
+ /** Sets the menu to be a portal */
636
+ portal?: boolean;
635
637
  };
636
638
 
637
639
  type VariableSourceGroup = {
@@ -820,6 +822,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
820
822
  editorRef?: MutableRefObject<LexicalEditor | null>;
821
823
  /** The compact style is similar to the parameters panel */
822
824
  styleVariant?: 'default' | 'compact';
825
+ /** Set the menu dropdown to render in a portal, this helps fix z-indexing issue */
826
+ renderMenuInPortal?: boolean;
823
827
  } & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
824
828
  /**
825
829
  * An input box that enables insertion of 'variables', provided by VariablesProvider,
package/dist/index.d.ts CHANGED
@@ -632,6 +632,8 @@ type SelectVariableMenuProps<TEditorContext = undefined> = {
632
632
  menuTooltip?: string;
633
633
  /** Filters available variables in menus and auto-completes */
634
634
  filterVariable?: (variableName: string, variableDefinition: MeshDataVariableDefinition, context: TEditorContext | undefined) => boolean;
635
+ /** Sets the menu to be a portal */
636
+ portal?: boolean;
635
637
  };
636
638
 
637
639
  type VariableSourceGroup = {
@@ -820,6 +822,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
820
822
  editorRef?: MutableRefObject<LexicalEditor | null>;
821
823
  /** The compact style is similar to the parameters panel */
822
824
  styleVariant?: 'default' | 'compact';
825
+ /** Set the menu dropdown to render in a portal, this helps fix z-indexing issue */
826
+ renderMenuInPortal?: boolean;
823
827
  } & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
824
828
  /**
825
829
  * An input box that enables insertion of 'variables', provided by VariablesProvider,
package/dist/index.esm.js CHANGED
@@ -4269,6 +4269,7 @@ function SelectVariableMenu({
4269
4269
  tip,
4270
4270
  getEditorContext,
4271
4271
  menuTooltip = "Insert variable",
4272
+ portal,
4272
4273
  filterVariable
4273
4274
  }) {
4274
4275
  const { variables, canDispatch, readOnly } = useVariables(true);
@@ -4283,8 +4284,8 @@ function SelectVariableMenu({
4283
4284
  return /* @__PURE__ */ jsxs19(
4284
4285
  Menu2,
4285
4286
  {
4286
- placement: "bottom-start",
4287
- withoutPortal: true,
4287
+ placement: portal ? "bottom-end" : "bottom-start",
4288
+ portal,
4288
4289
  menuTrigger: /* @__PURE__ */ jsx35(
4289
4290
  "button",
4290
4291
  {
@@ -4669,7 +4670,8 @@ function InputVariables(props) {
4669
4670
  disabled,
4670
4671
  editorRef,
4671
4672
  filterVariable,
4672
- styleVariant = "default"
4673
+ styleVariant = "default",
4674
+ renderMenuInPortal
4673
4675
  } = props;
4674
4676
  const [finalId] = useState13(id != null ? id : () => v42());
4675
4677
  const { dispatch, canDispatch, isEditing } = useVariables(true);
@@ -4690,6 +4692,7 @@ function InputVariables(props) {
4690
4692
  {
4691
4693
  ...sharedMenuProps,
4692
4694
  disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
4695
+ portal: renderMenuInPortal,
4693
4696
  replaceValueOnVariableInsert: useInputWithNoVariables,
4694
4697
  useInputWhenNoVariables: useInputWithNoVariables,
4695
4698
  children: /* @__PURE__ */ jsx40(
@@ -4765,6 +4768,7 @@ function InputVariablesOverlayMenu({
4765
4768
  children,
4766
4769
  disabled,
4767
4770
  useInputWhenNoVariables,
4771
+ portal,
4768
4772
  ...props
4769
4773
  }) {
4770
4774
  if (disabled) {
@@ -4776,6 +4780,7 @@ function InputVariablesOverlayMenu({
4776
4780
  VariablesComposerVariableMenu,
4777
4781
  {
4778
4782
  ...props,
4783
+ portal,
4779
4784
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4780
4785
  buttonCss: menuBtn2
4781
4786
  }
package/dist/index.js CHANGED
@@ -4448,6 +4448,7 @@ function SelectVariableMenu({
4448
4448
  tip,
4449
4449
  getEditorContext,
4450
4450
  menuTooltip = "Insert variable",
4451
+ portal,
4451
4452
  filterVariable
4452
4453
  }) {
4453
4454
  const { variables, canDispatch, readOnly } = useVariables(true);
@@ -4462,8 +4463,8 @@ function SelectVariableMenu({
4462
4463
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4463
4464
  import_design_system19.Menu,
4464
4465
  {
4465
- placement: "bottom-start",
4466
- withoutPortal: true,
4466
+ placement: portal ? "bottom-end" : "bottom-start",
4467
+ portal,
4467
4468
  menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4468
4469
  "button",
4469
4470
  {
@@ -4836,7 +4837,8 @@ function InputVariables(props) {
4836
4837
  disabled,
4837
4838
  editorRef,
4838
4839
  filterVariable,
4839
- styleVariant = "default"
4840
+ styleVariant = "default",
4841
+ renderMenuInPortal
4840
4842
  } = props;
4841
4843
  const [finalId] = (0, import_react50.useState)(id != null ? id : () => (0, import_uuid2.v4)());
4842
4844
  const { dispatch, canDispatch, isEditing } = useVariables(true);
@@ -4857,6 +4859,7 @@ function InputVariables(props) {
4857
4859
  {
4858
4860
  ...sharedMenuProps,
4859
4861
  disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
4862
+ portal: renderMenuInPortal,
4860
4863
  replaceValueOnVariableInsert: useInputWithNoVariables,
4861
4864
  useInputWhenNoVariables: useInputWithNoVariables,
4862
4865
  children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
@@ -4932,6 +4935,7 @@ function InputVariablesOverlayMenu({
4932
4935
  children,
4933
4936
  disabled,
4934
4937
  useInputWhenNoVariables,
4938
+ portal,
4935
4939
  ...props
4936
4940
  }) {
4937
4941
  if (disabled) {
@@ -4943,6 +4947,7 @@ function InputVariablesOverlayMenu({
4943
4947
  VariablesComposerVariableMenu,
4944
4948
  {
4945
4949
  ...props,
4950
+ portal,
4946
4951
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4947
4952
  buttonCss: menuBtn2
4948
4953
  }
package/dist/index.mjs CHANGED
@@ -4269,6 +4269,7 @@ function SelectVariableMenu({
4269
4269
  tip,
4270
4270
  getEditorContext,
4271
4271
  menuTooltip = "Insert variable",
4272
+ portal,
4272
4273
  filterVariable
4273
4274
  }) {
4274
4275
  const { variables, canDispatch, readOnly } = useVariables(true);
@@ -4283,8 +4284,8 @@ function SelectVariableMenu({
4283
4284
  return /* @__PURE__ */ jsxs19(
4284
4285
  Menu2,
4285
4286
  {
4286
- placement: "bottom-start",
4287
- withoutPortal: true,
4287
+ placement: portal ? "bottom-end" : "bottom-start",
4288
+ portal,
4288
4289
  menuTrigger: /* @__PURE__ */ jsx35(
4289
4290
  "button",
4290
4291
  {
@@ -4669,7 +4670,8 @@ function InputVariables(props) {
4669
4670
  disabled,
4670
4671
  editorRef,
4671
4672
  filterVariable,
4672
- styleVariant = "default"
4673
+ styleVariant = "default",
4674
+ renderMenuInPortal
4673
4675
  } = props;
4674
4676
  const [finalId] = useState13(id != null ? id : () => v42());
4675
4677
  const { dispatch, canDispatch, isEditing } = useVariables(true);
@@ -4690,6 +4692,7 @@ function InputVariables(props) {
4690
4692
  {
4691
4693
  ...sharedMenuProps,
4692
4694
  disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
4695
+ portal: renderMenuInPortal,
4693
4696
  replaceValueOnVariableInsert: useInputWithNoVariables,
4694
4697
  useInputWhenNoVariables: useInputWithNoVariables,
4695
4698
  children: /* @__PURE__ */ jsx40(
@@ -4765,6 +4768,7 @@ function InputVariablesOverlayMenu({
4765
4768
  children,
4766
4769
  disabled,
4767
4770
  useInputWhenNoVariables,
4771
+ portal,
4768
4772
  ...props
4769
4773
  }) {
4770
4774
  if (disabled) {
@@ -4776,6 +4780,7 @@ function InputVariablesOverlayMenu({
4776
4780
  VariablesComposerVariableMenu,
4777
4781
  {
4778
4782
  ...props,
4783
+ portal,
4779
4784
  tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
4780
4785
  buttonCss: menuBtn2
4781
4786
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.127.0",
3
+ "version": "19.128.1-alpha.9+1af0ad2d62",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,9 +50,9 @@
50
50
  "@lexical/selection": "^0.12.0",
51
51
  "@lexical/utils": "^0.12.0",
52
52
  "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
53
- "@uniformdev/canvas": "19.127.0",
54
- "@uniformdev/design-system": "19.127.0",
55
- "@uniformdev/mesh-sdk": "19.127.0",
53
+ "@uniformdev/canvas": "19.128.1-alpha.9+1af0ad2d62",
54
+ "@uniformdev/design-system": "19.128.1-alpha.9+1af0ad2d62",
55
+ "@uniformdev/mesh-sdk": "19.128.1-alpha.9+1af0ad2d62",
56
56
  "dequal": "^2.0.3",
57
57
  "lexical": "^0.12.0",
58
58
  "mitt": "^3.0.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "3757cfe081cf40d019cb9f65d0a26e2a4fbdb1f6"
89
+ "gitHead": "1af0ad2d62257f3f8d34a8eca337dad8b6025b6e"
90
90
  }