@uniformdev/mesh-sdk-react 19.79.0 → 19.79.1-alpha.11
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 +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +9 -4
- package/dist/index.js +9 -4
- package/dist/index.mjs +9 -4
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -431,6 +431,8 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
|
|
|
431
431
|
*/
|
|
432
432
|
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
433
433
|
type: TLocationType;
|
|
434
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
435
|
+
type: TLocationType;
|
|
434
436
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
435
437
|
type: TLocationType;
|
|
436
438
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -450,6 +452,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
450
452
|
}>, "setValue"> & {
|
|
451
453
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
452
454
|
type: TLocationType;
|
|
455
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
456
|
+
type: TLocationType;
|
|
453
457
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
454
458
|
type: TLocationType;
|
|
455
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -468,6 +472,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
468
472
|
type: TLocationType;
|
|
469
473
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
470
474
|
type: TLocationType;
|
|
475
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
476
|
+
type: TLocationType;
|
|
471
477
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
478
|
type: TLocationType;
|
|
473
479
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
package/dist/index.d.ts
CHANGED
|
@@ -431,6 +431,8 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
|
|
|
431
431
|
*/
|
|
432
432
|
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
433
433
|
type: TLocationType;
|
|
434
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
435
|
+
type: TLocationType;
|
|
434
436
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
435
437
|
type: TLocationType;
|
|
436
438
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -450,6 +452,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
450
452
|
}>, "setValue"> & {
|
|
451
453
|
setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
452
454
|
type: TLocationType;
|
|
455
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
456
|
+
type: TLocationType;
|
|
453
457
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
454
458
|
type: TLocationType;
|
|
455
459
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
@@ -468,6 +472,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
468
472
|
type: TLocationType;
|
|
469
473
|
}>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
|
|
470
474
|
type: TLocationType;
|
|
475
|
+
}> | Extract<_uniformdev_mesh_sdk.AssetParameterLocation, {
|
|
476
|
+
type: TLocationType;
|
|
471
477
|
}> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
472
478
|
type: TLocationType;
|
|
473
479
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
package/dist/index.esm.js
CHANGED
|
@@ -4083,6 +4083,10 @@ var inputCompact = css21`
|
|
|
4083
4083
|
padding-block: var(--spacing-sm);
|
|
4084
4084
|
font-size: var(--fs-sm);
|
|
4085
4085
|
`;
|
|
4086
|
+
var inputDisabled = css21`
|
|
4087
|
+
cursor: not-allowed;
|
|
4088
|
+
opacity: var(--opacity-50);
|
|
4089
|
+
`;
|
|
4086
4090
|
var placeholderCaption = css21`
|
|
4087
4091
|
position: absolute;
|
|
4088
4092
|
color: var(--gray-400);
|
|
@@ -4638,6 +4642,7 @@ function InputVariables(props) {
|
|
|
4638
4642
|
dispatch({ type: "cancelEdit" });
|
|
4639
4643
|
}
|
|
4640
4644
|
},
|
|
4645
|
+
css: disabled ? inputDisabled : "",
|
|
4641
4646
|
children: [
|
|
4642
4647
|
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx39(
|
|
4643
4648
|
InputVariablesOverlayMenu,
|
|
@@ -5150,7 +5155,7 @@ var variableValue = css25`
|
|
|
5150
5155
|
// src/components/Variables/VariablesList.tsx
|
|
5151
5156
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
5152
5157
|
function VariablesList() {
|
|
5153
|
-
const { variables, dispatch } = useVariables();
|
|
5158
|
+
const { variables, dispatch, readOnly } = useVariables();
|
|
5154
5159
|
const sorted = variablesToList(variables).filter((variable) => !variable.system);
|
|
5155
5160
|
const onDragEnd = (res) => {
|
|
5156
5161
|
var _a, _b;
|
|
@@ -5177,7 +5182,7 @@ function VariablesList() {
|
|
|
5177
5182
|
/* @__PURE__ */ jsx43(TableCellHead, {})
|
|
5178
5183
|
] }) }),
|
|
5179
5184
|
/* @__PURE__ */ jsxs27(TableBody, { children: [
|
|
5180
|
-
sorted.map(({ name, displayName, default: defaultValue
|
|
5185
|
+
sorted.map(({ name, displayName, default: defaultValue }, index) => {
|
|
5181
5186
|
const text = displayName != null ? displayName : name;
|
|
5182
5187
|
const textValue = variableDefaultTextValue(defaultValue);
|
|
5183
5188
|
return /* @__PURE__ */ jsx43(
|
|
@@ -5196,7 +5201,7 @@ function VariablesList() {
|
|
|
5196
5201
|
css: tableRow(snapshot.isDragging),
|
|
5197
5202
|
"data-dragging": snapshot.isDragging,
|
|
5198
5203
|
children: [
|
|
5199
|
-
/* @__PURE__ */ jsx43(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ jsx43(
|
|
5204
|
+
/* @__PURE__ */ jsx43(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ jsx43("span", { css: variableName, children: text }) : /* @__PURE__ */ jsx43(
|
|
5200
5205
|
"button",
|
|
5201
5206
|
{
|
|
5202
5207
|
css: variableName,
|
|
@@ -5236,7 +5241,7 @@ function VariablesList() {
|
|
|
5236
5241
|
provided.placeholder
|
|
5237
5242
|
] })
|
|
5238
5243
|
] }) }) }),
|
|
5239
|
-
/* @__PURE__ */ jsx43(
|
|
5244
|
+
!readOnly && /* @__PURE__ */ jsx43(
|
|
5240
5245
|
AddListButton,
|
|
5241
5246
|
{
|
|
5242
5247
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
package/dist/index.js
CHANGED
|
@@ -4261,6 +4261,10 @@ var inputCompact = import_react41.css`
|
|
|
4261
4261
|
padding-block: var(--spacing-sm);
|
|
4262
4262
|
font-size: var(--fs-sm);
|
|
4263
4263
|
`;
|
|
4264
|
+
var inputDisabled = import_react41.css`
|
|
4265
|
+
cursor: not-allowed;
|
|
4266
|
+
opacity: var(--opacity-50);
|
|
4267
|
+
`;
|
|
4264
4268
|
var placeholderCaption = import_react41.css`
|
|
4265
4269
|
position: absolute;
|
|
4266
4270
|
color: var(--gray-400);
|
|
@@ -4804,6 +4808,7 @@ function InputVariables(props) {
|
|
|
4804
4808
|
dispatch({ type: "cancelEdit" });
|
|
4805
4809
|
}
|
|
4806
4810
|
},
|
|
4811
|
+
css: disabled ? inputDisabled : "",
|
|
4807
4812
|
children: [
|
|
4808
4813
|
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4809
4814
|
InputVariablesOverlayMenu,
|
|
@@ -5306,7 +5311,7 @@ var variableValue = import_react55.css`
|
|
|
5306
5311
|
// src/components/Variables/VariablesList.tsx
|
|
5307
5312
|
var import_jsx_runtime43 = require("@emotion/react/jsx-runtime");
|
|
5308
5313
|
function VariablesList() {
|
|
5309
|
-
const { variables, dispatch } = useVariables();
|
|
5314
|
+
const { variables, dispatch, readOnly } = useVariables();
|
|
5310
5315
|
const sorted = variablesToList(variables).filter((variable) => !variable.system);
|
|
5311
5316
|
const onDragEnd = (res) => {
|
|
5312
5317
|
var _a, _b;
|
|
@@ -5333,7 +5338,7 @@ function VariablesList() {
|
|
|
5333
5338
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system25.TableCellHead, {})
|
|
5334
5339
|
] }) }),
|
|
5335
5340
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_design_system25.TableBody, { children: [
|
|
5336
|
-
sorted.map(({ name, displayName, default: defaultValue
|
|
5341
|
+
sorted.map(({ name, displayName, default: defaultValue }, index) => {
|
|
5337
5342
|
const text = displayName != null ? displayName : name;
|
|
5338
5343
|
const textValue = variableDefaultTextValue(defaultValue);
|
|
5339
5344
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -5352,7 +5357,7 @@ function VariablesList() {
|
|
|
5352
5357
|
css: tableRow(snapshot.isDragging),
|
|
5353
5358
|
"data-dragging": snapshot.isDragging,
|
|
5354
5359
|
children: [
|
|
5355
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system25.TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5360
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_design_system25.TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { css: variableName, children: text }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5356
5361
|
"button",
|
|
5357
5362
|
{
|
|
5358
5363
|
css: variableName,
|
|
@@ -5392,7 +5397,7 @@ function VariablesList() {
|
|
|
5392
5397
|
provided.placeholder
|
|
5393
5398
|
] })
|
|
5394
5399
|
] }) }) }),
|
|
5395
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5400
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5396
5401
|
import_design_system25.AddListButton,
|
|
5397
5402
|
{
|
|
5398
5403
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
package/dist/index.mjs
CHANGED
|
@@ -4083,6 +4083,10 @@ var inputCompact = css21`
|
|
|
4083
4083
|
padding-block: var(--spacing-sm);
|
|
4084
4084
|
font-size: var(--fs-sm);
|
|
4085
4085
|
`;
|
|
4086
|
+
var inputDisabled = css21`
|
|
4087
|
+
cursor: not-allowed;
|
|
4088
|
+
opacity: var(--opacity-50);
|
|
4089
|
+
`;
|
|
4086
4090
|
var placeholderCaption = css21`
|
|
4087
4091
|
position: absolute;
|
|
4088
4092
|
color: var(--gray-400);
|
|
@@ -4638,6 +4642,7 @@ function InputVariables(props) {
|
|
|
4638
4642
|
dispatch({ type: "cancelEdit" });
|
|
4639
4643
|
}
|
|
4640
4644
|
},
|
|
4645
|
+
css: disabled ? inputDisabled : "",
|
|
4641
4646
|
children: [
|
|
4642
4647
|
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ jsx39(
|
|
4643
4648
|
InputVariablesOverlayMenu,
|
|
@@ -5150,7 +5155,7 @@ var variableValue = css25`
|
|
|
5150
5155
|
// src/components/Variables/VariablesList.tsx
|
|
5151
5156
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
5152
5157
|
function VariablesList() {
|
|
5153
|
-
const { variables, dispatch } = useVariables();
|
|
5158
|
+
const { variables, dispatch, readOnly } = useVariables();
|
|
5154
5159
|
const sorted = variablesToList(variables).filter((variable) => !variable.system);
|
|
5155
5160
|
const onDragEnd = (res) => {
|
|
5156
5161
|
var _a, _b;
|
|
@@ -5177,7 +5182,7 @@ function VariablesList() {
|
|
|
5177
5182
|
/* @__PURE__ */ jsx43(TableCellHead, {})
|
|
5178
5183
|
] }) }),
|
|
5179
5184
|
/* @__PURE__ */ jsxs27(TableBody, { children: [
|
|
5180
|
-
sorted.map(({ name, displayName, default: defaultValue
|
|
5185
|
+
sorted.map(({ name, displayName, default: defaultValue }, index) => {
|
|
5181
5186
|
const text = displayName != null ? displayName : name;
|
|
5182
5187
|
const textValue = variableDefaultTextValue(defaultValue);
|
|
5183
5188
|
return /* @__PURE__ */ jsx43(
|
|
@@ -5196,7 +5201,7 @@ function VariablesList() {
|
|
|
5196
5201
|
css: tableRow(snapshot.isDragging),
|
|
5197
5202
|
"data-dragging": snapshot.isDragging,
|
|
5198
5203
|
children: [
|
|
5199
|
-
/* @__PURE__ */ jsx43(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: /* @__PURE__ */ jsx43(
|
|
5204
|
+
/* @__PURE__ */ jsx43(TableCellData, { css: sorted.length > 1 ? tableCellDragIcon : void 0, children: readOnly ? /* @__PURE__ */ jsx43("span", { css: variableName, children: text }) : /* @__PURE__ */ jsx43(
|
|
5200
5205
|
"button",
|
|
5201
5206
|
{
|
|
5202
5207
|
css: variableName,
|
|
@@ -5236,7 +5241,7 @@ function VariablesList() {
|
|
|
5236
5241
|
provided.placeholder
|
|
5237
5242
|
] })
|
|
5238
5243
|
] }) }) }),
|
|
5239
|
-
/* @__PURE__ */ jsx43(
|
|
5244
|
+
!readOnly && /* @__PURE__ */ jsx43(
|
|
5240
5245
|
AddListButton,
|
|
5241
5246
|
{
|
|
5242
5247
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "19.79.
|
|
3
|
+
"version": "19.79.1-alpha.11+4547ef846",
|
|
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.79.
|
|
54
|
-
"@uniformdev/design-system": "19.79.
|
|
55
|
-
"@uniformdev/mesh-sdk": "19.79.
|
|
53
|
+
"@uniformdev/canvas": "19.79.1-alpha.11+4547ef846",
|
|
54
|
+
"@uniformdev/design-system": "19.79.1-alpha.11+4547ef846",
|
|
55
|
+
"@uniformdev/mesh-sdk": "19.79.1-alpha.11+4547ef846",
|
|
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": "4547ef8469f21f7f2341bcd87203372c4646bc08"
|
|
90
90
|
}
|