@uniformdev/mesh-sdk-react 19.53.1-alpha.41 → 19.54.2-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 +3 -22
- package/dist/index.d.ts +3 -22
- 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
|
@@ -441,13 +441,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
441
441
|
type: TLocationType;
|
|
442
442
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
443
443
|
type: TLocationType;
|
|
444
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
445
|
-
settings: unknown;
|
|
446
|
-
projectId: string;
|
|
447
|
-
prompt: string;
|
|
448
|
-
promptMetadata: unknown;
|
|
449
|
-
}, TLocationValue, "unstable_ai">, {
|
|
450
|
-
type: TLocationType;
|
|
451
444
|
}>, "setValue"> & {
|
|
452
445
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
453
446
|
type: TLocationType;
|
|
@@ -461,13 +454,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
461
454
|
type: TLocationType;
|
|
462
455
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
463
456
|
type: TLocationType;
|
|
464
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
465
|
-
settings: unknown;
|
|
466
|
-
projectId: string;
|
|
467
|
-
prompt: string;
|
|
468
|
-
promptMetadata: unknown;
|
|
469
|
-
}, TLocationValue, "unstable_ai">, {
|
|
470
|
-
type: TLocationType;
|
|
471
457
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
458
|
type: TLocationType;
|
|
473
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -480,13 +466,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
480
466
|
type: TLocationType;
|
|
481
467
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
482
468
|
type: TLocationType;
|
|
483
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
484
|
-
settings: unknown;
|
|
485
|
-
projectId: string;
|
|
486
|
-
prompt: string;
|
|
487
|
-
promptMetadata: unknown;
|
|
488
|
-
}, TLocationValue, "unstable_ai">, {
|
|
489
|
-
type: TLocationType;
|
|
490
469
|
}>)["setValue"]>[0]>;
|
|
491
470
|
};
|
|
492
471
|
type SetLocationValueDispatch<TValue, TSetValue = TValue> = (dispatch: SetLocationValueFunction<TValue, TSetValue>) => Promise<void> | void;
|
|
@@ -793,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
793
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
794
773
|
multiLine?: boolean;
|
|
795
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
796
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
797
776
|
/**
|
|
798
777
|
* Enables clicking a variable reference to edit the variable
|
|
799
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -824,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
824
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
825
804
|
*/
|
|
826
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
827
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
828
809
|
/**
|
|
829
810
|
* An input box that enables insertion of 'variables', provided by VariablesProvider,
|
package/dist/index.d.ts
CHANGED
|
@@ -441,13 +441,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
441
441
|
type: TLocationType;
|
|
442
442
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
443
443
|
type: TLocationType;
|
|
444
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
445
|
-
settings: unknown;
|
|
446
|
-
projectId: string;
|
|
447
|
-
prompt: string;
|
|
448
|
-
promptMetadata: unknown;
|
|
449
|
-
}, TLocationValue, "unstable_ai">, {
|
|
450
|
-
type: TLocationType;
|
|
451
444
|
}>, "setValue"> & {
|
|
452
445
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
453
446
|
type: TLocationType;
|
|
@@ -461,13 +454,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
461
454
|
type: TLocationType;
|
|
462
455
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
463
456
|
type: TLocationType;
|
|
464
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
465
|
-
settings: unknown;
|
|
466
|
-
projectId: string;
|
|
467
|
-
prompt: string;
|
|
468
|
-
promptMetadata: unknown;
|
|
469
|
-
}, TLocationValue, "unstable_ai">, {
|
|
470
|
-
type: TLocationType;
|
|
471
457
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
458
|
type: TLocationType;
|
|
473
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -480,13 +466,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
480
466
|
type: TLocationType;
|
|
481
467
|
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
482
468
|
type: TLocationType;
|
|
483
|
-
}> | Extract<_uniformdev_mesh_sdk.MeshLocationCore<TLocationValue, {
|
|
484
|
-
settings: unknown;
|
|
485
|
-
projectId: string;
|
|
486
|
-
prompt: string;
|
|
487
|
-
promptMetadata: unknown;
|
|
488
|
-
}, TLocationValue, "unstable_ai">, {
|
|
489
|
-
type: TLocationType;
|
|
490
469
|
}>)["setValue"]>[0]>;
|
|
491
470
|
};
|
|
492
471
|
type SetLocationValueDispatch<TValue, TSetValue = TValue> = (dispatch: SetLocationValueFunction<TValue, TSetValue>) => Promise<void> | void;
|
|
@@ -793,7 +772,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
793
772
|
/** Enables mutliple lines in the input (\n in the value) */
|
|
794
773
|
multiLine?: boolean;
|
|
795
774
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
796
|
-
disableInlineMenu?: boolean;
|
|
775
|
+
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
797
776
|
/**
|
|
798
777
|
* Enables clicking a variable reference to edit the variable
|
|
799
778
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -824,6 +803,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
824
803
|
* * Performing other custom mutations to the variables editor, such as inserting text from a button click.
|
|
825
804
|
*/
|
|
826
805
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
806
|
+
/** The compact style is similar to the parameters panel */
|
|
807
|
+
styleVariant?: 'default' | 'compact';
|
|
827
808
|
} & PasteTransformerPluginProps & UseInputVariablesStateProps<TEditorContext>;
|
|
828
809
|
/**
|
|
829
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.
|
|
3
|
+
"version": "19.54.2-alpha.3+f67adafcc",
|
|
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
|
-
"@uniformdev/design-system": "19.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.
|
|
53
|
+
"@uniformdev/canvas": "19.54.2-alpha.3+f67adafcc",
|
|
54
|
+
"@uniformdev/design-system": "19.54.2-alpha.3+f67adafcc",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.54.2-alpha.3+f67adafcc",
|
|
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": "f67adafccc67437fbeb610b57f759ca45bd6140c"
|
|
90
90
|
}
|