@uniformdev/mesh-sdk-react 18.18.1-alpha.12 → 18.19.1-alpha.7

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.js CHANGED
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
27
  mod
24
28
  ));
@@ -27,9 +31,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
27
31
  // src/index.ts
28
32
  var src_exports = {};
29
33
  __export(src_exports, {
30
- AddListButton: () => import_design_system24.AddListButton,
31
- Button: () => import_design_system24.Button,
32
- Callout: () => import_design_system24.Callout,
34
+ AddListButton: () => import_design_system25.AddListButton,
35
+ Button: () => import_design_system25.Button,
36
+ Callout: () => import_design_system25.Callout,
33
37
  DamSelectedItem: () => DamSelectedItem,
34
38
  DataResourceVariablesList: () => DataResourceVariablesList,
35
39
  DataSourceEditor: () => DataSourceEditor,
@@ -37,21 +41,36 @@ __export(src_exports, {
37
41
  DefaultSearchRow: () => DefaultSearchRow,
38
42
  DefaultSelectedItem: () => DefaultSelectedItem,
39
43
  EntrySearch: () => EntrySearch,
40
- Heading: () => import_design_system24.Heading,
44
+ Heading: () => import_design_system25.Heading,
41
45
  Icons: () => icons_exports,
42
- Input: () => import_design_system24.Input,
43
- InputComboBox: () => import_design_system24.InputComboBox,
44
- InputKeywordSearch: () => import_design_system24.InputKeywordSearch,
45
- InputSelect: () => import_design_system24.InputSelect,
46
- InputToggle: () => import_design_system24.InputToggle,
46
+ Input: () => import_design_system25.Input,
47
+ InputComboBox: () => import_design_system25.InputComboBox,
48
+ InputKeywordSearch: () => import_design_system25.InputKeywordSearch,
49
+ InputSelect: () => import_design_system25.InputSelect,
50
+ InputToggle: () => import_design_system25.InputToggle,
47
51
  InputVariables: () => InputVariables,
48
- KeywordSearchInput: () => import_design_system24.InputKeywordSearch,
49
- Label: () => import_design_system24.Label,
50
- LoadingIndicator: () => import_design_system24.LoadingIndicator,
51
- LoadingOverlay: () => import_design_system24.LoadingOverlay,
52
- Menu: () => import_design_system24.Menu,
53
- MenuItem: () => import_design_system24.MenuItem,
52
+ KeywordSearchInput: () => import_design_system25.InputKeywordSearch,
53
+ Label: () => import_design_system25.Label,
54
+ LoadingIndicator: () => import_design_system25.LoadingIndicator,
55
+ LoadingOverlay: () => import_design_system25.LoadingOverlay,
56
+ Menu: () => import_design_system25.Menu,
57
+ MenuItem: () => import_design_system25.MenuItem,
54
58
  MeshApp: () => MeshApp,
59
+ ParameterGroup: () => import_design_system25.ParameterGroup,
60
+ ParameterImage: () => import_design_system25.ParameterImage,
61
+ ParameterImageInner: () => import_design_system25.ParameterImageInner,
62
+ ParameterInput: () => import_design_system25.ParameterInput,
63
+ ParameterInputInner: () => import_design_system25.ParameterInputInner,
64
+ ParameterLabel: () => import_design_system25.ParameterLabel,
65
+ ParameterMenuButton: () => import_design_system25.ParameterMenuButton,
66
+ ParameterSelect: () => import_design_system25.ParameterSelect,
67
+ ParameterSelectInner: () => import_design_system25.ParameterSelectInner,
68
+ ParameterShell: () => import_design_system25.ParameterShell,
69
+ ParameterShellContext: () => import_design_system24.ParameterShellContext,
70
+ ParameterTextarea: () => import_design_system25.ParameterTextarea,
71
+ ParameterTextareaInner: () => import_design_system25.ParameterTextareaInner,
72
+ ParameterToggle: () => import_design_system25.ParameterToggle,
73
+ ParameterToggleInner: () => import_design_system25.ParameterToggleInner,
55
74
  ProductPreviewList: () => ProductPreviewList,
56
75
  ProductQuery: () => ProductQuery,
57
76
  ProductQueryContext: () => ProductQueryContext,
@@ -68,13 +87,13 @@ __export(src_exports, {
68
87
  RequestUrl: () => RequestUrl,
69
88
  RequestUrlInput: () => RequestUrlInput,
70
89
  ResolvableLoadingValue: () => ResolvableLoadingValue,
71
- ScrollableList: () => import_design_system24.ScrollableList,
72
- ScrollableListItem: () => import_design_system24.ScrollableListItem,
90
+ ScrollableList: () => import_design_system25.ScrollableList,
91
+ ScrollableListItem: () => import_design_system25.ScrollableListItem,
73
92
  SelectionField: () => SelectionField,
74
- Switch: () => import_design_system24.Switch,
93
+ Switch: () => import_design_system25.Switch,
75
94
  TextVariableRenderer: () => TextVariableRenderer,
76
- Textarea: () => import_design_system24.Textarea,
77
- Theme: () => import_design_system24.Theme,
95
+ Textarea: () => import_design_system25.Textarea,
96
+ Theme: () => import_design_system25.Theme,
78
97
  UniformMeshLocationContext: () => UniformMeshLocationContext,
79
98
  UniformMeshLocationContextProvider: () => UniformMeshLocationContextProvider,
80
99
  UniformMeshSdkContext: () => UniformMeshSdkContext,
@@ -149,6 +168,7 @@ __export(src_exports, {
149
168
  urlEncodeRequestUrl: () => urlEncodeRequestUrl,
150
169
  useInitializeUniformMeshSdk: () => useInitializeUniformMeshSdk,
151
170
  useMeshLocation: () => useMeshLocation,
171
+ useParameterShell: () => import_design_system24.useParameterShell,
152
172
  useProductQueryContext: () => useProductQueryContext,
153
173
  useProductSearchContext: () => useProductSearchContext,
154
174
  useRequest: () => useRequest,
@@ -1755,6 +1775,7 @@ var EntrySearch = ({
1755
1775
  setSelectedListItems(selectedItems);
1756
1776
  }
1757
1777
  },
1778
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1758
1779
  [selectedItemsHash]
1759
1780
  );
1760
1781
  const resetForm = () => {
@@ -2006,58 +2027,61 @@ var EntrySearch = ({
2006
2027
  }
2007
2028
  )
2008
2029
  ] }) : null,
2009
- !listOpen ? multiSelect && selectedListItems.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.Droppable, { droppableId: multiSelectId || "canvas-multi-select", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2010
- "div",
2011
- {
2012
- ...provided.droppableProps,
2013
- ref: provided.innerRef,
2014
- css: import_react16.css`
2030
+ !listOpen ? multiSelect && selectedListItems.length > 1 ? (
2031
+ //enable dnd only if selected more then 1 item
2032
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.Droppable, { droppableId: multiSelectId || "canvas-multi-select", children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2033
+ "div",
2034
+ {
2035
+ ...provided.droppableProps,
2036
+ ref: provided.innerRef,
2037
+ css: import_react16.css`
2015
2038
  margin-block: var(--spacing-sm) 0;
2016
2039
  `,
2017
- children: [
2018
- selectedListItems == null ? void 0 : selectedListItems.map((selectedItem, index) => {
2019
- if (selectedItem == null ? void 0 : selectedItem.id) {
2020
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.Draggable, { draggableId: selectedItem.id, index, children: (provided2, snapshot) => {
2021
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2022
- "div",
2023
- {
2024
- css: draggableContainer,
2025
- ref: provided2.innerRef,
2026
- "data-dragging": snapshot.isDragging,
2027
- ...provided2.draggableProps,
2028
- ...provided2.dragHandleProps,
2029
- children: [
2030
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { css: draggableIconWrapper, children: [
2040
+ children: [
2041
+ selectedListItems == null ? void 0 : selectedListItems.map((selectedItem, index) => {
2042
+ if (selectedItem == null ? void 0 : selectedItem.id) {
2043
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_beautiful_dnd.Draggable, { draggableId: selectedItem.id, index, children: (provided2, snapshot) => {
2044
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2045
+ "div",
2046
+ {
2047
+ css: draggableContainer,
2048
+ ref: provided2.innerRef,
2049
+ "data-dragging": snapshot.isDragging,
2050
+ ...provided2.draggableProps,
2051
+ ...provided2.dragHandleProps,
2052
+ children: [
2053
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { css: draggableIconWrapper, children: [
2054
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2055
+ MoreVerticalAlt_default,
2056
+ {
2057
+ css: [draggableIcon, draggableIconOffset],
2058
+ width: 24,
2059
+ height: 24
2060
+ }
2061
+ ),
2062
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MoreVerticalAlt_default, { css: draggableIcon, width: 24, height: 24 })
2063
+ ] }),
2031
2064
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2032
- MoreVerticalAlt_default,
2065
+ ResolvedSelectedItemComponent,
2033
2066
  {
2034
- css: [draggableIcon, draggableIconOffset],
2035
- width: 24,
2036
- height: 24
2037
- }
2038
- ),
2039
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MoreVerticalAlt_default, { css: draggableIcon, width: 24, height: 24 })
2040
- ] }),
2041
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2042
- ResolvedSelectedItemComponent,
2043
- {
2044
- logoIcon,
2045
- selectedItem,
2046
- onDeselect: (item) => handleDeselect(item),
2047
- onEditClosed: onEditClosed ? (item) => onEditClosed(item) : void 0
2048
- },
2049
- `selected-item-${selectedItem.id}`
2050
- )
2051
- ]
2052
- }
2053
- );
2054
- } }, selectedItem.id);
2055
- }
2056
- }),
2057
- provided.placeholder
2058
- ]
2059
- }
2060
- ) }) }) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2067
+ logoIcon,
2068
+ selectedItem,
2069
+ onDeselect: (item) => handleDeselect(item),
2070
+ onEditClosed: onEditClosed ? (item) => onEditClosed(item) : void 0
2071
+ },
2072
+ `selected-item-${selectedItem.id}`
2073
+ )
2074
+ ]
2075
+ }
2076
+ );
2077
+ } }, selectedItem.id);
2078
+ }
2079
+ }),
2080
+ provided.placeholder
2081
+ ]
2082
+ }
2083
+ ) }) })
2084
+ ) : selectedListItems == null ? void 0 : selectedListItems.map((selectedItem) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2061
2085
  ResolvedSelectedItemComponent,
2062
2086
  {
2063
2087
  logoIcon,
@@ -2424,6 +2448,9 @@ function ProductSearch({
2424
2448
  }));
2425
2449
  return result;
2426
2450
  },
2451
+ // We use `categoryIds` as a dependency instead of `categories` array so
2452
+ // that equality comparison is more accurate with what we expect.
2453
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2427
2454
  [categoryIds]
2428
2455
  );
2429
2456
  const combinedSearchResults = (0, import_react21.useRef)();
@@ -2915,6 +2942,11 @@ var menuItemTextGroup = import_react28.css`
2915
2942
  var smallText = import_react28.css`
2916
2943
  font-size: var(--fs-xs);
2917
2944
  `;
2945
+ var variablesTipText = import_react28.css`
2946
+ ${smallText}
2947
+ color: var(--gray-500);
2948
+ padding: 0 var(--spacing-sm);
2949
+ `;
2918
2950
 
2919
2951
  // src/components/Variables/VariablesProvider.tsx
2920
2952
  var React10 = __toESM(require("react"));
@@ -2934,504 +2966,6 @@ var variablesFormBtnGroup = import_react29.css`
2934
2966
  display: flex;
2935
2967
  gap: var(--spacing-sm);
2936
2968
  `;
2937
- var tagifyStyles = import_react29.css`
2938
- :root {
2939
- --tagify-dd-color-primary: rgb(53, 149, 246);
2940
- --tagify-dd-bg-color: var(--white);
2941
- --tagify-dd-item-pad: var(--spacing-xs) var(--spacing-sm);
2942
- }
2943
-
2944
- .tagify {
2945
- --tags-disabled-bg: #f1f1f1;
2946
- --tags-border-color: var(--gray-400);
2947
- --tags-hover-border-color: var(--gray-300);
2948
- --tags-focus-border-color: var(--brand-secondary-1);
2949
- --tag-border-radius: var(--rounded-md);
2950
- --tag-bg: var(--gray-100);
2951
- --tag-hover: var(--gray-200);
2952
- --tag-text-color: var(--brand-secondary-1);
2953
- --tag-text-color--edit: var(--brand-secondary-1);
2954
- --tag-pad: var(--spacing-2xs) var(--spacing-sm);
2955
- --tag-inset-shadow-size: 1rem;
2956
- --tag-invalid-color: #d39494;
2957
- --tag-invalid-bg: rgba(211, 148, 148, 0.5);
2958
- --tag-remove-bg: rgba(211, 148, 148, 0.3);
2959
- --tag-remove-btn-color: black;
2960
- --tag-remove-btn-bg: none;
2961
- --tag-remove-btn-bg--hover: #c77777;
2962
- --input-color: inherit;
2963
- --tag--min-width: 1ch;
2964
- --tag--max-width: auto;
2965
- --tag-hide-transition: 0.3s;
2966
- --placeholder-color: rgba(0, 0, 0, 0.4);
2967
- --placeholder-color-focus: rgba(0, 0, 0, 0.25);
2968
- --loader-size: 0.8em;
2969
- --readonly-striped: 1;
2970
-
2971
- background: var(--white);
2972
- display: inline-flex;
2973
- align-items: flex-start;
2974
- flex-wrap: wrap;
2975
- border-radius: var(--rounded-md);
2976
- outline: 1px solid var(--gray-400);
2977
- padding: 0;
2978
- line-height: 0;
2979
- cursor: text;
2980
- position: relative;
2981
- box-sizing: border-box;
2982
- transition: 0.1s;
2983
- word-break: break-word;
2984
- }
2985
- .tagify:hover:not(.tagify--focus):not(.tagify--invalid) {
2986
- --tags-border-color: var(--tags-hover-border-color);
2987
- }
2988
- .tagify[disabled] {
2989
- background: var(--tags-disabled-bg);
2990
- filter: saturate(0);
2991
- opacity: 0.5;
2992
- pointer-events: none;
2993
- }
2994
- .tagify[disabled].tagify--select,
2995
- .tagify[readonly].tagify--select {
2996
- pointer-events: none;
2997
- }
2998
- .tagify[disabled]:not(.tagify--mix):not(.tagify--select),
2999
- .tagify[readonly]:not(.tagify--mix):not(.tagify--select) {
3000
- cursor: default;
3001
- }
3002
- .tagify[disabled]:not(.tagify--mix):not(.tagify--select) > .tagify__input,
3003
- .tagify[readonly]:not(.tagify--mix):not(.tagify--select) > .tagify__input {
3004
- visibility: hidden;
3005
- width: 0;
3006
- margin: 5px 0;
3007
- }
3008
- .tagify[disabled]:not(.tagify--mix):not(.tagify--select) .tagify__tag > div,
3009
- .tagify[readonly]:not(.tagify--mix):not(.tagify--select) .tagify__tag > div {
3010
- padding: var(--tag-pad);
3011
- }
3012
- .tagify[disabled]:not(.tagify--mix):not(.tagify--select) .tagify__tag > div::before,
3013
- .tagify[readonly]:not(.tagify--mix):not(.tagify--select) .tagify__tag > div::before {
3014
- animation: readonlyStyles 1s calc(-1s * (var(--readonly-striped) - 1)) paused;
3015
- }
3016
-
3017
- .tagify[disabled] .tagify__tag__removeBtn,
3018
- .tagify[readonly] .tagify__tag__removeBtn {
3019
- display: none;
3020
- }
3021
- .tagify--loading .tagify__input > br:last-child {
3022
- display: none;
3023
- }
3024
- .tagify--loading .tagify__input::before {
3025
- content: none;
3026
- }
3027
- .tagify--loading .tagify__input::after {
3028
- content: '';
3029
- vertical-align: middle;
3030
- opacity: 1;
3031
- width: 0.7em;
3032
- height: 0.7em;
3033
- width: var(--loader-size);
3034
- height: var(--loader-size);
3035
- min-width: 0;
3036
- border: 3px solid;
3037
- border-color: #eee #bbb #888 transparent;
3038
- border-radius: 50%;
3039
- animation: rotateLoader 0.4s infinite linear;
3040
- content: '' !important;
3041
- margin: -2px 0 -2px 0.5em;
3042
- }
3043
- .tagify--loading .tagify__input:empty::after {
3044
- margin-left: 0;
3045
- }
3046
- .tagify + input,
3047
- .tagify + textarea {
3048
- position: absolute !important;
3049
- left: -9999em !important;
3050
- transform: scale(0) !important;
3051
- }
3052
- .tagify__tag {
3053
- display: inline-flex;
3054
- align-items: center;
3055
- margin: 5px 0 5px 5px;
3056
- position: relative;
3057
- z-index: 1;
3058
- outline: 0;
3059
- line-height: normal;
3060
- cursor: default;
3061
- transition: 0.13s ease-out;
3062
- }
3063
- .tagify__tag > div {
3064
- vertical-align: top;
3065
- box-sizing: border-box;
3066
- max-width: 100%;
3067
- padding: var(--tag-pad);
3068
- color: var(--tag-text-color);
3069
- line-height: inherit;
3070
- border-radius: var(--tag-border-radius);
3071
- white-space: nowrap;
3072
- transition: 0.13s ease-out;
3073
- }
3074
- .tagify__tag > div > * {
3075
- white-space: pre-wrap;
3076
- overflow: hidden;
3077
- text-overflow: ellipsis;
3078
- display: inline-block;
3079
- vertical-align: top;
3080
- min-width: var(--tag--min-width);
3081
- max-width: var(--tag--max-width);
3082
- transition: 0.8s ease, 0.1s color;
3083
- }
3084
- .tagify__tag > div > [contenteditable] {
3085
- outline: 0;
3086
- -webkit-user-select: text;
3087
- user-select: text;
3088
- cursor: text;
3089
- margin: -2px;
3090
- padding: 2px;
3091
- max-width: 350px;
3092
- }
3093
- .tagify__tag > div::before {
3094
- content: '';
3095
- position: absolute;
3096
- border-radius: inherit;
3097
- inset: var(--tag-bg-inset, 0);
3098
- z-index: -1;
3099
- pointer-events: none;
3100
- transition: 120ms ease;
3101
- animation: tags--bump 0.3s ease-out 1;
3102
- background: var(--tag-bg);
3103
- }
3104
- .tagify__tag:focus div::before,
3105
- .tagify__tag:hover:not([readonly]) div::before {
3106
- --tag-bg-inset: -2.5px;
3107
- --tag-bg: var(--tag-hover);
3108
- }
3109
- .tagify__tag--loading {
3110
- pointer-events: none;
3111
- }
3112
- .tagify__tag--loading .tagify__tag__removeBtn {
3113
- display: none;
3114
- }
3115
- .tagify__tag--loading::after {
3116
- --loader-size: 0.4em;
3117
- content: '';
3118
- vertical-align: middle;
3119
- opacity: 1;
3120
- width: 0.7em;
3121
- height: 0.7em;
3122
- width: var(--loader-size);
3123
- height: var(--loader-size);
3124
- min-width: 0;
3125
- border: 3px solid;
3126
- border-color: #eee #bbb #888 transparent;
3127
- border-radius: 50%;
3128
- animation: rotateLoader 0.4s infinite linear;
3129
- margin: 0 0.5em 0 -0.1em;
3130
- }
3131
- .tagify__tag--flash div::before {
3132
- animation: none;
3133
- }
3134
- .tagify__tag--hide {
3135
- width: 0 !important;
3136
- padding-left: 0;
3137
- padding-right: 0;
3138
- margin-left: 0;
3139
- margin-right: 0;
3140
- opacity: 0;
3141
- transform: scale(0);
3142
- transition: var(--tag-hide-transition);
3143
- pointer-events: none;
3144
- }
3145
- .tagify__tag--hide > div > * {
3146
- white-space: nowrap;
3147
- }
3148
- .tagify__tag.tagify--noAnim > div::before {
3149
- animation: none;
3150
- }
3151
- .tagify__tag.tagify--notAllowed:not(.tagify__tag--editable) div > span {
3152
- opacity: 0.5;
3153
- }
3154
- .tagify__tag.tagify--notAllowed:not(.tagify__tag--editable) div::before {
3155
- --tag-bg: var(--tag-invalid-bg);
3156
- transition: 0.2s;
3157
- }
3158
- .tagify__tag[readonly] .tagify__tag__removeBtn {
3159
- display: none;
3160
- }
3161
- .tagify__tag[readonly] > div::before {
3162
- animation: readonlyStyles 1s calc(-1s * (var(--readonly-striped) - 1)) paused;
3163
- }
3164
-
3165
- .tagify__tag--editable > div {
3166
- color: var(--tag-text-color--edit);
3167
- }
3168
- .tagify__tag--editable > div::before {
3169
- background-color: var(--tag-hover) !important;
3170
- }
3171
- .tagify__tag--editable > .tagify__tag__removeBtn {
3172
- pointer-events: none;
3173
- }
3174
- .tagify__tag--editable > .tagify__tag__removeBtn::after {
3175
- opacity: 0;
3176
- transform: translateX(100%) translateX(5px);
3177
- }
3178
- .tagify__tag--editable.tagify--invalid > div::before {
3179
- background-color: var(--tag-invalid-color) !important;
3180
- }
3181
- .tagify__tag__removeBtn {
3182
- order: 5;
3183
- display: inline-flex;
3184
- align-items: center;
3185
- justify-content: center;
3186
- border-radius: 50px;
3187
- cursor: pointer;
3188
- font: 14px/1 Arial;
3189
- background: var(--tag-remove-btn-bg);
3190
- color: var(--tag-remove-btn-color);
3191
- width: 14px;
3192
- height: 14px;
3193
- margin-right: 4.6666666667px;
3194
- margin-left: auto;
3195
- overflow: hidden;
3196
- transition: 0.2s ease-out;
3197
- }
3198
- .tagify__tag__removeBtn::after {
3199
- content: '×';
3200
- transition: 0.3s, color 0s;
3201
- }
3202
- .tagify__tag__removeBtn:hover {
3203
- color: var(--white);
3204
- background: var(--tag-remove-btn-bg--hover);
3205
- }
3206
- .tagify__tag__removeBtn:hover + div > span {
3207
- opacity: 0.5;
3208
- }
3209
- .tagify__tag__removeBtn:hover + div::before {
3210
- background: var(--tag-remove-bg);
3211
- transition: background-color 0.2s;
3212
- }
3213
- .tagify:not(.tagify--mix) .tagify__input br {
3214
- display: none;
3215
- }
3216
- .tagify:not(.tagify--mix) .tagify__input * {
3217
- display: inline;
3218
- white-space: nowrap;
3219
- }
3220
- .tagify__input {
3221
- border-radius: var(--rounded-md);
3222
- flex-grow: 1;
3223
- display: inline-block;
3224
- min-width: 110px;
3225
- margin: 5px;
3226
- padding: var(--spacing-base) var(--spacing-md) var(--spacing-base) var(--spacing-base);
3227
- line-height: normal;
3228
- position: relative;
3229
- white-space: pre-wrap;
3230
- color: var(--input-color);
3231
- box-sizing: inherit;
3232
- }
3233
- .tagify__input:empty::before {
3234
- position: static;
3235
- }
3236
- .tagify__input:focus {
3237
- outline: 0;
3238
- }
3239
- .tagify__input:focus::before {
3240
- transition: 0.2s ease-out;
3241
- opacity: 0;
3242
- transform: translatex(6px);
3243
- }
3244
- .tagify__input:focus:empty::before {
3245
- transition: 0.2s ease-out;
3246
- opacity: 1;
3247
- transform: none;
3248
- color: rgba(0, 0, 0, 0.25);
3249
- color: var(--placeholder-color-focus);
3250
- }
3251
- .tagify__input::before {
3252
- content: attr(data-placeholder);
3253
- height: 1em;
3254
- line-height: 1em;
3255
- margin: auto 0;
3256
- z-index: 1;
3257
- color: var(--placeholder-color);
3258
- white-space: nowrap;
3259
- pointer-events: none;
3260
- opacity: 0;
3261
- position: absolute;
3262
- }
3263
- .tagify__input::after {
3264
- content: attr(data-suggest);
3265
- display: inline-block;
3266
- vertical-align: middle;
3267
- position: absolute;
3268
- min-width: calc(100% - 1.5em);
3269
- text-overflow: ellipsis;
3270
- overflow: hidden;
3271
- white-space: pre;
3272
- color: var(--tag-text-color);
3273
- opacity: 0.3;
3274
- pointer-events: none;
3275
- max-width: 100px;
3276
- }
3277
- .tagify__input .tagify__tag {
3278
- margin: 0 1px;
3279
- }
3280
- .tagify--mix {
3281
- display: block;
3282
- }
3283
- .tagify--mix .tagify__input {
3284
- background-image: url("data:image/svg+xml,%3Csvg width='18' height='10' viewBox='0 0 18 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 6C13.5523 6 14 5.55228 14 5C14 4.44772 13.5523 4 13 4L5 4C4.44771 4 4 4.44772 4 5C4 5.55228 4.44772 6 5 6L13 6Z' fill='%23D1D5DB'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 5C18 7.76142 15.7614 10 13 10L5 10C2.23858 10 0 7.76142 0 5C0 2.23858 2.23858 0 5 0L13 0C15.7614 0 18 2.23858 18 5ZM13 8L5 8C3.34315 8 2 6.65685 2 5C2 3.34315 3.34315 2 5 2L13 2C14.6569 2 16 3.34315 16 5C16 6.65685 14.6569 8 13 8Z' fill='%23D1D5DB'/%3E%3C/svg%3E%0A");
3285
- background-repeat: no-repeat;
3286
- background-position: right var(--spacing-sm) center;
3287
- padding: var(--spacing-base) var(--spacing-xl) var(--spacing-base) var(--spacing-base);
3288
- margin: 0;
3289
- width: 100%;
3290
- height: 100%;
3291
- display: block;
3292
- min-height: 54px;
3293
- }
3294
- .tagify--mix .tagify__input::before {
3295
- height: auto;
3296
- display: none;
3297
- line-height: inherit;
3298
- }
3299
- .tagify--mix .tagify__input::after {
3300
- content: none;
3301
- }
3302
- .tagify--select::after {
3303
- content: '>';
3304
- opacity: 0.5;
3305
- position: absolute;
3306
- top: 50%;
3307
- right: 0;
3308
- bottom: 0;
3309
- font: 16px monospace;
3310
- line-height: 8px;
3311
- height: 8px;
3312
- pointer-events: none;
3313
- transform: translate(-150%, -50%) scaleX(1.2) rotate(90deg);
3314
- transition: 0.2s ease-in-out;
3315
- }
3316
- .tagify--select[aria-expanded='true']::after {
3317
- transform: translate(-150%, -50%) rotate(270deg) scaleY(1.2);
3318
- }
3319
- .tagify--select .tagify__tag {
3320
- position: absolute;
3321
- top: 0;
3322
- right: 1.8em;
3323
- bottom: 0;
3324
- }
3325
- .tagify--select .tagify__tag div {
3326
- display: none;
3327
- }
3328
- .tagify--select .tagify__input {
3329
- width: 100%;
3330
- }
3331
- .tagify--empty .tagify__input::before {
3332
- transition: 0.2s ease-out;
3333
- opacity: 1;
3334
- transform: none;
3335
- display: inline-block;
3336
- width: auto;
3337
- }
3338
- .tagify--mix .tagify--empty .tagify__input::before {
3339
- display: inline-block;
3340
- }
3341
- .tagify--focus {
3342
- --tags-border-color: var(--tags-focus-border-color);
3343
- transition: 0s;
3344
- }
3345
- .tagify--invalid {
3346
- --tags-border-color: #d39494;
3347
- }
3348
- .tagify__dropdown {
3349
- position: absolute;
3350
- z-index: 9999;
3351
- transform: translateY(1px);
3352
- overflow: hidden;
3353
- }
3354
- .tagify__dropdown[placement='top'] {
3355
- margin-top: 0;
3356
- transform: translateY(-100%);
3357
- }
3358
- .tagify__dropdown[placement='top'] .tagify__dropdown__wrapper {
3359
- border-top-width: 1.1px;
3360
- border-bottom-width: 0;
3361
- }
3362
- .tagify__dropdown[position='text'] {
3363
- box-shadow: 0 0 0 3px rgba(var(--tagify-dd-color-primary), 0.1);
3364
- font-size: 0.9em;
3365
- }
3366
- .tagify__dropdown[position='text'] .tagify__dropdown__wrapper {
3367
- border-width: 1px;
3368
- }
3369
- .tagify__dropdown__wrapper {
3370
- max-height: 300px;
3371
- overflow: auto;
3372
- overflow-x: hidden;
3373
- background: var(--tagify-dd-bg-color);
3374
- border: 1px solid;
3375
- border-color: var(--tagify-dd-color-primary);
3376
- border-bottom-width: 1.5px;
3377
- border-top-width: 0;
3378
- box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.2);
3379
- transition: 0.25s cubic-bezier(0, 1, 0.5, 1);
3380
- }
3381
- .tagify__dropdown__header:empty {
3382
- display: none;
3383
- }
3384
- .tagify__dropdown__footer {
3385
- display: inline-block;
3386
- margin-top: 0.5em;
3387
- padding: var(--tagify-dd-item-pad);
3388
- font-size: 0.7em;
3389
- font-style: italic;
3390
- opacity: 0.5;
3391
- }
3392
- .tagify__dropdown__footer:empty {
3393
- display: none;
3394
- }
3395
- .tagify__dropdown--initial .tagify__dropdown__wrapper {
3396
- max-height: 20px;
3397
- transform: translateY(-1em);
3398
- }
3399
- .tagify__dropdown--initial[placement='top'] .tagify__dropdown__wrapper {
3400
- transform: translateY(2em);
3401
- }
3402
- .tagify__dropdown__item {
3403
- box-sizing: border-box;
3404
- padding: var(--tagify-dd-item-pad);
3405
- margin: 1px;
3406
- cursor: pointer;
3407
- border-radius: 2px;
3408
- position: relative;
3409
- outline: 0;
3410
- max-height: 60px;
3411
- max-width: 100%;
3412
- }
3413
- .tagify__dropdown__item--active {
3414
- background: var(--tagify-dd-color-primary);
3415
- color: #fff;
3416
- }
3417
- .tagify__dropdown__item:active {
3418
- filter: brightness(105%);
3419
- }
3420
- .tagify__dropdown__item--hidden {
3421
- padding-top: 0;
3422
- padding-bottom: 0;
3423
- margin: 0 1px;
3424
- pointer-events: none;
3425
- overflow: hidden;
3426
- max-height: 0;
3427
- transition: var(--tagify-dd-item--hidden-duration, 0.3s) !important;
3428
- }
3429
- .tagify__dropdown__item--hidden > * {
3430
- transform: translateY(-100%);
3431
- opacity: 0;
3432
- transition: inherit;
3433
- }
3434
- `;
3435
2969
 
3436
2970
  // src/components/Variables/VariableEditor.tsx
3437
2971
  var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
@@ -3557,7 +3091,7 @@ var InsertVariableMenu = ({
3557
3091
  }) => {
3558
3092
  const { variables, dispatch } = useVariables();
3559
3093
  const btnRef = (0, import_react30.useRef)(null);
3560
- const hasVariables = Object.entries(variables).length;
3094
+ const tip = "Tip: access this list by typing ${";
3561
3095
  (0, import_react30.useEffect)(() => {
3562
3096
  if (textValue === trigger && btnRef.current && btnRef.current.getAttribute("aria-expanded") === "false") {
3563
3097
  btnRef.current.click();
@@ -3565,7 +3099,7 @@ var InsertVariableMenu = ({
3565
3099
  }, [textValue, btnRef, trigger]);
3566
3100
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { css: menuContainer, children: [
3567
3101
  children,
3568
- hasVariables ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3102
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3569
3103
  import_design_system15.Menu,
3570
3104
  {
3571
3105
  placement: "bottom-start",
@@ -3591,10 +3125,12 @@ var InsertVariableMenu = ({
3591
3125
  showAddVariableMenuOption ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
3592
3126
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_design_system15.MenuItemSeparator, {}),
3593
3127
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_design_system15.MenuItem, { onClick: () => dispatch({ type: "edit", variable: "" }), children: "Add Variable" })
3594
- ] }) : null
3128
+ ] }) : null,
3129
+ Object.entries(variables).length || showAddVariableMenuOption ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_design_system15.MenuItemSeparator, {}) : null,
3130
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { css: variablesTipText, children: tip })
3595
3131
  ]
3596
3132
  }
3597
- ) : null
3133
+ )
3598
3134
  ] });
3599
3135
  };
3600
3136
 
@@ -3603,6 +3139,7 @@ var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
3603
3139
  function InputVariables({
3604
3140
  "aria-label": ariaLabel,
3605
3141
  value,
3142
+ // disableVariables,
3606
3143
  onChange,
3607
3144
  onPaste,
3608
3145
  onVariableClick,
@@ -4529,9 +4066,14 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4529
4066
  setSdk(window.UniformMeshSDK);
4530
4067
  }
4531
4068
  },
4069
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4532
4070
  [autoResizingDisabled]
4533
4071
  );
4534
4072
  return {
4073
+ // note: we don't use initializationInProgress.current here to tell the consumer whether or not we're
4074
+ // initializing, because initializationInProgress.current initially starts out as `false` and is
4075
+ // only used as a workaround for React StrictMode.
4076
+ // We don't consider the sdk initialized until the `sdk` value is actually defined.
4535
4077
  initializing: !sdk && !error,
4536
4078
  error,
4537
4079
  sdk
@@ -4569,6 +4111,9 @@ function useUniformMeshLocation() {
4569
4111
  return location;
4570
4112
  }
4571
4113
 
4114
+ // src/hooks/index.ts
4115
+ var import_design_system24 = require("@uniformdev/design-system");
4116
+
4572
4117
  // src/utils/createLocationValidator.ts
4573
4118
  function createLocationValidator(setValue, validate) {
4574
4119
  return (dispatch) => setValue((previous) => {
@@ -4578,7 +4123,7 @@ function createLocationValidator(setValue, validate) {
4578
4123
  }
4579
4124
 
4580
4125
  // src/index.ts
4581
- var import_design_system24 = require("@uniformdev/design-system");
4126
+ var import_design_system25 = require("@uniformdev/design-system");
4582
4127
  __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
4583
4128
  // Annotate the CommonJS export names for ESM import in node:
4584
4129
  0 && (module.exports = {
@@ -4607,6 +4152,21 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
4607
4152
  Menu,
4608
4153
  MenuItem,
4609
4154
  MeshApp,
4155
+ ParameterGroup,
4156
+ ParameterImage,
4157
+ ParameterImageInner,
4158
+ ParameterInput,
4159
+ ParameterInputInner,
4160
+ ParameterLabel,
4161
+ ParameterMenuButton,
4162
+ ParameterSelect,
4163
+ ParameterSelectInner,
4164
+ ParameterShell,
4165
+ ParameterShellContext,
4166
+ ParameterTextarea,
4167
+ ParameterTextareaInner,
4168
+ ParameterToggle,
4169
+ ParameterToggleInner,
4610
4170
  ProductPreviewList,
4611
4171
  ProductQuery,
4612
4172
  ProductQueryContext,
@@ -4704,6 +4264,7 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
4704
4264
  urlEncodeRequestUrl,
4705
4265
  useInitializeUniformMeshSdk,
4706
4266
  useMeshLocation,
4267
+ useParameterShell,
4707
4268
  useProductQueryContext,
4708
4269
  useProductSearchContext,
4709
4270
  useRequest,