@uniformdev/mesh-sdk-react 19.69.0 → 19.73.0

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
@@ -429,12 +429,16 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
429
429
  *
430
430
  * You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
431
431
  */
432
- declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
432
+ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
433
+ type: TLocationType;
434
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
433
435
  type: TLocationType;
434
436
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
435
437
  type: TLocationType;
436
438
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
437
439
  type: TLocationType;
440
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
441
+ type: TLocationType;
438
442
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
439
443
  type: TLocationType;
440
444
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -444,12 +448,16 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
444
448
  }> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
445
449
  type: TLocationType;
446
450
  }>, "setValue"> & {
447
- setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
451
+ setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
452
+ type: TLocationType;
453
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
448
454
  type: TLocationType;
449
455
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
450
456
  type: TLocationType;
451
457
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
452
458
  type: TLocationType;
459
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
460
+ type: TLocationType;
453
461
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
454
462
  type: TLocationType;
455
463
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -458,12 +466,16 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
458
466
  type: TLocationType;
459
467
  }> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
460
468
  type: TLocationType;
461
- }>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
469
+ }>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
470
+ type: TLocationType;
471
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
462
472
  type: TLocationType;
463
473
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
464
474
  type: TLocationType;
465
475
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
466
476
  type: TLocationType;
477
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
478
+ type: TLocationType;
467
479
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
468
480
  type: TLocationType;
469
481
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -586,6 +598,10 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
586
598
  * If not passed, defaults to helpText.
587
599
  */
588
600
  tooltip?: string;
601
+ /**
602
+ If true the variable will be shown only in menus.
603
+ */
604
+ system?: boolean;
589
605
  };
590
606
  /**
591
607
  * Provides information for an undefined variable that might be referenced in data,
@@ -795,6 +811,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
795
811
  warningMessage?: string;
796
812
  /** (optional) sets and shows the the info message value */
797
813
  infoMessage?: string;
814
+ /** (optional) sets placeholder when there is no value */
815
+ placeholder?: string;
798
816
  /** (optional) sets caption text value */
799
817
  caption?: string;
800
818
  /** Disables editing the value of the input, editing variables, and adding variables */
package/dist/index.d.ts CHANGED
@@ -429,12 +429,16 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
429
429
  *
430
430
  * You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
431
431
  */
432
- declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
432
+ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Omit<Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
433
+ type: TLocationType;
434
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
433
435
  type: TLocationType;
434
436
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
435
437
  type: TLocationType;
436
438
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
437
439
  type: TLocationType;
440
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
441
+ type: TLocationType;
438
442
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
439
443
  type: TLocationType;
440
444
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -444,12 +448,16 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
444
448
  }> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
445
449
  type: TLocationType;
446
450
  }>, "setValue"> & {
447
- setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
451
+ setValue: SetLocationValueDispatch<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
452
+ type: TLocationType;
453
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
448
454
  type: TLocationType;
449
455
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
450
456
  type: TLocationType;
451
457
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
452
458
  type: TLocationType;
459
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
460
+ type: TLocationType;
453
461
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
454
462
  type: TLocationType;
455
463
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -458,12 +466,16 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
458
466
  type: TLocationType;
459
467
  }> | Extract<_uniformdev_mesh_sdk.AIGenerateLocation<TLocationValue>, {
460
468
  type: TLocationType;
461
- }>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
469
+ }>)["value"], Parameters<(Extract<_uniformdev_mesh_sdk.AssetLibraryLocation, {
470
+ type: TLocationType;
471
+ }> | Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
462
472
  type: TLocationType;
463
473
  }> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
464
474
  type: TLocationType;
465
475
  }> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
466
476
  type: TLocationType;
477
+ }> | Extract<_uniformdev_mesh_sdk.AIPromptMetadataLocation, {
478
+ type: TLocationType;
467
479
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
468
480
  type: TLocationType;
469
481
  }> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
@@ -586,6 +598,10 @@ type MeshDataVariableDefinition = Omit<DataVariableDefinition, 'default'> & {
586
598
  * If not passed, defaults to helpText.
587
599
  */
588
600
  tooltip?: string;
601
+ /**
602
+ If true the variable will be shown only in menus.
603
+ */
604
+ system?: boolean;
589
605
  };
590
606
  /**
591
607
  * Provides information for an undefined variable that might be referenced in data,
@@ -795,6 +811,8 @@ type InputVariablesProps<TEditorContext = unknown> = {
795
811
  warningMessage?: string;
796
812
  /** (optional) sets and shows the the info message value */
797
813
  infoMessage?: string;
814
+ /** (optional) sets placeholder when there is no value */
815
+ placeholder?: string;
798
816
  /** (optional) sets caption text value */
799
817
  caption?: string;
800
818
  /** Disables editing the value of the input, editing variables, and adding variables */
package/dist/index.esm.js CHANGED
@@ -3002,7 +3002,7 @@ import {
3002
3002
  import { mergeRegister } from "@lexical/utils";
3003
3003
  import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
3004
3004
  import { createVariableReference } from "@uniformdev/canvas";
3005
- import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItem as MenuItem2, MenuItemSeparator } from "@uniformdev/design-system";
3005
+ import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItemInner, MenuItemSeparator } from "@uniformdev/design-system";
3006
3006
  import { dequal as dequal2 } from "dequal/lite";
3007
3007
  import {
3008
3008
  $createTextNode,
@@ -3766,7 +3766,7 @@ function VariablesPlugin({
3766
3766
  currentCumulativeMenuIndex++;
3767
3767
  const myCumulativeIndex = currentCumulativeMenuIndex;
3768
3768
  return /* @__PURE__ */ jsx32(
3769
- MenuItem2,
3769
+ MenuItemInner,
3770
3770
  {
3771
3771
  active: selectedIndex === myCumulativeIndex,
3772
3772
  onClick: () => {
@@ -4083,6 +4083,18 @@ var inputCompact = css21`
4083
4083
  padding-block: var(--spacing-sm);
4084
4084
  font-size: var(--fs-sm);
4085
4085
  `;
4086
+ var placeholderCaption = css21`
4087
+ position: absolute;
4088
+ color: var(--gray-400);
4089
+ inset: var(--spacing-base) var(--spacing-lg) var(--spacing-base) var(--spacing-base);
4090
+ overflow: hidden;
4091
+ text-overflow: ellipsis;
4092
+ white-space: nowrap;
4093
+ pointer-events: none;
4094
+ `;
4095
+ var placeholderCompact = css21`
4096
+ inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
4097
+ `;
4086
4098
 
4087
4099
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
4088
4100
  import * as React10 from "react";
@@ -4201,7 +4213,7 @@ import { CLEAR_EDITOR_COMMAND } from "lexical";
4201
4213
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4202
4214
  import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircleFill";
4203
4215
  import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
4204
- import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem3, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4216
+ import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem2, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4205
4217
  import { useRef as useRef11 } from "react";
4206
4218
  import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4207
4219
  function SelectVariableMenu({
@@ -4244,7 +4256,7 @@ function SelectVariableMenu({
4244
4256
  menuLabel: menuTooltip,
4245
4257
  children: [
4246
4258
  showAddVariableMenuOptionForReals ? /* @__PURE__ */ jsx34(
4247
- MenuItem3,
4259
+ MenuItem2,
4248
4260
  {
4249
4261
  onClick: async () => {
4250
4262
  const result = await editVariable("", getEditorContext == null ? void 0 : getEditorContext());
@@ -4266,7 +4278,7 @@ function SelectVariableMenu({
4266
4278
  return /* @__PURE__ */ jsx34(MenuGroup2, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4267
4279
  const { name, displayName, helpText } = variable;
4268
4280
  return /* @__PURE__ */ jsxs19(
4269
- MenuItem3,
4281
+ MenuItem2,
4270
4282
  {
4271
4283
  id: name,
4272
4284
  css: menuItemTextGroup,
@@ -4281,7 +4293,7 @@ function SelectVariableMenu({
4281
4293
  }) }, group.name);
4282
4294
  }),
4283
4295
  menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4284
- onResetVariables ? /* @__PURE__ */ jsx34(MenuItem3, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4296
+ onResetVariables ? /* @__PURE__ */ jsx34(MenuItem2, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4285
4297
  tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4286
4298
  tip ? /* @__PURE__ */ jsx34("i", { css: variablesTipText, children: tip }) : null
4287
4299
  ]
@@ -4491,14 +4503,18 @@ import {
4491
4503
  PASTE_COMMAND as PASTE_COMMAND2
4492
4504
  } from "lexical";
4493
4505
  import { useEffect as useEffect13 } from "react";
4494
- import { jsx as jsx38, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4495
- function VariablesComposerInput({ css: css37, ...contentEditableProps }) {
4506
+ import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4507
+ function VariablesComposerInput({
4508
+ css: css37,
4509
+ placeholder,
4510
+ ...contentEditableProps
4511
+ }) {
4496
4512
  return /* @__PURE__ */ jsxs22("div", { children: [
4497
4513
  /* @__PURE__ */ jsx38(
4498
4514
  PlainTextPlugin,
4499
4515
  {
4500
4516
  contentEditable: /* @__PURE__ */ jsx38(ContentEditable, { ...contentEditableProps }),
4501
- placeholder: null,
4517
+ placeholder: placeholder ? /* @__PURE__ */ jsx38(Fragment9, { children: placeholder }) : null,
4502
4518
  ErrorBoundary: LexicalErrorBoundary
4503
4519
  }
4504
4520
  ),
@@ -4583,7 +4599,7 @@ function RichishCopyAndPastePlugin() {
4583
4599
  }
4584
4600
 
4585
4601
  // src/components/Variables/InputVariables.tsx
4586
- import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4602
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4587
4603
  function InputVariables(props) {
4588
4604
  const {
4589
4605
  id,
@@ -4596,6 +4612,7 @@ function InputVariables(props) {
4596
4612
  transformPaste,
4597
4613
  showAddVariableMenuOption,
4598
4614
  inputWhenNoVariables,
4615
+ placeholder,
4599
4616
  caption,
4600
4617
  errorMessage,
4601
4618
  warningMessage,
@@ -4636,7 +4653,17 @@ function InputVariables(props) {
4636
4653
  "aria-label": ariaLabel,
4637
4654
  "data-testid": dataTestId ? dataTestId : "input-container",
4638
4655
  "data-text-value": value,
4639
- css: [input, styleVariant === "compact" ? inputCompact : null]
4656
+ css: [input, styleVariant === "compact" ? inputCompact : null],
4657
+ placeholder: placeholder ? /* @__PURE__ */ jsx39(
4658
+ Caption,
4659
+ {
4660
+ css: [
4661
+ placeholderCaption,
4662
+ styleVariant === "compact" ? placeholderCompact : null
4663
+ ],
4664
+ children: placeholder
4665
+ }
4666
+ ) : void 0
4640
4667
  }
4641
4668
  )
4642
4669
  }
@@ -4695,7 +4722,7 @@ function InputVariablesOverlayMenu({
4695
4722
  ...props
4696
4723
  }) {
4697
4724
  if (disabled) {
4698
- return /* @__PURE__ */ jsx39(Fragment9, { children });
4725
+ return /* @__PURE__ */ jsx39(Fragment10, { children });
4699
4726
  }
4700
4727
  return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
4701
4728
  children,
@@ -5121,10 +5148,10 @@ var variableValue = css25`
5121
5148
  `;
5122
5149
 
5123
5150
  // src/components/Variables/VariablesList.tsx
5124
- import { Fragment as Fragment10, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5151
+ import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5125
5152
  function VariablesList() {
5126
5153
  const { variables, dispatch } = useVariables();
5127
- const sorted = variablesToList(variables);
5154
+ const sorted = variablesToList(variables).filter((variable) => !variable.system);
5128
5155
  const onDragEnd = (res) => {
5129
5156
  var _a, _b;
5130
5157
  if (res.destination && res.source.droppableId === ((_a = res.destination) == null ? void 0 : _a.droppableId)) {
@@ -5142,7 +5169,7 @@ function VariablesList() {
5142
5169
  return result;
5143
5170
  }
5144
5171
  };
5145
- return /* @__PURE__ */ jsxs27(Fragment10, { children: [
5172
+ return /* @__PURE__ */ jsxs27(Fragment11, { children: [
5146
5173
  /* @__PURE__ */ jsx43(DragDropContext2, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx43(Droppable2, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ jsxs27(Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
5147
5174
  /* @__PURE__ */ jsx43(TableHead, { children: /* @__PURE__ */ jsxs27(TableRow, { children: [
5148
5175
  /* @__PURE__ */ jsx43(TableCellHead, { children: "Name" }),
@@ -5770,7 +5797,7 @@ function decodeVariablesInUrlEncodedString(string, varValues) {
5770
5797
  }
5771
5798
 
5772
5799
  // src/components/Request/RequestUrl.tsx
5773
- import { Fragment as Fragment11, jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5800
+ import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5774
5801
  function RequestUrl() {
5775
5802
  var _a, _b;
5776
5803
  const { variables } = useVariables();
@@ -5794,7 +5821,7 @@ function RequestUrl() {
5794
5821
  request.baseRequest ? /* @__PURE__ */ jsx52("span", { children: (_b = request.baseRequest) == null ? void 0 : _b.baseUrl }) : null,
5795
5822
  /* @__PURE__ */ jsxs31("span", { css: { fontWeight: request.baseRequest ? "bold" : "inherit" }, children: [
5796
5823
  urlEncodeRequestUrl(request.relativeUrl, variables),
5797
- mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment11, { children: [
5824
+ mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment12, { children: [
5798
5825
  "?",
5799
5826
  mergedParameters.map((param, index) => {
5800
5827
  const encoded = urlEncodeRequestParameter(param, variables);
@@ -6749,7 +6776,7 @@ var ObjectSearchResultListTitle = css36`
6749
6776
  `;
6750
6777
 
6751
6778
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
6752
- import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6779
+ import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6753
6780
  function ObjectSearchResultList({
6754
6781
  resultLabelText = "Selected",
6755
6782
  removeButtonText = "Remove all",
@@ -6776,7 +6803,7 @@ function ObjectSearchResultList({
6776
6803
  return result;
6777
6804
  }
6778
6805
  };
6779
- return /* @__PURE__ */ jsxs40(Fragment12, { children: [
6806
+ return /* @__PURE__ */ jsxs40(Fragment13, { children: [
6780
6807
  /* @__PURE__ */ jsxs40("div", { role: "group", css: ObjectSearchResultListContainer, children: [
6781
6808
  /* @__PURE__ */ jsxs40("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
6782
6809
  /* @__PURE__ */ jsx65("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
@@ -7094,7 +7121,7 @@ import {
7094
7121
  LoadingIndicator as LoadingIndicator5,
7095
7122
  LoadingOverlay as LoadingOverlay2,
7096
7123
  Menu as Menu4,
7097
- MenuItem as MenuItem4,
7124
+ MenuItem as MenuItem3,
7098
7125
  ParameterGroup,
7099
7126
  ParameterImage,
7100
7127
  ParameterImageInner,
@@ -7150,7 +7177,7 @@ export {
7150
7177
  LoadingIndicator5 as LoadingIndicator,
7151
7178
  LoadingOverlay2 as LoadingOverlay,
7152
7179
  Menu4 as Menu,
7153
- MenuItem4 as MenuItem,
7180
+ MenuItem3 as MenuItem,
7154
7181
  MeshApp,
7155
7182
  OPEN_INSERT_VARIABLE_COMMAND,
7156
7183
  ObjectSearchContainer,
package/dist/index.js CHANGED
@@ -3944,7 +3944,7 @@ function VariablesPlugin({
3944
3944
  currentCumulativeMenuIndex++;
3945
3945
  const myCumulativeIndex = currentCumulativeMenuIndex;
3946
3946
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3947
- import_design_system17.MenuItem,
3947
+ import_design_system17.MenuItemInner,
3948
3948
  {
3949
3949
  active: selectedIndex === myCumulativeIndex,
3950
3950
  onClick: () => {
@@ -4261,6 +4261,18 @@ var inputCompact = import_react41.css`
4261
4261
  padding-block: var(--spacing-sm);
4262
4262
  font-size: var(--fs-sm);
4263
4263
  `;
4264
+ var placeholderCaption = import_react41.css`
4265
+ position: absolute;
4266
+ color: var(--gray-400);
4267
+ inset: var(--spacing-base) var(--spacing-lg) var(--spacing-base) var(--spacing-base);
4268
+ overflow: hidden;
4269
+ text-overflow: ellipsis;
4270
+ white-space: nowrap;
4271
+ pointer-events: none;
4272
+ `;
4273
+ var placeholderCompact = import_react41.css`
4274
+ inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
4275
+ `;
4264
4276
 
4265
4277
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
4266
4278
  var React10 = __toESM(require("react"));
@@ -4658,13 +4670,17 @@ var import_utils4 = require("@lexical/utils");
4658
4670
  var import_lexical9 = require("lexical");
4659
4671
  var import_react48 = require("react");
4660
4672
  var import_jsx_runtime38 = require("@emotion/react/jsx-runtime");
4661
- function VariablesComposerInput({ css: css37, ...contentEditableProps }) {
4673
+ function VariablesComposerInput({
4674
+ css: css37,
4675
+ placeholder,
4676
+ ...contentEditableProps
4677
+ }) {
4662
4678
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
4663
4679
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4664
4680
  import_LexicalPlainTextPlugin.PlainTextPlugin,
4665
4681
  {
4666
4682
  contentEditable: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_LexicalContentEditable.ContentEditable, { ...contentEditableProps }),
4667
- placeholder: null,
4683
+ placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: placeholder }) : null,
4668
4684
  ErrorBoundary: import_LexicalErrorBoundary.default
4669
4685
  }
4670
4686
  ),
@@ -4762,6 +4778,7 @@ function InputVariables(props) {
4762
4778
  transformPaste,
4763
4779
  showAddVariableMenuOption,
4764
4780
  inputWhenNoVariables,
4781
+ placeholder,
4765
4782
  caption,
4766
4783
  errorMessage,
4767
4784
  warningMessage,
@@ -4802,7 +4819,17 @@ function InputVariables(props) {
4802
4819
  "aria-label": ariaLabel,
4803
4820
  "data-testid": dataTestId ? dataTestId : "input-container",
4804
4821
  "data-text-value": value,
4805
- css: [input, styleVariant === "compact" ? inputCompact : null]
4822
+ css: [input, styleVariant === "compact" ? inputCompact : null],
4823
+ placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4824
+ import_design_system20.Caption,
4825
+ {
4826
+ css: [
4827
+ placeholderCaption,
4828
+ styleVariant === "compact" ? placeholderCompact : null
4829
+ ],
4830
+ children: placeholder
4831
+ }
4832
+ ) : void 0
4806
4833
  }
4807
4834
  )
4808
4835
  }
@@ -5280,7 +5307,7 @@ var variableValue = import_react55.css`
5280
5307
  var import_jsx_runtime43 = require("@emotion/react/jsx-runtime");
5281
5308
  function VariablesList() {
5282
5309
  const { variables, dispatch } = useVariables();
5283
- const sorted = variablesToList(variables);
5310
+ const sorted = variablesToList(variables).filter((variable) => !variable.system);
5284
5311
  const onDragEnd = (res) => {
5285
5312
  var _a, _b;
5286
5313
  if (res.destination && res.source.droppableId === ((_a = res.destination) == null ? void 0 : _a.droppableId)) {
package/dist/index.mjs CHANGED
@@ -3002,7 +3002,7 @@ import {
3002
3002
  import { mergeRegister } from "@lexical/utils";
3003
3003
  import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
3004
3004
  import { createVariableReference } from "@uniformdev/canvas";
3005
- import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItem as MenuItem2, MenuItemSeparator } from "@uniformdev/design-system";
3005
+ import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItemInner, MenuItemSeparator } from "@uniformdev/design-system";
3006
3006
  import { dequal as dequal2 } from "dequal/lite";
3007
3007
  import {
3008
3008
  $createTextNode,
@@ -3766,7 +3766,7 @@ function VariablesPlugin({
3766
3766
  currentCumulativeMenuIndex++;
3767
3767
  const myCumulativeIndex = currentCumulativeMenuIndex;
3768
3768
  return /* @__PURE__ */ jsx32(
3769
- MenuItem2,
3769
+ MenuItemInner,
3770
3770
  {
3771
3771
  active: selectedIndex === myCumulativeIndex,
3772
3772
  onClick: () => {
@@ -4083,6 +4083,18 @@ var inputCompact = css21`
4083
4083
  padding-block: var(--spacing-sm);
4084
4084
  font-size: var(--fs-sm);
4085
4085
  `;
4086
+ var placeholderCaption = css21`
4087
+ position: absolute;
4088
+ color: var(--gray-400);
4089
+ inset: var(--spacing-base) var(--spacing-lg) var(--spacing-base) var(--spacing-base);
4090
+ overflow: hidden;
4091
+ text-overflow: ellipsis;
4092
+ white-space: nowrap;
4093
+ pointer-events: none;
4094
+ `;
4095
+ var placeholderCompact = css21`
4096
+ inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
4097
+ `;
4086
4098
 
4087
4099
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
4088
4100
  import * as React10 from "react";
@@ -4201,7 +4213,7 @@ import { CLEAR_EDITOR_COMMAND } from "lexical";
4201
4213
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4202
4214
  import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircleFill";
4203
4215
  import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
4204
- import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem3, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4216
+ import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem2, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4205
4217
  import { useRef as useRef11 } from "react";
4206
4218
  import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4207
4219
  function SelectVariableMenu({
@@ -4244,7 +4256,7 @@ function SelectVariableMenu({
4244
4256
  menuLabel: menuTooltip,
4245
4257
  children: [
4246
4258
  showAddVariableMenuOptionForReals ? /* @__PURE__ */ jsx34(
4247
- MenuItem3,
4259
+ MenuItem2,
4248
4260
  {
4249
4261
  onClick: async () => {
4250
4262
  const result = await editVariable("", getEditorContext == null ? void 0 : getEditorContext());
@@ -4266,7 +4278,7 @@ function SelectVariableMenu({
4266
4278
  return /* @__PURE__ */ jsx34(MenuGroup2, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
4267
4279
  const { name, displayName, helpText } = variable;
4268
4280
  return /* @__PURE__ */ jsxs19(
4269
- MenuItem3,
4281
+ MenuItem2,
4270
4282
  {
4271
4283
  id: name,
4272
4284
  css: menuItemTextGroup,
@@ -4281,7 +4293,7 @@ function SelectVariableMenu({
4281
4293
  }) }, group.name);
4282
4294
  }),
4283
4295
  menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4284
- onResetVariables ? /* @__PURE__ */ jsx34(MenuItem3, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4296
+ onResetVariables ? /* @__PURE__ */ jsx34(MenuItem2, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
4285
4297
  tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ jsx34(MenuItemSeparator2, {}) : null,
4286
4298
  tip ? /* @__PURE__ */ jsx34("i", { css: variablesTipText, children: tip }) : null
4287
4299
  ]
@@ -4491,14 +4503,18 @@ import {
4491
4503
  PASTE_COMMAND as PASTE_COMMAND2
4492
4504
  } from "lexical";
4493
4505
  import { useEffect as useEffect13 } from "react";
4494
- import { jsx as jsx38, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4495
- function VariablesComposerInput({ css: css37, ...contentEditableProps }) {
4506
+ import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4507
+ function VariablesComposerInput({
4508
+ css: css37,
4509
+ placeholder,
4510
+ ...contentEditableProps
4511
+ }) {
4496
4512
  return /* @__PURE__ */ jsxs22("div", { children: [
4497
4513
  /* @__PURE__ */ jsx38(
4498
4514
  PlainTextPlugin,
4499
4515
  {
4500
4516
  contentEditable: /* @__PURE__ */ jsx38(ContentEditable, { ...contentEditableProps }),
4501
- placeholder: null,
4517
+ placeholder: placeholder ? /* @__PURE__ */ jsx38(Fragment9, { children: placeholder }) : null,
4502
4518
  ErrorBoundary: LexicalErrorBoundary
4503
4519
  }
4504
4520
  ),
@@ -4583,7 +4599,7 @@ function RichishCopyAndPastePlugin() {
4583
4599
  }
4584
4600
 
4585
4601
  // src/components/Variables/InputVariables.tsx
4586
- import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4602
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4587
4603
  function InputVariables(props) {
4588
4604
  const {
4589
4605
  id,
@@ -4596,6 +4612,7 @@ function InputVariables(props) {
4596
4612
  transformPaste,
4597
4613
  showAddVariableMenuOption,
4598
4614
  inputWhenNoVariables,
4615
+ placeholder,
4599
4616
  caption,
4600
4617
  errorMessage,
4601
4618
  warningMessage,
@@ -4636,7 +4653,17 @@ function InputVariables(props) {
4636
4653
  "aria-label": ariaLabel,
4637
4654
  "data-testid": dataTestId ? dataTestId : "input-container",
4638
4655
  "data-text-value": value,
4639
- css: [input, styleVariant === "compact" ? inputCompact : null]
4656
+ css: [input, styleVariant === "compact" ? inputCompact : null],
4657
+ placeholder: placeholder ? /* @__PURE__ */ jsx39(
4658
+ Caption,
4659
+ {
4660
+ css: [
4661
+ placeholderCaption,
4662
+ styleVariant === "compact" ? placeholderCompact : null
4663
+ ],
4664
+ children: placeholder
4665
+ }
4666
+ ) : void 0
4640
4667
  }
4641
4668
  )
4642
4669
  }
@@ -4695,7 +4722,7 @@ function InputVariablesOverlayMenu({
4695
4722
  ...props
4696
4723
  }) {
4697
4724
  if (disabled) {
4698
- return /* @__PURE__ */ jsx39(Fragment9, { children });
4725
+ return /* @__PURE__ */ jsx39(Fragment10, { children });
4699
4726
  }
4700
4727
  return /* @__PURE__ */ jsxs23("div", { css: menuContainer, children: [
4701
4728
  children,
@@ -5121,10 +5148,10 @@ var variableValue = css25`
5121
5148
  `;
5122
5149
 
5123
5150
  // src/components/Variables/VariablesList.tsx
5124
- import { Fragment as Fragment10, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5151
+ import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
5125
5152
  function VariablesList() {
5126
5153
  const { variables, dispatch } = useVariables();
5127
- const sorted = variablesToList(variables);
5154
+ const sorted = variablesToList(variables).filter((variable) => !variable.system);
5128
5155
  const onDragEnd = (res) => {
5129
5156
  var _a, _b;
5130
5157
  if (res.destination && res.source.droppableId === ((_a = res.destination) == null ? void 0 : _a.droppableId)) {
@@ -5142,7 +5169,7 @@ function VariablesList() {
5142
5169
  return result;
5143
5170
  }
5144
5171
  };
5145
- return /* @__PURE__ */ jsxs27(Fragment10, { children: [
5172
+ return /* @__PURE__ */ jsxs27(Fragment11, { children: [
5146
5173
  /* @__PURE__ */ jsx43(DragDropContext2, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx43(Droppable2, { droppableId: "variables-table", children: (provided) => /* @__PURE__ */ jsxs27(Table, { ...provided.droppableProps, ref: provided.innerRef, children: [
5147
5174
  /* @__PURE__ */ jsx43(TableHead, { children: /* @__PURE__ */ jsxs27(TableRow, { children: [
5148
5175
  /* @__PURE__ */ jsx43(TableCellHead, { children: "Name" }),
@@ -5770,7 +5797,7 @@ function decodeVariablesInUrlEncodedString(string, varValues) {
5770
5797
  }
5771
5798
 
5772
5799
  // src/components/Request/RequestUrl.tsx
5773
- import { Fragment as Fragment11, jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5800
+ import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5774
5801
  function RequestUrl() {
5775
5802
  var _a, _b;
5776
5803
  const { variables } = useVariables();
@@ -5794,7 +5821,7 @@ function RequestUrl() {
5794
5821
  request.baseRequest ? /* @__PURE__ */ jsx52("span", { children: (_b = request.baseRequest) == null ? void 0 : _b.baseUrl }) : null,
5795
5822
  /* @__PURE__ */ jsxs31("span", { css: { fontWeight: request.baseRequest ? "bold" : "inherit" }, children: [
5796
5823
  urlEncodeRequestUrl(request.relativeUrl, variables),
5797
- mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment11, { children: [
5824
+ mergedParameters.length > 0 ? /* @__PURE__ */ jsxs31(Fragment12, { children: [
5798
5825
  "?",
5799
5826
  mergedParameters.map((param, index) => {
5800
5827
  const encoded = urlEncodeRequestParameter(param, variables);
@@ -6749,7 +6776,7 @@ var ObjectSearchResultListTitle = css36`
6749
6776
  `;
6750
6777
 
6751
6778
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
6752
- import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6779
+ import { Fragment as Fragment13, jsx as jsx65, jsxs as jsxs40 } from "@emotion/react/jsx-runtime";
6753
6780
  function ObjectSearchResultList({
6754
6781
  resultLabelText = "Selected",
6755
6782
  removeButtonText = "Remove all",
@@ -6776,7 +6803,7 @@ function ObjectSearchResultList({
6776
6803
  return result;
6777
6804
  }
6778
6805
  };
6779
- return /* @__PURE__ */ jsxs40(Fragment12, { children: [
6806
+ return /* @__PURE__ */ jsxs40(Fragment13, { children: [
6780
6807
  /* @__PURE__ */ jsxs40("div", { role: "group", css: ObjectSearchResultListContainer, children: [
6781
6808
  /* @__PURE__ */ jsxs40("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
6782
6809
  /* @__PURE__ */ jsx65("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
@@ -7094,7 +7121,7 @@ import {
7094
7121
  LoadingIndicator as LoadingIndicator5,
7095
7122
  LoadingOverlay as LoadingOverlay2,
7096
7123
  Menu as Menu4,
7097
- MenuItem as MenuItem4,
7124
+ MenuItem as MenuItem3,
7098
7125
  ParameterGroup,
7099
7126
  ParameterImage,
7100
7127
  ParameterImageInner,
@@ -7150,7 +7177,7 @@ export {
7150
7177
  LoadingIndicator5 as LoadingIndicator,
7151
7178
  LoadingOverlay2 as LoadingOverlay,
7152
7179
  Menu4 as Menu,
7153
- MenuItem4 as MenuItem,
7180
+ MenuItem3 as MenuItem,
7154
7181
  MeshApp,
7155
7182
  OPEN_INSERT_VARIABLE_COMMAND,
7156
7183
  ObjectSearchContainer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.69.0",
3
+ "version": "19.73.0",
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.69.0",
54
- "@uniformdev/design-system": "19.69.0",
55
- "@uniformdev/mesh-sdk": "19.69.0",
53
+ "@uniformdev/canvas": "19.73.0",
54
+ "@uniformdev/design-system": "19.73.0",
55
+ "@uniformdev/mesh-sdk": "19.73.0",
56
56
  "dequal": "^2.0.3",
57
57
  "lexical": "^0.12.0",
58
58
  "mitt": "^3.0.0",
@@ -61,7 +61,7 @@
61
61
  "react-use": "17.4.0",
62
62
  "timeago.js": "4.0.2",
63
63
  "uuid": "9.0.1",
64
- "zod": "3.22.3"
64
+ "zod": "3.22.4"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@emotion/react": ">=11.8.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "327658d8c6e5735499845ebb29d74906f2a43dad"
89
+ "gitHead": "1376a707cf81b8ff1d032cfc5c927c8eb213e713"
90
90
  }