@uniformdev/mesh-sdk-react 19.54.0 → 19.54.2-alpha.10
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +10 -5
- package/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -772,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
772
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
773
773
|
multiLine?: boolean;
|
|
774
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
775
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
776
776
|
/**
|
|
777
777
|
* Enables clicking a variable reference to edit the variable
|
|
778
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -803,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
803
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
804
804
|
*/
|
|
805
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
806
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
807
809
|
/**
|
|
808
810
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
package/dist/index.d.ts
CHANGED
|
@@ -772,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
772
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
773
773
|
multiLine?: boolean;
|
|
774
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
775
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
776
776
|
/**
|
|
777
777
|
* Enables clicking a variable reference to edit the variable
|
|
778
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -803,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
803
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
804
804
|
*/
|
|
805
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
806
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
807
809
|
/**
|
|
808
810
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
package/dist/index.esm.js
CHANGED
|
@@ -4075,6 +4075,11 @@ var input = css21`
|
|
|
4075
4075
|
margin: 0;
|
|
4076
4076
|
}
|
|
4077
4077
|
`;
|
|
4078
|
+
var inputCompact = css21`
|
|
4079
|
+
border: 1px solid var(--white);
|
|
4080
|
+
padding-block: var(--spacing-sm);
|
|
4081
|
+
font-size: var(--fs-sm);
|
|
4082
|
+
`;
|
|
4078
4083
|
|
|
4079
4084
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4080
4085
|
import * as React10 from "react";
|
|
@@ -4598,12 +4603,12 @@ function InputVariables(props) {
|
|
|
4598
4603
|
getEditorContext,
|
|
4599
4604
|
disabled,
|
|
4600
4605
|
editorRef,
|
|
4601
|
-
filterVariable
|
|
4606
|
+
filterVariable,
|
|
4607
|
+
styleVariant = "default"
|
|
4602
4608
|
} = props;
|
|
4603
4609
|
const [finalId] = useState12(id != null ? id : () => v42());
|
|
4604
4610
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4605
4611
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4606
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4607
4612
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4608
4613
|
const input3 = /* @__PURE__ */ jsxs23(
|
|
4609
4614
|
"div",
|
|
@@ -4618,7 +4623,7 @@ function InputVariables(props) {
|
|
|
4618
4623
|
InputVariablesOverlayMenu,
|
|
4619
4624
|
{
|
|
4620
4625
|
...sharedMenuProps,
|
|
4621
|
-
disabled:
|
|
4626
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4622
4627
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4623
4628
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4624
4629
|
children: /* @__PURE__ */ jsx39(
|
|
@@ -4628,7 +4633,7 @@ function InputVariables(props) {
|
|
|
4628
4633
|
"aria-label": ariaLabel,
|
|
4629
4634
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4630
4635
|
"data-text-value": value,
|
|
4631
|
-
css: input
|
|
4636
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4632
4637
|
}
|
|
4633
4638
|
)
|
|
4634
4639
|
}
|
|
@@ -4652,7 +4657,7 @@ function InputVariables(props) {
|
|
|
4652
4657
|
},
|
|
4653
4658
|
id: finalId,
|
|
4654
4659
|
isActive: hadVariablesInValue,
|
|
4655
|
-
disableVariables: disableVariablesForReals,
|
|
4660
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4656
4661
|
children: input3
|
|
4657
4662
|
}
|
|
4658
4663
|
);
|
package/dist/index.js
CHANGED
|
@@ -4253,6 +4253,11 @@ var input = import_react41.css`
|
|
|
4253
4253
|
margin: 0;
|
|
4254
4254
|
}
|
|
4255
4255
|
`;
|
|
4256
|
+
var inputCompact = import_react41.css`
|
|
4257
|
+
border: 1px solid var(--white);
|
|
4258
|
+
padding-block: var(--spacing-sm);
|
|
4259
|
+
font-size: var(--fs-sm);
|
|
4260
|
+
`;
|
|
4256
4261
|
|
|
4257
4262
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4258
4263
|
var React10 = __toESM(require("react"));
|
|
@@ -4764,12 +4769,12 @@ function InputVariables(props) {
|
|
|
4764
4769
|
getEditorContext,
|
|
4765
4770
|
disabled,
|
|
4766
4771
|
editorRef,
|
|
4767
|
-
filterVariable
|
|
4772
|
+
filterVariable,
|
|
4773
|
+
styleVariant = "default"
|
|
4768
4774
|
} = props;
|
|
4769
4775
|
const [finalId] = (0, import_react49.useState)(id != null ? id : () => (0, import_uuid2.v4)());
|
|
4770
4776
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4771
4777
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4772
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4773
4778
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4774
4779
|
const input3 = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4775
4780
|
"div",
|
|
@@ -4784,7 +4789,7 @@ function InputVariables(props) {
|
|
|
4784
4789
|
InputVariablesOverlayMenu,
|
|
4785
4790
|
{
|
|
4786
4791
|
...sharedMenuProps,
|
|
4787
|
-
disabled:
|
|
4792
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4788
4793
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4789
4794
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4790
4795
|
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
@@ -4794,7 +4799,7 @@ function InputVariables(props) {
|
|
|
4794
4799
|
"aria-label": ariaLabel,
|
|
4795
4800
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4796
4801
|
"data-text-value": value,
|
|
4797
|
-
css: input
|
|
4802
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4798
4803
|
}
|
|
4799
4804
|
)
|
|
4800
4805
|
}
|
|
@@ -4818,7 +4823,7 @@ function InputVariables(props) {
|
|
|
4818
4823
|
},
|
|
4819
4824
|
id: finalId,
|
|
4820
4825
|
isActive: hadVariablesInValue,
|
|
4821
|
-
disableVariables: disableVariablesForReals,
|
|
4826
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4822
4827
|
children: input3
|
|
4823
4828
|
}
|
|
4824
4829
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -4075,6 +4075,11 @@ var input = css21`
|
|
|
4075
4075
|
margin: 0;
|
|
4076
4076
|
}
|
|
4077
4077
|
`;
|
|
4078
|
+
var inputCompact = css21`
|
|
4079
|
+
border: 1px solid var(--white);
|
|
4080
|
+
padding-block: var(--spacing-sm);
|
|
4081
|
+
font-size: var(--fs-sm);
|
|
4082
|
+
`;
|
|
4078
4083
|
|
|
4079
4084
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4080
4085
|
import * as React10 from "react";
|
|
@@ -4598,12 +4603,12 @@ function InputVariables(props) {
|
|
|
4598
4603
|
getEditorContext,
|
|
4599
4604
|
disabled,
|
|
4600
4605
|
editorRef,
|
|
4601
|
-
filterVariable
|
|
4606
|
+
filterVariable,
|
|
4607
|
+
styleVariant = "default"
|
|
4602
4608
|
} = props;
|
|
4603
4609
|
const [finalId] = useState12(id != null ? id : () => v42());
|
|
4604
4610
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4605
4611
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4606
|
-
const disableInlineVariablesForReals = disableVariablesForReals || disableInlineMenu;
|
|
4607
4612
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
4608
4613
|
const input3 = /* @__PURE__ */ jsxs23(
|
|
4609
4614
|
"div",
|
|
@@ -4618,7 +4623,7 @@ function InputVariables(props) {
|
|
|
4618
4623
|
InputVariablesOverlayMenu,
|
|
4619
4624
|
{
|
|
4620
4625
|
...sharedMenuProps,
|
|
4621
|
-
disabled:
|
|
4626
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4622
4627
|
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4623
4628
|
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4624
4629
|
children: /* @__PURE__ */ jsx39(
|
|
@@ -4628,7 +4633,7 @@ function InputVariables(props) {
|
|
|
4628
4633
|
"aria-label": ariaLabel,
|
|
4629
4634
|
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4630
4635
|
"data-text-value": value,
|
|
4631
|
-
css: input
|
|
4636
|
+
css: [input, styleVariant === "compact" ? inputCompact : null]
|
|
4632
4637
|
}
|
|
4633
4638
|
)
|
|
4634
4639
|
}
|
|
@@ -4652,7 +4657,7 @@ function InputVariables(props) {
|
|
|
4652
4657
|
},
|
|
4653
4658
|
id: finalId,
|
|
4654
4659
|
isActive: hadVariablesInValue,
|
|
4655
|
-
disableVariables: disableVariablesForReals,
|
|
4660
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
4656
4661
|
children: input3
|
|
4657
4662
|
}
|
|
4658
4663
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.54.
|
|
3
|
+
"version": "19.54.2-alpha.10+26eb61515",
|
|
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.54.
|
|
54
|
-
"@uniformdev/design-system": "19.54.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.54.
|
|
53
|
+
"@uniformdev/canvas": "19.54.2-alpha.10+26eb61515",
|
|
54
|
+
"@uniformdev/design-system": "19.54.2-alpha.10+26eb61515",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.54.2-alpha.10+26eb61515",
|
|
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": "
|
|
89
|
+
"gitHead": "26eb615153bcf5f11deb0beeb0f227accde9ae6f"
|
|
90
90
|
}
|